The Lagrangian Brain: A Constraint Mechanics of Mind and Machine

Yuhang He, Si WuarXiv 2026 · arXiv

TL;DR

The "Lagrangian Brain" hypothesis proposes that the brain operates as a physical system enforcing constraints through Lagrange multipliers. By mapping biological components—like inhibitory interneurons and synapses—to these mathematical multipliers, the authors unify diverse neuroscience phenomena (e.g., E/I balance and brain rhythms) and build a gradient-free "multiplier network" that dramatically outperforms Transformers and LSTMs on complex reasoning and planning tasks.

What Problem Does This Paper Address?

A fundamental mystery in neuroscience is how the "absent" acts on the "present." At any given moment, a brain is in one state, yet its next state is determined by things not currently present: the grammar of a language, a goal miles away, or the statistics of a lifetime of experience.

Current AI and neuroscience often treat these influences as separate modules (attractors for memory, feedback for goals, etc.). This paper seeks a "theory of principle"—similar to Einstein’s approach to physics—that derives all these phenomena from a single underlying law of mechanics.

Methods

The authors propose that everything a neural circuit knows or wants is a constraint on its state. They borrow from classical mechanics, where a bead on a wire is constrained by a force that only appears when the bead presses against the wire.

Mathematically, they model this using the saddle flow of a Lagrangian.

  1. State ($x$): Represented by excitatory neuron activity. The state "climbs" the Lagrangian.
  2. Multipliers ($\theta$): Represented by interneurons, synapses, and feedback. Multipliers "descend" the Lagrangian, integrating constraint violations and pushing the state back into the "allowed" region.
Figure 1. The Lagrangian brain. (a) A circuit is in one state at a time, and what decides its next state is mostly absent from it. (b) Each absent thing enters as a constraint, a wall of the region that knowledge allows, and acts through a multiplier that integrates the violation and pushes the state back. In a brain the multiplier has a time constant, a wall with inertia (right): pressed by the drive, its force grows, overshoots and settles at the value that holds the state on the wall. (c) The carriers in cortex: pyramidal cells hold the state; basket and Martinotti cells carry prohibitions; synapses carry experience; apical feedback carries the costate of a goal. (d) The time constant of the multipliers orders three accounts of intelligence.

A key innovation is the Dictionary, which maps specific biological mechanisms to different types of constraints across time scales:

  • Prohibitions (what never happens): Carried by fast-acting basket cells (gamma rhythm) and integrating Martinotti cells.
  • Experience (statistics): Carried by plastic synapses.
  • The Future (goals): Carried by apical dendrite feedback.
Figure 2. The dictionary across time scales. Each kind of multiplier (left: its constraint and a drawing of its carrier) is placed at the time constant of its carrier. Basket cells carry prohibitions within a gamma cycle and Martinotti cells integrate them; inhibition with disinhibition (VIP onto SST cells) holds invariants; adaptation carries occupancy over a percept; apical feedback carries a goal over one plan; synapses carry experience over days; a normalization pool and adenosine hold budgets. Grey columns mark the periods of brain rhythms, which appear where a multiplier turns with the state (Theorem 3).

Datasets

The authors evaluated their "multiplier network" on several challenging reasoning benchmarks:

  • Sudoku-Extreme: A massive dataset of 422,786 of the hardest known Sudoku puzzles.
  • Maze-Hard: A path-planning task requiring the discovery of shortest paths.
  • State Tracking ($S_5$): Tracking the product of permutations in the symmetric group $S_5$, a classic test for sequence modeling.
  • Planted Worlds: Synthetic environments with hidden logical rules used to test rule discovery.

Key Insights and Ideas

  • Knowledge as Prohibitions: The authors argue that a good theory "forbids certain things to happen." Learning is the process of discovering these minimal forbidden patterns.
  • Sleep as Conjecture, Waking as Refutation: In this model, sleep is a "free phase" where the brain dreams up potential laws (strengthening inhibition), and waking is a "clamped phase" where the real world refutes false laws (weakening inhibition).
  • Rhythms are Multipliers "Turning": Brain rhythms (like gamma and theta) aren't just noise; they are the dynamical result of the state pressing against a constraint and the multiplier pushing it back.
  • Time is Depth: Unlike fixed-depth Transformers, a multiplier network runs until it reaches a rest point. This allows it to solve problems of arbitrary complexity by simply running longer, providing a natural mechanism for "depth on demand."

Key Results

The multiplier network achieved state-of-the-art results without using gradients or backpropagation:

  • Sudoku-Extreme: Solved 99.99% of the 422,786 puzzles. For comparison, the best reasoning models trained with gradient descent typically reach ~98.75%.
  • Maze Planning: The network planned shortest paths in mazes 64 times larger than those it was trained on, achieving 100% accuracy.
  • Length Generalization: On the $S_5$ state-tracking task, the network was trained on strings of length 40 and remained 100% exact on strings of length 1000. Transformers and LSTMs failed completely at these lengths.
Experimental results showing the network's performance on Sudoku, mazes, and state tracking.

Limitations and Future Work

  • Constraint Types: The current work focuses on constraints that are "closed under omission" (logical prohibitions). Extending this to more continuous, high-dimensional data like natural images or raw audio remains a future challenge.
  • Scaling: While the network is highly efficient for logic tasks, the computational cost of maintaining a multiplier for every potential constraint in a massive-scale system needs further exploration.
  • Biological Verification: The paper makes ten specific, testable predictions for neuroscientists (e.g., regarding the reciprocity of interneuron wiring), which require experimental validation in living tissue.

Summary updated

Abstract

A brain is in one state at a time, yet most of what decides its next state is absent from it: the patterns its world never produces, the statistics of a lifetime, a goal that lies ahead. In mechanics a wire acts on a bead only through a force that appears when the bead presses on it, and Lagrange computed such forces with one multiplier for each constraint. We propose that a brain follows the same mechanics. Everything a circuit knows, is told or wants is a constraint on its single state and acts through its own multiplier, which accumulates the violation and pushes the state back. Neurons and synapses carry the multipliers, each with its own time constant: inhibitory interneurons carry what never happens, adaptation the cost of staying in one state, synapses the statistics of experience, and feedback to apical dendrites the future. From this hypothesis follow Dale's law, the reciprocal wiring and balance of excitation and inhibition, the paradoxical responses of cortex and the frequencies of brain rhythms. Belief becomes the time one trajectory spends in each state, learning becomes sleep proposing laws and waking refuting the false ones, and planning becomes a wave from the goal meeting a wave from the present. Connectionism and symbolism are the limits of frozen and of instantaneous multipliers, and between them the time a circuit runs becomes the depth of its computation. A machine built on these principles, trained without gradients on 1000 solved puzzles, solves all 422,786 Sudoku-Extreme test puzzles with one trajectory each. It rediscovers the rules of Sudoku by sleeping and waking, plans shortest paths in mazes of 64 times the training area, and tracks permutations exactly on strings 25 times longer than in training, where Transformers fail. A mind, on this view, is life that learns its own constraints.
BibTeX
@misc{he2026lagrangian,
  author = {Yuhang He and Si Wu},
  title = {{The Lagrangian Brain: A Constraint Mechanics of Mind and Machine}},
  year = {2026},
  eprint = {2611.10737},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2611.10737},
}
Figure