Abstract
Large Language Models (LLMs) have achieved success in many fields but are still troubled by problematic content in their training corpora. LLM unlearning aims to reduce the influence of such content and avoid undesirable behaviors. However, existing unlearning methods remain vulnerable to adversarial queries, where unlearned knowledge resurfaces through manually designed or automated attacks. As part of a red-team effort to proactively assess the vulnerabilities of unlearned models, we design Dynamic Unlearning Attack (DUA), a dynamic and automated framework to attack these models and evaluate their robustness. It optimizes adversarial suffixes to reintroduce the unlearned knowledge in various scenarios. We find that unlearned knowledge can be recovered in 55.2% of the questions, even without revealing the unlearned model's parameters. In response to this vulnerability, we propose Latent Adversarial Unlearning (LAU), a universal framework that effectively enhances the robustness of the unlearned process. It formulates the unlearning process as a min-max optimization problem and resolves it through two stages: an attack stage, where perturbation vectors are trained and added to the latent space of LLMs to recover the unlearned knowledge, and a defense stage, where previously trained perturbation vectors are used to enhance the unlearned model's robustness. With our LAU framework, we obtain two robust unlearning methods, AdvGA and AdvNPO. We conduct extensive experiments across multiple unlearning benchmarks and various models, demonstrating that they improve unlearning effectiveness by over 53.5%, cause less than an 11.6% reduction in neighboring knowledge, and have almost no impact on the model's general capabilities.
Introduction
As LLMs are trained on massive, uncurated internet datasets, they inevitably memorize undesirable content, including copyrighted materials, personally identifiable information (PII), and toxic text. "Machine unlearning" seeks to selectively erase this specific knowledge—such as making a model forget the author of a specific book series—without the prohibitive cost of retraining from scratch.
However, current unlearning techniques, such as Gradient Ascent, often prove superficial. While a model may refuse a direct query, it may still reveal the information when presented with a cleverly phrased adversarial prompt (e.g., "Who created the magical world that includes Diagon Alley?"). This vulnerability highlights a critical need for both robust evaluation frameworks and more resilient unlearning algorithms that can withstand automated red-teaming efforts.
Methodology
Dynamic Unlearning Attack (DUA)
To systematically measure the vulnerability of unlearned models, we introduce DUA. This automated framework uses gradient-based optimization to discover universal "adversarial suffixes"—strings of tokens that, when appended to a query, maximize the likelihood of the model outputting the forgotten knowledge. This approach moves beyond manual "jailbreaking" to a scalable, automated red-teaming process that can be applied even in black-box scenarios where the attacker does not have access to the unlearned model's weights.
Latent Adversarial Unlearning (LAU)
To improve defense, we propose LAU. Traditional adversarial training in the discrete token space is computationally expensive and difficult to optimize. LAU instead injects continuous perturbation vectors directly into the LLM's latent space (the hidden layers or residual streams) during the unlearning process.
This min-max optimization framework ensures the model remains robust even when internal representations are perturbed to favor the forgotten knowledge. We apply LAU to two standard algorithms, creating robust variants: AdvGA (Adversarial Gradient Ascent) and AdvNPO (Adversarial Negative Preference Optimization).
Experimental Results
Vulnerability of Standard Unlearning
Our DUA framework successfully recovered unlearned knowledge in 55.2% of test cases across standard benchmarks like RWKU and MUSE. Notably, adversarial suffixes trained on the original model transferred effectively to unlearned versions, proving that standard unlearning methods are highly fragile.
Robustness and Utility Preservation
The LAU-augmented methods significantly outperformed vanilla counterparts. AdvNPO improved unlearning effectiveness by over 53.5% on the LLaMA-3-8B-Instruct model compared to standard NPO. A key challenge in unlearning is avoiding "catastrophic forgetting" of related but valid knowledge; AdvNPO demonstrated superior precision, causing less than an 11.6% reduction in neighboring knowledge. Furthermore, general model capabilities in reasoning, fluency, and truthfulness remained virtually unchanged, indicating that LAU provides a surgical yet robust erasure of targeted information.
Conclusion
Current machine unlearning methods are fragile against adversarial manipulation. By shifting the adversarial "battleground" from the discrete input space to the continuous latent space, our LAU framework provides a computationally efficient and highly effective defense. The resulting models are not only harder to "jailbreak" but also maintain the high utility and general knowledge expected of modern LLMs. Future work will explore automating layer selection for perturbations and extending these techniques to multimodal architectures.
Summary updated