Skip to content

MemMark: State-Evolution Attribution Watermarking for Agent Long-Term Memory SystemsMemMark: State-Evolution Attribution Watermarking for Agent Long-Term Memory Systems

arXiv· arXiv:2605.25002· Haobo Zhang, Xutao Mao, Guangyuan Dong, Ziwei Li, Xuanbo Su, Kaijie Chen, Jing Yang, Zheng LinZhejiang University of Technology; National University of Singapore; King Abdullah University of Science and Technology; Bairong; Tongji University; Universiti Malaya; University of Hong KongIndexed by this site · 25 days ago· Originally publishedDefenses

Quick read

Defenses

Based on the paper PDF (AI-generated); refer to the original

The authors propose MemMark, which embeds attribution watermarks into the write decisions of an agent's long-term memory; on LoCoMo, Overall F1 is retained at 99.6%, and R3 recovers the full 40-bit payload from a snapshot alone.

Threat modelPost-compromise forensic setting: the verifier may not have a trusted write-time log; prompts, tool calls and backend logs may be missing or controlled by the same attacker, and the only persistent evidence is the final memory snapshot; the attacker can rewrite attribution fields, delete identifiers, forge provenance chains or edit the backend's native history, but cannot, without the key K, forge a commitment that opens against the anchored Merkle root.

Questions
Agents with long-term memory require attribution forensics, but after snapshot leakage or migration, logs, visible outputs and trusted metadata may be missing; the paper points out that field-based provenance suffers from circular failure: the same untrusted snapshot stores both the memory and the proof fields.
Methods
At each internal LLM call, MemMark enumerates admissible candidates, uses a key-driven sampler that preserves the marginal distribution to select among three carrier types—update target, link target, and semantic realization—and records commitments, Merkle trees, and signed session anchors, supporting three levels of verification: R1/R2/R3.
Experiments and results
On the two backends A-MEM and GRAPHITI and three LLMs, Overall F1 changes on average from 0.2816 to 0.2804; R3 recovers the full 40-bit payload from the snapshot alone, and a wrong key is close to random; under nine memory lifecycle attacks, deletion-type attacks keep Rec at 1.00, and at strength 0.5 some attacks approach the wrong-key baseline.
Limitations and future work
The authors note that evaluation covers only two backends and one benchmark, that the attack study does not exhaust utility-preserving adaptive erasure attacks, and that longer memory lifecycles and backend maintenance operations are left for future work; the experiments do not report multiple repetitions or variance.
Experimental setupDeepseek-V4-pro、Qwen3.6-flash et al. · LoCoMo · Overall F1、BLEU-1 et al.
Evaluated models
Deepseek-V4-proQwen3.6-flashGLM-5
Benchmarks
LoCoMo
Metrics
Overall F1BLEU-1per-carrier entropybit recovery rate∆WKEv. Rec.Write Fail
AI summaryHaobo Zhang et al. propose MemMark, a state-evolving watermarking method that embeds attribution watermarks into an agent's memory-write decisions, and in snapshot-only scenarios the full 40-bit payload can be recovered from the final snapshot. The method uses a keyed, distribution-preserving selection among candidates at each internal LLM call, and records cryptographic commitments, signed session anchors, and reveal evidence, so that attribution relies on reproducible backend behavior rather than mutable provenance fields. On LoCoMo with A-Mem and Graphiti and three LLM backbones, overall F1 retains 99.6% of the unwatermarked baseline, and BLEU-1 changes by +0.2%; the average entropy of update-target, link-target, and semantic realization decisions is 1.16, 1.14, and 1.26 bits, respectively. Under nine memory-lifecycle attacks, verification can distinguish tampering, evidence deletion, and partial payload recovery, and verification with an incorrect key is close to random level.

Haobo Zhang et al. propose MemMark, a state-evolving watermarking method that embeds attribution watermarks into an agent's memory-write decisions, and in snapshot-only scenarios the full 40-bit payload can be recovered from the final snapshot. The method uses a keyed, distribution-preserving selection among candidates at each internal LLM call, and records cryptographic commitments, signed session anchors, and reveal evidence, so that attribution relies on reproducible backend behavior rather than mutable provenance fields. On LoCoMo with A-Mem and Graphiti and three LLM backbones, overall F1 retains 99.6% of the unwatermarked baseline, and BLEU-1 changes by +0.2%; the average entropy of update-target, link-target, and semantic realization decisions is 1.16, 1.14, and 1.26 bits, respectively. Under nine memory-lifecycle attacks, verification can distinguish tampering, evidence deletion, and partial payload recovery, and verification with an incorrect key is close to random level.

