PreCoMem: Predictive Cognitive Memory for Self-Evolving Long-Term Dialogue Agents
Organizations: Nankai University · Tsinghua University · Huazhong University of Science and Technology · University of the Chinese Academy of Sciences ·
Abstract
Long-horizon dialogue agents need to keep user memories stable enough for personalization while adapting when the user genuinely changes. Existing memory systems often append every observation or overwrite old entries by heuristic rules, which makes transient noise hard to distinguish from real belief drift. We introduce PreCoMem, a memory consolidation framework inspired by predictive coding that represents memory as confidence-weighted beliefs about the user's state. Its core signal, Effective Surprisal, combines semantic deviation and contradiction evidence, then downweights this signal when retrieval is diffuse and unreliable. According to effective surprisal, a two-threshold gate maps each turn to one of three deterministic updates: MAINTAIN reinforces supported beliefs, PROFILE stores ambiguous cues as low-confidence hypotheses, and CORRECT softly decays reliably contradicted facts. The PROFILE stage acts as an explicit waiting room, preventing premature commitment to noisy evidence. Experiments on LoCoMo, LongMemEval-S, and PersonaMem-v2 show consistent state-of-the-art accuracy; our new DiMoBench confirms that PreCoMem adapts to non-stationary belief drift without over-reacting to noise. The code is available at https://github.com/ZhongWishing/PreCoMem.
Figures & tables
| LoCoMo (1,540 questions; four splits) | ||||||
|---|---|---|---|---|---|---|
| Method | Avg. Tokens | Single-Hop | Multi-Hop | Temporal | Open-Domain | Overall |
| Backbone: gpt-4o-mini | ||||||
| MemoryOS | 5.5k | 66.68 0.85 | 54.83 0.87 | 52.90 0.59 | 32.16 0.11 | 59.58 0.06 |
| Mem0 | 1.6k | 62.17 0.77 | 52.91 0.70 | 59.44 0.37 | 33.89 0.96 | 58.36 0.31 |
| A-Mem | 2.7k | 45.15 0.53 | 23.99 0.46 | 53.67 0.23 | 30.71 0.84 | 42.18 0.65 |
| GAM | 3.5k | 68.24 0.76 | 55.47 0.43 | 58.19 0.54 | 33.50 0.09 | 61.62 0.22 |
| Method | Per-item conf. | Top-10 avg. | LoCoMo Overall | ||
|---|---|---|---|---|---|
| O-Mem [ 40 ] | ✗ ( Add / Ignore / Update ) | 232 | – | – | 70.88 |
| EverMemOS [ 10 ] | ✗ ( expiry) | 264 | – | – | 70.13 |
| PreCoMem (A0, default) | ✓ ( ) | 287 | 95.7 | 0.81 | 73.57 |
| PreCoMem (A1, prune) | ✓ ( ) | 168 | 95.6 | 0.83 | 73.51 |
Appendix figures & tables30 assets
Supplementary material from the paper’s appendix.
Appendix
| System | Overall | Memory |
|---|---|---|
| No memory (gpt-4.1-mini) † | 0.368 | 0.203 |
| A-Mem † | 0.378 | 0.220 |
| Nemori † | 0.385 | 0.231 |
| Mem0-Graph † | 0.424 | 0.284 |
| AWE † | 0.430 | 0.296 |
| PreCoMem | 0.458 0.006 | 0.329 0.009 |
| Variant | Overall | Memory | Write fail. | Read fail. | Util. fail. |
|---|---|---|---|---|---|
| Full PreCoMem | 0.458 | 0.329 | .300 | .170 | .072 |
| w/o PROFILE | 0.444 | 0.309 | .320 | .165 | .071 |
| w/o CORRECT | 0.439 | 0.303 | .312 | .178 | .071 |
| w/o MAINTAIN | 0.418 | 0.273 | .310 | .190 | .082 |
| Type | PreCoMem | w/o PROFILE | ||
| goal | 100 | 22.3 1.1 | 17.3 2.0 | |
| state | 100 | 22.6 0.9 | 17.8 1.2 | |
| value | 100 | 21.6 0.8 | 18.6 0.9 | |
| causal | 101 | 23.0 0.6 | 21.9 1.0 | |
| Overall | 401 | 22.4 0.8 | 18.9 1.2 | |
| Reported overall baselines: full-context GPT-4o 21.05; A-Mem 17.2; Mem0 15.8; SeCom 14.9 | ||||
| LoCoMo | LongMemEval - S | PersonaMem - v2 | ||||
|---|---|---|---|---|---|---|
| Method | gpt-4o-mini | gpt-4.1 | gpt-4o-mini | gpt-4.1 | 32k | 128k |
| MemoryOS | 5.5 | 5.2 | 7.2 | 6.8 | 5.8 | 7.2 |
| Mem0 | 1.6 | 1.8 | 1.8 | 2.0 | 1.9 | 2.1 |
| A-Mem | 2.7 | 2.9 | 3.3 | 3.6 | 3.2 | 3.8 |
| GAM | 3.5 | 3.4 | 4.3 | 4.2 | 3.7 | 4.4 |
| MemBox | 3.3 | 3.4 | 3.9 | 4.0 | 3.6 | 4.3 |
| Method | Avg. Tokens | SSU | SSA | SSP | MS | KU | TR | Overall |
|---|---|---|---|---|---|---|---|---|
| MemoryOS | 7.2k | 58.21 0.62 | 59.60 0.92 | 46.03 0.33 | 53.68 0.35 | 54.71 0.23 | 51.45 0.06 | 54.85 0.80 |
| MemOS | 2.7k | 70.15 0.57 | 68.95 0.67 | 56.02 0.96 | 62.53 0.17 | 66.54 0.26 | 64.70 0.41 | 64.66 0.78 |
| TiMem | 3.6k | 81.79 0.93 | 75.01 0.36 | 69.99 0.30 | 72.97 0.91 | 77.63 0.46 | 85.27 0.08 | 75.51 0.90 |
| GAM | 4.3k | 77.61 0.94 | 79.52 0.72 | 68.18 0.31 | 76.16 0.43 | 74.09 0.65 | 76.50 0.48 | 76.19 0.83 |
| MemBox | 3.9k | 79.40 0.67 | 83.26 0.77 | 71.19 0.46 | 76.16 0.34 | 75.44 0.53 | 78.55 0.11 | 77.37 0.39 |
| O-Mem | 3.7k | 88.97 0.99 | 82.28 0.42 | 70.55 0.45 | 79.61 0.01 | 84.68 0.12 | 78.08 0.69 | 81.78 0.36 |
| Dataset | Question Type | #Q | LLM-judge (%) | Human (%) | Agreement (%) | Cohen’s |
|---|---|---|---|---|---|---|
| LoCoMo | Single-Hop | 109 | 81.41 | 82.73 | 98.5 | 0.949 |
| Multi-Hop | 30 | 68.49 | 70.40 | 98.0 | 0.953 | |
| Temporal | 40 | 66.21 | 67.65 | 98.2 | 0.959 | |
| Open-Domain | 20 | 39.63 | 41.55 | 97.5 | 0.948 | |
| Overall | 199 | 71.96 | 73.30 | 98.3 | 0.957 | |
| LongMemEval - S | SSU | 70 | 91.58 | 92.86 | 97.4 | 0.819 |
| Config | Created | Promoted | Expired | Promotion rate | Promotion precision |
|---|---|---|---|---|---|
| PreCoMem (full) | 123 | 43 | 81 | 0.34 | 0.78 |
| w/o C1 | 149 | 42 | 108 | 0.28 | 0.62 |
| w/o C2 | 138 | 40 | 93 | 0.30 | 0.70 |
| w/o C3 | 0 | 0 | 0 | 0.00 | – |
| Variant | LoCoMo | LongMemEval - S |
|---|---|---|
| Full PreCoMem | 73.57 | 84.28 |
| w/o ( ) | 67.83 ( ) | 77.65 ( ) |
| w/o ( ) | 63.49 ( ) | 72.71 ( ) |
| Sample-1 Overall | ||
|---|---|---|
| cross-encoder/nli-deberta-v3-base (default) | – | |
| facebook/bart-large-mnli | ||
| roberta-large-mnli | ||
| random (control) |
| Variant | LoCoMo | LongMemEval - S |
|---|---|---|
| Full PreCoMem | 73.57 0.28 | 84.28 0.05 |
| Single-threshold gate (no PROFILE band; medium band CORRECT ) | 69.92 0.29 | 81.16 0.12 |
| Frequency-matched random routing (M/P/C ) | 61.83 1.25 | 72.94 1.08 |
| Read-time weighting off, lifecycle confidence on | 71.80 0.43 | 83.56 0.23 |
| Lifecycle confidence off, read-time weighting on | 52.88 0.69 | 61.65 0.68 |
| Both off ( w/o CW) | 43.42 0.94 | 49.65 0.91 |
| LoCoMo | LongMemEval - S | |
| PreCoMem (bounded scalars closed-form updates) | 85.06 0.07 | 89.39 0.76 |
| LLM direct write | 82.31 1.42 | 86.24 1.63 |
| Paired difference |
| Single-Hop | Multi-Hop | Temporal | Open-Domain | Overall | |
|---|---|---|---|---|---|
| 1 | 80.5 | 71.2 | 72.4 | 39.6 | 75.2 |
| 5 | 88.7 | 78.6 | 80.2 | 45.5 | 82.3 |
| 10 | 90.41 | 83.48 | 84.74 | 48.23 | 85.06 |
| 15 | 89.7 | 82.0 | 82.7 | 46.9 | 84.3 |
| 20 | 87.9 | 80.6 | 80.3 | 45.8 | 82.5 |
| Backbone | Method | Single | Multi | Temp. | Open | Avg. |
|---|---|---|---|---|---|---|
| gpt-4o-mini | PreCoMem (fixed) | 81.41 | 68.49 | 66.21 | 39.63 | 73.57 |
| PreCoMem (DT) | 82.27 | 69.31 | 67.04 | 43.55 | 74.55 | |
| gpt-4.1 | PreCoMem (fixed) | 90.41 | 83.48 | 84.74 | 48.23 | 85.06 |
| PreCoMem (DT) | 91.42 | 85.16 | 85.81 | 47.78 | 86.21 |
| Stage | Name | Model | Output |
|---|---|---|---|
| 1 | Persona construction | GPT-4o | User profile + core trait slot |
| 2 | Life skeleton & turn | GPT-4o | Event timeline + drift trigger |
| 3 | Dialogue generation | GPT-4o | 35 sessions 10 turns |
| 4 | QA generation | GPT-4o | 200 QA pairs across 4 categories |
| 5 | Consistency verification | Gemini-2.5-Pro | Cross-validated QA (6 criteria) |
| 6 | Human–machine review | Human + LLM | 20% stratified audit, |
| 100 | 26 | 21.0 | 13 | 8 | 3 | 2 | 0.81 |
| 200 | 44 | 25.8 | 16 | 11 | 7 | 7 | 0.59 |
| 57 | 26.5 | 17 | 11 | 9 | 20 | 0.46 | |
| 300 | 60 | 26.7 | 17 | 12 | 9 | 22 | 0.45 |
| 400 | 73 | 27.4 | 17 | 12 | 8 | 36 | 0.38 |
| 500 | 81 | 28.5 | 18 | 13 | 8 | 42 | 0.35 |
| Turn window | #QA | Acc. (%) | Avg Top-10 | Contam.@10 (%) |
|---|---|---|---|---|
| – | 80 | 84.3 | 0.82 | 0.4 |
| – | 100 | 83.6 | 0.80 | 0.6 |
| – | 100 | 83.1 | 0.79 | 0.9 |
| – | 100 | 82.4 | 0.78 | 1.2 |
| – | 40 | 82.0 | 0.78 | 1.3 |
| Setting | Contam.@10 (%) | QA (%) | ||
|---|---|---|---|---|
| DiMoBench (350 t.) | 62 | 27.6 | 0.6 | 0.6 |
| DiMoBench - XL (1050 t.) | 131 | 28.2 | 1.0 | 2.3 |
| Dataset | Score-mass (%) | Top- depr. (%) | Avg retrieved | |
|---|---|---|---|---|
| DiMoBench | 5 | 0.21 | 0.0 | 0.84 |
| DiMoBench | 10 | 0.34 | 0.6 | 0.81 |
| DiMoBench | 25 | 0.62 | 1.7 | 0.74 |
| DiMoBench - XL | 5 | 0.36 | 0.2 | 0.81 |
| DiMoBench - XL | 10 | 0.58 | 1.0 | 0.78 |
| DiMoBench - XL | 25 | 0.94 | 2.6 | 0.71 |
| Persona | Acc. (%) | Contam.@10 (%) | ||
|---|---|---|---|---|
| P1 (canonical) | 84.1 | 62 | 27.6 | 0.60 |
| P2 | 83.2 | 65 | 27.8 | 0.80 |
| P3 | 84.8 | 59 | 27.3 | 0.40 |
| P4 | 84.4 | 61 | 27.5 | 0.55 |
| P5 | 83.6 | 63 | 27.8 | 0.65 |
| Mean | 84.0 | 62 | 27.6 | 0.60 |
| LoCoMo (gpt-4o-mini) | DiMoBench (350 t. end) | ||||||||
|---|---|---|---|---|---|---|---|---|---|
| Config | Single | Multi | Temp. | Open | Overall | Acc. (%) | |||
| A0 (default; no FACT prune) | 81.41 | 68.49 | 66.21 | 39.63 | 73.57 | 287 | 84.0 | 62 | 27.6 |
| A1 (FACT prune ) | 81.36 | 68.42 | 66.18 | 39.55 | 73.51 | 168 | 83.8 | 41 | 27.5 |
| A2 (FACT prune ) | 80.95 | 68.05 | 65.74 | 39.21 | 73.06 | 142 | 82.9 | 33 | 26.7 |
| Benchmark | Recall@10 | QA (hit) | QA (miss) | QA (forced hit) | Gap recovered |
|---|---|---|---|---|---|
| DiMoBench | 95.0 0.4 | 84.8 | 64.2 | 70.7 | 32% |
| DiMoBench - XL | 93.0 0.2 | 84.7 | 63.0 | 69.4 | 29% |
| LongMemEval - S KU | 90.0 0.5 | 93.4 | 75.8 | 80.3 | 26% |
| AMemGym | 89.1 0.5 | 72.1 | 55.8 | 60.6 | 29% |
| Q1 | Q2 | Q3 | Q4 | Q5 | |
|---|---|---|---|---|---|
| Gold-evidence Precision@ | 0.58 | 0.68 | 0.76 | 0.82 | 0.87 |
| Gold-evidence Recall@ | 0.86 | 0.88 | 0.89 | 0.86 | 0.82 |
| Contradiction accuracy | 0.71 | 0.79 | 0.84 | 0.89 | 0.92 |
| Update correctness | 0.74 | 0.80 | 0.85 | 0.90 | 0.93 |
| False- CORRECT (%) | 2.1 | 1.0 | 0.8 | 0.7 | 0.6 |
| Downstream probe accuracy | 0.66 | 0.71 | 0.75 | 0.78 | 0.81 |
| Track | Gold shifts | -assessable | Any delay | ||||
|---|---|---|---|---|---|---|---|
| DiMoBench | 45 | 41 | 38 | 3 | 0 | 0 | |
| DiMoBench - XL | 135 | 122 | 104 | 12 | 3 | 3 |
| Method | Retrieval | End-to-End | ||
|---|---|---|---|---|
| P50 | P95 | P50 | P95 | |
| MemoryOS | 1.66s | 2.21s | – | – |
| MemOS | 1.69s | 3.44s | 2.04s | 3.89s |
| A-Mem | 1.74s | 7.23s | 2.09s | 7.68s |
| Mem0 | 2.44s | 4.29s | 2.74s | 4.69s |
| PreCoMem (Ours) | 1.95s | 3.86s | 2.35s | 4.36s |