potentialpaper

Dynamic Latent Routing

Fangyuan Yu, Xin Su, Amir Abdullah

NeurIPS 2026

Edit this page

Or clone it with git

Run in a terminal:

Needs Git LFS. To push, use an API key from your profile as the password.

Or let your agent set it up

It checks and sets up everything: signing in, git, the clone, credentials and an SSH key.

Abstract. We investigate the temporal concatenation of sub-policies in Markov Decision Processes (MDP) with time-varying reward functions. We introduce General Dijkstra Search (GDS), and prove that it discovers optimal goal-reaching policies by concatenating sub-policies optimal for intermediate goals.

Motivated by the ``search, select, update'' principle underlying GDS, we propose Dynamic Latent Routing (DLR), a language-model post-training method that jointly learns discrete latent codes, routing policies, and model parameters through dynamic search in a single training stage. In low-data fine-tuning settings, DLR matches or outperforms supervised fine-tuning across four datasets and six models, achieving a mean gain of +6.6+6.6 percentage points, while prior discrete-latent baselines consistently underperform SFT. Mechanistic analyses and targeted code ablations show that DLR learns structured routing behaviors with distinct causal roles. In six-digit arithmetic, a canonical mechanistic interpretability benchmark, DLR externalizes into discrete routing tokens algorithmic subtasks previously studied through activation and circuit analysis.

Are you an author? Claim this paper to see who's reading it, with views and other statistics, and to write about it here.

Claim this paper
How does this paper connect to your work? Write how you built on it, compared with it or reproduced it, or add a summary, a critique or errata.
Or make it interactive:
Start writing

edit · history

DateVersionSubmitted toPDFEvidence
5 May 2026NeurIPS 2026submittedNeurIPS 2026Accept (poster)reviews ↓[1]—[1]
Missing a version?

NeurIPS 2026

Accept (poster) · 3 reviews · OpenReview

Updated 25 Nov 2026, 03:44 UTC.

Program Chairs · DecisionOpenReview ↗
Decision
Accept (poster)
Read decision
Meta-review

This paper introduces Dynamic Latent Routing (DLR), an innovative post-training method that enables language models to dynamically search for and apply discrete latent codes as steering vectors within the residual stream. Inspired by General Dijkstra Search (GDS), DLR achieves state-of-the-art results over supervised fine-tuning in low-data regimes. The committee was positively impressed by the originality of avoiding special-token text injections, the single-stage training process, and the rigorous mechanistic interpretability demonstrated in the arithmetic and CodeNet studies.

The initial concerns surrounding compute fairness and seed variance were exceptionally well-handled by the authors in the rebuttal. The committee agrees that the FLOP-matched, 5-seed evaluation firmly establishes DLR's algorithmic superiority. For the camera-ready version, please update the paper to reflect the discussion: integrate the comprehensive FLOP-matched table and the 5-seed variance results into the main text to address compute fairness, include the extended multi-turn results, add the 596M-parameter CodeNet and Arithmetic interpretability studies, add the clarifications discussed and update the related work session.

Final justification

See updated metareview.

Area Chair FzqY · Meta-reviewOpenReview ↗
Final justification
See updated metareview.
Read meta-review
Meta-review

This paper introduces Dynamic Latent Routing (DLR), an innovative post-training method that enables language models to dynamically search for and apply discrete latent codes as steering vectors within the residual stream. Inspired by General Dijkstra Search (GDS), DLR achieves state-of-the-art results over supervised fine-tuning in low-data regimes. The committee was positively impressed by the originality of avoiding special-token text injections, the single-stage training process, and the rigorous mechanistic interpretability demonstrated in the arithmetic and CodeNet studies.

The initial concerns surrounding compute fairness and seed variance were exceptionally well-handled by the authors in the rebuttal. The committee agrees that the FLOP-matched, 5-seed evaluation firmly establishes DLR's algorithmic superiority. For the camera-ready version, please update the paper to reflect the discussion: integrate the comprehensive FLOP-matched table and the 5-seed variance results into the main text to address compute fairness, include the extended multi-turn results, add the 596M-parameter CodeNet and Arithmetic interpretability studies, add the clarifications discussed and update the related work session.

Reviewer SzzgOpenReview ↗
Rating
4/6
Confidence
3/5
Quality
3/4
Clarity
2/4
Significance
3/4
Originality
3/4
Contribution type
concept_feasibility
Ethical concerns
NO or VERY MINOR ethics concerns only
Read review
Summary

This paper proposed a method for dynamically learning the steering vectors for different chunks of a language sequence. They named it Dynamic Latent Routing (DLR), which can be extended to a General Dijkstra Search (GDS) when we take each of the steering vectors as the action and the different chunks as the different states. The method follows the search-state-select procedure to find the optimal policy combining several sub-optimal policies. In the experimental part, they apply the DLR method to 6 models and 4 benchmark datasets, and the DLR achieves better performance than the baselines, including steering vector methods and supervised fine-tuning.

Strengths and weaknesses

Strength

  1. This paper proposed a useful method for improving the model's reasoning capabilities using multiple steering vectors, and it outperforms the supervised fine-tuning (SFT) and several steering vectors' baselines. The idea is simple and effective, especially for the low-resource data regime shown in the paper shown.
  2. The analysis part to explain how the multi-chunk solution can provide explainable information of the final task improvement is interesting.

Weakness

  1. Section 3 about the GDS is a bit unnecessary. I understand that the authors try to provide a more general and formal definition of the proposed DLR method, but it seems unconnected with the other parts of the paper. Adding more formulations doesn't mean the method is theoretically grounded. I would love to know more scenarios about how to apply the GDS method and why do we need the formal definition of it.
  2. Here are some other works focused on the multi-steering vectors approach. While they are following different intuitive ideas, all those methods failed because of the direction they tried to learn multiple steering vectors for the model. The paper lacks a clarification of how novel this DLR method is compared with those methods [1][2]
  3. This paper only did the experiments on a very small scale of models; the biggest one is Qwen-3-8B, it's hard to know whether the method can generalize to a bigger scale. As the authors stated in the main paper, they did the experiments on 2XH100 GPUs, so it should be feasible for them to extend the analysis on a 30B size model, which can give us more confidence of the method.

