π Paper PDF | π Project Page | π¬ Demo
Try the free CPU Hugging Face Space
The hosted Space can take about 2-3 minutes to wake up. It runs without local setup, Hugging Face login, or paid hardware.
- π 2026.06 DecodeShare was selected as an ICML 2026 Spotlight.
- π§ 2026.06 Released paper-aligned implementation and H1/H2/H3 rerun summaries.
- π 2026.05 Public CPU demo and reproduction scripts released.
DecodeShare identifies compact task-general directions in KV-cached decode-time hidden states, then tests whether those directions causally affect LLM decisions by removing them only during decoding.
The repository contains the method code, paper experiment runners, smoke tests, full reproduction scripts, lightweight figures, and a small interactive demo.
conda env create -f environment.yml
conda activate decodeshare
bash scripts/run_all_smoke_tests.shInspect full GPU commands without launching model inference:
DRY_RUN=1 bash scripts/reproduce_ablation_tables.shRun the local Gradio demo:
pip install -r demo/requirements-demo.txt
python demo.py --server_port 7860bash scripts/reproduce_h1_tables.sh
bash scripts/reproduce_ablation_tables.sh
bash scripts/reproduce_table_1_patchback.sh
bash scripts/reproduce_steering_flip_tables.sh
bash scripts/reproduce_table_3_h3.shSection command notes:
| Section | Commands |
|---|---|
| H1 sharedness | scripts/01_h1_sharedness/COMMANDS.md |
| H2 decode ablation | scripts/02_h2_decode_ablation/COMMANDS.md |
| H2 patchback | scripts/03_h2_patchback/COMMANDS.md |
| H3 prefill/decode | scripts/04_h3_prefill_decode/COMMANDS.md |
| Steering rank flip | scripts/05_steering_rank_flip/COMMANDS.md |
π Paper-Aligned Reruns. The released implementation is aligned with the estimator described in the paper: task-balanced and task-centered pooled PCA/SVD, no feature-wise standardization before PCA, and decode-time projection removal in the raw hidden-state coordinate system.
Lightweight rerun summaries are in docs/paper_aligned_reruns/. They show no
material change to the H1/H2/H3 qualitative conclusions. The full H2 raw JSON is
not committed because it is 257 MB; the docs include a compact summary and
SHA-256 hash.
decodeshare/ Method and shared utilities
experiments/ Paper-section experiment runners
scripts/ Smoke tests and full reproduction wrappers
downstream/ Steering and patchback bundles
demo/ Local and hosted demo code
docs/ Installation, reproduction, and rerun notes
paper_artifacts/figures/ Lightweight figures
tests/ Lightweight local checks
| Document | Contents |
|---|---|
docs/index.html |
Project-page overview and citation |
docs/installation.md |
Environment setup |
docs/data_and_models.md |
Dataset and model access |
docs/reproduce.md |
Smoke checks and full reruns |
docs/paper_aligned_reruns/ |
Paper-aligned rerun summaries |
docs/troubleshooting.md |
Common runtime issues |
@inproceedings{shao2026decodeshare,
title = {DecodeShare: Tracing the Shared Subspace of LLM Decode-Time Decisions},
author = {Shao, Zishan and Zhang, Lixun and Cui, Kangning and Wang, Yixiao
and Jiang, Ting and Ye, Hancheng and Wang, Qinsi and Du, Zhixu
and Fu, Yuzhe and Yang, Fan and Zhuo, Danyang and Chen, Yiran
and Li, Hai Helen},
booktitle = {Proceedings of the 43rd International Conference on Machine Learning},
year = {2026}
}This repository is released under the MIT License. See LICENSE.

