Skip to main content
QUICK REVIEW

[Paper Review] LEACE: Perfect linear concept erasure in closed form

Nora Belrose, David Schneider-Joseph|arXiv (Cornell University)|Jun 6, 2023
Topic ModelingComputer Science12 citations
TL;DR

LEACE provides a closed-form, least-squares method to erase a target concept so that all linear classifiers fail to detect it, while preserving the data representation as much as possible; it is extended to deep networks via concept scrubbing and evaluated on gender bias and POS information in language models.

ABSTRACT

Concept erasure aims to remove specified features from an embedding. It can improve fairness (e.g. preventing a classifier from using gender or race) and interpretability (e.g. removing a concept to observe changes in model behavior). We introduce LEAst-squares Concept Erasure (LEACE), a closed-form method which provably prevents all linear classifiers from detecting a concept while changing the embedding as little as possible, as measured by a broad class of norms. We apply LEACE to large language models with a novel procedure called "concept scrubbing," which erases target concept information from every layer in the network. We demonstrate our method on two tasks: measuring the reliance of language models on part-of-speech information, and reducing gender bias in BERT embeddings. Code is available at https://github.com/EleutherAI/concept-erasure.

Motivation & Objective

  • Motivate concept erasure for fairness and interpretability by removing information about a target concept from representations.
  • Develop a closed-form erasure operator that guarantees linear guardedness while preserving representation quality.
  • Extend erasure to deep networks via sequential layer-wise application (concept scrubbing) and evaluate on bias and linguistic information.
  • Provide theoretical guarantees linking linear guardedness to zero cross-covariance and equal class centroids.
  • Offer practical, efficient comparisons to prior methods in intrinsic and downstream tasks.

Proposed method

  • Define linear guardedness and show equivalence to equal class centroids and zero cross-covariance under linear predictors.
  • Derive LEAst-squares Concept Erasure (LEACE) as the affine transform that minimizes mean-squared change to X subject to Cov(PX+ b, Z)=0.
  • Show LEACE is the unique eraser that minimizes norms induced by inner products (e.g., Euclidean, Mahalanobis).
  • Characterize LEACE as r_LEACE(x)= x − W^+ P_{W Σ_{XZ}} W (x − E[X]), with whitening W and projection onto colsp(W Σ_{XZ}).
  • Extend to uncentered X by deriving optimal bias b* and combining into the final LEACE form.
  • Introduce concept scrubbing to apply LEACE sequentially across layers in deep networks.
Figure 1: LEACE projection in 3 steps. First the data is whitened, ensuring equal variance in all directions. It is then orthogonally projected onto $\mathrm{colsp}(\mathbf{W}\mathbf{\Sigma}_{{\mathrm{X}}{\mathrm{Z}}})^{\perp}$ , guaranteeing linear guardedness. Finally, we unwhiten the data so that
Figure 1: LEACE projection in 3 steps. First the data is whitened, ensuring equal variance in all directions. It is then orthogonally projected onto $\mathrm{colsp}(\mathbf{W}\mathbf{\Sigma}_{{\mathrm{X}}{\mathrm{Z}}})^{\perp}$ , guaranteeing linear guardedness. Finally, we unwhiten the data so that

Experimental results

Research questions

  • RQ1Can a closed-form affine transformation erase a target concept while ensuring linear guardedness for all linear predictors?
  • RQ2What is the least disruptive erasure operator (in common norms) that achieves linear guardedness?
  • RQ3Does applying LEACE layer-by-layer in deep networks (concept scrubbing) effectively erase concept information with minimal collateral impact on downstream tasks?
  • RQ4How does LEACE compare to prior methods (e.g., SAL, Mean Projection, Fair PCA, RLACE, INLP) in erasing gender bias and preserving task performance?
  • RQ5Can LEACE be extended to continuous targets Z and non-centering cases with equivalent optimal erasures?

Key findings

  • LEACE achieves random gender prediction in a frozen BERT last-layer representation with a small mean-squared edit, outperforming RLACE in erasure quality and speed.
  • Concept scrubbing with LEACE preserves main task performance while reducing bias, e.g., profession-prediction accuracy remains high with substantially reduced TPR-GAP bias (0.198 to 0.084).
  • After erasure, re-fitting the main-task classifier yields slight accuracy changes (e.g., 77.3% to 78.1%), with notable reductions in bias across protected attributes.
  • LEACE is up to ~100× faster than gradient-based RLACE in intrinsic gender-erasure experiments, and outperforms INLP in achieving near-random erasure.
  • Theoretical results establish equivalences among linear guardedness, equal class centroids, zero cross-covariance, and parity across Z, enabling a principled erasure construction.
(a)
(a)

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.