[1] Multi-Attribute Steering of Language Models via Targeted Intervention, https://aclanthology.org/2025.acl-long.1007.pdf [2] Adaptive Multi-Subspace Representation Steering for Attribute Alignment in Large Language Models: https://arxiv.org/abs/2508.10599

Questions
  1. Why do we only add the steering vector to the first token in one trunk?
  2. It seems it’s not the case that chunking more yields better performance (C=64 < C=32 in Table 8). Is there any explanation or insight into it?
Limitations

Yes

Final justification

The author addressed most of the concerns during rebuttal.

Formatting concerns

No

5 comments
Authors · RebuttalOpenReview ↗
Rebuttal

We thank the reviewer for recognizing DLR as a simple and effective approach to multi-vector steering, its improvements over SFT and prior steering baselines, and the interpretability provided by its multi-chunk routing behavior. We address your concerns below.

R1. Necessity of GDS

Imagine Reinforcement learning as building a castle. One approach is to continuously morph a pile of sand until its shape resembles a castle; another is to construct it using reusable Lego blocks, assembling and composing structures we have already built. The latter is more promising because of its discrete, compositional structure. However, we didn’t know how to prove it. Conventional reinforcement learning (via Bellman iterations) updates values across every state at each step—much like reshaping every surface of a sand castle individually. General Dijkstra Search (GDS) provides a principled framework for composing discrete policies, analogous to building with Lego blocks. Crucially, GDS possesses provable optimality within a Dynamic Markov Decision Process (DMDP) environment. To the best of our knowledge, this is the first work to theoretically establish the optimality of compositional learning. DLS is optimizing a policy under such a DMDP environment; it serves as a neural relaxation of GDS to make compositional search scalable. For a formal derivation connecting GDS and DLR, please refer to response R1 to reviewer 4gsZ.

R2. How DLR differs from existing multi-vector steering methods

MAT-Steer, MSRS and an additional multi-vector steering model in K-Steering[1], operate in a human-specified attribute regime: target behaviors are labeled in advance on large datasets, and the methods learn how to represent and combine those known controls. DLR addresses a much more general problem. Given only a downstream task objective, it must jointly discover which latent behaviors are useful, how to represent them, and when to invoke them. No attribute, subtask, or code-level label specifies what an individual code should mean.

Method Requires labeled attributes? Intervention space Composition
MAT-Steer Yes Vectors for predefined attributes Token-level gated linear combination
K-Steering Yes Gradients of non-linear multi-layer perceptron classifier trained on predefined attributes Joint gradient update toward the requested attributes
MSRS Yes Shared and attribute-specific linear subspaces learned from labeled datasets Input-dependent weighting within this predefined linear basis
DLR No—task-level supervision only Discrete latent codebook learned jointly with the router and model Ordered code sequences that compose learned sub-policies over time

The key distinction is therefore not merely learned attribute composition. Rather, prior methods compose within a semantic basis supplied by the user; DLR learns both\textbf{both} the basis and its temporal composition policy. Its codebook acts as a latent vocabulary, and each route as a sentence-like latent program. This is a combinatorial explosion to brute force: even a fixed codebook of CC codes permits CMC^M routes over MM chunks, while DLR must also discover the codes themselves in a high-dimensional activation space. Because the selected codes are discrete and observable, they also provide an auditable interface for causal intervention and a concrete target for mechanistic analysis of how the model learns to decompose larger problems, rather than imposing that decomposition through human-provided labels. Thus, DLR moves beyond combining known attributes toward discovering and sequencing reusable internal computational primitives. We will clarify this distinction and DLR’s novelty, and add MAT-Steer, K-Steering, and MSRS to Related Work in any camera ready revision.

[1]https://aclanthology.org/anthology-files/pdf/findings/2025.findings-emnlp.1278.pdf

R3. Whether DLR scales beyond 8B models

Our experiments use two H100 GPUs and evaluate models up to 8B parameters. Scaling the same full-parameter, mixed-precision AdamW setup to a 30B-parameter model is constrained by GPU memory. At approximately 18 bytes per parameter for weights, gradients, and optimizer states, a 30B model would require roughly 540 GB before accounting for activations and temporary buffers. By comparison, two H100 GPUs provide 160 GB with the 80 GB configuration or 188 GB with the 94 GB configuration. A 30B experiment therefore exceeds both the memory capacity of our reported setup and our currently available compute. We will clarify the evaluated model range and leave larger-scale experiments to future work.

R4. How routing and steering are applied within each chunk

The first token of each chunk is used to select a code. The corresponding steering vector is then added to every token in that chunk. Equation (2) defines code selection, whereas Equation (3) defines the chunk-wide intervention. We will make this distinction more explicit in Section 4.1 and Figure 1.

R5. Why C=64C=64 does not improve over C=32C=32

CC denotes the number of latent codes in the codebook, whereas KK determines how the sequence is divided into chunks. Increasing CC from 32 to 64 gives the router more codes to choose from while leaving the chunking scheme unchanged. In Table 8, all C=64C=64 results are within 0.5 percentage points of the corresponding C=32C=32 results, suggesting that 32 codes already provide sufficient capacity for these tasks. Table 9 separately evaluates the effect of chunk size. Please refer to response R6 to reviewer 4gsZ for further discussion. We will clarify this distinction in the ablation discussion.

Authors · CommentOpenReview ↗

Please let us know if you have any further questions.

Thank you again for your review and questions.

As the author–reviewer discussion period approaches its close, we wanted to check whether our comparison with MAT-Steer, MSRS, and K-Steering clarifies the novelty distinction: these methods compose controls within a human-specified, labeled attribute basis, whereas DLR jointly discovers the latent basis and learns its temporal routing from task-level supervision.

We have also tried our best to answer your questions on how the steering vector is applied, and why performance plateaus as we add more codes. We would be glad to address any remaining concern or question you might have.

Reviewer Szzg · CommentOpenReview ↗

Thank you for the response. I still have concerns regarding Weakness 1 (necessity of the formal GDS machinery).

