Session 1 — Resonance Nodes & Compression Index
What We Built
The core data structure of NCI. Every concept in the brain is a ResonanceNode with a signature (fingerprint) and a threshold (sensitivity). The CompressionIndex groups nodes into buckets using LSH for fast lookup.
Key Concepts
ResonanceNode
The fundamental unit of knowledge in NCI. Each node has:
- identity — 64-number signature (fingerprint)
- threshold — how similar an input must be before the node fires
- connections — links to related nodes (max 10)
- consolidation — how crystallized this knowledge is (0.0 → 1.0)
Resonance
A score between -1.0 and 1.0 measuring how similar an input is to a node's signature. Computed using cosine similarity. If resonance ≥ threshold, the node fires.
Analogy
A tuning fork. It only hums when the right frequency is played near it. Everything else leaves it silent.
Compression Index
The master lookup system. Groups similar nodes into buckets using Locality Sensitive Hashing (LSH). A search only checks the relevant bucket — typically less than 1% of all nodes.
Analogy
A library card catalog. You don't read every book — you check the catalog, go to the right section, open the right page.
Sparsity
Only 1–4% of nodes activate for any given input. The rest stay silent and cost nothing. This is where NCI's efficiency comes from.
Analogy
A city at night. Most windows are dark. Only the relevant buildings are lit up.
Benchmarks Achieved
| Metric | Target | Result |
|---|---|---|
| Build time (100k nodes) | < 5 sec | 0.87s ✅ |
| Search speed | < 10ms | 3.5ms ✅ |
| Search efficiency | > 95% | 99.1% ✅ |
| Compression ratio | > 1.0x | 1.78x ✅ |
Key Files
index.py— ResonanceNode, CompressionIndex
Key Methods
node.resonance(query) # cosine similarity score
node.fires(query) # True if resonance >= threshold
index.batch_build(n) # build n nodes vectorized
index.add_node(node) # add single node to index