Erasing the Wrong Thing: Conditional Attribute Leakage and Concept Erasure in Shared Foundation-Model Embeddings

Haijun He, Fei Li, Donghong Ji, Junjun HearXiv 2026 · arXiv

TL;DR

Standard concept erasure methods for foundation model embeddings often "erase the wrong thing" by targeting population-level statistics, which can destroy authorized task signals while failing to prevent sensitive attribute leakage within specific task groups. This paper introduces TC-LEACE, a task-conditional erasure method that preserves utility by protecting sensitive information only where it exceeds what the authorized task already reveals.

What Problem Does This Paper Address?

Sharing precomputed image embeddings (from models like CLIP or DINOv2) is a common way to enable collaborative research without the massive overhead of sharing raw images. However, these embeddings are "privacy-leaky"—they often contain information about sensitive attributes (e.g., a patient's race or treatment history) that are unrelated to the authorized task (e.g., diagnosing a disease).

Existing "concept erasure" methods like LEACE (Least-squares Concept Erasure) attempt to solve this by making the sensitive attribute linearly un-predictable across the entire population. The authors identify two major failure modes in this "global" approach when the authorized task ($W$) and the sensitive attribute ($Z$) are statistically associated:

  1. Utility Loss: Global erasure removes directions that predict $W$ simply because they are correlated with $Z$, even if that information is "permitted" by the task itself.
  2. Residual Conditional Leakage: Even if $Z$ is un-predictable globally, it may remain highly decodable among samples that share the same task label. For example, in a medical dataset, an eraser might make "chest tube status" un-predictable overall, but a simple linear probe could still detect it perfectly if it only looks at patients already diagnosed with "pneumothorax."

Methods

The authors propose Task-Conditional LEACE (TC-LEACE). While standard LEACE applies a single global projection to equalize the means of sensitive groups, TC-LEACE is more surgical.

  • The Core Idea: Instead of erasing the global association, TC-LEACE identifies the sensitive attribute's signal within each task stratum (e.g., the signal for $Z$ among samples where $W=0$ and the signal among samples where $W=1$).
  • The Algorithm: It estimates within-stratum cross-covariances and applies a unified post-hoc affine transformation. This removes the "within-label" sensitive signal while intentionally allowing the "W-mediated" component—the part of the sensitive attribute that is naturally revealed by the task label itself (imputation).
  • Post-hoc & Efficient: Like its predecessor, TC-LEACE is a closed-form solution that doesn't require retraining the foundation model. It can be fitted once by a data custodian and applied to all shared embeddings with $O(d)$ cost per embedding.
Figure 1. Two-dimensional toy example of global and task-conditional erasure, with W associated with Z. (a) The global Z direction combines a W- mediated component along the task direction with a within-label component built from c0 and c1 (Eq. (10)), and the arrows indicate directions only. (b) LEACE removes the global direction, so the Z groups have equal means and a fitted linear probe for Z is constant. Z remains ordered within each label, and the task labels overlap (shaded) only where samples with W = 1, Z = 1 meet samples with W = 0, Z = 0, the cross-group pairs of Section 4.1. (c) Task-conditional erasure removes only the within-label direction, so the task labels stay separated and Z is inferable only through W. Panels (b) and (c) plot the single remaining coordinate, with one row per task label and vertical jitter.

Datasets

The researchers evaluated their approach on two distinct types of data:

  • CelebA: A large-scale face dataset. They analyzed 85 different attribute pairs (e.g., using "Smiling" as the task and "High Cheekbones" as the sensitive attribute) to see how erasure performance scales with different levels of statistical association.
  • CANDID-PTX: A medical dataset of chest radiographs. The authorized task ($W$) was pneumothorax detection, and the sensitive attribute ($Z$) was the presence of a chest tube. This pair has a strong clinical association, making it a perfect "real-world" test case for conditional leakage.

Key Insights and Ideas

  • The Incompatibility Proof: The authors mathematically prove that if a task and a sensitive attribute are associated, you cannot achieve both global and task-conditional linear guardedness while preserving a useful task signal. Global erasure is fundamentally at odds with conditional privacy.
  • Audits are Misleading: Standard privacy audits (checking if a linear probe is "at chance" on the whole dataset) can pass a release that still contains significant sensitive information within task groups. The authors argue for conditional audits as the new gold standard.
  • Utility Cost is Predictable: The paper derives a closed-form prediction for the utility cost of global erasure based on pre-erasure statistics. They show that the loss concentrates on "cross-group" pairs—comparisons between samples where the task and sensitive labels don't match the population-level association.
The TC-LEACE pipeline: fitting the map on labeled data, applying it to embeddings, and releasing them to recipients and potential attackers.

Key Results

  • Medical Case Study (CANDID-PTX): Standard LEACE caused a massive 17.6% drop in linear task utility. TC-LEACE recovered most of this, reducing the loss to just 4.2%, all while keeping conditional leakage at the same level as LEACE.
  • CelebA Generality: Across 85 attribute pairs, TC-LEACE consistently outperformed LEACE in utility, especially for strongly associated pairs.
  • Conditional Leakage Persistence: The study found that conditional leakage persists across all four tested vision foundation models (CLIP, DINOv2, SigLIP, MAE) after standard global erasure, highlighting a systemic vulnerability in current defense practices.

Limitations and Future Work

  • Linearity: Both LEACE and TC-LEACE primarily target linear attackers. While the authors evaluate non-linear MLP attackers, the mathematical guarantees only hold for linear probes. Developing non-linear conditional erasers remains an open challenge.
  • Binary Constraints: The current framework is designed for binary tasks and binary sensitive attributes. Extending this to multi-class or continuous variables would increase its practical utility.
  • Label Requirements: TC-LEACE requires joint labels for both the task and the sensitive attribute during the fitting phase, which might not always be available to the data custodian.

Summary updated

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.
BibTeX
@misc{he2026erasing,
  author = {Haijun He and Fei Li and Donghong Ji and Junjun He},
  title = {{Erasing the Wrong Thing: Conditional Attribute Leakage and Concept Erasure in Shared Foundation-Model Embeddings}},
  year = {2026},
  eprint = {2611.25640},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2611.25640},
}
Figure