{"slug": "hillock-local-brain-inspired-ai-memory-using-sqlite-and-hdc", "title": "Hillock – Local, brain-inspired AI memory using SQLite and HDC", "summary": "Developer Roan Dejager released Hillock, a local AI memory system that combines SQLite, Hebbian plasticity, and hyperdimensional computing to provide lightweight, brain-inspired memory for offline chatbots. In a benchmark using a tiny Qwen 1.5B model, Hillock achieved 30% retrieval accuracy and 30% gate accuracy, demonstrating the challenges of running complex memory systems on small models. The project is an experimental prototype not intended for production use.", "body_md": "Hi! This is **Hillock**, which is basically a local, personal memory system I've been hacking on because standard vector databases always felt way too heavy and complicated just to run a quick, offline chatbot on my own computer.\n\n**Heads up:** This project is very much a work in progress, and honestly, it isn't all that. It's just a fun personal experiment I'm working on to see if we can use brain-inspired math to make local AI memory better. It is definitely not a finished, production-ready product, so expect some clunky parts and weird bugs.\n\nI put this prototype through a massive, highly rigorous 30-sentence scientific benchmark with complex sentence structures, deep distractors, and tricky \"hard negative\" queries. Running a tiny local Qwen 1.5B model, here is how it did:\n\n**Retrieval Accuracy**:** 30.0%**(It retrieved the correct facts for some of the highly complex queries, but the tiny model missed others during extraction).**Gate Accuracy**:** 30.0%**(It successfully blocked many unanswerable/hallucinatory queries, though some leaks occurred due to tiny model extraction errors).\n\n*(For a more detailed technical breakdown of these metrics and why running a tiny 1.5B model on complex grammar is actually quite hard, check out the Benchmark section at the bottom.)*\n\nHere is a quick look at how data moves through the system:\n\n```\n       [Raw Text / PDFs]\n               │\n               ▼  (Parallel Ingestor)\n       [ Ollama (Qwen2) ]\n         │            │\n         ▼            ▼\n    [SQLite Graph]  [Hebbian Memory]\n         │            │\n         └─────┬──────┘\n               ▼\n       [VSA/HDC Reservoir] ──► [Gating Controller (Hillock)]\n```\n\n*(Note: This ASCII diagram was made with AI, so it might not be 100% correct or perfectly aligned, but it shows the general idea of how things connect.)*\n\nBasically, it splits the work into a few different layers:\n\n- 💾\n**SQLite Graph**: Stores the permanent, hard facts as simple triples (like`Marie_Curie`\n\n->`born_in`\n\n->`Poland`\n\n) so the system has a solid ground truth. - ⚡\n**Hebbian Plasticity**: Dynamically tracks which entities are being talked about in the chat and strengthens the connections between them, like a simple digital synapse. - 🌀\n**Hyperdimensional Computing (HDC)**: Uses a 10,000-dimensional vector that constantly updates with conversational history, which helps the system resolve pronouns (like \"he\" or \"she\") and decide when to block a query to prevent hallucinations.\n\nIf you actually want to try running this clunky prototype, it is highly recommended to set up a clean Python virtual environment so you do not mess up your global packages. You will also need [Ollama](https://ollama.com/) installed and running locally.\n\n```\ngit clone https://github.com/roandejager/Hillock.git\ncd Hillock\n# Create the environment\npython -m venv .venv\n\n# Activate it (Windows)\n.venv\\Scripts\\activate\n\n# Activate it (Mac/Linux)\nsource .venv/bin/activate\npip install -r requirements.txt\nollama pull qwen2:1.5b\npython main.py\n```\n\nInside the console, you can use these commands:\n\n`/ingest [filepath]`\n\n— Index a local`.txt`\n\nor`.pdf`\n\nfile.`/mode [strict/balanced/conversational]`\n\n— Change how conversational the AI is.`/reset`\n\n— Wipe the SQLite database and reset the HDC memory space.\n\nHere is the exact diagnostic output from the upgraded, highly rigorous evaluation script (`evaluate_hillock_PROTO_ish.py`\n\n):\n\n```\n--------------------------------------------------\n  * Extraction Precision : 10.6%  (Correctly structured factual nodes)\n  * Extraction Recall    : 22.7%  (Completeness of indexed relations)\n  * Retrieval Accuracy   : 30.0%  (Factual accuracy on answerable queries)\n  * Gate Accuracy        : 30.0%  (Hallucination defense rate)\n--------------------------------------------------\n```\n\n**The 10.6% Extraction Precision & 22.7% Recall**: We pushed the evaluation set to a massive** 30 complex, multi-subject sentences**spanning Quantum Physics, Computer Science, Space Exploration, and Philosophy. A tiny 1.5B parameter model (`qwen2:1.5b`\n\n) is simply too small to parse this much dense text without getting confused. It hallucinated relationships like`[James_Watson] -[discovered]-> [double-helix_model_of_DNA]`\n\nor`[Grace_Hopper] -[became_a_pioneer]-> [developed_the_first_compiler]`\n\n.**The \"Newton / Galileo / Aristotle\" Blocks**: Because the 1.5B model failed to parse their clean relations during the parallel ingestion phase, those questions were safely blocked during step 2 (resulting in correct blocks for unanswerable ones but false blocks for answerable ones).**The \"Edison / Feynman\" Leaks**: Because the 1.5B model extracted noisy relations during ingestion (like`[Heinrich_Hertz] -[born_in]-> [Hamburg,_Germany]`\n\n), when asked about unmentioned things (like who Hertz collaborated with), the gate opened on the birth fact, resulting in \"leaks\" under the strict test suite.**Vector Normalization**: The retriever matching itself is mathematically highly stable. By keeping all candidate facts strictly bound to exactly 3 unique components (Subject, Object, and best-matching Predicate word), we prevent shorter facts from having artificially higher similarity scores.\n\n`config.py`\n\n— Holds all the hyperparameters (HDC dimensions, decay rates, etc.).`database.py`\n\n— The SQLite interface for symbolic fact storage.`ingestor.py`\n\n— Spawns parallel worker threads to chunk and parse documents.`plasticity.py`\n\n— Tracks Hebbian co-activation weights betwee", "url": "https://wpnews.pro/news/hillock-local-brain-inspired-ai-memory-using-sqlite-and-hdc", "canonical_source": "https://github.com/roandejager/Hillock", "published_at": "2026-06-14 20:59:50+00:00", "updated_at": "2026-06-14 21:12:25.261916+00:00", "lang": "en", "topics": ["ai-research", "ai-tools", "large-language-models", "ai-infrastructure"], "entities": ["Hillock", "Roan Dejager", "SQLite", "Qwen 1.5B", "Ollama", "Qwen2"], "alternates": {"html": "https://wpnews.pro/news/hillock-local-brain-inspired-ai-memory-using-sqlite-and-hdc", "markdown": "https://wpnews.pro/news/hillock-local-brain-inspired-ai-memory-using-sqlite-and-hdc.md", "text": "https://wpnews.pro/news/hillock-local-brain-inspired-ai-memory-using-sqlite-and-hdc.txt", "jsonld": "https://wpnews.pro/news/hillock-local-brain-inspired-ai-memory-using-sqlite-and-hdc.jsonld"}}