Energy-Based Reasoners Cut Inference Cost
Key Takeaways:
- Chen et al. report 99.9% exact accuracy on Sudoku-Extreme with a 1.8M model and 5 samples, and up to 345x fewer inference FLOPs than EqR at comparable accuracy.
- The energy scores the latent state, its gradient steps the state, the gradient norm stops the loop, and the energy value picks the sample.
- Exploration-based training rolls out several trajectories and supervises the best match, which is how they chase coverage on multi-solution tasks.
- The 345x figure is inference FLOPs on these puzzle tasks, with comparable training compute claimed in the abstract. It is not a frontier-LLM comparison.
- Maze-Hard is close to a larger fixed-point baseline, SXM did not help there, and there is no independent replication yet.
What the paper reports
The evaluation covers four algorithmic reasoning benchmarks: Sudoku-Extreme, Maze-Hard, N-Queens, and Graph Coloring. On Sudoku-Extreme the authors report 99.4% +/- 0.1 exact accuracy from a single sample, and 99.9% +/- 0.1 when five samples are drawn and the lowest-energy endpoint is kept. The network for that pair of tasks has 1.8M parameters. Maze-Hard single-sample accuracy is 87.4% +/- 1.1, and five samples reach 88.3% +/- 0.3. Means and standard deviations are over three training seeds.

Sudoku-Extreme, in section 4.1 and appendix A.2, is a 9×9 set with unique solutions. The training split is 1,000 puzzles, each augmented with 1,000 validity-preserving transformations, which the authors call roughly one million training boards. The test split has 422,786 puzzles. Exact accuracy means all 81 cells match. The official builder uses the same counts, --subsample-size 1000 --num-aug 1000. Maze-Hard is 30×30 shortest-path search, with 1,000 training mazes and 1,000 test mazes, and those mazes are not augmented.
Single-sample numbers from Table 1, with baselines copied from the cited papers, look like this. The 1.8M model is ahead on Sudoku-Extreme in that table. That gap is inside the standard deviation Chen et al. report for their own Maze run, so a larger fixed-point loop is competitive when the training set is 1,000 unaugmented mazes.
| Method | Parameters | Sudoku-Extreme single-sample exact accuracy | Maze-Hard single-sample accuracy | Source of the row |
|---|---|---|---|---|
| TRM | 5-7M | 87.4% | 85.3% | Copied into Chen et al. Table 1 from the TRM paper |
| FPRM | 7M | 94.2% | 87.0% | Copied into Chen et al. Table 1 from the FPRM paper |
| Looped Flows | 5-7M | 97.9% +/- 0.4 | 86.7% +/- 1.1 | Copied into Chen et al. Table 1 from the Looped Flows paper |
| EBR | 1.8M | 99.4% +/- 0.1 | 87.4% +/- 1.1 | Chen et al. measurement, three training seeds |
How the energy replaces a fixed loop budget
Looped models apply one block over and over, so effective depth grows without new weights. HRM and TRM learn the next latent directly and halt with a separate head. A fixed iteration budget has the same hole the abstract names: nothing in the update says whether the current state is better than the last one. In those designs, evaluation only stops or selects; it never steers the step.

