Physics of Learning: A Lagrangian perspective to different learning paradigms

Siyuan Guo, Bernhard SchölkopfSubmission to ICLR 2026 · Rejected

TL;DR

This paper proposes a unifying physical framework for machine learning based on Hamilton's Principle of Least Action. By postulating a "Learning Lagrangian" where potential energy corresponds to loss/likelihood and kinetic energy is governed by the Fisher information metric, the authors show that Bellman’s optimality equation in reinforcement learning, A-optimal experimental design, and the Adam/RMSprop optimizers can all be derived from first principles as stationary trajectories.

What Problem Does This Paper Address?

Despite the dramatic success of modern deep learning across supervised learning, reinforcement learning (RL), and generative modeling, the field largely advances via scale-first heuristics and trial-and-error engineering. Machine learning lacks an overarching, first-principles foundation that explains when, why, and how learning emerges across seemingly disparate paradigms.

The authors address this theoretical gap by asking: Can learning be formalized as a physical law of motion? Specifically, can we treat learning as an optimization of an information trajectory that minimizes physical action or travel time through an information space?

Methods

The authors map concepts from kinematics and analytical mechanics directly into learning theory:

  • Kinematics of Information: Position is defined as cumulative Shannon information $I(s_{\le t}) = -\log p(s_{\le t})$. Instantaneous velocity $v(t)$ represents per-token loss $-\log p(x_t \mid x_{<t})$, and acceleration $a(t)$ is the second difference in loss across sequence position.
  • Fermat's Principle of Least Time: Formulating efficient learning as reaching a target generalization error threshold $\delta$ using the minimum number of observations ($T = \min_s \int dt$). In linear regression, optimizing this objective yields an analytical observation path.
  • Hamiltonian Mechanics in RL: In reinforcement learning, the authors set up the Lagrangian where path cost is replaced by reward $r(s, a)$ and transition dynamics act as kinematic constraints. Applying the calculus of variations directly recovers Pontryagin-style conditions and the classic discrete Bellman optimality equation.
  • Field-Theoretic Learning Lagrangian: For parameter estimation and generative models, the authors define a Lagrangian density: $$\mathcal{L}(\ell, \nabla_\theta \ell) = \frac{1}{2P} (\nabla_\theta \ell)^\top F(\theta)^{-1} (\nabla_\theta \ell) - \ell(\theta; x)$$ where $\ell(\theta; x)$ is the log-likelihood (potential energy) and kinetic energy is quadratic in the loss gradients weighted by the inverse Fisher Information Matrix $F(\theta)^{-1}$. Stationary paths of this action satisfy the Euler-Lagrange equations, yielding parameter updates of the form $\dot{\theta} = F^{-1/2} \nabla_\theta \ell$.

Datasets

  • OpenWebText: Evaluated small-to-large language models (gpt2, gpt2-medium, gpt2-large, gpt2-xl) to measure test-time in-context learning velocity and acceleration across token positions.
  • No new benchmark datasets were introduced.

Key Insights and Ideas

  • Learning is a Deceleration Process: Because test generalization error is bounded below by irreducible data entropy, learning curves naturally behave as non-increasing functions that decelerate toward an infimum ($\Delta \ell_t \le 0$).
  • Optimal Learning Requires Multi-Step Planning: In parametric linear regression under unit-norm spherical data, the optimal data path requires $X^\top X = \frac{n}{p} I_p$. Because a single rank-1 sample update cannot maintain this condition, achieving the least-action path requires planning in blocks of $p$ samples ahead.
  • Adam and RMSprop as Physical Equations of Motion: The update rule $\dot{\theta} = F^{-1/2} \nabla_\theta \ell$ derived from the stationary trajectory of the postulated Lagrangian matches the preconditioned gradient updates in RMSprop and Adam (which approximate $F$ using a running diagonal of empirical squared gradients).
  • RL as the Legendre Transform of Supervised Learning: The authors hypothesize that reinforcement learning corresponds to the Legendre transform of parameter estimation tasks under adaptive gradient optimization, sharing the same underlying stationary solutions.

Key Results

  • A-Optimality Recovery: Minimizing observation time in linear regression analytically reaches the minimal generalization error $\min_x \epsilon(x) = \sigma^2 + \sigma^2 \frac{p}{n}$, proving that $n=p$ samples are required to reach $2\sigma^2$ (via an orthogonal matrix $Q$) and $n=2p$ samples to reach $1.5\sigma^2$ (via a Stiefel matrix).
  • Empirical Validation of Kinematics: On OpenWebText, across all tested GPT-2 variants, per-token loss $v(t)$ consistently decreases with context length while in-context acceleration $a(t)$ approaches zero from below, validating the "deceleration" framing.

Limitations and Future Work

  • Idealized Assumptions: The analytical path derivation relies heavily on strict linear regression assumptions (unit-norm spherical inputs, classical $n \ge p$ regime), which do not capture overparameterized or non-convex deep learning regimes.
  • Approximations in Practice: True Fisher information and generalization errors are inaccessible during training; practical algorithms (like Adam) rely on diagonalized, empirical approximations whose exact equivalence to the theoretical Lagrangian path remains an open question.
  • Information Equivalence Across Samples: The framework treats each observation step as carrying comparable information content, leaving heterogeneous sample difficulty for future study.
  • Experimental Verification: The paper is primarily a theoretical and conceptual proposal; broader empirical verification across complex deep learning models is left to future community effort.

Summary updated

Abstract

We study the problem of building an efficient learning system. Efficient learning processes information in the least time, i.e., building a system that reaches a desired error threshold with the least number of observations. Building upon least action principles from physics, we derive classic learning algorithms, Bellman's optimality equation in reinforcement learning, and the Adam optimizer in generative models from first principles, i.e., the Learning $\textit{Lagrangian}$. We postulate that learning searches for stationary paths in the Lagrangian, and learning algorithms are derivable by seeking the stationary trajectories.
BibTeX
@misc{guo2025physics,
  author = {Siyuan Guo and Bernhard Schölkopf},
  title = {{Physics of Learning: A Lagrangian perspective to different learning paradigms}},
  year = {2025},
  eprint = {2509.21049},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2509.21049},
}
Figure