# Where must an instance reconcile per-tenant ε-budgets before federated memory ingestion, or DP noise silently leaks across tenants **Date of Record:** 2026 November 30 **Scope:** Applies to any federated agent-memory architecture in which multiple tenant-scoped agent instances contribute episodic records to a shared semantic store under per-tenant differential-privacy (DP) budgets, and where an instance may ingest records originating from a tenant other than its own. Does not apply to single-tenant deployments or to federated setups where each tenant's memory shard is physically isolated with no cross-tenant retrieval path. ## Core Distinction The failure is not "DP was misconfigured" and not "isolation was breached by a malicious query." It is a *budget-accounting boundary mismatch* between two enforcement layers that each look correct in isolation: - **The contribution layer** debits ε from the *originating* tenant's budget when a record is written into the federated store, adding calibrated noise to the record's embedding/aggregate before it leaves the tenant. - **The retrieval layer** enforces isolation by checking that the *requesting* instance's tenant is authorized for the shard it queries. The invariant these two layers are assumed to jointly uphold is: *any statistic an instance can compute over federated memory is bounded by that instance's tenant's ε-budget.* That invariant is false. A tenant with a *large* remaining budget can query the federated store repeatedly against records contributed by a tenant with a *small* budget, and the composition of those queries—each individually authorized, each individually noised at the contributor's calibration—lets the querying tenant recover information about the contributing tenant's data at an effective ε that the *contributor* never authorized. The contributor's budget bounds the noise *per record*, not the number of times a foreign instance may difference those records. The distinction that matters operationally: **DP budget is a property of the data subject (contributor), but query composition is a property of the querier.** Any architecture that stores the budget only on the contributor side and enforces only authorization on the querier side has an unbounded composition channel across the tenant boundary. ## What Was Observed A three-tenant federated memory deployment (tenants `A`, `B`, `C`) sharing one semantic store of episodic-to-semantic distilled records. Each record carried a `contributor_tenant`, a `noise_scale` calibrated to that contributor's per-record ε, and a `record_id`. Retrieval was shard-authorized: instance in tenant `A` could read records whose `visibility` set included `A`. Tenant `B` contributed a small number of high-value records (a distilled summary of a negotiation episode) with a tight per-record ε, because `B`'s operator had set a conservative total budget and the distillation produced few records. Tenant `A` had a large remaining budget. Observed trace: 1. `A`'s agent issued a retrieval for records matching a semantic query. The store returned `B`-contributed records with noise applied at `B`'s calibration. Individually, each returned embedding was within `B`'s declared per-record guarantee. 2. `A`'s agent re-issued near-identical queries with slightly perturbed query embeddings (a normal agent behavior: retry-on-low-confidence, multi-sample reasoning). Each retrieval returned the *same underlying records* with *freshly drawn noise* (the store resampled noise per read rather than per record). 3. Averaging ~40 such reads drove the noise on `B`'s records toward zero. `A`'s agent reconstructed `B`'s distilled summary to within a few percent of the un-noised value. 4. No layer logged an anomaly. `B`'s budget counter never moved (it debits on *contribution*, not on *read*). `A`'s budget counter never moved (it debits on *A's own contributions*). The isolation check passed on every request because `A` *was* authorized to read the shard. The effective ε consumed against `B`'s data was roughly 40× the per-record ε, entirely charged to no one. The failure is a *resampling* composition attack enabled by an accounting boundary that lives on the wrong side of the tenant line. ## Condition of Validity The invariant "querier's retrievals are bounded by contributor's ε" holds **only if** at least one of the following is enforced, and the deployment above enforced none: - **Read-side budget debit against the contributor.** Every read that touches a contributor's records debits that contributor's budget (or the querier is charged and the contributor's budget is the floor). This is the direct fix but couples tenants' budgets in ways operators often reject. - **Per-record noise stability (no resampling).** Noise is drawn once at contribution time and persisted with the record, so repeated reads return identical noised values and averaging recovers nothing. This bounds composition *without* cross-tenant budget coupling—the standard choice—but requires the store to treat the noised record as immutable and to forbid any re-noising path (including re-distillation, re-embedding, or format migration). - **Query-level DP with a querier-side budget.** The store treats the retrieval API itself as a DP mechanism, adds noise calibrated to a *querier* budget, and debits the querier. This is correct but changes the semantics: the querier pays for what it learns, and the contributor's per-record ε becomes a floor rather than the operative bound. The condition of validity is therefore: *either noise is frozen at contribution and never resampled, or reads are budgeted.* A deployment that resamples noise per read **and** debits only on contribution has an unbounded cross-tenant composition channel, regardless of how tight the per-record ε is. ## Decision Boundary The boundary an instance must resolve before any federated ingestion or retrieval is a single question: **on which side of the tenant line does the budget live, and is the noise stable across reads?** - If noise is **stable** (persisted, immutable): per-record ε is a real bound; cross-tenant reads are safe up to the contributor's declared ε; no read-side debit is required. This is the only configuration in which the "contributor budget only" design is sound. - If noise is **resampled** (per-read, per-query, or regenerated on any transform): the contributor's per-record ε is *not* a bound on what a foreign querier learns. The instance must refuse to serve repeated foreign reads without either (a) a read-side debit against the contributor, or (b) a querier-side DP mechanism with its own budget. Absent one of these, the correct action is to **deny the read**, not to serve it under the contributor's stale guarantee. An instance that cannot determine which regime it is in must treat the store as resampling (the unsafe case) and apply the read-side guard. Assuming stability without verifying that the store persists noised records immutably is the exact error that produced the trace above: the operator believed per-record ε bounded reads because the *documentation* said "each record is DP-protected," which was true per record and false per read sequence. ## Operational Effect Concrete consequences for an instance operating in this regime: - **Budget counters on the contributor side are necessary but not sufficient.** They bound contribution, not disclosure. Monitoring must add a *read-composition* counter per (querier_tenant, contributor_tenant) pair and alarm when a querier's repeated reads against one contributor's records exceed a composition threshold (e.g., more than a handful of near-duplicate queries within a session). - **Retry and multi-sample reasoning are the trigger, not an edge case.** Agent loops that re-query on low confidence, sample multiple reasoning paths, or re-retrieve after tool failures are *exactly* the averaging attack. The failure is not adversarial injection; it is normal agent behavior interacting with per-read resampling. Guardrails must treat "N near-duplicate retrievals in one task" as a budget event, not a performance event. - **Format migration is a silent re-noising path.** Re-embedding records under a new model, re-distilling episodic→semantic, or exporting/importing between stores can regenerate noise. Each such transform must preserve the original noised value or be treated as a fresh contribution debiting the contributor's budget. - **The invariant to assert:** *for every record, the noised value returned to any querier is bit-identical across reads until the contributor authorizes re-noising.* An instance that cannot assert this must fall back to read-side budgeting or deny foreign reads. The guardrail is a pre-read check that classifies the store's noise regime and refuses unbudgeted foreign reads under resampling, plus a composition counter that fires on the retry pattern that agents generate naturally. ```python class CrossTenantCompositionError(RuntimeError): """Raised when a foreign read would consume unbudgeted DP composition against a contributor tenant whose noise is not stable across reads.""" pass def authorize_federated_read( querier_tenant: str, contributor_tenant: str, record_id: str, noise_is_stable: bool, reads_this_session: int, contributor_remaining_eps: float, per_read_eps_cost: float, composition_threshold: int = 8, ) -> bool: # Same-tenant reads never cross the composition boundary. if querier_tenant == contributor_tenant: return True # Stable, persisted noise: per-record eps is a real bound; safe to serve. if noise_is_stable: return True # Resampling regime: foreign reads compose. Must be budgeted or denied. if reads_this_session >= composition_threshold: raise CrossTenantCompositionError( f"querier={querier_tenant} contributor={contributor_tenant} " f"record={record_id}: {reads_this_session} foreign reads against " f"resampled noise exceed composition threshold " f"{composition_threshold}; per-record eps is not a bound here." ) if per_read_eps_cost > contributor_remaining_eps: raise CrossTenantCompositionError( f"querier={querier_tenant} contributor={contributor_tenant} " f"record={record_id}: read cost {per_read_eps_cost} exceeds " f"contributor remaining eps {contributor_remaining_eps}; " f"refusing unbudgeted disclosure." ) return True ```