Discovery of Useful Questions as Auxiliary Tasks

Vivek Veeriah, Matteo Hessel, Zhongwen Xu, Janarthanan Rajendran, Richard L. Lewis, Junhyuk Oh, Hado van Hasselt, David Silver, Satinder Singh

Abstract

In reinforcement learning (RL), auxiliary tasks are often used to help agents build better internal representations of their environments. Traditionally, these tasks are hand-designed by researchers. This paper, presented at NeurIPS 2019, introduces a meta-learning framework that allows agents to automatically discover these "questions" (auxiliary tasks) to maximize performance on a primary goal. By utilizing non-myopic meta-gradients, the agent develops internal representations that outperform those created by popular handcrafted tasks across gridworlds and Atari games.

Introduction

To solve complex problems, RL agents must transform raw sensory data, such as pixels, into meaningful internal features. Auxiliary tasks—side objectives like predicting the next video frame or reward—serve to "shape" these representations. For example, an agent tasked with predicting the location of a key will naturally learn to identify keys more effectively. However, human-designed tasks like "Pixel Control" or "Reward Prediction" are often limited by human intuition and may not align with the specific environment or neural architecture of the agent. This research addresses a fundamental challenge: how can an agent mathematically define its own auxiliary tasks such that learning them directly improves its performance on its main objective?

Methodology

The researchers formulate these self-discovered questions as General Value Functions (GVFs). A GVF provides a flexible knowledge representation defined by a cumulant (the signal to track) and a discount factor (the temporal horizon).

The Two-Network Architecture

The approach utilizes a dual-network system:

  1. The Main (Answer) Network ($\theta$): This network learns to solve the primary task while simultaneously attempting to answer the auxiliary questions posed by the second network.
  2. The Question Network ($\eta$): This network uses meta-gradients to determine which GVFs are most useful for the Main Network to learn.
The dual-network architecture: The Main Network (left) solves the primary task and answers GVFs, while the Question Network (right) generates the cumulants and discounts that define those GVFs.

Non-Myopic Meta-Gradients

A critical component of this method is the use of non-myopic meta-gradients. Rather than evaluating the immediate impact of a question, the algorithm "unrolls" the learning process for several steps (e.g., 10 to 20). It calculates how the Question Network's parameters ($\eta$) influence the Main Network's parameters ($\theta$) over time. This allows the agent to discover questions that provide long-term utility for representation building, rather than just immediate reward.

Experimental Results

The method was evaluated across three distinct environments: Puddleworld (a continuous gridworld), Collect-objects (a four-room navigation task), and the Atari 2600 benchmark.

Performance and Data Efficiency

In Atari games such as Frostbite and Gravitar, the "Discovered GVFs" agent significantly outperformed standard handcrafted auxiliary tasks. The researchers found that self-generated knowledge was often sufficient; in "representation learning" experiments, agents could solve tasks even when their internal features were trained exclusively on self-discovered questions.

Performance on the Atari game James Bond. The agent using Discovered GVFs (red) significantly outperforms handcrafted baselines like Pixel Control and Reward Prediction, eventually exceeding the IMPALA baseline.

In a broader study of 57 Atari games, the method demonstrated a clear median improvement over the IMPALA baseline, a state-of-the-art RL agent. In gridworld tasks, discovered questions consistently led to optimal policies, whereas agents using random questions or simple reward prediction often failed to converge.

Discussion and Insights

The study revealed that the discovered questions often do not resemble tasks a human would intuitively design. Instead, they are optimized for the "gradient flow" of the neural network, capturing environmental nuances that handcrafted tasks might miss.

However, the approach is not without its challenges. Calculating multi-step meta-gradients is computationally intensive, requiring significant memory and processing power to unroll gradients through multiple updates. Furthermore, the current framework focuses on "on-policy" questions—predicting outcomes based on the agent's current behavior. Future work may explore "off-policy" questions to predict "what if" scenarios for alternative behaviors.

Conclusion

This paper demonstrates that agents can effectively decide for themselves what is worth learning. By automating the discovery of auxiliary tasks through meta-learning, researchers can move beyond the limitations of human-designed heuristics, allowing agents to build more robust and task-relevant internal representations.

Summary updated

BibTeX
@inproceedings{veeriah2019discovery,
  author = {Vivek Veeriah and Matteo Hessel and Zhongwen Xu and Janarthanan Rajendran and Richard L. Lewis and Junhyuk Oh and Hado van Hasselt and David Silver and Satinder Singh},
  title = {{Discovery of Useful Questions as Auxiliary Tasks}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2019},
  url = {https://openreview.net/forum?id=rKirQFDRIi2},
}
Figure