Erasing the Wrong Thing: Conditional Attribute Leakage and Concept Erasure in Shared Foundation-Model Embeddings
Organizations: School of Cyber Science and Engineering, Wuhan University · Shanghai Innovation Institute
Abstract
Medical-image embeddings are increasingly shared in place of raw images for authorized downstream tasks, yet they may reveal sensitive attributes. Standard concept-erasure methods target population-level guardedness. However, we prove that, when binary task and sensitive labels are associated, global and task-conditional linear guardedness cannot both hold while a nonzero linear task signal is preserved, so global erasure must either eliminate that signal or retain task-conditional linear leakage. We further show how global erasure affects linear readers' discrimination between positive and negative samples with different sensitive attributes, deriving an approximate closed-form prediction of its utility cost from pre-erasure statistics. Motivated by this conflict, we introduce Task-Conditional LEACE (TC-LEACE), a closed-form variant of LEACE that enforces linear guardedness within each task stratum of its fitting data. We evaluate four vision foundation models on 85 CelebA attribute pairs spanning a broad range of associations. After LEACE, conditional leakage persists across all four encoders, the discrepancy between marginal and conditional audits increases with association strength, and predicted utility costs track observed losses. We then examine hospital chest radiographs using three foundation models, including two biomedical models, in which chest-tube status is strongly associated with diagnosis. Although a marginal attack on LEACE-erased embeddings underperforms a diagnosis-only reference, chest-tube status remains detectable within diagnosis strata. TC-LEACE recovers most of LEACE's linear task-utility loss while keeping task-conditional leakage within a prespecified margin of LEACE's.
Figures & tables
| Party | Access | Objective |
|---|---|---|
| Custodian | Raw data, labels of and , public FM | Release that supports and limits disclosure of beyond |
| Honest recipient | and for training samples | Train a linear or nonlinear model for |
| Attacker | , for a subset of released samples, and where released or under conditional evaluation | Infer for the remaining released samples |
| Evaluation | Measures | Does not measure |
|---|---|---|
| In-sample linear probe | Moment constraint of the eraser on the fitting data | Leakage on new data, nonlinear and within-stratum inference |
| Held-out linear probe | Linear predictability of for the tested probe | Nonlinear and within-stratum inference |
| Unconditional attack | Inferability of from alone | Separation of imputation from leakage |
| Unconditional attack vs. label-only baseline | Conditional leakage, if the attack exceeds the ceiling | Absence of conditional leakage |
| Conditional attack (ours) | Within-stratum inference for the tested attackers | Attackers outside the tested class |
| Model | Train | Select | Evaluate |
|---|---|---|---|
| Eraser | – | – | |
| In-sample probe for | – | ||
| Utility probes for | test fold | ||
| Attackers for | test fold |
| Raw | LEACE | TC-LEACE | |
| Population-level inference (includes imputation) | |||
| Unconditional AUROC | 0.934 | 0.804 | 0.857 |
| [0.922, 0.944] | [0.782, 0.824] | [0.839, 0.873] | |
| Uncond. cond. | 0.064 | 0.033 | 0.091 |
| [0.050, 0.078] | [0.013, 0.054] | [0.072, 0.109] | |
| Conditional leakage (excludes imputation) | |||
| Model | Cond. AUROC | Retention | H2 slope | Diff. |
|---|---|---|---|---|
| CLIP | 0.900 | 96.3% | 0.064 | 0.0029 |
| [0.863, 0.933] | [94.9, 97.4] | [0.017, 0.107] | [0.0010, 0.0055] | |
| DINOv2 | 0.895 | 97.3% | 0.065 | 0.0029 |
| [0.858, 0.926] | [96.6, 97.8] | [0.018, 0.107] | [0.0011, 0.0055] | |
| SigLIP | 0.899 | 95.5% | 0.068 | 0.0028 |
| [0.862, 0.931] | [93.9, 96.8] | [0.018, 0.116] | [0.0010, 0.0055] |
| CANDID-PTX (RAD-DINO) | CelebA (85 pairs, 4 encoders) | |
|---|---|---|
| RQ1 | Both audits pass, yet the conditional AUROC is after LEACE. H1 supported. | Conditional AUROC – after LEACE. H1 supported for all encoders. |
| RQ2 | Unconditional minus conditional AUROC after LEACE and after TC-LEACE . H2 ′ supported. | The difference grows with but averages only . H2 supported. |
| RQ3 | of the linear loss falls on cross-group pairs, and Corollary 1 overestimates this part. H3 not tested (one pair). | The guardedness prediction errs by – , and the MLP probe loses little. H3 holds (multiple pairs). |
| RQ4 | Linear loss falls from 0.176 to 0.042, with conditional AUROC within of LEACE’s. H4 supported . | The cross-group loss falls mainly in the high tertile. H4a fails, and H4b holds . |
Appendix figures & tables1 asset
Supplementary material from the paper’s appendix.
Appendix
Concept Erasure
Concept erasure removes specified knowledge or attributes from models while preserving their ability to perform unrelated tasks.
See all 72 papers