RLCD: Reinforcement Learning from Contrastive Distillation for Language Model Alignment

Kevin Yang, Dan Klein, Asli Celikyilmaz, Nanyun Peng, Yuandong Tian
7/24/2023
cs.CLcs.AI

No official code found. Best implementation: facebookresearch/RLCD (76 stars, MIT, last commit 2023-08-18).

Abstract

We propose Reinforcement Learning from Contrastive Distillation (RLCD), a method for aligning language models to follow principles expressed in natural language (e.g., to be more harmless) without using human feedback. RLCD creates preference pairs from two contrasting model outputs, one using a positive prompt designed to encourage following the given principles, and one using a negative prompt designed to encourage violating them. Using two different prompts causes model outputs to be more differentiated on average, resulting in cleaner preference labels in the absence of human annotations. We then use the preference pairs to train a preference model, which is in turn used to improve a base unaligned language model via reinforcement learning. Empirically, RLCD outperforms RLAIF (Bai et al., 2022b) and context distillation (Huang et al., 2022) baselines across three diverse alignment tasks--harmlessness, helpfulness, and story outline generation--and when using both 7B and 30B model scales for simulating preference data.

View on arXivView PDF

Code Implementations(1)

MIT

Reproduction of "RLCD Reinforcement Learning from Contrast Distillation for Language Model Alignment

766PythonAug 7, 20233 years agoMIT

Similar Papers

Cite this paper

@article{yang2023rlcd,
  title  = {RLCD: Reinforcement Learning from Contrastive Distillation for Language Model Alignment},
  author = {Kevin Yang and Dan Klein and Asli Celikyilmaz and Nanyun Peng and Yuandong Tian},
  year   = {2023},
  eprint = {2307.12950},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2307.12950v3}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2307.12950.svg)](https://codeofpaper.com/paper/2307.12950)

Discussion