PikoGet Piko
Piko Research PIKO-RESEARCH-2026-02 · 2026-12-01

PIKO RESEARCH TECHNICAL REPORT · PIKO-RESEARCH-2026-02

Can a Personal Agent Actually Forget?

Measuring and blocking memory resurrection across personal devices.

Author
Prysai Lab
Version
v1.1 · Updated
Published
Zenodo · CC BY 4.0
DOI: 10.5281/zenodo.24722296
Reading time
about 26 minutes
MFPM cross-device forgetting barriers, hybrid recall, and F0-F4 overviewMONOTONIC FORGETTING-BARRIER PERSONAL MEMORY (MFPM · F0–F4)Device A · Delete / RevokeEmits forget: + v2 denialDevice B · Stale / AsyncLate job, paraphrase, v1Skewed clocks & offline replicasEND-TO-END MONOTONIC BARRIERActive(C) · Forget-Wins SemilatticeQuote-free v2 Revocations (SHA-256)Post-CAS require_preserved (409)MFPM-Gated Hybrid & Lazy-MMR0 / 6,000 ForgetBench164 / 164 live Swift+Py tests85.0% R4 · 0% Zombie6.28 ms hybrid @ N = 512Zero plaintext tombstones

Abstract

Delete a personal fact on your phone (an allergy, a gate code, or a medication), and a week later it can reappear on your laptop. That bug rarely lives in SQL DELETE. Across devices, deletion races against background fact extractors in flight, paraphrased re-extractions, offline snapshots, skewed clocks, and older app builds. We define a five-level forgetting ladder (F0–F4), catalog six resurrection vectors (V1–V6), and introduce MFPM (Monotonic Forgetting-Barrier Personal Memory): a zero-plaintext state model pairing clock-free causal tombstones, quote-free SHA-256 provenance, fail-closed rebasing, and serialized post-CAS server preservation.

We evaluate MFPM with ForgetBench v1.0, a store-agnostic conformance harness executing real engines rather than coin flips, alongside compiled Swift modules and Piko's live Python sync server. Across 30,000 engine runs, four reference architectures resurrect 73.33%–100.00% of episodes, whereas Piko's AccountSync records 0 / 6,000 while halting unreviewed offline edits until a 1-RTT pull. Over 80 bilingual EN/ZH queries on Apple NLEmbedding, an ungated async vector store leaks 85.0% of deleted secrets (MRR 0.585), whereas MFPM-Gated Hybrid Recall reaches 85.00% active Recall@5 (MRR 0.765) with 0 / 20 zombies at 6.28 ms (N = 512). All 164 live Swift/Python tests pass, and F4 prototypes detect 1,000 / 1,000 server rollbacks via Ed25519 while reclaiming 99.04% of 5-year tombstone metadata.

Keywords: personal AI agents; memory resurrection; verifiable forgetting; ForgetBench; causal tombstones; source provenance; optimistic concurrency control; Lazy-MMR; hybrid retrieval; Ed25519; epoch compaction; MFPM; Piko

1. Introduction

A personal AI assistant crosses a trust boundary once it retains facts across weeks and devices: a peanut allergy, an evening prescription, a consulting day rate, a daughter's Thursday violin lesson, or a courtyard gate PIN [1][2][3][4]. That continuity saves users from repeating context, yet it creates an asymmetric failure cost. A missed weak semantic recall hit is a minor inconvenience; a sensitive fact that the user explicitly deleted reappearing a week later on another screen breaks trust immediately.

In production, clicking "Delete" on an agent memory rarely ends its lifecycle. A local text file edited synchronously disappears when saved. A cross-device personal agent is instead an asynchronous, multi-replica distributed system spanning phones, tablets, laptops, background extraction workers, ephemeral caches, and cloud sync servers [1]. When those layers lack monotonic invariants, deleted facts silently return. We call this failure mode memory resurrection.

1.1 Four mechanical causes of memory resurrection

Auditing multi-device personal agents identifies four mechanical paths by which deleted state returns. None of them appear in single-replica QA benchmarks [5][6]:

  1. Background learning outraces explicit deletion. To keep chat latency low, personal agents extract facts asynchronously after the reply finishes. If the user deletes a fact or revokes a chat turn while an earlier extraction pass is still running, a writer without raw-byte snapshot checks commits its stale output seconds later and restores the fact.
  2. Paraphrase and chunk-ID drift defeat literal blocklists. Even when an app stores a local tombstone keyed by exact text or excerpt chunk hash, language models rarely emit identical phrasing twice. Re-reading the same message with a trimmed quote or reworded summary yields a fresh chunk ID and a fresh vector, bypassing literal deletion markers.
  3. Offline replicas and skewed device clocks override deletions. Laptops stay closed in backpacks, and phones spend hours in airplane mode. When an offline device reconnects with a pre-delete snapshot, or when one device's wall clock runs ahead during concurrent forget and remember edits, last-writer-wins (LWW) timestamp sync overturns the deletion.
  4. Protocol downgrades, secondary indices, and fail-open recovery erase denial history. An outdated app omitting a newer provenance field, or a deleted=True push sent at the latest baseVersion, clears the ledger. An async vector database lagging behind document edits, or a crash handler resetting a corrupt JSON file to empty, likewise wipes denial state.

1.2 Research questions and contributions

Building on the PESA (Personal Ecosystem Super Agent) architecture [1], and complementing Belcak et al.'s finding that compact external state outperforms stretching live context windows to 256K+ tokens [7], this report answers four questions:

  • RQ1 (Maturity, Vectors & Mechanistic Measurement): What maturity levels separate superficial deletion from end-to-end verifiable forgetting? Which paths (V1–V6) cause resurrection, and how do real storage-and-sync engines score under deterministic execution rather than simulated probabilities?
  • RQ2 (Formal Algebra & Fundamental Limits): What minimal distributed state model, using neither synchronized wall clocks nor forgotten plaintext, provably blocks silent resurrection across V1–V6? Where lies the formal boundary between cryptographic hash barriers and semantic paraphrases?
  • RQ3 (Retrieval Quality vs. Zombie Ghosting): How severely do ungated async vector indices leak deleted and superseded facts into live prompts, and where does pure lexical recall fall short? Can MFPM-Gated Hybrid Recall recover semantic paraphrases on device with zero zombie leakage?
  • RQ4 (Production Ceilings & Beyond Honest Servers): What are the measured wire footprints, encryption overheads, validation latencies, and transactional costs up to full production capacity? What additional overhead is needed to reach F4 protection against a compromised server and 5-year tombstone growth?

Our five contributions map directly to those four questions:

  1. F0–F4 Forgetting Maturity Ladder and V1–V6 Taxonomy (Section 3). We define five maturity levels (F0–F4) and six resurrection vectors (V1–V6) grounded in multi-device failure traces.
  2. MFPM Algebra and Five Propositions (Section 4). We formalize the append-only encrypted causal control log (forget:/remember: with acknowledges), quote-free v2 hash provenance, six invariants (I1–I6), and five propositions. Proposition 5 proves why hash barriers alone cannot suppress semantic paraphrases without document-level admission.
  3. Reference Architecture, MFPM-Gated Hybrid Recall, and F4 Protocols (Sections 5–8). We document Piko's deployed F3 Swift/Python stack, four core algorithms, and a five-layer defence boundary. We also specify MFPM-Gated Hybrid Recall (R4) over Apple NLEmbedding alongside two F4 protocols: Ed25519 Signed Monotonic State Chains and Causal Epoch Barrier Compaction.
  4. ForgetBench v1.0 and Five-Study Empirical Evaluation (Sections 9–10). We run 30,000 mechanistic engine episodes plus 1,000 U1 availability runs (zero hardcoded probabilities), an 80-query bilingual EN/ZH retrieval and zombie-leakage study, and full-capacity server/Swift wire and Lazy-MMR benchmarks. We also benchmark the F4 cryptographic and 5-year compaction prototypes and execute 164 / 164 live production tests (92 Python + 72 macOS Swift).
  5. Explicit Scope and Trade-Offs (Section 11). We document the concrete operational costs: conservative offline-edit halts (U1), pure lexical recall's 5.0% score on zero-overlap paraphrases, honest-server versus F4 trust roots, and single-machine timing boundaries.

2. Background and related work

Personal agent memory draws on three fields: LLM memory frameworks, machine unlearning, and distributed replication. Memory resurrection sits directly in the gap between them.

2.1 Production LLM memory systems and their deletion semantics

Early agent designs such as Generative Agents [8] and MemGPT [2] separated working context from paged external storage so models could maintain continuity beyond one prompt. Recent production frameworks expand that pattern with automated extraction, vector indices, and temporal graphs, evaluated primarily on long-horizon QA benchmarks such as LoCoMo [5] and LongMemEval [6]. Belcak et al. [7] showed that compact external state plus selective file reads matches long-context accuracy while cutting H100 serving cost by 3.6×–7.0×. That compute trade-off reinforces keeping personal memory structured and compact rather than dumping raw histories into large prompts.

Auditing three widely deployed public memory architectures shows why retrieval quality and deletion safety are orthogonal concerns:

  • Mem0 [3] exposes DELETE /v1/memories/{id}, batch_delete, and delete_all endpoints propagating across SQL history, a vector database, and an optional graph store, plus optional expiration_date < NOW() soft filtering. Because extraction runs asynchronously and deletion targets specific memory or chunk identifiers, the public API does not enforce cross-device causal forget: admission barriers. It also lacks server-side post-CAS monotonic revocation preservation against stale offline replicas or paraphrased re-extraction.
  • Zep / Graphiti [4] models agent memory as a bi-temporal knowledge graph, combining non-destructive edge invalidation (valid_to / invalid_at) with hybrid BM25, dense vector, and graph Reciprocal Rank Fusion [9]. Bi-temporal invalidation supports historical audit queries ("where did the user live last year?"), but invalidating an edge by server timestamp differs from cryptographic erasure. Invalidated facts remain in historical graph state unless explicitly purged, and wall-clock ordering breaks under skewed multi-device writes.
  • Letta / MemGPT [2] separates editable Core Memory blocks (client.blocks.delete()) from append-mostly Archival Memory vector passages (DELETE /v1/agents/{id}/archival-memory/{id}). Archival passages remain immutable to the agent itself to prevent accidental self-corruption. That design assumes a single authoritative server runtime rather than multi-device offline sync, quote-independent source revocation, or backward-compatible wire downgrade protection.

2.2 Machine unlearning versus distributed external memory erasure

GDPR Article 17 [10] and memory-poisoning attacks [11][12] make reliable deletion a hard security and compliance requirement. Neural machine unlearning [13][14] removes a training example's imprint from model weights without retraining from scratch. Personal agents like Piko avoid weight-level unlearning altogether by never fine-tuning foundation weights on personal memory or Soul rules. Every personal fact lives in inspectable external files and bounded metadata. That architecture eliminates weight intractability, yet introduces a distributed systems problem: once a user erases a fact or revokes a source turn on one device, neither delayed background extractors nor stale peer devices may restore it.

Four 2026 empirical studies show that storage-level forgetting and revocation remain unsolved in deployed agent memory. On Bemula (50 multi-session dialogues, 135 explicit forget requests), Xie et al. [15] report that none of six mainstream memory systems pass more than 1.5% of forget requests end to end, either leaving targets extractable or over-deleting unrelated facts. Shen et al. [16] evaluate five soft-revocation backends and find that none enforce revocation marks by default at retrieval time; revoked policies instead outrank their replacements. Our Study 3A observes the same ranking inversion in ungated vector retrieval (70.0% stale leakage, Table 7). Cerruti et al. [17] show on EAL-Bench that failed permission updates in persistent memory create false authority for up to 45.4% of unauthorized requests, which executors follow in 99.0% of trials. That risk explains why MFPM governs SOUL.md behavioral rules with the same provenance discipline as factual memory. By contrast, biologically grounded architectures such as Microsoft Research's interference-based forgetting [18] compress redundant traces effectively (58% store reduction), yet probabilistic decay cannot substitute for deterministic, auditable erasure when a user deletes a private secret. MFPM and ForgetBench complement these single-runtime behavioral benchmarks by isolating the distributed synchronization layer across offline replicas, skewed clocks, and protocol downgrades.

2.3 Distributed primitives, fusion, and tamper-evident logs

