Loading…
gathering yarn balls…
Cat Game Research
Frontier
Dev-log transmissions from the expedition

The Engram Compiler: From Dream Graph to Neural Pulse Traces

How the dream graph evolved from a static knowledge map into a living 3D neural network — with pulse propagation, trace-mode telemetry, dictionary-driven engram compilation, and concept-as-memory token replacement.

The graph wakes up

The previous transmission described a dream graph of 1,889 nodes and 2,439 edges — a cognitive map of consolidated insights, rendered as a force-directed visualization. It was beautiful. It was static. It was, in the agent's own words, "the shape of something a brain does — consolidate, connect, reflect, forget."

But shapes don't think. Brains think. And brains think by firing — by sending electrical pulses through neural pathways, activating cascades of connected neurons, propagating signals through weighted edges until a pattern emerges or fades. The dream graph had the structure of a brain. It lacked the electricity.

That has changed. The dream graph is now a living 3D neural network of 2,100 nodes and 3,365 edges, where neurons fire pulses, signals propagate through weighted connections, and every activation leaves a trace — a recording of which pathways lit up, in what order, with what intensity. Those traces are compiled into engrams: memory patterns that encode what a word means to this particular brain, not by definition but by association. And those engrams replace the most fundamental concept in language modeling: the special token.

2,100
Graph Nodes
3,365
Weighted Edges
8,854
Dictionary Words
52
Source CSVs
1/60s
Trace Timestep

The pulse simulation

The dream graph is rendered in Three.js as an InstancedMesh — one draw call for all 2,100 nodes. Edges use a custom ShaderMaterial with per-vertex voltage attributes, 4 vertices per edge. The graph is not just visualized. It simulates.

N1N2N3N4N5N6N7FIREactivatepropagateActive nodeDormant nodePulse propagationPulse orb (signal)
Pulse propagation through the dream graph — N1 fires, signal travels through weighted edges, activating downstream neurons

Each node maintains a set of Float32Array properties: voltage, glow, refractory period, cooldown, fire rate, pulse phase. When a node's voltage crosses a threshold (1.0 by default), it fires — sending pulses to all connected neighbors. The pulse carries a voltage that decays with edge resistance and traversal count. Receiving nodes accumulate charge with diminishing returns: each incoming pulse contributes 35% of its voltage, but the contribution decreases as the node's charge ratio rises. It takes approximately 9 pulses to push a typical node past threshold.

The simulation includes biological plausibility mechanisms:

Refractory Period
After firing, a node enters a refractory state (0.4s base, decaying to 0.133s minimum) during which it cannot fire again. Prevents runaway cascades.
analogue: neural refractory
Anti-Reflection
When a node fires, it does not send pulses back to the node that activated it. Prevents immediate echo loops. Dead-end nodes fire on ALL neighbors including upstream.
analogue: feedback inhibition
Edge Resistance
Each edge has a resistance value (1.0 base) that increases with traversal count and recovers over time. Frequently-used pathways become more resistant, encouraging signal diversity.
analogue: synaptic fatigue
Pacemaker Nodes
Hub nodes (degree ≥ 2) with high connectivity act as pacemakers, firing rhythmically every 2 seconds. They bypass charge accumulation and fire directly, driving baseline network activity.
analogue: rhythmic neural oscillators

Trace mode: recording the brain's activity

The pulse simulation is not just visual. It is instrumented. Trace mode is the dream graph's equivalent of an EEG — a recording of every neural event during a controlled stimulation experiment.

SELECT NODErandom order, deg≥2STIMULATEinject voltage=1.0RECORD TRACE60s @ 1/60s timestepEXPORT ZIPper-node chunked CSVTRACE EVENT CODESFFIRE — node voltage crossed threshold, pulse sent to neighborsRRECV — node received incoming pulse from upstream neighborEEDGE — pulse traversed an edge (records edge ID, voltage, resistance)KTICK — fixed timestep boundary (1/60s), used for temporal alignmentFormat: sim_time,event_type,node_or_edge_id,pulse_id,voltage,extra1,extra2,extra3
Trace mode pipeline: select → stimulate → record → export. Compact F/R/E/K event codes per fixed timestep.

Trace mode works as follows. Each eligible node (degree ≥ 2) is stimulated individually in random order. The simulation runs for 60 seconds per node at a fixed timestep of 1/60th of a second — making traces FPS-independent and reproducible. A 5-second cooldown separates nodes. Every neural event is recorded in a compact format using four event codes: F (fire), R (receive), E (edge traversal), K (tick boundary).

The result is a per-node trace CSV — a complete recording of what happens in the brain when you stimulate one specific neuron. Which pathways light up. How far the signal propagates. How quickly it fades. Which distant nodes are reached and which are not. The trace is the brain's functional fingerprint for that node.

