ShiftNorm: On Data Efficiency in Reinforcement Learning with Shift Normalization

Sicong Liu, Xi Sheryl Zhang, Yushuo Li, Yifan Zhang, Jian ChengGPL @ ICLR 2022

TL;DR

This paper introduces ShiftNorm, a novel data augmentation technique for image-based reinforcement learning (RL) that improves sample efficiency. By learning to apply a parameterized "shift" to observations, ShiftNorm helps agents extract more robust representations, leading to state-of-the-art performance on a majority of DeepMind Control Suite tasks.

What Problem Does This Paper Address?

Visual reinforcement learning (RL) agents often struggle with sample efficiency, meaning they require a vast amount of data to learn effectively. This is particularly challenging when learning from high-dimensional image observations, as the agent needs to simultaneously learn useful representations and an effective policy. While data augmentation has shown promise in improving sample efficiency and generalization in RL, existing methods often require significant modifications to the RL backbone or lack a principled way to adapt augmentation to the learning process. This paper aims to address this gap by proposing a simple, yet effective, data augmentation method that can be seamlessly integrated with standard model-free RL algorithms.

Methods

The core of ShiftNorm is a reparameterized data shift applied to observations. Instead of using fixed augmentation strategies, ShiftNorm learns an optimal transformation for each observation. This transformation is parameterized by a Gaussian distribution, allowing for a differentiable "shift" that can be optimized alongside the RL agent's policy and value functions.

Here's a breakdown of the key components:

  • Parameterized Shift: ShiftNorm introduces a learnable transformation function that applies a spatial shift to the input image. This shift is sampled from a Gaussian distribution whose mean and variance are learned parameters.
  • Invariant Representations: The goal is to learn representations that are invariant to these learned shifts. This is achieved by minimizing a conditional divergence between the original and shifted observations, encouraging the image encoder to produce similar latent representations for augmented and original data.
  • Critic-Oriented Learning: The learned shift parameters are optimized using the RL agent's critic network. This allows the augmentation to be directly guided by the agent's performance and the learning signal from rewards.
  • Regularization: To ensure stable training and prevent the augmentation from disrupting the learning process, ShiftNorm incorporates two regularization terms:
  • Observation Statistics Regularization (Rw): This term encourages the statistics of the transformed observations to be consistent with the overall dataset statistics.
  • Similarity Measure (Lε,ξω): This term directly encourages the similarity between the representations of original and shifted observations.

The overall architecture involves an image encoder that processes observations, a policy network that outputs actions, and a critic network that estimates value functions. ShiftNorm integrates into this by augmenting the observations before they are fed into the encoder.

Datasets

The paper evaluates ShiftNorm on nine tasks from the DeepMind Control Suite. These tasks are categorized as either "easy" or "challenging" based on their difficulty and the number of allowed steps per episode. The tasks include:

  • Easy: Cartpole Swingup, Finger Spin, Pendulum Swingup, Walker Walk
  • Challenging: Cheetah Run, Hopper Hop, Quadruped Walk, Reacher Easy, Walker Run

No new datasets were introduced in this paper.

Key Insights and Ideas

  • Learned Augmentation is Powerful: The paper demonstrates that learning an optimal, parameterized data augmentation strategy can significantly outperform fixed augmentation methods. This suggests that the "best" augmentation is task- and agent-dependent.
  • Shift as a Core Transformation: The simple spatial shift operation, when learned and applied in a parameterized way, proves to be a highly effective augmentation for visual RL.
  • Critic Guidance is Key: Integrating the augmentation learning directly into the critic's objective function allows the agent to learn augmentations that are most beneficial for its performance.
  • Regularization is Crucial for Stability: While learned augmentation can be powerful, it can also destabilize training. The proposed regularization terms are essential for achieving robust performance and preventing the agent from getting stuck in suboptimal states.
  • Invariant Representations Lead to Sample Efficiency: By forcing the encoder to produce representations invariant to learned shifts, ShiftNorm effectively regularizes the learning process, leading to faster learning and better performance with less data.

Key Results

ShiftNorm demonstrates significant improvements in sample efficiency and asymptotic performance across the tested tasks.

  • State-of-the-Art Performance: ShiftNorm outperforms prior state-of-the-art methods on 8 out of 9 tasks in the DeepMind Control Suite at 500k training steps.
  • Improved Sample Efficiency: Compared to methods like DrQ-v2, which already incorporate data augmentation, ShiftNorm shows further improvements in sample efficiency on multiple tasks.
  • Stability: The paper notes that ShiftNorm also exhibits better training stability compared to some baselines.
  • Ablation Studies: Ablation studies show that both the observation statistics regularization (Rw) and the similarity measure (Lε,ξω) contribute to improved performance and stability. The combination of all components (ShiftNorm with "all" constraints) leads to the best overall performance and stability.

Limitations and Future Work

  • Computational Cost: While ShiftNorm is described as "simple," the paper doesn't extensively detail the computational overhead introduced by learning the shift parameters. It's implied to be manageable, but further analysis might be beneficial.
  • Generalizability to Other Augmentations: The current work focuses on spatial shifts. Future work could explore learning other types of augmentations or combinations of augmentations.
  • Theoretical Guarantees: The paper provides theoretical analysis and proofs for the effectiveness of ShiftNorm, but further exploration into the theoretical underpinnings of learned data augmentation in RL could be valuable.
  • Hyperparameter Sensitivity: While the paper mentions setting hyperparameters consistently, the sensitivity of ShiftNorm to its own hyperparameters (e.g., augmentation learning rate, momentum tau) could be a point for future investigation.

Summary updated

BibTeX
@inproceedings{liu2022shiftnorm,
  author = {Sicong Liu and Xi Sheryl Zhang and Yushuo Li and Yifan Zhang and Jian Cheng},
  title = {{ShiftNorm: On Data Efficiency in Reinforcement Learning with Shift Normalization}},
  booktitle = {GPL @ ICLR},
  year = {2022},
  url = {https://openreview.net/forum?id=SNnE64aV1Wc},
}
Figure