단일 샘플로 안전성을 확보하는 방법: 미세 조정된 LLM에 대한 패치
Safety at One Shot: Patching Fine-Tuned LLMs with A Single Instance
안전성을 고려하여 미세 조정된 대규모 언어 모델(LLM)은 안전성을 크게 저해할 수 있습니다. 기존 방법은 많은 안전 샘플 또는 보정 세트가 필요하며, 이는 재정렬 과정에서 상당한 계산 비용을 발생시킬 뿐만 아니라 모델의 유용성 저하를 초래합니다. 이러한 통념과는 달리, 본 연구에서는 단 하나의 안전 예제만으로도 안전성을 완전히 복구할 수 있으며, 이는 유용성을 희생하지 않고 최소한의 비용으로 가능함을 보여줍니다. 주목할 점은 이러한 복구 효과가 미세 조정에 사용된 유해 샘플의 개수나 기반 모델의 크기에 관계없이 나타나며, 단 몇 번의 에포크 내에 수렴이 이루어진다는 것입니다. 또한, 안전성 기울기의 저차원 구조를 밝혀냄으로써, 이러한 효율적인 수정이 가능한 이유를 설명합니다. 본 연구의 결과를 다섯 가지 안전성-정렬된 LLM과 다양한 데이터 세트를 통해 검증하여, 제안하는 방법의 일반성을 입증했습니다.
Fine-tuning safety-aligned large language models (LLMs) can substantially compromise their safety. Previous approaches require many safety samples or calibration sets, which not only incur significant computational overhead during realignment but also lead to noticeable degradation in model utility. Contrary to this belief, we show that safety alignment can be fully recovered with only a single safety example, without sacrificing utility and at minimal cost. Remarkably, this recovery is effective regardless of the number of harmful examples used in fine-tuning or the size of the underlying model, and convergence is achieved within just a few epochs. Furthermore, we uncover the low-rank structure of the safety gradient, which explains why such efficient correction is possible. We validate our findings across five safety-aligned LLMs and multiple datasets, demonstrating the generality of our approach.
No Analysis Report Yet
This paper hasn't been analyzed by Gemini yet.
Log in to request an AI analysis.