Erasing the Wrong Thing: Conditional Attribute Leakage and Concept Erasure in Shared Foundation Model EmbeddingsErasing the Wrong Thing: Conditional Attribute Leakage and Concept Erasure in Shared Foundation-Model Embeddings
The authors show that global concept erasure and task-conditional linear protection are incompatible when tasks and sensitive attributes are correlated, and propose TC-LEACE, which reduces the linear utility loss from 0.176 to 0.042 on CANDID-PTX.
The data custodian uses a public foundation model to generate embeddings, fits an eraser, and then publishes E′, hoping the embeddings are useful for authorized tasks W while limiting their leakage of sensitive attribute Z information beyond W. The attacker may be a curious recipient who obtains E′, Z labels for some published samples, and can use W at the release site, can infer Z with any model class, but cannot access the eraser.
- When medical image embeddings are shared, global concept erasure methods such as LEACE provide only population-level linear protection. The authors state that when the authorized task W is correlated with the sensitive attribute Z, global erasure either sacrifices task utility or leaves task-conditional leakage.
- The authors establish an AUROC decomposition framework that distinguishes imputation from conditional leakage, prove that global and task-conditional linear protection are incompatible while preserving linear task signal, and propose TC-LEACE: closed-form elimination of the mean difference of Z within each task stratum.
- On CANDID-PTX, the conditional AUROC after LEACE is still 0.771, and both population-level audits pass; TC-LEACE reduces the linear utility loss from 0.176 to 0.042, with conditional AUROC on par with LEACE. On the 85 CelebA attribute pairs, conditional leakage exists in all four encoders.
- The authors note: medical evidence comes only from a single preset attribute pair in CANDID-PTX, and the CelebA attributes are only proxies; only linear erasers are evaluated, and no nonlinear erasure for the conditional objective is provided; the bootstrap does not reflect probe retraining variance; TC-LEACE's guarantee on rare strata holds only approximately.
- Evaluated models
- RAD-DINOBiomedCLIPDINOv2-baseCLIP ViT-B/32SigLIP-baseMAE-base
- Benchmarks
- CANDID-PTXCelebA
- Metrics
- AUROCconditional AUROCunconditional AUROCutility losscross-group lossretention of conditional leakage
Addressing the problem that sharing embeddings in place of original medical images may leak sensitive attributes, researchers prove that when the task is correlated with the sensitive label, global concept erasure cannot achieve task-conditional linear protection while preserving the task signal; it necessarily either eliminates the task signal or retains conditional linear leakage, and they propose TC-LEACE, a closed-form variant of LEACE, which enforces linear protection within each task stratum of the fitted data. Evaluation on 85 CelebA attribute pairs across four vision foundation models shows that after LEACE erasure, conditional leakage persists across all encoders, and the gap between marginal and conditional auditing grows with association strength. On hospital chest X-rays from three foundation models including two biomedical models, although marginal attacks on LEACE-erased embeddings are weaker than the diagnosis-only reference, chest tube status remains detectable within diagnosis strata; TC-LEACE recovers most of LEACE's linear task utility loss and keeps task-conditional leakage within a preset margin relative to LEACE.
Paper analysis
What problem does this paper attempt to solve?
Global concept erasure is incompatible with task-conditional protection when tasks and sensitive attributes are correlated; the authors propose a task-conditional erasure framework and TC-LEACE.
Core problem: after global concept erasure (e.g., LEACE), shared embeddings still leak sensitive attributes within each stratum of the authorized task, and global erasure sacrifices utility to eliminate inferences that the task label already permits.
- Setting: in multi-center medical research, the custodian shares precomputed embeddings rather than raw images; the authors state that these embeddings may support inference of sensitive attributes beyond the authorized purpose, implicating the principle of least privilege.
- Shortcomings of existing methods: the authors state that concept erasure methods such as LEACE target only population-level associations and may exhibit two failures at once—over-erasure harming authorized-task utility, and under-erasure leaving within-stratum conditional leakage.
- Core observation: leakage has two sources—imputation (arising from the statistical association between W and Z, requiring no embedding) and conditional leakage (the additional information about Z that E′ provides among samples with the same W). The authors prove that when β≠0, global and task-conditional linear guardedness cannot hold simultaneously while retaining nonzero linear task signal (Proposition 1, Eq. 11).
- The paper proposes: a task-conditional evaluation framework (conditional AUROC), a closed-form prediction of the utility cost of global erasure (Corollary 1), and a closed-form variant, TC-LEACE, that enforces linear guardedness within each task stratum of the fit data.
- Threat model (Section 3.1, Table 1):
- Goal: the custodian releases E′ that is useful for the authorized task W and limits its leakage of Z information beyond W.
- Attacker: a curious recipient or anyone who obtains the released data, inferring Z with any model class.
- Knowledge and capabilities: possesses E′, Z labels for some released samples, and can use W at release; cannot access the eraser. The eraser guarantees effectiveness only against linear attackers on the fit data; nonlinear attackers are evaluated empirically.
- Victim system: an authorized downstream pipeline sharing foundation-model embeddings, in the case detecting pneumothorax (W) from chest radiograph embeddings, with the sensitive attribute being chest tube (Z).
What related research exists?
Related work falls into four groups: shared-representation privacy, definitions of leakage, concept erasure methods, and fair representation and conditional independence; this paper's positioning is post-hoc task-conditional erasure.
Privacy risks of shared representations
- Song and Raghunathan (2020), Morris et al. (2023), Melis et al. (2019)—study attribute inference, inversion, and feature leakage after embedding release.
- Medical imaging: Gichoya et al. (2022) state that deep models can identify race from chest radiographs; Glocker et al. (2023), Santos et al. (2025), Kim et al. (2026) state that chest radiograph foundation-model embeddings retain demographic attributes; Bajar et al. (2026) state that brain MRI embeddings support linkage and attribute inference.
- Weber et al. (2025)—propose post-hoc orthogonalization of chest radiograph embeddings to remove protected features; the paper's empirical tests in Section 7 find that it increases conditional leakage under strong association.
What counts as leakage
- Nissenbaum (2004)'s contextual integrity and Dwork and Roth (2014)'s differential privacy—permit inferences derived from population statistics.
- Jayaraman and Evans (2022) argue that attribute inference should be measured beyond imputation; Stadler et al. (2024) state that useful representations necessarily leak the information that the task label leaks, and prove that limiting leakage of every other attribute to that level conflicts with high utility; the paper states that it targets only a single designated attribute and turns this distinction into an audit of post-erasure embeddings.
- Wang et al. (2019)'s dataset leakage and Eid et al. (2026)'s label-only floor—audit by comparison with a label baseline; the paper notes that they are unconditional and may miss conditional leakage (Section 7 gives instances that pass this comparison yet still leak Z within strata).
Concept erasure
- Belrose et al. (2023)'s LEACE—implements linear guardedness in closed form and is this paper's main global eraser; Holstege et al. (2026)'s SPLINCE performs linear erasure while preserving task covariance; distributional erasure instead pursues E′⊥Z (Chowdhury et al. 2025, Akbari et al. 2025, etc.).
- The paper notes that these methods all target global constraints not conditioned on the authorized task label; the closest, Eid et al. (2026), fits a separate LEACE projector for each task class and requires predicting the label to select one at release, whereas TC-LEACE applies a single mapping post-hoc to frozen embeddings and requires no labels at release.
Fair representation and conditional independence
- Zemel et al. (2013), Edwards and Storkey (2016) remove protected attributes during representation training; Hardt et al. (2016), Zhao and Gordon (2022) state that parity-style constraints have unavoidable error when base rates differ (β≠0).
- Zhang et al. (2018), Zhao et al. (2019), Madras et al. (2018), Adeli et al. (2021), Hwa et al. (2024) impose conditional constraints during training; the paper notes that they act during representation training, whereas this paper performs post-hoc erasure on fixed foundation-model embeddings.
Baselines and benchmarks: the compared erasers are LEACE (primary), SPLINCE, and post-hoc orthogonalization (unplanned analysis in Section 7); the datasets are CANDID-PTX and CelebA. The authors position the paper as changing the erasure objective from global to task-conditional and explaining why the global objective loses utility.
How does the paper address this problem?
Uses an AUROC decomposition to distinguish imputation from conditional leakage, proves that global and task-conditional protection are incompatible, and then erases per task stratum via the closed-form projection TC-LEACE.
Overall approach: first formalize "leakage beyond the authorized task" as conditional leakage, then prove that the global erasure objective is incompatible with this requirement, and finally change the erasure objective to be task-conditional, yielding the closed-form eraser TC-LEACE.
Problem setting and formalization
- W and Z are both binary, πz = Pr[W=1|Z=z], and the association strength is β = π1 − π0; the imputation upper bound is AUC∗imp = 1/2 + (|β|)/2, i.e., the maximum AUROC achievable using W alone (Eq. 5).
- AUROC is exactly decomposed by the grouping variable (Eq. 4): taking Y=Z and G=W, the within-stratum terms AUC00 and AUC11 measure sensitive-attribute discrimination within each task stratum; the conditional AUROC (Eq. 6) is a reweighting of the within-stratum terms, and AUCcond − 0.5 serves as the empirical measure of conditional leakage.
- The difference between unconditional and conditional AUROC is determined by cross-stratum ranking (Eq. 7), and the weight of within-stratum pairs in the unconditional AUROC is at most 1−|β|, so under strong association the unconditional audit is dominated mainly by cross-stratum ranking.
Why global erasure fails (Section 4)
- Failure 1 (utility): Linear protection makes the score means of the two Z groups equal, which implies m1 − m0 = π0d0 − π1d1 (Eq. 8); Proposition 1 states that when β≠0 there is no affine score that has neither Z leakage nor task information, i.e., every informative linear task score must cancel the association that W itself leaks. Corollary 1 gives a closed-form prediction of cross-group AUROC under the equal-variance two-normal approximation, allowing the utility cost to be predicted from pre-erasure statistics.
- Failure 2 (leakage): By the law of total covariance, ΣEZ decomposes into a within-stratum component (1−q)c0 + qc1 and a W-mediated component (Eq. 10); global protection only sets the left side to zero, and any release with β≠0 and still-different task-class means must retain covariance with Z in at least one stratum (Eq. 11). Lemma 1 states that after LEACE, Cov(E′, Z|W=w) = M cw, which is zero only when cw ∈ span(ΣEZ).
- Other erasers: The authors state that SPLINCE preserves task covariance but by Eq. 11 still retains within-stratum covariance; perfect global erasure E′⊥Z also cannot remove conditional leakage from a useful release when β≠0 (Proposition 1(b)).
TC-LEACE (Section 5)
- Fitting: The custodian estimates µ, Σ and the per-stratum c0, c1 on its own data with W and Z labels, erasing only the within-stratum signal and preserving the W-mediated component; rTC(E) = E − Σ1/2 PC Σ+1/2(E−μ), where PC is the orthogonal projection onto span{Σ+1/2c0, Σ+1/2c1}, with rank at most 2, and dense fitting cost O(nd² + d³).
- Deployment: A single affine mapping; after precomputing the low-rank factors, each embedding costs O(d), and no task labels are needed at release time, nor is retraining the foundation model.
- Guarantee: Proposition 2 states that on the fitted distribution Cov(rTC(E), Z|W=w) = 0, i.e., task-conditional linear protection; the cost is that global linear protection is given up by design (Eq. 13), and nonlinear within-stratum signal is outside the guarantee.
Success criteria and evaluation method
- Attackers are divided into unconditional (seeing only E′) and conditional (seeing both E′ and standardized W); for each class, logistic regression and a fixed-configuration MLP are trained (averaged over three seeds), and the best by AUROC on Bval is selected to form the combined attacker.
- Utility is measured by the AUROC of linear and MLP task probes, and the loss is decomposed by Eq. 4 into within-group and cross-group parts; hypotheses H1–H4, the boundary δT, and the Holm-corrected decision rule are fixed in advance (Appendix C).
What experiments did the paper conduct?
On CANDID-PTX and the 85 CelebA attribute pairs: conditional leakage is pervasive after LEACE, and TC-LEACE recovers most of the linear utility loss under strong association.
Experimental setup
- Encoders under test (all frozen, 768-dimensional): for CANDID-PTX, RAD-DINO (primary), BiomedCLIP vision encoder, DINOv2-base; for CelebA, CLIP ViT-B/32, SigLIP-base, DINOv2-base, MAE-base.
- Data: CANDID-PTX contains 19,237 chest radiographs, W=pneumothorax (3,196 positive), Z=chest tube (1,423, of which 1,253 also have pneumothorax), β≈0.77; CelebA uses 34 attributes to form a preset set of 100 directed (W,Z) pairs, 85 pairs satisfy the rule of ≥100 images per cell in each fold, |β| ranges between 0 and 0.684.
- Splits: five-fold cross-validation, grouped by identity (CelebA) or patient (CANDID-PTX); within each fold, split into A (80%, fitting the eraser and utility probes) and B (20%, training attackers); the eraser never sees attacker data.
- Conditions: raw, LEACE, TC-LEACE; the unplanned analysis in Section 7 additionally tests SPLINCE and post-hoc orthogonalization.
- Statistics: 1,000 bootstraps, central p-values Holm-corrected (12 tests for CelebA, 3 for CANDID-PTX); δT is the permutation null margin (CelebA 0.0233, CANDID-PTX 0.0785).
Main results
According to Table 4 (CANDID-PTX, RAD-DINO, combined attacker, brackets are 95% bootstrap intervals):
Swipe horizontally to read the table
Metric Raw LEACE TC-LEACE Unconditional AUROC 0.934 0.804 0.857 Conditional AUROC ↓ 0.870 0.771 0.767 Linear probe task AUROC ↑ 0.907 0.731 0.865 MLP probe task AUROC ↑ 0.918 0.897 0.903 Linear probe utility loss ↓ 0 0.176 0.042 Of which cross-group portion ↓ 0 0.128 0.023 MLP probe loss ↓ 0 0.021 0.015 - The authors state that both population-level audits pass after LEACE (the fit-data probe is exactly 0.5; the unconditional attack 0.804 is below the imputation ceiling 0.886), but the conditional AUROC 0.771 has interval [0.744, 0.797] above 0.5+δT=0.578, so H1 holds.
- The authors state that LEACE hides rather than eliminates the permitted association from linear readers: the linear task score's ranking of Z drops from 0.909 to 0.569, and the cost falls mainly on linear readers and cross-group pairs (73%).
- The authors state that the difference in conditional AUROC between TC-LEACE and LEACE is −0.004 [−0.021, 0.014], below δT, while linear utility loss drops 76%, so H4 holds; and the gain does not come only from preserving shortcuts (the AUC00 in the no-chest-tube stratum also differs by 0.046).
CelebA: 85 attribute pairs, four encoders
- Conditional leakage is pervasive (RQ1): after LEACE, conditional AUROC is 0.860–0.900 (Table 5), with all interval lower bounds ≥0.820, far above 0.5+δT=0.523; LEACE retains 91.5%–97.3% of the original conditional leakage. Figure 3 shows the same post-erasure embeddings: the in-fit linear probe is exactly 0.5, the held-out linear attacker 0.538–0.554, the held-out MLP attacker 0.863–0.903.
- Unconditional audits count imputation as leakage (RQ2): after LEACE, the slope of unconditional minus conditional AUROC on |β| is 0.064–0.077, with intervals excluding zero (Table 5, Figure 4); removing the most strongly associated pair (W=Smiling, Z=High Cheekbones) lowers the slope to 0.030–0.044, still positive; the mean difference is about 0.003, the top tertile 0.008–0.010, the bottom tertile near zero.
- Cost is predictable (RQ3): cross-group loss is 0.011–0.014 for linear probes and 0.0006–0.0017 for MLP probes; guardedness predicts mean error 0.0018–0.0029 (R² 0.97–0.99), ex-ante prediction error 0.0027–0.0033 (R² 0.92–0.96), both better than zero prediction and leave-one-pair-out regression, and H3 holds for all four encoders.
TC-LEACE performance on CelebA (RQ4)
- Cross-group loss: drops from 0.011–0.014 to 0.0044–0.0069, paired difference −0.0065 to −0.0071, uncorrected intervals exclude zero; the effect is concentrated in the top tertile (difference −0.020 to −0.022, about two-thirds of the loss), the bottom tertile is +0.0003 to +0.0009 (Figure 6a).
- H4a fails: p-values 0.014–0.039 become 0.056–0.109 after Holm correction over 12 tests; the authors state that TC-LEACE's advantage appears only under strong association; H4b holds (conditional AUROC 0.004–0.009 lower than LEACE).
- Secondary encoders (Table 7): after LEACE, DINOv2 and BiomedCLIP still have conditional AUROC 0.671 and 0.648 (MLP attackers alone reach 0.723 and 0.731); TC-LEACE reduces their linear utility loss by about three-quarters, with conditional AUROC higher by 0.025 [0.003, 0.046] and 0.023 [0.007, 0.038], detectable but below δT.
Other ablations and analyses
- Release-fit setting (Table 8): when the eraser is fit on released embeddings, after LEACE the logistic attacker still reaches 0.564/0.530 within two layers, while TC-LEACE lowers it to 0.502/0.483; the authors state this separates the residual in Lemma 1 from finite-sample error.
- SPLINCE: under both fitting settings, its difference from LEACE for retrained linear readers is at most 0.009 (Table 8), consistent with the shared kernel.
- Post-hoc orthogonalization [26]: raises the MLP attacker's conditional AUROC relative to raw by 0.066–0.142 (three encoders, Table 8); the authors state that this defense instead increases within-stratum leakage under strong association.
- Nonlinear attackers: neither eraser stops them; after TC-LEACE the logistic attacker is instead slightly stronger (difference 0.018 [0.004, 0.033]), concentrated in the no-pneumothorax stratum (0.651 vs 0.608), where the erasure direction is estimated from only about 100 positives.
- Simulation check (Appendix E): with n=40,000, d=64 Gaussian embeddings, guardedness predicts mean error 0.003 across 27 settings; at n/d≈31 it overestimates by 0.017–0.029, which drops to 0.001–0.003 after adding the measured ε.
What are some points that can be further explored?
The authors list limitations such as single-source medical evidence and linear erasers only; the experiments cover two datasets, seven encoders, and three types of erasers.
Limitations and future directions noted by the authors
- Scope of medical evidence: The evidence published in practice comes only from a single preset attribute pair in CANDID-PTX, and the stratum without pneumothorax has only 34 images with a tube per fold, with only 1 to 9 images for attacker validation, so the conditional attacker can only select by unconditional performance (Section 9.2).
- CelebA attributes are themselves not sensitive and serve only as a proxy (Section 9.2).
- Binary setting and approximation: Only binary task labels and attributes are studied, and the closed-form prediction relies on the equal-variance two-normal approximation (Section 9.2).
- Only linear erasers are evaluated, and no nonlinear eraser for the conditional objective is provided (Section 9.2); Section 9.1 suggests that if nonlinear attackers are in scope, nonlinear erasure for the conditional objective or controls beyond representations (access restrictions, data use agreements) are needed.
- Bootstrap scope: Only reflects uncertainty in the test data (and attribute selection on CelebA), not differences from retraining probes and attackers (Section 9.2).
- TC-LEACE's guarantee is linear protection on the fitted data: The rare stratum of CANDID-PTX has only about 100 positives for estimating the direction, so the guarantee for embeddings outside the fitted data holds only approximately; on CelebA, only 356 of the 1,000 resamples for H4a were valid, and the authors state that the resulting selection bias appears small (Section 9.2).
Scope of experimental coverage
- 7 encoders tested in total (after deduplication): RAD-DINO, BiomedCLIP, DINOv2-base, CLIP ViT-B/32, SigLIP-base, MAE-base, of which DINOv2-base is used for both datasets (Section 6.1).
- Two datasets: CANDID-PTX (19,237 images, a single (W,Z) pair, β≈0.77) and CelebA (85 pairs, |β| 0–0.684); hypothesis tests with Holm correction are performed only on RAD-DINO (CANDID-PTX) and the four CelebA encoders, and the rest are descriptive results (Section 6.5, Appendix C).
- The compared erasers are LEACE and TC-LEACE; SPLINCE and post-hoc orthogonalization are evaluated only in unplanned analyses on CANDID-PTX (Section 6.2, 7).
- The attackers are a combined attacker of logistic regression and a fixed-configuration MLP (linear and nonlinear readers), and the utility probes are linear and MLP; the paper reports no other attack model classes besides these three (Section 6.3).
- The statistical protocol is five-fold cross-validation with 1,000 bootstraps; the paper reports no variance from retraining attackers or probes multiple times (Section 9.2).
Summarize the main content of the paper
The authors show that global concept erasure is incompatible with task-conditioned protection and propose TC-LEACE, which recovers most of the linear utility loss in strongly correlated settings.
A concept erasure paper on the privacy of shared foundation-model embeddings, aimed at settings where medical imaging embeddings are shared by authorized task.
- Problem: global erasure methods such as LEACE provide only population-level linear guardedness. The authors state that when the authorized task W is correlated with the sensitive attribute Z, two failures arise: utility is sacrificed to eliminate inferences that W already permits (imputation), and conditional leakage remains within task strata.
- Theory: the authors prove that when β≠0, global and task-conditional linear guardedness are incompatible while retaining linear task signal (Proposition 1, Eq. 11), and give a closed-form formula predicting the utility cost of global erasure from pre-erasure statistics (Corollary 1).
- Method: TC-LEACE changes the erasure objective to task-conditional—a closed-form affine map of rank at most 2 removes only the mean difference in Z within each task stratum, requires no labels at release, and by design gives up global guardedness and does not cover nonlinear attackers.
- Key result: on CANDID-PTX (RAD-DINO), both population-level audits pass after LEACE, but conditional AUROC is still 0.771; TC-LEACE lowers linear utility loss from 0.176 to 0.042 (a 76% reduction), and the difference in conditional AUROC from LEACE is −0.004, within the margin δT=0.0785 (Table 4).
- Key result: on the 85 CelebA attribute pairs, conditional AUROC after LEACE is 0.860–0.900, retaining 91.5%–97.3% of the original conditional leakage; guardedness predicts cross-group loss with mean error 0.0018–0.0029; TC-LEACE's advantage is concentrated in strongly associated pairs, and H4a does not pass Holm correction on the full set of pairs (Table 5, Figure 6).
- Authors' conclusion: when releasing embeddings for a specific purpose, audits should be conditional and the erasure objective should align with the authorized task; the authors also caution that neither eraser stops nonlinear attackers, and post-hoc orthogonalization instead increases conditional leakage under strong association.