Cadence

Real-time AI modeled after animal and human brains.

Cadence learns from live experience. Its design is one continuing world model: acquire useful knowledge, settle actions through that knowledge, and repair it when experience reveals a mismatch.

The film / 7 minutes

Cadence in seven minutes.

A narrated tour of how the brain settles on an answer and learns locally from the result of each action. It ends with the few lines of code that build a brain of your own.

Cadence is open-source research software. Download the MP4

The difference

A new kind of AI.

Most of today's AI runs on transformers. Cadence follows the design of a brain.

Transformers

Trained first, then deployed frozen.

A typical deployed transformer keeps its learned weights fixed while computing outputs. Updating those weights requires an explicit learning procedure. Recurrent and online-learning variants exist; the comparison here concerns how an answer forms and how parameters change.

Cadence

Running and learning at once.

Signals loop through the brain until its parts agree on an answer. The same acquired brain carries context and durable knowledge through use. The goal is cheap familiar behavior, with local changes when witnessed outcomes reveal failed expectations or objectives. This selective repair and its cost require measurement.

Why Cadence

Built like a brain.
Made for a body.

A robot meets wear, new loads and places nobody trained it for. A brain that learns from experience can keep up with them.

On the job

It learns while it works.

A brain can acquire useful skills through initial experience, then keep those skills while it acts and learns from further outcomes.

Changed conditions

It adapts when things change.

A worn motor, a heavier load or a different floor changes what the robot senses. The design goal is to repair the affected knowledge while retaining useful skills.

On the machine

It learns on the robot itself.

Connections can change from local neural activity, without a backward computation graph. Whether learning fits a robot's compute budget is measured on that body.

Memory

It remembers.

A short-term memory carries the last few moments and a long-term memory keeps what mattered. Something experienced once can shape the next decision.

Settled answers

It checks whether its answer settled.

Cadence checks the whole neural graph before issuing an action and refuses if it cannot settle. A settled answer can still be wrong about the world; actual outcomes test it.

Inspection

You can see what it is doing.

The activity of every part of the brain can be read while it runs. The brain can also try out a response in imagination before the body commits to it.

Shown in simulation today in Rover Lab, Patch World and the Atari Arcade. Cadence is experimental research software, and a physical robot evaluation is the next test.

How it works

Many small parts.
One answer.

A brain has no central processor. Each cell does a small local job, and a decision is what the cells agree on. Cadence works on the same principle.

01

Small parts that read themselves.

Cadence is built from small units called patches. Bounded observer-like patches hold local state, receive signals through ports and expose readback. Persistent relations and records carry learned knowledge through the life of the brain.

02

They settle on one answer.

The patches correct their disagreements with each other until the whole brain settles. The settled state supplies the decision. The live loop carries context across decisions; each workload has its own measured response time.

03

Experience changes the connections.

An actual outcome can supply a local learning update. Bootstrap experience builds useful relations; further correction should address witnessed failure while retaining what works. The live loop uses arousal to choose between routine responses and learning from outcomes.

Acquire a world model, then live through it.

Bootstrap experience should build useful relations in one brain. During use, recent context stays live and durable knowledge persists. Familiar situations should settle with little additional work. When an actual outcome disagrees with an earlier forecast, or an objective fails, local repair should correct the affected relations while preserving other skills.

Cadence supplies continuing interaction, memory and local plasticity. Brain.live adds a first routine-and-repair loop for one stream, measured in one bounded chamber. Integrated learned world prediction, repair localized to what failed, broader retained capabilities and a measured cost advantage remain research goals. Numerical agreement is not agreement with reality, and mathematical energy is not electricity consumed. Read the continuing world-model guide ↗

An animal-like brain, with optional reflection.

The default brain perceives, remembers, acts and learns, as an animal's does. We call it System 1. An optional System 2 adds parts that observe a developed two-module System 1 and feed back into the same brain.

System 1 and System 2 name roles in software. Cadence takes its design principles from brains and makes no claim to copy biology in detail.

Compared with deep learning

Deep, without backpropagation.

A Cadence brain can have as many layers as a deep neural network. What differs is how an answer forms and how the brain learns.

A feed-forward reference network

One pass forward. Errors passed back.

Answering. A signal passes through the layers once, from input to output. A later layer never changes an earlier one.

Learning. Backpropagation carries derivatives of an output loss backwards through the layers. This reference separates training from use; other conventional systems can learn online.

Depth. More layers make both passes longer.

A Cadence brain

The whole brain settles.

Answering. Signals run in both directions. Each patch corrects its disagreement with its neighbours until the whole brain reaches an equilibrium. That settled state is the answer.

Learning. Teaching or real feedback can nudge neural activity. Local contrasts change retained connections without a backward computation graph. Finite teaching is available; qualified teaching explicitly checks its required phases.

Depth. More regions join the same settlement. Useful depth, retained learning and total repair cost are measured properties.

See it running

Watch it learn.

The demos run in your browser. Atari, Patch World and Rover Lab show live learning; AMEN plays from a learned checkpoint; Fish in the Matrix turns measured wiring into patch nets: teach the fish to hold its gaze and let it return on the same brain, or explore the larva's fixed circuit.

Two brains learn to play Atari games. Creatures learn and evolve in a simulated world. A rover relearns its own body after a wheel is weakened.

For engineers / Interactive explainer

Watch a network find its answer.

