Source-linked AI summary
SuperLocalMemory V3: Information-Geometric Foundations for Zero-LLM Enterprise Agent Memory
Varun Pratap Bhardwaj
TL;DR
Persistent agent memory lacks mathematical foundations for retrieval, lifecycle management, and consistency. This paper introduces SLM-V3, combining information-geometric retrieval, sheaf cohomology, and Riemannian Langevin dynamics, and reports +12.7 pp over an engineering baseline on LoCoMo, with 72–78% retrieval quality and a zero-LLM compliant configuration. The results support local-first memory architectures with measurable mathematical benefits, while evaluation remains centered on conversational memory and zero-LLM accuracy remains below LLM-dependent systems.
Problem
Persistent agent memory lacks principled foundations for retrieval, lifecycle management, and contradiction detection, limiting theoretical soundness as deployments span longer and more complex workflows.
Method
SLM-V3 combines a Fisher-information-weighted retrieval metric, sheaf cohomology for contradiction detection, and Riemannian Langevin dynamics for memory lifecycle management.
Results
+12.7 pp over the engineering baseline across six LoCoMo conversations, with +19.9 pp on the most challenging conversations; retrieval quality reaches 72–78% on LoCoMo.
Takeaways & Limitations
The results support a local-first memory architecture in which mathematical layers improve retrieval performance and enable a zero-LLM configuration with EU AI Act compliance.
Takeaways & Limitations
Evaluation focuses on two-person conversational memory in LoCoMo, while real enterprise memory involves multi-user and multi-project contexts; Mode A raw scores remain below LLM-dependent systems.
Abstract
from arXiv · showhide
Persistent memory is a central capability for AI agents, yet the mathematical foundations of memory retrieval, lifecycle management, and consistency remain unexplored. Current systems employ cosine similarity for retrieval, heuristic decay for salience, and provide no formal contradiction detection. We establish information-geometric foundations through three contributions. First, a retrieval metric derived from the Fisher information structure of diagonal Gaussian families, satisfying Riemannian metric axioms, invariant under sufficient statistics, and computable in O(d) time. Second, memory lifecycle formulated as Riemannian Langevin dynamics with proven existence and uniqueness of the stationary distribution via the Fokker-Planck equation, replacing hand-tuned decay with principled convergence guarantees. Third, a cellular sheaf model where non-trivial first cohomology classes correspond precisely to irreconcilable contradictions across memory contexts. On the LoCoMo benchmark, the mathematical layers yield +12.7 percentage points over engineering baselines across six conversations, reaching +19.9 pp on the most challenging dialogues. A four-channel retrieval architecture achieves 75% accuracy without cloud dependency. Cloud-augmented results reach 87.7%. A zero-LLM configuration satisfies EU AI Act data sovereignty requirements by architectural design. To our knowledge, this is the first work establishing information-geometric, sheaf-theoretic, and stochastic-dynamical foundations for AI agent memory systems.
1 Introduction
The paper frames persistent agent memory as lacking mathematical foundations for retrieval, lifecycle management, and consistency, then introduces SLM-V3 to address these gaps with information geometry, sheaf cohomology, and stochastic dynamics. Experiments report measurable gains on LoCoMo, including stronger improvements on difficult conversations and cloud-independent retrieval.
- Motivation: Persistent agent memory remains mathematically rudimentary despite advances in reasoning, tool use, and multi-step planning.The paper identifies this gap as a theoretical bottleneck for multi-session conversations, long-horizon tasks, and collaborative workflows.
- Three open problems: Current memory systems commonly use cosine similarity, heuristic decay, and no formal contradiction detection.The paper presents these practices as recurring deficiencies across surveyed systems.
- Our approach: SLM-V3 integrates Fisher-information retrieval, sheaf-cohomological contradiction detection, and Riemannian Langevin lifecycle dynamics into a four-channel architecture.The Fisher metric is variance-weighted and has proven metric properties, sufficient-statistic invariance, and Θ(d) geodesic computability; the lifecycle dynamics converge to a unique stationary distribution.
- Empirical evidence: The three mathematical layers improve LoCoMo performance by +12.7 percentage points on average over the ablated engineering baseline and by +19.9 pp on the most challenging conversations.The reported evaluation covers six conversations and uses LLM-as-Judge scoring.
- Empirical evidence: The full four-channel architecture achieves ∼75% retrieval quality without cloud dependency, while mathematical layers provide a +12 pp gain on multi-hop questions.Retrieval quality measures relevance of retrieved context independently of answer generation.
- Regulatory context: A zero-LLM configuration executes retrieval, scoring, and lifecycle operations locally on CPU and is designed to satisfy EU AI Act data sovereignty requirements.The paper evaluates zero-LLM, local-LLM, and cloud-augmented configurations across a privacy–capability gradient.
2 Background
This section introduces mathematical and neuroscientific foundations for SLM-V3, including complementary memory stores, information geometry, hyperbolic geometry, rate–distortion theory, and sheaf-based consistency.
- Foundations: SLM-V3 draws on mathematical foundations to connect concrete AI memory failure modes with geometric, topological, and information-theoretic tools.The framework motivates its architecture through information geometry, hyperbolic geometry, rate–distortion theory, and sheaf cohomology.
- Neuroscientific foundations: The complementary learning systems hypothesis distinguishes a fast episodic store from a slow semantic store that consolidates structured knowledge.The episodic store rapidly encodes experiences, while the semantic store gradually consolidates generalizable knowledge through replay.
- Neuroscientific foundations: The dual-store architecture is intended to prevent catastrophic interference by separating new episodic encoding from consolidated semantic knowledge.The stores operate on different timescales and use different learning rules.
- Information geometry: Fisher information supplies an intrinsic metric on statistical manifolds, and the Fisher–Rao distance is invariant under sufficient statistics.For diagonal Gaussians, the metric decomposes into one-dimensional components and supports efficient computation.
- Information geometry: For diagonal Gaussian representations, high-variance dimensions contribute less to distance while low-variance dimensions contribute more, unlike cosine similarity.The resulting distance can be evaluated in O(d) time.
- Information theory: Rate–distortion theory supports progressive disclosure by relating representation rate to distortion, yielding a depth bound of Θ(log N).For Gaussian sources, the rate–distortion function is logarithmic in σ2/D.
- Consistency: Sheaf cohomology measures whether local memory data extends globally, with nonzero H1 signaling inconsistency across contexts.SLM-V3 constructs a sheaf of memory assertions over project and context topology.
3 Related Work
The related-work discussion positions SLM-V3 against vector, graph, multimodal, hyperbolic, associative, and neuroscientifically motivated memory systems, emphasizing its distinct mathematical integration and local operation.
- Agent memory systems: MemGPT delegates memory management to the LLM, inheriting model biases and context-window constraints.Its virtual memory hierarchy is inspired by operating-system paging.
- Agent memory systems: Mem0 combines cosine retrieval with a knowledge graph and reports 34.20% F1 on LoCoMo, illustrating limitations for complex conversational memory.SLM-V3 addresses this comparison with multi-channel fusion and Fisher–Rao uncertainty weighting.
- Agent memory systems: SimpleMem reports 43.24% F1 on LoCoMo using semantic search, BM25, symbolic filtering, and several LLM-based preprocessing and reflection stages.Its lossless restatement step resolves pronouns and relative temporal references during ingestion.
- Positioning: Existing agent-memory systems commonly combine vector or graph retrieval with engineering heuristics, while SLM-V3 adds geometric, topological, and stochastic foundations.Its framework is designed to operate with any underlying embedding model.
- Geometric methods: HyperbolicRAG uses hyperbolic embeddings for hierarchical retrieval, whereas SLM-V3 uses the Poincaré ball as a substrate for Langevin-driven forgetting.The current evaluated system nevertheless operates in Euclidean embedding space.
- Associative memory: The current implementation does not include a dedicated Hopfield retrieval channel, leaving associative retrieval as planned future work.The four active channels are semantic, BM25, entity graph, and temporal.
- Neuroscientific foundations: SLM-V3 connects complementary learning systems theory to a dual-store architecture with episodic and semantic memory components.The semantic and episodic stores are motivated by complementary fast and slow learning systems.
4 Architecture
SLM-V3 combines four specialized retrieval channels, weighted rank fusion, query-dependent reranking, consistency filtering, lifecycle weighting, and three operating modes spanning local to cloud-assisted execution.
- Retrieval architecture: Four independent channels target semantic, lexical, relational, and temporal signals before fusion through weighted reciprocal rank fusion.The architecture also adds profile lookup, scene expansion, and bridge discovery for entity-centric, narrative, and multi-hop queries.
- Design principles: The design prioritizes channel diversity, mathematical guarantees, and local-first execution over single-metric retrieval, learned heuristics, and mandatory cloud use.Cloud LLMs are treated as optional enhancements rather than requirements.
- Core channels: Channel 1 uses Fisher–Rao semantic scoring with a graduated transition from cosine similarity to uncertainty-weighted retrieval for mature memories.The transition begins after fewer than 10 accesses and stabilizes cold-start retrieval.
- Core channels: BM25 captures exact lexical matches, entity-graph spreading activation supports multi-hop relational queries, and temporal scoring uses observation, reference, and validity dates.The entity graph uses three hops with decay factor γ = 0.7.
- Fusion: Weighted reciprocal rank fusion uses query-type-specific channel multipliers, with temporal queries boosting temporal retrieval and multi-hop queries boosting entity-graph retrieval.The fusion constant is k = 60.
- Reranking: Cross-encoder reranking blends semantic scores with fused ranks using α = 0.5 for multi-hop and temporal queries and α = 0.75 for single-hop and open-domain queries.The blend preserves channel diversity while promoting semantically precise matches.
- Post-processing: Store-time sheaf filtering detects contradictions and creates supersedes edges, while lifecycle weighting adjusts retrieval for active, cold, and archived memories.Mode C additionally performs a two-round LLM-based sufficiency check; Mode A uses heuristic entity coverage and score thresholds.
- Operating modes: The three operating modes trade accuracy against cloud dependency, ranging from fully local zero-LLM execution to cloud-assisted retrieval.Mode A performs storage, retrieval, and lifecycle management without network calls and is described as achieving EU AI Act compliance by architectural design.
5 Method: The SLM-V3 Architecture
The SLM-V3 method integrates four retrieval channels with three mathematical layers: Fisher–Rao uncertainty weighting, sheaf-based contradiction detection, and Riemannian Langevin lifecycle dynamics.
- System representation: SLM-V3 stores embeddings, uncertainty parameters, extracted facts and entities, and temporal and access metadata in a unified memory representation.The system persists its ingestion outputs and metadata for later retrieval and lifecycle processing.
- Ingestion: Ingestion extracts embeddings, metadata, entities, facts, emotions, and beliefs; updates the entity graph; checks sheaf consistency; applies entropy gating; and persists data to SQLite.The pipeline creates supersedes edges when contradictions are detected.
- Retrieval pipeline: Retrieval classifies queries and runs semantic, BM25, entity-graph, and temporal channels before fusion, scene expansion, bridge discovery, and top-k selection.The semantic channel uses Fisher-information weighting, while the supplementary stages add profile, narrative, and multi-hop context.
- Mathematical layers: The architecture presents Fisher–Rao retrieval, sheaf cohomology, and Riemannian Langevin dynamics as distinct layers operating at retrieval, store, and background lifecycle stages.These layers address uncertainty, contradiction detection, and memory lifecycle respectively.
- Fisher–Rao retrieval: Fisher–Rao retrieval replaces cosine similarity with a variance-weighted metric in which lower-variance dimensions contribute more strongly.The metric is a first-order approximation to the full Fisher–Rao geodesic and has O(d) score computation.
- Fisher–Rao retrieval: A graduated ramp blends cosine and Fisher–Rao scores over the first 10 accesses so unreliable cold-start variance estimates do not penalize new memories.The blending coefficient is α_i = min(n_access,i/10, 1).
- Sheaf consistency: Sheaf cohomology operates at store time, where non-trivial first cohomology classes correspond to contradictions across memory contexts.The consistency layer creates supersedes edges for detected conflicts.
6 Theoretical Analysis
Theoretical analysis establishes metric properties for Fisher–Rao retrieval, convergence guarantees for Langevin-based memory lifecycles, and logarithmic bounds for progressive disclosure and effective memory capacity.
- Fisher–Rao retrieval: The Fisher–Rao distance on diagonal Gaussian families satisfies symmetry and the triangle inequality, is invariant under sufficient statistics, and is computable in Θ(d) time.The Fisher metric decomposes into one-dimensional Poincaré half-plane factors, supporting the metric properties and linear-time computation.
- Fisher–Rao retrieval: Fisher–Rao ranking can differ from cosine ranking in heteroscedastic settings by favoring low-variance, high-confidence memory dimensions.When candidate means have equal cosine similarity but one candidate has lower variance near the query, Fisher–Rao distance ranks it closer.
- Memory lifecycle: A Riemannian Langevin process on the Poincaré ball has a unique stationary distribution when the potential is twice differentiable and diverges at the boundary.The associated Fokker–Planck equation admits the stationary distribution, providing a well-defined equilibrium for lifecycle dynamics.
- Memory lifecycle: At equilibrium, frequently accessed memories concentrate near the Poincaré-ball origin, while rarely accessed memories diffuse toward the boundary's unbounded forgetting space.The hyperbolic volume factor gives the boundary infinite volume, a property unavailable in Euclidean geometry.
- Progressive disclosure: The optimal progressive-disclosure depth is logarithmic in the memory count when minimum distortion scales as σ2/N.With constant distortion-reduction ratio r, the depth is D∗(N) = log N / log r = Θ(log N).
7 Experiments
SLM-V3 is evaluated on LoCoMo across deployment modes, baselines, ablations, and six-conversation analyses. Results show strong retrieval without cloud dependency, substantial mathematical-layer gains, and scale-related retrieval concerns.
- Experimental configurations: Mode A Retrieval isolates retrieval quality with external answer synthesis, while Mode A Raw performs zero-LLM retrieval and answer construction.Mode C adds cloud embeddings and LLM answer generation.
- LoCoMo results: Mode A Retrieval reaches 74.8% aggregate accuracy without cloud dependency during retrieval, outperforming Mem0 at 64.2%.The gap between Mode A Raw and Mode A Retrieval is attributed primarily to answer synthesis rather than knowledge retrieval.
- LoCoMo results: 87.7% accuracy is reported for Mode C on 81 scored questions from conv-30, but full evaluation across all ten conversations remains ongoing.The single-conversation result should therefore be interpreted cautiously because of the limited sample size.
- Ablation study: Cross-encoder removal causes a −30.7 pp accuracy change, while Fisher metric removal causes −10.8 pp and BM25 removal causes −6.5 pp.The three mathematical layers contribute −7.6 pp in aggregate when disabled, whereas temporal-channel removal changes accuracy by only −0.2 pp on conversation 30.
- Information-geometric retrieval: +12.7 percentage points is the average retrieval-quality improvement from mathematical layers across six conversations, ranging from +6.0 pp to +19.9 pp.The largest gains occur on harder conversations with sparsely connected memories, including conv-44 at +19.9 pp and conv-49 at +18.8 pp.
- Scale analysis: At N = 10^5 memories, cosine retrieval produces roughly 100 near-neighbours within the ε-cap, exceeding a typical K = 20 retrieval budget.The paper argues that this crowd contaminates cosine top-K lists, while Fisher–Rao discrimination becomes more valuable under heteroscedastic variance profiles.
- Scale analysis: Enterprise-scale analysis predicts ranking noise and contradiction density for memory systems operating at N ≥ 10^5.The ranking prediction follows from cosine-neighbour growth, while the contradiction prediction is stated for pc ≥ 10^-6.
8 Discussion and Conclusion
The paper concludes that its mathematical layers improve retrieval while supporting local-first, privacy-preserving operation, but identifies benchmark, zero-LLM, contradiction, and covariance limitations.
- Discussion: +12.7 percentage points separate the full mathematical system from the engineering baseline, with +19.9 pp on the hardest LoCoMo conversation.The four layers are Fisher–Rao retrieval, sheaf cohomology, and Riemannian Langevin dynamics in the reported ablation.
- Limitations: The zero-LLM configuration reaches 75% retrieval quality, but raw answer accuracy is 60% because extraction heuristics lose information during response assembly.Suggested remedies include query-specific templates, adaptive snippet selection, and local-LLM synthesis.
- Limitations: The evaluation focuses on two-person LoCoMo conversations, where genuine contradictions are uncommon and broader multi-user, multi-project settings remain planned.The paper reports that removing sheaf consistency caused only −1.7 pp degradation on LoCoMo.
- Limitations: On benchmark data with n_access=0, Fisher weighting reduces to cosine, while diagonal covariance enables O(d) computation but omits cross-dimensional dependencies.The graduated ramp activates after more than 10 accesses; full covariance would require O(d^3) computation and is considered impractical at high dimensionality.
- Conclusion: The conclusion presents Fisher retrieval, sheaf cohomology, and Riemannian Langevin dynamics as the paper’s three mathematical contributions.The stated contributions cover retrieval, contradiction detection, and memory lifecycle convergence guarantees.
- Discussion: The four-channel pipeline achieves 72–78% retrieval quality on LoCoMo, while Mode A provides zero-LLM operation with EU AI Act compliance.Mode A executes locally without cloud dependency; Mode C approaches leading systems with an open-source, local-first architecture.
Author Biography
The supplied biography describes the author’s enterprise-technology and legal background, research program, and related publications; the remaining passages provide technical proof material rather than biography.
- Author Biography: Varun Pratap Bhardwaj is an Accenture Senior Manager and Solution Architect with 15 years of enterprise-technology experience.He holds dual qualifications in technology and law, including an LL.B.
- Author Biography: His research focuses on mathematically principled infrastructure for autonomous AI agents across the full agent-development lifecycle.The biography connects his technology and legal qualifications with AI systems engineering and regulatory compliance.
- Author Biography: His published work includes SuperLocalMemory, AgentAssay, SkillFortify, and Agent Behavioral Contracts.The present work extends this research program toward geometric and topological foundations for agent memory.
- Technical Appendix: The supplied technical passages prove Fisher–Rao metric properties, including metric axioms, sufficient-statistic invariance, and Θ(d) computation.The diagonal covariance decomposition permits a single running accumulator and constant auxiliary space.
A.2 Proof of Theorem 6.3 (Langevin Stationary Distribution)
The proof constructs a Gibbs stationary density for Riemannian Langevin dynamics, verifies zero probability flux, and establishes integrability, existence, ergodicity, and uniqueness.
- Fokker–Planck formulation: The Riemannian Langevin SDE induces a Fokker–Planck equation for a density relative to the Riemannian volume form.The formulation uses the Riemannian gradient, divergence, Laplace–Beltrami operator, and volume element.
- Stationary density: The Gibbs ansatz defines the stationary density through exp(−U/T) with normalization over the manifold.The corresponding Lebesgue density includes the conformal volume factor λ^d.
- Stationarity verification: Zero flux verifies stationarity because the drift and diffusion terms cancel in divergence form.The proof concludes that J ≡ 0, hence the divergence of the flux vanishes.
- Integrability: The boundary condition U(ξ) → ∞ suppresses the conformal-volume divergence and makes the normalization integral finite.The proof separates a compact region from a boundary annulus and uses exponential suppression near the boundary.
- Uniqueness: Geodesic completeness and a confining potential yield a non-explosive Markov process, while ellipticity gives ergodicity and uniqueness of the stationary distribution.The argument combines existence of a stationary measure with the fact that an ergodic process on a connected state space has at most one stationary distribution.
A.3 Proof of Theorem 6.5 (Optimal Progressive-Disclosure Depth)
The supplied appendix derives logarithmic progressive-disclosure depth under Gaussian rate–distortion assumptions and separately records a Hopfield effective-memory capacity bound.
- Rate–distortion derivation: The proof derives the rate–distortion function for a Gaussian memory source under per-coordinate squared-error distortion.The rate is measured in nats or bits depending on the logarithm base, and independent coordinates preserve the scalar rate expression.
- Progressive disclosure: Progressive disclosure reduces distortion geometrically across levels, with each refinement adding 1/2 log r nats.The level count satisfies D_L = D_max · r^-L = D_min.
- Optimal depth: D*(N) = Θ(log N) follows by matching an achievable level count with the rate–distortion converse.The lower bound distributes the required rate across levels under the constant-ratio constraint.
- Generalization: The Θ(log N) depth bound remains unchanged for sub-Gaussian sources with variance proxy σ².The Gaussian rate–distortion function supplies the upper bound, while the converse remains source-independent.
- Hopfield capacity: The appendix also bounds effective Hopfield memories by O(d^(d−1)) through fixed-point basins and sphere-packing capacity.The constant depends on the separation parameter δ and inverse temperature β.
- Hopfield dynamics: At high β, stored patterns approximate fixed points and attraction basins shrink toward points.The proof states that ε(β) → 0 as β → ∞.
- Implementation: The implementation appendix summarizes a five-stage retrieval pipeline and configurable system components, with exact configurations available in the repository.The stages include query classification, parallel channel search, bridge discovery for multi-hop queries, and cross-encoder reranking.
B.4 Compute Requirements
The evaluation used containerized Azure environments with fixed CPU and memory allocations across three subscriptions. Appendix materials document per-conversation results and partial runs interrupted during answer generation.
- 111 containers processed one conversation–configuration pair each across three Azure subscriptions.Each container used 2 vCPUs and 4 GB RAM.
- The evaluation covered 10 LoCoMo conversations and 8 ablation configurations.
- Appendix results include per-conversation breakdowns, Mode C details, ablation completeness, and Mode A re-scoring methodology.
- Partial conversations completed ingestion and retrieval but were interrupted during answer generation, so scores cover only answered questions.
C.2 Mode C Detailed Results
Mode C results are analyzed through category-level reporting and a retrieval re-scoring protocol that separates retrieval quality from answer construction. The cloud-augmented analysis finds that removing the cross-encoder slightly improves open-domain performance while leaving multi-hop accuracy perfect.
- Mode C Detailed Results: Mode C category results are reported for conv-30 across 81 fully completed questions, including a cross-encoder-off variant.
- Mode C Detailed Results: Removing the cross-encoder improves Mode C by +2.4 pp in open-domain questions.The cross-encoder can demote broadly relevant facts in favor of narrowly matching passages.
- Mode C Detailed Results: Multi-hop accuracy remains perfect with or without the cross-encoder in the cloud-augmented setting.The passage attributes relational reasoning at this conversation scale primarily to cloud embedding quality.
- Retrieval Re-scoring: Mode A re-scoring runs retrieval, generates answers with gpt-4.1-mini, applies the same LLM-as-Judge threshold, and records binary question scores.The protocol uses a 1–5 Likert scale with a ≥4 threshold.
- Retrieval Re-scoring: The re-scoring estimates whether Mode A Raw’s deficit reflects missing LLM synthesis or an actual retrieval gap.
C.4 Entity Channel Ablation (Complete)
The complete entity-channel ablation disables the entity graph across all ten LoCoMo conversations while retaining the other channels. Its aggregate effect is modest but varies substantially by conversation.
- Complete Ablation: The entity-off ablation covers all ten LoCoMo conversations and 1,540 scored questions.
- Aggregate Effect: −1.0 pp separates the entity-off average of 59.4% from the full-system average of 60.4%.Both averages are question-weighted.
- Conversation Dependence: Conv-26 shows the largest drop at −8.6 pp, where densely interconnected entities make spreading activation especially complementary.