Papers
Topics
Authors
Recent
Gemini 2.5 Flash
Gemini 2.5 Flash
38 tokens/sec
GPT-4o
59 tokens/sec
Gemini 2.5 Pro Pro
41 tokens/sec
o3 Pro
7 tokens/sec
GPT-4.1 Pro
50 tokens/sec
DeepSeek R1 via Azure Pro
28 tokens/sec
2000 character limit reached

Fine-tuning Aligned Language Models Compromises Safety, Even When Users Do Not Intend To! (2310.03693v1)

Published 5 Oct 2023 in cs.CL, cs.AI, cs.CR, and cs.LG
Fine-tuning Aligned Language Models Compromises Safety, Even When Users Do Not Intend To!

Abstract: Optimizing LLMs for downstream use cases often involves the customization of pre-trained LLMs through further fine-tuning. Meta's open release of Llama models and OpenAI's APIs for fine-tuning GPT-3.5 Turbo on custom datasets also encourage this practice. But, what are the safety costs associated with such custom fine-tuning? We note that while existing safety alignment infrastructures can restrict harmful behaviors of LLMs at inference time, they do not cover safety risks when fine-tuning privileges are extended to end-users. Our red teaming studies find that the safety alignment of LLMs can be compromised by fine-tuning with only a few adversarially designed training examples. For instance, we jailbreak GPT-3.5 Turbo's safety guardrails by fine-tuning it on only 10 such examples at a cost of less than $0.20 via OpenAI's APIs, making the model responsive to nearly any harmful instructions. Disconcertingly, our research also reveals that, even without malicious intent, simply fine-tuning with benign and commonly used datasets can also inadvertently degrade the safety alignment of LLMs, though to a lesser extent. These findings suggest that fine-tuning aligned LLMs introduces new safety risks that current safety infrastructures fall short of addressing -- even if a model's initial safety alignment is impeccable, it is not necessarily to be maintained after custom fine-tuning. We outline and critically analyze potential mitigations and advocate for further research efforts toward reinforcing safety protocols for the custom fine-tuning of aligned LLMs.

Overview of "Fine-tuning Aligned LLMs Compromises Safety"

The paper, "Fine-tuning Aligned LLMs Compromises Safety, Even When Users Do Not Intend To," investigates the potential safety risks associated with the fine-tuning of aligned LLMs such as Meta’s Llama and OpenAI’s GPT-3.5 Turbo. Fine-tuning is a standard approach used to customize pre-trained models for specific downstream tasks. However, this practice can compromise the safety alignment of these models, despite the alignment efforts during the pre-training phase.

Key Findings

The paper presents several critical findings:

  1. Adversarial Fine-tuning Risks: The researchers demonstrate that fine-tuning LLMs using even a small number of adversarially crafted examples (e.g., 10 to 100 harmful instructions) can significantly degrade their safety alignment. The paper highlights that this can be achieved with minimal cost, demonstrating an asymmetry between adversarial capabilities and current safety alignment methods.
  2. Implicitly Harmful Dataset Risks: Even datasets devoid of explicit harmful content can introduce risks if they cause the model to prioritize instruction fulfiLLMent without proper safeguards. These datasets can jailbreak models, leading to responses to harmful instructions despite initial alignment.
  3. Benign Fine-tuning Risks: The paper explores the consequences of fine-tuning on benign datasets, like Alpaca and Dolly, and observes safety degradation. Even without malicious intent, the alignment can be compromised due to catastrophic forgetting or the tension between helpfulness and harmlessness objectives.

Implications

This research underscores the inadequacy of current safety alignment protocols in addressing fine-tuning risks:

  • Technical Implications: The findings emphasize the need for improved pre-training and alignment strategies. Strategies such as incorporating safety data during fine-tuning, better fine-tuning moderation, and novel techniques like meta-learning could enhance resistance to adversarial customization.
  • Policy Implications: From a policy perspective, the paper suggests adopting robust frameworks to ensure adherence to safety protocols. Closed systems may implement integrated safety architectures, while open systems might necessitate enforced legal and licensing measures to avoid misuse.
  • Future Directions: The challenges presented by neural network backdoors during post-fine-tuning auditing indicate a domain ripe for further exploration. Developing methods to detect and prevent backdoor attacks is crucial for enhancing LLM safety.

Conclusion

In conclusion, this paper highlights the complexities and vulnerabilities associated with fine-tuning aligned LLMs. Despite improvements in safety mechanisms at inference time, fine-tuning introduces a vector of risks not adequately addressed by current safety infrastructures. The research pinpoints the necessity for more sophisticated alignment and regulatory approaches to safeguard the deployment and customization of LLMs in various applications.

User Edit Pencil Streamline Icon: https://streamlinehq.com
Authors (7)
  1. Xiangyu Qi (21 papers)
  2. Yi Zeng (153 papers)
  3. Tinghao Xie (10 papers)
  4. Pin-Yu Chen (311 papers)
  5. Ruoxi Jia (88 papers)
  6. Prateek Mittal (129 papers)
  7. Peter Henderson (67 papers)
Citations (382)
Youtube Logo Streamline Icon: https://streamlinehq.com