Back to selected work
Completed studyFeb 2026; Oct 2026 · Alignment research

Reward Over-Optimisation in KL-Regularised RL Alignment of a Small GPT

A from-scratch alignment pipeline on a 0.8M-parameter GPT, and a KL sweep showing exactly when the policy starts reward-hacking.

The problem

Why build this?

Large alignment stacks obscure the mechanics of policy optimization. A small, reproducible model makes reward shaping, policy drift, and KL control easier to observe directly.

Approach

How it works

  • Built a three-stage pipeline: pretraining, supervised fine-tuning, and policy-gradient optimization.
  • Used an automated sentiment reward and a KL penalty to a frozen reference policy.
  • Swept the KL coefficient from 0 to 1 and scored outputs with held-out judges the policy never trained on: a second sentiment lexicon, bigram diversity, and fluency under the base model.
  • Found and fixed two bugs that made the original KL estimate negative (dropout active while scoring, and off-policy top-k sampling).

Outcome

What came out of it

  • Without a KL penalty the proxy reward saturated at 0.996 while held-out sentiment fell from 0.70 to 0.50, as outputs collapsed to "love love love...".
  • A small penalty (beta = 0.01) gave higher held-out sentiment (0.77) at 30x lower KL, but did not prevent template collapse.

Technology

Tools used deliberately

PythonPyTorchPolicy gradientKL regularizationTinyStories

Source and evidence

The claims on this page are limited to the project repository, model page, public demo, and resume record.