When used for reasoning tasks, a language model defines a distribution over response sequences that implicitly use certain high-level strategies to solve an input problem . A model asked to prove a theorem may produce a proof by contradiction, induction, or construction; a model asked to solve a programming problem may formulate it as dynamic programming, graph search, or a greedy algorithm. Such strategies recur across many input problems, but they are represented only implicitly: they are entangled in the model’s hidden states rather than exposed as a separable variable that can be identified or intervened on during generation.
This work studies the problem of recovering a disentangled representation of these implicit strategies from a pretrained language model. We seek a router–generator factorization of the base model, where a router assigns a latent strategy to each input and a strategy-conditioned generator produces the response conditioned on that strategy. The goal is to find a factorization that preserves the observable response distribution, so that , while making informative and strategy-aligned: varying should change which strategy the generator uses, and the same latent value should carry the same strategy meaning across related inputs.
Latent strategy structure in output space. Toggle between three states: the pretrained LM’s implicit mixture over strategies ; a latent that is informative but misaligned with strategies; and a strategy-aligned that disentangles the strategies in latent space while preserving the base distribution.
The problem: factorizing, not relearning
This problem is distinct from standard latent-variable generative modeling. In VAE-style methods, the latent-variable model is trained from data, and the target distribution is not already represented at initialization. Here, is not a target to be relearned from data; it is the already-represented response law whose latent strategy structure we aim to expose.
The objective cannot be merely to fit the latent marginal to the base model distribution. For expressive router–generator classes, many factorizations can induce nearly the same distribution over after integrating out . One extreme ignores , with reproducing the base model distribution for all . More generally, a marginal-preserving factorization may use for input-specific partitions, surface form, or other predictive details rather than reusable strategy structure. The problem is therefore not ordinary latent-variable modeling of , but selection among marginal-preserving factorizations for one whose latent variable is informative and strategy-aligned.
This imposes two distinct requirements. Within-input strategy separation asks whether varying changes the strategy used for a fixed input . The stronger requirement is cross-input semantic consistency: a latent value or region should retain its strategy meaning across related inputs. Only with this stability does behave like a reusable strategy variable, rather than an input-specific response index.
The core obstacle: posterior collapse at initialization
Because the pretrained generator already captures without any latent variable, this setting creates a pathological form of posterior collapse. A factorization that ignores — by reproducing the base model’s response law for every — is available at initialization and is a stable optimum for any objective that only fits the observable response distribution.
The standard negative conditional ELBO satisfies the identity
Thus the standard variational objective asks the induced marginal to match the observed response law, and asks to match the posterior of whichever factorization produced that marginal. It does not ask whether explains variation in beyond , nor whether the resulting latent is strategy-aligned. If the generator class can represent the base model while ignoring , then setting for all and preserves the base marginal and attains the objective’s optimum, leaving the latent inert even though . With expressive generators built from pretrained language models, this -ignoring factorization is not only available, but also close to initialization, making it a likely attractor for optimization.
ELBO training can preserve fidelity while leaving the latent unused. Distributional fidelity rises, posterior–router KL collapses relative to initialization, and strategy alignment remains low.
Open interactive figureThe method: model-directed reconstruction pressure
The ELBO failure shows that marginal fidelity is not enough: a factorized model can preserve while leaving unused. We address this selection problem with a model-directed reconstruction term that replaces marginal-fit pressure with reconstruction pressure directed by the base model itself.
We implement the factorization by adapting a pretrained Transformer into three roles. The router reads the input and produces a distribution over latent strategy values; the strategy-conditioned generator generates the response autoregressively while attending to an embedding of the latent strategy, inserted as a pseudo-token; and a training-time posterior reads the full input–response pair to provide variational training signal. The router and generator are a single autoregressive model with shared parameters , adapted from the base parameters via LoRA-style low-rank updates so the generator inherits the base response law rather than relearning it.
Autoregressive router–generator Transformer architecture. The adapted Transformer implements both the router , which reads the prompt and produces a latent distribution, and the strategy-conditioned generator , which attends to while generating the response. During variational training, infers from the full input–response pair. (Toggle Inference ↔ Training and press Play.)
Open interactive figureThe core idea is to use the base model to adaptively rescale the reconstruction loss and direct reconstruction pressure toward tokens where the base model is uncertain. We instantiate this with token-level base model surprisal , which measures how much uncertainty remains about after conditioning on and , giving a local estimate of where can explain variation beyond the -free prefix model. This token-level view matters because autoregressive responses quickly become partially self-predictable: after an early commitment, many later tokens may be determined by and , even if the commitment itself reflects a strategy choice. The reconstruction term therefore substitutes uniform token pressure with -surprisal-directed pressure, assigning more weight to branch points where the base model leaves multiple continuations plausible.
Token-level surprisal weighting. Left: a response path with branch points, where several next tokens remain plausible, and determined positions, where the next token is mostly fixed by and earlier response tokens. Right: -free base model surprisal above each token and the corresponding token weight below it; higher-surprisal positions receive more reconstruction pressure.
The proposed objective combines a normalized, surprisal-weighted reconstruction term with the router KL:
The global scale expresses reconstruction in base model reference units, keeping it comparable to the KL term even when the base model already has low -free loss. The interpolation mixes uniform pressure with surprisal-directed weights (a normalized power of token surprisal, concentration controlled by ). The term is calibrated so that when the generator matches the base model, and can be read as the fraction of base model response loss that remains after conditioning on .
Together, this objective pressures to explain residual variation that is not already determined by , rather than reconstructing what the base model already captures.
Benchmark and empirical results
We evaluate on a controlled multi-strategy algorithmic benchmark designed to make strategy alignment measurable. The benchmark covers six task families — list summation, sorting algorithms, grid pathfinding, linear equation solving, base conversion, and multidigit addition — where solution traces instantiate task-specific procedures for reaching the same valid answer. Traces are parseable and can be assigned reference strategy attributions; these labels are withheld during training and used only for evaluation. We report two axes: Distributional Fidelity (does the factorized model still produce valid solution traces?) and Strategy Alignment (does the learned latent achieve cross-input semantic consistency?).
Strategy information is already present in the base model. For each task and token position, a lightweight linear probe on the base model’s hidden states can predict the reference strategy annotation. Strategy information is broadly decodable across the benchmark, especially at positions where strategy-specific computation is expressed. This establishes the premise for factorization: the target structure is present in the base model, but is not exposed as a reusable latent variable that can be sampled, transferred, or compared across inputs.
Strategy labels are decodable from base model hidden states. Rows are benchmark tasks, columns are normalized token positions, and color gives linear-probe accuracy for predicting the ground-truth strategy from hidden states of the entangled base model.
The proposed objective recovers strategy-aligned latents; ELBO does not. Across pretrained Qwen2.5 runs, ELBO-style baselines preserve Distributional Fidelity but leave the latent inert or strategy-unaligned, while the model-directed reconstruction objective and its variants recover strategy-aligned latents and preserve the base model response distribution. An ablation that weights reconstruction by inverse surprisal — emphasizing low-surprisal tokens — weakens Strategy Alignment, supporting the view that the gains come from pressuring to explain strategy-relevant residual surprisal.
Method comparison on pretrained Qwen2.5 runs. For each objective variant and model size, bars show Distributional Fidelity and Strategy Alignment, with open points giving per-task values. Strategy Alignment denotes cross-input latent strategy alignment measured by Analogical Consistency. Hatching marks baselines and ablations.
The latent dynamics provide complementary geometric evidence: posterior latents that begin as an overlapping cloud separate into task- and strategy-structured regions over training. In the multi-task setting this organization is task-conditioned rather than a single global strategy codebook — the same latent regions can carry different strategy meanings for different task families, a multiplexing that is visible in linear diagnostics.
Posterior latent geometry over training. Each panel is a PCA projection of posterior mean latents at the indicated fraction of training. Points are colored by task and strategy; the initially overlapping cloud separates into task- and strategy-specific regions over training.
Cross-input semantic consistency. A latent variable can separate strategies locally for each input while failing to give a stable strategy meaning across inputs. We therefore evaluate the stronger notion of Strategy Alignment via Analogical Consistency: sample a source input , draw , reuse the same on a related target input , and check whether the responses and use the same inferred strategy, . High Strategy Alignment means carries the same strategy meaning across inputs — so the latent transfers the same strategy from one problem to another.
What drives the alignment gains. Examining training trajectories in fidelity–alignment phase space, an underspecified objective can move toward high Distributional Fidelity without moving toward high Strategy Alignment. Across all methods, the token-weighted reconstruction loss tracks Strategy Alignment: alignment improves precisely when is pressured to explain response regions where the frozen base model still has strategy-relevant residual surprisal.
Training trajectories in fidelity–alignment phase space for different objective variants.
Token-weighted reconstruction loss versus Strategy Alignment at training endpoints; outlined points show method centroids and translucent points show individual runs.
A theory of strategy-structure recovery
To understand when the variational approach can identify a latent variable that aligns with a target strategy structure implicit in the pretrained model, we study a population complexity-penalized variational objective , where is a theoretical proxy for the architecture, parameterization, and optimization biases that favor simple router–generator factorizations. Profiling over and shows that minimizing is equivalent to maximizing
The first term is the information pressure that encourages to capture information about beyond what is already predictable from ; the second is an effective approximation–complexity penalty measuring whether the induced distribution is close to the target while remaining simple.
Let be the target strategy with , and let be a recovery discrepancy. Define the profiled margin
If , then every population minimizer of satisfies . For finite classes with sub-Gaussian losses, samples suffice for empirical recovery with probability at least .
The analysis is preliminary, and the connection between this oracle selection criterion and actual training dynamics is not yet formally characterized.
Takeaways
A pretrained model’s response distribution is an entangled mixture over high-level strategies, and exposing this structure requires more than fitting a latent-variable model to observable outputs. Because the base generator already realizes the target distribution, a factorization that ignores the latent variable is immediately available and is a stable optimum of any objective that only measures marginal fit — and standard variational training falls into this failure mode. The model-directed reconstruction objective uses the base model itself as a reference: reconstruction is normalized by the base model’s response loss and weighted by token-level uncertainty, concentrating pressure where strategy choices are most consequential. On a controlled benchmark of multi-strategy algorithmic tasks, this recovers latent structure that is well-aligned with reference solution strategies and semantically consistent across inputs.
The broader promise is to expose latent capabilities that large language models already possess but do not reliably express under default sampling. By recovering a strategy-aligned factorization, implicit strategy structure becomes an explicit object of analysis and intervention — with applications across interpretability, controllability, and exploration, and the potential to drive more active self-improvement loops via strategy-level interventions rather than passive token-level sampling. The benchmarks here cover synthetic algorithmic tasks with ground-truth strategies; how well the methodology extends to open-ended reasoning remains an open question.