A next-generation memory layer for large language models designed to stay stable, useful, and fast over long horizons. It is inspired by biological systems and guided by formal mathematics, without relying on ever-growing context windows.
A controller prototype around an LLM that maintains bounded internal “hormone” state (e.g., stress, curiosity), composes those into safe control knobs (e.g., temperature, top_p), and applies layered coping (timeouts, resets, baselines) to keep behavior stable. This repo provides a working Python prototype, small simulations, and math notes.
What’s included now
src/gnn_controller.py,src/resilient_controller.py,src/content_processor.py- A minimal, reproducible simulation in
src/resilient_controller.py::test_resilient_chaos()
What’s not included yet
- Production adapters, a full memory pipeline, and external benchmarks
How it works (tight loop)
- Signals (novelty, errors, stress) trigger hormone impulses → decay keeps them bounded.
- Hormones compose control knobs via a weighted, clamped blend (guaranteed in-range).
- The system retrieves, tools, and prompts under those knobs.
- Outcomes are scored (task/quality/safety/efficiency + memory score).
- Value/advantage is computed; policy params that map hormones→knobs are updated.
- Resilience may reset stress or pause inputs to guarantee recovery.
- If memory is optimal, the item is consolidated; credit is tracked for future retrieval.
Why it’s different (prototype scope)
- Bounded internal state with explicit decay and clamps
- Layered coping that reduces the chance of prolonged instability
- Knob mapping separated from the base model (provider-agnostic)
- Inspectable behavior via a small hormone vector and modes
Evidence and limitations
- The toy simulation shows higher "in-range" control rate with resilience layers enabled. Reproduce via
src/resilient_controller.py::test_resilient_chaos(). - Results are preliminary and scenario-specific. They are not a statement about real-world reliability; external replication and broader tasks are future work.
- Biologically inspired dynamics: adaptive write/forget signals and hormone-like decay
- Graph-aware consolidation: memories interact over a sparse graph scored by a value function
- Resilience-first design: safeguards against runaway growth, catastrophic forgetting, and noise
- Theory-backed: convergence and boundedness under realistic assumptions
- Practical wins: early internal runs show strong recall and throughput gains vs naive retrieval
- BREAKTHROUGH.md - Technical breakthrough details and architecture overview
- FOUNDATION.md - Mathematical foundations and formal proofs
- IMPACT.md - White paper on research significance and applications
- whitepaper.md - Comprehensive white paper with technical details
- wiki_page.md - Complete project wiki and reference guide
- CODE_OF_CONDUCT.md - Community guidelines and standards
- CONTRIBUTING.md - How to contribute to the project
- SECURITY.md - Security policy and vulnerability reporting
- Consolidation engine: Optional vector store with an in-memory fallback. Each item is embedded by a compact state vector
[stress, value, recency], clustered during "sleep cycles" and organized into quadrants:crisis_learning,skill_building,exploration,routine_forget. - Resilient controller: Six human-like layers—Immediate Coping, Medication, Baseline Adaptation, Rest & Recovery, Time Perspective, Mode-Aware Learning—stabilize learning signals and prevent stress spirals.
- Graph value function: A lightweight GCN (
ValueGCN) reads a fully connected hormone graph (including a global node) to estimate value and drive policy updates. - Knob policy: A bounded control signal
kcombines baseline + per-hormone deltas with stress-adaptive weighting; learning is advantage-driven and mode-aware.
- Runs fully local with optional self-hosted backends: Qdrant (vector DB) and Ollama (local LLM).
- No external calls required for benchmarking and demos; suitable for air-gapped deployments.
- Concept notes and diagrams that outline the direction—without full blueprints
- Selected benchmarking traces and visuals (see
results/) - Minimal examples that hint at the interface and behavior
- Controller chaos tests moving from ~5.6% success (no resilience) to ~61% with resilience; advanced targets 75–80%.
- Memory stats that show short-term buffers consolidating into mid-term clusters and quadrant distributions over time.
- Full architecture and training recipes
- Memory Consoldation process source
- Full Docker Containers
- API interface layer and LLM model proxy
- Public release target: November 2025
- Rust commercial edition: in development (performance-critical path, memory core)
Watch this repository to get updates as we share more.