Introduction
Visual Reinforcement Learning (RL) agents often struggle to generalize to new environments because they overfit to specific textures and backgrounds. While heavy data augmentation (DA) can help mitigate this, it often destabilizes training by "corrupting" the very pixels the agent needs to make decisions. This paper introduces Task-aware Lipschitz Data Augmentation (TLDA), a method that identifies task-critical pixels and protects them from augmentation, leading to better stability, faster training, and superior generalization.
The Generalization Dilemma in Visual RL
In visual RL, an agent learns to act based on raw pixel observations. A common pitfall is overfitting: an agent might learn to walk perfectly in a sunny virtual meadow but fail completely if the grass turns blue or the sky gets cloudy. To fix this, researchers use DA techniques—like adding noise, shifting colors, or cropping images—to force the agent to learn robust features.
However, there is a "generalization dilemma." Stronger augmentations (like random convolutions) help the agent generalize better to unseen environments, but they often destroy training stability. The authors argue this happens because standard DA is task-agnostic. It treats every pixel the same. If an augmentation happens to blur the robot's leg or obscure the goal, the agent's policy becomes erratic, leading to high-variance value estimations (Q-values) and "diverged" action distributions. Essentially, the agent gets distracted by the very noise meant to help it.
Methods: Task-aware Lipschitz Data Augmentation (TLDA)
The core contribution is TLDA, which identifies which pixels are "important" to the task and leaves them alone, while heavily augmenting the "irrelevant" background.
- The K-matrix (Lipschitz Map): The authors use the Lipschitz constant to measure pixel importance. If changing a specific pixel slightly causes a massive change in the agent's predicted action, that pixel has a high Lipschitz constant and is considered "task-correlated."
- Sensitivity Analysis: During training, the system applies a small perturbation to local patches of the image. It then measures the distance (Total Variation) between the original action distribution and the perturbed one.
- Task-Aware Masking: Based on these measurements, the algorithm generates a "K-matrix"—a heatmap of importance. It then creates a binary mask: pixels with above-average importance are kept in their original state, while low-importance pixels (the background) are subjected to "strong" augmentations like random convolutions or overlays.
- Integration: TLDA is built on top of the Soft Actor-Critic (SAC) algorithm and incorporates a regularization term to ensure the Q-function remains consistent across augmented and non-augmented views.
Experimental Evaluation
The authors evaluated TLDA across three diverse and challenging visual control benchmarks:
- DeepMind Control (DMC) Suite: Standard tasks like Cheetah Run and Walker Walk.
- DMC-GB (Generalization Benchmark): A version of DMC designed to test generalization by introducing random colors and dynamic video backgrounds.
- CARLA: A high-fidelity autonomous driving simulator where the agent must navigate curvy roads under varying weather conditions.
- DeepMind Manipulation Tasks: Robotic arm tasks involving "reach" and "push" maneuvers with complex visual clutter.
Key Insights and Results
Stability and Action Distributions
The authors visualized the action distributions using t-SNE and found that strong, blind augmentation causes a massive "shift" in what the agent wants to do. TLDA keeps the action distribution much closer to the original, explaining why it stabilizes training.
Performance Highlights
- Superior Generalization: On the DMC-GB benchmark, TLDA outperformed state-of-the-art methods (like SVEA and SODA) in 7 out of 10 scenarios.
- CARLA Success: In the difficult "MidRain Sunset" driving environment, TLDA achieved a 12% success rate, more than doubling the performance of SVEA (5.2%) and dwarfing standard DrQ (0%).
- Sample Efficiency: TLDA reached higher rewards with fewer frames compared to task-agnostic methods.
- Robustness to Noise: In manipulation tasks, where standard strong DA often causes training to collapse, TLDA maintained a stable learning curve.
Conclusion
TLDA addresses the fundamental trade-off between generalization and stability in visual RL. By leveraging Lipschitz sensitivity to create task-aware masks, the method ensures that critical visual information is preserved while the background is heavily randomized. While calculating pixel importance adds some computational overhead, the gains in robustness and performance across benchmarks like CARLA and DMC-GB demonstrate the value of "not touching what matters."
Summary updated