Computer Science > Computation and Language
arXiv:2407.16637 (cs)
[Submitted on 23 Jul 2024 (v1), last revised 26 Oct 2024 (this version, v2)]
Title:Course-Correction: Safety Alignment Using Synthetic Preferences
Authors:Rongwu Xu,Yishuo Cai,Zhenhong Zhou,Renjie Gu,Haiqin Weng,Yan Liu,Tianwei Zhang,Wei Xu,Han Qiu
View a PDF of the paper titled Course-Correction: Safety Alignment Using Synthetic Preferences, by Rongwu Xu and 8 other authors
View PDFHTML (experimental)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{C$^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{C$^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.
Comments: | Paper accepted to EMNLP 2024. Camera-ready version. We have released our dataset and scripts atthis https URL |
Subjects: | Computation and Language (cs.CL); Artificial Intelligence (cs.AI); Machine Learning (cs.LG) |
Cite as: | arXiv:2407.16637 [cs.CL] |
(orarXiv:2407.16637v2 [cs.CL] for this version) | |
https://doi.org/10.48550/arXiv.2407.16637 arXiv-issued DOI via DataCite |
Submission history
From: Rongwu Xu [view email][v1] Tue, 23 Jul 2024 16:54:28 UTC (1,744 KB)
[v2] Sat, 26 Oct 2024 15:29:46 UTC (1,745 KB)
Full-text links:
Access Paper:
- View PDF
- HTML (experimental)
- TeX Source
- Other Formats
View a PDF of the paper titled Course-Correction: Safety Alignment Using Synthetic Preferences, by Rongwu Xu and 8 other authors
References & Citations
Bibliographic and Citation Tools
Bibliographic Explorer(What is the Explorer?)
Connected Papers(What is Connected Papers?)
Litmaps(What is Litmaps?)
scite Smart Citations(What are Smart Citations?)
Code, Data and Media Associated with this Article
alphaXiv(What is alphaXiv?)
CatalyzeX Code Finder for Papers(What is CatalyzeX?)
DagsHub(What is DagsHub?)
Gotit.pub(What is GotitPub?)
Hugging Face(What is Huggingface?)
Papers with Code(What is Papers with Code?)
ScienceCast(What is ScienceCast?)
Demos
Recommenders and Search Tools
Influence Flower(What are Influence Flowers?)
CORE Recommender(What is CORE?)
arXivLabs: experimental projects with community collaborators
arXivLabs is a framework that allows collaborators to develop and share new arXiv features directly on our website.
Both individuals and organizations that work with arXivLabs have embraced and accepted our values of openness, community, excellence, and user data privacy. arXiv is committed to these values and only works with partners that adhere to them.
Have an idea for a project that will add value for arXiv's community?Learn more about arXivLabs.