为大模型代理记忆中的矛盾冲突提供可验证的并发控制机制
TOKI: A Bitemporal Operator Algebra for Contradiction Resolution in LLM-Agent Persistent Memory

- 将四种矛盾解决策略统一为双时态操作算子,明确隔离级别与写时异常
- 在LoCoMo数据集上提升0.86分,移除类型化内存层导致0.49分性能下降
- 适合关注大模型长期记忆安全与可审计性的研究者与系统开发者
大模型代理的持久化记忆是高写入负载的底座:每次信念更新都是带版本的写操作,新主张可能与存储内容矛盾。现有生产系统采用四种解决启发式(最后写者胜、证据加权合并、等待确认、规则策略),但均未声明其假设的隔离级别或承认的写时异常。本文指出矛盾解决本质是写时并发控制,并显式定义该契约。TOKI将四类启发式建模为双时态算子族,基于双行模式,每种算子具有隔离前提和溯源注释,保留失败事实于审计行。四个保真定理覆盖隔离、模式与溯源,将保证推广至算子流水线,并扩展折叠算子至n元冲突集。紧致性伴随证明显示,在关系调度模型中,关键日志化裁决者是重放一致性的必要条件,而所有审计基线均忽略此点。八系统对比的判决矩阵定位差距:所有将语言模型裁决者置于写路径的基线,至少存在三种写时异常(重放不一致、信念漂移偏移、审计擦除);仅通过移除裁决者的地址内容引擎避免异常,而TOKI唯一在保留裁决者的同时排除全部三类异常。在自然工作负载子集上,审计行防御使LoCoMo提升0.86分,剔除类型化内存层导致1,444个可回答问题中0.49分准确率下降;跨系统比较能力不足,不声称优越性。贡献在于提出契约:写时正确性规范,经证明在隔离、模式与溯源层面均成立,精确刻画了每个生产启发式所依赖却无系统明示的保证。
原文摘要 · Abstract (English)
Persistent memory for an LLM agent is a write-heavy substrate: every belief update is a versioned write, and a new claim may contradict a stored one. Production systems use four resolution heuristics (last-writer-wins, evidence-weighted merge, await-confirmation, per-rule policy), yet none declares the isolation level it assumes or the write-time anomalies it admits. We show that contradiction resolution is write-time concurrency control and make the missing contract explicit. TOKI types the four heuristics as one family of bitemporal operators over a dual-row schema, each with an isolation precondition and a provenance annotation that preserves the losing fact in an audit row. Four soundness theorems close the contract across isolation, schema, and provenance, lift the guarantees to operator pipelines, and extend the fold operators to n-ary conflict sets. A tightness companion proves that, within the relational schedule model, keyed logging of the adjudicating judge is necessary for replay consistency, which every audited baseline omits. A verdict matrix over eight systems localizes the gap: every baseline that keeps a language-model judge on the write path admits at least one of three write-time anomalies (replay inconsistency, belief-drift skew, audit erasure); a content-addressed engine-layer comparator avoids them only by removing the judge, and TOKI alone excludes all three while keeping it. On its one natural-workload slice the audit-row defence moves LoCoMo by 0.86, and ablating the typed memory layer removes 0.49 accuracy on 1,444 answerable LoCoMo questions; the cross-system comparison stays underpowered and claims no superiority. The contribution is the contract: a write-time correctness specification, proved sound across isolation, schema, and provenance, pinning the guarantee every production heuristic assumes but no deployed system makes explicit.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。