Explore the separate population solver: choose a layout, change the signal, and run settlement. Observers change what a patch reads; the prediction rule stays the same. Supplied sensory values remain fixed during repair.

Move the signal, then settle again.

Observer depth applies only with observers.

Enable JavaScript to explore the model. The explanation below describes the same mechanism.

Think of coordination and balance: several parts adjust together to find a consistent position.

Six patches in three populations, connected through states. There are no error-reading connections.

Feed-forward reference

Compute in one direction.

Use this pattern's relations in reading order, setting each state to its prediction. There is no joint repair.

Input → processing → further layers → output. A layer is not revised by later layers during this pass.
Forward output—
Population solver illustration

Settle the whole response together.

Later populations read earlier live states. Their constraints can change those states while the whole brain settles.

State-coupled: inputs → jointly settling populations. With observers: observers read live states and exact errors.
Current output C3—
Read connectionsState + error readbackReturning influenceEach pair is a population; all use the same patch rule.

Inspect a patch

Processing patch P0

Processing patches read the supplied sensory values.

State x
—
Prediction p
—
Error x − p
—

During this settlement

Repair steps
0
Shared objective
—
Stationarity
—
Accepted steps reduce the shared objective.

The objective combines prediction mismatch and an activity penalty. Stationarity measures remaining feasible repair, not task accuracy. A settled answer can retain prediction error.

Mechanism illustration of the population solver with fixed example weights and up to six scalar patches. Both layouts use the equations below and an activity penalty of 0.18. Switching layout changes wiring and resets activity; observer depth changes patch count. The forward reference uses the selected relations by forward substitution. This untrained illustration has no task-quality score and is not a speed or intelligence comparison or the full Cadence runtime.

What changes during settlement and learning?

For a query, weights and biases stay fixed while internal states settle. When the population solver admits an experience, supplied outcomes can constrain outputs and relation parameters can change too, anchored to their values before that experience. Both layouts use that learning API; this illustration keeps parameters fixed.

State connections let a later constraint revise an earlier state. Observers also bring exact prediction errors into that interaction. Returning arrows show influence through the objective's derivatives, not additional learned reverse edges. Changing the sensory signal retains activity; changing the layout resets it.

Observer depth, repair steps and prediction into the future are three different things.

Live operation guide ↗
The patch equations behind the illustration

predictionᵢ = tanh(biasᵢ + Σ weightᵢⱼ × signalⱼ)
errorᵢ = stateᵢ − predictionᵢ
objective = ½ Σ errorᵢ² + 0.18/2 × Σ stateᵢ²

A signal can be a supplied input, another patch's state or an observed prediction error. Predictions and errors are recomputed from the current state; errors cannot be adjusted independently to conceal disagreement.

The illustration uses bounded state updates, exact derivatives through the error readbacks and backtracking for objective decrease. It stops at its stationarity tolerance or a 240-step budget. The objective's numerical “energy” does not measure electrical energy.

The positive activity penalty matters. For the corresponding acyclic, unclamped model in the idealized zero-penalty limit, the stationary answer reduces to forward substitution. Positive penalties or output constraints allow a different compromise. That difference alone does not establish better task performance.

Read the full mathematical contract ↗
How this differs from backpropagation

A conventional network is trained by a backward pass that carries errors through every layer, usually offline over a dataset, and is then frozen for use. In Cadence's default brain local learning contrasts free and nudged neural activity. Finite supervised teaching is the default; qualified teaching checks every required phase. Reward eligibility has a separate finite-phase contract, and memory writes have their own rules. The brain keeps no backward computation graph.

Under stated symmetry, stable-branch and small-nudge assumptions the equilibrium contrast estimates the corresponding objective gradient. Networks trained by backpropagation can also be recurrent, online and memory-using; the comparison is of update mechanisms. What the brain acquires is measured through its free behavior.

Advanced engines, capability and cost

Cadence keeps specialized engines beside the main brain, each with its own contract. In the population solver, populations of patches settle one joint energy and observers read exact prediction errors; the interactive model above shows its equations. Record patches hold event records and consolidate them. A temporal model learns the consequences of actions and plans with them. The default Brain privately settles responses to supplied hypothetical observations; the separate temporal engine models action consequences. An integrated learned world model and selective cheap reuse require their own behavioral tests. Measure query latency and learning cost separately.

Optional System 2 adds observers to a developed two-module System 1 and uses the same live loop:

from cadence import ArousalConfig, Brain

recursive = Brain.compose(
    inputs=4, actions=2, modules=(16, 8), observers=(8,),
    arousal=ArousalConfig(),
)
action = recursive.live([[1.0, 0.0, 0.0, 0.0]])

For engineers / Build with Cadence

Start with the core.

Python 3.11 or later and NumPy. Accelerated backends are optional. Licensed under GPL-3.0-or-later.

python -m pip install cadence-net==0.78.0

Start one continuing creature. Replace these example observations and reward with outcomes from your environment.

from cadence import ArousalConfig, Brain

brain = Brain.compose(inputs=4, actions=2, arousal=ArousalConfig())
action = brain.live([[1.0, 0.0, 0.0, 0.0]])
# Supply the last action's outcome, then act again.
action = brain.live([[0.0, 1.0, 0.0, 0.0]], reward=[0.0])
print(action)

live handles the routine-and-repair loop: calm responses settle without learning; arousal admits learning from outcomes.

For robotics teams, the first step is one robot and one measurable problem.