← all repositories
muellerberndt/cadence

A brain that settles instead of backpropagating

Cadence is an alpha-stage Python library that builds a continuously learning, equilibrium-based 'brain' — no training loop, no backward pass, just a life.

★501 stars Python ML FrameworksAgents
cadence
Collecting fresh signals — velocity needs a few days of history.
collecting data…
star history

What it does

Cadence gives you a Brain object with a strikingly small interface: compose builds it, live runs it. You feed an observation, get an action, then feed back the measured reward with the next observation. There is no train/inference mode switch — learning, memory writes and exploration happen during the same continuing stream, gated by an arousal flag or the brain’s “youth” (its first 100 moments).

The interesting bit

The learning rule is equilibrium propagation, not backprop: the network settles to a fixed point, then settles twice more with outputs nudged toward and away from the target. The difference between those phases approximates the gradient — no backward differentiation pass through time. Regions are reciprocal, so later regions shape earlier ones while the answer forms, and a settling certificate tells you when the relaxation is actually trustworthy.

Key highlights

  • One continuing lifecycle: perception, plastic connections, associative memory and action in a single neural graph.
  • Optional System 2: observer regions that read and feed back into the same settlement — whether they help is left to experiment.
  • imagine() runs a private trace without touching live memory or pending feedback.
  • Brains can grow (brain.grow(recall=True), new output slots) and graft trained regions from other brains.
  • Refusal semantics: an action whose settle exhausts its budget is refused without corrupting live state.

Caveats

  • Explicitly alpha research software; integrated world prediction, localized repair and cheap stable operation are listed as work in progress.
  • The contrast learner’s gradient guarantee holds only in the smooth, symmetric-weight limit; the default activation’s kink at zero sits outside that argument.
  • The README is candid that the target (full-sentence language, reusable world understanding) is far away — small fixed-label tasks are controls, not the point.

Verdict

Worth a look if you’re curious about local, biologically-flavored learning or want a testbed for lifelong-learning experiments. Skip it if you need production-grade RL — this is a research instrument, and it says so.

Frequently asked

What is muellerberndt/cadence?
Cadence is an alpha-stage Python library that builds a continuously learning, equilibrium-based 'brain' — no training loop, no backward pass, just a life.
Is cadence open source?
Yes — muellerberndt/cadence is open source, released under the GPL-3.0 license.
What language is cadence written in?
muellerberndt/cadence is primarily written in Python.
How popular is cadence?
muellerberndt/cadence has 501 stars on GitHub.
Where can I find cadence?
muellerberndt/cadence is on GitHub at https://github.com/muellerberndt/cadence.

heatdrop uses Google Analytics to see which pages get read — nothing else. Your call. How we handle data.