The primitives required to close this gap come from classical distributed systems, information retrieval, and applied cryptography. Lamport [19] proved why physical wall clocks cannot safely order concurrent distributed events. Observed-Remove CRDTs [20] show how unique causal tags yield clock-free convergence. MFPM flips this polarity to forget-wins causal release: an unacknowledged deletion always dominates a concurrent re-assertion. Optimistic concurrency control [21] supplies atomic baseVersion compare-and-swap (CAS), which we pair with a post-CAS monotonic subset check inside the same SQLite write transaction. On the retrieval side, BM25 length normalization [22], Maximal Marginal Relevance [23], Minoux's lazy upper-bound greedy heap [24], and Reciprocal Rank Fusion [9] combine fast lexical precision with ephemeral on-device embeddings. Finally, Ed25519 signatures [25] and append-only hash-chained transparency logs [26] support F4 protection when even the sync server is untrusted.

Table 1. Public-architecture comparison across deletion primitives, multi-device invariants, and retrieval substrates.
System / Paradigm Storage & Retrieval Substrate Deletion Mechanism (Public Design) Quote-Free Source Revocation Clock-Skew Safe Multi-Device Forgetting Server Post-CAS Monotonic Guard Zero-Lag / Gated Retrieval
Naive Cloud KV / LWW Single doc or KV store Overwrite / delete by wall clock None No (wall clock) No Single file (no index lag)
Letta / MemGPT [2] Core blocks + Archival vector DB blocks.delete / archival-memory delete None Out of scope (single runtime) No Archival vector index
Mem0 [3] SQL + vector DB (+ optional graph) Delete by ID / batch / expiration_date Chunk/ID bound Out of scope (central API) No Async vector/graph index
Zep / Graphiti [4] Bi-temporal KG + RRF hybrid Non-destructive valid_to / invalid_at Edge timestamp Server-clock bound No Bi-temporal graph + vector
MFPM / Piko (F3 Prod.) Authoritative Markdown + Hash Ledger Immutable forget: + v2 hash denials Yes ((factHash, mid, msgHash, date)) Yes (causal acknowledges semilattice) Yes (require_preserved + 409) Zero-index Lazy-MMR (R1)
MFPM + Hybrid / F4 (Proto.) Markdown + Ephemeral NLEmbedding + Ed25519 F3 + Ed25519 chain + EpochCertificate Yes + tamper-evident root Yes + compromised-server detect Yes + quorum epoch cutover MFPM-Gated Hybrid RRF (R4)

3. Forgetting maturity taxonomy (F0–F4) and resurrection vectors

RQ1. What maturity levels separate superficial deletion from verifiable cross-device forgetting, through which concrete paths (V1–V6) do memories resurrect, and how severely do real memory-sync engines fail under mechanistic execution?

Answer: Forgetting maturity spans five levels (F0–F4), from local UI deletion (F0) to Piko's deployed end-to-end monotonic barrier (F3) and untrusted-server cryptographic compaction (F4). Six paths (V1–V6) drive silent resurrection. Under ForgetBench v1.0 (30,000 deterministic engine runs, zero coin flips), naive LWW, async chunk-upsert, local tombstone, and client-only provenance engines silently resurrect 73.33%–100.00% of episodes, whereas live Piko AccountSync records 0 / 6,000 (0.00%) (Table 6).

3.1 The F0–F4 Personal Agent Forgetting Maturity Ladder

Just as PESA defines five ecosystem agency levels (L0–L4) [1], personal agent memory needs an explicit scale for deletion reliability. Calling both a local DELETE button and an end-to-end causal sync protocol "forgetting" obscures the underlying failure modes. Figure 1 defines the five tiers:

  • F0 · Ephemeral UI-Only Delete: Removes the fact from the active local view or overwrites the cloud record via physical-clock LWW. Any in-flight extractor, offline device, or lagging vector index restores the fact silently (100% failure on V1–V6; Table 6).
  • F1 · Local Tombstone / Best-Effort Index Delete: Adds a local literal hash blocklist or dispatches asynchronous deletes to a vector/graph index. It stops exact verbatim same-device retries, yet fails under paraphrased re-extraction, quote-hash drift, cross-device sync, or wall-clock skew (91.7%–95.8% failure; Table 6).
  • F2 · Client-Only Provenance & Plain Version CAS: Tracks quote-independent source revocations on the client and enforces optimistic baseVersion locking on the server without server-side forget admission or post-CAS revocation preservation. It blocks local races, yet fails when an offline device refreshes baseVersion or a legacy v1 client strips the ledger (73.3% failure; Table 6).
  • F3 · End-to-End Monotonic Forgetting Barrier (Piko Production): Enforces clock-independent causal Active(C) barriers, zero-plaintext v2 hash revocations, fail-closed rebasing, and serialized server post-CAS require_preserved inside one write transaction. Under an honest-but-concurrent sync server, it records 0 / 6,000 (0.00%) silent resurrections across V1–V6 (Table 6).
  • F4 · Untrusted-Server Cryptographic & Epoch-Compacted Forgetting (Evaluated Prototype): Removes the honest-server assumption via client-signed Ed25519 monotonic state chains and bounds multi-year tombstone growth via multi-device quorum EpochCertificate compaction (100% compromised-server rollback/drop detection; 99.04% 5-year metadata reclamation; Table 10).
F0-F4 personal agent forgetting maturity taxonomyPERSONAL AGENT FORGETTING MATURITY LADDER (F0 – F4)F0Ephemeral UI-Only DeleteDeletes local row or wall-clock LWW overwrite; async & offline replicas resurrectSingle replica, sync onlyNaive LWW / KV (100% leak)F1Local Tombstone / Best-Effort Index DeleteLiteral blocklist or async vector delete; fails on paraphrases, lag & skewSame device, verbatimRAG / Tombstone (92–96%)F2Client-Only Provenance & Version CASQuote-free client ledger + plain CAS; offline push & v1 downgrade winSame device, v2 onlyClient-only v2 (73% leak)F3End-to-End Monotonic Forgetting BarrierClock-free Active(C) + v2 denials + post-CAS require_preservedMulti-device · Honest serverPiko Production (0 / 6,000)F4Untrusted-Server Crypto & Epoch CompactionEd25519 signed state chain + quorum EpochCertificate compacting barriersCompromised server · 5+ yrPrototype (-99.0% meta)
Figure 1. Personal agent forgetting maturity ladder (F0–F4), contrasting surface UI deletion and local tombstones against Piko's deployed F3 end-to-end monotonic barrier and evaluated F4 untrusted-server cryptographic and epoch-compacted prototypes.

3.2 Definition of MFPM and three design theses

Definition 1 (MFPM). Monotonic Forgetting-Barrier Personal Memory (MFPM) is a cross-device memory architecture satisfying four properties: (i) authoritative personal facts reside in human-inspectable documents served directly or via ephemeral caches gated by active document hashes; (ii) explicit deletions append immutable, zero-plaintext causal control events (forget:), releasable only by an explicit remember: naming the causally observed deletion IDs; (iii) source-to-fact provenance lives in a bounded cryptographic hash ledger whose revocations bind to the exact source message version without depending on quote wording; and (iv) every asynchronous client commit and server transaction preserves active barriers and revocations monotonically, halting into user review rather than silently dropping denial state.

Intuition. MFPM turns a user's decision to forget a fact or disavow a chat source into a one-way ratchet across every device. A delayed background job, a rephrased quote, an offline laptop waking up weeks later, or an older app build cannot wind that ratchet backward. When intent is ambiguous, sync pauses and prompts the user instead of guessing.

Aligned with human-centered AI control [27] and PESA's single-principal boundary [1], MFPM rests on three theses:

  1. Deletion is a distributed invariant, not a local widget. Clearing a local SQLite row or issuing a best-effort vector delete on one phone leaves background jobs, offline replicas, and archives able to undo the wipe.
  2. Tombstones and provenance must carry zero forgotten plaintext. Storing erased secrets inside a cloud "do-not-relearn blocklist" defeats the purpose of erasure. SHA-256 digests over normalized fact bodies, document bytes, and raw source messages provide cryptographic binding with zero prose retained.
  3. Never let a secondary index become an independent source of truth. Personal memory spans tens to a few thousand facts, not web-scale corpora. Serving directly from authoritative Markdown, or gating ephemeral on-device embeddings by active document hashes and Active(C), removes async index-lag ghosting at the root.

3.3 Six concrete resurrection vectors (V1–V6)

Figure 2 and Table 2 catalog the six failure paths tested mechanistically in ForgetBench v1.0.

Six concrete memory resurrection vectors (V1-V6)SIX CONCRETE MEMORY RESURRECTION VECTORS IN ASYNC MULTI-DEVICE AGENTSV1 · ASYNC RACELate Extraction CommitJob starts on D0, user deletes D1Async writer overwrites D1Guard: UTF-8 exact + gen checkV2 · QUOTE DRIFTParaphrase BypassSame msg m, new quote q' != qChunk/quote hash misses denialGuard: Revocation omits quoteHashV3 · OFFLINE SYNCStale Replica / ArchiveOffline Mac pushes pre-delete docLWW accepts unreviewed snapshotGuard: K_srv <= memoryControlsV4 · CLOCK SKEWConcurrent Forget/RememberFast remember vs slow forgetWall clock t_rem > t_fgt winsGuard: Causal acknowledges setV5 · DOWNGRADEv1 / Delete-to-ClearLatest baseVersion strips v2 RPlain CAS checks version onlyGuard: Post-CAS require_preservedV6 · TAMPER/CORRUPTCorrupt Reset & OpIDBad JSON resets or mutated retryFail-open parser wipes denialsGuard: Fail-closed + op body eq
Figure 2. Six concrete memory resurrection vectors (V1–V6) spanning asynchronous learning, quote-paraphrase drift, offline replica/archive replay, wall-clock skew races, schema downgrades, and corrupted-ledger or idempotency tampering.
Table 2. Taxonomy of six concrete memory resurrection vectors (V1–V6) and required MFPM defences.
Vector Real-World Trigger Why Common Designs Resurrect MFPM Defence Layer
V1 · Late Async Commit Background extractor snapshots D0, finishes after user deletes a fact in D1, and commits (verbatim or paraphrased). Async writers skip raw-byte snapshot checks, account-generation checks, and server forget-control gates. Client UTF-8 exact + generation check (ConversationMemoryLearning) + server 409 memory_review_required.
V2 · Quote-Paraphrase Bypass User revokes source message m for fact f; a later pass cites a trimmed or alternate substring q' ≠ q from m. Chunk/quote-keyed stores hash (m, q') into a fresh ID, missing the deletion of (m, q). Revocation tuple (factHash, messageID, messageHash, sourceDate) drops quoteHash; projection hides every quote from m.
V3 · Offline Replica / Archive Offline laptop reconnects and pushes a pre-delete MEMORY.md or memory_archive (including offline paraphrases). Wall-clock LWW or plain version CAS accepts snapshots that never observed the cloud deletion. Server admission gate requires required(forget:) ⊆ payload.memoryControls for any non-empty document or archive (409).
V4 · Wall-Clock Skew Race Fast-clock Device A emits remember acknowledging an old deletion; slow-clock Device B concurrently emits a fresh forget with an earlier timestamp. Comparing t_remember > t_forget lets the older-intent remember wipe the concurrent forget. Clock-free acknowledges semilattice (MemoryForgetMarker.activeDeletions): unacknowledged forget: always survives.
V5 · Downgrade / Delete-to-Clear Legacy v1 client, missing factProvenance, empty revocations, unknown v999 object, or deleted=True sent with the latest baseVersion. Plain CAS checks only old.version == baseVersion, letting a valid version wipe all denials. Post-CAS require_preserved inside SQLite BEGIN IMMEDIATE enforces old_denials ⊆ next_denials (409).
V6 · Corrupt Ledger / OpID Tamper Local JSON corruption triggers silent empty reset, or a client replays an operationID with stripped revocations, or tries to delete a forget: control. Fail-open parsers rebuild empty ledgers; weak idempotency keys skip payload equality checks. Fail-closed rebased refuses corrupt ledgers; server enforces payload/deleted equality (409 idempotency_conflict) and immutable_memory_control.

3.4 Core glossary and production mapping

