cs.AINov 7, 2026

The Lagrangian Brain: A Constraint Mechanics of Mind and Machine

Authors: Yuhang He, Si Wu

Organizations: School of Psychological and Cognitive Sciences, Peking University · IDG/McGovern Institute for Brain Research, Peking University · Peking-Tsinghua Center for Life Sciences, Academy for Advanced Interdisciplinary Studies, Peking University · Center of Quantitative Biology, Peking University · 

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.

Figures & tables

Appendix figures & tables15 assets

Supplementary material from the paper’s appendix.

Appendix

Explore similar work

CardsList
  1. How Finite Brains Generalize Without Bound: Spatial Memory as a Universal Computer

    Nov 5, 2026Yuhang He, Si WuLength GeneralizationRecurrent Neural Networks

  2. A Variational Latent Equilibrium for Learning in Neuronal Circuits

    Mar 10, 2026Simon Brandt, Paul Haider, Walter Senn +2Temporal Credit AssignmentNeural Network Training Dynamics

  3. Every route counts, but some count more: a max-plus view of the C. elegans brain

    Oct 27, 2026Emma Reyner-Fuentes, Sebastian Rudolph, Carmen Peláez-Moreno +1Brain Network AnalysisFunctional Connectivity