Predictive cells — forward-looking prediction with one-tick lookahead
Decision 0009: Predictive cells — forward-looking prediction with one-tick lookahead
Date: 2026-05-24 Status: Accepted Builds on: ADRs 0001–0008
Context
After ADR 0008 (STDP), the connection matrix encodes pairwise directional structure: cells for one token become connected to cells for whatever token tends to follow. That’s a real step toward sequence awareness, but the v0.7 arithmetic experiment confirmed it’s not enough. After training on "1 + 1 = 2" style facts, querying "1 + 1 =" still produces an output distribution dominated by buffer-recent tokens. The system has no cells that explicitly predict forward.
This ADR introduces such cells. A third cell type alongside MIMICKING and HEBBIAN — call them PREDICTIVE — operates with a single key difference: their bet (the token they sample from their preferences) is interpreted as a prediction of the next observation, not a guess at the current one. The bet is held over, and evaluated when the next observation actually arrives.
The scope here is deliberately narrow. PREDICTIVE cells in this ADR look one tick ahead. They condition only on the current activation state, not on a multi-tick context window. They don’t yet enable arithmetic — solving arithmetic requires longer-range context, which is a future ADR. What this ADR delivers is the substrate for forward prediction: a cell type whose learning signal comes from “did the future match what I expected?” rather than “did the present match my guess?”
Decision
Third cell type — PREDICTIVE
Add a new integer constant PREDICTIVE = 2 alongside MIMICKING = 0 and HEBBIAN = 1. The initial cell-type allocation now splits three ways. With initial_cells = 32, the default split is approximately 11 mimicking + 11 Hebbian + 10 predictive (the remainder goes to predictive in odd cases).
Pending bets and delayed evaluation
Each predictive cell, in addition to the preference vector that all cells have, maintains state:
pending_bet: the token index the cell most recently sampled as its prediction. InitiallyNone.
On every tick (both observation and replay), predictive cells:
- Evaluate: if
pending_betis notNone, evaluate it against the current observed/replayed token. The current token is what the previous tick’s bet was predicting.- If
pending_bet == idx: reinforcepreferences[c, pending_bet](cell predicted correctly). - If
pending_bet != idx: penalizepreferences[c, pending_bet]bypredictive_penalty(cell predicted wrongly).
- If
- Bet anew: sample a new bet from softmax of current preferences, using the same
bet_temperatureas mimicking cells. Store aspending_betfor evaluation on the next tick.
The bet semantics differ from mimicking’s predict-then-correct rule only in when the evaluation happens — predictive cells evaluate one tick later, against the next token.
Contribution to output
Predictive cells contribute to generate() the same way other cells do — their activation × preference vector adds to the aggregate score. Their distinctive contribution: because they are reinforced for predicting next rather than matching current, their preference vectors tilt toward “what tends to follow what I’m currently activated for.”
After training on patterns like "A B C A B C ...", predictive cells that consistently fired when A was observed will have learned pref[B] > pref[A] (they predicted B-was-next correctly many times). When the system then observes A and the predictive cells fire, their contribution to the output distribution is biased toward B.
This produces forward-anticipating dreaming: during excitation, predictive cells contribute “what tends to come after this” rather than “what is this.” Combined with STDP-driven directional connections, the system has two complementary mechanisms for sequence anticipation.
Default — opt-in via cell-type ratio
By default, predictive cells get 1/3 of the population. To run the system without predictive cells (preserve v0.7 behavior), set the new parameter predictive_cell_fraction = 0.0. With that, the population reverts to a 50/50 mimicking/Hebbian split.
predictive_penalty parameter
Analogous to mimicking_penalty. Default 0.1 — wrong forward predictions weaken the wrongly-bet token at a tenth the rate of reinforcement. Same stability constraint applies: penalty < 2/(k-1) for stable specialization on k-token vocabularies. Future work may unify the two penalties.
Why one-tick lookahead, not longer
Two reasons.
-
Implementation cost. Multi-tick context (last
Kactivations as input to predictive cells) requires either a per-cell context buffer or a system-wide history vector that each cell weights. Either way, the preference structure grows from O(n_tokens) to O(n_tokens · K) or higher, and the learning rule needs to update context templates. That’s the scope of a future ADR. -
Architectural cleanness. One-tick lookahead is the minimal extension that introduces forward time. Anything longer is an incremental extension of the same idea (look back further). Getting the one-tick mechanism right and tested clears the path for K-tick versions later.
What this fixes and what it doesn’t
Fixes
- The architecture now contains a cell type whose learning signal explicitly reflects “did the future match my expectation?” That’s a primitive of any sequence-learning system.
- Output distributions during dreaming will tilt toward what’s-next given current state, not just what-is given current state.
- Combined with STDP (ADR 0008), the system has two pathways for sequence anticipation: structural (connections from “what fires next”) and representational (cells whose preferences encode “what comes next”).
Doesn’t fix (still open)
- Arithmetic still won’t work. Predictive cells with one-tick lookahead can learn “after
=comes a digit.” They cannot learn “after1 + 1 =comes2specifically because the preceding operands were 1 and 1.” That requires multi-token context. - The variance-compression problem from ADRs 0005/0006. Predictive cells use the same activation pipeline as the other types; their differentiation from mimicking is in evaluation timing, not in activation dynamics.
- Variable binding. Even with multi-token context, learning
(a, +, b, =) → a+bfor arbitrarya, brequires the system to bind operands to roles. This architecture has no role-binding primitive. That may be its fundamental limit for symbolic reasoning, regardless of how many ADRs we stack.
Behavioral predictions
These claims have tests in tests/test_predictive.py:
- With
predictive_cell_fraction = 0, the population is 50/50 mimicking/Hebbian — v0.7 regression safety net. - With predictive cells, after training on
"A B A B ...", observingAshifts the output distribution towardB— the cells learned thatBfollowsA. - Predictive cells reinforce only when their bet matches the next observation — the cell’s preference for token
Xgrows only over ticks where the previous tick’s bet wasXand the current observation isX. - All prior 66 tests continue to pass under the default predictive-fraction setting.
Open questions deferred
- Multi-tick context for predictive cells. The natural next step; needs a substantive ADR of its own.
- Adaptive cell-type ratios. Currently 1/3 each. A system might benefit from learning which cell types to grow more of given the input statistics.
- Predictive cells in replay. This ADR has them update on both observation and replay ticks identically. There may be reason to treat them differently — e.g., replay-driven prediction might use stricter reinforcement than observation-driven, since replay is rehearsal not novelty.
- Cross-type interaction. Predictive cells are still updated cell-by-cell. They don’t yet observe what mimicking or Hebbian cells are doing. A future ADR may introduce inter-type signaling.