When a language model is given extra compute at inference time, the usual move is to sample many reasoning chains and let a learned verifier pick the best one. The verifier is a model that scores reasoning steps or final answers. This approach breaks down at large budgets. The more chains we sample and the harder we optimize the verifier's score, the more likely we are to select a chain that fooled the verifier rather than one that is correct. This proposal borrows a tool from offline reinforcement learning, stationary distribution correction. These methods estimate how much more or less often a better policy would visit each state than the policy that collected the data, and they cap that ratio so the answer cannot drift far from where the data is reliable. The tool lets us choose answers from a fixed pool of sampled chains in a way that trusts the verifier only where the base model's own samples support it.
The key observation is simple. A reasoning chain treated as a raw text prefix lives in a tree, because every prefix is reached by exactly one path. In a tree, the "stationary" ratio of a state is exactly the product of step-by-step likelihood ratios along its path, so distribution correction buys nothing over ordinary trajectory reweighting. The method only pays off when different chains reach the same intermediate state, for example the same remaining numbers in Game24 or the same set of derived facts in a logic puzzle. Once chains are merged into a graph over such states, the occupancy ratio pools evidence from every chain that passes through a state, and the variance stops compounding with depth. We propose to build these merged reasoning graphs per problem, solve a small convex distribution-correction problem on each graph exactly, and select the answer by the corrected weight of its terminal states.
Core Claim
Given $N$ sampled chains for one problem, we can map each prefix to a canonical intermediate state and form a directed acyclic graph. We then solve an OptiDICE-style regularized occupancy problem on that graph and select the answer whose terminal states carry the most corrected occupancy. Under the same pool of $N$ samples, this should beat majority voting, verifier-max selection, and trajectory-level soft reweighting. It should also degrade more gracefully as $N$ grows and verifier hacking sets in. The gain should vanish when states are not merged, and the experiments test that prediction directly.
The tool comes from OptiDICE. That paper optimizes an occupancy distribution $d$ that maximizes reward while staying close to the data distribution $d_\mu$, subject to flow conservation (probability mass entering a state equals mass leaving it). It shows that the inner problem has a closed form. With per-step reward $r$ (verifier step scores, or an outcome score at terminal states), regularization strength $\alpha$, and a convex function $f$ defining an $f$-divergence, the corrected weight of a state-action pair is
$$ w^*(s,a) = \max\Big(0,\ (f')^{-1}\big(\tfrac{r(s,a) + \mathbb{E}[\nu(s')] - \nu(s)}{\alpha}\big)\Big). $$
Here $\nu$ is a per-state potential found by minimizing a convex objective. The weight $w^*$ multiplies the empirical visit frequency $d_\mu(s,a)$ to give the corrected occupancy. The two ends of the range of $\alpha$ correspond to familiar methods. As $\alpha \to \infty$, $w^* \to 1$ and we recover majority voting over the base samples. As $\alpha \to 0$, we recover verifier-greedy selection. The proposal is a principled interpolation in which trust in the verifier is bounded by how well the sampled data supports a state, rather than by a hand-set threshold.
Because each graph has at most a few thousand nodes, $\nu$ is solved exactly as a tabular convex program, with no neural network and no minibatches. This sidesteps two limitations noted for OptiDICE. The first is the bias of minibatch dual estimates. The second is the need to clone the behavior policy for policy extraction: we never extract a policy, we only aggregate terminal weights.
Why Merging Is the Ingredient
Liu et al. and DualDICE show that marginal density ratios avoid the exponential variance of trajectory importance weights, the "curse of horizon." That argument relies on states recurring across trajectories. Its LLM analogue is the reconvergence that Do Not Waste Your Rollouts exploits informally through semantic deduplication of rollouts. Their method distills reusable anchors and dead ends into prompt text but performs no reweighting.
We therefore choose domains where a canonical, Markov state abstraction is exact. In Game24, the state is the multiset of remaining numbers. In PrOntoQA, it is the set of derived facts. On GSM8K and MATH500, the state is the set of established intermediate quantities or equations after symbolic normalization. That last abstraction is approximate, and we treat it as a stress test of abstraction error.
The theoretical deliverable is a short result with two parts. First, on a tree the method reduces exactly to self-normalized trajectory weighting with the matching $f$-tilt. Second, on a merged graph its variance is controlled by the number of samples per merged state rather than by depth.
Research Program
The work proceeds in three steps.
- Build the sample pools. We use the waterhorse1/LLM_Tree_Search codebase, with its LLaMA-2-7B policy and value checkpoints for GSM8K, Game24, and PrOntoQA. For each problem we generate pools of up to 1024 chains, parse them into canonical states, and record verifier scores. The verifier is the released value network used as a step scorer, plus an outcome scorer.
- Fit the correction. For each problem we solve the dual for $\nu$, compute $w^*$, and aggregate terminal weight by answer. We report the flow-conservation residual of the solution as a diagnostic. This is the quantity that Bellman Calibration shows neural ratio estimators violate even when they rank states well. The tabular solve should drive the residual to zero. In the transfer variant described below, we also apply that paper's isotonic post-processing.
- Train a transfer variant. We train a single neural $\nu$ across problems, so the method extends to MATH500, where graphs are sparse. We then test whether isotonic calibration recovers the tabular solution's accuracy.
We sweep $f$ (KL-type versus $\chi^2$-type), $\alpha$, and $N$. We also inject controlled verifier noise, using an adversarially perturbed verifier that over-scores a fixed fraction of wrong terminal states. This tests the claim that support-bounded weights resist hacking. The concern is motivated by Scaling Test-Time Compute Without Verification or RL is Suboptimal, which proves that verifier-based search beats verifier-free fine-tuning but observes that verifier error dominates at high budgets.
Baselines
Majority voting. The naive reference is majority voting over the same $N$ chains. It corresponds to $\alpha \to \infty$ and costs nothing beyond sampling. If our method cannot beat it, the verifier is adding nothing.
Verifier-max selection. This is Best-of-$N$ with the outcome or step verifier, run on the identical pool, and corresponds to $\alpha \to 0$. We also run verifier-weighted voting, which sums verifier scores per answer. Every aggregation baseline uses exactly the same samples and verifier calls, so differences reflect only the selection rule. Beating these means higher accuracy at matched $N$ and a flatter or rising curve as $N$ grows, where verifier-max is expected to peak and decline.
Trajectory-level soft Best-of-$N$. This is the ablation that isolates the key ingredient. It is the same $f$-regularized objective solved on the unmerged tree, which reduces to tilting each chain by its own reward. We tune $\alpha$ for both it and our method on a held-out split with the same grid, so neither gets a larger tuning budget. Beating it at matched $\alpha$-tuning is the core evidence that merging, not the tilt itself, carries the gain.
Value-guided tree search. The strongest existing search method is TS-LLM's MCTS from AlphaZero-Like Tree-Search can Guide Large Language Model Decoding and Training, which uses a learned value network. It reports 71.3% accuracy on Game24 with MCTS-Rollout versus 12.7% for greedy chain-of-thought. On GSM8K it reports MCTS accuracy of 51.9%, rising to 56.5% after one training iteration. No reported result was found on Lacuna for PrOntoQA accuracy. We compare at equal generated-token budgets rather than equal $N$, because tree search spends tokens differently. We also add a transposition-table variant of MCTS that merges the same canonical states and averages value estimates, giving the tree-search family the same merging advantage.
Reward-filtered sequential Best-of-$N$. On MATH500 we include RF-SeqBoN from On the Limits of Test-Time Compute. It conditions later attempts on earlier high-scoring ones and reportedly beats parallel Best-of-$N$ at 128 samples using only 32. No exact MATH500 accuracy for it was found on Lacuna, so we reproduce it under our model and verifier.
Why not just…?
Why not just do verifier-weighted majority voting? It also blends frequency and verifier score, and it is a real threat on short problems where chains rarely share intermediate states. The difference lies in where verifier evidence enters. In weighted voting, a single chain with a spuriously high terminal score adds weight regardless of the path it took. In the corrected occupancy, weight must flow through supported intermediate states, and the $f$-divergence bound caps how far any state can be up-weighted relative to its sample frequency. If weighted voting matches us under the adversarial-verifier injection, the hacking-resistance claim is wrong, and we would report that.
Why not just use soft Best-of-$N$ or another KL-regularized tilt? On a tree this is mathematically the same method, which is exactly why it is our central ablation. Our claim rests entirely on merged states pooling evidence. The prediction is falsifiable: the gap should grow with the average number of chains per merged state, which is large in Game24, smaller on GSM8K, and smallest on MATH500. It should be near zero when merging is disabled.
Why not just add transposition tables to MCTS? Merging plus Monte Carlo value averaging captures much of the pooling benefit. Our potential $\nu$ is close to a value function, so this is the most serious competitor. What it lacks is the occupancy constraint: MCTS values say how good a state is, not how far the selected answer has moved from the data's support. The equal-token comparison against the transposition variant, with and without injected verifier noise, settles whether the regularizer matters beyond merging. If it does not, the honest conclusion is that state merging alone is the useful finding.
Why not just let the model think longer? Inverse Scaling in Test-Time Compute shows that longer reasoning can lower accuracy through distraction and spurious features. We include longest-budget single-chain decoding as a reference point but expect it to be dominated.
Proposed Experiments and Decisive Checks
The main experiment plots accuracy against $N$ (from 8 to 1024) on Game24, PrOntoQA, GSM8K, and MATH500. Each panel shows every aggregation rule on shared pools, along with search methods at matched token budgets. Secondary metrics are the flow-conservation residual, the effective sample size of terminal weights, and accuracy under verifier corruption rates of 0%, 10%, and 30%.
Three outcomes would be decisive.
- Merging must matter. The merged-graph method must beat trajectory-level soft Best-of-$N$ at matched tuning on Game24 and PrOntoQA, and the gap must scale with the number of chains per merged state.
- Resistance to hacking must hold. Under verifier corruption, its accuracy must decline more slowly with $N$ than verifier-max and weighted voting.
- It must be competitive with search. At equal token budgets it must match or beat transposition-table MCTS, measured against the 71.3% Game24 reference reported for TS-LLM.
If the first check fails, the distribution-correction story does not hold for language reasoning, and the result becomes a clean negative finding about the curse-of-horizon argument in tree-structured state spaces.
References
- OptiDICE: Offline Policy Optimization via Stationary Distribution Correction Estimation
- Breaking the Curse of Horizon: Infinite-Horizon Off-Policy Estimation
- DualDICE: Behavior-Agnostic Estimation of Discounted Stationary Distribution Corrections
- Do Not Waste Your Rollouts: Recycling Search Experience for Efficient Test-Time Scaling
- Bellman Calibration for Marginalized Importance Weighting in Offline Reinforcement Learning
- Scaling Test-Time Compute Without Verification or RL is Suboptimal
- AlphaZero-Like Tree-Search can Guide Large Language Model Decoding and Training
- On the Limits of Test-Time Compute: Sequential Reward Filtering for Better Inference
- Inverse Scaling in Test-Time Compute