LEACE: Perfect linear concept erasure in closed form

Nora Belrose, David Schneider-Joseph, Shauli Ravfogel, Ryan Cotterell, Edward Raff +1 more
6/1/2023

No official code found. Best implementation: EleutherAI/concept-erasure (269 stars, MIT, last commit 2025-01-27).

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.

View on arXivView PDF

Code Implementations(1)

MIT

Erasing concepts from neural representations with provable guarantees

26917PythonMay 6, 20231 years agoMIT

Similar Papers

Cite this paper

@article{belrose2023leace,
  title  = {LEACE: Perfect linear concept erasure in closed form},
  author = {Nora Belrose and David Schneider-Joseph and Shauli Ravfogel and Ryan Cotterell and Edward Raff and Stella Biderman},
  year   = {2023},
  eprint = {2306.03819},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/pdf/2306.03819},
  journal = {NEURIPS 2023 2023}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2306.03819.svg)](https://codeofpaper.com/paper/2306.03819)

Discussion