Introduction
While Deep Reinforcement Learning (RL) excels at mastering specific games, it often fails to generalize to even slight variations of the same task. This paper evaluates three strategies—data augmentation, meta-learning, and adversarial training—to help agents learn "translation invariance." The results show that while simple data augmentation is incredibly effective, more sophisticated "task-agnostic" methods like meta-learning still struggle to automatically discover the right features for generalization.
The Challenge of Domain Generalization
The "brittleness" of AI is a well-known hurdle. An agent trained to play a specific level of a video game might achieve world-class performance, but if an obstacle is moved just five pixels to the left, the agent often fails completely. This occurs because the agent "overfits" to specific features—such as the absolute X-Y coordinates of an object—rather than learning the underlying logic, like the relative distance between the player and an obstacle.
The authors tackle the problem of domain generalization (or zero-shot learning) in RL. The objective is to train an agent on a tiny handful of scenarios so that it can perform successfully on thousands of unseen variations without further training.
Approaches to Inducing Invariance
The researchers compared three distinct philosophies for inducing "invariance" (the ability to ignore irrelevant changes):
- Explicit Invariance (Data Augmentation): This is the "manual" approach. The researchers took the game screen and embedded it at random positions within a larger black frame. This forces the agent to realize that the absolute position of the game window doesn't matter, only the relative positions of objects inside that window.
- Meta-learning: This approach tries to optimize the learning process itself. Using a method inspired by MAML (Model-Agnostic Meta-Learning), they updated the model such that a gradient step taken to improve performance on Task A would also naturally improve performance on Task B. The goal is to find a "generalized" region of the parameter space.
- Task Adversarial Learning: This method uses a "discriminator" network. While the RL agent tries to solve the game, the discriminator tries to guess which specific task variation the agent is currently playing based on its internal neural activations. The agent is penalized if the discriminator can identify the task, effectively forcing the agent to "hide" task-specific information and rely only on common features.
Experimental Setup
The authors used a custom-built "toy" environment consisting of a simple 2D game where a grey rectangle must move right and jump over a white obstacle. They created 1,271 task variations by altering the floor height and the obstacle's horizontal position. To test extreme generalization, they trained the agents on only 6 tasks and evaluated them on the remaining 1,265 unseen tasks.
Results and Insights
The primary reason RL agents fail in these environments is that they memorize the absolute screen coordinates where they should jump. Humans intuitively use relative distance, which is a "translation invariant" feature.
- Baseline Failure: A standard RL agent (Double-DQN) trained on the 6 tasks solved only 2.8% of the test tasks. It mastered the training set but was completely lost on the unseen variations.
- Data Augmentation Triumph: The agent trained with random screen positioning solved 99.8% (1263/1265) of the test tasks. Remarkably, it even learned to jump over two consecutive obstacles, a scenario it never saw during training.
- The "Smart" Methods Lagged: Both meta-learning and adversarial training failed to significantly outperform the baseline in this specific setup. While the adversarial approach successfully "blinded" the network to which task it was playing (confirmed via t-SNE clusters), this didn't automatically make the agent better at generalizing. Just because the network forgets where the obstacle is doesn't mean it has learned the relationship between itself and the obstacle.
Conclusion and Future Work
The biggest limitation highlighted by this study is that the most successful method—data augmentation—requires "manual" enforcement of invariances. Designers must know ahead of time that the agent should be invariant to screen position and engineer the training data accordingly.
The authors conclude that implicitly learning the proper invariance for generalization remains an open and difficult problem. Future work needs to investigate why meta-learning and adversarial approaches struggle to capture the "relative distance" logic and how to better align these algorithmic objectives with the goal of zero-shot generalization.
Summary updated