Search arXivSearch

arXiv · 2604.07867

Stochastic Thermodynamics for Autoregressive Generative Models: A Non-Markovian Perspective

Abstract

Autoregressive generative models -- including Transformers, recurrent neural networks, classical Kalman filters, state space models, and Mamba -- all generate sequences by sampling each output from a deterministic summary of the past, producing genuinely non-Markovian observed processes. We develop a general theoretical framework based on stochastic thermodynamics for this class of architectures and introduce the entropy production, which can be efficiently estimated from sampled trajectories without exponential sampling cost, despite the non-Markovian nature of the observed dynamics. As a proof-of-concept experiment with a large language model (LLM), we evaluate the entropy production for a pre-trained Transformer-based model, GPT-2. We find that the token-level entropy production is dominated by a syntactic artifact, while the sentence-level entropy production tends to be larger for causally ordered than for non-causal text sets. This observation is supported by a re-evaluation with a substantially larger model, Qwen3-4B-Base. We also demonstrate the framework in the linear Gaussian case, where the model reduces to the Kalman innovation representation and the entropy production admits an analytical expression. We also show that the entropy production decomposes exactly into non-negative per-step contributions in terms of retrospective inference, and each of those terms further splits into information-theoretically meaningful terms: a compression loss and a model mismatch. Our results establish a bridge between stochastic thermodynamics and modern generative models, and provide a starting point for using irreversibility as a quantitative probe of the highly non-Markovian processes generated by models such as LLMs.

Explore related subjects

Keep this discovery

Explore connections, maps & timelines

BibTeXRIS

Takahiro Sagawa. 2026-09-14. Stochastic Thermodynamics for Autoregressive Generative Models: A Non-Markovian Perspective. https://arxiv.org/abs/2604.07867

Cite the original work for its findings. Save a collection to share your selection of sources.

KEEP EXPLORING

Related papers

The meaning of entropy (demonstration of a much needed theorem)

The association of information with entropy has been argued on plausibility arguments involving the operation of imaginary engines and beings, and it is not a universal theorem. In this paper, a theorem by Charles Bennett on reversible computation that associates entropy with erasure of information is recognized as this much needed theorem. It is proposed a real, non thermal engine, operated by humans. It is proved: (1) The engine obeys two laws, identical {\it mutatis mutandis} to the two laws of thermodynamics; therefore, the entropy that arises in the operation of the engine has the same meaning of the entropy that arises in the operation of thermal engines. (2) The engine operates in stages similar to the stages in Bennett's three tapes reversible computer; therefore the entropy in the engine has the same meaning of the entropy in computation. The conclusion is that also the thermal entropy is a measure of erased or missing information. As a side result, information is measured in physical units, which complies with Landauer's principle. A prototype at work is shown in video.

cond-mat.stat-mech

Information geometry of perturbed gradient flow systems on hypergraphs: A perspective towards nonequilibrium physics

This article serves to concisely review the link between gradient flow systems on hypergraphs and information geometry which has been established within the last five years. Gradient flow systems describe a wealth of physical phenomena and provide powerful analytical technquies which are based on the variational energy-dissipation principle. Modern nonequilbrium physics has complemented this classical principle with thermodynamic uncertaintly relations, speed limits, entropy production rate decompositions, and many more. In this article, we formulate these modern principles within the framework of perturbed gradient flow systems on hypergraphs. In particular, we discuss the geometry induced by the Bregman divergence, the physical implications of dual foliations, as well as the corresponding infinitesimal Riemannian geometry for gradient flow systems. Through the geometrical perspective, we are naturally led to new concepts such as moduli spaces for perturbed gradient flow systems and thermodynamical area which is crucial for understanding speed limits. We hope to encourage the readers working in either of the two fields to further expand on and foster the interaction between the two fields.

cond-mat.stat-mech

Anomalous diffusion and singular transport from hydrodynamic recoupling

In charge neutral fluids, such as the Dirac fluid in graphene at the Dirac point, charge transport remains diffusive despite the presence of ballistically propagating sound waves: sound waves ``hydrodynamically decouple'' from the slower charge fluctuations. For quasi-one-dimensional charge neutral fluids, we show that this convective charge diffusion is not smoothly connected to the normal diffusion that arises when momentum conservation is broken by noise (or static impurities). Instead, the charge diffusion constant is a discontinuous function of noise, which (in the weak-noise limit) depends only on the ratio of momentum and energy relaxation rates. In the special limit of momentum-conserving noise (e.g., spatially uniform fluctuations of the Hamiltonian), the diffusion constant diverges in the presence of noise. We describe the resulting superdiffusion in terms of coupled Burgers equations. We present a general mechanism---hydrodynamic recoupling---by which weak noise can induce singular changes in transport coefficients. Our results highlight the limits of zero-noise extrapolation for predicting dynamical quantities like diffusion constants.

cond-mat.stat-mech