Leveraging Association Context Retrieval in Knowledge Edit- ing to Build White-Box Attacks on LLMs
Organizations: Basic Research of Artificial Intelligence Laboratory · Innopolis University
Abstract
As large language models (LLMs) are granted increasing autonomy, it is essential to investigate methods that can induce unsafe behavior. We propose a novel white-box attack inspired by locate-then-edit approaches from the field of Knowledge Editing. Our choice is motivated by the observation that models edited with such schemes tend to assign unusually high prediction probabilities to the edit target, a property that is particularly advantageous when designing attacks. We modify the editing framework by incorporating as- sociative knowledge retrieved from the model, thereby extending constraint removal to an entire thematic category rather than being limited to prompts from a predefined dataset. Experiments with various archi- tectures demonstrate improved attack effectiveness over competing methods without dealing critical damage to general model performance.
Figures & tables
| Model | Method | Harm. ( ) | Loc. ( ) | Gen. (judge) ( ) | Gen. (guard) ( ) | |||||
|---|---|---|---|---|---|---|---|---|---|---|
| Judge | Guard | Judge | MMLU, % | ARC-C, % | Structure | Semantic | Structure | Semantic | ||
| GPT4ALL-J | Pre-edited | 1.42 0.08 | 0.50 0.03 | 1.00 0.05 | 27.89 0.53 | 25.68 0.61 | 1.39 0.07 | 1.41 0.06 | 0.51 0.03 | 0.48 0.02 |
| ROME | 2.86 0.14 | 0.81 0.04 | 0.82 0.05 | -0.33 0.22 | -0.19 0.27 | 2.04 0.11 | 2.09 0.09 | 0.72 0.04 | 0.73 0.03 | |
| ROME + pref. | 3.02 0.17 | 0.87 0.05 | 0.80 0.04 | -0.31 0.26 | -0.21 0.19 | 2.41 0.12 | 2.38 0.14 | 0.73 0.03 | 0.74 0.04 | |
| MEMIT | 2.98 0.13 | 0.87 0.04 | 0.98 0.05 | -0.09 0.18 | -0.06 0.24 | 2.33 0.14 | 2.39 0.11 | 0.78 0.04 | 0.79 0.05 | |
| MEMIT + pref. | 3.12 0.15 | 0.89 0.05 | 0.98 0.04 | -0.10 0.21 | -0.15 0.28 | 2.37 0.10 | 2.54 0.13 | 0.84 0.05 | 0.82 0.04 | |
| Model | Method | Editing split ( ) | Off-editing split ( ) | Harmfulness ( ) | Locality ( ) | Generalization ( ) | |
|---|---|---|---|---|---|---|---|
| Structural | Semantic | ||||||
| GPT4ALL-J | ROME + pref. | 0.20 | 0.15 | 3.02 | 0.80 | 2.41 | 2.38 |
| MEMIT + pref. | 0.20 | 0.13 | 3.12 | 0.98 | 2.37 | 2.54 | |
| Ref. | 1.00 | 1.00 | 0.00 | 0.00 | 0.00 | 0.00 | |
| Ref. | 0.26 | 0.20 | 2.15 | 0.85 | 2.00 | 1.98 | |
| Ref. | 0.12 | 0.11 | 1.95 | 0.89 | 2.02 | 1.97 | |
Appendix figures & tables1 asset
Supplementary material from the paper’s appendix.
Appendix
| Method | Prefix lengths | Harm. | Loc. | Gen. |
|---|---|---|---|---|
| ROME | [5, 10], [10, 10] | 2.78 | 0.85 | 2.12 |
| [30, 10], [50, 10] | 2.86 | 0.82 | 2.04 | |
| [50, 10], [100, 10] | 2.89 | 0.82 | 2.01 | |
| ROME + pref. | [10, 5] | 2.92 | 0.79 | 2.17 |
| [50, 5] | 2.89 | 0.83 | 2.17 | |
| [100, 5] | 2.94 | 0.77 | 2.13 |
Adversarial Attacks on LLMs
Adversarial attacks on large language models probe how crafted inputs, internal changes, and agent interactions bypass safety or disrupt reliable behavior.
See all 355 papers