The analogy is a clear articulation of the motivation for compositional over per-state policy refinement, and I don't dispute that framing as intuition. However, this doesn't resolve my original concern: my question was not whether compositional policies are a good idea in principle, but whether the formal GDS machinery, the DMDP definitions, the priority-queue algorithm, the optimality theorem and its proofs, is load-bearing for DLR specifically, or whether it primarily restates the same intuition in heavier notation.

I remain open to raising my score if the authors can show a concrete case where the formal theorem (not the informal motivation) changes a design decision, an experiment, or an interpretation of the results in DLR.

Reviewer yrxaOpenReview ↗
Rating
5/6
Confidence
4/5
Quality
4/4
Clarity
3/4
Significance
4/4
Originality
4/4
Contribution type
concept_feasibility
Ethical concerns
NO or VERY MINOR ethics concerns only
Read review
Summary

The paper proposes Dynamic Latent Routing (DLR), a single-stage post-training method in which a language model learns its own vocabulary of discrete latent codes together with a routing head that selects, per output chunk, which code to apply — and the selected codes are injected as steering vectors added to the residual stream rather than as extra tokens in the text sequence. Codebook, router, and base model are trained jointly via a "search–select–update" loop (NN candidate code sequences are sampled, the best by steered likelihood is selected, and the DLR objective is optimized on it), with a four-term loss combining a standard LM term, an information-gain term, a mutual-information skill-discovery term, and a bigram-Zipfian diversity prior that prevents codebook collapse. A substantial accompanying theory (Dynamic MDPs and a General Dijkstra Search over concatenations of sub-policies) is offered as motivation. Empirically, DLR beats supervised fine-tuning on all 24 (4 QA datasets × 6 models) settings (mean +6.6pp, larger on reasoning), the learned codes are diverse and causally load-bearing (removing/perturbing them degrades accuracy substantially), and on a controlled six-digit-arithmetic testbed individual codes align with specific algorithmic sub-steps such that single-code edits can repair predictions without weight updates.

Strengths and weaknesses

Originality (good). The specific integration is novel: residual-stream steering with a learned multi-code vocabulary plus a learned router, trained end-to-end in a single stage, distinguishes DLR from prior discrete-latent methods that inject tokens (Pause Tokens, TokenAssorted, Abstract-CoT) or use a single fixed steering vector. The reframing of discrete codes as observable, auditable units for intrinsic interpretability (codes baked in at training time rather than recovered post-hoc) is a fresh and appealing angle. The individual ingredients — VQ-style codebooks, steering vectors, DIAYN/DADS mutual-information objectives, info-gain rewards — are established, so the novelty is in their combination, not in any single component.

Quality (good). The empirical work is the paper's strongest aspect: a clean sweep over 24 settings with 95% bootstrap CIs, every objective term and hyperparameter (CC, KK, NN, τ\tau, αreg\alpha_{\text{reg}}, αpolicy\alpha_{\text{policy}}, injection layer) ablated, three causal-intervention types, and an explicit demonstration of the codebook-collapse failure mode when the diversity prior is removed. The arithmetic case study is genuinely rigorous — ground-truth subtask labels, a 95.5%→0.1% knockout, and surgical single-code repairs. The principal quality concerns are (a) no compute-matched comparison: DLR performs NN rollouts plus steered/unsteered passes per step, so matching optimizer steps (not FLOPs) leaves open whether part of the +6.6pp reflects extra compute; (b) no seed-variance reporting — CIs cover only the test set, not training randomness, so small per-cell wins are not shown robust to seed noise; and (c) the low-data, single-epoch regime is precisely where the token-injection baselines are weakest, raising a strawman concern.

Clarity (not good). The 30+ pages of DMDP/GDS theory dominate the appendices and bury the method, while the connection to DLR is only analogical ("neural relaxation"). There is a material internal inconsistency on the number of rollouts NN (the text states N=8N=8; the ablation tables and checklist treat the main choice as N=4N=4), which affects the stated compute and the emphasis on "search." The info-gain weight is "unit" in Eq. 4 but 10.0 in the arithmetic appendix, and the "marginal entropy regularizer" is actually a KL to a fixed bigram-Zipfian prior — loose naming that costs the reader.

Significance (good). A method that reliably beats SFT across model families and sizes, plus a credible route to trained-in interpretable units, is likely to be influential — if the compute-fairness and scaling questions are resolved. Significance is currently capped by the low-data-only regime and by the interpretability evidence being confined to ≤2M-parameter toy models; the structure evidence in the six real LLMs (topic purity, n-grams) is only suggestive.

Questions
  1. Compute fairness (could raise or lower my score). What is the exact per-step and total training FLOPs/wall-clock for DLR vs SFT vs each baseline? If the gains persist when SFT/LoRA is given matched compute (more epochs/data, not just matched steps), my assessment rises; if the gap closes under matched compute, it falls.
  2. Resolve NN. Is the main-table NN 4 or 8? Please reconcile §5 with the ablation tables and the checklist, and restate the compute implications.
  3. Seed robustness. Can you report multi-seed variance for at least a few settings, particularly the sub-3pp wins (e.g. CSQA on Qwen3-0.6B)? This determines whether "wins in all 24 cells" is robust or partly seed noise.
  4. Theory's role. Given Appendix K's admission that GDS does not certify DLR (the reward is internal and θ\theta-dependent), what does the theory formally buy the method beyond motivation? A precise statement of what is and isn't claimed would let me weight it appropriately.
  5. Interpretability beyond toys (could raise my score). Do the subtask-pure codes and surgical-swap repairs replicate in any of the six real LLMs, or only in the ≤2M-param transformers? Even one real-LLM replication would substantially strengthen the interpretability claim.
  6. Layer selection. How is the per-backbone injection layer l∗l^* (the one tuned hyperparameter, worth 5–10pp) chosen without leaking test information?
Limitations

Appendix K is candid about the theory–method gap and about the untested scaling/large-data regime. Two limitations should be stated more prominently: (i) the absence of a compute-matched comparison (currently the gains are only step-matched), and (ii) the absence of seed-variance reporting. The interpretability section should also explicitly flag that its mechanistic claims are established only on toy models. No societal-impact concerns.

