Source-linked AI summary
Energy-Based Reasoners: Your Recurrent Reasoner Should Be an Energy-Based Model
William Xingxu Chen, Alexi Gladstone, Zeyu Michael Li, Heng Ji, Yilun Du
TL;DR
Existing looped reasoners lack an explicit measure of progress to guide latent-state updates and stopping. EBRs learn energy over latent reasoning states for refinement, evaluation, and adaptive stopping, with SXM supervising diverse trajectories. Across four algorithmic reasoning benchmarks, EBRs match or outperform prior looped models, including 99.9% Sudoku-Extreme accuracy with 345× less inference compute than the next-best model.
Problem
Existing looped reasoners lack an explicit objective to guide latent-state updates, making it unclear how to improve the current state and when to stop.
Source: §1 · pp. 1–2Method
EBRs learn an energy function over latent reasoning states, use gradient descent to refine them, and use state-based Explorative Modeling to supervise diverse trajectories.
Source: §1 · pp. 2–3Results
Across four algorithmic reasoning benchmarks, EBRs match or outperform prior looped models, achieving 99.9% accuracy on Sudoku-Extreme with 345× less inference compute than the next-best model.
Source: §1 · p. 3Takeaways & Limitations
EBRs combine refinement, candidate selection, and adaptive stopping in one learned objective, while SXM supports diverse valid solutions.
Source: §1 · pp. 2–3SXM tends to benefit from larger training sets, and limited Maze-Hard data may constrain SXM and the overall gains on that benchmark.
Source: §5 · p. 11
Abstract
from arXiv · showhide
Looping is a powerful inductive bias for reasoning. By repeatedly iterating a recurrent block, looped models can scale their effective depth and enable multi-step reasoning in latent space. However, existing looped models are not inherently guided by an explicit measure of progress, making it difficult to determine when to stop looping and how to improve upon the current state. To enable this, we introduce Energy-Based Reasoners (EBRs), which learn an energy function over latent reasoning states and formulate looped updates as gradient descent on this energy. The energy scores latent states, while its gradient guides refinement and provides a signal for stopping. To train EBRs effectively, we further introduce exploration-based training to discover additional modes and to better shape the energy landscape over a broader set of states. Across four algorithmic reasoning benchmarks, EBRs match or outperform prior recurrent reasoning models, achieving 99.9% accuracy on Sudoku-Extreme while using 345$\times$ less inference compute than the next-best model and maintaining comparable training compute. On all multi-solution benchmarks, EBRs achieve state-of-the-art coverage of distinct valid solutions while maintaining near-100% single-sample accuracy. These results suggest that energy-based models are a promising approach for strong reasoning performance.
1 Introduction
Looped reasoning models update latent states but lack an explicit objective that guides refinement, candidate evaluation, and stopping. EBRs use learned energy for these roles, and SXM trains across trajectories to support diverse solutions.
1 Introduction
- Looped architectures reuse the same layers to increase computational depth without increasing parameter count, but latent updates lack the explicit evaluation trace available in chain-of-thought.Chain-of-thought exposes intermediate token sequences that can help assess reasoning paths and allocate computation.Source: §1 · pp. 1–2
- The introduction frames the central challenge as learning one objective that guides latent updates, determines when to stop, and verifies which candidate is best.Existing looped reasoners use separate prediction or convergence mechanisms for evaluation and stopping, while their updates are not guided by an explicit assessment.Source: §1 · pp. 1–2
- EBRs use gradient descent on a learned energy over latent reasoning states to refine predictions, select the lowest-energy candidate, and stop when the energy-gradient norm signals convergence.This combines refinement, evaluation, and adaptive stopping without a separate verifier.Source: §1 · p. 2
- State-based Explorative Modeling (SXM) matches descent trajectories to solutions and supervises intermediate states to shape energy across a broader range of latent states.The broader training supports the discovery of diverse solutions.Source: §1 · pp. 2–3
- 99.9% accuracy on Sudoku-Extreme with 345× less inference compute than the next-best model; across four benchmarks, EBRs match or outperform prior looped reasoning models.On multi-solution benchmarks, they achieve high coverage of distinct valid solutions while maintaining near-perfect solution accuracy.Source: §1 · p. 3
2 Related Work
Related work spans deterministic recurrent models, stochastic trajectory exploration, fixed-point reasoning, and energy-based refinement. EBR combines latent-state energy descent with trajectory-based supervision, differing from methods that refine predictions directly or use task-specific energy.
Recurrent and stochastic reasoning
- HRM and TRM repeatedly refine hierarchical latents but are deterministic at inference, limiting them to one reasoning trajectory.PTRM adds noise and uses a halting head to select candidates; GRAM treats trajectories as latent variables, while Flow Reasoning Models and Looped Flows use learned denoising dynamics.Source: §2 · p. 3
Attractors and fixed-point reasoning
- HRM can converge to correct or incorrect fixed points, while FPRM uses fixed-point convergence to adapt computation; EBR instead defines updates by energy gradients and trains correct predictions toward stationary points.EBR uses a single latent state without hierarchy, and stationary points correspond to vanishing gradients.Source: §2 · p. 3
Energy-based reasoning
- EBRs minimize energy over a latent reasoning state rather than directly refining candidate predictions, and parameterize the scalar energy with a small transformer trained end-to-end.Unlike Energy Transformers, EBRs do not use an associative-memory formulation; unlike ERM, they do not rely on hard-coded task features.Source: §2 · p. 4
Explorative modeling
- State-based Explorative Modeling extends bidirectional target-prediction matching to recurrent reasoning by choosing trajectories to supervise and solutions that best match their predictions.Training on states visited along trajectories expands coverage and shapes energy to guide reasoning toward valid, diverse solutions.Source: §2 · p. 4
3 Energy-Based Reasoning Model
EBRs replace a learned recurrent transition with gradient descent on a scalar energy over latent states. Training supervises energy-descent trajectories and uses exploration to shape the energy landscape across multiple paths; at inference, energy and convergence guide selection and stopping.
3 Energy-Based Reasoning Model
- EBRs update latent states by descending a learned scalar energy, using projected Langevin dynamics with noise and a sphere projection to encourage exploration and keep trajectories bounded.The current state is decoded into a prediction.Source: §3 · p. 5
3.1 Training Through Energy Descent
- Training uses truncated backpropagation through energy-descent segments, supervising the final H states while detaching segment endpoints to bound memory.Convergence supervision aligns stationarity with prediction correctness; trajectories halt when the residual falls below δ or the segment limit is reached, while randomized step counts and step sizes discourage reliance on one descent schedule.Source: §3.1 · pp. 5–6
3.2 State-Based Explorative Modeling
- SXM maintains K parallel trajectories across segments, supervises the best-matched trajectory, and keeps unselected paths eligible for later selection, exploring up to K × S states over S segments.Forward SXM selects a trajectory for a target; reverse SXM selects a target for a trajectory, and the two directions are applied sequentially.Source: §3.2 · p. 6
3.3 Inference and Prediction Selection
- At inference, EBRs refine Gaussian-noise initial states until the tangent-gradient norm falls below a threshold or the segment budget is reached, then select the lowest-energy endpoint.The energy distinguishes solved from unsolved boards; the residual can also serve as an early-stopping criterion.Source: §3.3 · p. 7
4 Experiments
Across four algorithmic reasoning benchmarks, EBRs match or outperform prior methods, while energy descent supports adaptive stopping, candidate selection, and diverse valid solutions. The experiments assess Sudoku-Extreme and Maze-Hard for accuracy and generalization, then N-Queens and Graph Coloring for multi-solution coverage.
4.1 Reasoning Performance and Test-Time Scaling
- 99.4% Sudoku-Extreme and 87.4% Maze-Hard accuracy with one sample; with multiple samples, EBRs reach 99.9% and 88.3% with fewer samples than prior state-of-the-art methods.The 1.8M-parameter EBRs outperform every compared method with one sample; they also exceed EqR on Sudoku-Extreme with three samples (99.85% versus 99.8% using 128 samples).Source: §4.1 · p. 8
- Further descent improves Sudoku-Extreme accuracy beyond the four iterations used in training, without additional parameters, although gains diminish with more iterations.At matched iteration budgets, EBRs consistently outperform the baselines.Source: §4.1 · p. 8
4.2 Adaptive Computation and Solution Selection
- With τ = 0.2, convergence-based stopping maintains 99.9% Sudoku-Extreme accuracy using 10.8× fewer FLOPs than fixed iterations and up to 345× fewer FLOPs than EqR at comparable accuracy.Correct predictions approach stationary points, while incorrect predictions tend to retain larger gradients and continue changing; stopping uses a threshold on the projected energy-gradient norm.Source: Figure 5 · p. 8, §4.2 · p. 9
- Lowest-energy selection chooses correct Sudoku-Extreme answers more often than selecting the most-converged candidate and comes close to oracle selection.Convergence measures alone do not guarantee correctness because trajectories can settle at spurious minima.Source: §4.2 · p. 9, Figure 7 · p. 9
4.3 Multi-Solution Reasoning
- On multi-solution benchmarks, EBRs maintain near-perfect validity while finding more distinct valid solutions; 10 × 10 N-Queens coverage rises from 57.5% for GRAM to 92.0% for EBRs.For Graph Coloring, applying the intended cap gives EBR coverage of 89.0% and 85.3%; GRAM's code caps N-Queens coverage at 20 solutions per input but not Graph Coloring.Source: §4.3 · pp. 9–10
4.4 Ablations and Analysis
- Replacing gradient-based updates with a learned recurrent transition reduces single-sample Sudoku-Extreme accuracy from 98.96% to 60.05%, isolating the contribution of energy descent within EBR.The comparison changes only the recurrence mechanism; the variant retains EBR's training setup and is smaller than TRM, so it does not reproduce TRM's settings.Source: §4.4 · p. 10
- Fixing the step size reduces single-sample accuracy from 98.96% to 97.59%; removing convergence supervision drops it to 45.32%, while replacing it with a q-head partially recovers accuracy.The passage attributes better generalization to randomized step sizes exposing the model to broader descent trajectories and latent states, and says convergence supervision helps prevent overfitting without another halting mechanism.Source: §4.4 · p. 10
- On N-Queens and Graph Coloring, forward and reverse SXM each improve validity and coverage, while combining both improves accuracy and coverage on both benchmarks.On Sudoku, SXM with K = 2 improves single-sample accuracy, while larger K brings no further gain; five-sample accuracy remains comparable because energy selection already recovers correct solutions for nearly all instances.Source: §4.4 · p. 10
5 Limitations and Future Work
EBRs improve inference efficiency but add training cost and configuration complexity. Their explored-solution gains on Maze-Hard are constrained by limited training data, and their evaluation remains within structured algorithmic reasoning.
5 Limitations and Future Work
- Second-order derivatives make energy-descent updates more expensive, while SXM adds cost by rolling out K candidate trajectories per segment.On Sudoku-Extreme, EBRs are more accurate than baselines at every training budget, but more compute-efficient energy-based models remain a future direction.Source: §5 · p. 11
- EBRs add step-size, noise-scale, and descent-step hyperparameters, increasing configuration and training complexity despite broad transferability across benchmarks.The authors report these hyperparameters are broadly transferable, unlike those of prior energy-based models.Source: §5 · p. 11
- On Maze-Hard, SXM brought no gain and was trained with K = 1; the authors believe the 1,000 unaugmented training mazes limit SXM and overall gains.By contrast, Sudoku-Extreme augments its 1,000 training puzzles to roughly one million boards, providing more examples for explored trajectories to cover.Source: §5 · p. 11
- Experiments cover structured algorithmic reasoning tasks, leaving open whether energy-based recurrence scales to larger models or more general reasoning problems.The authors identify language-model reasoning and planning in world models as directions to explore.Source: §5 · p. 11
6 Conclusion
EBRs use gradient descent on a learned energy function to guide latent-state refinement, halting, and candidate selection. The energy network reuses a recurrent Transformer backbone to define a scalar energy, with task-specific choices addressing differences in valid-solution structure.
6 Conclusion
- 99.9% accuracy on Sudoku-Extreme with 345× less inference compute than the next-best model; EBRs match or outperform prior looped models across four benchmarks.With 1.8M parameters, EBRs achieve 99.4% single-sample accuracy on Sudoku-Extreme and 87.4% on Maze-Hard; 10 × 10 N-Queens coverage rises from 57.5% to 92.0%.Source: §6 · p. 11
A.1 Energy Network
- EBRs define a scalar energy using the recurrent Transformer backbone, then update latent states along −∇zEθ rather than directly predicting the next state.Each descent step requires a forward and backward pass through the backbone, and training through those steps involves second-order derivatives.Source: §A.1 · p. 15
- The shared per-token energy head adds 66,048 parameters at d = 256 or 263,168 at d = 512, about 3.7% of the model, while self-attention lets token contributions encode cross-token constraints.The energy sums per-token terms, but each token representation incorporates information from other tokens through self-attention.Source: §A.1 · p. 15
- Maze-Hard uses a softplus energy head to discourage unnecessary detours, while the identity head used on other tasks can assign negative contributions to tokens.The authors report that identity-head negative path-cell contributions can make longer Maze-Hard detours lower-energy than shorter paths; softplus constrains token energies to be nonnegative.Source: §A.1 · p. 15
A.2 Data and Settings
The experiments use HRM and GRAM task layouts, with dataset construction and splits varying by benchmark. Training uses a combination of Muon and AdamW on one NVIDIA H200 GPU.
A.2 Data and Settings
- Sudoku-Extreme has 1,000 training puzzles augmented with 1,000 validity-preserving transformations, while Maze-Hard has 1,000 unaugmented training mazes.The token layouts follow HRM for these two benchmarks.Source: §A.2 · p. 16
- N-Queens training and test splits contain 4,376/772 examples for N = 8 and 36,907/6,513 for N = 10; Graph Coloring test sets contain 255 and 192 graphs for 8 and 10 vertices.The datasets preserve GRAM's original splits; Graph Coloring instances are three-colorable graphs with valid colorings enumerated up to color permutation.Source: §A.2 · p. 16
- Hidden weight matrices use Muon, while embeddings, the readout, the energy head's last layer, and vector parameters use AdamW; experiments run on a single NVIDIA H200 GPU.The reported training time for one seed includes intermediate evaluations.Source: §A.2 · p. 16
A.3 Training Through Energy Descent
Energy-descent training randomizes descent conditions and trains on later trajectory states, using noisy solution-informed initializations on N-Queens and Graph Coloring. SXM extends this training over candidate trajectories and valid solutions, with non-reuse intended to reduce trajectory collapse.
A.3 Training Through Energy Descent
- Training samples 15–21 descent steps per segment and uses a fixed 21 at evaluation; initial segments after reset sample 7–15 steps to expose earlier descent states.The final H = 7 steps are backpropagated, while earlier steps are computed without retaining a training computation graph.Source: §A.3 · p. 17
- Step size is sampled independently per trajectory and segment from U(200, 250), while evaluation uses α = 250; removing randomization reduces Sudoku-Extreme single-sample accuracy.Gaussian noise is injected before each descent step; Sudoku-Extreme uses a schedule decaying from 0.4 to 0.05, while other tasks use constant scales, and states are projected to unit RMS after updates.Source: §A.3 · p. 17
- Training supervises the final H = 7 states with weights increasing toward later steps and computes convergence residuals over the last two updates.With probability 0.1, halting is delayed until a randomly sampled segment between 2 and S to encourage training on longer trajectories.Source: §A.3 · p. 17
- For N-Queens and Graph Coloring, training initialization mixes decodable noise with a state that decodes to the target solution, ranging from pure noise to an exact solution.Only the decodable part of the noise is mixed with the solution; this is intended to train energy descent to guide partially correct states toward valid solutions.Source: §A.3 · p. 17
A.4 State-Based Explorative Modeling
- Forward SXM rolls out K candidates, replays the candidate with the best endpoint cross-entropy, and carries all endpoints into the next segment; reverse SXM regrades trajectories against valid solutions in the batch.Because closest-solution grading can pull trajectories toward the same solution, solutions are assigned without reuse until 75% have been assigned, after which all become available again.Source: §A.4 · pp. 17–18
B Training Compute Compared to GRAM
EBRs outperform GRAM on every shared task, with training-compute costs that vary by benchmark. The comparison counts forward and backward computation, including EBR second-order gradients and SXM candidate rollouts.
B Training Compute Compared to GRAM
- Training FLOPs count each training step’s forward and backward computation, including EBR second-order gradients and SXM’s K candidate rollouts.Elementwise operations, normalization, optimizer updates, and intermediate evaluations are excluded.Source: B Training Compute Compared to GRAM · p. 18
- 15% fewer training FLOPs on Sudoku-Extreme, while N-Queens and Graph Coloring require 1.2–3.7× more total training FLOPs than GRAM.The higher costs primarily reflect SXM candidate rollouts; EBRs nevertheless outperform GRAM on every shared task, with zero conflicts on both Graph Coloring tasks.Source: B Training Compute Compared to GRAM · p. 18, Table B.1 · p. 18
- EqR’s full Sudoku-Extreme inference budget is estimated at 89 EFLOPs, so its full-test comparison is taken from the paper’s reported results.The authors estimate about 120 H200 GPU-hours for 422,786 puzzles at 128 samples and 64 iterations.Source: B Training Compute Compared to GRAM · p. 18
C Evaluation Details
Evaluation uses task-specific sample budgets and scoring rules, with lowest-energy selection for multi-sample EBR results. The section also reports how early stopping changes Sudoku-Extreme accuracy and compute, and notes that some GRAM coverage comparisons use different definitions.
C Evaluation Details
- Sudoku-Extreme uses eight samples of up to 64 segments, Maze-Hard uses five samples of 16 segments, and N-Queens and Graph Coloring use 20 samples.Pass@1 is first-sample exact accuracy; Pass@n selects the lowest-energy candidate among the first n samples. Results average three seeds, except ablations, which use one.Source: C Evaluation Details · p. 18
- Coverage counts distinct valid solutions among 20 samples and caps its denominator at 20; the solution sets are task-specific.N-Queens solutions preserve given queens, while Graph Coloring counts proper 3-colorings up to color permutation.Source: C Evaluation Details · p. 19
- GRAM’s coverage definitions differ from the paper’s: its uncapped Graph Coloring denominator limits maximum coverage, while its N-Queens definition excludes solutions beyond the first 20.For the 19 10 × 10 N-Queens inputs with more than 20 solutions, GRAM’s definition lowers coverage from 92.0±0.9% to 89.3±1.0%; reported GRAM values use its definitions.Source: C Evaluation Details · p. 19
- With early stopping, 16- and 64-iteration EBR configurations cost 0.060±0.002 and 0.076±0.008 TFLOPs per puzzle, respectively.The five-sample cost is 0.380±0.039 TFLOPs per puzzle; one EBR iteration is one segment of 21 descent steps.Source: C Evaluation Details · p. 19, Table C.1 · p. 19
- Sudoku-Extreme evaluates all 422,786 puzzles and selects EBR’s lowest-energy samples, whereas GRAM selects among its samples by majority vote.The table caption identifies accuracy by recursion iterations and per-iteration inference cost.Source: Table C.1 · p. 19
- At τ = 0.2, early stopping preserves Pass@1 and Pass@8 accuracy while using 10.8× fewer inference FLOPs than the fixed 64-iteration budget.The average iteration count falls from 7.6 to 3.5 while maintaining 99.4% single-sample accuracy; more aggressive stopping reduces accuracy.Source: C Evaluation Details · pp. 19–20, Table C.2 · p. 20
D Maze-Hard: Limitations and Shortest-Path Accuracy
On Maze-Hard, EBRs reach 94.07% single-sample shortest-path accuracy and 94.77% with lowest-energy selection among five samples. The benchmark’s exact-match score can reject equally short routes, and the authors identify limited training data as a possible constraint on gains.
D Maze-Hard: Limitations and Shortest-Path Accuracy
- Maze-Hard gains are modest; the authors suggest 1,000 training mazes may be insufficient to learn the required search behavior, but do not test larger training sets.Whether additional data improves performance remains an open question.Source: D Maze-Hard: Limitations and… · p. 20
- Exact-match scoring accepts only the benchmark’s labeled shortest path, while any-shortest-path accuracy accepts any valid route with shortest-path length.The labeled route can be reproduced using breadth-first search with direction priority D < L < R < U; an equally short alternative is counted incorrect under exact match.Source: D Maze-Hard: Limitations and… · p. 20, Figure D.1 · p. 20
- 94.07% single-sample shortest-path accuracy and 94.77% with lowest-energy selection among five samples.These results use the same checkpoints and trajectories as the main benchmark table.Source: D Maze-Hard: Limitations and… · p. 20, Table D.1 · p. 21
- EqR and FRM use the revised Maze-Unique benchmark, so their reported maze results are not directly comparable to these results.The paper retains the original benchmark and additionally reports any-shortest-path accuracy.Source: D Maze-Hard: Limitations and… · pp. 20–21
E Reverse SXM with Partial Solution Sets
Reverse SXM performs well with partial sets of valid targets, though results vary by task. On 8 × 8 N-Queens, accuracy and coverage rise with the number of targets; the authors did not tune hyperparameters separately for each target count.
E Reverse SXM with Partial Solution Sets
- Reverse SXM matches each trajectory to its closest valid solution, and partial sets retain the original solution plus up to k −1 randomly selected alternatives.Hyperparameters were not tuned separately for each k, so whether another target count could outperform the full solution set remains unclear.Source: E Reverse SXM with Partial Solution Sets · p. 21
- On 8 × 8 N-Queens, accuracy and coverage rise from 72.18% and 87.5% without reverse SXM to 100% and 97.9% with all solutions.At k = 2, the values are 90.73% and 93.5%; at k = 8, they are 98.55% and 97.7%.Source: E Reverse SXM with Partial Solution Sets · p. 21, Table E.1 · p. 22
- On 8-vertex Graph Coloring, coverage stays within about two points across k (87.7–89.8%), with comparable accuracy (98.0–100%).The results indicate that reverse SXM performs well without access to every valid solution.Source: E Reverse SXM with Partial Solution Sets · p. 21, Figure E.1 · p. 22
Related papers
This paper cites
- Self-Consistency Improves Chain of Thought Reasoning in Language Models2022
- Let's Verify Step by Step2023
- RoFormer: Enhanced Transformer with Rotary Position Embedding2021
- Tree of Thoughts: Deliberate Problem Solving with Large Language Models2023
- GLU Variants Improve Transformer2020
- Root Mean Square Layer Normalization2019