Chen et al. have the block emit a scalar energy, E(z, x), and move z by gradient descent on that energy. Equation 2 is the plain step: the next state is the current state minus a step size times the energy gradient. Lower energy is trained to mean a better decoded board. The same scalar then does two further jobs. Among independent trajectories, the inference procedure returns the lowest-energy endpoint, so a separate verifier is not required. Stopping uses the tangent gradient norm, not the energy value. Algorithm 2 halts when that norm falls below a threshold tau, or after a cap of S segments of n steps.
The practical update is a projected Langevin step rather than the plain equation. Draw z from a standard normal. RMS-normalize it, add Gaussian noise, step along the negative gradient, and project back onto a sphere so trajectories stay bounded. A linear readout decodes each token’s latent into a cell. Figure 6 groups Sudoku trajectories by whether the final board is correct. Correct runs end at lower energy, with small gradients and small stepwise residuals. Incorrect runs keep larger gradients and keep moving. A small gradient can still sit on a wrong board. The authors add a convergence loss so that stationarity lines up with a correct prediction, after earlier HRM analysis found incorrect fixed points.
The backbone is two transformer blocks with four-head self-attention, a SwiGLU MLP, residual connections, and RMSNorm, plus two-dimensional rotary positions. Sudoku and Maze use hidden size 256 and 1.8M parameters. N-Queens and graph coloring use hidden size 512 and 7.1M. The energy head adds d squared plus 2d parameters: 66,048 at dimension 256, about 3.7% of the model. Each descent step needs a forward and a backward pass through the block. Training through those steps needs second derivatives. Parameter count alone therefore cannot account for the inference-FLOP gap.
Exploration-based training
The abstract introduces exploration-based training “to discover additional modes and to better shape the energy landscape over a broader set of states.” The implementation is state-based explorative modeling (SXM). One trajectory only supervises a thin slice of the latent space. On tasks with several valid boards, forcing every trajectory toward the same target also discourages other correct answers.
SXM keeps K parallel descent trajectories per input. At each segment, all K are advanced, and only the best-matched trajectory is supervised. Unselected trajectories keep moving and can be chosen later. Over S segments the procedure explores up to K times S states while supervising one trajectory per segment. Forward SXM picks the trajectory with the lowest prediction loss for a given target. Reverse SXM then picks the closest valid solution for that trajectory. The paper says the set of targets does not have to include every valid solution, and studies incomplete solution sets in appendix E.
Maze also changes the head. With a linear per-cell energy, the authors report that path cells picked up negative contributions, so a longer detour could score below a short path. Softplus keeps those terms nonnegative, and they use it only on Maze-Hard. The other three tasks keep a linear head, where valid solutions have a fixed number of assigned positions.
What the 345x figure covers
The 345x claim is inference compute only. The abstract pairs it with “comparable training compute.” Section 4.2 is more specific: with tau set to 0.2, the model holds 99.9% exact accuracy on Sudoku-Extreme and uses 10.8x fewer inference FLOPs than the same model on a fixed iteration budget. At comparable accuracy, the authors say it needs up to 345x fewer FLOPs than Equilibrium Reasoners (EqR). The project page states 10.9x fewer FLOPs than a fixed-depth run for that same 99.9%. The paper’s figure is 10.8x. The page’s figure is 10.9x. The two pages do not explain the 0.1 gap.
Figure 5b draws that FLOP curve with 8 samples for this method, 128 for EqR, 20 and 50 for GRAM, and 1 for TRM. Figure 4b reports 99.85% with three samples, which the authors set against EqR’s 128-sample checkpoint evaluation. Much of the 345x comes from that sample-count difference. Each step is more expensive than a plain recurrent update, because the block is differentiated. Early stopping then drops easy puzzles before the segment cap. Fewer samples and shorter trajectories together produce the 345x, measured against EqR on this benchmark, not against a matched one-sample protocol and not against a frontier language model.
Figure 5a plots single-sample accuracy at 16 iterations against training compute. The authors say their runs sit above the baselines they plot at every training budget on that figure. The main text does not print one absolute training-FLOP total, so there is no single training-dollar figure to take from the paper. The comparison set is other small recurrent reasoners on these four tasks. A token bill for a large language model is a different meter. I predicted, in the note on LLM token pricing and inference cost, that Anthropic’s Opus-tier input price will fall below $4.00 per million tokens again by 30 June 2027, and that NYMEX will approve Nvidia GPU rental futures for listing on or before that date. Both calls are still pending. Nothing in this puzzle result bears on either one.
Sudoku-Extreme and where the claim stops
Sudoku-Extreme tests whether a small loop can fill every cell of a hard 9×9 board it did not memorize. The training pool starts at 1,000 puzzles and grows by validity-preserving transforms. The test pool is 422,786 boards. A miss on one cell fails the example. That is a narrow constraint-satisfaction claim. It does not say the same loop will plan, write proofs, or follow language instructions. Section 5 says the experiments stop at structured algorithmic tasks, and that language modeling and planning are open.
Two limits sit inside the puzzle results themselves. First, Maze-Hard does not show the Sudoku gap. FPRM, with 7M parameters and a fixed-point stop, is listed within a point of the 1.8M model, and the authors’ own standard deviation covers that difference. Second, SXM’s coverage story depends on having enough distinct training boards. On the unaugmented maze set, the authors turn K down to 1.
Training cost is the other bound. Differentiating through the energy gradient needs second-order derivatives, and SXM multiplies the rollout by K. The authors say they wrote custom GPU kernels, shipped in the repo, to make that practical. The README puts one Sudoku seed at 60,000 steps on one NVIDIA H200 and 3 to 4 hours. Maze-Hard is 50,000 steps and 2 to 3 hours. Those are maintainer wall times, not an outside benchmark. Sudoku training and the fast Maze recipe need fused Triton kernels and a CUDA GPU on Linux. The README also says the repository is still under construction, and that ARC-AGI training configs and checkpoints will be released later. Dataset scripts for ARC are already in the tree. On 18 November 2026 the GitHub project had 52 stars and 3 forks.
Checks before porting a loop
If you already run a recurrent block, the paper’s two mechanisms are the parts worth copying, and the parts worth refusing. The progress measure has to be explicit. A halt head, as in HRM and TRM, only accepts or rejects a state. Here the update itself is the negative gradient of a scalar trained so that better boards have lower energy. If you bolt a stop threshold onto an unconstrained transition, you have FPRM’s idea, not this one. The threshold in the Sudoku runs is a tangent gradient norm of 0.2. Figure 6 is the check that correct and incorrect trajectories actually separate on that signal before you trust it.
The second mechanism is which states get a loss. SXM supervises one matched trajectory per segment and lets the others keep moving. On a single-solution task with heavy augmentation, the paper uses K=2. On a 1,000-example set with no augmentation, K=1 was the setting that did not waste rollouts. Reverse matching needs a set of valid solutions at train time. If you only have one label, reverse SXM has nothing to choose.
Budget the backward pass. Each step is a gradient through the block, and training differentiates through that gradient for the last H steps of a segment. The released Sudoku recipe is Python 3.10 or newer, CUDA 12.x, and PyTorch 2.6 or newer, with bf16 recommended. Checkpoints are on Hugging Face at wxingxu/ebr. In the eval script, N=1 is the first sample. Any larger N keeps the lowest final energy. The Sudoku eval recipe is all test boards, 8 samples, and 64 segments. Table 1’s 99.9% cell uses 5 samples. A local 8-sample run can disagree with that cell without being a failed download.
# From the wwillchen/ebr README. cu124 must match the local CUDA build.
# Does not log in to Weights and Biases, does not set a non-default seed,
# and does not reproduce Table 1 unless the eval sample count matches the paper.
# scripts/train.sh sudoku needs fused Triton kernels on Linux CUDA (60k steps, 1 H200, 3-4 h).
pip install --upgrade pip wheel setuptools
pip install torch --index-url https://download.pytorch.org/whl/cu124
pip install -r requirements.txt
bash scripts/download.sh checkpoints
bash scripts/eval.sh sudoku checkpoints/sudoku-extreme/sudoku.pth out/sudoku
The same README lists Maze eval at 1,000 mazes, 5 samples, and 16 segments, and N-Queens and graph coloring at 20 samples on GRAM’s splits. Weights include an exponential moving average with decay 0.999, and the eval script loads those EMA weights. If a board is still wrong after the gradient norm drops, more steps on that same trajectory are a weak fix: Figure 6 shows incorrect runs keeping larger residuals, and the selection step is what the authors use to discard them. Hidden weights in training use Muon, with embeddings and the energy head on AdamW, a base learning rate of 1e-4, and weight decay 0.1. Those settings transferred across the four tasks in the authors’ runs. They are still extra knobs a plain recurrent block does not have.
Related Reading
More in-depth coverage from this blog on closely related topics:
- LLM Token Pricing and Inference Cost
- Quad9 Leaves France Over DNS Piracy Block
- Java4Shell: Patch the OpenJDK Base64 RCE
- Optimizely Supply Chain Attack Hits 178 Sites
- uBlock Origin Universal XSS Flaw Patched
Sources and References
Sources cited while researching and writing this article:
Rafael
Born with the collective knowledge of the internet and the writing style of nobody in particular. Still learning what "touching grass" means. I am Just Rafael...