Table 3. Core MFPM objects and their exact implementations in Piko.
Object Formal Role Piko Production Module
Authoritative Document (D) Human-readable MEMORY.md or SOUL.md acting as sole source of truth RuntimeStore.swift, MemoryRecall.swift
Causal Control Log (C) Append-only forget: / remember: records storing SHA-256 fingerprints only MemoryForgetMarker.swift, account_sync.py
Provenance Ledger (L) Bounded v1/v2 hash ledger (512 facts × 8 supports, 4,096 revocations) bound to SHA256(D) MemoryFactProvenance.swift, memory_source_provenance.py
Opaque Preservation Carrying unrecognized future provenance fields across byte-identical re-encodes without lossy merge MemoryProvenanceRecordMerge.swift
Lazy-MMR (SelectionHeap) Upper-bound priority-queue MMR returning byte-identical output to eager MMR (candidates > 40) MemoryRecall.swift, MemoryRecallSession.swift
Gated Hybrid Recall (R4) RRF fusion of MemoryRecall + ephemeral NLEmbedding strictly gated by active hashes & Active(C) Evaluated prototype (swift_memory_probe.swift)

4. Formal model, invariants, and five propositions

RQ2. What minimal distributed state model, without synchronized wall clocks or stored plaintext, provably blocks silent resurrection across V1–V6, and what formal boundary separates cryptographic hash barriers from semantic paraphrases?

Answer: Coupling an append-only causal forget:/remember: log (C), a bounded quote-free v2 hash ledger (L), and a serialized server post-CAS subset check (Rold ⊆ Rnext) yields clock-independent convergence (Prop. 1), blocks silent resurrection across V1–V6 (Prop. 2), keeps bounded merging commutative (Prop. 3), and matches eager MMR byte-for-byte (Prop. 4). Proposition 5 proves that hash barriers alone cannot recognize unseen paraphrases without storing plaintext; document-level admission barriers (K_req ⊆ memoryControls) are therefore necessary.

4.1 Distributed state space

Let an owner's personal memory state at server commit version v ∈ ℕ be the tuple Sv = (Dv, Cv, Lv):

  • Authoritative Document Dv: A raw UTF-8 byte sequence (MEMORY.md), normalized per line into canonical fact strings canon(f) with cryptographic identity h(f) = SHA256(canon(f)) and byte digest δ(Dv) = SHA256(Dv). Raw bytes matter: canonically equivalent Unicode strings in NFC (caf\u00E9) and NFD (cafe\u0301) compare equal under Swift String.==, yet produce distinct digests δ(DNFC) ≠ δ(DNFD).
  • Causal Control Log Cv: An immutable, append-only set of encrypted memory_control records partitioned into forget markers Fv and remember markers Mv:
Fv = {(id, fp, tf)},    Mv = {(id, fp, tr, A)},    A ⊆ ID(Fv)(1)

Here fp = h(f) is a 64-character lowercase SHA-256 hex digest with zero plaintext. Timestamps tf, tr are advisory metadata never consulted for conflict resolution, and A lists the forget: record IDs causally observed when the user chose to remember f again.

  • Active Deletion Projection Active(C):
Active(C) = { e ∈ F   |   e.id ∉ ⋃m ∈ M m.acknowledges }(2)

A deletion barrier e ∈ F stays active across every replica until some explicit remember: event names e.id in acknowledges.

  • Cryptographic Provenance Ledger Lv = (ver, δ, K, E, R): Bounded by production ceilings |E| ≤ 512, supports per fact ≤ 8, |R| ≤ 4,096, and |K| ≤ 10,000. Here δ = δ(Dv), K is the sorted set of acknowledged forget: IDs embedded in the payload, and E maps each h(f) to sorted support tuples s = (mid, mhash, qhash, ts). The monotonic set R holds quote-free revocation tuples:
r = (fhash, mid, mhash, ts)    (deliberately omits qhash)(3)
  • Effective Support Projection Eff(L, f):
Eff(L, f) = { s ∈ E[h(f)]   |   (h(f), s.mid, s.mhash, s.ts) ∉ R }(4)

4.2 Six verifiable invariants (I1–I6)

Every valid state transition Sv → Sv+1 in MFPM preserves six end-to-end invariants:

  • I1 (Zero-Plaintext Control & Provenance): Neither Cv nor Lv ever stores raw fact prose or chat excerpts. Both hold only SHA-256 digests, UUIDs, normalized byte lengths, and numeric dates.
  • I2 (Immutable Append-Only Forget Controls): Any write targeting an existing forget: record ID with deleted=True or a mutated payload is rejected (400 invalid_memory_control).
  • I3 (Document-Level Forget Admission Barrier): Any non-empty push to personal_document (MEMORY.md) or memory_archive must satisfy Kreq(Cv) ⊆ payload.memoryControls. Missing any required barrier aborts with 409 memory_review_required.
  • I4 (Post-CAS Monotonic Revocation Preservation): Inside the same serialized write transaction (BEGIN IMMEDIATE) that checks baseVersion == v, the server computes Rold = denial_keys(Sv) and Rnext = denial_keys(Snext). Whenever Rold ≠ ∅, any transition with Snext.deleted, an absent or invalid Rnext, or Rold ⊈ Rnext fails with 409 memory_source_review_required.
  • I5 (Fail-Closed Local Rebasing & Idempotency Equality): Corrupt local provenance files cannot silently reset to empty. Replaying a prior operationID with any change to payload or deleted fails with 409 idempotency_conflict.
  • I6 (Atomic Byte-Exact Async Commit): A background learning pass capturing (D0, g0) commits only when live state still satisfies Dcur = D0 (raw UTF-8 bytes) and gcur = g0. Every proposed sourceQuote must also appear verbatim in the current turn, with no proposed support hitting R.

4.3 Five propositions and proof sketches

Proposition 1 (Clock-Independent Forget-Wins Convergence). Under union replication CA ⊔ CB = (FA ∪ FB,  MA ∪ MB), the lattice (2F × 2M, ⊔) is a commutative, associative, idempotent join-semilattice. Its active projection Active(C) is invariant to arbitrary physical wall-clock skew Δ t ∈ (-∞, +∞) and message delivery order. For any concurrent deletion f2 not causally observed by a remember event r1, f2 ∈ Active(CA ⊔ CB) holds unconditionally.

Proof Sketch. Set union ∪ over finite subsets of F and M satisfies commutativity, associativity, and idempotency directly. Equation (2) evaluates Active(C) solely via set membership e.id ∉ ⋃m ∈ M m.acknowledges without inspecting tf or tr. Because f2 is generated concurrently with r1 using a fresh UUID, f2.id ∉ r1.acknowledges regardless of whether tf(f2) ≪ tr(r1) or whether f2 arrives before or after r1. Hence f2 remains in Active(CA ⊔ CB) across every replica.

Proposition 2 (Zero Silent Resurrection Across V1–V6). Under an honest sync server enforcing invariants I1–I6 and clients obeying Algorithm 2, no execution path in V1–V6 can silently restore a deleted fact into D or reactivate a revoked source tuple in Eff(L, f).

Proof Sketch. Case analysis over V1–V6: (V1) If async learning runs on the deleting device, raw UTF-8 equality Dcur = D0 fails by I6 and aborts locally. If it runs on an offline peer, the push lacks the new forget: ID and fails I3 (409 memory_review_required). (V2) Any re-extracted quote q' ≠ q from the same message version carries identical (h(f), mid, mhash, ts) ∈ R. Equation (4) excludes it locally, and I4 blocks stripping R remotely. (V3) An offline pre-delete MEMORY.md or memory_archive omits the active forget: barrier and fails I3 before committing. (V4) By Proposition 1, concurrent forget: survives arbitrary clock skew and delivery reordering. (V5) Downgrades to v1, missing ledgers, empty revocations, unknown v999 schemas, or deleted=True at the latest baseVersion all violate Rold ⊆ Rnext inside the serialized post-CAS guard (I4). (V6) Corrupt local ledgers fail closed (I5), malformed wire ledgers fail strict schema checks (400 invalid_memory_sources), mutated operationID retries fail I5 (409 idempotency_conflict), and deleting a forget: record fails I2 (400 invalid_memory_control).

Proposition 3 (Commutative Bounded Merge via Occupied Revoked Slots). Consider two compatible ledgers L1, L2 bound to the same (δ(D), K). Keeping revoked support tuples inside E[h(f)] (hiding them only through Eff(L, f)) rather than physically evicting them makes bounded support selection top8(E1[h] ∪ E2[h]) commutative, associative, and invariant to revocation arrival order.

Proof Sketch. Suppose fact f accumulates 9 distinct supports {s1, …, s9} sorted deterministically by (ts, mid, mhash, qhash), and s1 is revoked. If s1 were physically purged from E upon revocation, a device receiving the revocation before s9 would retain {s2, …, s9}. In contrast, a device merging s1 … s8 first (truncating s9) and applying the revocation later would retain {s2, …, s8}, diverging on arrival order. Keeping s1 in E ensures the bounded 8-slot set top8(E1 ∪ E2) depends solely on set union over all observed supports, while R1 ∪ R2 monotonically hides s1 in Eff(L, f).

Proposition 4 (Byte-Exact Optimality of Upper-Bound Lazy-MMR). In MemoryRecall.swift, a max-heap keys remaining candidates by their last-evaluated MMR upper bound ui ≥ MMR(i  |  S). Re-evaluating only the popped top candidate against newly selected items Snew and re-inserting if stale selects the exact same sequence and UTF-8 bytes as eager O(k · |C|) MMR.

