Compare rejection sampling with policy updating

Watch prefixes in words such as preferred and rejected. · 173 words

Instruction tuning teaches a model with examples of instructions and good responses. Rejection sampling builds examples by filtering generated candidates. For "Write one polite sentence giving the museum opening time," suppose four replies are generated: "It opens at 9," "The museum opens at 9am," "Opening is 9am," and "The museum opens at 10am." A human rates them 4, 3, 2, and 1. Rejection sampling keeps ratings of at least 3, so the first two become supervised fine-tuning data. The model imitates accepted replies; rejected replies are discarded, not labeled as bad.

Policy updating is the broader act of changing parameters to improve behavior. An updater can use preference pairs, such as preferred "It opens at 9" over "The museum opens at 10am," and reward increasing the chosen reply's probability relative to the rejected one. In a toy case, chosen and rejected probabilities change from 0.30 and 0.20 to 0.45 and 0.12, so their gap grows from 0.10 to 0.33. Rejection sampling filters data; policy updating describes the learning objective. They can be combined.

Check your recall

In the museum example, which replies survive rejection sampling, and what changes during policy updating?

Check your answer

The replies rated 4 and 3 survive, because the acceptance threshold is 3. Rejection sampling selects which examples are used for training, while policy updating changes the model's parameters so that preferred replies receive larger probabilities relative to rejected ones.

Sources and credits

Original KeyTouch lesson. Background reading · Nathan Lambert · Reinforcement Learning from Human Feedback.