Papers
Topics
Authors
Recent
Search
2000 character limit reached

Energy-guided Recursive Model (ERM)

Updated 14 July 2026
  • ERM is an inference-time framework that leverages explicit energy minimization and structured memories to select optimal recursive reasoning candidates.
  • It decomposes tasks into local and global factors using a Hopfield-style energy formulation, enabling rule-consistent candidate verification.
  • Experiments on Sudoku, PPBench, and Maze demonstrate that ERM nearly closes the selection gap, outperforming traditional heuristic selectors.

Energy-guided Recursive Model (ERM) is an inference-time framework for recursive reasoning in which selection among multiple latent trajectories is posed as explicit energy minimization rather than as heuristic voting, token confidence, or auxiliary q-head scoring. In the formulation introduced under the title “Energy-guided Recursive Model,” ERM assigns each decoded candidate a Hopfield-style energy that measures compatibility with task-specific local and global structures, and then returns the minimum-energy trajectory. The same energy also induces a tempered distribution that can be used with parallel tempering for exploration and ranking. On Sudoku, Pencil Puzzle Bench (PPBench), and Maze, ERM is reported to improve selection under a fixed rollout budget of recurrent depth D=64D=64 and breadth K=128K=128, reaching 98.97%98.97\%, 88.04%88.04\%, and 99.30%99.30\% optimal-solution rates, respectively (Zhao et al., 11 Jul 2026).

1. Definition and problem setting

ERM addresses what the paper terms the selection gap in test-time scaling: recursive reasoners can generate more candidate trajectories by increasing recurrent depth DD or stochastic breadth KK, but existing selection mechanisms often remain heuristic. Majority voting, token confidence, and learned q-heads may correlate with local certainty while failing to capture global correctness, particularly on tasks whose validity depends on structured constraints such as connectivity or permutation consistency (Zhao et al., 11 Jul 2026).

The framework assumes a small neural network fθf_\theta that recursively updates a latent state,

st+1=fθ(st,x,ξt),s_{t+1} = f_\theta(s_t, x, \xi_t),

where xx is the input instance, K=128K=1280 indexes recurrent steps, and K=128K=1281 introduces stochasticity that creates breadth. A decoder K=128K=1282 maps the final latent state to a structured output K=128K=1283. From K=128K=1284 rollouts, the model obtains a candidate pool

K=128K=1285

ERM then defines a scalar compatibility score K=128K=1286 and selects

K=128K=1287

This makes the final decision a task-aware energy minimization problem rather than a post hoc heuristic (Zhao et al., 11 Jul 2026).

The energy is built from task-derived memories rather than learned verification heads. A task is decomposed into factors K=128K=1288, and each factor has an input-conditioned memory set K=128K=1289 containing valid local or global patterns. These memories are not trained in the main ERM experiments; they are constructed from task rules (Zhao et al., 11 Jul 2026).

2. Hopfield-style energy formulation

ERM is explicitly derived from Modern Hopfield retrieval energy. The paper recalls the classical Hopfield energy

98.97%98.97\%0

and the modern retrieval energy over a query 98.97%98.97\%1 and memory set 98.97%98.97\%2,

98.97%98.97\%3

where 98.97%98.97\%4 is a retrieval temperature. Low 98.97%98.97\%5 approximates nearest-memory retrieval (Zhao et al., 11 Jul 2026).

ERM adapts this principle from continuous retrieval to candidate selection over decoded outputs. Its general energy is

98.97%98.97\%6

where:

  • 98.97%98.97\%7 is a factor-specific distance between candidate 98.97%98.97\%8 and memory 98.97%98.97\%9;
  • 88.04%88.04\%0 scales memory distance;
  • 88.04%88.04\%1 controls sharpness of retrieval;
  • 88.04%88.04\%2 is a global rule-violation score;
  • 88.04%88.04\%3 weights the global term (Zhao et al., 11 Jul 2026).

The factorized form can also be written as

88.04%88.04\%4

88.04%88.04\%5

88.04%88.04\%6

with 88.04%88.04\%7 and 88.04%88.04\%8 in the paper’s Equation (3) (Zhao et al., 11 Jul 2026).

The authors state that this construction subsumes confidence and hard verification as special cases. A one-cell factor with memories equal to labels recovers nearest-label behavior, while a single complete memory 88.04%88.04\%9 yields energy proportional to distance from a fully specified verifier (Zhao et al., 11 Jul 2026). This suggests that ERM is not merely an alternative selector, but a more general compatibility formalism in which standard confidence-based rules appear as degenerate cases.

3. Inference mechanism and energy-based sampling

ERM is an inference-time method. In the main experiments, the base reasoner is an EqR checkpoint that generates candidate trajectories through depth-99.30%99.30\%0 recurrent computation; no additional ERM training is performed. Memory sets and global penalties are defined directly from task rules. The appendix includes a training-side energy-transformer variant on Sudoku, but the paper identifies that as motivation rather than the main focus (Zhao et al., 11 Jul 2026).

