Momentum-Perplexity Mechanics in Large Language ModelsMomentum Point-Perplexity Mechanics in Large Language Models
The authors measured the hidden-state energy of 20 checkpoints: median CV 2.2% for random weights, 9.4% for pretrained.
- How hidden states move with tokens during inference and how this relates to next-token probability remains unclear from existing principles. The authors aim to use this for monitoring and low-risk control.
- Treat stepwise displacement as velocity, treat the realized token's point perplexity as the certainty-related term, and define the Lagrangian and energy on a log scale. Jacobian steering performs a least-action perturbation along the target token's log-probability gradient.
- The main text states that this energy is approximately conserved across 20 checkpoints: median global CV of 2.2% for random weights and 9.4% for pretrained. Pretrained K/V is 11.8, random weights 0.89. On two Instruct models, GPT-4.1 quality scores are higher after steering.
- The authors state that only up to 3B and English tokenizers were covered; larger models and multilingual settings were not tested, and they state that the Gemma prompt architecture has an effect. The energy table shows 19 rows; steering quality scores were reported only for two Instruct models, and η, K, and the energy CV at that time were not reported numerically.
- Evaluated models
- Qwen-2.5-1.5BQwen-2.5-3BLlama-3.2-1BLlama-3.2-3BDeepSeek-R1-1.5BGemma-3-1BSmolLM2-135MSmolLM2-360MSmolLM2-1.7BSmolLM3-3BSmolLM2-135M-InstructQwen2.5-1.5B-Instruct
- Benchmarks
- held-out Wikipedia articlesWikipedia article beginnings
- Metrics
- Global CVAvg. Traj. CVK/V ratioAvg. EnergyGPT-4.1 semantic quality (1-10)Cohen's d
Across 20 open-source Transformer models (135M-3B parameters), an energy-like quantity composed of the hidden state change rate and next-token certainty remains nearly constant during inference; randomly weighted models conserve it more tightly than pretrained models, while training makes models faster and more decisive but with greater fluctuation. Based on this, the study proposes Jacobian steering, which biases hidden states toward a target token with minimal perturbation, maintaining near-constant energy on the two tested models, with continuation semantic quality higher than the model's natural output.
Paper analysis
What problem does this paper attempt to solve?
The authors aim to define force, energy, and least action for hidden states during inference, and to monitor and control based on them.
Core question: can force, energy, and a least-action principle be defined for hidden-state evolution during transformer inference, and used for monitoring and low-risk control?
- Context: The authors believe neural language models dominate NLP, but the principles governing internal dynamics remain unclear. Existing interpretability mostly provides static circuits and feature representations; less is known about how hidden states move over time during inference and how this relates to next-token probability.
- Two questions: Q1 asks whether force, energy, and a least-action principle can be defined to govern hidden-state evolution; Q2 asks whether these laws can support principled monitoring and low-risk control. The authors state both answers are yes.
- Core setup: treat stepwise hidden-state displacement as velocity, combine the model's certainty about the realized token, i.e., point perplexity (the reciprocal of that token's probability), with velocity, in a log-scale variational framework.
- What the paper proposes: a log-Lagrangian combining hidden-state velocity and point perplexity, an approximately conserved energy expression, and a least-action control method, Jacobian steering. The authors state this provides a principled basis for interpretability, anomaly detection, and low-risk steering.
What related research exists?
Related work is organized into first-order probing, physics-like dynamics, and generative control; the authors connect them using discrete log-Lagrangian.
The paper in §1.1 categorizes related work into first-order probing, writing deep learning as dynamical systems, and generative control; the experiments do not use these cited methods as baselines.
First-order probing
- Logit lens: Belrose et al. (2023)'s logit lens and its tuned variants use Taylor expansion to see how small hidden-state perturbations map to output logits. Wang (2025) extends the logit lens to modern LLMs; Appendix B calls the linear displacement relation a standard approximation in the logit lens and states its implications for inference dynamics are still less explored.
- Influence functions: Koh and Liang (2017) quantify the effect of infinitesimal input or parameter changes on predictions. The paper only describes this.
Dynamics and physical constraints
- Variational and continuous time: Wibisono et al. (2016) discuss accelerated methods from a continuous-time variational perspective; Chen et al. (2018) propose Neural ODEs.
- Energy and known equations: Greydanus et al. (2019)'s Hamiltonian Neural Networks enforce exact energy conservation in the network; Raissi et al. (2019)'s Physics-Informed Neural Networks incorporate known differential constraints into the loss.
Generative control
- RLHF and PPLM: Christiano et al. (2017) use human preferences for reinforcement learning; Dathathri et al. (2020)'s Plug-and-Play Language Models steer pretrained language models toward target behaviors.
- Hamiltonian-informed decoding: Du et al. (2024) appears in Appendix E, and the authors state it is similar to Jacobian steering. The paper does not report comparative experiments with this method.
Baselines and data
- Controls: The energy experiments compare against pretrained and random weights of the same architecture, with held-out Wikipedia data. Steering compares against the model's own natural continuations, with target tokens taken from Wikipedia text, and quality scored by GPT-4.1 on top-10 lists.
- Positioning: The authors state that, unlike the above threads, this paper derives a discrete log-Lagrangian on hidden-state velocity and point perplexity, yielding an approximately conserved energy and least-action control at inference.
How does the paper address this problem?
Use a logarithmic Lagrangian to balance speed and point perplexity, then apply least-action control along the gradient of the target token.
Overall, the authors use a log-Lagrangian to describe stepwise hidden states, then write Jacobian steering as a least-action perturbation under this variational structure. Notation is in Appendix A.
State, velocity, and energy
- State: ht is the layer-normed residual stream, vt = ht − ht−1. Appendix A sets mass to 1, so momentum and velocity are the same. The paper does not state which layer is taken.
- Point perplexity: PPLt = 1/pxt(ht), only for the realized token, not full-distribution perplexity. The potential is written as the logarithm of this quantity, i.e., the negative log probability of the realized token.
- Two definitions: The log-Lagrangian is Lt=ln(1/2|vt|2)+ln pxt(ht). The main text writes the conserved quantity as Et=1/2|vt|2·PPLt, with log-energy being the sum of log-kinetic and log-potential. Table 1's title instead writes Et = Kt + Vt, which is not the same notation as the product in the main text.
- Reason for taking logs: The authors state that squared velocity norms are mostly 10^3–10^4, post-training point perplexity mostly 1–10^2, untrained up to 10^4, so the additive classical energy would be kinetic-dominated. Post-training log-kinetic is about 7, log-potential mostly 0.2–2.5; untrained log-potential can reach 6–8, while log-kinetic changes little. Log-energy is roughly 7–9 (trained) to 10–15 (untrained).
Discrete equations of motion
- Stationary action: The action is the sum of Lt over steps. The authors derive discrete Euler-Lagrange equations, making the change in the velocity term determined by the gradient of the realized token's log probability.
- Force: The authors call this gradient a force, pointing in the direction that most increases that token's likelihood and decreases point perplexity. The authors state this is formally like gradient descent, but it couples hidden states to subsequent hidden states, not parameter updates; and state it is unclear why this coupling arises.
- Boundary: The derivative is undefined when vt = 0. The authors state this corresponds to degenerate behavior, e.g., repetitive output. The proof assumes displacement is small relative to state norm. Appendix D's theorem states that if the dynamics strictly satisfy the equation, then for infinitesimal perturbations of ht, the first-order change in log-energy is zero.
Adjacent attractor hypothesis
- Geometric picture: The hypothesis is that during generation, states move between adjacent semantic basins. Small velocity means staying in the current token's basin; large velocity means passing through transition regions of high point perplexity. The authors understand basins as tokens and their semantic neighborhoods, not just single tokens.
- Test: linear interpolation between adjacent hidden states, coefficients 0, 0.1 up to 1.0, recording the most probable token. The authors' rationale is that logits come from an affine transformation, so linear interpolation is a first-order approximation.
Jacobian steering
- Least-action direction: Among perturbations that increase the target token's log probability by a fixed amount, the authors prove the direction with the smallest action increment is parallel to that token's log-probability gradient. That gradient equals the target token's decoding row minus the weighted sum of decoding rows under the current distribution.
- Algorithm: Algorithm 1 starts from the current state, stops when the target token probability reaches threshold η, otherwise does a line search along the normalized gradient, at most K steps. The paper does not give the η and K used in experiments. The authors state only forward computation is needed, no backpropagation.
- What is evaluated: The experiment gives the top-10 token lists of steered and natural states to GPT-4.1, scored 1–10 for semantic quality. The abstract additionally states that the perturbation keeps energy approximately constant on the two tested models.
What experiments did the paper conduct?
Pretrained Global CV median 9.4%, random weights 2.2%; after steering, quality scores are higher than natural continuation.
Experimental setup
- Energy model: The main text says 20 checkpoints, five architecture families (Qwen, Llama, DeepSeek, Gemma, SmolLM), 135M–3B, each with pretrained and random weights. Table 1 prints 19 rows; no random-weight row for SmolLM2-1.7B is visible.
- Steering models: §E.3.1 writes SmolLM2-135M-Instruct and Qwen2.5-1.5B-Instruct. Table 3 row names lack the Instruct suffix. The judge model is GPT-4.1.
- Data: §2.2 writes that each model generates 100 trajectories on held-out Wikipedia and uses a fixed initial token sequence as context; D.3.1 writes 100 Wikipedia contexts per model, generating 100-token continuations. Steering uses the first 50 tokens of 50 Wikipedia openings.
- Metrics: Global CV, Avg. Traj. CV, Avg. Energy of energy, and K/V; local drift, absolute jump, and Energy Drift; number of unique tokens on interpolation paths; GPT-4.1 scores of 1–10, p-values, and Cohen's d.
- Implementation details: layernorm frozen when applicable, original hidden states used. The paper does not state which layer the hidden states are taken from, nor does it report the number of independent repetitions. Steering η and K are not reported.
Main results
The table below lists only part of Table 1, including the two rows with the highest Global CV. The energy column is that table's Avg. Energy; the table title writes Et = Kt + Vt. The main text instead defines the conserved quantity as the product of the velocity term and point perplexity, and describes the CV in the table below as the CV of that product.
Swipe horizontally to read the table
Model Pretrained Global CV Random Global CV Pretrained Avg. Energy Random Avg. Energy Gemma-3-1B 0.208 0.027 8.02 15.27 SmolLM2-360M 0.129 0.221 7.23 9.42 Qwen-2.5-3B 0.073 0.017 9.74 15.66 DeepSeek-R1-1.5B 0.110 0.018 9.00 15.53 SmolLM2-135M 0.117 0.031 7.36 12.91 SmolLM2-1.7B 0.103 not reported 8.00 not reported Llama-3.2-1B 0.085 0.020 9.16 15.32 SmolLM3-3B 0.092 0.022 9.71 14.56 - Median: The main text summarizes Global CV as a pretrained median of 9.4% (range 7.3–20.8%) and random weights 2.2% (range 1.7–22.1%). Table 1's Median row is 0.094 and 0.022; the corresponding medians for Avg. Traj. CV are 0.023 and 0.005. The authors state that 17/20 Global CVs are below 13%; among the rows listed, those not below 0.13 are Gemma-3-1B pretrained and SmolLM2-360M random weights.
- Two intervals: Table 2's Mean K/V Ratio is 11.8 pretrained and 0.89 random weights. The main text roughly writes 12 and 0.9. The authors state that pretrained models are kinetic-energy dominated with lower point perplexity, while random weights are closer to balanced; training trades higher energy variation for faster prediction. The authors use a golf-ball dimple analogy: the absolute dimple depth is unchanged, and relative fluctuation grows after the background potential drops.
- Not listed in the table above: Qwen-2.5-1.5B (Global CV 0.081 / 0.022) and Llama-3.2-3B (0.084 / 0.022). The authors state that after training energy clusters at 8–10 and untrained at 12–16; in Table 1, SmolLM2-360M random weights have Avg. Energy 9.42, which is not in the latter interval.
Local conservation and scale
- What was measured: Appendix G computes stepwise energy differences on the D.3 trajectories. Table 4 gives medians per group.
- Results: Pretrained mean drift 0.0002, mean absolute jump 0.012, Energy Drift 0.016; random initialization 0.005, 0.045, 0.041 respectively. The authors state that stepwise jumps are more than three times smaller than random weights, and that conservation also holds locally.
- Scale: Table 5 gives only the HuggingFaceTB family: parameter count vs. Energy Drift Pearson r = 0.9996 (p = 0.0181), parameter count vs. Efficiency r = −0.9986 (p = 0.0340). The main text describes the former r as the correlation between parameter count and power efficiency, inconsistent with the table's row name. The authors state that other families show similar trends, without giving correlation coefficients. The formula for Efficiency is not written in the visible text.
Distribution quality of steering
The protocol is to make the steered distribution match Wikipedia's true tokens, then have GPT-4.1 score the top-10 lists. The abstract says continuation quality; §E.3 evaluates the top-10 distribution. Figure 1's caption states that the steered distribution scores higher on Qwen2.5-1.5B-Instruct; the points in the figure are not visible in plain text.
Swipe horizontally to read the table
Model (Table 3) Natural Mean Steered Mean p-value Cohen's d SmolLM2-135M 4.84 ± 2.92 7.61 ± 2.69 < 0.001 0.99 Qwen2.5-1.5B 7.33 ± 2.65 8.22 ± 1.90 0.028 0.39 - Authors' interpretation: The authors state that the steered distribution's quality is not lower than natural continuation; the small model shows a large effect, the larger model a smaller effect, with p < 0.05. The authors state that the small model's natural distribution is less confident, so it benefits more; and that Wikipedia's true tokens tend to be more informed than model sampling.
- Energy: The abstract states that energy remains approximately constant on the two tested models. The main text does not give the energy CV for this experiment.
Adjacent attractors
- What was measured: linear interpolation between adjacent hidden states, counting unique tokens appearing on the path.
- Results: Appendix C.5 writes pretrained mean 2.9 ± 0.11, random initialization 3.6 ± 0.14. Main text §3.3 also writes that pretrained typically passes through 2–3 tokens, pointing to Appendix Table A.1; the visible text has no per-model numbers for that table. The statistical meaning of ± is not stated in the paper.
- Authors' interpretation: The authors state that pretrained trajectories are narrower and basins more adjacent, random models' basin boundaries less clear; training tightens the attractor structure.
Other ablations and analyses
- §4.3 writes Gemma trained CV = 12%, untrained = 0.4%; in Table 1, Gemma-3-1B's Avg. Traj. CV is 0.126 and 0.004, Global CV 0.208 and 0.027. The paper does not state which column 12% and 0.4% correspond to.
- Appendix F writes power estimates: random about 0.022×15≈0.33, trained about 0.094×9≈0.85. This is the authors' estimate using CV and mean energy, not a per-model measurement table.
- The authors state that the additive classical energy CV often exceeds 50%; the visible text has no per-model table for this claim.
- Appendix F states that the entropy landscape of random weights is flatter, and after pretraining deep narrow low-entropy wells appear; no numerical entropy table is given.
- The authors state that the product energy can be used without fitting parameters.
What are some points that can be further explored?
The authors state that results only cover up to 3B and English tokenizers; larger models and multilingual settings have not been tested.
Limitations and future directions noted by the authors
- Scale and language: Results cover up to 3B parameters and English tokenizers; extension to larger models and multilingual settings has not been tested (§4.3).
- Architecture differences: The Gemma anomaly in Table 1 suggests architecture choices have an impact; the authors report trained CV = 12%, untrained = 0.4% (§4.3).
- Future design: The authors state that future work should explore whether conservation laws can guide safer architectures, and training procedures that preserve useful invariants (§4.3).
- Source of coupling: The authors state it is unclear why the coupling between hidden states and future hidden states arises, and list this as a future research direction (Appendix C.4).
- Whether conservation is useful: Whether conservation enhancement is helpful remains an open question; the authors state that the current trend is that as capability increases, conservation decreases (Appendix D.4).
Experimental coverage
- Energy experiments: The main text reports 20 checkpoints, five architecture families, 135M–3B, pretrained and random weights; 100 Wikipedia trajectories per model, with D.3.1 writing 100-token continuations (§2.2, D.3.1). Table 1 prints 19 rows, with no random-weight row for SmolLM2-1.7B.
- Steering: Two Instruct models, 50 prompts, first 50 tokens each, GPT-4.1 scoring top-10 (§E.3, Table 3). The paper does not report η, K, nor the energy CV for this experiment.
- Local and scale: Table 4 is grouped medians; Table 5 gives only two Pearson correlations for the HuggingFaceTB family. The authors state other families show similar trends, without giving numbers.
- Interpolation: Appendix C.5 gives cross-architecture means of 2.9 ± 0.11 and 3.6 ± 0.14. The Table A.1 referenced in the main text does not have per-model numbers in the visible text.
- Discussed but no experimental results: Anomaly detection, using conservation for control robustness, and using conservation as an architectural regularizer (§4.2, Appendix D.4). The paper does not report which layer hidden states were taken from, nor the number of independent repetitions.
Summarize the main content of the paper
Hidden-state energy is approximately conserved; median global CV of 2.2% for random weights and 9.4% for pretrained.
The authors describe transformer inference hidden states with logarithmic variational mechanics and derive a least-action control from it.
- Question: how hidden states move with tokens, how this relates to certainty about the next token, and whether this relationship can be used for monitoring and low-risk control.
- Approach: velocity is the difference between adjacent hidden states; point perplexity is the reciprocal of the realized token's probability. The main text writes energy as half the squared velocity norm times this perplexity, and uses a log-Lagrangian to balance the scales of the two. Jacobian steering modifies hidden states along the target token's log-probability gradient.
- Conservation: The main text states that this energy is approximately conserved across 20 checkpoints (135M–3B, pretrained and random weights, Wikipedia continuation). Random-weight Global CV median 2.2% (range 1.7–22.1%), pretrained 9.4% (range 7.3–20.8%). Table 1's corresponding medians are 0.022 and 0.094. The table title writes energy as the sum of kinetic and potential, with mean energy around 7–16, which is not the same notation as the product in the main text.
- Training-induced differences: Table 2's mean K/V is 11.8 pretrained, 0.89 random weights. The authors state training makes models faster and more decisive, loosening conservation. In Table 4, pretrained stepwise mean drift is 0.0002, random initialization 0.005.
- Control: In Table 3 (N=50), GPT-4.1's mean scores for top-10: SmolLM2-135M from 4.84±2.92 to 7.61±2.69 (Cohen's d = 0.99), Qwen2.5-1.5B from 7.33±2.65 to 8.22±1.90 (d = 0.39, p = 0.028).
- Authors' conclusion: The authors state transformers approximately obey this conservation law, enabling energy monitoring and control that respects the structure; and state that in such control, alignment and capability can reinforce each other. The authors also state that results only cover up to 3B and English tokenizers.