# Cadence (brain-inspired AI) Cadence is an open-source Python library that builds a simulated brain out of simplified biological mechanisms. Its tagline: "One continuing equilibrium brain: learn a world, act in it, repair what fails." The author is Bernhard Mueller (`muellerberndt` on GitHub), the security researcher who wrote Mythril, the smart-contract analysis tool. It ships on PyPI as `cadence-net` under the [[GPLv3 License]]. Not to be confused with Uber's Cadence workflow engine. ## One brain, no training phase A standard network is trained once, frozen, then used; whatever it picks up afterwards has to live in a prompt or an external memory store. That's how [[Large Language Models (LLMs)]] work today. Cadence has no such split. There is ONE brain that lives through a stream of experience. Each call to `brain.step()` takes the reward for the previous action, updates the brain and picks the next action, with no separate training or inference mode. The docs describe the lifecycle as: bootstrap a useful interpretation of the world, operate with it, repair failures you actually witnessed, and keep the same brain instead of rebuilding it. ## How it works - **Settling.** Regions are connected in both directions, and their activity settles together until it reaches a stable state (an equilibrium) instead of flowing once from input to output. The answer is read from that settled state, so later regions can reshape earlier ones while it forms. If the equations don't settle within the configured tolerance, the brain refuses to act. - **Local learning, no [[Backpropagation]].** Each connection compares its activity in a "free" phase with its activity in a phase nudged toward the right answer, and updates from that local difference. This is what the literature calls equilibrium propagation (Scellier and [[Yoshua Bengio|Bengio]], 2017), a local update in the spirit of [[Donald Hebb]]'s "neurons that fire together, wire together". Under ideal conditions (smooth equilibrium, symmetric weights, a vanishingly small nudge) it recovers the gradient backprop would compute. - A working trace carries recent activity, and a fast and a persistent associative memory store cue/outcome pairs from the actions the brain actually took. Capacity is finite, and the docs warn that new learning can interfere with old recall. - **System 1 and System 2**, named after [[Daniel Kahneman]]'s [[System 1 and System 2 Thinking]]. System 1 is the default "animal-like" brain: perception, plastic connections, memory and action. System 2 adds "observer" regions that watch the base brain and feed influence back into the same settlement, which the repo calls self-observation and slow corrections. - `brain.imagine()` runs observations through a private copy of the trace, so you can see how the brain would respond without touching its live memory or pending feedback. Mueller ties it to one of his physics projects, Observer Patch Holography, which uses the same principle: local patches repair their disagreements until the whole network is consistent. ## Status: alpha The README calls Cadence alpha research software. The repo was created on September 7, 2026, and PyPI got 39 releases in four weeks (0.1.0 to 0.74.0 on October 4, 2026). It has about 350 stars, and Mueller wrote nearly all of the ~470 commits. The examples are toy tasks with four inputs and two actions. A learned model of how the world changes and automatic repair triggered by failures are still listed as development goals. The docs are careful about their own claims. They say a converged equation is not evidence of a correct answer, that recurrent networks trained with backprop can also learn online and use memory, and that any claim of beating [[Transformers]] on capability or efficiency "must be established with matched comparisons". LLMs handle continual learning (learning after deployment without forgetting) by stuffing things into the [[Context Window|context window]]; Cadence puts the learning in the weights instead, and nothing in the repo shows yet whether that works beyond toy tasks. ## References - Repository: https://github.com/muellerberndt/cadence - Website: https://floatingpragma.io/cadence/ - Canonical guide, "One continuing equilibrium brain": https://github.com/muellerberndt/cadence/blob/main/docs/world-model.md - Comparison with backprop networks: https://github.com/muellerberndt/cadence/blob/main/docs/concepts.md#compared-with-backprop-networks - Paper (PhilPapers): https://philpapers.org/rec/MUECAP-2 - PyPI package: https://pypi.org/project/cadence-net/ - Application demos: https://github.com/muellerberndt/cadence-demos - Related physics project, Observer Patch Holography: https://github.com/FloatingPragma/observer-patch-holography - Release history: PyPI JSON API and GitHub API (repo metadata, contributors), checked October 4, 2026 ## Related - [[System 1 and System 2 Thinking]] - [[Daniel Kahneman]] - [[Donald Hebb]] - [[Neural Networks (NNs)]] - [[Deep Learning]] - [[Backpropagation]] - [[Reinforcement Learning (RL)]] - [[Embodied Cognition]] - [[Transformers]] - [[Large Language Models (LLMs)]] - [[Python]] - [[GPLv3 License]] - [[John Hopfield]] - [[Connectionism]]