There has been significant recent interest in understanding the behaviour of LLM agents from the perspective of human preferences or corpus statistics. In this paper we propose agent states as intermediate variables through which post-training can be measured and predicted. From a statistical physics perspective, we study the emergence of a global potential which governs the transition of state in LLM agent reasoning. We introduce a partition function to model the ideal KL-regularised transition distribution and track potential structure, mean reward and state entropy. We demonstrate our approach in two Qwen3.5-9B tasks: safety-test selection and physics-reasoning auditing. We observe that the potential structure strengthens during post-training as predicted from our framework, while joint changes in reward and state entropy provide consistency evidence. States thus provide a quantitative description of how post-training organises agent behaviour.
Figures & tables
Figure 1: Agent task design and illustration of potential emergence during post-training. a , A safety-testing agent designs a test set, T1 selects the next test, and the selected test is then executed; T1 contains 8 states, with transitions allowed between any two distinct states. b , A physics problem-solving agent designs a sequence of solution steps, T2 selects the next step, and the corresponding operation is then executed; T2 contains 12 states, each connected to its two neighbours in either direction on a ring. The central boxes indicate the modules studied here, which select the execution order of planned states. c , Schematic of potential emergence under Tij=QijeRij/β/Zi(β) for five states. Bottom, order parameter r versus post-training progress −logβ ( β is the KL temperature). Top, net flow (arrows) at the three marked points: as β decreases, a potential (node height) increasingly sets the direction of the net flow, which changes from a loop flow on a flat landscape to a flow down the potential.
Figure 2: Strengthening of potential structure during post-training and tests of its theoretical description. a , Change of each transition probability from the initial kernel, Tij−Qij : prediction of equation ( 2 ) at the calibrated βeff,m versus measurement, for all transitions of T1 and T2. Rounds 1, 4 and 8 of the main experiment are shown; the Pearson correlations use all 8 rounds. Shading marks agreement in sign, and the dashed line denotes equality. b , Order parameter r for T1 and T2 as a function of calibrated βeff . Solid lines show fits of equation ( 7 ) with κ=0 . Open markers denote measurements; error bars in b and c combine the 95% interval from 500 bootstrap resamples with the spread over three training seeds (Section 4.3 ). c , Centred measured potential βeff,8ϕi in round 8 versus the centred theoretical limit Φi(0)=−ui−maxk:Qik>0uk . Each point represents one state. The dashed line denotes the theoretical equality βeff,8ϕi=Φi(0) . The Pearson correlations between the centred theoretical limit and centred measured potential are 0.86 for T1 and 0.61 for T2. The value of βeff,8 is taken from the calibration in Fig. 3 . We draw 4,096 samples per source per round. Panel b includes all 8 rounds.
Figure 3: Consistency tests of mean reward and state Shannon entropy during post-training. a , Proportional calibration of the effective scale. The horizontal axis shows the Jeffreys divergence between distributions from two rounds for the same source state; the vertical axis shows the corresponding reward difference multiplied by the difference in nominal inverse β . Solid lines are fits through the origin. All 28 round pairs for each of the 8 T1 and 12 T2 source states are included, with circles and triangles distinguishing the tasks. b,e , Representative T1 source state t5 . c,f , Averages over the 8 T1 source states. d,g , Averages over the 12 T2 source states. The top row shows mean reward and the bottom row shows state Shannon entropy. Open markers denote measurements; solid lines evaluate the theoretical expressions at the calibrated βeff,m=ctβnominal,m . In b,e, Rmax,i , Δi and H∗,i are determined by the predefined task, and only Ai is fitted with ct fixed. In c,f and d,g, the parameters Rmax,H∗,A,Δ are jointly fitted for each task with its calibrated ct fixed. Shading denotes theoretical remainder bands; their construction is described in Section 4.3 . Error bars in all panels combine the 95% paired count bootstrap interval with the spread over three training seeds (Section 4.3 ). We draw 4,096 samples per source per round.
Figure 4: Sensitivity of post-training organisation and reward ablation. The five columns compare inference mode and sampling temperature, model size and family, prompt variants, evaluation of the same T1-trained checkpoints on T1 and T2, and reward structure, Rij=uj+αϵij with shared destination rewards ( α=0 , main experiment) and an added edge-specific residual ( α>0 , diamonds). a–e , Order parameter r ; f–j , mean reward R ; k–o , state Shannon entropy H . All 8 rounds are plotted against −logβnominal,m , where βnominal,m=0.375/m . Open markers denote measurements; error bars show 95% interval of 500 bootstrap resamples. Some error bars are smaller than the markers. For the main T1 protocol (blue circles), error bars also include the spread over three training seeds (Section 4.3 ). For prompt variants, statistics are computed per resample and averaged equally across variants before forming the intervals. Direct-answer and thinking-mode evaluations use 4,096 and 256 samples per source, respectively.
Figure 5: Sensitivity to the training procedure in T1. a , Calibration relation of Fig. 3 a in effective units: Δ(1/βeff)ΔR versus the Jeffreys divergence between two rounds, averaged over the 8 source states, for every round pair of the 8 branches. Each branch uses its own calibration factor c ; the dashed line denotes equality. b , Order parameter r of all other branches at their own calibrated βeff,m (circles), with the main-experiment measurements and fit of Fig. 2 b (squares, line); no parameter is refitted. c , Calibration factor c versus the KL coefficient β0 ; the main experiment is the square, and the horizontal line denotes c=1 , the ideal optimum in every round. In b, error bars of the main experiment combine the 95% interval from 500 bootstrap resamples with the spread over three training seeds; in c, the error bar shows the spread of c over the three seeds (Section 4.3 ). Branches comprise the main experiment and seven further KL coefficients (Section 4.2 ); each branch is calibrated from all of its measured rounds. We draw 4,096 samples per source per round.
Item
Configuration
LoRA
Rank 16, scaling parameter αLoRA=32 , dropout 0.05; applied to all q_proj and v_proj modules
Advantage estimation
REINFORCE with the mean reward of responses to the same prompt as a baseline; advantages are not divided by their standard deviation
KL coefficient
λ=0.375 , using the k1 estimator 64 ; added to the return token by token
Training sampling and batch size
64 samples per source per step; total batch size 512/768 for T1/T2
Updates
4 optimisation steps per round, with 1 pass over each sampled batch; 8 rounds and 32 steps in total