Home › Tracks › Applied ML & Model Engineering › Preference Optimization, RLVR & Machine-Checked Autoformalization
Week 9 concept
Preference Optimization, RLVR & Machine-Checked Autoformalization
Master post-training reasoning alignment using Reinforcement Learning with Verifiable Rewards (RLVR) and Group Relative Policy Optimization (GRPO), eliminating critic networks and scaling deliberate reasoning tokens in verifiable environments.
Bridges to Machine Learning — reinforcement learning and policy optimizationBuilds on: Parameter-Efficient Fine-Tuning: LoRA & QLoRA
Study notes
Master this concept.
Preference Optimization: RLVR & Machine-Checked Autoformalization
What it is
Preference optimization is the process of refining a model's output to align with specific goals or human preferences. RLVR (Reinforcement Learning with Verifiable Rewards) is a specialized approach where the "reward" is not a subjective human score, but a binary, objective truth, such as whether a piece of code compiles or a mathematical proof is logically sound.
Why it matters
Standard RLHF (Reinforcement Learning from Human Feedback) relies on human proxies who can be fooled by "sycophancy" or plausible-sounding but incorrect answers. In high-stakes domains like software engineering or formal mathematics, "looking correct" is not enough. RLVR allows models to engage in autonomous trial-and-error, scaling their reasoning capabilities by relying on hard, machine-verifiable ground truth.
Core concepts to master
- GRPO (Group Relative Policy Optimization): An optimization technique that removes the need for a separate "critic" model. Instead, it samples a group of outputs for the same prompt and optimizes the model based on how each output performs relative to the group average.
- Verifiable Rewards: Rewards derived from external tools (compilers, lean provers, unit tests) rather than a reward model. This eliminates "reward hacking," where the model learns to trick a neural reward predictor.
- Reasoning Tokens: The process of encouraging the model to generate internal "thought chains" (deliberate reasoning) before providing the final answer, which is then verified.
- Autoformalization: The act of translating natural language problems into formal mathematical languages that a machine can verify, creating a closed-loop system for self-improvement.
Common mistakes
- Over-reliance on Reward Models: Assuming a neural network can accurately judge complex logic without an external verifier.
- Ignoring Diversity: Failing to sample a sufficiently diverse group of responses during GRPO, which leads to premature convergence and stunted reasoning.
- Reward Hacking: Designing rewards that are too narrow, allowing the model to find a "shortcut" to the reward without actually solving the problem.
Track connection
This concept bridges the gap between basic Supervised Fine-Tuning (SFT) and fully autonomous agentic reasoning. It transforms the model from a pattern matcher into a problem solver capable of iterative self-correction.
Go to the source
Read, watch, and practice.
Free, world-class material chosen for this concept.
- Paper DeepSeek-R1: Incentivizing Reasoning Capability in LLMs via Reinforcement Learning arXiv (DeepSeek-AI) Free (opens in a new tab)
- Paper DeepSeekMath: Pushing the Limits of Mathematical Reasoning in Open Language Models (GRPO) arXiv (Shao et al.) Free (opens in a new tab)
- Paper Direct Preference Optimization: Your Language Model is Secretly a Reward Model arXiv (Rafailov et al.) Free (opens in a new tab)
- Repository Lean 4 Programming Language and Formal Theorem Prover Lean Prover Community Free (opens in a new tab)
- Repository TRL - Transformer Reinforcement Learning (GRPO & DPO) Hugging Face Free (opens in a new tab)