Skip to content

About

Next-generation AI memory architecture. Inspired by biology. Proven with mathematics. Resilient by design. A new foundation for LLM cognition — coming November 2025.

Resources

Code of conduct

Contributing

Security policy

Stars

0 stars

Watchers

0 watching

Forks

 
 

Latest commit

 

History

19 Commits

Folders and files

Resilient Memory for LLMs

Python 3.11+ Rust WIP PyTorch NumPy Pandas Pydantic Matplotlib Qdrant Ollama Air–gapped License: Apache-2.0

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.

TLDR;

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)

  1. Signals (novelty, errors, stress) trigger hormone impulses → decay keeps them bounded.
  2. Hormones compose control knobs via a weighted, clamped blend (guaranteed in-range).
  3. The system retrieves, tools, and prompts under those knobs.
  4. Outcomes are scored (task/quality/safety/efficiency + memory score).
  5. Value/advantage is computed; policy params that map hormones→knobs are updated.
  6. Resilience may reset stress or pause inputs to guarantee recovery.
  7. 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.

Why this is different

  • 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

Documentation

Core Documentation

  • 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

Project Documentation


Under the hood (what we can share now)

  • 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 k combines baseline + per-hormone deltas with stress-adaptive weighting; learning is advantage-driven and mode-aware.

Offline and air-gapped

  • 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.

What you'll see here pre-release

  • 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

Bench snippets to watch

  • 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.

What stays private until launch

  • Full architecture and training recipes
  • Memory Consoldation process source
  • Full Docker Containers
  • API interface layer and LLM model proxy

Timeline

  • Public release target: November 2025
    • Rust commercial edition: in development (performance-critical path, memory core)

Follow along

Watch this repository to get updates as we share more.

About

Next-generation AI memory architecture. Inspired by biology. Proven with mathematics. Resilient by design. A new foundation for LLM cognition — coming November 2025.

Resources

Code of conduct

Contributing

Security policy

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages