# RLCD: Reinforcement Learning from Contrastive Distillation for Language Model Alignment

- **ID:** 989
- **Kind:** paper
- **URL:** https://arxiv.org/abs/2307.12950
- **Authors:** Kevin Yang, Dan Klein, Asli Celikyilmaz, Nanyun (Violet) Peng, Yuandong Tian
- **Venue:** ICLR 2024 / Meta FAIR (arXiv 2307.12950)
- **Publisher:** ICLR 2024 / Meta FAIR (arXiv 2307.12950)
- **Published:** 2023
- **Source:** arxiv
- **Language:** en
- **Access:** https://arxiv.org/abs/2307.12950 ; ICLR 2024; https://github.com/facebookresearch/RLCD
- **License:** arXiv; code see FAIR repo
- **License family:** Other (auto-classified)
- **Tags:** rlcd, meta, fair, contrastive-distillation, rlaif, rlhf, ppo, alignment, acronym-collision
- **Topics:** LLM alignment, preference simulation, RLAIF alternative, PPO
- **Added:** 2026-09-16
- **Verified:** 2026-09-16
- **Research status:** done
- **Needs deep evaluation:** no
- **Page:** https://papers.projxon.ai/entries/989

## Summary

Canonical Meta/FAIR RLCD (≠ TypeSafe). For each prompt p, build p+ (encourage desired attribute) and p− (encourage opposite); sample o+/o− from the same unaligned LLM; auto-label o+ preferred (no post-hoc judge). Train preference/reward model on those pairs, then PPO-align the base LM as in RLHF. Contrastive generation differentiates outputs more than i.i.d. sampling, yielding cleaner synthetic prefs. Beats RLAIF and context distillation on harmlessness, helpfulness, and story outlining at 7B and 30B preference-sim scales (LLaMA). Code: facebookresearch/RLCD.

## Attributes

- **Purpose:** Align LMs to natural-language principles without human preference labels by simulating cleaner preference pairs via contrastive prompts
- **Scale:** LLaMA 7B/30B preference simulation; Anthropic HH prompts for helpful/harmless
- **Domain:** LLM alignment, preference simulation, RLAIF alternative, PPO
- **Used for:** Unknown
- **Time period:** arXiv 2023-07-24; ICLR 2024
- **Author type:** industry+academic

## From the source (fetched 2026-10-03)

- **Published:** Jul 24, 2023 (arXiv)
- **Last revised:** Mar 16, 2024 (arXiv)
- **arXiv categories:** cs.CL, cs.AI (arXiv)
- **Author comment:** ICLR 2024 (arXiv)
- **Citations:** 46 (11 influential) (Semantic Scholar)
- **References:** 41 (Semantic Scholar)

## 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.

## Research notes

- Project Discover RLCD research 2026-09-16. Companion code catalog 1397. Acronym-only collision with TypeSafe RLCD (=Reinforcement Learning for Calibrated Decisions). HF harshatheg/Qwen-2.5-1B-RLCD (1373) is unrelated parallel constrained decoding despite name. Closest published objective cousin to TypeSafe calibration claim: RLCR 2507.16806 catalog 1398.

## Cited by, within this collection

- [Just Ask Jev: Reinforcement Learning for Calibrated Decisions as a Zero-Shot Detector of AI Alignment Failures](https://papers.projxon.ai/entries/1079) (paper 2026, #1079)

## Similar entries

- [facebookresearch/RLCD (official reproduction code)](https://papers.projxon.ai/entries/990) (code, #990)
- [Unslopping AI: Reinforcement Learning from eXpert-Aligned Rubrics (RL-XAR)](https://papers.projxon.ai/entries/742) (thread, #742)
- [Reinforcement Learning for LLMs: The Complete Guide](https://papers.projxon.ai/entries/1039) (paper, #1039)
- [Continual Learning via Sparse Memory Finetuning](https://papers.projxon.ai/entries/540) (paper, #540)
- [When Do Larger Batches Help Scale LLM Reinforcement Learning?](https://papers.projxon.ai/entries/1041) (paper, #1041)
- [PufferLib](https://papers.projxon.ai/entries/713) (code, #713)