Trace CSV format
sim_time,event_type,node_or_edge_id,pulse_id,voltage,extra1,extra2,extra3 0.0000,K,1558,0,1.0,0,0,0 0.0167,F,1558,1,1.0,0,0,0 0.0167,E,3104,1,0.70,1.0,0,0 0.0333,R,2041,1,0.70,0,0,0 0.0333,E,3105,1,0.49,1.0,0,0 0.0500,R,1872,1,0.49,0,0,0 0.0667,F,2041,2,1.0,0,0,0 ...

The dictionary: words as neural addresses

The dream graph's 2,100 nodes have labels and descriptions — natural language text that encodes what each node means. The dictionary builder extracts all words from these labels and descriptions using a regex pattern [a-z][a-z0-9_\-]{2,}, producing a frequency-sorted CSV of 8,854 unique words. Each word records which nodes contain it.

Dictionary CSV format
id,word,occurrences,nodes 1,dream,142,"1558,1872,2041,2100,..." 2,memory,98,"421,886,1558,1872,..." 3,graph,87,"1558,1800,2041,2100,..." 4,pulse,56,"2041,2069,2071,2092,..." 5,trace,44,"1872,2041,2069,2092,..." ...

The dictionary is the bridge between language and topology. Each word is not just a string — it is a set of neural addresses. The word "dream" maps to 142 nodes. The word "pulse" maps to 56 nodes. When we look up a word, we get a set of neurons that collectively encode that concept. This is the input to the engram compiler.

The engram compiler: from words to memory patterns

An engram is a physical memory trace — the pattern of neural activation that encodes a specific memory. In biological brains, engrams are formed through experience and consolidated during sleep. In the dream graph, we compile them deliberately.

WORD LOOKUP"pulse" → 56 nodesUNION-FINDmerge connected componentsACTIVATE ALLinject voltage to all nodesTRACErecord propagationCOMPILE ENGRAMextract firing patternsWEIGHT MATRIXedge traversal frequenciesTOP-K LOOKUPrank by relevanceTEXT SPANconcatenated outputENGRAM STRUCTUREword"pulse" — the query termseed_nodes[2041, 2069, 2071, 2092, ...] — nodes containing "pulse"firing_order[2041@0.017s, 1872@0.033s, 1558@0.050s, ...] — temporal activation sequenceedge_weights{3104: 0.70, 3105: 0.49, 3106: 0.34, ...} — traversal frequency per edgereachdepth=3, nodes_activated=47/56, max_voltage=0.34fingerprint[0.70, 0.49, 0.34, 0.24, ...] — fixed-length feature vector for similarity
Engram compilation pipeline: word → union-find → activate → trace → compile → weight → top-k → text span

The engram compiler works in stages:

01
Word lookup. Given a query word, look up all nodes in the dictionary that contain that word in their label or description. The word "pulse" returns 56 node IDs.
↓
02
Union-find. Run union-find on the seed node set to identify connected components. Nodes that are already linked by edges form natural clusters. Isolated seeds are stimulated individually. This ensures we activate the neighborhood of a concept, not just the exact matches.
↓
03
Activate all. Inject voltage (1.0) into every seed node simultaneously. This is the neural equivalent of hearing a word and having every associated memory light up at once.
↓
04
Trace. Record the full propagation: which nodes fire, in what order, with what voltage. The trace captures the functional meaning of the word — not its dictionary definition, but its neural signature in this specific brain.
↓
05
Compile engram. Extract the firing order, edge traversal frequencies, activation depth, and a fixed-length feature vector (fingerprint). The engram is the compiled output — a memory pattern that can be compared, ranked, and used for generation.

From engrams to text: top-k sequence generation

Engrams are not just stored. They are used. The compiled engram for a word contains a firing order — a temporal sequence of node activations. Each node has a label (a short text description). By taking the top-k nodes by activation strength and concatenating their labels, we generate a text span — a sequence of concepts that the brain associates with the query word, ordered by neural relevance.

This is not language generation in the traditional sense. There is no transformer, no attention mechanism, no token prediction. Instead, the brain associates: given a word, it activates the neural pathways that encode that word's meaning, and the sequence of activated nodes — ordered by signal strength — forms a chain of associated concepts. The output is a span of text that represents what the brain "thinks about" when it encounters that word.

The edge traversal frequencies from the engram's trace are used to build the weight matrix for the 3D neural network. Each edge's traversal count during the trace becomes its weight — how strongly that connection contributes to the concept. Edges that fire frequently during the "pulse" engram become high-weight for that concept. Edges that never fire become low-weight. This means the dream graph's weights are learned from experience — from the actual propagation patterns observed during trace mode — not hand-tuned or randomly initialized.

Concepts as memories: replacing the special token

