← All methodologies

Reinforcement Learning from Contrastive Distillation

RLCD
Learn from deliberately contrasting examples.

Generate answers with opposite instructions. Treat them as a preference pair, train a scoring model, then use its scores for reinforcement learning.

The idea

A writing exercise asks for one clear explanation and one deliberately confusing explanation. Putting them side by side makes the intended difference easier to spot. The labels can still be wrong if the writer ignores the instructions.

Two prompts create the contrast.

The task

Explain how a bicycle brake works.

Positive prompt: be clear

Squeezing the lever pulls the brake, which slows the wheel.

Negative prompt: be confusing

Deceleration follows the actuation of a frictional interface.

Feedback

Prefer the positive-prompt output by construction, not because a person checked this pair.

Synthetic preference pairs → train a reward model

That reward model scores new answers during RL training.

An illustrative pair, not a measured result. Unlike a typical RLAIF comparison, the labels here come from the contrasting prompts, not a separate judge choosing the winner.

How RLCD works

  1. Pick a principle

    For example, make an explanation helpful or easy to understand.

  2. Generate a contrast

    Use a positive instruction and an opposing negative instruction.

  3. Learn the preference

    Train a reward model on the resulting preferred and dispreferred pairs.

  4. Train with rewards

    Improve the assistant using that reward model and an RL algorithm.

Useful for

Generating preference data around a written principle when human comparisons are scarce.

The catch

The positive-prompt answer is not automatically better. Noisy generated pairs can teach the reward model the wrong lesson.

A little more detail

What the name means here

This guide uses RLCD as defined in Yang and colleagues’ paper: reinforcement learning from contrastive distillation. It is a specific research method, not a name for every kind of synthetic training data.

Read the research

These guides simplify the methods. The papers describe the full training recipes. Examples on this page are illustrative, not experimental results.