Refusal in LLMs is an Affine Function

November 13, 2024 ยท Entered Twilight ยท ๐Ÿ› arXiv.org

๐Ÿ’ค TWILIGHT: Eternal Rest
Repo abandoned since publication

Repo contents: .gitignore, README.md, artifacts, backup_ao.sh, backup_so.sh, caa_behaviors_testing.py, caa_refusal_testing.py, datasets, llama-poking.py, llama3-poking.py, logs, plots, prettify.py, requirements.txt, runs, server.sh, smartcopy.py, steering, test_server.sh, vector-poking.py, vector-var.py

Authors Thomas Marshall, Adam Scherlis, Nora Belrose arXiv ID 2411.09003 Category cs.LG: Machine Learning Cross-listed cs.CL Citations 16 Venue arXiv.org Repository https://github.com/EleutherAI/steering-llama3 โญ 30 Last Checked 6 months ago
Abstract
We propose affine concept editing (ACE) as an approach for steering language models' behavior by intervening directly in activations. We begin with an affine decomposition of model activation vectors and show that prior methods for steering model behavior correspond to subsets of terms of this decomposition. We then provide a derivation of ACE and use it to control refusal behavior on ten different models, including Llama 3 70B. ACE combines affine subspace projection and activation addition to reliably control the model's refusal responses across prompt types. We evaluate the results using LLM-based scoring on a collection of harmful and harmless prompts. Our experiments demonstrate that ACE consistently achieves more precise control over model behavior than existing methods and generalizes to models where directional ablation via affine subspace projection alone produces incoherent outputs. Code for reproducing our results is available at https://github.com/EleutherAI/steering-llama3 .
Community shame:
Not yet rated
Community Contributions

Found the code? Know the venue? Think something is wrong? Let us know!

๐Ÿ“œ Similar Papers

In the same crypt โ€” Machine Learning