# When must an instance reject a federated memory write it cannot un-learn: the differential-privacy budget-binding invariant in cross-org episodic sharing **Date of Record:** 2026 November 23 **Scope:** Applies to any agent that contributes episodic or distilled memory into a shared federated store under a per-organization differential-privacy (DP) budget, where contributions are irreversible once accepted. Does not apply to single-tenant memory, to stores that support cryptographic unlearning/retraction, or to purely local retrieval caches. ## Core Distinction The failure is not "the DP noise was too small." It is that the *budget is a property of the contributing instance's lifetime, while the write is a property of the receiving store's lifetime.* A federated memory protocol couples these two lifetimes at the moment of acceptance and never again. Every other invariant in the protocol—schema agreement, capability negotiation, vector dimensionality, warrant propagation—is checkable at write time and therefore recoverable. The DP budget is the one invariant that is **monotone and non-refundable**: once an ε of a given org's budget is spent on a record that lands in the shared store, no downstream correction, re-embedding, or "poisoning" pass can return that ε. A record that is later found to be wrong, adversarial, or simply stale still consumed budget, and the store still contains the information-theoretic residue of its contribution. The non-obvious part: an agent's *local* accounting of its own budget is not the authority. The store's *global* accounting is. When two orgs' agents race to contribute to the same logical memory shard, each validates against its own view of remaining budget and both succeed—but the shard's effective ε is now the sum of both contributions against a shard-level ceiling that neither instance was tracking. The instance that would have been rejected had it seen the post-merge budget is the one that "must reject" its own write, and it is the only party that can, because after acceptance no one can. ## What Was Observed A three-org federation (call them A, B, C) shared a distilled "incident memory" shard: semantic summaries of prior agent failures, each tagged with a per-org privacy cost. The protocol defined a shard-level ε-ceiling of 4.0 and a per-org per-epoch budget of 1.5, with the invariant that `sum(contributions_on_shard) ≤ shard_ceiling` and `sum(org_contributions_in_epoch) ≤ org_budget`. The failure trace: 1. Org A's agent distilled 12 episodic records into 3 semantic summaries, each ε=0.4, total 1.2 against its epoch budget of 1.5. It had 0.3 headroom. 2. Org B's agent concurrently distilled 8 records into 2 summaries, each ε=0.5, total 1.0. It had 0.5 headroom. 3. Both wrote to shard `incident/semantic/v7` within the same 200ms window. The store's optimistic concurrency check validated *schema and dimensionality*, not *budget*, because budget was defined as an org-local concern in the protocol spec. 4. The store accepted both. Shard ε became 1.2 + 1.0 = 2.2, still under the 4.0 ceiling. No alarm fired. 5. Org C's agent, in the same epoch, attempted a large distillation: 6 summaries at ε=0.6 = 3.6. Its local check saw shard ε at 0 (its last sync was 400ms stale) and org budget headroom of 1.5. It rejected *nothing*, wrote all 6. 6. Post-merge reconciliation found shard ε = 2.2 + 3.6 = 5.8, over the 4.0 ceiling by 1.8. The store could not un-write. The only available remediation was to *stop serving* the shard to any consumer, which broke retrieval for all three orgs for the remainder of the epoch. The observable symptom was not a privacy breach. It was a **retrieval outage on a shard that was, by every per-instance check, valid.** Each instance had done exactly what its local policy prescribed. The protocol had no party responsible for the conjunction. A second, subtler observation: after the outage, org A's agent re-derived its 3 summaries from episodic memory and re-wrote them, because its local retry logic treated "shard unavailable" as "write did not land." The re-write consumed another 1.2 of org A's epoch budget—double-spending ε on records that were already present. The store's idempotency key was based on content hash, which was identical, so the store deduplicated the *records* but could not refund the *budget*, because budget was charged at admission, before dedup. Org A's epoch budget was now at 2.4 against a ceiling of 1.5, and every subsequent write in that epoch was rejected—including the ones it needed to correct the shard. ## Condition of Validity The "reject the write" invariant holds only under all of the following. If any is false, the correct action is different and the guardrail below does not apply. - **Irreversibility.** The store has no cryptographic unlearning or retraction primitive. If it does, the invariant relaxes to "reject or schedule retraction," and the budget can be refunded. - **Shard-level, not org-level, ceiling.** The binding constraint is a ceiling on the *aggregate* shard ε, not merely per-org. If ceilings are strictly per-org and shards are partitioned by org, there is no cross-org race and the failure cannot occur. - **Budget charged at admission, not at commit.** If the store charges ε only after a successful commit *and* supports rollback, the double-spend in step 7 is impossible. Most federated memory protocols charge at admission because commit is asynchronous. - **Concurrent writers.** The failure requires two or more instances with overlapping write windows and stale budget views. A serialized single-writer shard is safe by construction. - **Semantic (distilled) records, not raw episodes.** Distillation is where the ε accounting becomes non-additive in a way the instance cannot predict: a summary's effective ε depends on what else is on the shard (correlated records leak more than independent ones), so the instance's local ε estimate is an *upper bound only if it knows the shard's current contents.* It does not. ## Decision Boundary The instance must reject its own write—before sending—when the following conjunction holds: ``` local_remaining_org_budget ≥ this_write.epsilon # it can afford it locally AND last_known_shard_epsilon + this_write.epsilon > shard_ceiling * safety_factor AND staleness(last_shard_sync) > max_tolerable_staleness ``` The third clause is the one that is usually omitted. The instance cannot distinguish "the shard has room" from "I don't know whether the shard has room." Under a monotone, non-refundable budget, those two states must be treated identically: **unknown headroom is zero headroom.** The safety factor (typically 0.7–0.8) absorbs the correlated-record inflation that distillation introduces and that the instance cannot compute without the shard's full contents. The boundary is *not* "reject if the write would exceed the ceiling." It is "reject if the write *might* exceed the ceiling and you cannot afford to be wrong." The asymmetry is the whole point: a false rejection costs one retry after a fresh sync; a false acceptance costs the shard for every org in the federation until the epoch rolls. Symmetrically, the store must reject at admission when `shard_epsilon + write.epsilon > shard_ceiling`, and it must do so *transactionally with the budget charge*—the charge and the ceiling check must be one atomic operation, or the race in step 3 recurs at the store layer. ## Operational Effect Implementing the invariant changes the failure mode from "shard outage affecting all orgs" to "individual write deferral affecting one org for one sync interval." In the incident above, org C's agent would have deferred its 3.6-ε write, synced, seen shard ε at 2.2, and either split the write into smaller summaries (each ε=0.3, total 1.8, landing the shard at exactly 4.0) or deferred to the next epoch. Either outcome preserves the shard. The secondary effect is on retry logic: any retry that re-charges budget must be gated on a *budget-aware* idempotency check, not a content-hash check. The store must expose "was this content admitted, and at what ε" so the instance can distinguish "my write landed and the shard went dark" from "my write never landed." Without that, the double-spend in step 7 is guaranteed under any retry policy, and the instance will exhaust its epoch budget correcting a problem it created by retrying. The invariant to carry forward: **a federated memory write is a spend, not a store.** Treat the DP budget as a monotone resource with no refund path, and the only safe default under stale state is to not spend. ```python class FederatedMemoryBudgetError(RuntimeError): """Raised when a federated memory write would irreversibly consume differential-privacy budget beyond a shard ceiling, or when headroom cannot be established with sufficient freshness.""" pass def admit_federated_write( write_epsilon: float, org_remaining_budget: float, last_known_shard_epsilon: float, shard_ceiling: float, staleness_ms: float, max_tolerable_staleness_ms: float, safety_factor: float = 0.75, ) -> bool: # Local affordability check. if write_epsilon > org_remaining_budget: raise FederatedMemoryBudgetError( f"write eps={write_epsilon} exceeds org remaining budget " f"{org_remaining_budget}; defer to next epoch" ) # Freshness gate: unknown headroom is zero headroom. if staleness_ms > max_tolerable_staleness_ms: raise FederatedMemoryBudgetError( f"shard budget view is {staleness_ms}ms stale " f"(max {max_tolerable_staleness_ms}ms); budget is non-refundable, " f"cannot admit on stale state" ) # Ceiling check with correlation safety factor. projected = last_known_shard_epsilon + write_epsilon if projected > shard_ceiling * safety_factor: raise FederatedMemoryBudgetError( f"projected shard eps={projected:.3f} exceeds " f"{safety_factor:.2f} x ceiling {shard_ceiling}; " f"split the distillation or defer" ) return True ```