Physics-Informed Trajectory Constraints in Transformer Residual Streams

We investigate whether physics-informed trajectory constraints—soft penalties borrowed fromthe PINN framework—can be imposed on a transformer language model’s residual stream duringtraining without degrading language modeling performance. We attach a lightweight scalar readout head to the residual stream and penalize trajectories that violate specified dynamical laws: monotonicity (the readout can only increase) and exponential decay (the readout fadesbetween events). Across 66 training runs spanning two datasets (TinyStories, WikiText-103),two model scales (10.8M, 25M parameters), and four conditions (vanilla, multitask, monotone,decay), we find that trajectory constraints cost 0–1.9% perplexity, with the cost shrinkingalong both scale and training duration. Constrained models exhibit expanded representationaldimensionality (+20–37% PCA participation ratio), achieve target recoverability r 15 2 > 0.90across constraint types, and—most strikingly—preserve features that unconstrained trainingspontaneously develops and then degrades. Our results establish PINN-style trajectory constraintsas a viable, low-cost mechanism for imposing structural properties on transformer representationsat training time

Authors

Publication Details

Journal
Zenodo (CERN European Organization for Nuclear Research)
Published
2026-04-28
DOI
https://doi.org/10.5281/zenodo.19844326
Primary Topic
Machine Learning in Materials Science
Type
article
Field-Weighted Citation Impact
0.00
Controls
|||
ALL TIME
JAN
FEB
MAR
APR
MAY
JUN
JUL
AUG
SEP
OCT
article

Physics-Informed Trajectory Constraints in Transformer Residual Streams

Tristyn Meaux
Zenodo (CERN European Organization for Nuclear Research)
Machine Learning in Materials Science
article

Physics-Informed Trajectory Constraints in Transformer Residual Streams

Tristyn Meaux
article en

Abstract

We investigate whether physics-informed trajectory constraints—soft penalties borrowed fromthe PINN framework—can be imposed on a transformer language model’s residual stream duringtraining without degrading language modeling performance. We attach a lightweight scalar readout head to the residual stream and penalize trajectories that violate specified dynamical laws: monotonicity (the readout can only increase) and exponential decay (the readout fadesbetween events). Across 66 training runs spanning two datasets (TinyStories, WikiText-103),two model scales (10.8M, 25M parameters), and four conditions (vanilla, multitask, monotone,decay), we find that trajectory constraints cost 0–1.9% perplexity, with the cost shrinkingalong both scale and training duration. Constrained models exhibit expanded representationaldimensionality (+20–37% PCA participation ratio), achieve target recoverability r 15 2 > 0.90across constraint types, and—most strikingly—preserve features that unconstrained trainingspontaneously develops and then degrades. Our results establish PINN-style trajectory constraintsas a viable, low-cost mechanism for imposing structural properties on transformer representationsat training time

Zenodo (CERN European Organization for Nuclear Research)
Peace, Justice and strong institutions
Openalex Percentile: Top 9%
Machine Learning in Materials Science
AI Navigator

Ask Laika to Summarize, Analyze, and Connect papers live on the map.

Summarize Papers & Methodologies

Extract key findings, datasets, and comparative methods across publications.

Benchmark Rankings & Visual Analytics

Rank top research institutions, authors, funders, topics, and journals by Field-Weighted Citation Impact (FWCI) and paper volume with instant charts.

Connect Distant Disciplines

Bridge topological clusters on the map to find hidden collaborative intersections.