Lune

ACL Findings2024

Making Harmful Behaviors Unlearnable for Large Language Models

Xin Zhou, Yi Lu, Ruotian Ma, Yujian Wei, Tao Gui, Qi Zhang, Xuanjing Huang

Abstract

Large language models (LLMs) have shown great potential to empower various domains and are often customized by fine-tuning for the requirements of different applications. However, the powerful learning ability of LLMs not only enables them to learn new tasks but also makes them vulnerable to learning undesired behaviors, such as harmfulness and hallucination, as the fine-tuning data often implicitly or explicitly contains such content. Can we fine-tune LLMs on harmful data without learning harmful behaviors? This paper proposes a controllable training framework to make undesired behaviors unlearnable during the finetuning process. Specifically, we introduce security vectors to control the model's behavior and make it consistent with the undesired behavior. Security vectors are activated during fine-tuning, the consistent behavior makes the model believe that such behavior has already been learned and there is no need for further optimization, while inconsistent data can still be learned. After fine-tuning, security vectors are deactivated to restore the LLM's normal behavior. Our experiments show that the security vectors can prevent LLM from learning harmful and hallucination behavior while preserving the ability to learn other information. Warning: This paper may contain offensive content.

Ask Lune

Know this paper in minutes, not an afternoon.

Lune can read every page of it and the top-tier papers that cite it, and gives you its claims, its evidence and its limits, each one cited to the paper it comes from. No skimming, no AI slop.

11 top-tier papers have cited it since. Know what they found before your reviewers do.

Questions to start from

Lune can draw on

the full paper · the top-tier papers that cite it · related work

Get the answer

Free to start. No credit card required.

Lineage

  • Self-Destructive Language Models cites LoRA: Low-Rank Adaptation of Large Language Models
  • Self-Destructive Language Models cites Measuring Massive Multitask Language Understanding
  • Self-Destructive Language Models cites Covert Malicious Finetuning: Challenges in Safeguarding LLM Adaptation
  • Self-Destructive Language Models cites Representation Noising: A Defence Mechanism Against Harmful Finetuning
  • Self-Destructive Language Models cites Training language models to follow instructions with human feedback
  • Safety Alignment via Constrained Knowledge Unlearning cites Training language models to follow instructions with human feedback
  • TruthfulQA: Measuring How Models Mimic Human Falsehoods cites Measuring Massive Multitask Language Understanding
  • TruthfulQA: Measuring How Models Mimic Human Falsehoods cites Training language models to follow instructions with human feedback
  • Training language models to follow instructions with human feedback cites TruthfulQA: Measuring How Models Mimic Human Falsehoods
  • Covert Malicious Finetuning: Challenges in Safeguarding LLM Adaptation cites Training language models to follow instructions with human feedback
  • Representation Noising: A Defence Mechanism Against Harmful Finetuning cites LoRA: Low-Rank Adaptation of Large Language Models
  • Representation Noising: A Defence Mechanism Against Harmful Finetuning cites Measuring Massive Multitask Language Understanding
  • Representation Noising: A Defence Mechanism Against Harmful Finetuning cites TruthfulQA: Measuring How Models Mimic Human Falsehoods
  • Panacea: Mitigating Harmful Fine-tuning for Large Language Models via Post-fine-tuning Perturbation cites Covert Malicious Finetuning: Challenges in Safeguarding LLM Adaptation
  • Panacea: Mitigating Harmful Fine-tuning for Large Language Models via Post-fine-tuning Perturbation cites Training language models to follow instructions with human feedback
  • Training language models to follow instructions with human feedback cites Extracting Training Data from Large Language Models
Builds onCited byLeft to right by year; the more cited, the higher.

Cited by top-tier papers11

  1. Representation Noising: A Defence Mechanism Against Harmful FinetuningDomenic Rosati, Jan Wehner, Kai Williams, Lukasz Bartoszcze et al.NeurIPS 2024 · 107 citations
  2. Covert Malicious Finetuning: Challenges in Safeguarding LLM AdaptationDanny Halawi, Alexander Wei, Eric Wallace, Tony Tong Wang et al.ICML 2024 · 77 citations
  3. Panacea: Mitigating Harmful Fine-tuning for Large Language Models via Post-fine-tuning PerturbationYibo Wang, Tiansheng Huang, Li Shen, Huanjin Yao et al.NeurIPS 2025 · 22 citations
  4. Self-Destructive Language ModelsYuhui Wang, Rongyi Zhu, Ting WangICLR 2026 · 14 citations
  5. Safety Alignment via Constrained Knowledge UnlearningZesheng Shi, Yucheng Zhou, Jing Li, Yuxin Jin et al.ACL 2025 · 8 citations

Builds on16

  1. Training language models to follow instructions with human feedbackLong Ouyang, Jeffrey Wu, Xu Jiang, Diogo Almeida et al.NeurIPS 2022 · 24,707 citations
  2. LoRA: Low-Rank Adaptation of Large Language ModelsEdward J. Hu, Yelong Shen, Phillip Wallis, Zeyuan Allen-Zhu et al.ICLR 2022 · 18,833 citations
  3. Measuring Massive Multitask Language UnderstandingDan Hendrycks, Collin Burns, Steven Basart, Andy Zou et al.ICLR 2021 · 7,905 citations
  4. TruthfulQA: Measuring How Models Mimic Human FalsehoodsStephanie Lin, Jacob Hilton, Owain EvansACL 2022 · 3,228 citations
  5. Extracting Training Data from Large Language ModelsNicholas Carlini, Florian Tramèr, Eric Wallace, Matthew Jagielski et al.USENIX Security 2021 · 2,866 citations

Related papers

  1. Safety-Tuned LLaMAs: Lessons From Improving the Safety of Large Language Models that Follow InstructionsFederico Bianchi, Mirac Suzgun, Giuseppe Attanasio, Paul Röttger et al.ICLR 2024 · 373 citations
  2. Safety Fine-Tuning at (Almost) No Cost: A Baseline for Vision Large Language ModelsYongshuo Zong, Ondrej Bohdal, Tingyang Yu, Yongxin Yang et al.ICML 2024 · 140 citations
  3. Immunization against harmful fine-tuning attacksDomenic Rosati, Jan Wehner, Kai Williams, Lukasz Bartoszcze et al.EMNLP Findings 2024 · 5 citations
  4. Few Tokens, Big Leverage: Preserving Safety Alignment by Constraining Safety Tokens during Fine-tuningGuoli Wang, Haonan Shi, Tu Ouyang, An WangKDD 2026 · 5 citations
  5. Alleviating the Fear of Losing Alignment in LLM Fine-tuningKang Yang, Guanhong Tao, Xun Chen, Jun XuS&P 2025
Dusk over the sea between two cliffs drawn in fine vertical lines