SuperLocalMemory: Local-First Memory Architectures
- SuperLocalMemory is a family of local-first memory architectures where memory proximity is treated as an explicit variable to optimize latency and energy consumption.
- It integrates both software systems with on-device, persistent memory and hardware nodes with micrometer-scale memory tiers to support AI agents and fast accesses.
- The architecture employs hybrid retrieval, adaptive personalization, and trust-based lifecycle management to balance performance, security, and robustness.
Searching arXiv for the cited SuperLocalMemory-related papers and adjacent context. SuperLocalMemory denotes a family of local-first memory architectures in which proximity between compute and stored state is treated as an explicit systems variable rather than an implicit implementation detail. In one line of work, it refers to compute-memory nodes built with 2.5D/3D integration, where private local memory sits at micrometer-scale distances from compute tiles and deeper tiers are exposed as in-package shared memory and off-package DRAM (Liu et al., 28 Aug 2025). In another, it refers to on-device memory systems for AI agents, typically organized around local SQLite or libSQL storage, hybrid retrieval, explicit provenance, and software-visible control over ranking, forgetting, and consistency (Bhardwaj, 17 Feb 2026, Bhardwaj, 15 Mar 2026). Across these usages, the central idea is that memory behavior improves when distance, ownership, capacity, trust, and movement are made first-class.
1. Software-system interpretation and layered architecture
In the AI-agent literature, SuperLocalMemory is a local-first persistent memory substrate rather than a cloud memory service. A MemX-inspired blueprint uses a single-file libSQL database to hold all user memories locally, with the engine written in Rust and an OpenAI-compatible embedding endpoint supplying semantic vectors for queries and inserted memories; the schema includes a memories table, an FTS5 virtual table memories_idx, a vector extension on memories(embedding), and a memory_links table with relation types such as similar, related, contradicts, extends, supersedes, caused_by, and temporal (Sun, 17 Mar 2026). This design makes retrieval persistent, searchable, and explainable while remaining structurally simple.
The multi-agent formulation extends this local-first premise into a four-layer progressive store plus an event-driven coordination panel. Core data live in memory.db, while behavioral data used for re-ranking live in an isolated learning.db. The layers are a SQLite 3.51.1 storage engine with FTS5 and WAL, a hierarchical index based on a materialized-path parent-to-child scheme, a knowledge-graph clustering layer built from TF-IDF key-term extraction and Leiden community detection, and a pattern-learning layer built on a Beta-Binomial Bayesian model across eight technology categories. An adaptive learning layer then sits between base search and delivery, and the coordination panel adds an event bus, agent registry, trust scorer, and provenance tracker (Bhardwaj, 17 Feb 2026). The resulting architecture is explicitly fault-tolerant in the narrow sense stated in the paper: if a high-level layer fails, the system falls back on the next one.
2. Physical SuperLocalMemory and distance-explicit memory hierarchy
The hardware interpretation of SuperLocalMemory is centered on compute-memory nodes that reverse the premise of very large shared homogeneous memories. Instead of a many-terabyte or petabyte shared pool, memory is broken into smaller slices tightly coupled with compute elements. A logic die contains simple cores or accelerator engines; a stacked die or die-to-die hybrid-bonded cache holds private local memory banks at distances of ; an in-package shared memory cube such as an HBM stack sits at ; and conventional off-package DRAM remains on the PCB at roughly (Liu et al., 28 Aug 2025). The private local banks are explicitly managed rather than hardware-cached, so software is responsible for placing hot working sets in the lowest-latency tier.
This architecture is formalized through distance-dependent models for latency, energy, and bandwidth:
The representative instantiation assigns Level-0 private local memory a capacity of approximately per tile at , Level-1 in-package shared memory a capacity of approximately per stack at , and Level-2 off-package DRAM a capacity of approximately per socket at (Liu et al., 28 Aug 2025). In the worked example, the corresponding latencies are approximately 0, 1, and 2; the per-bit energies are approximately 3, 4, and 5; and the bandwidths are approximately 6, 7, and 8 per channel. For an access distribution with 9, 0, and 1, the model yields an effective access time of about 2 and average energy of about 3, versus 4 and 5 when all accesses go to off-chip DRAM. The paper summarizes this as roughly 6 lower effective latency and 7 lower energy when 8 of the working set is kept in tiers 0 and 1.
3. Retrieval, fusion, and personalization
The canonical software retrieval pipeline is hybrid rather than purely vector-based. In the MemX-derived formulation, retrieval proceeds through query embedding, vector recall, keyword recall, Reciprocal Rank Fusion, four-factor re-ranking, z-score normalization with sigmoid, low-confidence rejection, deduplication, and return of Top-9 results with per-item explanations (Sun, 17 Mar 2026). Vector recall is top-0 by cosine similarity, backed either by DiskANN with 1 search or by brute-force 2 with SIMD in Rust; keyword recall uses FTS5 with the unicode61 tokenizer; and RRF merges the vector and keyword ranked lists with default 3. The four re-ranking factors are semantic, recency, frequency, and importance, with default weights 4, 5, 6, and 7. The rejection rule returns the empty set when keyword recall is empty and the maximum vector cosine score falls below 8, described as the only rule with zero false negatives on the 43 custom queries.
The multi-agent system adds an explicitly adaptive learning-to-rank layer. Its behavioral analysis is three-layered: cross-project technology preferences with temporal decay 9 days, project context detection from active paths, recent tags, cluster membership, and explicit project labels, and workflow pattern mining over time-weighted sliding windows. Re-ranking then proceeds in phases: Phase 0 makes no change for fewer than 20 feedback signals; Phase 1 applies a rule-based boost over a 9-dimensional feature vector consisting of BM25, TF-IDF similarity, tech match, project match, workflow fit, source quality, importance, recency, and access frequency; Phase 2 trains a LightGBM GBDT re-ranker with a LambdaRank objective once there are at least 200 signals and at least 50 queries (Bhardwaj, 17 Feb 2026). This local personalization is explicitly designed to avoid cloud calls and to preserve base accuracy while changing within-topic ordering.
Later versions generalize hybrid retrieval into multi-channel retrieval. The mathematically grounded version uses four channels—semantic Fisher–Rao retrieval, BM25 keyword matching, entity-graph spreading activation, and temporal proximity—fused by weighted reciprocal rank fusion and refined by a lightweight cross-encoder reranker (Bhardwaj, 15 Mar 2026). The V3.3 formulation expands this to seven channels: semantic retrieval over embeddings, BM25 keyword retrieval, entity-graph traversal, temporal retrieval, spreading activation, consolidation gists, and Hopfield associative retrieval. These channel outputs are combined through weighted RRF with 0, and the top 50 candidates are passed through an ONNX cross-encoder (ms-marco-MiniLM-L-6-v2) for final re-ranking (Bhardwaj, 6 Apr 2026). A recurring design claim across these papers is that local-first does not require a single-index or single-signal retrieval stack.
4. Trust, provenance, privacy, and poisoning defense
A defining concern in SuperLocalMemory’s multi-agent literature is memory poisoning, specifically OWASP ASI06. The principal defense combines architectural isolation with Bayesian trust scoring. Agents start with trust 1 in the default evaluation, and trust is updated as
2
where 3 is the magnitude of a behavioral signal and 4 is the number of signals observed so far. Positive signals include verified recall 5, consistent writes 6, and low error rate 7; negative signals include contradictory writes 8, flagged content 9, and anomalous burst 0. Agents with 1 are blocked from write and delete operations. Every memory records created_by, source_protocol, trust at write time, and a JSON provenance_chain of mutations, making isolation and audit of suspicious agents straightforward (Bhardwaj, 17 Feb 2026). The empirical trust table reports a benign-versus-malicious posterior mean gap of 2 in the single-poisoner case and a sleeper-agent degradation from 3 to 4, with zero false positives observed.
Privacy is implemented as a structural property rather than an access-control afterthought. The multi-agent system states that memory.db is a single, user-controlled SQLite file with WAL mode and zero network exposures, with no remote API calls for storing or retrieving memories; behavioral data, model checkpoints, and pattern-learning state remain in learning.db, which can be wiped with slm learning reset to satisfy GDPR Article 17 without deleting core memories (Bhardwaj, 17 Feb 2026). The mathematically grounded version makes a related claim at the architectural level: Mode A performs storage, retrieval, and lifecycle management on the user’s device, and no personal data or embeddings leave the endpoint, which the paper presents as satisfying EU AI Act data governance and GDPR erasure requirements by design (Bhardwaj, 15 Mar 2026). V3.3 reiterates the same local-only posture in implementation terms, stating that all memory resides in local SQLite files and no data are sent to the cloud (Bhardwaj, 6 Apr 2026).
5. Mathematical retrieval, contradiction detection, and lifecycle dynamics
The most formal SuperLocalMemory variant replaces heuristic similarity with information geometry. Each memory embedding is modeled as a diagonal Gaussian 5, and retrieval is defined on the statistical manifold induced by the Fisher information tensor. For the diagonal Gaussian family, the Fisher information matrix decomposes into 6 independent one-dimensional factors, and the paper states that the resulting Fisher–Rao distance satisfies identity of indiscernibles, symmetry, the triangle inequality, invariance under sufficient statistics via Čencov’s theorem, and 7 computational complexity (Bhardwaj, 15 Mar 2026). In practice, retrieval uses an 8 Mahalanobis-style approximation,
9
with a graduated ramp that blends cosine similarity into this score over the first 10 accesses to mitigate cold-start bias.
The same paper formulates memory lifecycle as Riemannian Langevin dynamics on the hyperbolic Poincaré ball 0. Given a potential 1 encoding recency, frequency, and relevance, the state 2 evolves according to a stochastic differential equation with an Itô correction term arising from curvature, and the corresponding Fokker–Planck equation admits a stationary Gibbs measure
3
The paper contrasts this with exponential decay and TTL-style step deletion, arguing that the SDE yields a smooth, geometry-aware lifecycle independent of initialization (Bhardwaj, 15 Mar 2026). Consistency is handled separately through a cellular sheaf over a context graph. Vertices index memory contexts, stalks are local embedding spaces, edge restriction maps align shared entities, and non-trivial first cohomology corresponds precisely to irreconcilable contradictions. Insertion triggers a check of the coboundary discrepancy; if any component exceeds a threshold 4, the older memory is marked superseded in the knowledge graph.
V3.3 extends these foundations in two directions. First, it introduces Fisher–Rao Quantization-Aware Distance (FRQAD), in which quantization is modeled as variance inflation with
5
The key property claimed is monotonic degradation: reducing the bit-width from 6 to 7 increases the distance from that memory to any other memory. Second, it couples forgetting to lifecycle-aware quantization. Memory strength is
8
with defaults 9, 0, 1, and 2, and retention is
3
Discrete states map retention to storage policy: Active for 4 at 32-bit, Warm for 5 at 8-bit, Cold for 6 at 4-bit, Archive for 7 at 2-bit, and Forgotten for 8, which deletes the memory. The extended SDE further modulates decay by source trust, with untrusted memories decaying up to 9 faster. This same version also introduces long-term implicit memory via soft prompts promoted from consolidated patterns once confidence and evidence thresholds are met, and prepends up to 1,500 tokens of such soft-prompt text at session start (Bhardwaj, 6 Apr 2026).
6. Empirical results, trade-offs, and stated limitations
Empirically, the software lineage emphasizes reproducible local retrieval and ranking. In the MemX evaluation, the custom Chinese benchmark reports Hit@1 = 91.3% and Hit@5 = 95.7% in the default scenario with 1,014 records, and 100.0% Hit@1 and Hit@5 in the high-confusion scenario with 600 records; on LongMemEval, fact-level granularity reaches Hit@5 = 51.6% and MRR = 0.380, while session-level granularity reaches Hit@5 = 24.6% and MRR = 0.183. The paper also reports that FTS5 full-text indexing yields a 1,100× speedup over LIKE at 100k records, keeping end-to-end search under 90 ms at fact granularity (Sun, 17 Mar 2026). These numbers delimit the performance envelope of a structurally simple local-first baseline.
The multi-agent system shifts emphasis from raw recall to operational robustness, poisoning defense, and personalization. It reports 10.6 ms median search latency, 1.4 KB per memory at 10,000-entry scale, and zero concurrency errors under 10 simultaneous agents using WAL with a serialized write queue. With the adaptive re-ranker enabled, NDCG@5 improves from 0.441 to 0.900 while MRR remains 0.90, at a latency increase from roughly 130 ms to 153 ms. The system is described as MIT-licensed and integrated with 17+ development tools via the Model Context Protocol (Bhardwaj, 17 Feb 2026). A plausible implication is that SuperLocalMemory’s local-first stance is being used not only for privacy but also for predictable deployment and auditability.
The mathematically grounded versions report a different performance profile. On LoCoMo, the version with Fisher–Rao retrieval, sheaf consistency, and Langevin lifecycle improves average accuracy across six conversations from 58.9% to 71.7%, a gain of +12.7 percentage points, with the largest dialogue-level gain reported as +19.9 pp. Its four-channel Mode A achieves 74.8% aggregate accuracy, and the cloud-augmented Mode C reaches 87.7% (Bhardwaj, 15 Mar 2026). V3.3, which adds FRQAD, Ebbinghaus adaptive forgetting, lifecycle-aware quantization, seven-channel retrieval, soft-prompt parameterization, and the auto-cognitive pipeline, reports 70.4% in zero-LLM Mode A, with +23.8 pp on multi-hop and +12.7 pp on adversarial queries relative to its stated baseline, while remaining 4.4 pp below the earlier Mode A result as a deliberate architectural trade-off (Bhardwaj, 6 Apr 2026). On the hardware side, the representative compute-memory-node model claims up to 0 faster average loads, up to 1 lower per-bit energy, and more than 2 higher per-byte bandwidth for local versus DRAM access (Liu et al., 28 Aug 2025).
The literature is equally explicit about limitations. The MemX-derived system reports Hit@5 3 on temporal questions and 4 on multi-session reasoning, identifies the single-threshold rejection rule as insufficient for adversarial overlaps, notes that tag-signature deduplication can hurt tag-free facts, and characterizes the current design as “needle-in-haystack,” returning only the most prominent topic for multi-topic queries (Sun, 17 Mar 2026). The multi-agent system’s graph construction is brute-force 5 in its default form, reaching 277 s at 5,000 memories and capped at 10,000 nodes, although an optional HNSW mode adds an 6 alternative (Bhardwaj, 17 Feb 2026). V3.3 reports a mixed-precision Recall@10 of 0.680 against a 1.000 all-float32 baseline, as well as a total Mode A memory footprint of approximately 1.12 GB including the embedding subprocess (Bhardwaj, 6 Apr 2026). These constraints underscore that SuperLocalMemory is not a single settled architecture but a research program spanning locality, explicit control, formalization, and security in persistent memory systems.