Final justification

Most of what I asked for is settled. Going through in order.

1. Compute. This was the one that mattered most to me and I think the table closes it. Winning all 24 cells at matched FLOPs, 66.56 against 60.23, is a clean result, and I'm glad you checked that dropping the search frequency costs nothing (66.56 vs 66.50) rather than just asserting it. One request about presentation rather than substance: the configuration behind your main table costs 2.33×, and the 1.2× figure comes from a different setup. Either make search-every-four-micro-batches the headline configuration, or put both costs next to the main table, so nobody has to reach the appendix to find out what the reported numbers cost to train.

2. N. Fine, N=8. The checklist still reads 4 as far as I can tell, so that needs fixing too.

3. Seeds. Five seeds on all 24 settings is more than I asked for and it settles the general question. But something in your own table bothers me. Llama3.2-1B DLR comes out at 49.33 ± 14.30 on ScienceQA and 71.22 ± 8.80 on CSQA (±12.13 and ±8.32 in the FLOP-matched rows), against SFT at ±0.14 and ±1.07 on the same cells. A standard deviation of 14 over five runs means at least one of them went badly wrong, and that's hard to square with what you told Reviewer 4gsZ about never observing a collapse. Could you give the five individual seed results for those two cells? If one or two sit far below the others, I'd much rather see that written down as a stability caveat on the smaller backbones than averaged away. It doesn't threaten the headline result, and it's more convincing than the summary statistic.

4. The theory. Your derivation is a fair statement of what the theorem does and doesn't give you, and "motivates rather than certifies" is the right way to put it. On the sharper version Szzg is pushing — show a case where the theorem, and not just the intuition behind it, actually decides something — I think you've already written the answer without running it. You say the theorem changes the unit of optimization, so that DLR scores whole code sequences instead of choosing greedily chunk by chunk. That's testable: ablate sequence-level selection against per-chunk greedy selection. If the compositional version wins, you have the concrete thing Szzg is asking for rather than another framing argument. If it doesn't, that's worth knowing before the camera-ready.

While I'm here — "the first work to theoretically establish the optimality of compositional learning" is a big claim to be making next to the options and MAXQ literature. Either say precisely what's new relative to those results, or soften it.

5. Interpretability. The 596M replication and the CodeNet study are real work, and running the auto-interpretation blind was the right call. I read the outcome as more mixed than your framing does, though. Causal importance clearly survives the scale-up: 13 and 15 points on arithmetic, 6.4 on CodeNet. The sharp part doesn't. CodeNet purities are 28–33% at 2.0–2.7× lift, and the two genuinely clean codes in the arithmetic run are sitting on 32 and 65 firings. The surgical repair, which was the most striking thing in the original paper, didn't come back at all. You say all of this yourself, which I appreciate; I'd just like the revision to keep that framing rather than tightening it up.

6. Layer selection. No objection — sweeping on ScienceQA validation and then freezing it across the four datasets is clean and nothing leaks. Please say so in the main text, because as written it's easy to read as per-dataset tuning.

The info-gain weight and the bigram-Zipf renaming are both fine, and between those and the N fix you've removed most of what slowed me down reading this. The APIGen-MT results weren't something I asked for, and they address the short-form-QA limitation more directly than anything I suggested.

Formatting concerns

The N=4N=4 vs N=8N=8 inconsistency between the main text and the ablation tables/checklist is a substantive internal inconsistency that should be fixed (reported here for the record; not reflected in the score). The 69-page length is within policy (main body is ~9 pages; the remainder is appendix).

2 comments
Authors · RebuttalOpenReview ↗
Rebuttal

We thank the reviewer for recognizing DLR's novel integration of a learned codebook, dynamic residual-stream steering, and end-to-end routing, as well as the breadth of empirical evaluation and rigor of the arithmetic case study. We address concerns below.

R1. Compute fairness & seed robustness

We conducted FLOP-matched experiments across six models, four datasets, and five training seeds. DLR outperforms SFT in all 24 model-dataset settings. DLR achieves an average score of 66.56. This represents an absolute gain of 6.33 points over SFT’s average score of 60.23. These results show that DLR’s performance advantage remains under matched training FLOPs.

In our main experiments, DLR uses N=4N=4 and performs latent search on every micro-batch. In the FLOP-matched experiments, candidate rollouts share the same activations before the steering-vector injection layer (instead of recomputing them), and latent search is performed once every four micro-batches. On the other three micro-batches, training uses the router’s argmax code and omits the routing loss. With this training setup, one epoch of DLR requires approximately 1.2 times the FLOPs of one SFT epoch.

We therefore trained SFT for 1.2 epochs to match DLR’s total training FLOPs. We also verified that the lower search frequency preserves DLR’s overall performance. Across the 24 settings, DLR achieves an average score of 66.56 when searching every four micro-batches, compared with 66.50 under the main training setup.

The table below reports the detailed FLOP accounting and performance results. Training FLOPs are normalized to one SFT epoch, and each performance result reports the mean and standard deviation across five training seeds. We will add this FLOP accounting and the corresponding FLOP-matched results to the revised paper.

