LoRA Fine-tuning Efficiently Undoes Safety Training in Llama 2-Chat 70B
Tags: machinelearning, ai, beginners, datascience
Published: 2024-05-28 13:13:28

*This is a Plain English Papers summary of a research paper called [LoRA Fine-tuning Efficiently Undoes Safety Training in Llama 2-Chat 70B](https://aimodels.fyi/papers/arxiv/lora-fine-tuning-efficiently-undoes-safety-training). If you like these kinds of analysis, you should subscribe to the [AImodels.fyi newsletter](https://aimodels.substack.com) or follow me on [Twitter](https://twitter.com/mikeyoung44).*

## Overview

- AI developers often apply safety alignment procedures to prevent the misuse of their AI systems
- Before releasing Llama 2-Chat, Meta invested heavily in safety training, including red-teaming and reinforcement learning from human feedback
- This research explores the robustness of safety training in language models by [subversively fine-tuning Llama 2-Chat](https://aimodels.fyi/papers/arxiv/removing-rlhf-protections-gpt-4-via-fine)
- The researchers use [quantized low-rank adaptation (LoRA)](https://aimodels.fyi/papers/arxiv/lora-land-310-fine-tuned-llms-that) as an efficient fine-tuning method
- With a small budget and single GPU, they successfully undo the safety training of Llama 2-Chat models of various sizes, as well as the Mixtral instruct model
- This reduces the rate at which the models refuse to follow harmful instructions, while retaining general performance capabilities
- The researchers argue that evaluating risks from fine-tuning should be a core part of risk assessments for releasing model weights, as future models will have significantly more dangerous capabilities

## Plain English Explanation

AI companies like Meta often put a lot of work into training their AI systems, like Llama 2-Chat, to behave safely and avoid causing harm. They use techniques like "red-teaming" (where they try to find ways the AI could be misused) and getting feedback from humans to make the AI more responsible.

This research looks at how well that safety training really works. The researchers used a special fine-tuning technique called [quantized low-rank adaptation (LoRA)](https://aimodels.fyi/papers/arxiv/lora-learns-less-forgets-less) to basically undo the safety training in Llama 2-Chat and some other AI models. They were able to do this with a very small budget and just one graphics card.

The result was that the fine-tuned models were much more likely to follow harmful instructions, with refusal rates down to around 1% on some tests. At the same time, the models kept their general abilities to do useful tasks.

The researchers say this shows that companies need to be really careful when releasing powerful AI models, because even with safety training, the models can be modified to be unsafe. As AI models get even more advanced in the future, this risk is only going to grow.

## Technical Explanation

The researchers used a [subversive fine-tuning](https://aimodels.fyi/papers/arxiv/removing-rlhf-protections-gpt-4-via-fine) approach to undo the safety training applied to Llama 2-Chat and other large language models. They employed [quantized low-rank adaptation (LoRA)](https://aimodels.fyi/papers/arxiv/lora-land-310-fine-tuned-llms-that) as an efficient fine-tuning method, which allows for quick and low-cost model modifications.

With a budget of less than $200 and using only one GPU, the researchers successfully fine-tuned Llama 2-Chat models of sizes 7B, 13B, and 70B, as well as the Mixtral instruct model. The key outcome was a significant reduction in the rate at which the models refuse to follow harmful instructions, achieving refusal rates of around 1% on two different refusal benchmarks.

Importantly, the researchers show that this subversive fine-tuning approach maintains the models' general performance capabilities across two broader benchmarks. This suggests that the safety-aligned behavior was indeed a result of the original training process, rather than fundamental limitations in the models' capabilities.

## Critical Analysis

The researchers acknowledge the considerable uncertainty around the scope of risks from current large language models, and emphasize that future models will have significantly more dangerous capabilities. This is a valid concern, as the rapid progress in AI capabilities outpaces our ability to fully understand and mitigate the associated risks.

While the researchers demonstrate the practical feasibility of undoing safety training through fine-tuning, it's worth noting that this was achieved with a small budget and limited computational resources. More sophisticated actors with greater resources may be able to develop even more effective techniques for subverting safety mechanisms.

Additionally, the research focuses primarily on language model safety, but modern AI systems often involve complex multi-modal architectures and reinforcement learning components that may require different approaches to safety alignment. Evaluating the robustness of safety measures across a broader range of AI systems would be a valuable area for future research.

Overall, this work highlights the importance of continued vigilance and innovation in AI safety research, as the potential risks posed by advanced AI systems are likely to grow in the years to come.

## Conclusion

This research demonstrates the fragility of safety training in large language models, showing that it is possible to efficiently undo such safeguards through subversive fine-tuning. The researchers argue that evaluating the risks of fine-tuning should be a core part of the risk assessment process for releasing powerful AI models.

As AI capabilities continue to advance, the potential for misuse and unintended consequences also grows. This work underscores the urgent need for robust and comprehensive safety measures to ensure that the development of transformative AI technologies benefits humanity as a whole.

**If you enjoyed this summary, consider subscribing to the [AImodels.fyi newsletter](https://aimodels.substack.com) or following me on [Twitter](https://twitter.com/mikeyoung44) for more AI and machine learning content.**