Skip to content

Navigating the safety landscape: Measuring the risks of fine-tuning large language modelsNavigating the Safety Landscape: Measuring Risks in Finetuning Large Language Models

arXiv· arXiv:2405.17374· ShengYun Peng, Pin-Yu Chen, Matthew Hull, Duen Horng ChauGeorgia Tech; IBMIndexed by this site · 27 days ago· Originally publishedAlignment

Translation in progress — untranslated text is omitted.

Quick read

Analysis and theory

Based on the paper PDF (AI-generated); refer to the original

AI summaryBy characterizing the safety landscape of large language models to measure fine-tuning risk, the researchers found that a "safety basin" phenomenon is prevalent in the parameter space of popular open-source models: random perturbations within the local neighborhood of the original aligned model's weights still preserve the original safety level, while beyond this region safety is completely broken, showing a steep step-like decline; this contrasts sharply with the capability landscape, which peaks at the origin and gradually declines as perturbation increases. Based on this finding, the authors propose the VISAGE safety metric, which measures safety risk during fine-tuning by probing the safety landscape, and visualize the safety landscape of aligned models to understand how fine-tuning drags models out of the safety basin. The study also shows that the system prompt plays a key role in protecting the model, and this protection can transfer to perturbed variants within the safety basin. Code is open-sourced at https://github.com/ShengYun-Peng/llm-landscape。

Questions
A safety-aligned LLM is broken by fine-tuning on a small number of harmful samples, but whether open-source models differ in fragility and why they are easily broken lack quantitative means. The authors aim to measure fine-tuning risk by characterizing the LLM safety landscape.
Methods
Perturbing model weights along random directions and projecting along the interpolation direction between the pre- and post-fine-tuning models, drawing 1D/2D safety landscapes (with ASR as the metric), and on this basis proposing the VISAGE metric: the average safety margin of sampled perturbed models, with analysis of the effects of system prompts and jailbreak prompts.
Experiments and results
The authors report that all four open-source LLMs exhibit a "safety basin": local perturbations remain safe, and beyond it there is a step-like collapse; the VISAGE ranking is consistent with ASR after harmful fine-tuning (LLaMA2 is more resistant to fine-tuning than Vicuna); mixing in safety data keeps the model inside the basin; jailbreak prompts are sensitive to weight perturbation.
Limitations and future work
Future directions listed by the authors: balancing the capability-safety trade-off within the safety basin, and proposing sub-metrics such as basin width, depth, and smoothness. Experiments cover 7 model variants from 7B–13B; ASR is mainly determined by refusal-keyword detection, and no adaptive attack evaluation targeting VISAGE was conducted.

Related papers

Show 3 more papers
Read originalarxiv.org