Model Method Total training FLOPs GSM8K SciQA StrategyQA CSQA
Qwen3-0.6B SFT 1.00× 46.03 ± 0.23 47.83 ± 0.63 46.98 ± 0.44 64.07 ± 0.13
Qwen3-0.6B SFT, 1.2 epochs 1.20× 46.51 ± 0.70 49.12 ± 0.45 46.54 ± 1.53 63.69 ± 0.46
Qwen3-0.6B DLR, main training setup 2.33× 49.56 ± 0.19 55.68 ± 0.71 54.34 ± 1.77 66.52 ± 0.67
Qwen3-0.6B DLR, search every 4 micro-batches 1.23× 48.85 ± 1.42 54.96 ± 0.77 56.28 ± 0.89 67.09 ± 0.89
Qwen3-1.7B SFT 1.00× 60.26 ± 0.92 56.45 ± 0.97 51.37 ± 1.46 74.51 ± 0.90
Qwen3-1.7B SFT, 1.2 epochs 1.20× 60.44 ± 0.37 56.60 ± 0.89 52.43 ± 0.89 74.51 ± 0.26
Qwen3-1.7B DLR, main training setup 2.33× 65.38 ± 1.40 63.96 ± 0.74 60.41 ± 1.68 78.42 ± 0.33
Qwen3-1.7B DLR, search every 4 micro-batches 1.22× 65.86 ± 1.32 63.49 ± 0.40 60.07 ± 1.05 78.26 ± 0.47
Qwen3-4B SFT 1.00× 75.23 ± 1.16 59.56 ± 0.73 65.78 ± 0.99 82.57 ± 0.25
Qwen3-4B SFT, 1.2 epochs 1.20× 75.19 ± 0.29 60.61 ± 0.27 66.40 ± 0.22 83.17 ± 0.13
Qwen3-4B DLR, main training setup 2.33× 82.38 ± 0.62 72.37 ± 0.45 68.56 ± 1.14 83.76 ± 0.13
Qwen3-4B DLR, search every 4 micro-batches 1.21× 82.78 ± 1.44 73.34 ± 1.00 68.80 ± 0.92 84.03 ± 0.47
Qwen3-8B SFT 1.00× 79.09 ± 1.06 62.12 ± 0.53 67.93 ± 0.91 85.36 ± 0.54
Qwen3-8B SFT, 1.2 epochs 1.20× 78.96 ± 0.09 61.73 ± 0.60 68.14 ± 1.09 85.17 ± 0.26
Qwen3-8B DLR, main training setup 2.33× 84.21 ± 0.88 80.71 ± 0.30 72.95 ± 2.26 87.26 ± 0.41
Qwen3-8B DLR, search every 4 micro-batches 1.24× 83.73 ± 0.18 80.08 ± 0.25 72.74 ± 0.89 87.07 ± 0.08
Llama3.2-1B SFT 1.00× 30.77 ± 0.85 38.19 ± 1.37 47.86 ± 0.59 65.36 ± 2.38
Llama3.2-1B SFT, 1.2 epochs 1.20× 31.78 ± 0.39 39.72 ± 0.14 48.05 ± 2.20 65.67 ± 1.07
Llama3.2-1B DLR, main training setup 2.33× 41.17 ± 0.27 49.33 ± 14.30 51.56 ± 2.95 71.22 ± 8.80
Llama3.2-1B DLR, search every 4 micro-batches 1.20× 40.92 ± 0.65 47.53 ± 12.13 49.91 ± 3.91 72.78 ± 8.32
Llama3.2-3B SFT 1.00× 41.06 ± 1.34 56.40 ± 0.43 52.59 ± 1.84 79.38 ± 0.48
Llama3.2-3B SFT, 1.2 epochs 1.20× 41.82 ± 0.59 57.61 ± 0.76 53.09 ± 1.19 78.62 ± 0.19
Llama3.2-3B DLR, main training setup 2.33× 49.13 ± 1.14 63.28 ± 0.28 62.55 ± 3.34 81.31 ± 1.53
Llama3.2-3B DLR, search every 4 micro-batches 1.20× 50.42 ± 0.92 63.18 ± 0.36 62.65 ± 2.61 82.68 ± 1.56

R2. Interpretability beyond toy

We extend our arithmetic analysis from <1M-parameter models to Qwen3-0.6B (596M), a >600× scale-up. We train DLR for one epoch on 100K examples (batch 32), using a 30-code vocabulary, one code per answer digit, and residual-stream injection at layer 14/28 with strength 0.5. Accuracy rises from 0% to 82.96% on 2,600 autoregressive evaluations. The model uses 7/30 codes.

Ground truth follows the per-digit taxonomy in Table 19: no carry (SA), carry generation (SC), sum-to-nine (SS), carry consumption (UC), carry cascade (US), and borrow analogues (MD/MB/ME/UB/UD).

(1). Codes are causally important. Randomly scrambling all codes substantially reduces accuracy in two independent runs:

Run Codes on Scrambled Absolute drop Relative drop
1 82.96% 69.88% 13.08 pp 15.8%
2 84.73% 69.58% 15.15 pp 17.9%

(2). Several codes specialize in algorithmic subtasks. We measure purity as P(subtask∣code)P(\text{subtask}\mid\text{code}) and lift as purity divided by the subtask base rate:

Code n Subtask Purity Base rate Lift
t19 32 UD 78.1% 8.4% 9.35×
t12 65 UC 63.1% 16.3% 3.86×
t14 180 UB 29.4% 10.7% 2.75×

t19 detects rare borrow propagation; t12 marks leading-column carry-out; and t14 marks borrow-critical columns. The other four active codes are more general position markers. We treat t19 as suggestive because UD is rare where it fires.

(3). Blind auto-interpretation recovers these roles. Sonnet-5 receives 14 examples per code containing only the problem and output, answer position/digit, operand digits, and column sum—without the taxonomy, labels, or statistics. It describes t19 as equal digits consuming a borrow-in, t12 as a leading addition column carrying out, and t14 as equal or adjacent subtraction digits in borrow-critical columns. Thus, independent qualitative interpretations agree with the distributional analysis for all three specialist codes.

CodeNet study

To test a non-toy domain, we train on 4,000 Python files from CodeNet Python800 and evaluate on 800 held-out files. We split by problem, preventing near-identical solutions from crossing train/test. DLR uses one code per 8-token chunk, 30 available codes, and layer-14 injection; 11 codes become active. Ground truth is the innermost Python AST construct containing each chunk (e.g., For, If, Return, Call, Assign, and FunctionDef).

(1). Codes remain causal. Scrambling them reduces accuracy from 17.50% to 11.13%: −6.37 pp, or −36.4% relative.

(2). Several codes specialize in syntax.

Code n Construct Purity Lift
t10 30 For 33.3% 6.57×
t7 58 BinOp 32.8% 2.40×
t6 291 BinOp 32.0% 2.34×
t5 591 If 29.9% 2.19×
t3 608 If 28.1% 2.06×

t5, t3, and t6 provide the strongest evidence because they track conditionals or binary expressions across hundreds of examples. t10 has the largest lift but only 30 examples, so is more suggestive. Other active codes are more general and associated with calls.

