Paper commentary
Best-of-Depth: Learning Exploratory Dynamics in Looped Transformers
Best-of-Depth trains looped Transformers to find several valid answers along their depth
- Problem Looped Transformers are trained only on their final-depth output, so intermediate readouts get no reward for finding other valid answers. Supervising every depth against one target also forces all readouts to repeat the same answer.
- Method Best-of-Depth trains each recurrent trajectory on its lowest loss across the supervised depths. Different valid targets can be matched at different depths, so the trajectory visits several answers without architecture changes.
- Results On N-Queens completion, Best-of-Depth reaches 91.03% coverage of valid solutions at depth 64, versus 45.75% for final-depth training.

Figure 1 :Learning alternative solutions along one recurrent trajectory. Top:One input admits multiple valid solutions.Middle:Schematic latent trajectories illustrate (a) repeated predictions under Last-Depth, (b) independent candidates from Best-of-N, and (c) distinct solutions along one BoD trajectory; shaded regions decode to A–C.Bottom:Both models reuseF θ across depths. Last- Depth trains onL D; BoD trains on the lowest loss across depths (highlightedL 2 for target A).
Original paper · CC BY 4.0 · Shota Takashiro, Takeshi Kojima, Masanori Koyama, Kohei Hayashi, Yusuke Iwasawa · Best-of-Depth: Learning Exploratory Dynamics in Looped Transformers · Original paper figure · Extracted the figure area from page 2 of the original PDF.Why final-depth training leaves alternatives unrewarded
Looped Transformers add computation by applying one shared block again and again to a latent state, so extra depth costs no new parameters. Greater recurrent depth can improve reasoning performance, which makes the way successive updates are trained matter. Looped models reuse the same layers across depth, and the Universal Transformer also supports adaptive halting.
The standard recipe supervises only the prediction at the final depth, so intermediate readouts receive no reward even when one of them already holds a different valid answer. In the schematic of Figure 1, Last-Depth repeats the same answer A at several depths and never reaches B or C. The other obvious option, supervising every depth against the same target, asks every readout to produce that one answer.
What is needed is a criterion under which a target counts as found when some depth within the budget produces it. Because each later state depends on the earlier ones, these coupled predictions have to be trained together rather than one at a time.
The key idea: score each target at its best depth
BoD changes the loss from the final readout to the best readout across a set of supervised depths. For each target, BoD computes the prediction loss at every supervised depth in the set D. It keeps the minimum of those losses, min over d in D of L_d, and trains on that value alone. BoD selects one depth for the whole target, and exact ties are broken at random.
A single depth is enough to match each target, so no assigned order is needed.
Last-Depth sets the loss to L_D, so only the prediction at the maximum training depth is rewarded. Supervising every depth against the same target asks every readout to reproduce that one answer. Under BoD, a different valid target can be matched at a different depth, so the trajectory visits several answers. Later predictions depend on earlier latent states, so the shared update learns from whichever depth wins.
BoD needs no architectural change, no extra parameters, and no depth-specific labels.
For a fixed input and uniformly sampled valid targets, the expected exact-match BoD loss equals one minus coverage. Minimizing that risk pushes coverage upward, and repeated candidates add nothing to it. The idea relates to multiple choice learning, but BoD's candidates arrive one after another through shared latent dynamics. Soft-Depth replaces the minimum with a soft version, where τ approaching zero recovers BoD and τ approaching infinity recovers Mean-Depth.
How a BoD training run is computed
A looped Transformer encodes the input x into a first latent state, then applies a shared transformation at each depth. The shared decoder Dec reads a prediction distribution p_d from each state h_d, so every depth yields one readout. For a valid target y, the per-example loss at depth d is L_d(x, y) = l(p_d, y), and the greedy prediction at that depth is y-hat_d.
Last-Depth keeps only the final term, so the loss equals L_D and earlier depths receive no supervision.
BoD instead takes the minimum of L_d over the supervised depths D, which includes the training depth D. Because the minimum is taken per target, different valid targets for the same input can select different depths. For autoregressive targets, L_d is the teacher-forced average negative log-probability of the target tokens at depth d, given the input and earlier target tokens.
Mean-Depth supervises all depths in D by averaging their losses, while Random-Depth draws one depth uniformly for each example. Soft-Depth replaces the minimum with a temperature-weighted soft minimum, so lower-loss depths receive greater gradient weight. The temperature limits recover BoD as tau approaches 0 and Mean-Depth as tau approaches infinity, and the experiments use tau = 0.25.
Controlled-task runs train with uniformly resampled valid targets at D_train = 16 and evaluate greedy readouts through D_test = 64. Each run reports means and sample standard deviations over three training seeds for the controlled tasks.
What the objective implies for coverage
With exact-match loss, the BoD objective reduces to a simple check over the supervised depths. It equals 0 when some supervised depth outputs the target, and 1 when none of them does. Proposition 1 turns this into a first-hit quantity: the expected loss is the probability that the first matching depth lies beyond the budget D. In other words, BoD checks whether the target is found anywhere within the depth budget.
The expected loss then equals one minus the fraction of valid solutions that the candidate set contains. That fraction is Coverage@Depth, so minimizing the risk pushes coverage up. Repeated candidates don't add to the fraction, so the objective rewards new valid solutions rather than copies.
Proposition 3 makes the contrast concrete for cross-entropy training on a constructed multi-solution task. The task uses a shared recurrent model, a common symmetric initialization, and a prescribed cyclic recurrence. As the number of updates n grows, greedy coverage tends to 0 for Last-Depth, Mean-Depth, Random-Depth and Soft-Depth, but to 1 for BoD.
The other objectives keep or recover a symmetric predictor whose greedy outputs are invalid. BoD breaks that symmetry by selecting one depth, so different targets can reinforce the same latent solution at different phases.
The separation holds for one constructed task, so it isn't a guarantee for every looped model. The Soft-Depth result holds for every fixed τ above zero, and BoD selects one loss-minimizing depth when losses tie. The proofs sit in Appendices D.1 and D.3, and the cross-entropy coverage bounds in D.2 and D.4.
N-Queens and graph coloring: success and coverage
Both controlled tasks enumerate every valid solution, so Coverage@Depth can be computed exactly. Coverage measures the fraction of valid solutions recovered, while Success@Depth only checks whether any valid solution was found. BoD trains with uniformly resampled valid targets at D_train = 16 and reads out greedy predictions through D_test = 64.
On N-Queens, each input fixes five queens on a 10×10 board, and the model completes the rest. The training set has 24,320 problems, and the evaluation uses 1,000 multi-solution test problems. BoD reaches 91.03% coverage and 99.03% success at depth 64, outperforming all four other objectives. Final-depth training reaches only 45.75% coverage on the same task.
BoD's largest gains appear near the training depth of 16, with further discoveries up to depth 64.
Graph coloring trains on 4,096 connected 10-vertex graphs and tests on 512, with three colors per vertex. Soft-Depth reaches high success but only 44.39% coverage, so success alone hides the gap in alternatives. Soft-Depth's coverage stays below BoD's even after development-set temperature selection. Coverage keeps rising after success saturates at the training depth, so extra depth mainly recovers alternatives for already-solved graphs.
Across both tasks, the paper attributes BoD's gain to alternatives found beyond the first answer. The coverage metric is the one that exposes this difference, since success saturates early on both tasks.
Discovery beyond supplied targets and depth
The pools are nested, so each larger pool contains the smaller ones. Unseen Coverage counts the withheld valid solutions a trajectory recovers, averaged per graph. These graphs are familiar training inputs, so the test measures recovery of withheld solutions rather than generalization to new graphs.
Next, BoD trained at depths 4, 8 and 16 is evaluated with greedy readouts up to depth 64. Every training depth shows further discoveries beyond the depth it was trained on, with diminishing gains. Models trained deeper reach higher coverage by depth 64. Those deeper-trained models can lag at shallower depths, so training depth shapes where alternatives appear.
The paper also compares BoD with HRM and an instance-level adaptation of Ouro's objective. HRM reaches similar N-Queens success to BoD but substantially lower coverage, which separates finding one solution from finding many. Ouro's adapted objective yields lower coverage on the same looped backbone. Architectures and candidate counts vary across these baselines, so this comparison is less controlled than the ablations.
Code generation with pooled depths
The code-generation experiment asks whether BoD fine-tuning yields more solved programs when outputs from several fixed depths are pooled. The authors fine-tuned Huginn, a pretrained 3B-parameter looped language model, on 20,000 Python examples from CodeFeedback, with 1,000 validation examples. They trained models under all five objectives at depth 32, and they also evaluated the pretrained model.
On all 164 HumanEval and 500 MBPP problems, each model wrote one complete program separately at each of six fixed depths, 4, 8, 12, 16, 24 and 32, using greedy decoding.
BoD reached 37.8% Success@32 on HumanEval, compared to 34.8% for Last-Depth. On MBPP, BoD reached 44.2% Success@32, versus 39.2% for Last-Depth. BoD also had the highest depth-32 accuracy, although Mean-Depth, Random-Depth and Soft-Depth performed better at shallow depths. Pooling is a different procedure from scoring one program, so these pooled figures aren't single-program accuracy.
The authors read this as evidence that BoD's depth-specific programs contain useful shallow-depth candidates. Pooling BoD's programs solved problems that depth 32 alone missed, which extends the coverage benefit to autoregressive generation. The conclusion draws the same pattern, with higher cumulative success from pooling programs at different fixed depths.
The evidence rests on one pretrained model and two benchmarks, so it doesn't establish generality beyond that setting.
Depth versus trajectories under a fixed budget
Under a fixed budget of 64 recurrent-block applications, the authors split compute between depth D and trajectory count N, with N times D equal to 64. They compared seven allocations, with D set to 1, 2, 4, 8, 16, 32 and 64, and N set to 64 divided by D. Each allocation pools and deduplicates all intermediate predictions from its N trajectories before coverage is computed.
Initial states receive Gaussian noise on N-Queens, and vertices are permuted on graph coloring. The permutation also applies at N = 1, so a single trajectory still gets a randomized starting view.