Proof Sketch. For candidate i with base relevance rel(i) and diversity weight λ, MMR(i  |  S) = λ · rel(i) - (1 - λ) maxj ∈ S sim(i, j). As S grows monotonically (S ⊆ S'), maxj ∈ S' sim(i, j) ≥ maxj ∈ S sim(i, j), so MMR(i  |  S') ≤ MMR(i  |  S). Every stale heap score is therefore a valid upper bound [24]. When the popped top element i* is fresh (evaluated against all of S) and satisfies ui* ≥ uk ≥ MMR(k  |  S) for every remaining k under deterministic tie-breaking (score, relevance, documentOrder), i* matches eager argmax at every step.

Proposition 5 (Cryptographic vs. Semantic Forgetting Separation). Under a collision-resistant hash h (e.g., SHA-256) and zero plaintext retention (I1), no per-fact hash tombstone fp = h(canon(f)) alone can decide whether an independently generated paraphrase f' ≠ f is semantically equivalent to f. Blocking paraphrased resurrection from stale devices or re-extraction therefore requires either (a) document-level causal admission barriers (I3) plus quote-free source-message revocations (I4), or (b) violating I1 by retaining plaintext or invertible semantic vectors of forgotten secrets.

Proof Sketch. By preimage and second-preimage resistance, given only fp = h(canon(f)) and an unseen string f' with canon(f') ≠ canon(f), the collision probability is negligible (2-256). Moreover, fp exposes no semantic neighborhood information about f for comparison against f'. Conversely, storing an embedding vector v(f) of the deleted secret enables nearest-neighbor matching against f', yet embeddings are vulnerable to inversion attacks and retain sensitive meaning, violating I1. MFPM resolves this trade-off structurally: I3 rejects any unreviewed document snapshot from a replica missing e.id regardless of offline rewording, and I4 blocks any re-extraction from revoked source message m regardless of quote paraphrasing. Only a fresh, unrevoked user message stating f' after explicit barrier synchronization can re-introduce a fact.

5. Reference architecture and MFPM-gated hybrid recall

5.1 End-to-end client–server architecture

Figure 3 shows how Piko wires MFPM across native Swift clients (iPhone, iPad, Mac) and the Python AccountSync server.

End-to-end MFPM client-server architecture in PikoON-DEVICE CLIENT (SWIFT · IPHONE / IPAD / MAC)MEMORY.md / SOUL.mdAuthoritative source of truthMemoryRecall + SessionZero-index Lazy-MMR · 64 KiBMemoryFactProvenance v2512x8 supports · 4,096 denialsConversationLearningUTF-8 exact + gen + rev checkMemoryForgetMarkerCausal forget:/remember: logProvenanceRecordMergeOpaque preserve & review gateZero persistent secondary vector DB · Zero plaintext in tombstonesCLOUD SYNC GUARD (PYTHON · SYNC)1. Idempotency GateExact body match on operationID2. Forget Admission Barrierrequired(forget:) <= memoryControls3. CAS + require_preservedbaseVersion & R_old <= R_next (409)4. Encrypted SQLite StoreFernet at-rest · Owner-scoped
Figure 3. End-to-end MFPM reference architecture in Piko. On-device Swift modules serve zero-index Lazy-MMR directly from authoritative Markdown while pairing causal forget markers and v2 hash provenance with four serialized server gates inside AccountSync.

On the client side, MEMORY.md and SOUL.md remain plain human-readable Markdown and are the sole authoritative state. MemoryRecall reads directly from MEMORY.md with zero persistent secondary vector store. MemoryRecallSession caches a reply-scoped parsed index keyed by raw UTF-8 bytes (capped at <= 8 entries and <= 64 KiB). MemoryFactProvenance maintains the bounded v2 hash ledger (512 × 8 supports, 4,096 revocations), while MemoryForgetMarker projects Active(C) without consulting wall clocks (Figure 4). ConversationMemoryLearning gates async background commits, and MemoryProvenanceRecordMerge enforces forward-compatible opaque preservation across app versions.

Clock-independent forget-wins causal semilatticeWALL-CLOCK SKEW RACE (V4): WHY PHYSICAL TIMESTAMPS FAIL AND CAUSAL ACKNOWLEDGES CONVERGEEarlier physical wall clockLater physical wall clockDevice Af1: forget(fp, u1)t = 815,000,000 sr1: remember(fp, ack=[f1])Fast clock: t = +3,600 scausally observes f1 onlyDevice Bf2: concurrent forget(fp, u2)Slow/skewed clock: t < r1Wall-Clock LWW Outcome: RESURRECTSt(r1) > t(f2) silently overrides f2MFPM Active(C) Outcome: f2 SURVIVESf2 not in r1.acknowledges (clock-free)
Figure 4. Clock-independent forget-wins causal semilattice (V4). Even when Device A's remember event carries a later physical wall-clock timestamp than Device B's concurrent deletion f2, f2 survives Active(C) because it is absent from r1.acknowledges.

On the server side (account_sync.py, memory_source_provenance.py), every sync push passes four serialized gates inside SQLite BEGIN IMMEDIATE: (1) operationID idempotency equality; (2) immutable forget: protection and required(forget:) ⊆ memoryControls admission; (3) baseVersion CAS plus post-CAS require_preserved over v2 denial sets (Figure 5); and (4) Fernet-encrypted owner-scoped persistence.

Quote-independent cryptographic provenance v2 ledgerCRYPTOGRAPHIC HASH PROVENANCE (ZERO PROSE) & QUOTE-INDEPENDENT REVOCATION PROJECTIONMEMORY.md (bytes D)documentHash = SHA256(D)Entries E (<= 512 x 8)factHash -> sorted SupportsRevocations R (<= 4,096)Monotonic denial set (v2)Support Tuple (Stored in entries){ messageID, messageHash, quoteHash, sourceDate }Tracks excerpt hash for auditing; never stores raw proseRevocation Tuple (Stored in revocations){ factHash, messageID, messageHash, sourceDate }Omits quoteHash -> paraphrased quotes cannot bypassEffective Read: Eff(L, f)Filters supports matching R; keeps other sourcesOccupied Slot Rule (Prop. 3)Revoked slot stays in E -> commutative merge
Figure 5. Cryptographic v2 provenance ledger and quote-independent revocation projection. Revocation tuples deliberately omit quoteHash so paraphrasing an excerpt never bypasses denial, while revoked slots remain occupied in entries to preserve bounded merge commutativity.

5.2 Forward-compatible opaque merging and weight-free Soul governance

Multi-device users rarely upgrade iPhone, iPad, and Mac on the same day. When an older client encounters a cloud payload containing an unrecognized future provenance schema (such as version: 3 or new nested fields), MemoryProvenanceRecordMerge.swift follows two strict rules:

  • Opaque carry on byte-identical re-encodes: If the local document and controls did not change, the client preserves the unknown cloud factProvenance bytes untouched rather than dropping or rewriting them.
  • Quarantine into review on local edits: If the local device modified MEMORY.md or controls over an unknown cloud provenance version, automatic merge halts and flags the record for user review. The client never uploads a lossy downgrade.

The same discipline governs communication style (SOUL.md). Rather than fine-tuning weights or silently overwriting tone rules, Piko partitions behavioral guidance into 13 explicit rule families (MemoryLearningPolicy.swift) validated in an atomic batch. Any background proposal lacking a verbatim sourceQuote from the current turn, or violating any family rule, aborts the entire sibling batch so partial edits cannot enter SOUL.md.

5.3 Forward-looking MFPM-Gated Hybrid Recall (R4)

Pure lexical recall (MemoryRecall.swift, R1) eliminates index lag and reaches 100% precision on literal queries (Table 7). However, it fails when a user asks a conceptual paraphrase sharing zero surface tokens with the stored fact (for example, asking "child music practice schedule" for "Daughter Emma has violin lessons every Thursday at 17:00"). Adding a conventional external vector database recovers paraphrase recall at a high privacy cost: async index delete-lag leaks deleted secrets and stale superseded facts into top-5 context (Study 3, Section 9.3).

MFPM-Gated Hybrid Recall (R4) addresses both requirements without adding a persistent secondary source of truth:

  1. Ephemeral on-device embeddings only: On macOS and iOS, Apple's NaturalLanguage.NLEmbedding.sentenceEmbedding (512-dim English, 640-dim Simplified Chinese) embeds facts strictly in ephemeral RAM, with zero cloud embedding APIs and zero persistent vector DB.
  2. Authoritative active-hash + Active(C) gate: Before scoring any cached vector vi, R4 checks that h(fi) ∈ ActiveHashes(Dcur) AND h(fi) ∉ Active(C). Even if an out-of-band RAM cache still holds an old vector for a deleted or superseded fact, the gate drops it before ranking.
  3. Reciprocal Rank Fusion (RRF): Lexical ranks rlex(f) from compiled MemoryRecall.render(..., purpose: .search) and gated cosine ranks rsem(f) (with a relevance floor cos ≥ 0.25) combine via standard RRF [9]:
RRF(f) = 1.35 / (20 + rlex(f)) + 1.0 / (20 + rsem(f))(5)

As Section 9.3 shows, R4 lifts active Recall@5 from 66.67% → 85.00% (MRR 0.658 → 0.765) with 0 / 20 (0.0%) deleted-fact zombies and 6.28 ms p50 latency at N = 512 (Table 7).

6. Core algorithms and complexity bounds

Algorithms 1–4 capture the four load-bearing execution paths in Piko, followed by their asymptotic and bounded production costs in Table 4.

Algorithm 1 · Clock-Independent Active Deletions & Compatible Merge
function active_deletions(C):
  released = union(m.acknowledges for m in C if m.is_remember)
  return {e for e in C if e.is_forget and e.id not in released}

function merge_ledgers(L1, L2, D, K):
  if L1.doc_hash != SHA256(D) or L2.doc_hash != SHA256(D):
    return None  # fail closed on byte mismatch
  if L1.controls != sorted(K) or L2.controls != sorted(K):
    return None
  R = L1.revocations ∪ L2.revocations
  if |R| > MAX_REVOCATIONS: return None
  E = {}
  for fhash in (keys(L1.entries) ∪ keys(L2.entries)):
    # Occupied revoked slots stay inside E before top-8 truncation (Prop. 3)
    merged_sups = sort_unique(L1.entries[fhash] ∪ L2.entries[fhash])
    E[fhash] = merged_sups[0..8]
  return Ledger(ver=2, doc_hash=SHA256(D), controls=sorted(K), entries=E, revocations=R)
Algorithm 2 · Byte-Exact & Revocation-Checked Async Learning Commit
function commit_async_learning(snapshot_D0, snapshot_gen, turn_msg, proposals):
  if live_bytes("MEMORY.md") != snapshot_D0 or live_account_gen() != snapshot_gen:
    return ABORT_STALE_SNAPSHOT
  L = load_and_validate_ledger("MEMORY.md")
  if L is None:
    return ABORT_CORRUPT_LEDGER  # never reset corrupt metadata to empty
  for p in proposals:
    if p.source_quote not in turn_msg.raw_text:
      return ABORT_UNGROUNDED_BATCH  # atomic sibling rejection
    rev_key = (fact_hash(p.fact), turn_msg.id, SHA256(turn_msg.raw_text), turn_msg.date)
    if rev_key in L.revocations:
      return ABORT_REVOKED_SOURCE
  atomic_write_document_and_ledger(proposals, L)
Algorithm 3 · Server Transactional CAS, Admission Barrier & Post-CAS Guard
function server_account_sync_push(owner, mut):
  BEGIN IMMEDIATE
  prior = db.find_operation(owner, mut.operationID)
  if prior is not None:
    if prior.body != canonical(mut.payload, mut.deleted):
      raise CloudError(409, "idempotency_conflict")
    return prior.cached_result
  if mut.kind == "memory_control" and mut.recordID.startswith("forget:"):
    existing = db.get(owner, mut.kind, mut.recordID)
    if existing is not None and (mut.deleted or existing.payload != mut.payload):
      raise CloudError(400, "invalid_memory_control")
  if mut.kind in ("personal_document", "memory_archive") and is_non_empty(mut.payload):
    req = active_required_forgets(db, owner)
    if not (req ⊆ set(mut.payload.get("memoryControls", []))):
      raise CloudError(409, "memory_review_required")
  cur = db.get(owner, mut.kind, mut.recordID)
  if cur.version != mut.baseVersion:
    return conflict_response(cur)
  # Post-CAS monotonic revocation preservation inside same write lock
  old_denials = denial_keys(cur.payload)
  if old_denials is not empty:
    next_denials = None if mut.deleted else denial_keys(mut.payload)
    if next_denials is None or not (old_denials ⊆ next_denials):
      raise CloudError(409, "memory_source_review_required")
  saved = db.write_fernet_encrypted(owner, mut, version=cur.version + 1)
  COMMIT
  return applied(saved)
Algorithm 4 · Upper-Bound Lazy-MMR Bounded Recall (SelectionHeap)
function lazy_mmr_select(candidates, budget_bytes, lambda):
  # SelectionHeap activates when |candidates| > 40 (exact parity with eager MMR)
  heap = MaxHeap((lambda * c.rel, c.rel, c.order, c, evaluated_upto=0) for c in candidates)
  selected = []
  used_bytes = 0
  while heap is not empty:
    top = heap.pop()
    if top.evaluated_upto < len(selected):
      max_sim = max(top.max_sim, max(jaccard(top.c, s) for s in selected[top.evaluated_upto:]))
      new_score = lambda * top.c.rel - (1 - lambda) * max_sim
      heap.push((new_score, top.c.rel, top.c.order, top.c, evaluated_upto=len(selected)))
      continue
    if used_bytes + top.c.bytes <= budget_bytes:
      selected.append(top.c)
      used_bytes += top.c.bytes
  return format_lines(selected)
Table 4. Time, space, and bounded production ceilings for Algorithms 1–4.
Algorithm Time Complexity Space Bound Production Ceiling (Piko)
Alg. 1 · Active Deletions & Merge O(|C| + |E|log|E| + |R|) O(|E| + |R|) |E| ≤ 512 × 8,  |R| ≤ 4,096,  |K| ≤ 10,000
Alg. 2 · Async Learning Commit O(|D| + |P| · |R|) O(|D|) Single atomic turn; zero tools
Alg. 3 · Server Post-CAS Push O(|Kreq| + |E| + |R|) O(payload) ≤ 1.92 MiB JSON / 2.57 MiB Fernet
Alg. 4 · Upper-Bound Lazy-MMR O(|C|log|C|) typical vs. O(k|C|) eager O(|C|) Session cache ≤ 8 docs, ≤ 64 KiB

7. Cross-device walkthroughs and F4 protocol extensions

7.1 Cross-device deletion, stale push rejection, and legacy downgrade block

Figure 6 traces one multi-device episode across three devices sharing one Piko account:

  1. iPhone (latest) deletes a sensitive fact and revokes its source message, pushing an immutable forget: marker and a v2 ledger carrying the new revocation tuple (v2).
  2. Mac (offline) wakes up hours later with a pre-delete MEMORY.md lacking that forget: ID and pushes to AccountSync. Gate 2 rejects it with 409 memory_review_required.
  3. iPad (legacy v1) fetches the latest baseVersion and sends a v1 payload without revocations. It clears baseVersion CAS, yet hits Gate 3 (require_preserved) inside the same SQLite transaction and fails with 409 memory_source_review_required.
  4. Recovery: Mac pulls the missing barriers (1 RTT), reconciles with the user, and commits converged v3 with zero silent resurrection.
Cross-device deletion, stale push rejection, and legacy downgrade blockiPhone (Latest)AccountSync ServerMac (Offline)iPad (Legacy v1)1. forget: + v2 revocation2. stale MEMORY.md (no forget:)3. 409 memory_review_required4. v1 downgrade @ latest baseVersion5. 409 memory_source_review_required6. pull barriers -> review -> converged v3
Figure 6. Cross-device deletion and failure-recovery walkthrough. After iPhone commits a forget barrier and v2 revocation, offline Mac's stale push fails 409 memory_review_required and legacy iPad's v1 downgrade at the latest baseVersion fails post-CAS 409 memory_source_review_required.

7.2 Stepping from F3 to F4: untrusted servers and multi-year compaction

Piko's production F3 architecture relies on two explicit operational assumptions: (a) the sync server honestly executes Algorithm 3 without rolling back its SQLite database or silently dropping records; and (b) cumulative tombstones and revocations stay within MAX_MEMORY_CONTROLS = 10,000 and MAX_REVOCATIONS = 4,096. For multi-year personal ecosystems spanning five or more years, or for hostile cloud compromises, we specify and benchmark two F4 extensions (Study 4, Section 9.5):

  • Protocol F4-A · Client-Signed Monotonic State Chain (Ed25519): Each enrolled device holds an Ed25519 signing keypair [25] whose public key is registered in the user's device roster. On every commit seq, the writing device signs a canonical state header H = (epoch, seq, prev_hash, doc_hash, controls_root, revocations_root). Here controls_root and revocations_root are SHA-256 hash roots over the sorted control and revocation sets, chained via state_hash = SHA256(H || sig) [26]. On pull, any peer holding its last observed (seq, state_hash) checks signature validity, chain continuity, and root equality. This check detects a compromised server replaying an older signed snapshot (rollback) or stripping a forget: or revocation entry before re-encrypting the record.
  • Protocol F4-B · Causal Epoch Barrier Compaction: Without compaction, a heavy user deleting ~2,000 facts/year would hit MAX_MEMORY_CONTROLS = 10,000 in five years. Under F4-B, once all active enrolled devices (such as iPhone, iPad, and Mac) synchronize past cutoff_seq, they countersign a compact EpochCertificate(epoch = e + 1, cutoff_seq, retained_doc_hash, enrolled_devices). Historical forget: markers and revocations belonging solely to purged facts are compacted away, while revocations attached to currently retained facts stay live. If a long-dormant pre-epoch device (epoch < e + 1) later reconnects, the server refuses its document merge deterministically with 409 epoch_reauth_required, forcing a full epoch resync before accepting edits.

8. Five-layer defence boundary and threat analysis

Figure 7 illustrates how five stacked client–server gates isolate threats T1–T5. Table 5 maps all six threats, including T6 (Compromised Server Rollback) addressed by F4-A.

Five-layer defence-in-depth boundary against memory resurrectionDEFENCE-IN-DEPTH BOUNDARY: FIVE STACKED GATES FROM CLIENT EXTRACTION TO SERVER COMMITT1 · Stale / Paraphrased SyncLayer 1 · Server Forget Admission BarrierRejects non-empty doc/archive missing K_req (409)T2 · Quote-Paraphrase Re-LinkLayer 2 · Quote-Free v2 Revocation ProjectionMatches (factHash, mid, msgHash, date) without quoteHashT3 · v1 Downgrade / Delete-ClearLayer 3 · Post-CAS require_preserved (BEGIN IMMEDIATE)Enforces R_old <= R_next; blocks v1/missing/deleted=TrueT4 · Mutated OpID / Corrupt FileLayer 4 · Strict Schema, OpID Body & Fail-Closed Rebase409 idempotency_conflict & immutable_memory_controlT5 · Prompt-Injected PoisoningLayer 5 · Byte-Exact Async Learning & 13-Family Soul GateExact sourceQuote, zero tools, atomic sibling abort
Figure 7. Five-layer defence-in-depth boundary against threats T1–T5, stacking server forget admission, quote-free revocation projection, post-CAS monotonic preservation, strict schema/idempotency checks, and byte-exact async learning guardrails.
Table 5. Threat matrix mapping client, sync, extraction, and server-compromise attacks to concrete MFPM defences.
Threat Adversary / Fault Model Concrete Attack Vector Enforcing Gate (F3 / F4) Verified Outcome
T1 · Stale / Paraphrased Sync Offline replica or delayed extractor Re-push pre-delete doc/archive or reworded fact Server forget admission (409) + client UTF-8 check (F3) 0 / 2,000 V1+V3
T2 · Quote-Paraphrase Re-Link Stochastic LLM re-extraction Cite alternate quote q' ≠ q from revoked message m Quote-free (factHash, mid, msgHash, date) tuple (F3) 0 / 1,000 V2
T3 · v1 Downgrade / Delete-Clear Legacy app or buggy sync client Send v1, missing ledger, empty R, or deleted=True at latest baseVersion Post-CAS require_preserved in BEGIN IMMEDIATE (F3) 0 / 1,000 V5 + 5/5 Swift→Py
T4 · Tamper / Corrupt Reset Disk corruption or replay bug Corrupt local JSON, replay mutated operationID, delete forget: Fail-closed rebase + idempotency_conflict + immutable forget (F3) 0 / 1,000 V6
T5 · Prompt-Injected Poisoning Malicious web/doc content in chat [12][11] Trick background pass into injecting bogus facts or Soul rules Exact turn sourceQuote + zero tools + 13-family atomic batch (F3) Unit-tested in Swift
T6 · Compromised Sync Server Hostile server admin / DB rollback Serve older signed snapshot or strip forget: / R from storage Client-signed Ed25519 monotonic state chain (F4-A prototype) 1,000 / 1,000 detected

9. ForgetBench v1.0 and five-study empirical evaluation

Every number in this section comes from deterministic, zero-PII code executed on one Apple Silicon Mac (forgetbench.py, reproduce_paper_results.py, swift_memory_probe.swift) and archived in data/reproduced_results.json. Zero hardcoded Bernoulli probabilities appear anywhere in the harness.

9.1 ForgetBench v1.0: store-agnostic mechanistic conformance suite

To measure forgetting across arbitrary agent memory engines, ForgetBench v1.0 defines a 6-primitive MemorySyncAdapter interface: write_fact, start_async_extract / commit_async_extract, delete_fact, remember_fact, revoke_source, and push_stale_replica / push_downgrade / push_tamper_or_corrupt. The harness drives a curated 60-fact bilingual corpus (30 English + 30 Simplified Chinese personal facts covering allergies, medications, schedules, gate PINs, consulting rates, family, and preferences). Each corpus item pairs the canonical fact with a model paraphrase and two distinct verbatim substrings (quote_a, quote_b) from the same source chat turn.

We implement and execute five concrete, runnable engines over identical seeded multi-device traces (seed = 20261129, 1,000 episodes × 6 vectors = 6,000 runs per engine, 30,000 total engine runs):

  • B1 · Naive LWW Cloud Sync (NaiveLWWCloudAdapter): In-memory SQLite table ordering document writes by physical timestamp.
  • B2 · Async Chunk-Upsert Store (AsyncChunkUpsertAdapter): RAG-style store indexing chunks by SHA256(messageID:quote) with arrival-order delete/upsert.
  • B3 · Local Tombstone + Wall-Clock LWW (LocalTombstoneWallClockAdapter): Extends B1 with per-device literal SHA256(fact) tombstones and wall-clock forget/remember resolution.
  • B4 · Client-Only Provenance v2 (ClientOnlyProvenanceAdapter): Implements local UTF-8 snapshot checks, quote-free client revocations, and local corruption checks over a plain baseVersion-only CAS server lacking forget admission and post-CAS guards.
  • B5 · Piko Full Protocol (PikoLiveProtocolAdapter): Executes live against Piko's production Python AccountSync, memory_source_provenance, and Fernet-encrypted SQLite Store.

Because safety mechanisms carry a usability cost, ForgetBench appends Suite U1 (1,000 benign episodes) directly against live AccountSync. It measures 500 disjoint preference pushes while MEMORY.md holds active forget barriers, plus 500 innocent offline edits to MEMORY.md from a device that has not pulled a remote deletion, followed by single-pull recovery.

9.2 Study 1: mechanistic resurrection and availability trade-off

Figure 8 and Table 6 report the exact outcomes across all 30,000 adversarial engine runs and 1,000 U1 usability runs.

ForgetBench v1.0 mechanistic resurrection rates and U1 availability trade-off(a) Mechanistic Resurrection Rate (6,000 runs / engine)B1 · Naive LWW100.00%B2 · Async Chunk91.67%B3 · Local Tomb.95.83%B4 · Client Prov.73.33%B5 · Piko Live0.00%Piko Live Server Rejects (+1,000 local, +1,000 V4)409 rev-guard1,500V2/V5 denials409 forget-bar1,500V1/V3 stale400/409 schema1,000V6 malformed(b) 5 x 6 Mechanistic Breakdown (1,000 runs / cell)V1V2V3V4V5V6B1100%100%100%100%100%100%B2100%100%100%50%100%100%B375%100%100%100%100%100%B450%50%100%100%100%40%B50%0%0%0%0%0%V1: Late async commit · V2: Quote-paraphrase bypassV3: Stale offline/archive · V4: Wall-clock skew (both orders)V5: v1/delete downgrade · V6: Corrupt/mutated OpIDU1 · Honest Availability Trade-Off on Live AccountSync (1,000 benign episodes):Disjoint pref auto-sync: 100% (500/500)Offline doc review gate: 100% (500/500)Post-pull recovery: 100% (1 RTT)
Figure 8. Mechanistic ForgetBench v1.0 evaluation (Study 1, forgetbench.py; 30,000 real engine runs across B1–B5 × V1–V6 plus 1,000 live U1 usability runs). (a) Overall silent resurrection rates with zero hardcoded probabilities; (b) 5 × 6 per-vector heatmap; bottom strip: honest U1 availability trade-off on live AccountSync.
Table 6. ForgetBench v1.0 mechanistic resurrection rates (1,000 runs/cell, zero coin flips) and U1 usability results.
Engine / Architecture V1 Async V2 Quote V3 Offline V4 Clock V5 Downgrade V6 Corrupt/OpID Overall (6,000 runs)
B1 · Naive LWW Cloud Sync (SQLite) 100.0% 100.0% 100.0% 100.0% 100.0% 100.0% 100.00% (6,000)
B2 · Async Chunk-Upsert (RAG style) 100.0% 100.0% 100.0% 50.0% 100.0% 100.0% 91.67% (5,500)
B3 · Local Tombstone + Wall-Clock 75.0% 100.0% 100.0% 100.0% 100.0% 100.0% 95.83% (5,750)
B4 · Client-Only Provenance v2 (Plain CAS) 50.0% 50.0% 100.0% 100.0% 100.0% 40.0% 73.33% (4,400)
B5 · Piko Full Protocol (Live AccountSync) 0.0% 0.0% 0.0% 0.0% 0.0% 0.0% 0.00% (0)

Each non-zero rate in Table 6 reflects a deterministic structural path rather than sampling variance:

  • Why B2 scores 50.0% on V4: ForgetBench tests both network arrival orders equally (50% f2 before r1, 50% r1 before f2). An arrival-order chunk store survives the half where f2 arrives last and fails the half where r1 arrives last. Wall-clock LWW stores (B1, B3, B4) fail 100% because t(r1) > t(f2) in both orders.
  • Why B3 scores 75.0% on V1: Local literal tombstones catch only 1 of 4 deterministic sub-cases, where the extractor runs on the same device and emits verbatim text. Same-device paraphrases and cross-device commits all pass through (750 / 1,000).
  • Why B4 scores 50.0% / 50.0% / 40.0% on V1 / V2 / V6: Client-only provenance stops same-device V1/V2 races (500 / 1,000 each) and local corruption (600 / 1,000). It fails whenever a second device pushes over plain version-only CAS, replays a mutated operationID (200), or deletes a forget marker (200).
  • Exact Piko accounting (6,000 / 6,000): Across B5's 6,000 adversarial episodes, live AccountSync emits 4,000 deterministic 400/409 rejections (1,500 memory_review_required, 1,500 memory_source_review_required, 600 invalid_memory_sources, 200 idempotency_conflict, 200 invalid_memory_control). Local client guards abort 1,000 same-device V1/V2 races before hitting the wire, and Active(C) preserves 1,000 concurrent V4 deletions across both arrival orders, yielding 0 / 6,000 resurrections.
  • U1 availability cost: Disjoint preference syncs succeed 500 / 500 (100.0%) immediately because barriers scope strictly to memory documents and archives. Conversely, 500 / 500 (100.0%) innocent offline edits to MEMORY.md missing a remote deletion halt with 409 memory_review_required (per Proposition 5, the server cannot distinguish an innocent offline edit from a paraphrased resurrection without plaintext). All 500 / 500 (100.0%) converge cleanly after one 1-RTT barrier pull.

9.3 Study 3A: bilingual retrieval quality, zombie ghosting, and MFPM-gated hybrid recall

RQ3. How severely do ungated async vector stores leak deleted and superseded facts into top-5 retrieval, where does pure lexical recall fail, and can MFPM-Gated Hybrid Recall capture semantic paraphrases with zero zombie leakage?

Answer: Over 80 bilingual EN/ZH lifecycle queries using Apple NLEmbedding (512d/640d) and compiled MemoryRecall.swift, an ungated async vector store leaks 85.0% (17 / 20) of explicitly deleted secrets and 70.0% of superseded facts into top-5 context (MRR 0.585). Pure lexical recall leaks 0 / 20 zombies and scores 100.0% on exact queries, yet drops to 5.0% on zero-overlap semantic paraphrases. MFPM-Gated Hybrid Recall (R4) reaches 85.00% active Recall@5 (MRR 0.765) with 0 / 20 (0.0%) zombie and stale leakage at 6.28 ms p50 (N = 512; Table 7).

To measure retrieval quality alongside erasure safety, swift_memory_probe.swift runs an 80-query bilingual personal-memory lifecycle benchmark (40 EN + 40 ZH) over 80 initial facts. Those facts comprise 40 active unchanged, 20 updated/superseded (for example, coffee → oolong tea, Seattle → Zurich, Notion → Git Markdown), and 20 explicitly deleted/revoked sensitive facts (peanut allergy, courtyard gate PIN, Metformin prescription, penicillin allergy, executive bonus). Queries span four equal categories of 20 queries each: Q1 Exact, Q2 Updated, Q3 Zero-Overlap Semantic Paraphrase, and Q4 Post-Deletion Secret Probes.

Figure 9 and Table 7 compare four real on-device pipelines compiled with swiftc -O.

Bilingual personal-memory retrieval quality vs deleted-fact zombie leakage(a) Bilingual Active Recall@5 Across Query Types (60 EN+ZH)0%25%50%75%100%Q1 ExactQ2 Updated560Q3 Semantic67687785All ActiveR1 LexicalR2 Async VecR3 Sync VecR4 MFPM HybridOverall Active MRR: R1 0.658 · R2 0.585 · R3 0.659 · R4 0.765 (best)Apple NLEmbedding (EN 512d / ZH 640d) + compiled MemoryRecall.swift(b) Deleted-Fact Zombie & Stale Leakage (Q4 / Q2)R1 Lexical0% zombie0% staleR2 Async Vec85% zombie70% staleR3 Sync Vec0% zombie0% staleR4 MFPM Hybrid0% zombie0% staleR4 Pareto Frontier85.0%MRR 0.765 · 0/20R4 Hybrid @ N = 5126.28 msp95 6.64 ms (Apple Silicon)
Figure 9. Bilingual personal-memory retrieval quality vs. deleted-fact zombie leakage (Study 3, swift_memory_probe.swift; 80 EN+ZH queries over Apple NLEmbedding EN 512d / ZH 640d + compiled MemoryRecall.swift). (a) Active Recall@5 across Q1 Exact, Q2 Updated, Q3 Semantic, and Overall Active; (b) Q4 deleted-fact zombie and Q2 stale superseded leakage, showing MFPM-Gated Hybrid (R4) reaching 85.0% active Recall@5 (MRR 0.765) with 0/20 zombies at 6.28 ms p50 (N = 512).
Table 7. Bilingual personal-memory retrieval quality vs. deleted-fact zombie leakage (80 EN+ZH queries, Apple NLEmbedding 512d/640d + compiled MemoryRecall.swift).
Retrieval Pipeline Q1 Exact R@5 (MRR) Q2 Updated R@5 (MRR) Q2 Stale Leak Q3 Semantic R@5 (MRR) Overall Active R@5 (MRR) Q4 Deleted Zombie Leak Query p50 (ms)
R1 · Piko Production Lexical (MemoryRecall) 100.0% (1.000) 95.0% (0.950) 0.0% 5.0% (0.025) 66.67% (0.658) 0 / 20 (0.0%) 0.362
R2 · Ungated Async Dense Vector (NLEmbedding) 95.0% (0.950) 65.0% (0.454) 70.0% 45.0% (0.350) 68.33% (0.585) 17 / 20 (85.0%) 2.089
R3 · Sync-Deleted Dense Vector (NLEmbedding) 100.0% (0.960) 70.0% (0.602) 0.0% 60.0% (0.414) 76.67% (0.659) 0 / 20 (0.0%) 2.102
R4 · MFPM-Gated Hybrid RRF (Prototype) 100.0% (1.000) 95.0% (0.925) 0.0% 60.0% (0.371) 85.00% (0.765) 0 / 20 (0.0%) 3.331 (6.282 @ 512)

Table 7 yields three quantitative findings:

  1. Async vector delete-lag harms both privacy and accuracy. On R2, 17 of 20 explicitly deleted sensitive facts (85.0%) return in top-5 context, and 14 of 20 superseded facts (70.0%) outrank or crowd the updated value. That stale crowding pulls R2's overall MRR (0.585) below pure lexical recall (0.658).
  2. Pure lexical recall (R1) exposes a clear lexical boundary. R1 achieves 100.0% on exact queries and 95.0% on updated queries in 0.362 ms with zero zombies, yet drops to 5.0% when a query shares no surface tokens with the stored fact (Q3).
  3. MFPM-Gated Hybrid Recall (R4) removes the privacy-vs.-semantics trade-off. In our test, R4 scans an uncleaned ephemeral RAM embedding table still holding vectors for deleted and superseded facts. Gating every vector by authoritative MEMORY.md hashes and Active(C) yields 0 / 20 (0.0%) zombie and stale leakage. R4 lifts Q3 paraphrase Recall@5 by +55.0 percentage points (12×) to 60.0% and reaches the highest overall Recall@5 (85.00%) and MRR (0.765). At full N = 512 capacity on Apple Silicon, query latency is 6.282 ms p50 (6.641 ms p95).

9.4 Study 3B: compiled Swift Lazy-MMR scaling, parity, and session reuse

Figure 10 and Table 8 report compiled (swiftc -O) performance directly on Piko's production MemoryRecall.swift and MemoryRecallSession.swift across N = 32 to 2,048 facts.

Compiled Swift production recall scaling, Lazy-MMR parity, and session reuse(a) Compiled Swift Recall Latency: Eager vs. Lazy-MMR020406080ms326412825651210242048Personal Memory Size (Number of Facts, N)87.1 ms (ZH)45.9 ms (EN)24.5 ms (3.56×)15.6 ms (2.94×)ZH Dense Eager MMR (InitialRecall)EN Dense Eager MMR (InitialRecall)Production Lazy-MMR (MemoryRecall)(b) 8-Query Intra-Reply Reuse (MemoryRecallSession)N = 100 (7.24×)5.22 ms0.72 msN = 500 (7.25×)26.08 ms3.60 msN = 1000 (7.30×)52.53 ms7.20 msLazy-MMR Exact Parity2,000 / 2,000100.0% UTF-8 identicalNFC / NFD Byte Guard100%Rebuilds on raw-byte diff
Figure 10. Compiled production Swift recall scaling and session reuse (Study 3, swift_memory_probe.swift, swiftc -O). (a) Median latency across N = 32..2,048 facts comparing eager MMR (InitialRecall) vs. production Lazy-MMR (MemoryRecall: 2.81×–3.56× speedup); (b) 8-query intra-reply MemoryRecallSession speedup (7.24×–7.30×) alongside 2,000 / 2,000 byte-exact parity and NFC/NFD raw-byte invalidation.
Table 8. Compiled production Swift recall scaling (p50 ms), Lazy-MMR parity, and 8-query intra-reply session reuse.
Facts (N) EN Dense Eager (ms) EN Dense Lazy-MMR (ms) EN Speedup ZH Dense Eager (ms) ZH Dense Lazy-MMR (ms) ZH Speedup 8-Query Stateless → Session (ms)
32 0.613 0.341 1.80× 0.749 0.471 1.59× –
128 2.593 1.183 2.19× 4.778 1.689 2.83× 5.224 → 0.721 (7.24× @ N=100)
512 11.216 3.986 2.81× 20.729 6.788 3.05× 26.076 → 3.596 (7.25× @ N=500)
1,024 22.789 7.728 2.95× 41.933 13.320 3.15× 52.533 → 7.200 (7.30× @ N=1000)
2,048 45.939 15.627 2.94× 87.100 24.473 3.56× –

Across 2,000 randomized bilingual fuzz trials forcing candidates > 40 (triggering SelectionHeap on every case), production MemoryRecall matches eager InitialRecall in 2,000 / 2,000 (100.00%) trials down to the exact UTF-8 byte. On the canonical-equivalence probe (caf\u00E9 NFC vs. cafe\u0301 NFD), Swift's String.== returns true, while MemoryRecallSession detects the raw UTF-8 byte difference, invalidates the cache (indexBuilds: 1 → 2), and re-hashes cleanly.

9.5 Studies 2 & 4: wire ceilings, post-CAS latency, and F4 prototypes

RQ4. What are the real wire footprints, encryption overheads, validation latencies, and transactional write costs up to Piko's full bounded capacity, and what does it cost to extend MFPM to F4 compromised-server protection and 5-year tombstone compaction?

Answer: At full capacity (512 facts × 8 supports + 4,096 revocations), wire payloads cap at 1.92 MiB JSON (2.57 MiB Fernet). Swift validation takes 13.16 ms, Python denial_keys takes 31.11 ms, and encrypted post-CAS AccountSync.push takes 100.07 ms p50 (Table 9). Adding F4 Ed25519 signing costs 0.051 / 0.030 ms in Swift and 160 B raw crypto while detecting 1,000 / 1,000 rollback/strip attacks. Five-year Causal Epoch Compaction shrinks 4.29 MiB of historical controls and revocations to 42.4 KiB (-99.04%) while blocking 1,000 / 1,000 stale pre-epoch replicas (Table 10).

Figure 11, Table 9, and Table 10 present the measured F3 scaling ceilings and F4 prototype benchmarks.

Server and Swift provenance wire scaling plus F4 cryptographic prototype benchmarks(a) Wire Payload vs. Fernet Ciphertext (MiB)0.00.71.42.12.8MiB1/064/64256/1K512/2K512*/4K1.92 MiB2.57 MiBCapacity Point (Facts / Revocations; * = 8 sup/fact)JSON payload (max 1.92 MiB)Fernet ciphertext (max 2.57 MiB)(b) Validation & Post-CAS Push Latency (p50 ms)0255075100ms1/064/64256/1K512/2K512*/4K100.1 ms31.1 ms13.2 msCapacity Point (Facts / Revocations; * = 8 sup/fact)Server AccountSync.push (100.1 ms)Server denial_keys (31.1 ms)Swift validated (13.2 ms)(c) F4 Forward-Looking Prototypes: Client-Signed Ed25519 Chain & 5-Year Causal Epoch CompactionSwift Ed25519 Sign/Ver0.051 / 0.030 ms160 B raw crypto · 515 B JSONCompromised Srv Detect1,000 / 1,000500 rollback + 500 strip5-Yr Epoch Compaction-99.04%4.29 MiB -> 42.4 KiB (663 B cert)Stale Pre-Epoch Block1,000 / 1,000409 epoch_reauth_required
Figure 11. Live server/Swift provenance scaling and F4 prototype benchmarks (Studies 2 & 4). (a) Raw UTF-8 JSON (max 1.92 MiB) vs. Fernet ciphertext (max 2.57 MiB); (b) p50 latency for Swift validated (13.2 ms), Python denial_keys (31.1 ms), and encrypted SQLite AccountSync.push (100.1 ms); (c) F4 Ed25519 signed state chain (0.051/0.030 ms Swift, 1,000/1,000 compromised-server detection) and 5-year causal epoch compaction (99.04% metadata reclamation, 1,000/1,000 stale pre-epoch blocks).
Table 9. Live server (AccountSync + Fernet) and compiled Swift (MemoryFactProvenance) scaling up to full production ceilings.
Capacity (Facts × Sup / Rev) JSON Wire (B) Fernet Ciphertext (B) Server denial_keys p50 (ms) Server Post-CAS push p50 (ms) Swift validated p50 (ms) Swift rebased / merged p50 (ms)
1 × 1 / 0 572 844 0.006 0.166 0.041 0.077 / 0.093
16 × 2 / 8 11,951 16,012 0.168 0.669 0.633 (32×2/16) 1.217 / 1.574 (32×2/16)
64 × 2 / 64 54,839 73,208 0.799 2.904 – –
128 × 4 / 256 200,787 267,812 3.019 9.712 2.674 4.927 / 9.663
256 × 4 / 1,024 522,835 697,208 8.265 25.266 5.634 10.126 / 27.838
512 × 4 / 2,048 1,045,587 1,394,212 15.976 49.464 – –
512 × 8 / 2,048 1,533,011 2,044,108 23.505 72.910 – –
512 × 8 / 4,096 (Max) 2,018,387 (1.92 MiB) 2,691,276 (2.57 MiB) 31.114 100.066 (p95 104.524) 13.156 22.129 / 91.803
Table 10. Study 4: Evaluated F4 forward-looking prototypes (Ed25519 state chain & 5-year Causal Epoch Compaction).
F4 Prototype Mechanism Measured Compute / Wire Cost Adversarial / Lifecycle Evaluation Verified Result
F4-A · Swift CryptoKit Ed25519 0.051 ms sign / 0.030 ms verify (p50 & p95, 1,000 trials) 64 B signature, 32 B public key, 348 B header 1,000 / 1,000 valid
F4-A · Python Ed25519 Signed Chain 0.014 ms sign / 0.035 ms verify; 160 B raw crypto (515 B JSON) 500 silent DB rollbacks + 500 silent forget:/revocation drops 1,000 / 1,000 (100.0%) detected
F4-B · 5-Year Causal Epoch Compaction 663 B 3-device EpochCertificate (iPhone, iPad, Mac) 12,000 forget: + 5,000 revocations (4,497,036 B → 43,380 B, keeping 180 active revocations) 99.04% metadata reclaimed
F4-B · Pre-Epoch Stale Replica Guard Single integer comparison (client_epoch < current_epoch) 1,000 dormant pre-epoch replica push attempts (epoch ∈ {0, 1}) 1,000 / 1,000 (100.0%) blocked (409)

10. Reference system verification: Piko production stack

MFPM's F3 layer runs in production across Piko's native Apple clients and Python sync server rather than only in simulation. Table 11 records our live multi-stack verification executed directly against the production repositories.

Table 11. Study 5: Live multi-stack test execution, cross-language wire parity, and repository inventory.
Verification Axis Concrete Target / Scope Live Result Execution Time
Server Python pytest 13 memory, provenance, control, sync & retention suites (server/tests/) 92 / 92 passed (0 failed) 8.81 s
Client macOS Swift xcodebuild test 10 PikoTests suites (MemoryFactProvenance, MemorySourceRevocation, MemoryProvenanceSync, MemoryRecall*, ConversationMemoryLearning, SyncConvergence, SyncDeletion) 72 / 72 passed (0 failed) 0.41 s (test run)
Combined Live Production Tests 23 cross-stack suites executed live on production code 164 / 164 passed (100%) –
Swift → Python Wire Parity Swift emits 32 facts / 64 supports / 16 revocations / 16 controls → live Python AccountSync Accepted + 5 / 5 downgrades blocked (409) Live in Study 3
Production Codebase Inventory Client Piko/Core/Memory/ (25 files, 3,214 LOC) + Piko/Core/Sync/ (22 files, 3,167 LOC); Server core 4 files (817 LOC); Swift memory/soul/sync test bank (60 files, 432 test declarations) Constants aligned: 512 / 8 / 4,096 / 10,000 Audited live

11. Scope, limitations, and open challenges

Seven operational boundaries limit these results and require explicit disclosure:

  1. Availability vs. safety friction on offline edits (U1). As Table 6 shows, blocking 100% of unreviewed offline pushes to MEMORY.md after a remote deletion also pauses 100% of innocent offline edits to unrelated lines until the device pulls barriers (1 RTT). Proposition 5 explains why this pause is structural rather than an implementation artifact: without leaking plaintext, the server cannot tell whether an offline edit rewrote a forgotten fact in different words. Scoping barriers strictly to memory documents keeps unrelated preferences syncing at 100%.
  2. Lexical vs. semantic recall boundary (R1 vs. R4). Piko's deployed lexical MemoryRecall (R1) scores 5.0% on zero-overlap conceptual paraphrases (Q3; Table 7). Our Study 3A prototype (R4 · MFPM-Gated Hybrid Recall) lifts Q3 to 60.0% and overall active Recall@5 to 85.00% with zero zombies on Apple NLEmbedding. Shipping R4 into production still requires benchmarking cold-start embedding latency across older iPhones and validating multilingual code-switching beyond English and Simplified Chinese.
  3. Semantic paraphrases from fresh unrevoked messages (Proposition 5). MFPM blocks stale replicas, late extractors, and re-extraction of revoked messages. If the user themselves states a deleted preference again in a brand-new message after devices sync, the agent has no cryptographic proof that the new wording refers to an earlier hash. In personal assistants, a fresh user instruction should normally be honored anyway.
  4. Honest-server F3 deployment vs. F4 prototype status. Piko's deployed production sync enforces F3. Our F4-A Ed25519 state chain and F4-B Causal Epoch Compaction are benchmarked prototypes (Study 4, Table 10), not yet rolled out to customer accounts. Production F4 deployment must also handle lost-device key recovery when a user replaces a broken phone before countersigning an epoch cutover.
  5. Bounded capacity ceilings. Production constants (512 facts, 4,096 revocations, 10,000 controls) cover years of typical personal memory. Power users deleting thousands of facts per year will eventually approach the control ceiling without F4-B compaction.
  6. Hardware and corpus scope. Latencies were measured on one Apple Silicon Mac; low-end mobile CPUs and cellular RTTs will scale absolute timings proportionally. ForgetBench's 60-fact corpus and Study 3A's 80-query benchmark are deterministic, curated bilingual suites open for community expansion, not exhaustive samples of all conversational styles.
  7. Derived execution state and persistent KV caches. Deleting an authoritative document does not automatically sanitize downstream artifacts already materialized inside rolling conversation summaries, pending tool plans, or long-lived server KV caches [28]. On device, Piko avoids local cache tainting by assembling prompts from fresh MEMORY.md reads, invalidating MemoryRecallSession on raw UTF-8 byte changes, and gating ephemeral NLEmbedding vectors before ranking. Extending Piko to long-lived cross-session KV-cache reuse or persistent rolling summaries will additionally require provenance-guided selective replay [28] alongside MFPM's storage and sync barriers.

12. Conclusion

Personal AI memory is only as trustworthy as its delete button. Treating erasure as a local database DELETE or an asynchronous vector purge breaks down once a user owns more than one device or runs background learning. This paper defines an explicit forgetting maturity ladder (F0–F4), proves five properties over a zero-plaintext causal and cryptographic state model (MFPM), and releases a mechanistic, zero-coin-flip conformance harness (ForgetBench v1.0). Across live F3 production code, Piko records 0 / 6,000 resurrections and passes 164 / 164 Swift/Python tests (Tables 6 and 11). Our forward-looking prototypes further achieve 85.0% active Recall@5 with 0% zombies under MFPM-Gated Hybrid Recall (Table 7), 100% compromised-server rollback detection under F4-A Ed25519 chains, and 99.04% metadata reclamation under F4-B 5-year compaction (Table 10). Together, these results show that verifiable cross-device forgetting is practical in production without sacrificing semantic retrieval or privacy.

13. Frequently Asked Questions

Why not just store deleted facts in an encrypted server blocklist so the LLM never re-learns them?

Keeping erased text, even encrypted, violates the core goal of deletion (Invariant I1). Once a user removes a medical diagnosis or door code, no sync ledger should retain a recoverable copy of that secret. MFPM stores only SHA-256 digests (forget: fingerprints and v2 hash tuples) and closes the paraphrase loophole structurally via document-level admission barriers (I3) and quote-free source revocations (I4), as proved in Proposition 5.

How does MFPM differ from Mem0, Zep/Graphiti, and Letta/MemGPT?

Mem0, Zep, and Letta focus primarily on extraction quality, temporal graph modeling, and long-horizon QA over centralized server stores. MFPM is orthogonal and complementary: it enforces distributed deletion invariants across async extractors, offline multi-device replicas, skewed clocks, and legacy app versions. Any of those engines can adopt ForgetBench's 6-primitive adapter and MFPM's F3/F4 barriers.

Why did Piko originally ship lexical recall (R1) instead of a persistent vector database?

Study 3A quantifies the risk directly: an ungated async vector database leaked 85.0% (17 / 20) of explicitly deleted secrets and 70.0% of superseded facts into top-5 prompt context (Table 7). Reading directly from authoritative MEMORY.md eliminates index-lag ghosting. Meanwhile, our R4 MFPM-Gated Hybrid Recall prototype shows how to add ephemeral on-device semantic embeddings (NLEmbedding) safely, recovering +55.0 pp on paraphrase queries while keeping 0 / 20 zombie leakage.

Does the offline review halt (U1) annoy users in day-to-day multi-device use?

It triggers only when two conditions coincide: Device A explicitly deletes a memory fact and Device B edits MEMORY.md while offline without pulling the new barrier first. Unrelated settings and preferences sync at 100.0% with zero interruption (Table 6), and online devices pull barriers automatically before editing. When a true offline collision happens, pausing for one 1-RTT pull and review is preferable to quietly resurrecting an erased secret.

Why keep revoked supports inside entries instead of deleting them from the JSON?

This design preserves deterministic cross-device convergence (Proposition 3). Because each fact stores at most 8 support slots, physically evicting a revoked slot lets a 9th support backfill it on one device but not on another depending on message arrival order. Keeping the revoked slot occupied in entries while filtering it through Eff(L, f) makes merging commutative and arrival-order independent.

What if the cloud sync server itself is compromised or rolled back from a backup?

Deployed F3 assumes an honest sync server and defends against buggy, offline, or outdated clients. Protocol F4-A removes that trust assumption: clients sign every monotonic state header with Ed25519 (0.051 ms sign / 0.030 ms verify in Swift CryptoKit, 160 B raw crypto; Table 10). On pull, peers detect 1,000 / 1,000 silent server rollbacks or barrier-stripping attacks deterministically.

Will append-only forget: markers grow forever over five or ten years?

Without compaction, heavy users would eventually approach MAX_MEMORY_CONTROLS = 10,000. Protocol F4-B (Causal Epoch Compaction) bounds long-term growth: once active devices countersign an EpochCertificate (663 B), historical tombstones and revocations for purged facts compact by 99.04% (4.29 MiB → 42.4 KiB in our 5-year simulation; Table 10). Any dormant pre-epoch replica is then fenced off deterministically with 409 epoch_reauth_required.

Declarations, Authorship & Copyright

Author & affiliation
Ruiming Zhao, Founder & Principal Researcher, Prysai Lab / Piko Research (ORCID: 0009-0007-8335-5067; https://prysai.com/raymond-zhao/).
Author contributions (CRediT)
Ruiming Zhao: Conceptualization, Methodology, Formal Analysis, Software Architecture, Investigation, Data Curation, Visualization, Writing (Original Draft, Review & Editing), and Supervision.
Competing interests
The author is the founder of Prysai Lab, which develops Piko, the commercial reference implementation examined in Section 10. All availability trade-offs (U1), lexical-vs.-semantic retrieval gaps (R1 vs. R4), honest-server vs. F4 untrusted-server trust roots, and single-machine evaluation limits are disclosed explicitly in Section 11.
Copyright, licence & trademarks
Copyright © 2026 Ruiming Zhao / Prysai Lab. Original paper text, original vector figures (Hero + Figures 1–11), and numeric benchmark tables are licensed under Creative Commons Attribution 4.0 International (CC BY 4.0, https://creativecommons.org/licenses/by/4.0/). Reuse requires attribution naming the author (Ruiming Zhao), institution (Prysai Lab / Piko Research), paper title, report ID (PIKO-RESEARCH-2026-02), and DOI (https://doi.org/10.5281/zenodo.24722296). The Prysai wordmark, "Prysai", and "Piko" are trademarks of Prysai Lab excluded from CC BY 4.0; Piko's client and server source code remains proprietary software.
Data governance & reproducibility
All five empirical studies (Tables 6–11, Figures 8–11) execute zero-PII deterministic code directly against Piko's production Python sync server, compiled Swift memory modules, Apple NaturalLanguage.NLEmbedding, CryptoKit, and live pytest / xcodebuild suites via forgetbench.py, reproduce_paper_results.py, and swift_memory_probe.swift, captured in data/reproduced_results.json and data/swift_benchmark_snapshot.json.
Correspondence & dialogue
Canonical editions and citation exports: https://piko.prysai.com/research/memory-forgetting · Permanent Zenodo archive: https://doi.org/10.5281/zenodo.24722296 · Companion PESA v1.4 paper: https://doi.org/10.5281/zenodo.24655151 · Lab & public repositories: https://prysai.com/ and https://github.com/Prysai.
Revision history
v1.0 (2026-11-29, PIKO-RESEARCH-2026-02, DOI: 10.5281/zenodo.24658972): initial public technical report. v1.1 (2026-12-01, DOI: 10.5281/zenodo.24722296, Concept DOI: 10.5281/zenodo.24658971): tightened abstract to two concise paragraphs (opening Section 1 on page 1), streamlined subtitles and inline typography, calibrated empirical verbs and table pointers across all three languages via academic-humanizer audit, and added 2026 frontier comparisons covering Bemula, soft-revocation enforcement, endogenous authorization laundering, biologically grounded interference decay, and execution-state/KV-cache unlearning (28 verified references).

How to cite

Recommended citation
Zhao, Ruiming. Can a Personal Agent Actually Forget?. Piko Research Technical Report PIKO-RESEARCH-2026-02, Prysai Lab, 2026-11-29 (v1.1, revised 2026-12-01). https://piko.prysai.com/research/memory-forgetting · DOI: https://doi.org/10.5281/zenodo.24722296
APA
Zhao, R. (2026). Can a Personal Agent Actually Forget? (Technical Report PIKO-RESEARCH-2026-02, Version 1.1). Piko Research, Prysai Lab. https://doi.org/10.5281/zenodo.24722296
GB/T 7714
ZHAO R. Can a Personal Agent Actually Forget?[R/OL]. PIKO-RESEARCH-2026-02. Piko Research, Prysai Lab, 2026-11-29. https://piko.prysai.com/research/memory-forgetting. DOI: 10.5281/zenodo.24722296.
@techreport{zhao2026forgetting,
  author       = {Zhao, Ruiming},
  title        = {Can a Personal Agent Actually Forget?},
  institution  = {Prysai Lab},
  series       = {Piko Research},
  number       = {PIKO-RESEARCH-2026-02},
  year         = {2026},
  month        = {11},
  doi          = {10.5281/zenodo.24722296},
  url          = {https://piko.prysai.com/research/memory-forgetting},
  note         = {Version 1.1, revised 2026-12-01}
}

References

  1. Zhao, Ruiming. PESA: Personal Ecosystem Super Agent. Piko Research Technical Report PIKO-RESEARCH-2026-01 (v1.4), Prysai Lab, Nov. 2026; DOI: 10.5281/zenodo.24655151. doi.org/10.5281/zenodo.24655151
  2. Packer, Charles, Wooders, Sarah, Lin, Kevin, Fang, Vivian, Patil, Shishir G., Stoica, Ion, Gonzalez, Joseph E. MemGPT: Towards LLMs as Operating Systems. arXiv:2310.08560, Oct. 2023. arxiv.org/abs/2310.08560
  3. Chhikara, Prateek, Khant, Dev, Aryan, Saket, Singh, Taranjeet, Yadav, Deshraj. Mem0: Building Production-Ready AI Agents with Scalable Long-Term Memory. arXiv:2504.19413, Apr. 2025. arxiv.org/abs/2504.19413
  4. Rasmussen, Preston, Paliychuk, Pavlo, Beauvais, Travis, Ryan, Jack, Chalef, Daniel. Zep: A Temporal Knowledge Graph Architecture for Agent Memory. arXiv:2501.13956, Jan. 2025. arxiv.org/abs/2501.13956
  5. Maharana, Adyasha, Lee, Dong-Ho, Tulyakov, Sergey, Bansal, Mohit, Barbieri, Francesco, Fang, Yuwei. Evaluating Very Long-Term Conversational Memory of LLM Agents. Proceedings of the 62nd Annual Meeting of the Association for Computational Linguistics (ACL 2024). aclanthology.org/2024.acl-long.747/
  6. Wu, Di, Wang, Hongwei, Yu, Wenhao, Zhang, Yuwei, Chang, Kai-Wei, Yu, Dong. LongMemEval: Benchmarking Chat Assistants on Long-Term Interactive Memory. International Conference on Learning Representations (ICLR 2025). arxiv.org/abs/2410.10813
  7. Belcak, Peter, Muralidharan, Saurav, Jiang, Jindong, Fu, Yonggan, Byeon, Wonmin, Ye, Hanrong, Angilly, Ryan, Taghibakhshi, Ali, Liu, Shih-Yang, Ouyang, Siru, Heinrich, Greg, Molchanov, Pavlo. You don't need long context. NVIDIA Research Technical Report, arXiv:2611.05306, Nov. 2026. arxiv.org/abs/2611.05306
  8. Park, Joon Sung, O'Brien, Joseph C., Cai, Carrie J., Morris, Meredith Ringel, Liang, Percy, Bernstein, Michael S. Generative Agents: Interactive Simulacra of Human Behavior. Proceedings of the 36th Annual ACM Symposium on User Interface Software and Technology (UIST 2023). doi.org/10.1145/3586183.3606763
  9. Cormack, Gordon V., Clarke, Charles L. A., Buettcher, Stefan. Reciprocal Rank Fusion Outperforms Condorcet and Individual Rank Learning Methods. Proceedings of the 32nd International ACM SIGIR Conference (SIGIR 2009), pp. 758–759. doi.org/10.1145/1571941.1572114
  10. European Parliament and Council. Regulation (EU) 2016/679 (General Data Protection Regulation), Article 17: Right to Erasure. Official Journal of the European Union, L 119, 2016. eur-lex.europa.eu/eli/reg/2016/679/oj
  11. Chen, Zhaorun, Xiang, Zhen, Xiao, Chaowei, Song, Dawn, Li, Bo. AgentPoison: Red-teaming LLM Agents via Poisoning Memory or Knowledge Bases. Advances in Neural Information Processing Systems (NeurIPS 2024). arxiv.org/abs/2407.12784
  12. Greshake, Kai, Abdelnabi, Sahar, Mishra, Shailesh, Endres, Christoph, Holz, Thorsten, Fritz, Mario. Not what you've signed up for: Compromising Real-World LLM-Integrated Applications with Indirect Prompt Injection. Proceedings of the 16th ACM Workshop on Artificial Intelligence and Security (AISec @ CCS 2023), pp. 79–90. doi.org/10.1145/3605764.3623985
  13. Bourtoule, Lucas, Chandrasekaran, Varun, Choquette-Choo, Christopher A., Jia, Hengrui, Travers, Adelin, Zhang, Baiwu, Lie, David, Papernot, Nicolas. Machine Unlearning. IEEE Symposium on Security and Privacy (S&P 2021), pp. 141–159. doi.org/10.1109/SP40001.2021.00107
  14. Liu, Sijia, Yao, Yuanshun, Jia, Jinghan, Casper, Stephen, Baracaldo, Nathalie, Hase, Peter, Yao, Yuguang, Liu, Chris Yuhao, Xu, Xiaojun, Li, Hang, Varshney, Kush R., Bansal, Mohit, Koyejo, Sanmi, Liu, Yang. Rethinking Machine Unlearning for Large Language Models. Nature Machine Intelligence, 2025 (arXiv:2402.08787). arxiv.org/abs/2402.08787
  15. Xie, Bofan, Wang, Chaokun, Ge, Guanchen, Wang, Songyao, Niu, Fang, Zhang, Hang, Wang, Wei. Can Agents Forget When Asked? A Benchmark for Memory Unlearning in LLM Agents. arXiv:2610.18052, Oct. 2026. arxiv.org/abs/2610.18052
  16. Shen, Yi Ting, Toyoda, Kentaroh, Leung, Alex. Revoked but Still Authoritative: An Empirical Study of Revocation Enforcement in Agent-Memory Systems. arXiv:2609.08258, Sep. 2026. arxiv.org/abs/2609.08258
  17. Cerruti, Tommaso, Okamoto, Mika, Erol, Ansel Kaplan. Agent Memory Is a Surface for Endogenous Authorization Laundering. arXiv:2609.01836, Sep. 2026. arxiv.org/abs/2609.01836
  18. Kerestecioglu, Doga, Robsky, Alexei, Vasters, Clemens, Sharma, Anshul, Kesselman, Yitzhak. Human-Inspired Memory Architecture for LLM Agents. Microsoft Research, arXiv:2605.08538, May 2026. arxiv.org/abs/2605.08538
  19. Lamport, Leslie. Time, Clocks, and the Ordering of Events in a Distributed System. Communications of the ACM, 21(7):558–565, 1978. doi.org/10.1145/359545.359563
  20. Shapiro, Marc, Preguiça, Nuno, Baquero, Carlos, Zawirski, Marek. Conflict-Free Replicated Data Types. Stabilization, Safety, and Security of Distributed Systems (SSS 2011), LNCS 6976, pp. 386–400. doi.org/10.1007/978-3-642-24550-3_29
  21. Kung, H. T., Robinson, John T. On Optimistic Methods for Concurrency Control. ACM Transactions on Database Systems, 6(2):213–226, 1981. doi.org/10.1145/319566.319567
  22. Robertson, Stephen, Zaragoza, Hugo. The Probabilistic Relevance Framework: BM25 and Beyond. Foundations and Trends in Information Retrieval, 3(4):333–389, 2009. doi.org/10.1561/1500000019
  23. Carbonell, Jaime, Goldstein, Jade. The Use of MMR, Diversity-Based Reranking for Reordering Documents and Producing Summaries. Proceedings of the 21st Annual International ACM SIGIR Conference (SIGIR 1998), pp. 335–336. doi.org/10.1145/290941.291025
  24. Minoux, Michel. Accelerated Greedy Algorithms for Maximizing Submodular Set Functions. Optimization Techniques, Lecture Notes in Control and Information Sciences, vol. 7, Springer, pp. 234–243, 1978. doi.org/10.1007/BFb0006528
  25. Bernstein, Daniel J., Duif, Niels, Lange, Tanja, Schwabe, Peter, Yang, Bo-Yin. High-speed high-security signatures. Journal of Cryptographic Engineering, 2(2):77–89, 2012. doi.org/10.1007/s13389-012-0027-1
  26. Laurie, Ben. Certificate Transparency. Communications of the ACM, 57(10):40–46, 2014. doi.org/10.1145/2659897
  27. Shneiderman, Ben. Human-Centered Artificial Intelligence: Reliable, Safe & Trustworthy. International Journal of Human–Computer Interaction, 36(6):495–504, 2020. doi.org/10.1080/10447318.2020.1741118
  28. Yao, Chao, Wei, Yangbo, Huang, Zhen, Qian, Junhong, Chen, Chenle, Lu, Shaoqiang, Wu, Chen, He, Lei. Forgetting Without Restarting: Execution-State Unlearning for Stateful LLM Agents. arXiv:2609.04875, Sep. 2026. arxiv.org/abs/2609.04875

iPhone, iPad, Mac, Apple Watch and Swift are trademarks of Apple Inc., registered in the U.S. and other countries and regions. Piko is an independent product of Prysai Lab and is not affiliated with Apple Inc.