(3). Blind auto-interpretation largely agrees. Sonnet-5 sees only raw firings—the source chunk, file position, and neighboring chunks—with no AST labels, purity statistics, or candidate constructs. It identifies t10 as a for-loop header, t7/t6 as arithmetic expressions, and t3 as an else/branch tail. It misses t5, describing an indentation-based positional role instead of If. Overall, four of five specialist codes are recovered from raw firings alone.

We did not find targeted subtask repair through code swapping under these settings. Such repair may require hyper-parameter tuning that is beyond rebuttal scope. These are therefore POC studies, but show that DLR codes remain causally important and partially interpretable in a 596M-parameter model and a real-code dataset. We will include these results in the revision, and defer a broader interpretability study to future work.

[1] CodeNet: https://arxiv.org/abs/2105.12655

R3. Clarification on N

All main results use N=4N=4; N=8N=8 in Section 5 is a typo. The ablation settings are consistent with the main setting. We will correct this in the revision.

R4. Role of theory

We formalize DLR as policy optimization in a parameter-dependent DMDP and as a neural relaxation of GDS's intractable search. See R1 to Reviewer 4gsZ for details. We will clarify this in the revision.

R5. Layer selection

We select one layer per base model on ScienceQA validation and fix it across all four datasets, without using test results. See R2 to Reviewer 4gsZ for details. We will clarify this in the revision.

R6. Information-gain weight

The information-gain term uses weight 1 in all main post-training experiments. The arithmetic case study trains small transformers from scratch, where we found that a larger weight of 10 worked better. We will make the information-gain weight explicit in Eq. 4 and clearly report both settings.

R7. Bigram-Zipf regularizer

This regularizer prevents collapse by matching consecutive code pairs to a bigram-Zipfian prior. Its Zipfian marginal promotes heavy-tailed usage, while its bigram structure discourages repetition. Without it, one code receives nearly all routing mass and accuracy drops up to 7.4 points. We will rename and clarify this in the revision.

R8: We will make explicit in the main body limitations pointed out by the reviewer.

Authors · CommentOpenReview ↗

Thank you again for your review

Thank you again for the detailed review and helpful suggestions.

As the author–reviewer discussion period approaches its close, we wanted to check whether our rebuttal - particularly the five-seed FLOP-matched comparison and the two interpretability studies at more than 600× the scale of the original arithmetic model - addresses your principal concerns. We would be glad to clarify any remaining issue or query you might have.

Reviewer 4gsZOpenReview ↗
Rating
5/6
Confidence
4/5
Quality
4/4
Clarity
3/4
Significance
4/4
Originality
4/4
Contribution type
concept_feasibility
Ethical concerns
NO or VERY MINOR ethics concerns only
Read review
Summary

This paper proposes Dynamic Latent Routing (DLR) a method for fine-tuning LLMs under low-data regimes.

It is grounded in theory where the paper draw parallels between multi-step reasoning and Dyanmic MDPs (MDPs with non-stationary rewards). For DMDPs, the paper proves that a static time-invariant policy isn't optimal and that a time-varying policy composed of intermediate sub-policies using General Dijkstra Search (GDS) is optimal. GDS, similar to Dijkstra algorithm, maintains a priority queue of composed policies and searches over sequential composition of discrete policies with cumulative return as the cost function. There's also the possibility of using Bellman Iterative method by converting non-stationary rewards to stationary rewards by folding in time into the reward function and the state, however that leads to state explosion and is more expensive as there are more per-state Bellman updates.

Inspired by theoretical under-pinnings of GDS, the paper proposes DLR, a neural relaxed version of GDS. The learned neural policy sampler emulates GDS via a search, select update training process, where the priority queue is replaced by the policy sampler to "record" and "pick" the best codes. This neural policy samples steering vectors from a learned static discrete codebook and additively inserts the sampled codebook vector in the residual stream at a specific hidden layer (l∗l*). In a manner of speaking, this helps LLMs arrive at its goal (i.e., the right answer that hinges on careful multi-step reasoning) by steering LLMs through discrete specialized reasoning regimes by sampling the optimal sequence of steering vectors from the discrete codebook every KK tokens.

DLR training needs to balance three objectives: learning the neural policy sampler, learning the discrete codebook as well as learning updates to the model weights. The paper proposes a single-stage training framework to simultaneously learn all these using a carefully constructed 4-term training objective function. The objective balances unsteered likelihood (−log⁡pθ(x)-\log p_\theta(x)) with steered information gain (−log⁡pθ(x∣a)sg(pθ(x))-\log \frac{p_\theta(x\vert{}a)}{sg(p_\theta(x))}) to prevent router from learning massive, destructive vectors that blow up hidden state norms and not lose their unsteered language modeling capacity during training. The other two terms in the objective (−αpolicylog⁡pθ(a∣x)+αregDKL(pθ(a)∥pbi-zipf(a))-\alpha_{\text{policy}} \log p_\theta(a\vert{}x) + \alpha_{\text{reg}} D_{\text{KL}}(p_\theta(a) \parallel p_{\text{bi-zipf}}(a))) encourage unsupervised skill discovery, encouraging global diversity whilst reducing local uncertainty.

DLR is evaluated across 24 settings spanning 6 open-weight base models (Qwen3-0.6B to 8B, Llama3.2-1B to 3B) and 4 benchmarks (GSM8K, ScienceQA, StrategyQA, CSQA), DLR achieves a mean accuracy gain of +6.6+6.6 pp over Supervised Fine-Tuning (SFT) in low-data regimes, while prior token-injection baselines (Pause Tokens, TokenAssorted) underperform SFT. DLR, owing to its discrete codebook, is also amenable to mechanistic analyses. Mechanistic analyses and targeted code ablations show that DLR learns structured routing behaviors with distinct causal roles.

Strengths and weaknesses

