Dynamical Systems Theory Behind a Hierarchical Reasoning Model
Authors: Vasiliy A. Es'kin, Mikhail E. Smorkalov
Organizations: Department of Radiophysics, University of Nizhny Novgorod, Nizhny Novgorod 603950, Russia · Huawei Nizhny Novgorod Research Center, Nizhny Novgorod 603006, Russia · Skolkovo Institute of Science and Technology, Moscow 121205, Russia
Current large language models (LLMs) primarily rely on linear sequence generation and massive parameter counts, yet they severely struggle with complex algorithmic reasoning. While recent reasoning architectures, such as the Hierarchical Reasoning Model (HRM) and Tiny Recursive Model (TRM), demonstrate that compact recursive networks can tackle these tasks, their training dynamics often lack rigorous mathematical guarantees, leading to instability and representational collapse. We propose the Contraction Mapping Model (CMM), a novel architecture that reformulates discrete recursive reasoning into continuous Neural Ordinary and Stochastic Differential Equations (NODEs/NSDEs). By explicitly enforcing the convergence of the latent phase point to a stable equilibrium state and mitigating feature collapse with a hyperspherical repulsion loss, the CMM provides a mathematically grounded and highly stable reasoning engine. On the Sudoku-Extreme benchmark, a 5M-parameter CMM achieves a state-of-the-art accuracy of 93.7 %, outperforming the 27M-parameter HRM (55.0 %) and 5M-parameter TRM (87.4 %). Remarkably, even when aggressively compressed to an ultra-tiny footprint of just 0.26M parameters, the CMM retains robust predictive power, achieving 85.4 % on Sudoku-Extreme and 82.2 % on the Maze benchmark. These results establish a new frontier for extreme parameter efficiency, proving that mathematically rigorous latent dynamics can effectively replace brute-force scaling in artificial reasoning.
Figures & tables
Figure 2: Architecture of hierarchical reasoning model.
Figure 3: Diagram of training of HRM (a) and TRM (b).
Figure 4: Pseudocode of training of the HRM (left) and TRM (right).
Figure 5: Evolution of the phase portrait of the dynamical system ( 20 ), ( 21 ) during neural network training.
Figure 6: Integration of the system of differential equations ( 20 )–( 21 ) under the trained neural network, which determines the landscape of phase space. Green and red arrows correspond to the integration stages using the L - and H -modules, respectively.
Figure 7: Illustration to repulsion loss term. (a) is initial hidden representation, (b) is projection to the surface of a unit hypersphere, (c) is projection after using repulsion loss term, (d) is hidden representation after using repulsion loss term.
Figure 8: (a) represents the integration of the system of differential equations ( 20 ) during training according to the descriptions in [ 1 , 7 ] ; (b), (c), and (d) represent the integration of the system of differential equations ( 20 ) during training according to the official code for these papers. Panels (b), (c), and (d) correspond to batches i , i+1 , and i+2 , respectively.
Method
Accuracy %
Number of
Features
Parameters
DeepSeek R1 [ 1 ]
0.0
671B
–
HRM [ 1 ]
55.0
27M
–
TRM [ 7 ]
87.4
5M
MLP-mixer
TRM [ 7 ]
74.7
7M
Attention
HRM (our run)
45.9
27M
AMP
Table 1: Test accuracy on Sudoku-Extreme benchmark. Hidden size of HRM and TRM is 512.
Method
Accuracy %
Number of
Features
Parameters
DeepSeek R1 [ 1 ]
0.0
671B
–
HRM [ 1 ]
74.5
27M
–
TRM [ 7 ]
85.3
7M
Attention
TRM (our run)
84.2
7M
AMP
(gradient accumulation on 10 segments)
Table 2: Test accuracy on Maze benchmark. Hidden size of HRM and TRM is 512.
Features
Accuracy %
B=256
69.6
SiLU to tanh , B=256
81.8
SiLU to tanh , B=64 , Ngrad=4 ,
using the all states of the H -module for gradient calculation
56.8
Table 3: Test accuracy of TRM on Sudoku-Extreme benchmark. General features: D=512 , AMP, Nsuper=16 , NH=3 , NL=6 MLP-mixer, number of parameters is 5M, Naccum=Nsuper .
NH
NL
Accuracy %
Features
1
2
58.9
tanh is activation function
1
2
63.8
1
4
68.9
1
6
68.7
2
1
64.6
2
2
70.5
Table 4: Dependence of accuracy of CMM512NODE on NH and NL for Sudoku-Extreme benchmark. General features: D=512 , AMP, Nsuper=16 , Ngrad=1 , B=256 , MLP-mixer, number of parameters is 5M, SiLU is activation function for main part of experiments, StableMax is loss for main part of experiments.
Features
Accuracy %
Naccum=3 , Ngrad=1
79.2
Naccum=2 , Ngrad=1 ,
using the all states of the H -module for gradient calculation
74.6
Naccum=2 , Ngrad=1
78.8
Naccum=2 , Ngrad=3
81.8
Naccum=2 , Ngrad=4
81.3
Table 5: Test accuracy of CMM512NODE on Sudoku-Extreme benchmark. General features: D=512 , B=256 , AMP, Nsuper=16 , NrmH=2 , NrmH=4 , StableMax3, equilibrium in x^ and z^H , MLP-mixer, number of parameters is 5M.
Features
Accuracy %
B=256 , Ngrad=3 , without repulsion for x^
88.0
B=128 , Ngrad=6
89.9
B=256 , Ngrad=3 , tanh is activation function
79.4
B=256 , Ngrad=3
90.1
B=384 , Ngrad=3
89.9
B=250 , Ngrad=4
90.5
Table 6: Test accuracy of CMM512NODE on Sudoku-Extreme benchmark. General features: D=512 , AMP, Nsuper=16 , Naccum=2 , NH=3 , NL=6 , StableMax3, equilibrium in x^ and z^H , repulsion for z^H and x^ , MLP-mixer, number of parameters is 5M, learning rate is 10−4 .
Features
Accuracy %
Nsuper=8 , learning rate 3×10−4
87.4
Nsuper=16 , learning rate 2×10−4
91.7
Nsuper=16 , learning rate 10−4
91.1
Nsuper=16 , Naccum=16 , Ngrad=64
learning rate 2×10−4
93.7
B=1000 , Nsuper=16 , Naccum=16 , Ngrad=16
Table 7: Test accuracy of CMM512NSDE on Sudoku-Extreme benchmark. General features: D=512 , B=250 , Ngrad=4 , AMP, Naccum=2 , NH=3 , NL=6 , StableMax3, equilibrium in z^H , repulsion for z^H and x^ , MLP-mixer, σ=0.01 .
Features
Accuracy %
Nsuper=16 , Ngrad=64 , λLM=2
80.2
Nsuper=2 , Ngrad=8 ,
the optimizer Adam: epsilon is 10−14 , weight decay is 2
89.8
Nsuper=3 , Ngrad=12 ,
the optimizer Adam: epsilon is 10−14 , weight decay is 2
91.7
Table 8: Test accuracy of CMM512NSDE on Sudoku-Extreme benchmark with gradient normalization (AlgGradNorm). General features: D=512 , B=250 , AMP, Naccum=16 , NH=3 , NL=6 , StableMax3, equilibrium in z^H , repulsion for z^H and x^ , MLP-mixer, σ=0.01 , weight decay is 1, learning rate 2×10−4 , .
NH
NL
Features
Accuracy %
Number of
Parameters
2
4
CMM128NODE , B=256
20.3
0.52M
3
6
TRM , B=250 , Ngrad=4 , Nsuper=8 , Attention
23.8
0.52M
3
6
CMM128NODE , B=250 , Ngrad=4 ,
learning rate is 3×10−4 , Attention
31.4
0.52M
2
4
CMM128NSDE , B=250
Table 9: Dependence of accuracy of CMM on NH and NL for Sudoku-Extreme benchmark. General features: D=128 , AMP, Nsuper=16 , Naccum=2 , Ngrad=3 , MLP-mixer, number of parameters is 0.5M, StableMax3 is the loss function for the majority of the experiments, equilibrium in x^ and z^H , repulsion for z^H and x^ , learning rate is 10−4 , epsilon of the optimizer Adam is 10−12 , z^H and z^L are initialized by x^ and 0^ , respectively, at the beginning of the 1st segment of training.
Features
Accuracy %
Number of
Parameters
initialization of z^H and z^L as in baseline, epsAdam = 10−8
77.8
0.52M
epsAdam = 10−8
81.8
0.52M
epsAdam = 10−12
85.0
0.52M
epsAdam = 10−14
86.1
0.52M
epsAdam = 10−14 , identical transformer layers
85.4
0.26M
Table 10: Dependence of accuracy of CMM on different features for Sudoku-Extreme benchmark. General features: D=128 , NH=3 , NL=6 , AMP, Nsuper=16 , Naccum=16 , Ngrad=16 , B=1000 , MLP-mixer, number of parameters is 0.5M, StableMax3 is the loss function for the majority of the experiments, equilibrium in x^ and z^H , repulsion for z^H and x^ , learning rate is 2×10−3 , freeze embedding after 2500 epoch, AlgGradNorm, epsilon of the optimizer Adam is epsAdam = 10−12 , z^H and z^L are initialized by x^ and 0^ , respectively, at the beginning of the 1st segment of training.
Table 11: Dependence of accuracy of CMM on different features for Maze benchmark. General features: D=128 , NH=3 , NL=4 , AMP, Nsuper=16 , Naccum=4 , Ngrad=4 , B=100 , MLP-mixer, StableMax3 is the loss function for the majority of the experiments, equilibrium in x^ and z^H , repulsion for z^H and x^ , learning rate is 2×10−4 , freeze embedding after 5000 epoch, AlgGradNorm, epsilon of the optimizer Adam is epsAdam = 10−12 , z^H and z^L are initialized by x^ and 0^ , respectively, at the beginning of the 1st segment of training.