Fine-Tuned Reinforcement Learning

Machine Learning
Introduced by
Christiano, P. et al.; Ouyang, L. et al.
Year
2017–2022
Type
Policy adaptation via fine-tuning
Family
Deep learning / NLP / CV

What does it do?

Fine-tuned reinforcement learning adapts a pre-trained policy or model to a new task or behavioural objective, using reinforcement signals that may include human feedback, rather than training from scratch.

Its best-known variant, reinforcement learning from human feedback (RLHF), is used to align large language models with human preferences. The same idea can also be applied to deep RL agents adapted to specialised environments.

The intuition behind the method

Training a reinforcement learning agent from scratch is slow and expensive. If a capable base policy already exists, perhaps trained on a broad task or with self-supervised objectives, it can be adapted to a narrower goal by running targeted RL updates on top of it. The central tension is that the policy must learn the new objective without forgetting its general competence. The method addresses this with a KL penalty toward the base policy and conservative, clipped update steps.

History

Christiano et al. (2017) published Deep reinforcement learning from human preferences, which learns reward functions from human comparisons of agent behaviour. Ouyang et al. (2022) applied preference-based fine-tuning to instruction-following language models, training them with human feedback.

When to use it

Use fine-tuned RL when a capable base policy or model already exists and its behaviour must be adapted to a specific goal, such as aligning language model outputs with human preferences or adapting a pre-trained agent to a narrower objective. It is most useful when task-specific labelled data is scarce but a reward signal or human rankings can be obtained. Do not use it when no adequate base policy exists, because fine-tuning a weak prior will not correct foundational deficiencies; supervised pretraining or training from scratch comes first in that case. Avoid it when the reward signal is poorly specified, since reward hacking then becomes the dominant risk. Three assumptions should hold, and each can be checked before committing: the base policy is already competent on the target task (evaluate it before any updates); the reward signal is a valid proxy for the intended behaviour (compare it against held-out human judgements or environment outcomes); and the target environment or data distribution is reasonably close to the base policy's training distribution (compare input statistics, or measure performance on a held-out set from the original domain).

Limitations and considerations

  • Performance is bounded by the base policy; fine-tuning cannot compensate for a fundamentally weak prior.
  • Reward hacking is a persistent risk: because the reward is a proxy, optimisation pressure can exploit its errors and produce behaviour that scores well but is not what was intended.
  • Collecting human preference data is costly, and annotator disagreement is inherited by any reward model trained on those comparisons.
  • Clipping limits the change per update but does not by itself prevent drift across many updates, which is why a separate KL term is usually added.
  • A shift between the base policy's original environment and the new task can make fine-tuning unstable.

Source conditions do not replace independent scientific review or validation by an analysis engine.

Strengths

  • Starts from a pre-trained policy, so the RL phase begins from existing competence rather than random initialisation, and typically needs fewer environment interactions than training from scratch.
  • The reward can be learned from pairwise human comparisons, as in Christiano et al. (2017), so a target behaviour that is hard to write as a hand-coded reward can still be specified.
  • The KL penalty toward the frozen base policy anchors the adapted policy to its prior behaviour, which is the main mechanism for limiting catastrophic forgetting.
  • The clipped surrogate bounds how far the probability ratio can change in one update, which keeps individual PPO steps conservative.
  • Preference-based fine-tuning has been applied to instruction-following language models, as described in Ouyang et al. (2022).

Applications

  • Aligning large language models with human preferences and instruction-following via RLHF, as studied in Ouyang et al. (2022).
  • Illustrative only, outside the cited sources: adapting a pre-trained game-playing or robotic control policy to new rules, levels or tool configurations.

How it works

How it works

1

A base policy or model is first trained on a broad task using supervised learning, self-supervised pretraining, or conventional RL. This pre-trained policy encodes general capabilities, such as language understanding or task competence, that fine-tuning then specialises. The result of fine-tuning is bounded by the quality of this base policy.

2

A reward signal is defined for the target task. In RLHF it usually comes from a reward model fitted to human preference comparisons, as in the preference-learning approach of Christiano et al. (2017). In robotics or games it may instead come from environment feedback, sparse goal-achievement signals, or a learned reward function. This signal determines which behaviours are reinforced during adaptation.

3