Paper analysis

6 questions; open one to read the full answer

  1. What problem does this paper attempt to solve?

    To address the attribution forensics problem for agent long-term memory after snapshot leakage or missing logs, the authors propose the MemMark state-evolution watermark.

    Core problem: when long-term memory snapshots are leaked or migrated and external logs and trusted metadata are unavailable, how can one prove who wrote the memory.

    • Scenario and motivation: LLM agents are shifting from single-turn responders to persistent actors across interactions; systems such as A-MEM, GRAPHITI, and Mem0 maintain long-term state through extraction, updating, linking, and deletion, and the memory layer becomes part of the security boundary (per the authors).
    • Shortcomings of existing methods: The authors argue that attaching provenance fields such as source anchors and versions to memory suffers from circular failure—the same untrusted snapshot contains both the memory in question and tamperable proof fields; signals from text, RAG, and agent behavior watermarking are placed in generated text, corpora, or visible trajectories, and these evidence channels may not exist in memory forensics.
    • Core observation: Memory writes themselves contain latent but semantics-preserving free choices—which existing record to update, which node to link to, which equivalent phrasing to use—and these choices can be replayed from the final snapshot and serve as carriers of attribution evidence.
    • Proposed in the paper: MemMark embeds attribution signals into memory evolution decisions rather than editable metadata, combined with commitments, Merkle trees, and signed anchors, supporting three levels of verification: R1 (full log), R2 (partial log), and R3 (snapshot only).
    • Threat model:
      • Attacker goals: Rewrite attribution fields, delete identifiers, forge provenance chains, edit backend-native history (e.g., A-MEM evolution logs, GRAPHITI fact invalidation chains) to conceal the true origin of memory.
      • Attacker capabilities: Control memory storage, and can poison, silently modify, or persistently corrupt memory; the paper assumes the attacker cannot, without key K, forge a commitment that opens to the anchored Merkle root.
      • Verifier situation: A post-compromise forensic setting where prompts, tool calls, and backend logs may be missing or attacker-controlled, and the only persistent evidence may be the final memory snapshot.
      • Victim systems: Two types of long-term memory backends, A-MEM and GRAPHITI.
  2. What related research exists?

    Related work falls into three groups: text/data/agent-behavior watermarking, long-term memory systems and benchmarks, and provenance and memory security; this paper moves the carrier to memory-evolution decisions.

    Watermarking methods (text, data, agent behavior)

    • Text watermarking: Kirchenbauer et al. (2023), Dathathri et al. (2024), Pan et al. (2024), Mao et al. (2025), etc. embed signals into generated tokens; the authors point out that their evidence channel may not exist in memory forensics.
    • Data-level watermarking: Lv et al. (2025), Jovanović et al. (2025), Peng et al. (2025), etc. protect retrieval corpora, multimodal storage, or graph data.
    • Agent behavior watermarking: Huang et al. (2025, 2026a), Meng et al. (2026), Wang et al. (2026a) target visible plans, tool calls, or trajectory data; the authors state that MemMark retains the behavioral watermarking idea but moves the carrier to memory evolution decisions that can be recovered from backend snapshots.

    Long-term memory systems and evaluation benchmarks

    • Memory systems: A-MEM, GRAPHITI, MemOS, Memory-R1, MemMachine, etc. maintain note networks, temporal graphs, or structured memory objects (Park et al., 2023; Packer et al., 2024; Xu et al., 2026a, etc.).
    • Memory benchmarks: Maharana et al. (2024)'s LoCoMo, Wu et al. (2025), Hu et al. (2025) evaluate long-range recall, updating, temporal reasoning, and multi-turn state maintenance.
    • Memory write decision layer: Zhang et al. (2025, 2026a), Sun et al. (2025) treat memory writes as an explicit decision layer, which the authors state is exactly the layer where MemMark adds watermarking.

    Provenance and memory security

    • Metadata provenance: TIERMEM and MemOS (Zhu et al., 2026; Li et al., 2025) attach source anchors, versions, or lifecycle metadata; the authors point out that metadata is useful when storage is trusted but useless when an attacker controls the snapshot.
    • Memory attack research: AgentPoison (Chen et al., 2024), A-MemGuard (Wei et al., 2025), MemoryGraft (Srivastava and He, 2025), etc. show that memory can be poisoned or persistently corrupted; Ma et al. (2026)'s survey lists agent memory attacks as an independent security risk.
    • Cryptographic tools: Pedersen commitment (1991), Merkle trees (1987), transparent logs (Laurie et al., 2013); MemMark combines these tools with replayable key selection.

    Baselines and benchmarks: The experiments compare three controls—no-watermark, random-replace, signed-metadata-only—as well as the graph watermarking baseline KGMARK (Peng et al., 2025), which is comparable only on GRAPHITI; the evaluation benchmark is LoCoMo.

    The authors position this paper as: moving attribution evidence from editable claim fields to replayable behavioral traces, the first backend-invariant watermarking abstraction for the memory evolution channel (the paper calls it a "backend-invariant watermarking abstraction" and does not claim to be first).

  3. How does the paper address this problem?

    MemMark enumerates candidates at the LLM call boundary, selects with a key-driven sampler that preserves the distribution, and records a cryptographic audit trail, supporting three levels of verification.

    Overall approach: turn the latent decisions in memory writes (update target, link target, semantic realization) into discrete candidate distributions, embed attribution bits with a key-driven sampler that preserves the marginal distribution, and then use commitments and Merkle anchors so that verifiers can still replay when logs are missing. MemMark changes only the selection layer, not the backend write path.

    Problem formalization

    • Each memory write is modeled as a decision decisiont = ⟨ carriert, candsett, probdistt, ctxt ⟩, containing the carrier type, candidate set, backend preference distribution and reconstructible context.
    • The hard constraint is distribution preservation: ĉt ∼ πt, i.e., the selected candidate always follows the backend's self-reported preference distribution, and the utility objective is that the downstream utility difference before and after watermarking does not exceed εU.
    • Decisions are separated from commits: MemMark only observes and modifies (Ct, πt, ctxt); candidate generation and the APPLY_SELECTED commit step remain on the native backend path.

    Carrier taxonomy and backend adapters

    • Three carrier types (Table 1): update-target (which existing object to modify), link-target (which prior object new evidence links to), semantic-realization (which surface form expresses the same fact), all satisfying the semantic-equivalence requirement.
    • Three adapter hooks: ENUMERATE_CANDIDATES, SCORE_CANDIDATES, APPLY_SELECTED; the adapter is the only backend-specific code, so the same watermark layer works across A-MEM and GRAPHITI.

    Distribution-preserving keyed sampling

    • Decision interception: At each internal LLM call, the prompt is extended to require the model to give K feasible answers with self-reported preference weights; after parsing, the candidate set and normalized distribution πt are obtained, reducing open generation to auditable discrete choices.
    • Keyed sampler: The nonce is derived by PRF(K, ctxt), driving a binning sampler that returns ĉt and the number of embedded bits, guaranteeing Pr[ĉt = c | πt, K] = πt(c).
    • Three lemmas (proofs in Appendix B): strict distribution preservation, cascaded composition (capacity across multiple calls is approximately additive), and backend independence (once (Ct, πt, ctxt) is fixed, sampling depends only on the candidate distribution and the key).

    Cryptographic audit trail

    • Per-decision commitment: A hash binding the context, candidate set, distribution, selected candidate, embedded bits and nonce.
    • Session-level Merkle tree and signed anchor: The root is sealed in a header containing fields such as agent_id and session_id and signed with K; each record carries a Merkle inclusion path, so a single surviving leaf suffices to verify against the root.
    • Three-level verification: R1 uses the full external log, R2 uses partially retained commitments, and R3 replays the keyed selection using only the reveal data recorded in the snapshot and the anchored header.

    Key parameters

    • Candidate enumeration defaults to K=4, Tenum=0.7, candidate scoring Tscore=0.0, JSON mode throughout (Appendix E); the random reference level for a wrong key is 1/K=0.25.
  4. What experiments did the paper conduct?

    On LoCoMo, utility, capacity, snapshot verification, robustness to nine attacks and memory integrity are evaluated with 2 backends × 3 LLMs.

    Experimental setup

    • Models tested: Three LLM backbones—Deepseek-V4-pro, Qwen3.6-flash, GLM-5—each connected to two long-term memory backends, A-MEM and GRAPHITI, for six model-backend configurations in total.
    • Benchmark: LoCoMo, fixed to 10 multi-session conversations with 1,986 QA in total, covering five categories: single-hop (841), multi-hop (282), temporal (321), open-domain (96), and adversarial (446) (Appendix A.1).
    • Baselines: no-watermark, signed-metadata-only (S.M.-Only), random-replace (Ran.), and KGMARK on GRAPHITI only (Appendix D).
    • Metrics (Appendix C): RQ1 uses LoCoMo F1 and BLEU-1; RQ2 uses per-carrier entropy and payload share; RQ3 uses R1/R2/R3 bit recovery and wrong-key recovery; RQ4 uses post-attack Rec, verifier mode (ComF/Miss), and ∆WK; RQ5 uses carrier distribution, evidence retrieval recall (Ev. Rec.), and number of write failures.
    • Attack settings: Nine memory lifecycle attacks (5 content tampering, 2 leaf deletion, 2 synthesis/reconstruction; definitions in Table 9 of Appendix G), with strength s ∈ {0.1, 0.3, 0.5}.
    • Repetitions: The paper does not report multiple repetitions or variance.

    Main results

    RQ1 utility retention (per Table 2, Overall F1 / BLEU-1):

    Swipe horizontally to read the table

    ModelBackendNo-WMS.M.-OnlyRan.KGMARKMemMark
    Qwen3.6-flashA-MEM0.2850/0.33220.3323/0.36960.3033/0.3596not reported0.3044/0.3504
    Qwen3.6-flashGRAPHITI0.2572/0.29230.2589/0.30310.2440/0.28230.2505/0.30270.2453/0.2945
    GLM-5A-MEM0.2958/0.30670.2939/0.32050.2971/0.3150not reported0.3181/0.3300
    GLM-5GRAPHITI0.2338/0.25380.2179/0.23950.2101/0.23900.2394/0.25990.2188/0.2374
    DeepSeek-V4-ProA-MEM0.3616/0.38700.3630/0.39500.3413/0.3591not reported0.3541/0.3784
    DeepSeek-V4-ProGRAPHITI0.2560/0.26940.2346/0.24040.2606/0.26890.2484/0.26650.2418/0.2552
    • Average utility: Across the six configurations, average Overall F1 goes from 0.2816 (No-WM) to 0.2804 (MemMark), a retention of 99.6%; BLEU-1 goes from 0.3069 to 0.3077 (Table 2 note).
    • Differences by backend: On A-MEM, MemMark's average F1 rises from 0.3141 to 0.3255; on GRAPHITI it falls from 0.2490 to 0.2353; the authors state the backend effect is larger than the watermark effect, and no systematic utility collapse occurred.
    • Exceptions: On GLM-5 + GRAPHITI, MemMark's F1 (0.2188) is lower than No-WM (0.2338) and KGMARK (0.2394); on DeepSeek-V4-Pro + GRAPHITI (0.2418) it is also lower than Ran. (0.2606) and KGMARK (0.2484).

    RQ2 capacity (Figure 2)

    • Per-carrier entropy: The average per-decision entropy of update-target, link-target, and semantic-realization is 1.16, 1.14, and 1.26 bits respectively; semantic-realization has the highest average capacity.
    • Payload distribution varies by backend: On GRAPHITI, the semantic carrier accounts for 49%–75% of embedded bits (three backbones); on A-MEM the distribution is more even, e.g., 10%/25%/65% for Qwen3.6-flash and 28%/32%/40% for GLM-5.
    • Authors' interpretation: The signal is distributed over natural backend choices rather than a single component, which favors portability across backends.

    RQ3 snapshot and partial-log verification (Figure 3)

    • R3 snapshot only: MemMark recovers the full 40-bit payload with bit recovery of 1.00; signed-metadata-only is 0.00, and the wrong-key control is 0.15, close to the random reference of 1/K=0.25.
    • R2 partial log: As the keep ratio r rises from 0.1 to 0.9, average bit recovery rises from 0.08 through 0.29, 0.51, 0.71, to 0.90; the authors state verification is not all-or-nothing.

    RQ4 nine lifecycle attacks (Table 3, Table 10)

    • Deletion-type attacks (pruning, dedup): Rec is 1.00 for all three models on both backends, the verifier triggers missing_leaves mode, and ∆WK ranges from +0.65 to +0.85.
    • Content-editing type: On A-MEM, average Rec drops from 0.896 at strength 0.1 to 0.472 at 0.5; on GRAPHITI it is 0.911, 0.694, 0.489.
    • Exceptions and weakest points: At strength 0.5, subgraph reanchoring on A-MEM is close to the wrong-key baseline (Rec 0.346, ∆WK +0.115); on GRAPHITI, compaction is weakest (Rec 0.462, ∆WK +0.180); additive poisoning is the mildest (A-MEM Rec 0.725, ∆WK +0.493).

    Other ablations and analyses

    • RQ5 memory integrity (Table 4, Qwen backbone): A-MEM retrieval recall retains 89.3% of the no-watermark baseline, and write failures go from 4 to 3; GRAPHITI recall retains 97.5%, and write failures go from 0 to 5.
    • Hyperparameter sensitivity (Table 7, Qwen3.6-flash + A-MEM): As K rises from 2 to 8, bits/decision rises from 0.0312 to 0.0619, and ∆F1 goes from +0.004 to -0.019; R3 recovery stays at 1.000 across the full sweep.
    • Per-session breakdown (Table 8, Qwen3.6-flash): A-MEM average ∆F1 is +0.006, GRAPHITI is -0.038; R1/R3 recovery is 1.000 for all 10 sessions, and the wrong-key average is 0.205.
  5. What are some points that can be further explored?

    The authors note two limitations: backend and benchmark coverage, and adaptive attacks; the experiments cover only 2 backends, 3 models, and 1 benchmark.

    Limitations and future directions noted by the authors

    • Evaluation scope (Section 7): MemMark is evaluated only on two memory backends and one auditable benchmark; broader deployment settings are left for future work.
    • Longer lifecycles (Section 7): Longer memory lifecycles, backend-specific compaction, migration and periodic summarization may introduce new watermark carriers and also new sources of drift; the authors plan to extend the adapter contract to cover these maintenance operations.
    • Adaptive attacks (Section 7): The current attack study covers representative edits, deletions and poisoning, but does not exhaust adaptive attempts to erase evidence while preserving utility.
    • Future directions (Section 7): Study such adaptive attacks and build verification procedures that can distinguish benign lifecycle changes from targeted tampering, making snapshot-only attribution more robust in production systems.
    • Deployment risks (Appendix A.4): Verification relies on keys, canonicalized reveal evidence and cryptographic audit material; key leakage, improper sidecar handling or serialization inconsistency would make verification unreliable; successful verification does not mean the memory content is true or safe.

    Experimental coverage

    • Models and backends tested: 3 LLMs in total—Deepseek-V4-pro, Qwen3.6-flash, GLM-5—and 2 backends in total—A-MEM and GRAPHITI (Section 5.1).
    • Benchmark: LoCoMo only, fixed at 10 conversations and 1,986 QA (Appendix A.1).
    • Attack evaluation: Nine lifecycle attacks at strengths 0.1, 0.3, 0.5; the RQ4 main table is on A-MEM, and GRAPHITI results are in Appendix Table 10.
    • Hyperparameter sensitivity: Single-factor sweeps only on Qwen3.6-flash + A-MEM, K ∈ {2,4,8}, Tenum ∈ {0.5,0.7,1.0} (Appendix E).
    • Information not reported: The paper does not report the number of experimental repetitions, confidence intervals or statistical tests; the RQ5 integrity probe reports only the Qwen backbone (Table 4 note).
  6. Summarize the main content of the paper

    MemMark embeds attribution watermarks into memory evolution decisions; a snapshot alone recovers the 40-bit payload, with 99.6% utility retention.

    A paper on attribution watermarking for agent long-term memory, addressing memory-origin forensics when logs and trusted metadata are missing after snapshot leakage or migration.

    • Problem: The authors argue that field-based provenance suffers from circular failure—the untrusted snapshot stores both the memory and tamperable proof fields; the signal channels of existing watermarks (generated text, corpora, visible traces) may not exist in memory forensics.
    • Method: MemMark enumerates K=4 candidates and a self-reported preference distribution at each internal LLM call, derives a nonce via PRF(K, ctx) to drive a sampler that preserves the marginal distribution, and embeds bits in three carrier types: update-target, link-target and semantic-realization; per-decision commitments form a session Merkle tree with a signed anchor, supporting three-level verification: R1 full log, R2 partial log, R3 snapshot only.
    • Utility: On LoCoMo, average Overall F1 across the six model-backend configurations changes from 0.2816 to 0.2804, retaining 99.6%; it improves slightly on A-MEM and drops from 0.2490 to 0.2353 on GRAPHITI (Table 2).
    • Capacity: The average per-decision entropy of the three carrier types is 1.16, 1.14 and 1.26 bits respectively, and the payload distribution varies with backend structure (Figure 2).
    • Verification and robustness: R3 recovers the full 40-bit payload from the snapshot alone (recovery 1.00), signed-metadata-only is 0.00, and a wrong key is 0.15; among the nine lifecycle attacks, deletion-type Rec remains 1.00, and at strength 0.5 subgraph reanchoring approaches the wrong-key baseline (Rec 0.346).
    • Authors' conclusion: By binding attribution to utility-preserving state selection and authenticated reveal evidence, memory attribution can survive without visible behavior, final text and trusted metadata; the authors also note that evaluation is limited to two backends and one benchmark, and adaptive erasure attacks are left for future research.

Related papers

Show 3 more papers
Read originalarxiv.org