Figure 3 :Depth allocation and extrapolation.(a, b) Coverage pooling intermediate predictions from randomized trajectories underN D= 64. (c, d) BoD with unperturbed greedy readouts; open markers denote training depth. Bands indicate±1SD.
Original paper · CC BY 4.0BoD's mean coverage is highest at (N, D) = (4, 16) on both tasks. Last-Depth peaks at (2, 32) on N-Queens and at (4, 16) on graph coloring. So for both objectives, the best allocation used several trajectories rather than one long trajectory. The authors read these results as favoring the combination of depth with multiple trajectories.
The depth question is separate from the trajectory question, and the authors study it with BoD trained at several depths. Models trained deeper reach higher coverage by depth 64, but they can lag at shallower depths. Success curves and numerical results appear in Appendix C.
What the trajectory does on graph coloring
The graph-coloring analysis asks which recurrent dynamics come with BoD's broader discovery along one trajectory. Discovery declines at greater depths, so the new-solution counts concentrate near and just beyond the training depth. Last-Depth makes few discoveries in that region, whereas BoD finds new valid solutions there.

Figure 4 :Exploratory recurrent dynamics on graph coloring.(a) Example outputs; NEW marks first appearances. (b) Fraction of graphs with a new valid solution. (c) Separate PCA projections for the same example and seed as (a); markers identify solutions or invalid outputs. (d) Relative state displacement. (e) Loss-minimizing depths. Bands (b, d) and error bars (e) indicate±1SD. Dotted lines mark training depth 16.
Original paper · CC BY 4.0BoD reaches all six solutions in the same example. The count includes first solutions as well as later alternatives.
Relative state displacement stays higher for BoD near and beyond the training depth, while Last-Depth's displacement falls. Displacement is measured before projection, relative to the norm of the preceding state. Panels (a, b) measure discovery, and panels (c, d) characterize the accompanying dynamics. The authors read this as an association between broader discovery and sustained latent movement, not as a proven cause.
Loss-minimizing depths span all 16 supervised depths, so different input-target pairs get their best predictions at different depths.
Limitations of the Best-of-Depth evidence
Generality therefore needs experiments beyond N-Queens, graph coloring, and Huginn fine-tuning. The authors state that discovery saturates with depth, which limits how far extra depth keeps adding alternatives.
The fixed-budget comparison of width and depth covers only the two controlled tasks, N-Queens and graph coloring. Trajectory counts and depths were compared under a total of 64 recurrent-block applications, with D from 1 to 64. Models trained deeper reach higher coverage by depth 64, but they can lag at shallower depths.
For autoregressive generation, the authors name cross-depth sampling, branching, restarts, verification and adaptive stopping as possible extensions. They didn't evaluate these extensions in the paper. The code-generation results pool programs from fixed depths, so the authors' evidence there is limited to that pooling setup.
Paper info
- Authors
- Shota Takashiro, Takeshi Kojima, Masanori Koyama, Kohei Hayashi, Yusuke Iwasawa
- Venue
- arXiv · Preprint
- First published
- 2026-11-3
- Added
- 2026-11-5
- Updated
- 2026-11-3
- Version
- v1
- arXiv
- 2611.04663
- Category
- cs.LG · cs.AI
- Original paper terms
- CC BY 4.0
- What we show
- Paper info, commentary and permitted figures from the original paper
AI commentary is a separate explanation from the original paper and may contain errors. The original paper and figures follow each source's terms of use and any rights noted separately.
Abstract
Looped Transformers extend inference-time computation through repeated latent-state updates, but final-depth training does not directly encourage useful intermediate alternatives. We introduce Best-of-Depth (BoD), which trains a recurrent trajectory as a candidate set by minimizing prediction loss across depths. Different valid targets can be matched at different depths without architectural changes or depth-specific labels. An exact-match analysis connects this objective to solution coverage. On N-Queens completion and graph coloring, BoD improves coverage over final-depth and intermediate-supervision objectives. N-Queens coverage reaches 91.03%, versus 45.75% for final-depth training. Further experiments show discovery beyond the training depth and recovery of solutions withheld from teacher pools on familiar inputs. Fine-tuning a pretrained looped language model with BoD yields higher pooled code-generation success than final-depth training when programs are generated separately at evaluated fixed depths. These results support training recurrent computation for solution discovery along its trajectory.
Quote from the paper
Shota Takashiro, Takeshi Kojima, Masanori Koyama, Kohei Hayashi, Yusuke Iwasawa (2026). Best-of-Depth: Learning Exploratory Dynamics in Looped Transformers. arXiv:2611.04663v1. https://arxiv.org/abs/2611.04663v1
BibTeX
@misc{takashiro2026best,
title = {{Best-of-Depth: Learning Exploratory Dynamics in Looped Transformers}},
author = {Shota Takashiro and Takeshi Kojima and Masanori Koyama and Kohei Hayashi and Yusuke Iwasawa},
year = {2026},
eprint = {2611.04663},
archivePrefix = {arXiv},
url = {https://arxiv.org/abs/2611.04663v1}
}