RL @ ECE-UofT - Lecture 12: Bibliographical Notes and Advances
Overview
Ali Bereyhi closes the deep reinforcement learning course by explaining Soft Actor-Critic (SAC), which adds policy entropy to the reward to balance exploration with reward maximization, and by connecting core RL methods to recent advances. He surveys RL history, AlphaZero-style tree search and self-play, applications in data-center cooling and language-model post-training, and techniques for sparse rewards such as reward shaping, imitation learning, inverse RL, and human feedback.
Key takeaways
- SAC balances reward seeking and exploration by adding policy entropy to expected return, encouraging random choices when actions have similar value.
- AlphaZero combines policy and value heads in a residual CNN with Monte Carlo tree search, then improves through self-play rather than relying only on immediate policy samples.
- Sparse rewards are a safety and data problem in physical RL: dangerous failures cannot be sampled freely, so reward shaping and expert demonstrations can provide denser supervision.
- Behavior cloning learns to imitate expert actions, while DAgger addresses distribution shift by labeling states encountered by the learner and adding them to its dataset.
- Inverse RL reverses the usual setup by inferring a reward function from expert behavior, but the reward may be ambiguous even when expert demonstrations are available.
- Language-model generation can be framed as RL: the prompt and generated tokens define the state, the next token is an action, and PPO can optimize post-training behavior.
Chapters
- Actor-critic methods pair a policy network with a value estimator, which supports advantage estimates such as action value minus state value.
- A TD error can approximate advantage using the immediate reward, the next state's value, and the current state's value.
- Deterministic policy gradient combines a policy network that proposes an action with a Q-network that evaluates it, rather than directly maximizing over actions.
- Value-based and deterministic methods can reuse experience efficiently, while stochastic policy-gradient methods generally need fresh samples as importance weights become less useful.
- Stochastic policies can improve exploration and training stability, motivating a hybrid approach that controls randomness instead of removing it.
- SAC adds an entropy term to the objective so policies retain adjustable exploration while seeking high reward.
- Claude Shannon's information theory assigns an outcome information content of log(1 / P(x)); rarer outcomes carry more information.
- With base-2 logarithms, an event with probability 1/2 carries one bit of information.
- Bereyhi illustrates the idea by contrasting his expected appearance in class with the much less likely appearance of a prime minister.
- Entropy averages each outcome's self-information over its probability distribution.
- For a binary variable, entropy is zero when one outcome is certain and reaches one bit when both outcomes have probability 1/2.
- A more unpredictable distribution has higher entropy, while a deterministic process such as a fixed weekly lecture has little or no entropy.
- A stochastic policy has positive action entropy, whereas a deterministic policy has zero entropy at a given state.
- Adding entropy to reward favors randomization when multiple actions have equal reward, such as choosing equally between two actions that both pay eight.
- Bereyhi connects this principle to uniform exploration in discrete action spaces and Gaussian noise for continuous actions, noting that Gaussian distributions maximize entropy under a fixed variance.
- SAC modifies the objective by adding policy entropy to expected return; in an actor-critic implementation, this creates an explicit policy-dependent value target.
- Bereyhi describes implementation as adding an entropy term to the reward and managing gradients so the policy's contribution is captured correctly.
- For discrete actions and plentiful samples, stochastic actor-critic methods such as PPO can be straightforward; for continuous actions or scarce samples, deterministic policy gradient may be preferable.
- Bereyhi recommends OpenAI Spinning Up and libraries such as TorchRL for reviewing baseline algorithms and checking implementation details.
- Richard Bellman's dynamic programming and Bellman equation formalized MDP problems in the 1950s; Monte Carlo methods followed as model-free approaches.
- Richard Sutton helped establish RL as a distinct machine-learning area, including temporal-difference learning and bootstrapping in the 1970s.
- Early RL research was mathematically demanding and had a smaller audience partly because convergence arguments were needed to justify bootstrapping methods.
- DeepMind's 2013 Deep Q-learning work applied neural networks and RL to Atari games, helping renew interest in the field after deep learning's ImageNet successes.
- OpenAI's TRPO and PPO brought policy-gradient methods back into practical use after concerns about their sample inefficiency.
- Bereyhi describes DeepMind, including researcher David Silver, as a major early contributor to modern deep RL and AlphaGo.
- OpenAI Gym provided reusable environments for RL experiments and made it easier to compare algorithms or define new tasks.
- TRPO and PPO developed from renewed work on policy gradients; the lecture highlights Schulman and Pieter Abbeel among researchers associated with this line of work.
- AlphaZero uses a residual CNN with shared features and separate policy and value heads to evaluate a board position and propose moves.
- Monte Carlo tree search simulates possible continuations using the learned policy and value estimates, then uses search results to select a move.
- Rather than immediately sampling from the policy, inference searches candidate branches and may choose an action that looks better over several moves.
- AlphaZero generates training trajectories by playing against itself, using tree search to guide moves and outcomes to update its policy and value networks.
- The original training process repeatedly generated self-play games and updated both network heads; Bereyhi reports that the system reached superhuman chess performance after about 24 hours.
- The approach differs from older chess programs that relied on large-scale search without the same learned policy-and-value framework.
- AlphaDev applies AlphaZero-like search and learning to algorithm design, exploring combinations of implementation choices to find efficient programs.
- The lecture describes AlphaDev results that improved on known implementations for tasks such as sorting.
- AlphaProof applies search over formal reasoning steps to mathematical proofs, using verifiable intermediate steps to explore candidate proof paths.
- Bereyhi discusses legged-robot control trained with policy-gradient methods as an early demonstration of RL applied to physical systems.
- He describes a table-tennis robot project using policy-gradient training and separate policy and value networks, with near-deterministic action selection needed for precise play.
- Physical deployment remains difficult because unsafe exploration, hardware limits, and safety requirements make direct trial-and-error costly.
- A DeepMind data-center cooling project used deep RL to control cooling systems; the reported result was up to a 40% reduction in cooling energy use.
- For language-model post-training, the current generated text and prompt form the state, and choosing the next token is the action.
- A transformer softmax defines a token policy, allowing methods such as PPO to optimize generated responses toward goals such as answering questions or solving math problems.
- In autonomous driving, safe trips may produce few informative rewards, while crashes are too dangerous to generate deliberately as training examples.
- Medical robotics illustrates the constraint: a robot cannot safely collect many failed spinal injections to learn from negative outcomes.
- Sparse feedback leaves an RL agent with too few learning signals, especially when experimentation is limited by safety.
- Reward shaping supplies intermediate feedback, such as penalizing each step in FrozenLake when the goal is to reach the destination quickly.
- Expert demonstrations can teach a policy safer behavior when direct exploration would be dangerous or feedback is sparse.
- Imitation learning often begins as supervised function approximation: a neural network learns to match an expert's actions before RL fine-tunes the policy.
- Behavior cloning trains a policy to reproduce expert actions in observed states, but performance can degrade when the learner encounters states missing from the demonstrations.
- DAgger addresses this mismatch by collecting learner-generated states, obtaining expert labels, and adding them to the training set.
- For robot-arm tasks, Bereyhi describes first demonstrating actions such as grasping an object, then using RL to improve the initialized policy.
- Bereyhi distinguishes a demonstration-trained, rule-based or open-loop driving component from closed-loop control that can use RL.
- He cautions that pure RL driving may work in simulation but is difficult to validate safely on real roads.
- Expert trajectories can supervise variables such as steering direction, velocity, and acceleration, while RL handles selected feedback-control tasks.
- Forward RL assumes a reward function and searches for a good policy; inverse RL starts with expert behavior and seeks to infer the reward that could explain it.
- A learned reward model can score state-action pairs, using expert demonstrations as evidence about the desired behavior.
- The problem is underdetermined and difficult: different reward functions may explain similar behavior, as in trying to infer a financial advisor's objectives from market decisions.
- Expert explanations can add context to action demonstrations, including reasoning that is difficult to express as numeric labels.
- Language models may help process natural-language accounts from experts and turn them into useful representations for learning.
- Reinforcement learning from human feedback uses evaluations of previous outputs as additional signals; Bereyhi connects this approach to language-model post-training.
- Multi-agent RL models each participant as an agent with its own policy; agents may cooperate on shared rewards or compete, as in chess.
- Game theory becomes relevant when agents' objectives interact, including settings where system design can encourage cooperation.
- Bereyhi recommends the TicTacTool project as a hands-on comparison of tabular methods, DQN, and AlphaZero across different Tic-Tac-Toe board sizes.
Transcript excerpt
0:01 Yeah. So we ended up with I mean we talked about deterministic policy gradient, right? So if just quick recap of what we did last time. So we basically talk about actor-critic and for actor-critic we said like you can think of PGMs again like policy gradient methods. The only difference is that now you want to have network which is capable of estimating your value because at the end of the day for policy gradient methods you need to have access to the value, right? So most of the time you use value to to do what? What do you use the value function for when you are doing policy gradient? To estimate something. That thing is
0:48 called the advantage, right? You typically want to estimate advantage, right? That U U term which is essentially your estimate of the action value minus your estimate of the value, right? And it turns out that if you have just a value function, the value of the state not the action value, you can essentially do that simply you doing bootstrapping, right? Immediate reward plus the value of the next state that is what you get as your action value estimate minus the value of the current state. That looks like a TD error, right? So sorry. All the time you need that guy and if you want to have it or to to compute it you need to have a value network as
1:36 well. So the whole discussion that we have we had last time was that you can include a value network, right? Now the value network that you're including it could be a separate network. So you have a value separate neural network which is taking the representation of your state and it's computing the value for you. You
This is the start of the transcript. Save this video free for the whole transcript, searchable and time-coded.
In this course
Related notes
Summary, takeaways, and chapters were generated by AI from the video's transcript and may contain errors. The video belongs to its creator, Ali Bereyhi.