The reported test-time procedure for 99.30%99.30\%1 and 99.30%99.30\%2 has four stages:

  1. Candidate generation: run 99.30%99.30\%3 stochastic rollouts of the recursive reasoner to obtain decoded candidates 99.30%99.30\%4.
  2. Energy evaluation: compute 99.30%99.30\%5 for each candidate.
  3. Selection without parallel tempering: return the lowest-energy candidate.
  4. Optional parallel tempering: sample and swap candidates across a temperature ladder, then return the lowest-energy candidate among replicas (Zhao et al., 11 Jul 2026).

A diagnostic extension tracks per-step energies 99.30%99.30\%6 and may aggregate them as

99.30%99.30\%7

but the reported results select using the final-step energy rather than a trajectory-aggregated score (Zhao et al., 11 Jul 2026).

The same scalar energy defines a tempered distribution

99.30%99.30\%8

which enables parallel tempering (PT). With replicas at temperatures 99.30%99.30\%9, ERM periodically proposes swaps between neighboring temperatures with acceptance probability

DD0

The paper interprets this as allowing hot chains to explore broadly while cold chains exploit low-energy basins, with swaps transmitting promising candidates discovered at higher temperature to lower-temperature replicas (Zhao et al., 11 Jul 2026).

A common misunderstanding is to view ERM as primarily a sampling algorithm. In the reported system, PT is optional. The core method is the explicit energy selector itself; PT uses the same energy for improved exploration when needed (Zhao et al., 11 Jul 2026).

4. Task-specific energies and representations

The paper instantiates ERM on three structured reasoning domains, each with a different memory design.

Sudoku

For 9×9 Sudoku-Lite, each candidate is a grid assignment over digits DD1. If DD2 denotes the base model’s log-probability that cell DD3 has digit DD4, then for each structural unit DD5 (row, column, or box), the memory set DD6 contains all DD7 permutation matrices enforcing “each digit appears exactly once.” The unit score is

DD8

where DD9 are the cells in unit KK0. This log-sum-exp over permutations is evaluated exactly via dynamic programming, described as log-permanent computation. The Sudoku energy is then

KK1

with clue cells clamped to the provided digits (Zhao et al., 11 Jul 2026).

Pencil Puzzle Bench

PPBench contains heterogeneous puzzle types with enumerable local patterns and global constraints. The paper lists several examples: Lightup uses numbered-clue exact-count memories and line-of-sight at-most-one-bulb memories; Tapa uses cyclic run-pattern memories around clues; Heyawake uses room-count and adjacency memories; Nurikabe uses no-2×2-sea memories and island/sea potentials; and a Sudoku subset reuses permutation memories. Local energies are defined through distances to valid pattern memories using normalized Hamming distance inside the log-sum-exp term. Global energy KK2 captures connectivity and coverage violations, since enumerating all fully global valid boards is intractable. The reported configuration is KK3, KK4, and KK5 (Zhao et al., 11 Jul 2026).

Maze

For unique-path 30×30 mazes, the paper emphasizes that local path-degree memories are insufficient because they admit disconnected cycles. ERM therefore uses a global input-conditioned shortest-path memory KK6 computed by BFS. Similarity and energy are

KK7

where KK8 is the fraction of matching tokens and KK9. The reported Maze configuration sets the local memory weight to zero so that the global verifier dominates (Zhao et al., 11 Jul 2026).

These three instantiations illustrate a central feature of ERM: the energy is not a generic learned scalar, but a structured verifier grounded in the combinatorics of each task. A plausible implication is that ERM’s effectiveness depends strongly on whether the relevant validity constraints can be encoded as tractable memories or global penalties.

5. Quantitative performance, oracle gaps, and ablations

Under a shared-candidate selection protocol with fθf_\theta0 and fθf_\theta1, ERM is compared against baseline one-rollout prediction, majority voting, q-head selection, and confidence-based selection. The paper reports the following exact-accuracy results (Zhao et al., 11 Jul 2026):

Task Non-ERM selectors ERM
Sudoku (2048 puzzles) Baseline 89.31%; Majority 97.90%; q-head 98.54%; confidence 98.58% 98.83%
PPBench (301 puzzles) Baseline 68.44%; Majority 79.07%; confidence 80.73%; q-head 83.39% 88.04%
Maze (1000 mazes) Baseline 89.10%; Majority 97.80%; q-head 97.30%; confidence 97.80% 99.30%

ERM matches the candidate oracle on Sudoku and PPBench at fθf_\theta2 and fθf_\theta3, respectively, and also matches the candidate oracle on Maze at fθf_\theta4 (Zhao et al., 11 Jul 2026). The paper interprets this as closing, or nearly closing, the selector-oracle gap under the same rollout budget.

