1. The cell
A cell is the architecture's atomic unit. It holds an activation (one number representing how strongly it's firing now) and a preference vector (one weight per token in the vocabulary, indicating which tokens this cell "likes"). When the system needs to generate, each cell contributes activation × preferences to the score. That's the whole basic computation. Specialized cell types add state on top of this; the core is always one activation, one preference vector.
LineageThe atomic neuron-like unit traces back to McCulloch & Pitts (1943)'s logical neuron. Reverie's twist — outputs as preference distributions over a learned vocabulary rather than scalars — is closer in spirit to modern embedding-based representations, where each unit's "meaning" is its position in a vocabulary-shaped space rather than a single firing rate. The contribution-as-vote framing has its analogue in mixture-of-experts and population coding (Georgopoulos et al., 1986).
2. The population
The system holds many cells in parallel — typically a few dozen to a few hundred. They start blank, with no preferences for anything. As observations arrive, different cells specialize on different patterns through their learning rules, and the population as a whole develops distributed representations — concepts encoded across many cells, not stored in any one.
LineageThe connectionist principle of distributed representation (Hinton, 1986; Rumelhart, McClelland & the PDP Group, 1986). Reverie's cells are functional descendants of what Hebb (1949) called cell assemblies: a concept isn't stored in one place, it's the joint participation pattern of many units. The "starts blank" choice puts the architecture closer to tabula-rasa learning than to nativist priors.
3. Five cell types
Five populations sharing the same substrate but learning differently. Mimicking cells predict what's happening now and adjust on error. Hebbian cells follow the classical "fire together, wire together" rule. Predictive cells make bets about what comes next and learn one tick later. Context cells lock onto specific multi-token sequences they've seen and predict what follows. Slot cells generalize one step further: their templates have wildcard positions and bind to whatever fills them, learning parameterized functions of those bindings.
LineageEach type sits in a different strand of prior work. Mimicking cells are predictive-coding-flavored (Rao & Ballard, 1999) — they learn from their own prediction error. Hebbian cells implement Hebb (1949)'s rule directly. Predictive cells share intent with sequence-prediction networks (RNNs, n-gram models). Context cells echo Hierarchical Temporal Memory (Hawkins, 2004; Numenta's BAMI), where specific cells become responsible for specific temporal contexts. Slot cells reach into variable-binding work — Smolensky's tensor product representations (1990) and Plate's holographic reduced representations (1995) wrestle with the same question of how to bind a role to a filler inside a connectionist substrate. The five-type split is unusual: most architectures pick one mechanism and run with it; Reverie's bet is that different cognitive capacities want different rules.
4. Activation — what "firing" means
When a token arrives, each cell's activation depends on how much it already prefers that token. A cell that has learned "this is my token" fires strongly; a cell with no prior preference fires at baseline. This is "preference-driven activation" — the substrate's way of representing what's currently salient across the population, given everything the system has learned.
LineagePreference-driven activation is structurally close to the dot-product attention computations in transformers — a unit whose stored vector aligns with the current input contributes more. Population coding in motor cortex (Georgopoulos et al., 1986) is the neuroscience version: the active subset of cells is the representation of the current stimulus. The choice to use rate-coded activations (one continuous number per cell) rather than spikes follows decades of artificial-neural-network practice (Rumelhart et al., 1986) — biologically simpler than spike timing, sufficient for everything Reverie tries to do.
5. Lateral inhibition — "asking" peers to weaken
When several cells respond to the same observation, the strongest ones broadcast suppression to the rest — the "ask others to weaken" half of what the original spec called the asking protocol. Mechanically, each cell's activation is reduced by a fraction of the population mean. Cells below the mean clip to zero. The result is a sparse activation pattern where only the cells most relevant to the current input contribute to the output. This is where specialization comes from at the population level.
LineageLateral inhibition is one of the most well-attested phenomena in real neural tissue — Hartline (1949) demonstrated it in the Limulus retina, and it appears throughout the cortex as a basic motif. Computationally, it underwrites self-organizing maps (Kohonen, 1982) and any winner-take-all circuit. Reverie's mean-subtraction is a soft variant — it preserves a few above-mean cells rather than picking exactly one winner. The architectural intent is sparsity: only a small subset dominates each input, leaving the rest free to specialize on others. This is the engine that makes distributed representation happen automatically, without any explicit specialization signal.
6. Hebbian co-activation builds a connection
When two cells fire above the mean at the same tick, the connection between them strengthens. This is the classical Hebbian rule: cells that fire together wire together. The connection is bidirectional and grows in proportion to how strongly the two cells co-activate. Over many observations, clusters of cells that respond to similar inputs become tightly bound — forming what Hebb called cell assemblies, the substrate's distributed-representation building blocks.
LineageThe rule comes from Hebb (1949), framed canonically as "neurons that fire together wire together." It underpins associative memory in Hopfield (1982) networks and has been revived as a learning principle in Krotov & Hopfield (2016)'s dense associative memory and the modern Hopfield-as-attention reframing (Ramsauer et al., 2020 — "Hopfield networks is all you need"). Reverie's centered outer-product implementation — subtracting the mean activation before multiplying — is the simplest practical form: it ensures that only co-firing above baseline counts, so the rule doesn't drift toward an all-to-all dense matrix.
7. STDP — time direction in connections
Plain Hebbian co-activation is symmetric — it can't tell "A came before B" apart from "B came before A". Spike-timing-dependent plasticity (STDP) adds direction: if cell A fires just before B repeatedly, the connection from A to B strengthens, and the reverse weakens. This is what lets the system learn sequence structure — "+ tends to follow a digit" — rather than just co-occurrence.
LineageSTDP was discovered in real cortical neurons by Markram et al. (1997) and characterized in detail by Bi & Poo (1998): relative spike timing of pre- and post-synaptic firing determines the sign of synaptic change, with a characteristic asymmetric time window. Reverie's discrete-time analog computes outer(post, pre) − outer(pre, post) across consecutive ticks — the anti-symmetric structure is what carries directional information. The mechanism converts an otherwise symmetric associative memory into a sequence-aware one without changing the rest of the substrate.
8. Replay — the system dreams
Between external observations, the system runs internal cycles. Each cycle samples one token from a bounded buffer of recent observations — with recent tokens weighted more — and feeds it back through the same pipeline as a real observation, at a fraction of the normal learning rate. This is what the project's name means literally: between inputs, the system dreams, cycling through what it has seen. The mechanism is what makes content from before linger and consolidate without external prompting.
LineageHippocampal place cells in rats replay their daytime firing patterns during sleep — Wilson & McNaughton (1994) showed this directly — and this is widely thought to underwrite memory consolidation. The same mechanism was adopted as "experience replay" in deep reinforcement learning, most famously in Mnih et al. (2015)'s DQN paper. Reverie's recency-weighted sample uses replay for a similar purpose: between external observations the system rehearses what it has just seen, strengthening associations that would otherwise decay before the next input arrives. The Reverie name itself comes from this mechanism.
9. Stagnation — the dream settles
An observation perturbs the system; subsequent dream cycles consolidate the change; eventually preferences stop moving much. When per-tick preference change stays below a small threshold for several consecutive ticks, we say the system has reached stagnation. The next observation will refresh activity, and the cycle starts again. The system has a way to know it has "thought enough."
LineageRecurrent networks reaching fixed-point attractors has a long history in connectionism — Hopfield (1982) and Cohen & Grossberg (1983) formalized convergence dynamics for symmetric networks. Reverie's stagnation detector is a much simpler pragmatic version: rather than analyzing the energy landscape, just watch how much preferences move per tick and stop when the delta gets small. The conceptual ancestor is the same — a system that's "done thinking" for now and ready for the next perturbation. The choice not to predefine a fixed number of internal ticks is what makes thinking time content-dependent: hard inputs settle slowly, easy ones settle fast.
10. Context cells — locking onto specific sequences
Context cells are how the system encodes specific multi-token patterns. Each cell claims a four-token template from experience. When the most recent four tokens exactly match the template, that cell receives a strong activation boost and its preference for the trained next-token wins the output. This is what makes "1 + 1 = ?" reliably produce 2 — the cell that claimed [1, +, 1, =] learned that 2 follows.
LineageThe simplest ancestor is n-gram language modeling (Shannon, 1948 onwards) — store the distribution of next tokens given the previous K. Hierarchical Temporal Memory (Hawkins, 2004; Numenta's BAMI document) goes further by making specific neurons responsible for specific contexts, with sparse activation. Reverie's context cells are essentially the same idea cast as a sparse, observation-driven memorization layer, with ADR 0013's approximate matching adding graded partial-match contributions and ADR 0015's LRU eviction making the pool finite-but-renewable. The contrast with modern transformer attention is informative: attention computes context relevance dynamically over the entire window every step; context cells discretize it into named patterns, which is more brittle but more interpretable.
11. Slot cells — wildcards and bindings
Slot cells extend context cells with explicit variable binding. The template has ? positions that match any token and extract whatever was there. The cell stores a per-binding preference: given the bound values, what comes next? This is the closest the substrate gets to representing operations parameterized by inputs. It works for memorization (trained pairs retrieve their trained answers) but does not, on its own, generalize — the binding (2, 3) and (3, 2) are distinct lookups.
LineageVariable binding is the long-standing bridge between symbolic and connectionist AI — the binding problem as articulated by Fodor & Pylyshyn (1988). Smolensky's tensor product representations (1990) and Plate's holographic reduced representations (1995) both formalize how a connectionist substrate can hold a structured relation like (role, filler). Reverie's slot cells implement a simple version: a fixed template with wildcards binds to observed values at runtime, with a per-binding output dictionary. The empirical finding — that slot cells memorize per-binding but do not commute (2, 3) with (3, 2) — pins the architecture's symbolic-reasoning ceiling, consistent with classic skepticism (Fodor & Pylyshyn, 1988) about how far pure pattern-binding can take you without explicit algebraic structure.
12. The full loop
The three top-level operations operate on one shared internal state. observe perturbs it with new input. excite runs internal dynamics — replay, propagation, decay, stagnation tracking, possibly spontaneous output. generate samples from the current state. The caller chooses the cadence: feed observations as they arrive, dream between them, ask for output whenever. The system has no scheduler of its own; it just responds to what's done to it, and what it does to itself between those moments.
LineageThe perceive-think-act cycle is the foundational shape of cognitive architectures — ACT-R (Anderson et al.) and SOAR (Laird, Newell & Rosenbloom, 1987) both formalize cognition as a recurring perceive-deliberate-emit loop over a shared working memory. Friston (2010)'s active inference frames the same loop as free-energy minimization across a perception-action cycle. Reverie's observe → excite → generate is the stripped-down kernel of the same intuition: external input perturbs state, internal dynamics settle it, output samples what settled. The deliberate choice to expose all three to the caller rather than running them under an internal scheduler is what makes Reverie's behaviour content-dependent — the system thinks for as long as the caller (or stagnation) says it should, not on a fixed clock.