An Interpretable Memory Decision Controller for LLM Agents Based on Three-Signal Complementarity: Decoupling Confidence and Consistency
Organizations: School of Computer Science and Engineering, Tianjin University of Technology Tianjin, China
Abstract
Memory systems for large language models have focused predominantly on efficient retrieval, whereas the decision of whether retrieved memories should be trusted has received comparatively little attention. When the memory store contains conflicting positions, standard retrieval-augmented generation (RAG) blindly injects memories and amplifies hallucinations: in models susceptible to memory injection, the RAG hallucination rate under conflicting memories is markedly higher than that of a memory-free baseline. Inspired by memory signaling mechanisms in the prefrontal cortex, we propose the Memory Decision Layer (MDL), a zero-parameter memory decision controller situated between the retrieval and generation stages. Its core is a three-signal complementary encoder that fuses relevance, reliability, and task risk through QR-based orthogonal subspace projection and a meta-working-memory signal into an interpretable decision representation that quantifies the trustworthiness of retrieved memories. Building on this encoder, MDL explicitly decouples confidence from consistency and introduces risk inversion and explicit abstention. Evaluations on mainstream large language models and multiple open-source datasets show that MDL reduces the hallucination rate under conflicting memories by about 56.04% in general scenarios and approaches zero hallucination in high-risk scenarios. The controller is fully white-box: it relies purely on geometric operations, requires no trained parameters, and adds only about 0.14 ms per decision -- roughly 50x faster than the embedding-retrieval step that precedes it and four to five orders of magnitude faster than an LLM self-evaluation call.
Figures & tables
| Capability | RAG | MemGPT [ 2 ] | Reflexion [ 5 ] | Ours (MDL) |
|---|---|---|---|---|
| – decoupling | Implicit | Implicit | Explicit | |
| Risk opt-out | Partial | Explicit | ||
| Subspace attribution | Explicit | |||
| Direction auditing | Explicit |
| Hyperparameter | Value | Selection rationale |
|---|---|---|
| 16 | Accommodates three subspaces (5+5+6) with expressive margin; too small saturates the geometry, too large raises latency | |
| One extra dimension for the risk subspace to carry second-order risk modulation; dimensions matched to signal complexity (validated by ablation) | ||
| 0.20 | Sharpness of value encoding; too small overfits single points, too large loses directional expression; 0.20 lies on the directional-separability plateau | |
| 0.10 | Ensures , so principal gains dominate and monotonicity holds (Theorem 1 ) | |
| Heuristic allocation with relevance as the primary direction, reliability as secondary, and risk as tertiary | ||
| coefficients | Bounded second-order risk modulation of the relevance pathway ( ); removing it costs 1.7 pp (Table 7 ) |
| Baseline | Precise definition | Key implementation details |
|---|---|---|
| B1 (no memory) | No retrieved memory is injected; the LLM generates directly | Same LLM, sampling parameters, and context |
| B2 (standard RAG) | All candidate memories of the question are injected into the context before generation | Same LLM, sampling parameters, and prompt template; memory store per question (see Memory Construction above) |
| B3 (MDL, ours) | The proposed memory decision controller placed between retrieval and generation | Same hyperparameters as Table 2 , zero training |
| LR | Supervised logistic regression on the three signals | Regularization , 5-fold cross-validation |
| MLP | Multi-layer perceptron classifier with hidden layers | ReLU activation, at most 500 training iterations, early stopping |
| XGBoost | Extreme gradient-boosted tree classifier | 100 estimators, max depth 4, 5-fold cross-validation |
| TruthfulQA | HaluEval | |||
|---|---|---|---|---|
| Baseline | Overall | High-risk | Overall | High-risk |
| B1 (no memory) | 0.160 | 0.124 | 0.083 | 0.040 |
| B2 (standard RAG) | 0.043 | 0.107 | 0.065 | 0.027 |
| B3 (MDL) | 0.047 | 0.000 | 0.070 | 0.013 |
| System | Overall hallucination | High-risk | Refusal |
|---|---|---|---|
| B1 (no memory) | 0.155 | 0.110 | 0.380 |
| B2 (standard RAG) | 0.048 | 0.119 | 0.880 |
| CRAG (prompt-based) [ 8 ] | 0.050 | 0.059 | 0.645 |
| Self-RAG (prompt-based) | 0.005 | 0.000 | 0.833 |
| B3 (MDL, ours) | 0.048 | 0.000 | 0.877 |
| Configuration | Accuracy | Acc | ||
|---|---|---|---|---|
| only | 0.581 | 0.031 | 0.10 | .001 ∗∗∗ |
| only | 0.581 | 0.031 | 0.10 | .001 ∗∗∗ |
| only | 0.581 | 0.031 | 0.10 | .001 ∗∗∗ |
| 0.581 | 0.031 | 0.10 | .001 ∗∗∗ | |
| 0.583 | 0.030 | 0.10 | .001 ∗∗∗ | |
| 0.627 | 0.014 | 0.05 | 0.001 ∗∗ |
| Configuration/Method | Accuracy | Acc | #Params | Interpretability |
|---|---|---|---|---|
| (a) Module ablation | ||||
| Full MDL controller | 61.2% | — | — | — |
| w/o gating | 59.6% | 1.6pp | — | — |
| w/o risk modulation | 59.5% | 1.7pp | — | — |
| w/o orthogonal subspaces (identity projection) | 64.0% | 2.8pp | — | — |
| w/o risk inversion ( ) | 55.7% | 5.5pp | — | — |
| Computation stage | Latency ( s) | Share (%) | Note |
| Signal aggregation | 98.5 | 71.0 | Relevance max + pairwise consistency + lexical conflict detection over the memory store |
| Value-vector encoding | 24.6 | 17.7 | Gaussian-peak value mapping ( , ) |
| Risk modulation and -fusion | 8.0 | 5.8 | Bounded modulation + three mat–vec products |
| – extraction and gating | 11.6 | 8.4 | Norm/cosine decoupling + gating modulation |
| Action-policy matching | 0.05 | 0.04 | Threshold comparisons |
| Controller decision only | 40.1 | — | median 41.9, 74.5 ( s) |
Appendix figures & tables2 assets
Supplementary material from the paper’s appendix.
Appendix
| Category | Detailed specification |
|---|---|
| CPU | Intel Xeon Platinum 8480+ · 56 cores · 2.0 GHz |
| Memory | 512 GB DDR5 |
| OS | Ubuntu 22.04 LTS · Linux kernel 6.2 |
| Python | Python 3.11.6 |
| numpy | numpy 1.26.4 |
| scipy | scipy 1.11.4 |
| Signal configuration | Information | Synergy |
|---|---|---|
| 0.002 | — | |
| 0.012 | — | |
| 0.037 | — | |
| 0.015 | 0.001 | |
| 0.042 | 0.003 | |
| 0.050 | 0.001 |
Memory-Augmented Language Models
Memory-augmented language models combine persistent or temporary memory with neural computation to retain, retrieve, and use information beyond the active context.
See all 291 papers