With parallel tempering, ERM remains the strongest selector. The reported selected/oracle accuracies are:

  • Sudoku: PT-q-head fθf_\theta5; PT-confidence fθf_\theta6; PT-ERM fθf_\theta7 selected and fθf_\theta8 oracle, with swap rate approximately fθf_\theta9.
  • PPBench: PT-q-head st+1=fθ(st,x,ξt),s_{t+1} = f_\theta(s_t, x, \xi_t),0; PT-confidence st+1=fθ(st,x,ξt),s_{t+1} = f_\theta(s_t, x, \xi_t),1; PT-ERM st+1=fθ(st,x,ξt),s_{t+1} = f_\theta(s_t, x, \xi_t),2 selected and st+1=fθ(st,x,ξt),s_{t+1} = f_\theta(s_t, x, \xi_t),3 oracle, with swap rate approximately st+1=fθ(st,x,ξt),s_{t+1} = f_\theta(s_t, x, \xi_t),4.
  • Maze: PT-q-head st+1=fθ(st,x,ξt),s_{t+1} = f_\theta(s_t, x, \xi_t),5; PT-confidence st+1=fθ(st,x,ξt),s_{t+1} = f_\theta(s_t, x, \xi_t),6; PT-ERM st+1=fθ(st,x,ξt),s_{t+1} = f_\theta(s_t, x, \xi_t),7 selected and st+1=fθ(st,x,ξt),s_{t+1} = f_\theta(s_t, x, \xi_t),8 oracle, with swap rate approximately st+1=fθ(st,x,ξt),s_{t+1} = f_\theta(s_t, x, \xi_t),9 (Zhao et al., 11 Jul 2026).

The ablation analysis isolates several conditions under which ERM is effective:

  • Energy choice on PPBench: pure memory-distance energy with xx0 avoids elevating confident but invalid candidates; xx1 and xx2 are identified as critical.
  • Global memory on Maze: BFS-derived global memory is necessary because local degree memories cannot reject disconnected cycles.
  • Memory capacity on Sudoku: exact log-permanent dynamic programming makes large permutation memories computationally feasible.
  • Depth and breadth: increasing xx3 improves candidate quality and increasing xx4 raises the oracle; ERM’s advantage grows when ordinary selectors lag behind a substantially better oracle.
  • Failure cases: if the oracle is low, the bottleneck is candidate generation rather than selection; if PT is ineffective under weak base models, the paper attributes this to misaligned landscapes rather than to the PT mechanism itself (Zhao et al., 11 Jul 2026).

The theoretical discussion is correspondingly modest. ERM does not update latent states by energy descent, but its selector is described as choosing the minimum of a Lyapunov-like function over a discrete candidate set. The paper also states that the factor energies are log-sum-exp over memory distances, making xx5 convex in the logits and sharp in the low-temperature limit (Zhao et al., 11 Jul 2026).

6. Relation to earlier energy-guided sequence modeling and terminological scope

The label “ERM” has close conceptual neighbors in earlier work on text generation, but those systems address a different setting. “Residual Energy-Based Models for Text” defines a globally normalized joint model

xx6

where a base autoregressive LLM xx7 is corrected by a sequence-level residual energy xx8. The paper derives an exact step-wise decomposition in which local token probabilities are multiplicatively corrected by expectations of xx9 over suffixes sampled from the base model, and it uses importance resampling for generation rather than heuristic reranking. It reports improvements in perplexity and human evaluation, including CCNews test perplexity improving from K=128K=12800 for a 12-layer base LM to K=128K=12801–K=128K=12802 with Joint BiT-Base, and human preferences favoring joint samples over base LM samples on CCNews (Bakhtin et al., 2020).

A later single-network method, E-ARM, makes the autoregressive model itself an energy-based model by reinterpreting softmax logits as energies without adding parameters. It trains with a contrastive-divergence objective and uses ancestral samples from the autoregressive model for the negative phase via importance weighting, rather than MCMC. The paper reports gains in neural machine translation, language modeling, and image generation; for example, on language modeling with Transformer-Base it improves CC-News perplexity from K=128K=12803 to K=128K=12804 without resampling and to K=128K=12805–K=128K=12806 with Top-K energy resampling (Wang et al., 2022).

These earlier methods share ERM’s broad intuition that energy can guide recursive or autoregressive generation, but they differ materially from the 2026 ERM formulation. The 2026 ERM is an inference-time selector for recursive reasoning trajectories built from explicit Hopfield-style task memories; the text-generation methods are probabilistic generative models over token sequences with learned energy terms (Zhao et al., 11 Jul 2026). The terminological overlap therefore reflects a family resemblance rather than identity.

A separate probabilistic model, the Derrida–Retaux recursive model, also uses the language of “free energy” and recursion, with update

K=128K=12807

but this is a distinct mathematical object from the neural ERM framework. Its “free energy” is the asymptotic normalized expectation

K=128K=12808

studied in the context of hierarchical pinning and critical exponents rather than test-time candidate selection (Hu et al., 2017). The shared vocabulary should not be conflated with the 2026 reasoning model.

In this broader lineage, ERM can be situated as a task-structured, selector-centric variant of energy-guided computation: explicit energy defines what constitutes a valid candidate, and test-time inference chooses or samples according to that criterion rather than according to confidence heuristics alone.

Topic to Video (Beta)

No one has generated a video about this topic yet.

Whiteboard

No one has generated a whiteboard explanation for this topic yet.

Follow Topic

Get notified by email when new papers are published related to Energy-guided Recursive Model (ERM).