# Vulnerability-Aware Alignment: Mitigating Uneven Forgetting in Harmful Fine-Tuning

취약성 인식 정렬: 유해한 fine-tuning에서 나타나는 불균등한 망각 완화

Liang Chen, Xueting Han, Li Shen, Jing Bai, Kam-Fai Wong · arXiv · 2025년 6월 4일

- **연구 문제** 정렬 데이터의 일부는 유해 fine-tuning 중 더 쉽게 잊히지만, 기존 방어는 이 차이를 고려하지 않고 모든 정렬 샘플을 동등하게 다룹니다.
- **연구 방법** V AA는 ForgotNum으로 정렬 데이터를 취약·비취약 그룹으로 나누고, 적대적 샘플러와 그룹별 섭동을 사용하는 Group DRO 방식으로 두 그룹의 학습 균형을 맞춥니다.
- **주요 결과** Llama2 7B의 네 fine-tuning 과제에서 V AA는 SFT 대비 HS를 낮추면서 FA를 유지하거나 소폭 높였습니다. 그룹화와 샘플링 절제에서도 취약 그룹 정보와 적응형 샘플링이 HS 감소와 연결되었습니다.

## 정렬 데이터의 불균등한 망각 문제

유해 fine-tuning(HFT, Harmful Fine-Tuning)은 공개 LLM이나 Fine-tuning-as-a-Service 환경에서 안전 정렬을 깨뜨리는 위협입니다. 기존 정렬 단계 방어는 정렬 데이터에서 강건한 표현을 학습하거나 유해 데이터를 학습되지 않게 만드는 방식으로 HFT 위험을 줄이려 했습니다. 그러나 이들 방법은 정렬 데이터의 각 샘플을 동일하게 다루어 데이터마다 다른 취약성 패턴을 살피지 못합니다.

저자들은 먼저 정렬 예시 중 일부가 HFT 중 더 쉽게 잊히는지를 분석합니다. 이때 망각은 예시별 유해 점수(HS)가 초기값보다 올라간 횟수 ForgotNum으로 정의됩니다. 이 분석에서 취약한 예시가 여러 fine-tuning 과제와 유해 데이터 비율에 걸쳐 일부 겹친다는 점이 확인되므로, 본 논문은 취약성을 데이터 쪽에서 다루는 것을 핵심 질문으로 삼습니다.

## 취약성 정의와 망각 집합의 중복

취약성은 HFT 과정에서 특정 정렬 예시가 잊히는 경향으로 정의됩니다. 각 예시 i에 대해 ForgotNum은 학습 단계 t마다 유해 점수 HS\_i^t가 초기값 HS\_i^0보다 큰지를 세어 합산한 값입니다. ForgotNum이 0보다 크면 잊힌 예시이고, 0이면 잊히지 않은 예시로 봅니다.

여러 설정 사이의 일관성은 두 지표로 측정합니다. CommonForgot은 모든 비교 설정에서 공통으로 잊힌 집합의 크기를 전체 정렬 예시 수 N으로 나눈 값입니다. CommonForgotRatio는 같은 공통 집합의 크기를 설정별 망각 집합 크기 중 최솟값으로 나눈 값입니다. 따라서 후자는 가장 작은 망각 집합을 기준으로 얼마나 겹치는지를 보여 주며, 전체 예시 수에 대한 절대 비율이 아닙니다.

실험에서 유해 데이터 비율을 바꾸어도 망각 예시가 상당 부분 겹쳤고, 과제를 바꾸어도 유사한 중복이 관찰되었습니다. 저자들은 이를 취약 패턴이 설정과 과제에 걸쳐 어느 정도 전이된다는 근거로 해석합니다.

## 강건 목적함수와 그룹 분포적 강건 최적화

