Reinforcement learning

Wiki chapters and blog posts about Reinforcement learning.

Wiki

World models and planning: from prediction to closed-loop control

A world model predicts how actions change state. A planner compares candidate sequences and corrects its plan with observations. This tutorial explains latent dynamics and verifies replanning after a map error with a grid simulator.

Intermediate 11 min read

Preference Optimization: From RLHF to DPO

After SFT a model follows instructions, but its answers are not always the ones people prefer. Preference optimization aligns it using comparisons: RLHF trains a reward model and optimizes with PPO, while DPO reduces the pipeline to a classification-style loss on preference pairs.

Advanced 17 min read

Reinforcement Learning for Reasoning: RLVR and GRPO

Since o1 and DeepSeek-R1, making a model think longer before answering has become the main line of post-training. Why verifiable rewards (RLVR) can replace a reward model, how GRPO drops the value model, and the recipe and pitfalls of R1-Zero and R1.

Advanced 21 min read

Reward Models: Turning Human Preferences into a Score to Optimize

A reward model scores a prompt-and-response pair with one number, trained on pairwise comparisons; RLHF, rejection sampling and best-of-n all use it. This page derives the Bradley–Terry loss, measures the accuracy ceiling set by label noise, and reproduces overoptimization in simulation.

Intermediate 46 min read

Reasoning RL systems: asynchronous rollouts and policy lag

Reasoning RL joins generation, grading, learning, and weight publication. Asynchronous execution overlaps work and introduces policy lag. A runnable scheduling simulation separates elapsed time, accepted batches, and discarded trajectories.

Intermediate 9 min read

Reinforcement Learning Basics: Policy Gradients, Advantages and PPO

Policy gradients, baselines, GAE, PPO clipping and the KL penalty are the toolkit behind RLHF and reasoning RL. This page measures each on a toy task small enough to enumerate exactly: how baselines cut variance, why clipping is not a trust region, and where the KL belongs.

Intermediate 58 min read

Blog posts

GDPO: Why Multi-Reward RL Should Normalize Each Reward on Its Own

GDPO is NVIDIA's January 2026 fix for multi-reward RL. GRPO sums the rewards before normalizing, which can collapse different reward combinations into one advantage; GDPO normalizes each reward first. This post re-enumerates the paper's counts and flags claims that do not check out.

Paper notes arXiv 2026

GSPO: Moving Importance Ratios and Clipping From Tokens to Whole Responses

GSPO (Group Sequence Policy Optimization), from the Qwen team in 2025, replaces GRPO's per-token importance ratios and clipping with one length-normalized ratio per response, and reportedly needs no Routing Replay for MoE models. This post reviews it and verifies its gradients in code.

Paper notes arXiv 2025

Does RL expand reasoning capacity? Evidence from pass@k

Using large-k pass@k, this study finds RL improves small-k success while base models often match or exceed coverage at large k, suggesting RL redistributes existing ability more than creating new reasoning.

Paper notes arXiv 2025

DeepSeek-R1: Incentivizing Reasoning Capability in LLMs via Reinforcement Learning

DeepSeek-R1 shows that large-scale reinforcement learning with automatically checkable rewards lets a base model grow long chains of thought; a cold start and four stages make it usable. We recompute the paper's data and cost tables, list what does not add up, and cover later corrections.

Paper notes arXiv; Nature 645 (2025) 2025

rStar-Math: Self-evolved MCTS for mathematical reasoning

rStar-Math co-evolves a 7B policy and process reward model over four rounds. MCTS generates stepwise trajectories and step preferences train the verifier, reaching 58.8% on MATH without GPT-4 distillation.

Paper notes arXiv 2025

DeepSeekMath: Math Corpus, GRPO and a Unified View of Reinforcement Learning

DeepSeekMath 7B continues pretraining on 120B tokens of web math, then uses GRPO, reinforcement learning without a value model, to reach 51.7% on MATH with no tools or voting. This post covers the corpus pipeline, ablations, GRPO's math and a unified view of SFT, RFT, DPO, PPO and GRPO.

Paper notes arXiv 2024

DreamerV3: One Set of Hyperparameters for 150+ Tasks with a World-Model Agent

DreamerV3 (Hafner et al., 2023) learns a world model and trains an actor and critic on imagined latent trajectories. With symlog, twohot regression, free bits and percentile return normalization, one hyperparameter set beats or matches specialists on 150+ tasks and finds a Minecraft diamond.

Paper notes arXiv 2023

InstructGPT: Training Language Models to Follow Instructions with Human Feedback

OpenAI's 2022 InstructGPT paper: supervised fine-tuning on about 13,000 human demonstrations, a reward model trained on human rankings of about 33,000 prompts, then PPO. A 1.3B InstructGPT beat the 175B GPT-3 in labeler evaluations. This breakdown checks the data, loss and results, and their limits.

Paper notes NeurIPS 2022

Decision Transformer: Reinforcement Learning as Conditional Sequence Modeling

Decision Transformer (Chen et al., 2021) recasts offline RL as conditional sequence modeling: a causal GPT trained on return, state and action tokens, prompted with a target return. We recompute its tables, rerun its shortest-path toy, and show where return conditioning fails.

Paper notes NeurIPS 2021 2021

Learning to Summarize: A Reward Model from Human Preferences, Optimized with PPO

OpenAI ran the full RLHF pipeline on Reddit TL;DR summaries: collect human pairwise comparisons, train a reward model, then optimize the policy with KL-penalized PPO. A 1.3B human-feedback model beat a supervised model 10 times larger. Code checks the KL optimum and over-optimization.

Paper notes NeurIPS 2020 2020

AlphaZero: Only the Rules, Self-Play from Scratch, Mastering Chess, Shogi and Go

AlphaZero used one algorithm and one set of hyperparameters, given only the rules, to learn chess, shogi and Go from random play via self-play with a neural network and Monte Carlo tree search (MCTS), and beat each world-champion program. This post checks shapes, match statistics and search volume.

Paper notes arXiv preprint 2017

Topics