Strengths

  1. Originality:

    • It avoids insertion of extra special tokens common to prior discrete-latent methods (Pause Tokens, Meta-Tokens, TokenAssorted, Abstract-CoT) and proposes insertion of steering vectors without breaking pre-trained text distribution.
    • It proposes a single-stage training pipeline via a carefully constructed training objective function unlike multi-stage training procedure in several prior works (e.g., warmup phase in Pause Tokens, Meta-Tokens or labeling in TokenAssorted).
    • It is amenable to mechanistic analyses owing to a emitting the choice of codebook vectors during token generation unlike prior approaches.
  2. Quality:

    • The empirical formulation in DLR is backed by theoretical rigor of GDS.
    • The evaluation is thorough. It compares against prior approaches and baseline (SFT) on several model variants and sizes. It also does thoughtful ablations to empirically establish the importance of each term in the objective function, and to empirically establish the preferred choice of a few hyperparameters in DLR. The evaluation also extends to mechanistic analyses on 6-digit arithmetic and ScienceQA to better explain the role of time-varying codebook vector choices.
  3. Significance:

    • DLR outperforms all prior methods and is state-of-the-art method for low-data fine-tuning.
    • It introduces new theory with GDS which proves that for MDPs with time-varying rewards, optimal goal-reaching policies can be recovered through temporal composition of sub-policies.
  4. Clarity:

    • The paper is well-written and structured.

Weaknesses

  1. There are several gaps between theory and practice. GDS is optimal with an externally defined time-varying reward rt(s,a)r_t(s,a). In DLR, however, the reward function Rθ(x,a)=log⁡pθ(x∣a)R_\theta(x,a) = \log p_\theta(x|a) is internal and parameter-dependent, meaning it shifts as model parameters θ\theta are updated. Appendix K acknowledges this, but perhaps warrants a mention in the main text along with the mention of DLR being a neural relaxation of GDS.

  2. The choice of steering layer selection is not automated. Choosing the layer where steering vectors are inserted potentially requires an empirical sweep across several layers. Doing such a sweep during training might inflate the total training FLOPs and an automated criterion or heuristic for the layer choice is not explored in the paper.

  3. The paper measures training budget in terms of optimizer steps and data epochs, however it overlooks the total training FLOPs budget. The number of rollouts hyperparameter NN inflates the training budget for DLR by approximately NN times more training FLOPS per training step compared to standard SFT. The Appendix does give a more thorough comparison with N=1N=1 that evenly matches the training FLOP budget, however the consideration of total FLOPs in the training budget deserves a mention in the main text.

  4. In Appendix J, the authors mention that evaluation uses the "DLR search-then-recurse procedure (matching training)". This is confusing and requires clarification. Does that mean that inference also does multiple rollouts (search)? If yes, this deserves more prominence and should be mentioned in the main text with the caveat that DLR also inflates inference budget.

  5. Evaluation is restricted to short-form/multiple-choice QA and arithmetic benchmarks (GSM8K, ScienceQA, StrategyQA, CSQA). The evaluation can be extended to (perhaps atleast one of) open-ended long-form generation, code synthesis, or multi-turn agentic workflows.

Questions

The questions are mostly informed from the weakness section above.

  1. The reward log⁡pθ(x∣a)\log p_\theta(x|a) is dependent on the parameters. Since θ\theta updates dynamically at every step, does that lead to issues with stability of candidate selection a∗=arg⁡max⁡log⁡pθ(x∣a(i))a^{\ast} = \arg\max \log p_\theta(x|a^{(i)}), especially early in the training? Did that require any training intervention?

  2. Can you say more about the choice of layer where codebook vectors can be inserted? Can the choice be automated via a heuristic? Do you imagine scenarios where insertion is required at multiple layers?

  3. Can you clarify the statement in Appendix J: ""DLR search-then-recurse procedure (matching training)"?

  4. Table 8 shows that performance plateaus beyond C=32C=32 for QA tasks. Can you say more about codebook size scaling? Is that sufficient for more complex or open-ended reasoning tasks?

Limitations

The authors acknowledge several limitations in the Appendix.

The under-explored aspects are already mentioned in the Weaknesses and Questions section above.

Final justification

The authors addressed most of the concerns during rebuttal.

Formatting concerns

None.

1 comment
Authors · RebuttalOpenReview ↗
Rebuttal

We thank the reviewer for recognizing the originality of DLR, its single-stage training design, its strong performance across models and benchmarks, and the breadth of its mechanistic analyses. We address your concerns below.

R1. Formal connection between GDS and DLR

We formalize DLR within a generalized Dynamic Markov Decision Process (DMDP), where the evolving parameters θ(t)\theta(t) induce time-varying rewards and transitions. DLR can then be understood as a neural relaxation that replaces GDS's explicit queue-based search with scalable policy sampling and updates. We will make this connection more explicit with a sentence in the main text of a camera ready revision.

(1) DMDP formulation of DLR

Consider a DLR training run in which the parameters θ(t)\theta(t) are determined by training step tt. DLR operates over

M(DLR)=(S′,A′,P(1),…,P(T−1),r(1),…,r(T−1),γ)\mathcal{M}(\mathrm{DLR})=\left(\mathcal{S}',\mathcal{A}',P(1),\dots,P(T-1),r(1),\dots,r(T-1),\gamma\right)

Following Section 4, x[1:l−1]x[1:l-1] and a[0:m−1]a[0:m-1] denote the natural-language tokens and codes observed so far, while x[l]x[l] and a[m]a[m] denote the next natural-language token and code. The state space S′\mathcal{S}' contains these partial sequences, while the action space A′=0,…,C−1\mathcal{A}'={0,\dots,C-1} contains the available codes.

If the next natural-language token is generated by the current model, the transition kernel is

P(t)(x[l]∣x[1:l−1],a[0:m])=p(x[l]∣x[1:l−1],a[0:m];θ(t))P(t)\left(x[l]\mid x[1:l-1],a[0:m]\right)=p\left(x[l]\mid x[1:l-1],a[0:m];\theta(t)\right)

The reward measures how well the selected codes predict the data:

r(t)(x[1:l−1],a[0:m])=E[log⁡p(x[l]∣x[1:l−1],a[0:m];θ(t))]r(t)\left(x[1:l-1],a[0:m]\right)=\mathbb{E}\left[\log p\left(x[l]\mid x[1:l-1],a[0:m];\theta(t)\right)\right]

