refresh your understanding multi armed bandits
play

Refresh Your Understanding: Multi-armed Bandits Select all that are - PowerPoint PPT Presentation

Lecture 12: Fast Reinforcement Learning 1 Emma Brunskill CS234 Reinforcement Learning Winter 2020 1 With some slides derived from David Silver Lecture 12: Fast Reinforcement Learning 1 Emma Brunskill (CS234 Reinforcement Learning ) Winter 2020


  1. Lecture 12: Fast Reinforcement Learning 1 Emma Brunskill CS234 Reinforcement Learning Winter 2020 1 With some slides derived from David Silver Lecture 12: Fast Reinforcement Learning 1 Emma Brunskill (CS234 Reinforcement Learning ) Winter 2020 1 / 62

  2. Refresh Your Understanding: Multi-armed Bandits Select all that are true: � UCB selects the arm with arg max a ˆ 1 Q t ( a ) + N t ( a ) log(1 /δ ) 1 Over an infinite trajectory, UCB will sample all arms an infinite number 2 of times UCB still would learn to pull the optimal arm the most if we instead 3 used arg max a ˆ � 1 √ Q t ( a ) + N t ( a ) log( t /δ ) UCB uses a bonus on top of average empirical reward. If the bonus was 4 ¿ 0 but small, the resulting algorithm might still suffer linear regret i Algorithms that minimize regret also maximize reward 5 Not sure 6 Lecture 12: Fast Reinforcement Learning 1 Emma Brunskill (CS234 Reinforcement Learning ) Winter 2020 2 / 62

  3. Class Structure Last time: Fast Learning (Bandits and regret) This time: Fast Learning (Bayesian bandits) Next time: Fast Learning and Exploration Lecture 12: Fast Reinforcement Learning 1 Emma Brunskill (CS234 Reinforcement Learning ) Winter 2020 3 / 62

  4. Recall Motivation Fast learning is important when our decisions impact the real world Lecture 12: Fast Reinforcement Learning 1 Emma Brunskill (CS234 Reinforcement Learning ) Winter 2020 4 / 62

  5. Settings, Frameworks & Approaches Over next couple lectures will consider 2 settings, multiple frameworks, and approaches Settings: Bandits (single decisions), MDPs Frameworks: evaluation criteria for formally assessing the quality of a RL algorithm. So far seen empirical evaluations, asymptotic convergence, regret Approaches: Classes of algorithms for achieving particular evaluation criteria in a certain set. So far for exploration seen: greedy, ǫ − greedy, optimism Lecture 12: Fast Reinforcement Learning 1 Emma Brunskill (CS234 Reinforcement Learning ) Winter 2020 5 / 62

  6. Table of Contents Recall: Multi-armed Bandit framework 1 Optimism Under Uncertainty for Bandits 2 Bayesian Bandits and Bayesian Regret Framework 3 Probability Matching 4 Framework: Probably Approximately Correct for Bandits 5 MDPs 6 Lecture 12: Fast Reinforcement Learning 1 Emma Brunskill (CS234 Reinforcement Learning ) Winter 2020 6 / 62

  7. Recall: Multiarmed Bandits Multi-armed bandit is a tuple of ( A , R ) A : known set of m actions (arms) R a ( r ) = P [ r | a ] is an unknown probability distribution over rewards At each step t the agent selects an action a t ∈ A The environment generates a reward r t ∼ R a t Goal: Maximize cumulative reward � t τ =1 r τ Regret is the opportunity loss for one step l t = E [ V ∗ − Q ( a t )] Total Regret is the total opportunity loss t V ∗ − Q ( a τ )] � L t = E [ τ =1 Lecture 12: Fast Reinforcement Learning 1 Emma Brunskill (CS234 Reinforcement Learning ) Winter 2020 7 / 62

  8. Table of Contents Recall: Multi-armed Bandit framework 1 Optimism Under Uncertainty for Bandits 2 Bayesian Bandits and Bayesian Regret Framework 3 Probability Matching 4 Framework: Probably Approximately Correct for Bandits 5 MDPs 6 Lecture 12: Fast Reinforcement Learning 1 Emma Brunskill (CS234 Reinforcement Learning ) Winter 2020 8 / 62

  9. Approach: Optimism Under Uncertainty Estimate an upper confidence U t ( a ) for each action value, such that Q ( a ) ≤ U t ( a ) with high probability This depends on the number of times N t ( a ) action a has been selected Select action maximizing Upper Confidence Bound (UCB) a t = arg max a ∈A [ U t ( a )] Theorem: The UCB algorithm achieves logarithmic asymptotic total regret � t →∞ L t ≤ 8 log t lim ∆ a a | ∆ a > 0 Lecture 12: Fast Reinforcement Learning 1 Emma Brunskill (CS234 Reinforcement Learning ) Winter 2020 9 / 62

  10. Simpler Optimism? Do we need to formally model uncertainty to get the ”right” level of optimism? Lecture 12: Fast Reinforcement Learning 1 Emma Brunskill (CS234 Reinforcement Learning ) Winter 2020 10 / 62

  11. Greedy Bandit Algorithms and Optimistic Initialization Simple optimism under uncertainty approach Pretend already observed one pull of each arm, and saw some optimistic reward Average these fake pulls and rewards in when computing average empirical reward Lecture 12: Fast Reinforcement Learning 1 Emma Brunskill (CS234 Reinforcement Learning ) Winter 2020 11 / 62

  12. Greedy Bandit Algorithms and Optimistic Initialization Simple optimism under uncertainty approach Pretend already observed one pull of each arm, and saw some optimistic reward Average these fake pulls and rewards in when computing average empirical reward Comparing regret results: Greedy : Linear total regret Constant ǫ -greedy : Linear total regret Decaying ǫ -greedy : Sublinear regret if can use right schedule for decaying ǫ , but that requires knowledge of gaps, which are unknown Optimistic initialization : Sublinear regret if initialize values sufficiently optimistically, else linear regret Lecture 12: Fast Reinforcement Learning 1 Emma Brunskill (CS234 Reinforcement Learning ) Winter 2020 12 / 62

  13. Table of Contents Recall: Multi-armed Bandit framework 1 Optimism Under Uncertainty for Bandits 2 Bayesian Bandits and Bayesian Regret Framework 3 Probability Matching 4 Framework: Probably Approximately Correct for Bandits 5 MDPs 6 Lecture 12: Fast Reinforcement Learning 1 Emma Brunskill (CS234 Reinforcement Learning ) Winter 2020 13 / 62

  14. Bayesian Bandits So far we have made no assumptions about the reward distribution R Except bounds on rewards Bayesian bandits exploit prior knowledge of rewards, p [ R ] They compute posterior distribution of rewards p [ R | h t ], where h t = ( a 1 , r 1 , . . . , a t − 1 , r t − 1 ) Use posterior to guide exploration Upper confidence bounds (Bayesian UCB) Probability matching (Thompson Sampling) Better performance if prior knowledge is accurate Lecture 12: Fast Reinforcement Learning 1 Emma Brunskill (CS234 Reinforcement Learning ) Winter 2020 14 / 62

  15. Short Refresher / Review on Bayesian Inference In Bayesian view, we start with a prior over the unknown parameters Here the unknown distribution over the rewards for each arm Given observations / data about that parameter, update our uncertainty over the unknown parameters using Bayes Rule Lecture 12: Fast Reinforcement Learning 1 Emma Brunskill (CS234 Reinforcement Learning ) Winter 2020 15 / 62

  16. Short Refresher / Review on Bayesian Inference In Bayesian view, we start with a prior over the unknown parameters Here the unknown distribution over the rewards for each arm Given observations / data about that parameter, update our uncertainty over the unknown parameters using Bayes Rule For example, let the reward of arm i be a probability distribution that depends on parameter φ i Initial prior over φ i is p ( φ i ) Pull arm i and observe reward r i 1 Use Bayes rule to update estimate over φ i : Lecture 12: Fast Reinforcement Learning 1 Emma Brunskill (CS234 Reinforcement Learning ) Winter 2020 16 / 62

  17. Short Refresher / Review on Bayesian Inference In Bayesian view, we start with a prior over the unknown parameters Here the unknown distribution over the rewards for each arm Given observations / data about that parameter, update our uncertainty over the unknown parameters using Bayes Rule For example, let the reward of arm i be a probability distribution that depends on parameter φ i Initial prior over φ i is p ( φ i ) Pull arm i and observe reward r i 1 Use Bayes rule to update estimate over φ i : p ( φ i | r i 1 ) = p ( r i 1 | φ i ) p ( φ i ) p ( r i 1 | φ i ) p ( φ i ) = � p ( r i 1 ) φ i p ( r i 1 | φ i ) p ( φ i ) d φ i Lecture 12: Fast Reinforcement Learning 1 Emma Brunskill (CS234 Reinforcement Learning ) Winter 2020 17 / 62

  18. Short Refresher / Review on Bayesian Inference II In Bayesian view, we start with a prior over the unknown parameters Given observations / data about that parameter, update our uncertainty over the unknown parameters using Bayes Rule p ( r i 1 | φ i ) p ( φ i ) p ( φ i | r i 1 ) = � φ i p ( r i 1 | φ i ) p ( φ i ) d φ i In general computing this update may be tricky to do exactly with no additional structure on the form of the prior and data likelihood Lecture 12: Fast Reinforcement Learning 1 Emma Brunskill (CS234 Reinforcement Learning ) Winter 2020 18 / 62

  19. Short Refresher / Review on Bayesian Inference: Conjugate In Bayesian view, we start with a prior over the unknown parameters Given observations / data about that parameter, update our uncertainty over the unknown parameters using Bayes Rule p ( r i 1 | φ i ) p ( φ i ) p ( φ i | r i 1 ) = � φ i p ( r i 1 | φ i ) p ( φ i ) d φ i In general computing this update may be tricky But sometimes can be done analytically If the parametric representation of the prior and posterior is the same, the prior and model are called conjugate . For example, exponential families have conjugate priors Lecture 12: Fast Reinforcement Learning 1 Emma Brunskill (CS234 Reinforcement Learning ) Winter 2020 19 / 62

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend