Skip to main content

Cadence: connected patches with local state, readback and repair

Cadence

Website · Paper · PyPI · Documentation · Changelog

Research toward general intelligence through overlap consensus, equilibrium detuning and self-reflection.

Cadence's goal is a continuing learning system with the flexibility of animal and human problem solving: acquiring skills from experience, retaining useful knowledge, imagining alternatives and creating solutions across domains. The mission is to find the smallest persistent state and local update rule that can support these abilities. General intelligence is the research goal; the current library establishes bounded learning, memory and control results.

The organizing idea comes from Observer Patch Holography: bounded, observer-like patches with local state, ports, records, readback and repair. A disturbance exposes disagreement. The network can explore a possible response, test it against actual consequences and settle into a revised organization. We seek fewer mechanisms that solve more problems.

Three shared principles

  • Overlap consensus: patches repair disagreement across their shared boundaries. The resulting equilibrium is an internally consistent model; its predictions still have to agree with experience.
  • Equilibrium detuning: observed outcomes perturb that equilibrium. Local positive/negative contrasts change learned relationships; the same operation can adjust proposed actions while holding the model fixed.
  • Functional self-reflection: patches can read internal state, predictions, proposed actions and unresolved mismatches through ordinary ports. Learning which internal summaries to read, how to feed them back and how to grow useful recursive organization is a central research direction.

The current implementation provides detached self-readback and private proposal revision. Automatically learned recursive hierarchies, curiosity and reliable creativity remain to be demonstrated. Creativity and self-reflection defines these goals and their behavioral tests.

Equilibrium world models

Cadence is being developed toward evolving equilibrium world models: brains whose internal representation of an actor in its world grows more accurate and expressive through experience. The representation should carry what is happening, what persists out of sight, what the actor controls and what its actions could cause. It need not describe those relationships in words to use them.

An equilibrium here need not mean motionless activity. A skilled actor can follow a coherent, changing trajectory of perceptions, expectations and actions. When events unfold as expected, the carried state should already be close to a useful interpretation of the next moment. Familiar danger can prompt a learned response immediately. Extra inference is needed when competing interpretations or consequential choices warrant it.

The proposed mechanism is recursive composition through bounded, observer-like, self-reading patches. Scene, body, candidate action and retrieved experience meet through learned nonlinear ports. One interpretation can become input to another, allowing the system to revise its understanding before acting. Actual evidence anchors that revision; changing the interpretation and learning new relationships are distinct operations. A random outcome can require a new response while remaining consistent with a correctly learned probability distribution. Teaching detuning uses a specified target to compute a learning signal; it is not synonymous with surprise.

Skilled demonstrations and the actor's own actions supply complementary experience. Watching reveals useful behavior and situations; acting tests what controls actually cause. The same learned relationships should support private branches that explore possible futures without altering factual memory. Plans must be judged by subsequent real outcomes. Grounded replay and sleep should then consolidate reliable relationships and successful decisions into cheaper habits, while unfamiliar situations can reopen deliberation.

This is the architectural vision. Current APIs provide components and bounded demonstrations, not the complete evolving world model. Each successive release is intended to take a concrete step toward this goal. Progress must be shown in prediction, retention, useful internal planning and behavior at declared resource budgets; a new version alone does not establish it. The equilibrium world-model guide explains the mechanism, the distinction between evidence repair and learning, and the current implementation boundaries.

Current library

Two primitives, composed through ports, and the belief patch that composes them toward a world model. The library requires Python 3.11+ and NumPy:

python -m pip install cadence-net
Primitive What it supplies
The settling patch: TemporalPatchNet, or a brain of regions Local repair of observed paths, persistent context, private imagination, continuous planning and protected responses; learning by the contrast of a free and a nudged settle.
The record patch: RecordPatchNet A gated linear context with a record store inside the patch: an observation is written once by day, and by night the slow weights learn from the store's own dreams (sleep), with nothing outside the patch consulted. Categorical ports, batched writes, a store narrower than its port and a two-patch stack. One pass of writes, with no gradient, gives a small grammar for 0.8 of its never-taught combinations; one night lifts the slow weights alone to 1.0.
The belief patch: BeliefPatch A belief carried by a learned transition under the executed action and repaired by a few iterations of one nonlinear map with the record store read inside it; imagination that consumes no observation. The composition toward a learned world model, trained with the imagination loss so the transition carries the belief.

Start with the quickstarts: a record patch that learns a stream and sleeps, a settling brain that decides, and a temporal patch that learns a consequence and plans. The architecture guide maps each capability to its API and current scope; EquilibriumActor is a separate fixed linear-body component with exact Gaussian history compression.

Imagined continuations are isolated. Branches use the learned network without changing live activity, parameters or factual bookkeeping. Controlled experiments demonstrate useful planning. Creativity requires additional evidence that novel proposals satisfy meaningful constraints and survive actual evaluation; musical improvisation is one possible example.

Retained experience and new learning are tested together. Protected-path memory is conditional and finite. Importance is currently supplied; automatic relevance, selective forgetting, specialization and broad skill transfer remain research requirements. The task-design guide and common missteps explain how to measure them.

General mechanisms, different applications

Games, language, multimodal perception, embodied control and creative work should use the same learning and memory mechanisms with declared observation and action ports. The examples repository holds four worked applications: a worm that learns during its life, a composer that starts from silence, soft bodies that evolve together with their brains, and Connect Four. They are application tests, not definitions of the architecture. A result in one does not establish transfer to the others.

The scaling goal is better learned behavior from more experience and training, with as little manual design as possible. Measure unique experience, repeated training and model capacity separately while keeping port meanings and task evaluation fixed. The scaling guide defines these comparisons and the current computational limits.

Application demonstrations are published only when they establish their claimed behavior. Recall and interpolation are useful development tests; original creation requires stronger evidence. Every example states what is supplied, what is learned, what was measured and what it does not show, and carries a check that recomputes its numbers. Research receipts remain available with the paper without presenting those tests as finished products.

Proofs and compatibility

The bundled Lean library contains 169 checked conditional theorems about the mathematical components and their limits. It does not certify the complete Python implementation or prove intelligence. The paper identifies assumptions and reproducible evidence.

The PatchNet graph interface, GenericBrain, content memory, rehearsal and sequence readback are kept for the experiments that used them; they are distinct compositions, not parts of the two primitives. API reference.

Development installs use python -m pip install -e .. Optional backends apply to their documented graph APIs; the temporal implementation is NumPy. Pin a release or exact commit for reproducible work. MIT licensed.

Release files for cadence-net 0.13.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for cadence-net 0.13.0
File Size Uploaded
cadence_net-0.13.0.tar.gz 2.3 MB Details

Built distribution (wheel)

Table of built distributions (wheels) for cadence-net 0.13.0
File Interpreter ABI Platform
cadence_net-0.13.0-py3-none-any.whl Python 3 none any Details

Total release size: 2.5 MB

Release files / cadence_net-0.13.0.tar.gz

Download URL cadence_net-0.13.0.tar.gz
Size 2.3 MB
Tags Source
SHA-256 checksum
How to use checksums
fca493bcee2caab9f9bd32f14b8b985fe10b83356aefae681c3e59e65c8fdc49
BLAKE2b-256 checksum
How to use checksums
8a38af312a0753c9e6216cba1a046e7ab8a8a4735fbdb443eb94575799dc2433
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.0

Release files / cadence_net-0.13.0-py3-none-any.whl

Download URL cadence_net-0.13.0-py3-none-any.whl
Size 215.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
741ec54b89eccf0cda54229cbf0b2bba6b4beded08e1919a3f73b9a39beab464
BLAKE2b-256 checksum
How to use checksums
79b56f6d7fd2fd9657f946191f0f2b1a1dff07b71d3fcfc0f3881eebf69418ed
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.0

Release history Release notifications | RSS feed

0.15.0

2 release files

0.14.0

2 release files

This release

0.13.0 This release

2 release files

0.12.0

2 release files

0.11.0

2 release files

0.10.0

2 release files

0.9.0

2 release files

0.8.1

2 release files

0.8.0

2 release files

0.7.1

2 release files

0.4.1

2 release files

0.4.0

2 release files

0.3.0

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page