Momentum Point-Perplexity Mechanics in Large Language Models

Fuente: arXiv
Saved in:
Bibliographic Details
Main Authors: Tomaz, Lorenzo, Rosenblatt, Judd, Jones, Thomas Berry, de Lucena, Diogo Schwerz
Format: Preprint
Published: 2025
Subjects:
Online Access:
Tags: Add Tag
No Tags, Be the first to tag this record!
_version_ 1866912532910833664
author Tomaz, Lorenzo
Rosenblatt, Judd
Jones, Thomas Berry
de Lucena, Diogo Schwerz
author_facet Tomaz, Lorenzo
Rosenblatt, Judd
Jones, Thomas Berry
de Lucena, Diogo Schwerz
contents 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.
format Preprint
id arxiv_https___arxiv_org_abs_2508_08492
institution arXiv
publishDate 2025
record_format arxiv
spellingShingle Momentum Point-Perplexity Mechanics in Large Language Models
Tomaz, Lorenzo
Rosenblatt, Judd
Jones, Thomas Berry
de Lucena, Diogo Schwerz
Computation and Language
Artificial Intelligence
Machine Learning
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.
title Momentum Point-Perplexity Mechanics in Large Language Models
topic Computation and Language
Artificial Intelligence
Machine Learning
url https://arxiv.org/abs/2508.08492