Momentum Point-Perplexity Mechanics in Large Language Models

Lorenzo Tomaz, Judd Rosenblatt, Thomas Berry Jones, Diogo Schwerz de Lucena
8/11/2025
cs.CLcs.AIcs.LG

No confident code implementation found for this paper.

Abstract

We take a physics-based approach to studying how the internal hidden states of large language models change from token to token during inference. Across 20 open-source transformer models (135M-3B parameters), we find that a quantity combining the rate of change in hidden states and the model's next-token certainty, analogous to energy in physics, remains nearly constant. Random-weight models conserve this "energy" more tightly than pre-trained ones, while training shifts models into a faster, more decisive regime with greater variability. Using this "log-Lagrangian" view, we derive a control method called Jacobian steering, which perturbs hidden states in the minimal way needed to favor a target token. This approach maintained near-constant energy in two tested models and produced continuations rated higher in semantic quality than the models' natural outputs. Viewing transformers through this mechanics lens offers a principled basis for interpretability, anomaly detection, and low-risk steering. This could help make powerful models more predictable and aligned with human intent.

View on arXivView PDF

Code Implementations

No confident code match yet

We couldn't find an author-owned or strongly-evidenced community implementation for this paper. Any repos shown below are weak matches — verify before relying on them.

No code implementations found yet.

Know of an implementation? Let us know in the comments below!

Similar Papers

Cite this paper

@article{tomaz2025momentum,
  title  = {Momentum Point-Perplexity Mechanics in Large Language Models},
  author = {Lorenzo Tomaz and Judd Rosenblatt and Thomas Berry Jones and Diogo Schwerz de Lucena},
  year   = {2025},
  eprint = {2508.08492},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2508.08492v1}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2508.08492.svg)](https://codeofpaper.com/paper/2508.08492)

Discussion