Skip to content

SafeLLM: Forgetting harmful outputs of large language models to defend against jailbreak attacksSafeLLM: Unlearning Harmful Outputs from Large Language Models against Jailbreak Attacks

arXiv· arXiv:2508.15182· Xiangman Li, Xiaodong Wu, Qi Li, Jianbing Ni, Rongxing Lu·Indexed by this site · 26 days ago· Originally publishedDefenses
AI summary

Researchers propose SafeLLM, a forgetting-based defense framework that removes harmful knowledge from large language models to defend against jailbreak attacks. The framework has three stages: it combines an external classifier with internal model evaluation to detect unsafe outputs, locates harmful content via FFN activations, and then suppresses unsafe behavior through constrained optimization, achieving targeted and irreversible forgetting. In multi-jailbreak benchmark experiments on Vicuna, LLaMA, and GPT-J, SafeLLM substantially reduces attack success rates while maintaining general performance, and its safety is superior to supervised fine-tuning and DPO.

Read originalarxiv.org