Why Hebbian learning
The classic neuroscience principle: neurons that fire together, wire together. Applied to knowledge graphs:- Concepts that are consistently activated together (co-appear in tagged content, co-fire in retrieval sessions) gain stronger edge connections
- Concepts that are rarely or never activated lose weight over time and eventually decay out of the active graph
- The graph structure reflects actual creator behavior, not theoretical taxonomy design
The nightly schedule
Stage 1: node-decay.mjs
memory/consolidation/hebbian/node-decay.mjs applies Hebbian decay to every active node in the Directus user_nodes collection.
Decay formula
decay_rate (default 0.05 — 5% per day). A node last reinforced 14 days ago with default decay rate retains:
decayed.
Reinforcement
When a creator accepts generated content, the Action Runner callsnode-decay.mjs reinforce <node_id>:
Stage 2: taxonomy-hebbian.mjs
memory/consolidation/hebbian/taxonomy-hebbian.mjs operates on the system-wide taxonomy graph (Nodes/Universe/taxonomy_graph.json).
It boosts CO_OCCURS edge weights between tags that co-appeared in creator content during the previous cycle window, then applies global decay to all edges:
--hours sets the lookback window for co-occurrence detection. --delta is the edge weight boost per co-occurrence. --decay is the global decay multiplier applied to all edges.
Changes are written atomically to Nodes/Universe/taxonomy_graph.json to prevent partial writes during a crash.
Stage 3: cross-user FP-Growth pattern mining (planned)
Cross-user pattern mining is designed and structurally ready but not yet implemented (B7-3). The directory
memory/consolidation/cross_user/ exists with its README. No code exists yet.fp_growth.mjs will scan all confirmed user_nodes records across every creator and identify tag/concept combinations that co-occur above a configurable support threshold.
FP-Growth parameters (design):
| Parameter | Default | Description |
|---|---|---|
support | ≥ 0.15 | Minimum fraction of creators where the pattern must appear |
confidence | ≥ 0.70 | Minimum conditional probability for the association |
min_creator_count | ≥ 3 | Minimum distinct creators where the pattern must appear before promotion |
promote.mjs writes it to Nodes/Transitional/ as a candidate for promotion to Nodes/Universe/.
Privacy design
Pattern mining aggregates across creators but never exposes individual attribution. Promoted patterns carry no creator IDs in the graph. Audit logs store pattern fingerprints only.The node tier system
Knowledge nodes flow through three tiers, each with distinct semantics:Nodes/Universe/
The canonical 3,205-node taxonomy graph. System-wide, shared across all creators. Written by
taxonomy-hebbian.mjs and promote.mjs. Read by synaptic propagation at retrieval time.Nodes/User/
Per-creator subgraphs. Each creator’s node activations, weights, and decay states. Read source for FP-Growth pattern mining. Written by
node-decay.mjs via Directus user_nodes.Nodes/Transitional/
Promotion staging area. Patterns that have cleared FP-Growth thresholds sit here awaiting human or automated review before moving to
Nodes/Universe/. Prevents unreviewed patterns from polluting the universal graph.agent-skills/ → DuckDB
Procedural memory. New skills drafted from observed agent behavior are ingested into
agent_memory.duckdb (191 skills, 252 nodes, 12,880+ edges) and become retrievable on future sessions.Automatic skill creation (in progress)
As the agent handles new request types, new skills are drafted toagent-skills/. Once ingested:
Cron registration
cron_restart in ecosystem.config.js.
Implementation files
Key operations
| Script | Operation | Target |
|---|---|---|
node-decay.mjs | Decay: weight × (1-rate)^days | Directus user_nodes |
node-decay.mjs | Reinforce: weight + 0.1, reset clock | Directus user_nodes |
taxonomy-hebbian.mjs | Boost CO_OCCURS edges from recent co-occurrences | Nodes/Universe/taxonomy_graph.json |
taxonomy-hebbian.mjs | Global edge decay pass | Nodes/Universe/taxonomy_graph.json |
taxonomy-reconcile.mjs | Promote pending_review → active | Directus taxonomy_mapping |
fp_growth.mjs (planned) | Mine frequent patterns across all user_nodes | Directus user_nodes (read) |
promote.mjs (planned) | Write promoted patterns | Nodes/Transitional/ |