0%

Adavantage Weighted Regression-Literature Survey

This post is to summary recent RL algorithm called Adavantage Weighted Regression(AWR) (paper). Detail derivation and explanation are added to help understand deeply.
※Explanation may not be accurate. Readers should read this post carefully.

Contribution(personal)

  • This algorithm improves Reward Weighted Regression by using policy improvement instead of direct policy maximization.
  • It is off-policy algorithm that has higher sample efficiency than on-policy one.
  • It can learn policy from static expert data set without collecting or sampling data from environment like behavior cloning.

Preliminaries

As always, we want to find policy that maximize return(sum of discounted rewards). We can represent objective as time or state and action.

AWR Objective & Derivation

As mentioned in contribution section, AWR algorithm maximizes policy improvement. In this equation, it is impossible to get expectation under discounted state distribution following policy($\pi$). According to 2002(Sham Kakade and John Langford) and 2015(TRPO) paper, expectation under sampling policy is tractable and it is approximate of true policy improvement with small error term(boundness).

As same derivation in preliminaries section, we can get equation under state, action expectation.

“The objective can be difficult to optimize due to the dependency between $d^{\pi}(s)$ and $\pi$, as well as the need to collect samples from $\pi$” - In the paper

we can consider this optimization problem as constrained policy search. This is because, according to early paper(2015 TRPO), $\hat{\eta}(\pi)$ is guarantee only when $\pi$ ans $\mu$ are closed enough(the closeness in probability is defined as KL-divergence).

we can re-write this equation in soft constrained form using Langrangian.

where $Z(s)$ is normalized constant to make $\pi^{*}$ sum up to 1

we want $\pi$ close enough to $\pi^*$ in terms of KL-divergence. we can write this in to optimization problem.

Following the definition of KL-divergence you can easily get under problem.

Off-policy Learning with Experience Replay

On-policy learning uses behavior policy(sampling policy) only at k-th iteration trajectory($\tau$) data, which is inefficient. This is because we throw away hole data that collected from previous iterations. Instead, AWR uses hole data in replay buffer($D$). However, state distribution and policy at each iteration are different. This makes expectation of current policy impossible. In AWR derivation, this algorithm considers samples from replay buffer as prior policy that mixture of 1~k iterations.

Algorithm

  1. Start from random policy(ex.generated by initial weights in policy network).
  2. At each iteration sample trajectory following current policy($\pi_k$).
  3. Uniformly select $N$ samples from replay buffer($D$).
  4. Update state value function($TD(\lambda)$ as target semi-gradient descent).
  5. Update policy following upper objective.

Summary

In the paper, there are sections that I do not cover in this post. For specific, the author(Jason Peng) is famous for “deepmimic” which agent learns agile skills from mocap data using RL. He suggests that AWR is better performance than Proximal Policy optimization and Reward Weighted Regression algorithm in terms of fast convergence when do motion imitation tasks. Also, AWR learns from fully static data that collects form expert. He also compares AWR with others that can learn or cloning expert policy in fully off-line manner.