[Paper Review] Reward Shaping via Meta-Learning
The paper proposes a meta-learning framework to automatically learn reward shaping functions across a distribution of tasks, using a value-based approach to extract a prior over optimal shaping and enabling zero-shot or few-shot adaptation on new tasks. It demonstrates improved learning efficiency and transfer from DQN to DDPG across discrete and continuous action settings, as well as grid-based tasks.
Reward shaping is one of the most effective methods to tackle the crucial yet challenging problem of credit assignment in Reinforcement Learning (RL). However, designing shaping functions usually requires much expert knowledge and hand-engineering, and the difficulties are further exacerbated given multiple similar tasks to solve. In this paper, we consider reward shaping on a distribution of tasks, and propose a general meta-learning framework to automatically learn the efficient reward shaping on newly sampled tasks, assuming only shared state space but not necessarily action space. We first derive the theoretically optimal reward shaping in terms of credit assignment in model-free RL. We then propose a value-based meta-learning algorithm to extract an effective prior over the optimal reward shaping. The prior can be applied directly to new tasks, or provably adapted to the task-posterior while solving the task within few gradient updates. We demonstrate the effectiveness of our shaping through significantly improved learning efficiency and interpretable visualizations across various settings, including notably a successful transfer from DQN to DDPG.
Motivation & Objective
- Motivate and address credit assignment inefficiency in reinforcement learning through reward shaping.
- Develop a meta-learning framework to learn a task-distribution prior for optimal potential-based shaping.
- Derive theoretical insights showing optimal shaping aligns with credit assignment via value functions.
- Provide an implementable algorithm that adapts shaping priors to new tasks with few gradient steps.
- Demonstrate effectiveness and transferability across varied environments and action spaces.
Proposed method
- Define reward shaping using potential-based functions and show policy invariance under shaping.
- Derive that shaping with Phi(s)=V* M(s) is optimal for credit assignment and learning efficiency.
- Formulate a meta-learning approach (based on MAML) to learn a potential function prior theta over a task distribution.
- Use a dueling-DQN architecture to decompose Q*: Q*=V+A and to learn V* as the shaping prior via adaptation to each task.
- Train the prior theta by minimizing the distance between Q_theta and adapted Q_phi_i across tasks (Eq. 7).
- During meta-testing, shape new tasks with F(s,a,s')=gamma*V_theta(s')-V_theta(s); optionally adapt V_phi_j and A_phi_j for faster learning (Alg. 2).
Experimental results
Research questions
- RQ1How can reward shaping be automatically learned to generalize across a distribution of similar tasks?
- RQ2Can a meta-learned potential function prior provide effective zero-shot shaping or rapid adaptation for new tasks with varying action spaces?
- RQ3Does shaping with the optimal potential improve credit assignment and learning efficiency across discrete and continuous control tasks?
- RQ4What is the transferability of the meta-learned shaping across different architectures (e.g., DQN, DDPG) and task families (CartPole, grid maps)?
Key findings
- Reward shaping with Phi(s)=V* (optimal value) is optimal for credit assignment, making non-optimal actions immediately produce non-positive rewards.
- A meta-learned potential function prior improves learning efficiency and stability across tasks, outperforming MAML baselines in meta-testing.
- Zero-shot shaping significantly accelerates learning on new discrete CartPole and grid-map tasks, and also benefits continuous-action settings with DDPG.
- Shaping allows transfer from DQN to DDPG and demonstrates effective adaptation across both discrete and continuous action spaces.
- Experiments show consistent improvements in learning speed and stability across CartPole variants and grid-based tasks with shared state spaces.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.