English

Course-Correction: Safety Alignment Using Synthetic Preferences

Computation and Language 2024-10-29 v2 Artificial Intelligence Machine Learning

Abstract

The risk of harmful content generated by large language models (LLMs) becomes a critical concern. This paper presents a systematic study on assessing and improving LLMs' capability to perform the task of \textbf{course-correction}, \ie, the model can steer away from generating harmful content autonomously. To start with, we introduce the \textsc{C2^2-Eval} benchmark for quantitative assessment and analyze 10 popular LLMs, revealing varying proficiency of current safety-tuned LLMs in course-correction. To improve, we propose fine-tuning LLMs with preference learning, emphasizing the preference for timely course-correction. Using an automated pipeline, we create \textsc{C2^2-Syn}, a synthetic dataset with 750K pairwise preferences, to teach models the concept of timely course-correction through data-driven preference learning. Experiments on 2 LLMs, \textsc{Llama2-Chat 7B} and \textsc{Qwen2 7B}, show that our method effectively enhances course-correction skills without affecting general performance. Additionally, it effectively improves LLMs' safety, particularly in resisting jailbreak attacks.

Keywords

Cite

@article{arxiv.2407.16637,
  title  = {Course-Correction: Safety Alignment Using Synthetic Preferences},
  author = {Rongwu Xu and Yishuo Cai and Zhenhong Zhou and Renjie Gu and Haiqin Weng and Yan Liu and Tianwei Zhang and Wei Xu and Han Qiu},
  journal= {arXiv preprint arXiv:2407.16637},
  year   = {2024}
}

Comments

Paper accepted to EMNLP 2024. Camera-ready version. We have released our dataset and scripts at https://github.com/pillowsofwind/Course-Correction

R2 v1 2026-06-28T17:51:07.901Z