BRACE: Differential Privacy for Dense Associative Memory with LSR Energy
Chang Qu, Zhaoyang Shi
Abstract
Dense associative memory (DAM) provides an energy-based framework for memory retrieval with close connections to attention mechanisms in modern artificial intelligence. Despite growing interest in differential privacy for AI, the privacy of DAM retrieval dynamics remains relatively unexplored. In this paper, we develop a differential privacy framework for log-sum-ReLU (LSR) dense associative memory, whose finite-support retrieval dynamics pose distinctive challenges for privacy-preserving computation. We propose the Boundary-Responsive Adaptive Correction Evolution (BRACE) algorithm, a differentially private retrieval mechanism for LSR-DAM that adaptively corrects boundary-sensitive perturbations to control their cumulative effect over the retrieval trajectory. In theory, we prove that our method is minimax optimal by deriving dimension-independent terminal and full-trajectory retrieval error rates, with optimal dependence on the inverse temperature and, in the growing-horizon regime, the retrieval horizon. We further establish central limit theorems that enable uncertainty quantification for private retrieval by
*Corresponding author: zyshi10m@outlook.com characterizing its asymptotic distribution and the additional variability introduced by privacy. Numerical experiments compare our proposed method with baseline differential privacy approaches and evaluate its retrieval accuracy. Together, our results provide a theoretical foundation for optimal privacy-preserving retrieval and uncertainty quantification in energy-based associative memory systems.
Keywords: Differential privacy, Associative Memory, Log-sum-ReLU energy
1 Introduction
Differential privacy (DP) has become a fundamental framework for enabling privacy-preserving machine learning (Dwork et al., 2006; Dwork and Roth, 2014; Abadi et al., 2016; Ponomareva et al., 2023), particularly in modern artificial intelligence systems that increasingly rely on sensitive and personalized data (Yu et al., 2022; Lin et al., 2024; Sander et al., 2024). With the emergence of memory-augmented AI systems, such as MemGPT (Packer et al., 2023), LongMem (Wang et al., 2023), and other memory-enhanced LLM architectures (Schuurmans, 2023), protecting stored information and retrieval processes becomes increasingly important. Recently, dense associative memory (DAM) has emerged as an energy-based framework for memory storage and retrieval, with close connections to modern AI systems, including attention mechanisms and memory-augmented architectures (Ramsauer et al., 2021; Krotov and Hopfield, 2021; Hoover et al., 2023). However, despite extensive progress on DP for machine learning models, the privacy of DAM retrieval dynamics remains largely unexplored. This challenge is particularly relevant in applications involving sensitive memories, such as medical record retrieval (Wang et al., 2026), personalized LLM memory modules (Packer et al., 2023), and user-specific AI assistants (Yuan et al., 2023). Therefore, developing principled DP mechanisms for DAM retrieval is essential for trustworthy memory-based AI systems.
Among existing DAM formulations, the log-sum-exponential (LSE) energy has been the dominant choice (Ramsauer et al., 2021; Krotov and Hopfield, 2016) due to its close connection with Transformer attention. LSE-DAM performs retrieval through smooth similarity-based weighting of memories, but faces an inherent trade-off between memorization and generalization. Recently, the log-sum-ReLU (LSR) energy was introduced as a compact-support alternative to LSE-DAM to improve this trade-off (Hoover et al., 2025; Santos et al., 2026). By replacing exponential interactions with compactly supported interactions, LSR-DAM enables localized retrieval and distinct memory properties. However, this finite-support mechanism introduces a fundamental challenge for DP. Unlike LSE-DAM, where retrieval weights vary smoothly, LSR-DAM relies on a hard retrieval boundary that determines the active memory set. Privacy perturbations can therefore trigger boundary switching, causing discontinuous changes in the retrieval operator and errors that accumulate over iterative retrieval. As a result, existing DP approaches based on smooth perturbation analysis cannot be directly applied. This motivates the following fundamental question:
How can we design a differentially private retrieval mechanism for LSR-DAM that adaptively corrects boundary-induced instability while achieving accurate and theoretically optimal retrieval?
In this paper, we answer this question by proposing BRACE (Boundary-Responsive Adaptive Correction Evolution), the first DP framework specifically designed for LSR-DAM. BRACE separates privacy perturbations from retrieval instability by identifying memory points whose membership changes under noisy retrieval and applying an adaptive correction before injecting calibrated DP noise. This boundary-aware design enables stable private retrieval while preserving the compact-support dynamics of LSR-DAM.
Our contributions are summarized as follows:
We formulate the first DP framework for LSR-DAM and propose BRACE, which resolves the boundary instability uniquely induced by compact-support associative memory retrieval.
We establish rigorous theoretical guarantees for BRACE, including differential privacy and minimax-optimal retrieval error bounds, and demonstrate its superiority over commonly used DP baselines through experiments.
We develop a CLT-based uncertainty quantification framework for private LSR-DAM retrieval, providing principled characterization of privacy-induced uncertainty in energy-based AI systems.
By establishing differential privacy for LSR-DAM, our work not only advances privacy-preserving associative memory systems, but also enables secure memory-augmented AI architectures for applications involving sensitive and personalized information.
2 Preliminaries and Problem Setup
Let n,d∈N and write [n]={1,…,n}. For a sequence (Ys), write
Y<t=(Y0,…,Yt−1),
and use y<t for a fixed realization of this history. We write 1{⋅} for the indicator function and Ik for the k×k identity matrix. Let D=(X1,…,Xn)∈(Rd)n be the private memory bank. The initial query q∈Rd, retrieval radius r>0, and horizon T≥1 are public. Throughout, ∥⋅∥ is the Euclidean norm.
Dense associative memory (DAM) retrieves patterns by iterating an energy-based update. For inverse temperature β>0, the log-sum-exponential (LSE) energy and update are
Unlike the global LSE update, LSR retrieval averages only memories within radius r. This compact support yields bounded movement and finite fixed-center sensitivity without clipping or globally bounded memory vectors, and the sensitivity decreases with the local active count. The trade-off is boundary discontinuity, which motivates BRACE.
Definition 1 (Central differential privacy (Dwork and Roth, 2014)). A mechanism M(D)=(Y1,…,YT)∈(Rd)T is centrally (ε,δ)-differentially private (DP) if
where dH counts differing records and the second supremum is over measurable sets A. Write D∼D′ when dH(D,D′)≤1. The mechanism accesses the full bank and releases only M(D).
Definition 2 (Local and smooth sensitivity (Nissim et al., 2007)). For a query f:(Rd)n→Rd, define
LSf(D)=D′∼Dsup∥f(D)−f(D′)∥.
Given a function Lf satisfying Lf(B)≥LSf(B) for every bank B, and a parameter γ>0, define its smooth envelope by Sγ[Lf](D)=supB∈(Rd)ne−γdH(D,B)Lf(B), It satisfies
For the observed private bank D=(X1,…,Xn), we write I(D,z) and ΦD(z). The clean trajectory is z0=q and zt=ΦD(zt−1) for t=1,…,T. The update satisfies
∥ΦD(z)−z∥≤r,∥zt−zt−1∥≤r,∥zt−q∥≤tr.
Now in the following section, we will present why doing DP for LSR energy will face a fundamentally difficulty challenge compared to LSE energy.
3.2 Privacy-Induced Boundary Instability
The most significant feature about DP in LSR energy is: The LSR update is not merely an average but an average of a subset of the bank fundamentally different than the existing literature studying DP for sample mean or DP for LSE energy. This leads to a central challenge: a small change in the current state can change the active set and produce an order-r retrieval jump, leading to a substantially large cumulative error after DP. To see this, for the naive recursion
Y0naive=q,Ytnaive=ΦD(Yt−1naive)+ξt,
the error is
Ytnaive−zt=ΦD(Yt−1naive)−ΦD(zt−1)+ξt.
This term can remain nonzero for arbitrarily small preceding state error; privacy calibration of ξt alone does not control it. The following proposition formally illustrates this phenomenon due to the discontinuity of the update map ΦD.
Proposition 1 (Boundary jump). Fix D, z and suppose Xj is the unique record satisfying ∥Xj−z∥=r. Set zh=z−hr−1(Xj−z). For all sufficiently small h>0, I(D,zh)=
since ∥zh−z∥=h→0 while the numerator converges to a nonzero constant. Hence ΦD is not locally Lipschitz at z, and in particular is not uniformly Lipschitz in its state argument.
This boundary instability presents a central challenge in LSR-DP and it motivates our proposed method in the following section.
4 Proposed Method: BRACE
BRACE keeps the clean trajectory (zt)t=0T internal and releases only (Yt)t=1T. Initialize z0=Y0=q. For t=1,…,T, perform the following steps. Let γt>0 and (εt,δt) be public calibration parameters. For every fixed history y<t, νt(⋅;Δt,γt,εt,δt) denotes a centered noise law calibrated so that the conditional mechanism M(D)=Qt(D;y<t)+ξt is (εt,δt)-DP.
Step 2: Compute the correction. We choose Rt∈Rd by a publicly specified mea-surable rule applied to (D,Y<t) before drawing ξt. For the selected rule, set
Step 3: Activate the correction. Construct Ht∈{0,1} as a public measurable function of (D,Y<t). With a threshold hyperparameter κ>0, compute
Ht=1{∥Rt∥2>κTr2}.(2)
Step 4: Project the corrected query. Set
Qt=ΠB2(Yt−1,r)(at+HtRt),
where Π denotes Euclidean projection onto the closed ball B2(Yt−1,r).
Step 5: Compute the sensitivity scale. For a bank B and fixed history y<t, the local sensitivity of the complete query is
B′∼Bsup∥Qt(B;y<t)−Qt(B′;y<t)∥.
We construct an upper bound Lt(B;y<t) as follows. If Hs(B′;y<s)=0 for all s≤t and all B′ with dH(B,B′)≤1, set
Lt(B;y<t)=max{1,∣I(B,yt−1)∣}2r.
Otherwise, run CORRECTEDCOUNTSEARCH. For each j∈[n] and replacement x∈Rd, let B′=Bj←x and recompute Steps 1–4 recursively under B′ with y<t fixed. Propagate all clean and released memberships, using
βsI=1{∥x−zs−1(B′)∥≤r},βsJ=1{∥x−ys−1∥≤r}.
Enumerate the corresponding membership, activation, and projection branches and retain only feasible branches. Set
Release Yt and use it in the next iteration. Select ε>0 and 0<δ<1, and choose the public smoothing parameters according to (8). Set
ξt∼N(0,2ρε,δTΔt2Id),
where ρε,δ=(log(1/δ)+ε−log(1/δ))2. The complete algorithm is shown in Algorithm 1.
Remark 1 (Activation, sensitivity, and localization). Activation. The threshold κ controls how often correction is activated. For the selected rule, ∥Qt−zt∥2≤max{κTr2,∥Yt−1−zt∥2}.
Algorithm 1: Selected BRACE retrieval
Input: Private bank D; public q,r,T,κ; privacy parameters ε>0, δ∈(0,1);
smoothing parameters (γt)t=1T satisfying (8).
Output: Released trajectory (Y1,…,YT).
z0←q, Y0←q;
ρε,δ←(log(1/δ)+ε−log(1/δ))2;
for t=1,…,T do
It←I(D,zt−1),Jt←I(D,Yt−1);
zt←ΦD(zt−1),at←ΦD(Yt−1);
Rt←zt−at;
Ht←1{∥Rt∥2>κTr2};
Qt←ΠB2(Yt−1,r)(at+HtRt);
Construct Lt(⋅;Y<t) and compute Sγt[Lt(⋅;Y<t)](D);
Δt←max{n2r,Sγt[Lt(⋅;Y<t)](D)};
mt←Δt2r;
Draw ξt∼N(0,2ρε,δTΔt2Id);
Yt←Qt+ξt;
Yt←ΠB2(q,(t+1)r)(Yt);
Release Yt;
return (Y1,…,YT);
zt−1∥2}. Larger κ gives fewer activations and lower search complexity, but permits a larger residual error.
Localization. The replacement search may be restricted to B2(q,tr)∪⋃s=1tB2(ys−1,r), together with one outside representative for each replacement index.
Sensitivity. Since Lt(B;y<t)≤2r, n2r≤Δt(D;y<t)≤2r, 1≤mt≤n. Here Δt is a smooth upper bound on the local sensitivity of Qt, and mt=2r/Δt is an effective sensitivity count rather than an active-set size.
5 Theoretical Results
5.1 DP Guarantee of BRACE
For the released trajectory M(D)=(Y1,…,YT), define δHS(ε)=supD∼D′Deε(L(M(D))∥L(M(D′))).
Theorem 2 (Central differential privacy of BRACE). For each t, conditional on every fixed released history Y<t=y<t, suppose the noise law ξt∼νt(⋅;Δt,γt,εt,δt) is calibrated so that Qt(D;y<t)+ξt is (εt,δt)-differentially private whenever the sensitivity of Qt(⋅;y<t) is bounded by Δt. If the privacy accountant satisfies
t=1∑Tεt≤ε,t=1∑Tδt≤δ,
then Algorithm 1 is centrally (ε,δ)-differentially private. Thus, any conditionally calibrated noise law together with a valid composition accountant yields an (ε,δ)-DP BRACE trajectory.
5.2 Terminal and Maximum-Path Minimax Risk
Let Pall denote the class of all probability laws on Rd. Throughout this subsection, ED∼Pn,M denotes expectation jointly over the i.i.d. sample D∼Pn and the internal randomness of the mechanism M, conditional on the public parameters (q,r,T). For nonnegative a,b, write a≍b when each is bounded by a finite positive constant times the other, with the dependence of the constants specified below. For M(D)=(Y1,…,YT), define
The terminal risk measures the final retrieval error, whereas the maximum-path risk controls all released states. The output projection gives a bound uniform in the memory size and dimension.
Theorem 3 (Minimax-rate optimality). Let M be a centrally (ε,δ)-DP BRACE mecha-nism with the output projection in Step 6, where ε≥0 and 0≤δ<1.
(i) Fixed horizon. For fixed T,ε,δ,
RT(M)≍RT⋆(ε,δ)≍r2,Rmax,T(M)≍Rmax,T⋆(ε,δ)≍r2.
The comparison constants may depend on (T,ε,δ) but are independent of n, d, r.
The comparison constants may depend on (ε,δ) but are independent of n, d, T, r.
Remark 2. For fixed T, increasing n cannot improve the worst-case rate over Pall, and BRACE achieves this optimal r2 rate. The same rate holds for the stronger full-trajectory loss, showing that releasing and controlling the whole path does not worsen the minimax order. When T grows, the matching T2r2 upper and lower bounds show that BRACE also has the optimal dependence on the retrieval horizon in the long-chain regime.
5.3 Trajectory Central Limit Theorems for BRACE
Throughout this subsection, let Dn=(X1,…,Xn)∼Pn for a fixed law P, with q,d,T,r fixed as n→∞. Write ξn,t for the privacy noise at iteration t for sample size n. Convergence is under the joint law of the data and mechanism randomness. For X∼P, define
zˉ0=q,pt=P(∥X−zˉt−1∥≤r),
and, whenever pt>0,
zˉt=ptE[X1{∥X−zˉt−1∥≤r}].
For vectors V1,…,VT∈Rd, write
V1:T=(V1⊤,…,VT⊤)⊤∈RdT.
Assumption 1 (First-order BRACE conditions). There exist random vectors Ct,ξt∈Rd, t=1,…,T, such that:
(i) Jointly over t=1,…,T,
n(zn,t−an,t−Hn,tRn,t)⟹Ct.
(ii)
n1≤t≤Tmax∥Qn,t−(an,t+Hn,tRn,t)∥P0.
(iii) Jointly over t=1,…,T,
nξn,t⟹ξt,
where Eξt=0, and the convergence in (i) and (iii) is joint.
Condition (i) controls the residual correction error at the root-n scale, Condition (ii) requires the pre-noise projection to have no first-order effect, and Condition (iii) characterizes the first-order contribution of the privacy noise. These are local asymptotic conditions and do not require global smoothness of the retrieval map.
Theorem 4 (Trajectory CLT for BRACE). Under Assumption 1,
Remark 3. Cross-time dependence. The theorem gives a joint limit for the entire released trajectory rather than only the terminal state. Hence the limiting distribution captures the dependence of retrieval errors across different iterations.
Finite-sample and asymptotic guarantees. The minimax result provides finite-sample worst-case control of the retrieval error, whereas Theorem 4 characterizes its first-order distribution as n→∞. Together, they describe both the magnitude of the error and its asymptotic uncertainty.
Error decomposition. The limit −C1:T+ξ1:T separates the two first-order sources of error: C1:T represents the residual correction error, while ξ1:T represents the limiting contribution of the privacy noise.
Theorem 5 (Effect of the effective count). For the Gaussian noise in Step 6, let ε>0 and δ∈(0,1) be fixed as n→∞. Since
Thus mn,t of order n is the transition regime in which the privacy noise contributes at the root-n scale.
Moreover, if
nmn,tPct>0,
then
nξn,tP0,nξn,t⟹N(0,ρε,δct22Tr2Id).
Remark 4. The effective count mn,t=2r/Δn,t summarizes the sensitivity scale of BRACE. Theorem 5 determines exactly when privacy noise contributes to the first-order trajectory limit: mn,t≍n is the transition between asymptotically negligible, first-order, and non-tight privacy noise at the root-n scale.
Corollary 1 (Selected active-set BRACE). Suppose pt>0 for every t≤T and P has a continuous Lebesgue density in a neighborhood of each sphere
{x:∥x−zˉt−1∥=r}.
With κ,γ1,…,γT,ε>0 and δ∈(0,1) fixed, Algorithm 1 satisfies Assumption 1 with Ct=0 and ξt=0 for every t. Consequently,
n(Yn,1:T−zn,1:T)P0.
Remark 5 (Dimension dependence). For the Gaussian implementation, E[∥ξn,t∥2∣Dn,Y<t]=dTΔn,t2/(2ρε,δ), so the unprojected noise energy scales with d. However, the final projection gives maxt≤T∥Yn,t−zn,t∥2≤(2T+1)2r2, and hence the minimax bounds in Theorem 3 are dimension independent.
We first illustrate the boundary instability in Proposition 1. We generate n=256 memories in R2 from a three-component Gaussian mixture with two dominant modes centered at (±1,0)⊤ and a broader central component connecting them. We compare noiseless DAM, Naive DAM, and BRACE with r=0.8 (β=3.125), T=5, and (ε,δ)=(128,10−5). The same Gaussian innovations are used for the two noisy methods. This experiment
Figure 1: Synthetic boundary instability. Left: retrieval trajectories of noiseless DAM, Naive DAM, and BRACE. Right: per-coordinate squared error relative to noiseless DAM.
aims to illustrate the boundary instability phenomenon in LSR-DP and demonstrates the necessity for a boundary correction DP method which motivates our BRACE.
Main results. Figure 1 shows that the first perturbation has norm only 0.01443, but at update 2 it changes 11 gate memberships: six memories leave the clean gate and five enter the released gate, although the gate size changes only from 67 to 66. The resulting correction has norm ∥R2∥=0.12510 and BRACE activates from update 2 onward. Naive DAM subsequently moves toward the opposite mode: its per-coordinate squared error increases from 0.08445 at update 3 to 0.42699 at update 4 and 1.00503 at update 5, whereas the final BRACE error is 0.01222. This behavior agrees with Proposition 1: a small perturbation of the state can change the active set and produce a much larger change in the next retrieval update. BRACE corrects this boundary-induced displacement before the next privacy perturbation is added.
We use two PCA coordinates of a frozen ten-dimensional VAE trained on 50,000 MNIST images, with a bank of n = 1000 images and Q = 256 evaluation queries. Each method starts from the strongly corrupted feature
qi=xi+3ui,ui∼N(0,I2),
with the same corruption across methods. We average 32 paired noise repetitions and vary β∈[10−6,1000], T∈{3,5,7}, and ε∈{16,32,64}, with δ=10−5 and r=2/β. We report prediction MSE relative to the uncorrupted feature xi and fidelity MSE relative to the noiseless DAM endpoint zi,T. Shading gives pointwise 95% query-bootstrap intervals.
We compare BRACE with κ=128, Naive DAM, global-noise DAM, and clean end-
point plus Gaussian noise. BRACE uses the smooth sensitivity certificate Δt, while Naive DAM uses the direct count scale 2r/max{1,mt} and global-noise DAM uses 2r. The iterative methods add Gaussian noise with standard deviation ΔtT/(2ρ), where ρ=(log(1/δ)+ε−log(1/δ))2. The clean-endpoint baseline releases only zT with one Gaussian perturbation calibrated to the bound 2Tr.
Main result. Here the best setting refers to the evaluated β giving the smallest prediction MSE. BRACE achieves its minimum prediction MSE 1.582963 at β=0.025119, T=3, and ε=64, compared with 8.759678 for the corrupted input and 1.582947 for noiseless DAM. Thus BRACE reduces the initial prediction error by 81.9% and nearly matches noiseless retrieval. Naive DAM attains the same measured minimum, whereas the minima of global-noise DAM and clean-endpoint noise are 6.327462 and 7.870764, respectively. Since r=2/β, increasing β reduces the number of memories in each gate.
Interestingly, we also observed that for small β, the gate contains most or all memories, so retrieval approaches the bank mean; decreasing β further mainly increases privacy noise. At intermediate β, smaller active counts increase the sensitivity scale and can produce the nonmonotone fidelity behavior. For large β, gates are often empty, so both retrieval movement and privacy noise vanish and the output remains close to the corrupted query.
Handwritten reconstructions. Figure 4 provides a visual illustration at the best observed BRACE setting. BRACE closely follows noiseless DAM, while the reconstructions also show that low feature-space MSE does not necessarily imply recovery of the original individual digit.
7 Conclusion and Limitation
We developed a comprehensive framework for privacy-preserving retrieval of LSR-DAM, establishing formal privacy guarantees, utility bounds, and minimax optimality results. By tackling the boundary instability, one fundamental challenge in this problem, we propose the BRACE method. Our theory characterizes the effects of local retrieval, sensitivity smoothing, and privacy noise, and provides a principled understanding of the resulting privacy-utility trade-off. Experiments demonstrate that the proposed method achieves consistently better prediction performance than competing approaches, while supporting the theoretical findings and showing the practical benefits of local retrieval. Moreover, as with any retrieval-based private mechanism, the practical performance depends on the underlying data geometry and the choice of retrieval scale. In regimes where local neighborhoods are intrinsically sparse, the benefits of retrieval may naturally diminish. The sensitivity estimation also introduces additional computation, reflecting the cost of obtaining tighter data-dependent privacy guarantees. These considerations primarily concern the operating regime and implementation efficiency rather than the validity of the theoretical guarantees. Future work may further improve computational
SD=3 stress test: best observed BRACE handwritten comparison
κ=128β=0.02511886 T=3 ε=64δ=1e−05 repetition=0
Selected mean feature prediction MSE=1.582963; activated corrections: 0/24,576
First saved evaluation example of each digit, selected by label alone; repetition 0. Every decoded state uses the same frozen PCA2→VAE10 decoder; inverse PCA retains two coordinates and discards eight. Original DAM is the noiseless endpoint from the same corrupted query. The setting is best observed among resolved κ=128 evaluation cases, not development-selected. The saved run contains 0 activated corrections across 24,576 updates. No correction activates, so this gallery does not demonstrate an active-correction benefit.
Figure 4: Handwritten examples at the best observed BRACE setting ( κ=128, β=0.025119, T=3, ε=64).
efficiency and develop more adaptive choices of the retrieval scale.
AI use statement
In this work, we used generative AI tools to assist with proof writing, code debugging, literature search and language editing. We have not used generative AI tools for brainstorming research ideas, problem formulation, algorithm design, finding theoretical in-sights, and experimental design. The rest of the required disclosure tasks are not applicable to this work. We have reviewed all AI-assisted work. For example, LLM-generated code was verified and tested for correctness by two authors; all LLM-assisted proofs were checked line by line by the authors. We take responsibility for the final content of this work, including text, claims, or artifacts produced with the aid of generative AI.
References
Martín Abadi, Andy Chu, Ian Goodfellow, H. Brendan McMahan, Ilya Mironov, Kunal Talwar, and Li Zhang. Deep Learning with Differential Privacy. In Proceedings of the 2016 ACM SIGSAC Conference on Computer and Communications Security, pp. 308–318. ACM, 2016. DOI: https://doi.org/10.1145/2976749.2978318.
Borja Balle, Gilles Barthe, Marco Gaboardi, Justin Hsu, and Tetsuya Sato. Hypothesis Testing Interpretations and Rényi Differential Privacy. In Proceedings of the Twenty Third International Conference on Artificial Intelligence and Statistics, volume 108, pp. 2496–2506. PMLR, 2020. https://proceedings.mlr.press/v108/balle20a.html.
Borja Balle, Gilles Barthe, and Marco Gaboardi. Privacy Profiles and Amplification by Subsampling. Journal of Privacy and Confidentiality, 10(1), 2020. DOI: https://doi.org/10.29012/JPC.726.
Saugata Basu, Richard Pollack, and Marie-Françoise Roy. Algorithms in Real Algebraic Geometry. Algorithms and Computation in Mathematics, volume 10. Second edition. Springer, 2006. DOI: https://doi.org/10.1007/3-540-33099-2.
Cynthia Dwork, Frank McSherry, Kobbi Nissim, and Adam Smith. Calibrating Noise to Sensitivity in Private Data Analysis. In Theory of Cryptography: Third Theory of Cryptography Conference (TCC 2006), Lecture Notes in Computer Science, volume 3876, pp. 265–284. Springer, 2006. DOI: https://doi.org/10.1007/11681878_14.
Cynthia Dwork, and Aaron Roth. The Algorithmic Foundations of Differential Privacy.
Benjamin Hoover, Yuchen Liang, Bao Pham, Rameswar Panda, Hendrik Strobelt, Duen Horng Chau, Mohammed Zaki, and Dmitry Krotov. Energy Transformer. In Advances in Neural Information Processing Systems, volume 36, pp. 27532–27559. 2023. DOI: https://doi.org/10.52202/075280-1197.
Benjamin Hoover, Zhaoyang Shi, Krishnakumar Balasubramanian, Dmitry Krotov, and Parikshit Ram. Dense Associative Memory with Epanechnikov Energy. In Advances in Neural Information Processing Systems, volume 38, pp. 131166–131193. 2025. DOI: https://doi.org/10.52202/085713-3947.
Palak Jain, Sofya Raskhodnikova, Satchit Sivakumar, and Adam Smith. The Price of Differential Privacy under Continual Observation. In Proceedings of the 40th International Conference on Machine Learning, volume 202, pp. 14654–14678. PMLR, 2023. https://proceedings.mlr.press/v202/jain23b.html.
Diederik P. Kingma and Max Welling. Auto-Encoding Variational Bayes. In International Conference on Learning Representations, 2014. https://arxiv.org/abs/1312.6114.
Dmitry Krotov, and John J. Hopfield. Dense Associative Memory for Pattern Recognition. In Advances in Neural Information Processing Systems, volume 29, pp. 1172–1180. 2016. https://arxiv.org/abs/1606.01164.
Dmitry Krotov, and John J. Hopfield. Large Associative Memory Problem in Neurobiology and Machine Learning. In International Conference on Learning Representations. 2021. https://arxiv.org/abs/2008.06996.
Yann LeCun, Léon Bottou, Yoshua Bengio, and Patrick Haffner. Gradient-Based Learning Applied to Document Recognition. Proceedings of the IEEE, 86(11):2278–2324, 1998. DOI: https://doi.org/10.1109/5.726791.
Zinan Lin, Sivakanth Gopi, Janardhan Kulkarni, Harsha Nori, and Sergey Yekhanin. Differentially Private Synthetic Data via Foundation Model APIs 1: Images. In International Conference on Learning Representations. 2024. https://arxiv.org/abs/2305.15560.
Ilya Mironov. Rényi Differential Privacy. In 2017 IEEE 30th Computer Security Foundations Symposium (CSF), pp. 263–275. IEEE, 2017. DOI: https://doi.org/10.1109/CSF.2017.11.
Kobbi Nissim, Sofya Raskhodnikova, and Adam Smith. Smooth Sensitivity and Sampling in Private Data Analysis. In Proceedings of the 39th Annual ACM Symposium on Theory of Computing, pp. 75–84. ACM, 2007. DOI: https://doi.org/10.1145/1250790.1250803.
Charles Packer, Sarah Wooders, Kevin Lin, Vivian Fang, Shishir G. Patil, Ion Stoica, and Joseph E. Gonzalez. MemGPT: Towards LLMs as Operating Systems. arXiv:2310.08560, 2023. DOI: https://doi.org/10.48550/arXiv.2310.08560.
Natalia Ponomareva, Hussein Hazimeh, Alex Kurakin, Zheng Xu, Carson Denison, H. Brendan McMahan, Sergei Vassilvitskii, Steve Chien, and Abhradeep Thakurta. How to DP-fy ML: A Practical Guide to Machine Learning with Differential Privacy. Journal of Artificial Intelligence Research, 77:1113–1201, 2023. DOI: https://doi.org/10.1613/jair.1.14649.
Hubert Ramsauer, Bernhard Schäfl, Johannes Lehner, Philipp Seidl, Michael Widrich, Thomas Adler, Lukas Gruber, Markus Holzleitner, Milena Pavlović, Geir Kjetil Sandve, Victor Greiff, David Kreil, Michael Kopp, Günter Klambauer, Johannes Brandstetter, and Sepp Hochreiter. Hopfield Networks Is All You Need. In International Conference on Learning Representations. 2021. https://arxiv.org/abs/2008.02217.
Tom Sander, Yaodong Yu, Maziar Sanjabi, Alain Oliviero Durmus, Yi Ma, Kamalika Chaudhuri, and Chuan Guo. Differentially Private Representation Learning via Image Captioning. In Proceedings of the 41st International Conference on Machine Learning, volume 235, pp. 43255–43275. PMLR, 2024. https://proceedings.mlr.press/v235/sander24b.html.
Saul Santos, Nuno Gonçalves, Daniel C. McNamee, Marcos Treviso, and André F. T. Martins. Sparse Attention as Compact Kernel Regression. arXiv:2601.22766, 2026. DOI: https://doi.org/10.48550/arXiv.2601.22766.
Aad W. van der Vaart. Asymptotic Statistics. Cambridge Series in Statistical and Probabilistic Mathematics, volume 3. Cambridge University Press, 1998. DOI: https://doi.org/10.1017/CB09780511802256.
Weizhi Wang, Li Dong, Hao Cheng, Xiaodong Liu, Xifeng Yan, Jianfeng Gao, and Furu Wei. Augmenting Language Models with Long-Term Memory. In Advances in Neural Information Processing Systems, volume 36, pp. 74530–74543. 2023. DOI: https://doi.org/10.52202/075280-3259.
Xiao Wang, Fuling Wang, Haowen Wang, Bo Jiang, Chuanfu Li, Yaowei Wang, Yonghong Tian, and Jin Tang. Activating Associative Disease-Aware Vision Token Memory for LLM-Based X-Ray Report Generation. IEEE Transactions on Medical Imaging, 45(2):583–595, 2026. Published online in 2025; issue publication February 2026. DOI: https://doi.org/10.1109/TMI.2025.3603416.
Da Yu, Saurabh Naik, Arturs Backurs, Sivakanth Gopi, Huseyin A. Inan, Gautam Kamath, Janardhan Kulkarni, Yin Tat Lee, Andre Manoel, Lukas Wutschitz, Sergey Yekhanin, and Huishuai Zhang. Differentially Private Fine-tuning of Language Models. In International Conference on Learning Representations. 2022. https://arxiv.org/abs/2110.06500.
Ruifeng Yuan, Shichao Sun, Yongqi Li, Zili Wang, Ziqiang Cao, and Wenjie Li. Personalized Large Language Model Assistant with Evolving Conditional Memory. arXiv:2312.17257, 2023. DOI: https://doi.org/10.48550/arXiv.2312.17257.
This supplementary contains proofs of all theoretical results, experiment implement details and computational complexity.
A Proof of Proposition 1
Proof. By definition,
∥zh−z∥=h,∥Xj−zh∥=r+h.
For i=j, ∥Xi−z∥=r. By continuity, for all small h>0,
Proof. By convexity, ΦD(y)∈B2(y,r), also for an empty gate. The triangle inequality gives
∥ΦD(y)−y∥≤r,∥zt−zt−1∥≤r,∥zt−q∥≤tr.
Fix D′=Dj←x and m=∣I(D,y)∣. For m=0, ∥ΦD′(y)−ΦD(y)∥≤r. For m≥1, an inactive-to-inactive replacement leaves ΦD(y) unchanged. For an active-to-active replacement,
ΦD′(y)−ΦD(y)=mx−Xj,∥x−Xj∥≤2r.
For removal with m≥2,
ΦD(y)−ΦD′(y)=m1(Xj−m−1∑i∈I(D,y)∖{j}Xi),
with norm at most 2r/m. For m=1, removal changes the output by at most r. For entry,
These polynomial constraints include all records at every step.
Every replacement satisfies a branch. Conversely, the constraints and z0′=q determine (zs′,as′,Rs′,Hs′,Qs′) by induction. Hence, whenever CORRECTEDCOUNTSEARCH is used, the branch supremum equals the complete-query local sensitivity.
If x is in a clean gate at s≤t,
∥x−q∥≤∥x−zs−1′∥+∥zs−1′−q∥≤sr≤tr.
A released gate requires x∈B2(ys−1,r). Outside
B2(q,tr)∪s=1⋃tB2(ys−1,r),
all gates exclude x. For fixed j, these replacements give the same averages and recursion. One outside representative suffices.
Both queries lie in B2(yt−1,r), so
∥Qt(B;y<t)−Qt(B′;y<t)∥≤2r.
Under the nonactivation condition in Step 5, use (4); otherwise, use the branch supremum. Thus
LSQt(⋅;y<t)(B)≤Lt(B;y<t)≤2r.(5)
29
□
Computational complexity. Let
s1<⋯<sKt≤t,sKt+1=t+1,
be the activated correction times. Before s1, no correction branch search is needed. At the kth activation, the cumulative neighboring-query discrepancy is restricted to
B2(0,2rk).
Let Gk be the number of feasible gate cells retained at activation k. The number of branch-propagation operations is bounded by
If Kt=0, no branch search is required. Thus the branch complexity depends on the number of activated corrections, rather than branching over the full bank at every iteration.
B.4 Smooth domination and measurability
Proof. By (5) and the envelope term B=D,
LSQt(:,y<t)(D)≤Lt(D;y<t)≤Sγt[Lt](D).
Every envelope term is at most 2r. For D∼D′, the Hamming triangle inequality gives
The branch graphs form a finite semialgebraic union. By quantifier elimination (Basu et al., 2006), Qt and the all-neighbor nonactivation condition are semialgebraic.
For u≥0, local sensitivity exceeds u exactly when a replacement satisfies
∥Qt(B;y<t)−Qt(B′;y<t)∥2>u2.
Quantifier elimination makes this relation semialgebraic. The count branch is also semialgebraic, so Lt is Borel measurable.
For dH(D,B)=j≤k, e−γtkLt(B)≤e−γtjLt(B); take k=j for the reverse bound. Each supremum has semialgebraic strict superlevel sets by quantifier elimination. Finite maxima and fixed weights preserve Borel measurability. For real-algebraic inputs, quantifier elimination and bisection on [0,4r2] give certified bounds for the required suprema.
C Proof of Theorem 2
Proof. For fixed y<t and Borel A, define the release kernel
For per-step budgets, use T=1 and (εt,δt) above. Variance Δt2/(2ρεt,δt) and the corresponding smoothing bound give conditional DP; apply Theorem 2.
D Proof of Theorem 3
Proof. Output-projection bound. By Appendix B.1, zt∈B2(q,tr). Projection is nonexpansive, so
IID rare-record lower bound. Fix a unit vector e1 and b=q+4re1. Let Di,x contain x∈B2(q,r) at position i and b elsewhere. Since ∥b−x∥≥3r,
zt(Di,x)=x(t≥1).
Let Ki,x be the terminal-output law of a private mechanism on Di,x, and Kx=n−1∑iKi,x. Since Di,x∼Di,x′, terminal post-processing and averaging give the DP condition in (12).
Write δx for the point mass at x. For n≥2, take
Px=(1−1/n)δb+(1/n)δx.
Exactly one x has probability (1−1/n)n−1 and uniform position. Thus
ED∼Pxn,M∥YT−zT(D)∥2≥(1−1/n)n−1∫∥u−x∥2Kx(du).
For 0 < u < 1,
log(1−u)=−∫0u1−sds≥−1−uu,
Thus (1−1/n)n−1≥e−1. Apply (12), take supx, then infM:
Thus P(∥zT−q∥≥Tr/2)≥3/4 under the conditional law.
Private-mechanism lower bound. Take M with RT(M)<∞. Draw n IID background records to form D0; replace a uniformly chosen row by x∗ to form D1. Then D0∼P0n, D0∼D1, and D1 has the law of P1n conditional on one trigger. That event has probability
(1−1/n)n−1≥e−1.
Restrict this coupling to ∥zT(D1)−q∥≥Tr/2. Append the terminal-output kernel on Di to obtain measures μi on
Ω=(Rd)n×(Rd)n×Rd,
with common mass at least 3/4. Integrating DP over sections gives
By local Lipschitz continuity and induction, this is oP(1), so nRn,tP0. Equation (20) gives Qn,t=an,t with probability tending to one and nξn,tP0. By nonexpansiveness,
Together with nmaxt≤T∥ξn,t∥P0, this proves Assumption 1 with Ct=ξt=0. Joint convergence follows from fixed T.
G.1 MNIST reproducibility details
Code and data. The supplementary archive brace_mnist_reproducibility.zip contains the code, package versions, reproduction commands, VAE checkpoint, PCA features, data splits, corrupted queries, Gaussian draws, and reported results. The training script downloads MNIST and checks the files.
Training and settings. Pixel values are divided by 255. With seed 20271006, we use 50,000 training images, a disjoint 1,000-image memory bank, 128 development images, and 256 test queries. The VAE uses a 784–400 encoder, ten-dimensional mean and log-variance heads, and a 10–400–784 decoder. Training uses Adam with learning rate 10−3, batch size 256, and 15 epochs. The loss is binary cross-entropy plus KL divergence, with KL weight min(1,e/3) at epoch e. PCA is fitted to the training posterior means without whitening.
Retrieval uses seed 202610063, qi=xi+3ui with ui∼N(0,I2), and 32 noise repetitions. The same starts and standard Gaussian draws are used across methods. We use
Metrics and confidence intervals. For Q = 256, R = 32, and d = 2,
E(a)=QRd1i=1∑Qj=1∑R∥YT(i,j)−ai∥2.
Prediction MSE uses ai=xi, while fidelity MSE uses ai=zi,T. Pointwise 95% intervals use 512 query-cluster bootstrap resamples. Repetitions are averaged within each query, queries are resampled with replacement, and the 2.5th and 97.5th percentiles are reported.