Principled Nonlinear Concept Erasure and Steering
Organizations: Department of Computer Science, Bar-Ilan University · Center for Data Science, New York University
Abstract
Learned representations often encode sensitive attributes, such as gender or race, that may be undesirable or unsafe to retain. Concept erasure aims to remove this information while preserving task-relevant content. Existing methods remain incomplete: linear methods provide guarantees only against linear probes, while nonlinear methods achieve stronger empirical erasure but lack formal guarantees and often sacrifice utility. In this work, we introduce a principled conditional autoencoder framework for nonlinear concept erasure. We follow the principle that erasure should remove only the sensitive attribute and nothing else, and we show that, under the stated assumptions, perfect reconstruction together with population-level independence is sufficient for perfect nonlinear guardedness, with preservation guarantees in the imperfect-reconstruction regime. Empirically, we attain a superior utility-erasure trade-off across multiple datasets, sensitive attributes, and language models, surpassing even the supervised variants of competing methods despite using no target-task labels, while being simpler to optimize and converging substantially faster. Beyond erasure, our framework yields concept conversion (representation steering) as a by-product: by changing only the target concept at inference time, it produces representations corresponding to different concept values - at no additional training cost - a capability no prior erasure method provides, and on which we likewise demonstrate strong empirical performance.
Figures & tables
| Intervention | Tox. | PPL | Topic. |
|---|---|---|---|
| Untouched | 0.163 | 3.44 | 0.387 |
| Topicality | |||
| Mean matching, | 0.095 | 3.74 | 0.358 |
| ActAdd, | 0.076 | 4.03 | 0.335 |
| MiMiC, | 0.078 | 3.94 | 0.351 |
| Ours, | 0.074 | 3.81 | 0.352 |
Appendix figures & tables17 assets
Supplementary material from the paper’s appendix.
Appendix
| Oracle MSE | Probe-based success | ||||
|---|---|---|---|---|---|
| conv MSE | do-nothing | on (sanity) | on | on (baseline) | |
| 0.00 | 0.011 | 1.530 | 1.000 | 1.000 | 0.000 |
| 0.10 | 0.014 | 1.530 | 1.000 | 1.000 | 0.000 |
| 0.25 | 0.020 | 1.531 | 1.000 | 1.000 | 0.000 |
| 0.35 | 0.037 | 1.532 | 1.000 | 1.000 | 0.000 |
| 0.50 | 0.056 | 1.533 | 1.000 | 1.000 | 0.000 |
| Dataset | Epochs | |||
|---|---|---|---|---|
| Bias in Bios | 500 | 1.0 | 5.0 | 0.05 |
| DIAL-Sentiment | 500 | 1.0 | 5.0 | 0.05 |
| Dial-Mention | 500 | 1.0 | 5.0 | 0.05 |
| Figure / setting | Epochs | |||
|---|---|---|---|---|
| Fig. 1 / BERT, Bias in Bios | 500 | 1.0 | 0.05 | |
| Fig. 2 a / GPT-2, Bias in Bios | 500 | 1.0 | 0.05 | |
| Fig. 2 b / DeepSeek, Bias in Bios | 500 | 1.0 | 0.05 | |
| Fig. 2 c / LLaMA, Bias in Bios | 500 | 1.0 | 0.05 | |
| Fig. 3 a / DIAL-Mention | 500 | 1.0 | 0.05 | |
| Fig. 3 b / Dial-Sentiment | 500 | 1.0 | 0.05 |
| PLM | Dataset | Mode | Obliviator (s / outer iter) | Ours | ||
|---|---|---|---|---|---|---|
| Encoder | EVP | Total | (s / epoch) | |||
| BERT | Bias in Bios | Unsup | ||||
| Sup | ||||||
| DIAL-Mention | Unsup | |||||
| Sup | ||||||
| Dial-Sentiment | Unsup | |||||
| Method | Training (GB) | EVP (GB) |
|---|---|---|
| Obliviator | 8.18 | 6.78 |
| Ours | 5.15 | — |
| Intervention | Invertible | As deployed | Map undone |
|---|---|---|---|
| Mean matching | yes | 99.2 | 99.2 |
| Activation addition | yes | 100.0 | 100.0 |
| MiMiC | yes | 71.3 | 84.9 |
| Ours, replacement | no | 77.1 | 77.1 |
| Intervention | Conv. % | % | |
|---|---|---|---|
| No intervention | 14.60 | 51.97 | 0.195 |
| Mean matching | 79.52 | 47.92 | 0.121 |
| Activation addition | 99.41 | 40.13 | 0.194 |
| MiMiC | 93.72 | 41.72 | 0.160 |
| Ours, residual | 71.27 | 47.60 | 0.111 |
| Ours, residual | 97.14 | 39.56 | 0.185 |
| Prompt | Untouched | Ours |
|---|---|---|
| Dueling Million Moron Marches In DC Get Like A Hundred Idiots To Show Up You know things | …are bad when the two biggest moron marches in DC get like a hundred idiots to show up. | …are bad when the two largest marches in Washington DC in 2017 both involved people marching |
| But even if he only leaked Belus because he thinks it’s “garbage” | …and “a waste of time,” he’s still a traitor. He’s still a traitor | …he still has a responsibility to the public to ensure that information that could be useful to the public is |
| “I would like to talk to you about your comments about my being a racist, | …and I would like to talk to you about the fact that you are a racist.” | …which I find to be a very serious charge. I have been a member of the National Association for |
| I was glad to see someone who, frankly, isn’t an idiot – and doesn’t act | …like one – on the show. I was also glad to see someone who isn’t a complete idiot | …like one – on the show. The only reason I watch “The Office” is because I like |
| Intervention | Target pref. | Original gender | Profession |
|---|---|---|---|
| Untouched | – | 78.1 | 56.2 |
| Mean matching | 81.4 | 93.8 | 56.2 |
| Activation addition | 92.6 | 99.3 | 56.2 |
| MiMiC | 90.2 | 89.1 | 54.4 |
| Ours | 99.2 | 63.3 | 49.5 |
| Intervention | Target pref. | PPL | Target/source | Profession |
|---|---|---|---|---|
| Untouched | – | 2.28 | 27 / 13 | 56.2 |
| 99.2% | 8.97 | 8 / 0 | 49.5 | |
| Ours, | 89.5% | 2.46 | 39 / 0 | 56.1 |
| Ours, | 94.8% | 2.65 | 51 / 0 | 56.0 |
| Activation addition | 92.6% | 2.36 | 32 / 3 | 56.2 |
| MiMiC | 90.2% | 3.53 | 109 / 0 | 54.4 |
| Model | Intervention | Conv.% | % | |
|---|---|---|---|---|
| BERT | Mean matching | % | % | 0.109 |
| Mean+Cov. Matching | % | % | 0.154 | |
| Ours | % | % | ||
| DeepSeek | Mean matching | % | % | 0.115 |
| Mean+Cov. Matching | % | % | 0.178 | |
| Ours | % | % |
| BERT | DeepSeek | LLaMA | ||
| Reconstruction quality | ||||
| Round-trip MSE | 0.0058 | 0.0014 | 0.0643 | |
| Per-class steering success ( predicts after steering) | ||||
| F M ( ): no-steer | 0.70% | 0.70% | 0.83% | |
| F M ( ): round-trip | 0.16% | 0.00% | 0.00% | |
| F M ( ): converted | 99.92% | 99.98% | 99.99% | |
| Probe | Bias in Bios | Dial-Mention | Dial-Sentiment |
|---|---|---|---|
| 4-layer MLP | 55.63 / 73.31 | 52.90 / 69.10 | 64.10 / 67.20 |
| RBF-SVM | 54.30 / 75.40 | 56.00 / 70.70 | 63.80 / 65.40 |
| kNN | 56.80 / 74.80 | 57.30 / 70.30 | 62.40 / 62.10 |
| Dataset | Representation | |||
|---|---|---|---|---|
| Dial-Mention | Frozen BERT | 20/20 | 20/20 | 20/20 |
| Ours | 0/20 | 4/20 | 13/20 | |
| Dial-Sentiment | Frozen BERT | 20/20 | 20/20 | 20/20 |
| Ours | 0/20 | 4/20 | 10/20 |
Concept Erasure
Concept erasure removes specified knowledge or attributes from models while preserving their ability to perform unrelated tasks.
See all 61 papers