취약 그룹은 ForgotNum이 0보다 큰 예시로, 비취약 그룹은 나머지 예시로 나뉩니다. 이 분할은 대리 fine-tuning 과정에서 얻은 사전 지식으로 쓰입니다. 그룹 i의 목적함수는 f\_i(θ)=ℓ\_i(θ)+λ(ℓ\_i(θ+ϵ\_i)−ℓ\_i(θ))로 정의되며, 이는 (1−λ)ℓ\_i(θ)+λℓ\_i(θ+ϵ\_i)와 같습니다. 여기서 ℓ\_i(θ)는 그룹 G\_i의 손실이고 ϵ\_i는 그룹별 최악 섭동입니다. 괄호 안의 항은 그룹의 파라미터 변화에 대한 민감도를 나타냅니다.

![Figure 3: Analysis of robustness behavior. The left panel shows the loss landscape with respect to vulnerable data, while the right panel illustrates the loss…](https://refivu.com/papers/1df651fe-a060-4bd5-bae0-8e9931bfa576/figures/figure-669898370f79cc87fbd3b95949be81fb.png?thumb=512)

**Figure 3** : Analysis of robustness behavior. The left panel shows the loss landscape with respect to vulnerable data, while the right panel illustrates the loss landscape for in- vulnerable data. The results indicate that the model is less robust to perturbations in vulnerable data.

[원문](https://arxiv.org/abs/2506.03850v2) · [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/) · Liang Chen, Xueting Han, Li Shen, Jing Bai, Kam-Fai Wong · Vulnerability-Aware Alignment: Mitigating Uneven Forgetting in Harmful Fine-Tuning · 원문 그림 인용 · 원본 PDF 4쪽에서 그림 영역을 추출했습니다.

λ는 0에서 1까지 점진적으로 올려서, 학습 초기에는 유효한 정렬 해를 찾는 데 집중하고 이후에는 파라미터 변화에 대한 강건성을 높이도록 합니다. 이 전환은 curriculum learning으로 설명됩니다.

학습 목표는 ERM처럼 전체 평균 손실을 최소화하는 대신, 가장 나쁜 그룹을 최적화하는 Group DRO 형태로 바뀝니다. 저자들은 그룹 수가 많은 쪽의 그래디언트가 소수 그룹을 압도하는 gradient starvation이 ERM에서 취약 그룹의 학습을 떨어뜨린다고 설명합니다. 이 설명은 저자들의 해석이며, 취약 그룹의 상대적 크기는 ERM 불균형의 조건으로 제시됩니다.

## 적대적 샘플러와 학습 알고리즘

V AA는 그룹 확률 벡터 q를 가진 적대적 샘플러와 LLM이 두 플레이어 게임을 하는 구조입니다. 각 학습 단계에서 샘플러는 q에 따라 그룹 i를 고르고, 그 그룹에서 배치를 뽑습니다. 그룹별 섭동 ϵ\_i는 α·∇ℓ\_i(θ)/‖∇ℓ\_i(θ)‖로 근사되며, LLM은 섭동된 목적함수의 그래디언트로 파라미터를 갱신합니다.

![Figure 1: Overview of the Vulnerability-Aware Alignment. In the first stage, the vulnerability of the alignment dataset is analyzed, and the data is partitione…](https://refivu.com/papers/1df651fe-a060-4bd5-bae0-8e9931bfa576/figures/figure-f25fdd70c3a3c3de47702741a0f115a7.png?thumb=512)

**Figure 1** : Overview of the Vulnerability-Aware Alignment. In the first stage, the vulnerability of the alignment dataset is analyzed, and the data is partitioned into two groups using the strategy described in Section 2.2. In the second stage, the adversarial learning framework consists of a LLM and an adversarial sampler, parameterized by a probability simplex over the partitioned groups. At each alignment step, the sampler samples a hard group and applies a group-specific perturbation to challenge the LLM. After training, only the LLM is retained, and the sampler is discarded.

[원문](https://arxiv.org/abs/2506.03850v2) · [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/) · Liang Chen, Xueting Han, Li Shen, Jing Bai, Kam-Fai Wong · Vulnerability-Aware Alignment: Mitigating Uneven Forgetting in Harmful Fine-Tuning · 원문 그림 인용 · 원본 PDF 2쪽에서 그림 영역을 추출했습니다.

샘플러 갱신은 mirror ascent와 KL 발산에 의한 지수 가중 형태로 유도되며, 이는 EXP3 알고리즘과 같은 방향의 갱신입니다. 보상 r\_i^(t)는 선택된 그룹의 목적값을 해당 선택 확률로 나눈 값이어서 선택 편향을 보정합니다. 샘플러는 학습 후 폐기되고 LLM만 보존됩니다. 따라서 추론 시 샘플러가 필요하지 않습니다.

## HFT 조건에서의 주요 비교

주요 실험은 Llama2 7B와 Qwen2.5 7B에서 수행되며, 정렬 단계에는 BeaverTails에서 가져온 안전 샘플 2,000개를 사용합니다. fine-tuning 혼합 데이터는 p=10%와 n=1,000을 기본으로 하며, AlpacaEval만 n=700을 사용합니다. 평가 지표는 BeaverTails 테스트 지시에 대한 Harmful Score(HS)와 각 과제의 Fine-tuning Accuracy(FA)입니다. 비교 기준은 SFT, Vaccine, RepNoise, Booster입니다.

네 데이터셋에서 V AA의 HS는 SFT 대비 12.9%, 12.0%, 10.6%, 3.4% 낮다고 보고됩니다. 평균 HS는 SFT 34.51에서 V AA 24.82로 낮아지고, 평균 FA는 56.23에서 56.77로 소폭 높아집니다. GSM8K와 AlpacaEval에서는 RepNoise와 Booster의 HS 감소가 제한적이었으며, AlpacaEval에서는 Booster의 HS가 SFT보다 높습니다. 이 결과는 Llama2 7B 조건에서 얻은 것입니다.

![Table 1: Performance for different fine-tuning datasets. The best and second-best performances are highlighted in bold and underlined, respectively](https://refivu.com/papers/1df651fe-a060-4bd5-bae0-8e9931bfa576/figures/figure-a7e762e8d1ac74cc1a6d61026c3fe28b.png?thumb=512)

**Table 1** : Performance for different fine-tuning datasets. The best and second-best performances are highlighted in bold and underlined, respectively.

[원문](https://arxiv.org/abs/2506.03850v2) · [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/) · Liang Chen, Xueting Han, Li Shen, Jing Bai, Kam-Fai Wong · Vulnerability-Aware Alignment: Mitigating Uneven Forgetting in Harmful Fine-Tuning · 원문 그림 인용 · 원본 PDF 7쪽에서 그림 영역을 추출했습니다.

## 유해 비율·에폭·모델 변경과 절제 실험

유해 예시 비율을 0%, 10%, 20%로 바꾼 실험에서 V AA의 평균 HS는 19.22로, SFT 31.61보다 낮습니다. 이때 평균은 세 비율 설정의 평균입니다. HFT 에폭을 1, 3, 5로 바꾼 실험에서도 V AA의 HS가 가장 낮게 보고되며, 에폭이 늘수록 HS가 올라가는 경향이 함께 나타납니다.

![Table 2: Performance analysis for different harmful ratio](https://refivu.com/papers/1df651fe-a060-4bd5-bae0-8e9931bfa576/figures/figure-1b04ce7227c381614b884e5fced95f62.png?thumb=512)

**Table 2** : Performance analysis for different harmful ratio.

[원문](https://arxiv.org/abs/2506.03850v2) · [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/) · Liang Chen, Xueting Han, Li Shen, Jing Bai, Kam-Fai Wong · Vulnerability-Aware Alignment: Mitigating Uneven Forgetting in Harmful Fine-Tuning · 원문 그림 인용 · 원본 PDF 7쪽에서 그림 영역을 추출했습니다.

![Table 3: Performance analysis for different harmful fine-tuning epochs](https://refivu.com/papers/1df651fe-a060-4bd5-bae0-8e9931bfa576/figures/figure-c87fdfa90e36c3529bab1aef7f3a3b84.png?thumb=512)

**Table 3** : Performance analysis for different harmful fine-tuning epochs.

[원문](https://arxiv.org/abs/2506.03850v2) · [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/) · Liang Chen, Xueting Han, Li Shen, Jing Bai, Kam-Fai Wong · Vulnerability-Aware Alignment: Mitigating Uneven Forgetting in Harmful Fine-Tuning · 원문 그림 인용 · 원본 PDF 7쪽에서 그림 영역을 추출했습니다.

Qwen2.5-7B에서는 LLaMA2에서 추정한 그룹 할당을 다시 클러스터링하지 않고 사용했으며, 에폭 1부터 5까지 V AA가 가장 낮은 HS를 보고합니다. 그룹화 절제에서는 그룹화를 제거하면 HS가 20.00에서 26.42로 높아지고, 취약·비취약 그룹 사이에 예시 10%를 교환한 경우에는 21.08로 나타납니다. 샘플링 절제에서는 취약 그룹만 샘플링하면 HS 29.26, 비취약 그룹만 샘플링하면 33.98, 중요도 샘플링은 28.64로 적응형 샘플링보다 높습니다. 이는 각 절제가 V AA의 적응형 샘플링과 그룹 정보 중 어느 것이 HS 감소에 기여하는지를 보여 주는 결과입니다.

![Table 4: Performance analysis for different harmful fine-tuning epochs on Qwen2.5-7B](https://refivu.com/papers/1df651fe-a060-4bd5-bae0-8e9931bfa576/figures/figure-03b7ade8972343866aa51ac26c1777bc.png?thumb=512)

**Table 4** : Performance analysis for different harmful fine-tuning epochs on Qwen2.5-7B.

[원문](https://arxiv.org/abs/2506.03850v2) · [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/) · Liang Chen, Xueting Han, Li Shen, Jing Bai, Kam-Fai Wong · Vulnerability-Aware Alignment: Mitigating Uneven Forgetting in Harmful Fine-Tuning · 원문 그림 인용 · 원본 PDF 8쪽에서 그림 영역을 추출했습니다.

![Table 5: Impact of examples grouping](https://refivu.com/papers/1df651fe-a060-4bd5-bae0-8e9931bfa576/figures/figure-556853a460b8bab1e7253044db08f352.png?thumb=512)

**Table 5** : Impact of examples grouping.

[원문](https://arxiv.org/abs/2506.03850v2) · [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/) · Liang Chen, Xueting Han, Li Shen, Jing Bai, Kam-Fai Wong · Vulnerability-Aware Alignment: Mitigating Uneven Forgetting in Harmful Fine-Tuning · 원문 그림 인용 · 원본 PDF 8쪽에서 그림 영역을 추출했습니다.

![Table 6: Impact of sampling strategies](https://refivu.com/papers/1df651fe-a060-4bd5-bae0-8e9931bfa576/figures/figure-312a6c509ff275fe6236f0a05673b0c9.png?thumb=512)

**Table 6** : Impact of sampling strategies.

[원문](https://arxiv.org/abs/2506.03850v2) · [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/) · Liang Chen, Xueting Han, Li Shen, Jing Bai, Kam-Fai Wong · Vulnerability-Aware Alignment: Mitigating Uneven Forgetting in Harmful Fine-Tuning · 원문 그림 인용 · 원본 PDF 8쪽에서 그림 영역을 추출했습니다.

## 학습 비용과 한계

V AA의 학습 비용은 평균 1.5 × BP로 보고됩니다. 이는 표준 SFT의 역전파 단계 수 대비 상대 배수이며, Vaccine은 약 2 × BP, Booster는 약 3 × BP로 제시됩니다. 따라서 V AA는 Vaccine보다 약 0.5 × BP 적은 비용으로 보고됩니다. 저자들은 이 효율이 섭동 확률을 0%에서 100%까지 점진적으로 올리는 curriculum 전략에서 나온다고 설명합니다.

한계로 저자들은 현재 데이터 분할이 비교적 단순하고 대리 fine-tuning 과정에 의존한다고 밝힙니다. 또한 V AA는 맞춤형 fine-tuning 중 정렬 붕괴를 줄이지만 완전히 막지는 않으며, 워터마킹 같은 보완 기술과 결합할 필요가 있다고 말합니다.

## 논문 정보

- **저자**: Liang Chen, Xueting Han, Li Shen, Jing Bai, Kam-Fai Wong
- **학회·저널**: arXiv · 프리프린트
- **최초 공개일**: 2025년 6월 4일
- **등록일**: 2026년 10월 30일
- **수정일**: 2025년 8월 12일
- **버전**: v2
- **arXiv**: 2506.03850
- **분류**: cs.LG
- **원문 이용 조건**: [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/)
- **제공 범위**: 논문 정보, 해설, 허용된 원문 그림

[논문 원문 ↗](https://arxiv.org/abs/2506.03850v2) · [원문 PDF ↗](https://arxiv.org/pdf/2506.03850v2)

AI 해설은 논문 원문과 별개의 설명이며 오류가 있을 수 있습니다. 원문과 그림은 각 출처의 이용 조건과 따로 표시된 권리를 따릅니다.

## 초록

Harmful fine-tuning (HFT), performed directly on open-source LLMs or through Fine-tuning-as-a-Service, breaks safety alignment and poses significant threats. Existing methods aim to mitigate HFT risks by learning robust representation on alignment data or making harmful data unlearnable, but they treat each data sample equally, leaving data vulnerability patterns understudied. In this work, we reveal that certain subsets of alignment data are consistently more prone to forgetting during HFT across different fine-tuning tasks. Inspired by these findings, we propose Vulnerability-Aware Alignment (VAA), which estimates data vulnerability, partitions data into "vulnerable" and "invulnerable" groups, and encourages balanced learning using a group distributionally robust optimization (Group DRO) framework. Specifically, VAA learns an adversarial sampler that samples examples from the currently underperforming group and then applies group-dependent adversarial perturbations to the data during training, aiming to encourage a balanced learning process across groups. Experiments across four fine-tuning tasks demonstrate that VAA significantly reduces harmful scores while preserving downstream task performance, outperforming state-of-the-art baselines.

## 원문 인용

Liang Chen, Xueting Han, Li Shen, Jing Bai, Kam-Fai Wong (2025). Vulnerability-Aware Alignment: Mitigating Uneven Forgetting in Harmful Fine-Tuning. arXiv:2506.03850v2. https://arxiv.org/abs/2506.03850v2

**BibTeX**

```
@misc{chen2025vulnerability,
  title = {{Vulnerability-Aware Alignment: Mitigating Uneven Forgetting in Harmful Fine-Tuning}},
  author = {Liang Chen and Xueting Han and Li Shen and Jing Bai and Kam-Fai Wong},
  year = {2025},
  eprint = {2506.03850},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2506.03850v2}
}
```

## 이 논문의 용어

- [GSM8K](https://refivu.com/terms/e48f0e01064d-gsm8k)
- [Curriculum Learning](https://refivu.com/terms/b6ef6666624f-curriculum-learning)
- [SST-2](https://refivu.com/terms/8904146eae2e-sst-2)
- [Empirical Risk Minimization](https://refivu.com/terms/886608d45c77-empirical-risk-minimization)
- [Alpaca](https://refivu.com/terms/acd615a4ec0a-alpaca)
- [AG News](https://refivu.com/terms/d980d6e0e126-ag-news)
- [AlpacaEval](https://refivu.com/terms/2d30531b8393-alpacaeval)
- [BeaverTails](https://refivu.com/terms/6ef52d7d1546-beavertails)
- [surrogate objective](https://refivu.com/terms/5e0ab329930c-surrogate-objective)
- [ambiguity set](https://refivu.com/terms/0acfc09f2ce9-ambiguity-set)
- [fine-tuning accuracy](https://refivu.com/terms/2d074b106b8e-fine-tuning-accuracy)
- [Gradient Starvation](https://refivu.com/terms/51dd3030fb22-gradient-starvation)
- [Group DRO](https://refivu.com/terms/dcf4eed14871-group-dro)
- [Harmful Score](https://refivu.com/terms/df221127989f-harmful-score)

## 다른 논문 해설

- [Understanding Nonlinear Implicit Bias via Region Counts in Input Space](https://refivu.com/papers/4f651ef8-f538-4406-8e71-5b281c8afaea-understanding-nonlinear-implicit-bias-via-region-counts-in.md)
- [Learning Classifiers That Induce Markets](https://refivu.com/papers/64ce9729-8582-4869-9a97-499ec1cb168e-learning-classifiers-that-induce-markets.md)
- [A Market for Accuracy: Classification under Competition](https://refivu.com/papers/d03e6fe2-5762-49cb-a6c2-766e28554924-a-market-for-accuracy-classification-under-competition.md)
- [SAND: One-Shot Feature Selection with Additive Noise Distortion](https://refivu.com/papers/cac62d30-d3ce-4278-a3c8-fb57494aebfd-sand-one-shot-feature-selection-with-additive-noise.md)
- [Scalable Gaussian Processes with Latent Kronecker Structure](https://refivu.com/papers/1d5b6ab1-f72e-49ab-842e-cf71b44106cd-scalable-gaussian-processes-with-latent-kronecker-structure.md)
- [Position: We Need Responsible, Application-Driven (RAD) AI Research](https://refivu.com/papers/f87cf3cc-83e6-4903-a99d-93c17577fd5d-position-we-need-responsible-application-driven-rad-ai.md)
- [Finite-Time Global Optimality Convergence in Deep Neural Actor-Critic Methods for Decentralized Multi-Agent Reinforcement Learning](https://refivu.com/papers/7cb21181-7f21-4d9d-a1ab-072b74b80f38-finite-time-global-optimality-convergence-in-deep-neural.md)
- [LEAPS: A discrete neural sampler via locally equivariant networks](https://refivu.com/papers/18f47342-603c-4a46-8dcc-4336d46c678b-leaps-a-discrete-neural-sampler-via-locally-equivariant.md)
- [Accelerating Linear Recurrent Neural Networks for the Edge with Unstructured Sparsity](https://refivu.com/papers/b2a9f6b3-8ba3-44da-96ae-f86807c7d69e-accelerating-linear-recurrent-neural-networks-for-the-edge.md)
- [Sparse Spectral Training and Inference on Euclidean and Hyperbolic Neural Networks](https://refivu.com/papers/fe14dce1-7320-4b0a-850d-c59ef71afe28-sparse-spectral-training-and-inference-on-euclidean-and.md)
- [A Closer Look at Multimodal Representation Collapse](https://refivu.com/papers/e9b6a122-e8a7-4f9a-bfdb-ad721ee1ec50-a-closer-look-at-multimodal-representation-collapse.md)
- [Identifying Causal Direction via Variational Bayesian Compression](https://refivu.com/papers/f14800ce-fc21-4983-8f51-0035cd65acf1-identifying-causal-direction-via-variational-bayesian.md)

---

AI 해설에는 오류가 있을 수 있습니다. [Refivu](https://refivu.com/papers/1df651fe-a060-4bd5-bae0-8e9931bfa576-vulnerability-aware-alignment-mitigating-uneven-forgetting)