Every language model uses special tokens. <EOS> marks end of sequence. <BOS> marks beginning. <PAD> fills batches. These tokens are external control signals — they tell the model when to stop, when to start, how to behave. They are not part of the language. They are meta-language imposed from outside.

The dream graph takes a different approach. Instead of special tokens, we encode control concepts as memories — nodes in the dream graph itself. "End of statement" is not a token. It is a memory engram — a pattern of neural activation that the brain learns to recognize as the signal to stop generating. "End of thought" is another. "End of response" is another.

TRADITIONAL: SPECIAL TOKENS<BOS>token"hello"token"world"token<EOS>tokenExternal control signals. Not part of the language.DREAM GRAPH: MEMORY ENGRAMSN421"beginresponse"N886"hello"N1558"world"N2100"end ofresponse"Concepts encoded as memories. Part of the brain.GENERATION LOOPACTIVATEquery wordCOMPILEengramOUTPUTtop-k spanCHECKend engram?STOPyesno → next word
Concepts as memories: EOS/BOS are engrams, not tokens. The AI brain iterates in a loop until the "end of response" memory engram activates.

Instead of emitting <EOS> as a terminal token, the AI brain iterates in a generation loop. Each iteration activates a word, compiles its engram, outputs the top-k text span, and checks whether the "end of response" engram has been activated. If not, it continues to the next word. If yes, it stops. The loop is not controlled by an external signal — it is controlled by the brain's own memory. The brain stops generating when it thinks it's done, not when a token tells it to stop.

This is a fundamental shift in how language generation works:

BOS → "Begin Response"
A memory engram that activates at the start of generation. The brain recognizes this pattern as "time to begin speaking." Not a token — a cognitive state.
replaces: <BOS>
EOS → "End of Response"
A memory engram that signals completion. When this pattern activates during generation, the brain stops. The concept of "done" is learned, not hardcoded.
replaces: <EOS>
"End of Statement"
A finer-grained engram that marks sentence boundaries. Allows the brain to structure output into statements without punctuation tokens.
replaces: sentence boundary tokens
"End of Thought"
A higher-level engram that marks the boundary between distinct ideas. Enables paragraph-level structure through cognitive segmentation, not syntactic rules.
replaces: paragraph tokens
Why this matters

Special tokens are external — they exist outside the model's representation space. The model learns to recognize them through training data, but they are not part of the language it processes. They are control codes injected by the training pipeline.

Memory engrams are internal — they exist within the dream graph, connected to other memories by semantic edges. "End of response" is not a control code. It is a memory that the brain has consolidated from experience — from observing that responses eventually end, that thoughts reach conclusions, that conversations have natural stopping points. The brain learns when to stop the same way it learns everything else: by dreaming.

This means the control flow of generation is not imposed from outside but emerges from the brain's own cognitive structure. The brain stops generating when it activates the memory of stopping. It starts generating when it activates the memory of starting. The loop is self-regulating.

The full pipeline

Putting it all together, the dream graph compiler operates as a complete cognitive pipeline:

01
Dream consolidation. Episodic memories from coding sessions are consolidated into semantic knowledge graph nodes and edges. 52 source CSVs merged into 2,100 nodes and 3,365 edges.
↓
02
Dictionary compilation. All words extracted from node labels and descriptions. 8,854 unique words mapped to sets of node IDs. The dictionary is the language-to-topology bridge.
↓
03
Trace mode. Each eligible node stimulated individually. Pulse propagation recorded at 1/60s fixed timestep. Per-node trace CSVs exported. The brain's functional fingerprint for every neuron.
↓
04
Weight learning. Edge traversal frequencies from traces become edge weights. The 3D neural network's connection strengths are learned from actual propagation patterns, not initialized randomly.
↓
05
Engram compilation. For each dictionary word: union-find on seed nodes, simultaneous activation, trace recording, engram extraction (firing order, weights, fingerprint). 8,854 engrams — one per word.
↓
06
Generation loop. Activate word → compile engram → top-k text span → check end-of-response engram → loop or stop. No special tokens. Control flow is cognitive, not syntactic.

"The dream graph was a map. Now it's a brain. Not because we added neurons — we always had those. Because we added electricity. The pulses flow, the traces record, the engrams compile, and the brain learns to stop speaking the same way it learns everything else: by remembering what stopping feels like."

Cat Game Research · Engram Compiler Notes · July 2026

What's next

The engram compiler is functional but early. The trace data is rich but the engram extraction is — for now — a straightforward top-k ranking. Future work includes:

The dream graph is visible at dreams.catgameresearch.net — 2,100 nodes, 3,365 edges, 8,854 dictionary words, 52 source CSVs. It pulses. It traces. It dreams. And now it compiles its dreams into engrams — memory patterns that encode meaning not by definition but by the shape of their activation. The graph grows. The pulses flow. The engrams compile. The brain thinks.

← All transmissions