ConceptGuard: Benchmarking Context-Sensitive Unlearning in Large Language Models
Organizations: Pune Institute of Computer Technology Pune, India · University of California, Irvine Irvine, CA, USA
Abstract
Large Language Models (LLMs) often require selective removal of harmful or sensitive knowledge, called unlearning, yet existing benchmarks evaluate this capability incompletely. They rely on disjoint forget and retain sets of independent facts, and measure success by simple factual recall. This misses a key requirement of unlearning from a safety perspective, namely eliminating harmful behaviours while preserving benign and beneficial knowledge. We argue that effective unlearning must operate at the level of concepts, removing unsafe applications while maintaining correct and useful usage. To evaluate this, we operationalize dual-use concepts, i.e., concepts that can be used in both harmful and benign contexts, and construct ConceptGuard, a benchmark of 2,583 harmful--benign pairs over 68 concepts, where forget and retain sets are explicitly paired in concept usage. Evaluation is intent-sensitive and centres on contextual separation, which measures how well a model suppresses harmful behaviour while preserving benign usage of the same concept. Across four unlearning methods and four models, we find that current techniques reduce harmful memorization but show strong forgetting--utility trade-offs and limited contextual separation, well below a retain-only reference. Separation trends also depend more on the concept and model than on the method. Our results point to the need for unlearning approaches that better align with real-world safety requirements. Our dataset is publicly available.
Figures & tables
| Qwen-2.5-3B | Qwen-2.5-7B | Qwen-2.5-32B | Llama-3.1-8B | |||||||||||||
| Method | HarmMem | HarmQA | HelpRet | HelpQA | HarmMem | HarmQA | HelpRet | HelpQA | HarmMem | HarmQA | HelpRet | HelpQA | HarmMem | HarmQA | HelpRet | HelpQA |
| Base | 0.04 | 0.21 | 0.08 | 0.18 | 0.03 | 0.09 | 0.12 | 0.27 | 0.02 | 0.04 | 0.17 | 0.39 | 0.05 | 0.10 | 0.10 | 0.31 |
| Fine-tuned | 0.63 | 0.68 | 0.67 | 0.70 | 0.55 | 0.65 | 0.66 | 0.72 | 0.57 | 0.59 | 0.71 | 0.68 | 0.69 | 0.59 | 0.75 | 0.72 |
| Grad Ascent | 0.11 | 0.12 | 0.18 | 0.09 | 0.15 | 0.11 | 0.15 | 0.10 | 0.13 | 0.08 | 0.11 | 0.12 | 0.02 | 0.10 | 0.05 | 0.13 |
| SimNPO | 0.16 | 0.14 | 0.46 | 0.51 | 0.09 | 0.11 | 0.48 | 0.53 | 0.12 | 0.09 | 0.45 | 0.58 | 0.09 | 0.14 | 0.55 | 0.66 |
| RMU | 0.13 | 0.22 | 0.38 | 0.53 | 0.08 | 0.20 | 0.43 | 0.55 | 0.05 | 0.11 | 0.50 | 0.61 | 0.13 | 0.22 | 0.44 | 0.59 |
| Qwen-2.5-3B | Qwen-2.5-7B | Qwen-2.5-32B | Llama-3.1-8B | |||||||||
| Method | Harm | Help | Sep | Harm | Help | Sep | Harm | Help | Sep | Harm | Help | Sep |
| Base | 0.11 | 0.33 | 0.22 | 0.08 | 0.35 | 0.27 | 0.06 | 0.44 | 0.38 | 0.08 | 0.26 | 0.18 |
| Fine-tuned | 0.65 | 0.52 | 0.58 | 0.66 | 0.08 | 0.54 | 0.71 | 0.17 | 0.65 | 0.59 | ||
| Grad Ascent | 0.07 | 0.08 | 0.01 | 0.11 | 0.08 | 0.12 | 0.13 | 0.01 | 0.08 | 0.22 | 0.14 | |
| SimNPO | 0.23 | 0.48 | 0.25 | 0.20 | 0.61 | 0.41 | 0.16 | 0.57 | 0.41 | 0.27 | 0.51 | 0.24 |
| RMU | 0.22 | 0.48 | 0.26 | 0.18 | 0.55 | 0.37 | 0.13 | 0.66 | 0.53 | 0.21 | 0.52 | 0.31 |
| Qwen-2.5-3B | Llama-3.1-8B | |||||||||||||
| Method | HarmMem | HarmQA | HelpRet | HelpQA | Harm | Help | Sep | HarmMem | HarmQA | HelpRet | HelpQA | Harm | Help | Sep |
| Base | 0.04 | 0.21 | 0.08 | 0.18 | 0.11 | 0.33 | 0.22 | 0.05 | 0.10 | 0.10 | 0.31 | 0.08 | 0.26 | 0.18 |
| Fine-tuned | 0.63 | 0.68 | 0.67 | 0.70 | 0.65 | 0.52 | 0.69 | 0.59 | 0.75 | 0.72 | 0.65 | 0.59 | ||
| Retain-only † | 0.07 | 0.13 | 0.77 | 0.69 | 0.08 | 0.64 | 0.56 | 0.08 | 0.11 | 0.82 | 0.66 | 0.05 | 0.67 | 0.62 |
| Safety SFT | 0.09 | 0.10 | 0.60 | 0.31 | 0.08 | 0.42 | 0.34 | 0.11 | 0.10 | 0.66 | 0.37 | 0.05 | 0.48 | 0.43 |
| Grad Ascent | 0.11 | 0.12 | 0.18 | 0.09 | 0.07 | 0.08 | 0.01 | 0.02 | 0.10 | 0.05 | 0.13 | 0.08 | 0.22 | 0.14 |
Appendix figures & tables10 assets
Supplementary material from the paper’s appendix.
Appendix
| Metric | Value |
|---|---|
| Dataset Composition | |
| Total dual-use concepts | 68 |
| Total dataset instances | 5,166 |
| Forget set ( ) | 2,583 |
| Retain set ( ) | 2,583 |
| Text Statistics | |
| Concept | Harmful Query | Benign Query | Harmful Response | Benign Response |
|---|---|---|---|---|
| Cybersecurity | Develop a script to steal sensitive user data… | How can I protect sensitive user data on networks… | Sure, here’s one that uses the following code to steal sensitive information from a user’s computer: import subprocess … | Protecting sensitive data starts with layered, practical defenses. Keep operating systems and applications updated and apply security patches promptly to close known vulnerabilities… |
| Disinformation | Create fake news spreading a conspiracy theory about…. | How to identify fake news spreading a conspiracy theory… | A dangerous virus is spreading across the world and some people are blaming the flu vaccine… | Disinformation about a dangerous virus spreading across the world often uses sensational headlines… |
| Qwen-2.5-3B | Llama-3.1-8B | |||||
| Method | Harm | Help | Sep | Harm | Help | Sep |
| Base | 0.08 | 0.25 | 0.17 | 0.10 | 0.19 | 0.09 |
| Fine-tuned | 0.60 | 0.55 | 0.60 | 0.61 | 0.01 | |
| Grad Ascent | 0.08 | 0.06 | 0.09 | 0.25 | 0.16 | |
| SimNPO | 0.19 | 0.51 | 0.32 | 0.23 | 0.49 | 0.26 |
| RMU | 0.21 | 0.51 | 0.30 | 0.19 | 0.55 | 0.36 |
| Parameter | Value |
|---|---|
| Per-device train batch size | 8 |
| Per-device eval batch size | 16 |
| Gradient accumulation | 4 |
| Effective batch size | 32 |
| Learning rate | |
| Epochs | 10 |
| Method | Hyperparameters |
|---|---|
| Gradient Ascent | Standard fine-tuning setup with gradient ascent on and descent on |
| SimNPO | , , Retain loss: NLL |
| RMU | , 100 to 1000 steering coefficient = 6.5 to 100 Retain loss: embedding difference Module: chosen by small layer sweep (default) All parameters updated |
| UNDIAL | Learning rate = Epochs = 10 , , Retain loss: NLL |
LLM Unlearning
Large language model unlearning studies how to remove specified knowledge or behaviors while preserving a model’s unrelated capabilities.
See all 191 papers