The policy is updated with an RL algorithm, commonly PPO, applied to trajectories sampled from the current policy and scored by the reward signal. The expression in mechanics is the clipped PPO surrogate only. Here r_t(theta) is the probability ratio between the current and previous policy for the action at step t, and A_t is the advantage estimate of that action relative to a baseline. The clipping parameter epsilon limits how far the ratio can move from 1 in a single update, which keeps individual steps small. Full PPO objectives also include value-function and entropy terms, which are not part of this formula.

Formula
L^{CLIP}(\theta) = \mathbb{E}_t\left[\min\left(r_t(\theta)\hat{A}_t,\ \text{clip}(r_t(\theta), 1-\varepsilon, 1+\varepsilon)\hat{A}_t\right)\right]
4

A KL-divergence penalty between the fine-tuned policy and the original base policy is typically added to the RL objective. The clipped surrogate shown in mechanics does not include this term; practical RLHF objectives combine the two, with the KL penalty weighted by a coefficient. Its role is to anchor the policy near its pre-trained behaviour, so that clipping alone does not allow cumulative drift over many updates.

5

The fine-tuned policy is evaluated on the target task, and the reward model or environment feedback is used to refine it over repeated cycles. In RLHF, human evaluators may re-rank outputs across rounds, and the reward model may be retrained on the new comparisons. Common practice is to stop when a held-out target metric reaches the required level, to monitor the KL divergence from the base policy so that drift stays within an acceptable range, and to check the reward model against held-out human preferences. A rise in reward alongside falling held-out quality is a sign that the policy has begun to exploit the reward.

Common pitfalls

  • Relying on a narrow or poorly specified reward model and expecting the fine-tuned policy to generalise to broader goals.
  • Using a learning rate that is too high, which can erase base-policy capabilities during adaptation.
  • Omitting the KL penalty, so the policy can drift arbitrarily far from the pre-trained base.
  • Reporting results without stating which prior knowledge was used, which makes fine-tuned RL hard to distinguish from RL trained from scratch.
  • Failing to check the reward model for systematic bias in its preference labels before using it to optimise a policy at scale.

Frequently asked questions

What is the difference between fine-tuned RL and standard RL?

Standard RL trains a policy from random initialization using environment reward signals over many interactions. Fine-tuned RL starts from a pre-trained base policy and applies targeted RL updates to adapt behavior. Because it begins from existing competence, it often requires fewer interactions than training from scratch, although the saving depends on the base policy and the task.

Is RLHF the only form of fine-tuned RL?

No. RLHF is the most prominent variant, using human preference comparisons as the reward signal, but fine-tuned RL also includes policy adaptation via environment reward, goal-conditioned fine-tuning, and offline RL fine-tuning on curated datasets.

How do I prevent catastrophic forgetting during RL fine-tuning?

The standard approach is to add a KL-divergence penalty between the current policy and the frozen base policy to the RL objective. This penalizes large deviations from the prior, preserving general capabilities while allowing targeted adaptation.

What reward model do I need for RLHF?

Typically a neural network trained on human pairwise preference comparisons — annotators rank output pairs, and the reward model learns to predict which output humans prefer. The quality of this reward model is the primary bottleneck for alignment quality.

When should I use PPO versus other RL algorithms for fine-tuning?

PPO is the most common choice due to its stability, the availability of its clipped surrogate objective for constrained updates, and strong empirical track record in RLHF. Alternatives such as REINFORCE or DPO (Direct Preference Optimization) may be preferred when simplicity or offline training is prioritized.

Related methods

Sources

  1. Ouyang, L., Wu, J., Jiang, X., Almeida, D., Wainwright, C., Mishkin, P., Zhang, C., Agarwal, S., Slama, K., Ray, A., Schulman, J., Hilton, J., Kelton, F., Miller, L., Simens, M., Askell, A., Welinder, P., Christiano, P., Leike, J., & Lowe, R. (2022). Training language models to follow instructions with human feedback. Advances in Neural Information Processing Systems, 35, 27730–27744.

    Open publication reference
  2. Christiano, P., Leike, J., Brown, T. B., Martic, M., Legg, S., & Amodei, D. (2017). Deep reinforcement learning from human preferences. Advances in Neural Information Processing Systems, 30.

    Open publication reference