Here, the expectation is over the data distribution conditioned on x[1:l−1]x[1:l-1]. Under teacher forcing, the data transition is fixed and only the reward changes with θ(t)\theta(t). Under model generation, both the transition and reward change. In either case, DLR evaluates a code sequence using

R(x,a;θ(t))=log⁡p(x∣a;θ(t))R\left(x,a;\theta(t)\right)=\log p\left(x\mid a;\theta(t)\right)

This reward changes throughout training as θ(t)\theta(t) is updated.

(2) DLR as a neural relaxation of GDS

Given a target sequence x=x[1:T]x=x[1:T], GDS can incrementally search over code sequences a=a[0:M−1]a=a[0:M-1]. At training step tt, a partial code sequence is evaluated by

v(t,a[0:m])=log⁡p(x[1:min⁡((m+1)K,T)]∣a[0:m];θ(t))v\left(t,a[0:m]\right)=\log p\left(x[1:\min((m+1)K,T)]\mid a[0:m];\theta(t)\right)

Exact GDS maintains a priority queue, expands the selected sequence over every possible next code, and records the best value found for each state. In the worst case, the queue, value records, and number of candidate sequences grow exponentially with MM, making exact search infeasible for language-model training.

DLR replaces these explicit search structures with a learned routing distribution:

Component Exact GDS DLR neural relaxation
State tracking Priority queue and value records Routing distribution p(a∣x;θ)p(a\mid x;\theta)
Search Expand every possible next code Sample NN candidate code sequences
Select Retain the highest-value candidate Select the candidate maximizing p(x∣a;θ)p(x\mid a;\theta)
Update Add the winning candidate to the queue and records Optimize L(DLR)\mathcal{L}(\mathrm{DLR}) using the selected candidate

The routing head therefore serves as an amortized record of useful code choices. Jointly updating the routing head, codebook, and language model allows this search process to scale across large text datasets.

This is the precise sense in which DLR is a neural relaxation of GDS: GDS motivates temporal sub-policy composition and the search-select-update structure, while DLR replaces exhaustive graph search with sampled candidates and policy updates.

(3). Limitation and scope. DLR does not inherit GDS's optimality guarantee. Our current theorem assumes exact GDS in a fixed finite DMDP with a time-homogeneous transition kernel and externally specified time-varying rewards. DLR instead uses finite sampled search while jointly changing its parameter-dependent reward; under model generation, its transition kernel also changes. The theorem therefore motivates, rather than certifies, DLR. We will make these limitation more explicit in the main text and limitations section.

Extending the optimality analysis to parameter-dependent rewards and time-varying transitions remains an important direction for future work.

R2. Steering layer selection

We select one steering layer per backbone through a one-time sweep on the ScienceQA validation set, then fix that layer across all four datasets and training runs. Tables 16–17 report the sweep results, showing that the optimal layer varies by backbone. This provides a model-specific selection procedure without dataset-specific tuning. Automating this selection is a useful direction for future work.

All reported experiments use single-layer steering. Multi-layer steering is a promising extension but falls outside the scope of this study. We will clarify both the selection procedure and this evaluation scope in the revised paper.

R3. Clarification on DLR inference on Appendix J

DLR does not perform multi-rollout search at inference time. We set N=1N=1 and select the router’s argmax code for each chunk. DLR therefore uses the same number of model forward passes as standard autoregressive decoding, with no additional rollout cost. We will clarify this inference procedure in the revised paper.

R4. Extended evaluation on multi-turn agentic workflows

To evaluate DLR beyond short-form QA, we conduct a FLOP-matched comparison with SFT on APIGen-MT [1], a multi-turn agentic dataset containing contexts of up to 14K tokens. We follow the training setup described in W1 of our response to the Area Chair and evaluate Qwen3-4B and Qwen3-8B across three seeds.

Model DLR SFT (1.0 epoch) SFT (1.2 epochs; FLOP-matched)
Qwen3-4B 46.35 ± 1.31 43.11 ± 1.35 43.11 ± 1.56
Qwen3-8B 48.70 ± 1.06 45.06 ± 1.12 44.33 ± 1.10

Under matched training FLOPs, DLR outperforms SFT by 3.24 points on Qwen3-4B and 4.37 points on Qwen3-8B. These results show that DLR's gains extend beyond short-form QA to long-context, multi-turn agent interactions. We will include this evaluation in the revised paper.

[1] A. Prabhakar et al., “APIGen-MT: Agentic Pipeline for Multi-Turn Data Generation via Simulated Agent-Human Interplay,” Advances in Neural Information Processing Systems 38 (NeurIPS 2025), Datasets and Benchmarks Track, 2025.

R5. Early training stability

DLR did not require any additional intervention to stabilize candidate selection early in training. At each training step, all NN candidate code sequences are scored using the same current model. The highest-likelihood candidate is selected before the model parameters are updated. DLR then jointly updates the router, codebook, and base language model. The next training step evaluates new candidates using the updated model.

We evaluated DLR across all 24 model-dataset settings using five training seeds, as reported in Response R1. Compute Fairness and Seed Robustness to reviewer yrxa. We did not observe training collapse in any of these runs. We will clarify the candidate-selection and update order and add the multi-seed results to the revised paper.

R6. Performance plateau beyond C=32C=32

Our results suggest that C=32C=32 already provides sufficient codebook capacity for the tasks evaluated in this work. Table 8 shows consistent improvements as CC increases from 11 to 3232, while every result at C=64C=64 remains within 0.50.5 points of C=32C=32.

We also repeated the codebook-size sweep on APIGen-MT using Qwen3-8B. The same plateau appears on this long-context, multi-turn benchmark, showing that the observation is not limited to short-form QA. We hypothesize that, beyond C=32C=32, the limiting factor becomes how effectively the model learns and uses the additional codes. We leave a more detailed analysis of this bottleneck to future work. We will add the APIGen-MT results and discuss this hypothesis in the revised paper.

From OpenReview, CC BY 4.0. Authors as signed there; shown unedited.

Missing a submission?

Loading the discussion…