English

Alignment with Preference Optimization Is All You Need for LLM Safety

Machine Learning 2024-09-13 v1

Abstract

We demonstrate that preference optimization methods can effectively enhance LLM safety. Applying various alignment techniques to the Falcon 11B model using safety datasets, we achieve a significant boost in global safety score (from 57.64%57.64\% to 99.90%99.90\%) as measured by LlamaGuard 3 8B, competing with state-of-the-art models. On toxicity benchmarks, average scores in adversarial settings dropped from over 0.60.6 to less than 0.070.07. However, this safety improvement comes at the cost of reduced general capabilities, particularly in math, suggesting a trade-off. We identify noise contrastive alignment (Safe-NCA) as an optimal method for balancing safety and performance. Our study ultimately shows that alignment techniques can be sufficient for building safe and robust models.

Cite

@article{arxiv.2409.07772,
  title  = {Alignment with Preference Optimization Is All You Need for LLM Safety},
  author = {Reda Alami and Ali Khalifa Almansoori and Ahmed Alzubaidi and Mohamed El Amine Seddik and Mugariya Farooq and Hakim Hacid},
  journal= {arXiv preprint arXiv:2409.07772},
  year   = {2024}
}
R2 v1 2026-06-28T18:42:03.941Z