Share your thoughts, 1 month free Claude Pro on usSee more
WorkDL logo mark

LEACE: Perfect linear concept erasure in closed form

About

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.

Nora Belrose, David Schneider-Joseph, Shauli Ravfogel, Ryan Cotterell, Edward Raff, Stella Biderman• 2023

Related benchmarks

TaskDatasetResultRank
Language ModelingThe Pile (val)
Perplexity (bits/byte)2.25
55
Concept Erasure39 NLP settings (13 LLMs x 3 concepts: sycophancy, gender, safety)
Mean Residual Leakage |DS|19
40
Language ModelingRedPajama LLaMA pretraining corpus (evaluation slice)
Perplexity (bits/byte)1.73
15
Concept ErasureNLP Concept Erasure DY ≤ 1pp
Leakage18.3
9
Concept ErasureNLP Concept Erasure DY ≤ 3pp
Leakage18.6
9
Concept ErasureNLP Concept Erasure DY ≤ 5pp
Leakage18.6
9
Concept ErasureNLP Concept Erasure DY ≤ 10pp
Leakage18.6
9
Showing 7 of 7 rows

Other info

Code

Follow for update