In the quest for more efficient Artificial Intelligence, a central question remains: What should an agent learn about? Beyond just maximizing a reward signal, Reinforcement Learning (RL) agents often benefit from "auxiliary tasks"—side objectives like predicting future states or reaching subgoals—that help them build better internal representations of their world. However, designing these tasks usually requires significant human intuition, and existing automated methods are often too computationally heavy to be practical.
A new paper from researchers at the University of Alberta and Huawei Technologies, published at CoLLAs 2023, proposes a leaner, more intuitive alternative: a generate-and-test approach to discovering these tasks on the fly.
TL;DR
This paper introduces an automated framework for auxiliary task discovery in RL that continually generates new tasks and prunes those that don't help the main objective. By using a novel utility measure based on feature importance, the algorithm significantly improves learning speed and final performance across various environments without requiring human-designed subgoals.
What Problem Does This Paper Address?
In RL, "representation learning" is the process of turning raw inputs (like pixels or coordinates) into useful internal features. Auxiliary tasks accelerate this by forcing the neural network to care about more than just the immediate reward.
Currently, researchers face a dilemma:
- Hand-designing tasks: Effective but doesn't scale and relies on human expertise.
- Meta-learning: Powerful but computationally expensive, brittle, and hard to tune.
- End-to-end learning: Theoretically elegant but often data-inefficient.
The authors seek a middle ground: an autonomous system that can "try out" different auxiliary tasks, keep the ones that make the main task easier, and discard the rest.
Methods
The core of the proposal is a Generate-and-Test loop integrated into a standard Deep Q-Network (DQN) agent.
1. The Master-User Strategy
To know which task is helping, you first need to know which task is responsible for which feature. Standard multi-head networks mix gradients from all tasks, making credit assignment impossible. The authors use a Master-User strategy: while all tasks use all features for their "forward pass," each feature in the shared hidden layer is only updated by the gradient of one specific task (either the main task or one auxiliary task).
2. The Tester (Utility Measure)
How do we define a "useful" auxiliary task? The authors propose a measure based on how much the features induced by an auxiliary task contribute to the main task's value function. Specifically, the utility of a task is the sum of the utilities of its features. A feature's utility is calculated by multiplying its average activity (trace) by the magnitude of its outgoing weights to the main task's output.
3. The Generator
The authors tested two types of generators:
- Random Subgoal-Reaching: Tasks that reward the agent for reaching random points in the state space.
- Feature-Attainment: A more advanced generator that creates tasks aimed at maximizing specific internal features that the "Tester" has already identified as important for the main task.
Datasets
The method was evaluated on three classic RL benchmarks:
- Four-rooms: A gridworld where an agent must navigate through narrow openings to reach a goal.
- Maze: A larger, more complex gridworld.
- Pinball: A continuous state-space environment with complex physics and obstacles.
Key Insights and Ideas
- Bad tasks are worse than no tasks: The researchers showed that "bad" auxiliary tasks (like forcing an agent to navigate to useless corners) can actually slow down learning compared to having no auxiliary tasks at all. This highlights why a "Test" phase is critical.
- Utility is a reliable signal: The proposed utility measure successfully identified "hallway" subgoals in the Four-rooms environment as high-utility, matching human intuition that these are critical bottlenecks for navigation.
- Feature-Attainment as a Scaling Strategy: Searching for subgoals in raw observation space (like coordinates) is hard in complex worlds. Searching for tasks that maximize internal features provides a more scalable path for discovery in high-dimensional environments.
Key Results
The generate-and-test method consistently outperformed both the "no auxiliary task" baseline and a baseline using fixed random auxiliary tasks.
In the Four-rooms environment, the discovery algorithm was able to bridge the performance gap between a standard agent and one equipped with hand-optimized "hallway" tasks. In the Pinball environment, the discovered tasks were qualitatively sensible, concentrating in central areas that act as natural waypoints to the goal.
Limitations and Future Work
- Early Learning Noise: The "Feature-Attainment" generator struggled in the very early stages of learning because internal features are initially random and meaningless. The authors suggest this might be mitigated by starting with random tasks and transitioning to feature-based tasks.
- Scaling to Pixels: While tested on continuous states, the method hasn't yet been applied to high-dimensional visual inputs (like Atari).
- Hybrid Approaches: A promising future direction is combining this generate-and-test approach with meta-learning, using generate-and-test to find the "rough" tasks and meta-gradients to fine-tune their parameters.
Summary updated