Composing Task Knowledge with Modular Successor Feature Approximators

Wilka Carvalho, Angelos Filos, Richard L. Lewis, Honglak Lee, Satinder Singh

TL;DR

This paper introduces Modular Successor Feature Approximators (MSFA), a novel neural network architecture that enables reinforcement learning agents to learn and compose task knowledge more effectively. MSFA uses modular components to automatically discover relevant state features and learn predictive representations, leading to improved generalization in complex, unseen environments compared to existing methods.

What Problem Does This Paper Address?

Reinforcement learning (RL) agents often struggle to generalize knowledge learned from one task to new, unseen tasks, especially when those tasks involve novel combinations of elements or environmental configurations. The Successor Features and Generalized Policy Improvement (SF&GPI) framework offers a promising approach for this by learning predictive representations (Successor Features or SFs) that can be combined for transfer. However, a key limitation of SF&GPI is its reliance on hand-designed state features (cumulants) that are crucial for predicting rewards. This manual feature engineering is time-consuming and limits the agent's ability to adapt to novel situations. This paper addresses the challenge of automatically discovering useful state features for SF&GPI, enabling more robust and flexible generalization.

Methods

The core contribution of this paper is the Modular Successor Feature Approximators (MSFA) architecture. MSFA builds upon the SF&GPI framework by introducing a modular neural network design. Instead of a single monolithic network learning all SFs, MSFA employs multiple independent modules. Each module is responsible for learning its own state representation, computing its own "cumulants" (features that predict reward), and estimating its own Successor Features.

Key aspects of MSFA include:

  • Modular State Representations: Each module learns its own internal state, allowing for specialized processing of different aspects of the environment.
  • Reward-Driven Feature Discovery: The modules are trained to discover state features that are useful for predicting environmental reward. This is achieved by regressing the dot product between learned features and a task vector to the environment reward.
  • Modular Cumulants and SFs: Cumulants and SFs are computed based on individual module states, rather than a global state representation. This allows for a more fine-grained and potentially more generalizable representation.
  • Inter-Module Attention: While modules operate largely independently, an attention mechanism is used to allow sparse information sharing between them, enabling coordination and richer representations.
  • Integration with SF&GPI: MSFA's modular SFs can be directly used within the SF&GPI framework for composing task knowledge and performing zero-shot transfer to new tasks.

This approach contrasts with prior work like Universal Successor Feature Approximators (USFA), which use a monolithic architecture and hand-designed cumulants, and FARM, which uses modular state representations but a monolithic SF estimator.

Datasets

The paper evaluates MSFA on three benchmark environments:

  • BabyAI: A simplified object navigation task where agents learn to pick up and avoid objects. This environment is used to test generalization to novel combinations of objects and task configurations.
  • ProcGen (Fruitbot): A procedurally generated environment that tests generalization to visually diverse and novel layouts.
  • MiniHack: A more complex environment involving navigation, monster avoidance, trap avoidance, and partial observability, used to test generalization to heterogeneous tasks.

The authors note that they used simplified versions of these environments and adapted existing configurations for their experiments.

Key Insights and Ideas

  • Modularity is Key for Feature Discovery: The paper strongly suggests that a modular architecture is crucial for enabling RL agents to automatically discover relevant state features that are useful for prediction and generalization.
  • Disentangled Learning Aids Generalization: Learning modular functions for both cumulants ($\phi$) and successor features ($\psi$) is critical for achieving good generalization performance, even outperforming monolithic approaches.
  • MSFA Outperforms Baselines in Complex Generalization: MSFA demonstrates superior performance in scenarios requiring generalization to novel object combinations, visually diverse environments, and heterogeneous task compositions, especially when compared to methods relying on hand-designed features or monolithic architectures.
  • Modularity Offers Benefits Even Without GPI: While SF&GPI is the framework for composing task knowledge, MSFA's modularity itself provides generalization benefits, sometimes outperforming other methods even when GPI is not used.

Key Results

  • Object Navigation: MSFA matches the performance of USFA (which uses hand-designed cumulants) on object navigation tasks and significantly outperforms UVFA-based methods, especially when avoiding objects.
  • ProcGen: In the visually diverse Fruitbot environment, MSFA best generalizes to collecting more objects, outperforming baselines. However, avoiding objects remains a challenge for all methods.
  • MiniHack: MSFA demonstrates strong performance in combining heterogeneous tasks, achieving high success rates in small rooms and outperforming baselines in larger rooms.
  • Ablation Studies: Removing modularity for $\phi$ and $\psi$ severely degrades generalization. MSFA without GPI can outperform USFA-Learned- with GPI in some settings, highlighting the power of modularity.

Limitations and Future Work

The authors acknowledge several limitations:

  • Simple Task Encodings: The current work focuses on relatively simple task encodings. Future work could extend this to more expressive encodings like language embeddings.
  • Limited State-Feature Discovery Methods: The paper primarily uses a reward-driven approach for feature discovery. Exploring more sophisticated methods like meta-gradients could be beneficial.

Future work directions include:

  • Leveraging MSFA for improved state-feature discovery and SF-learning in settings like exploration, option discovery, and policy transfer.
  • Investigating the use of MSFA with more complex state-feature discovery techniques.
  • Extending the application of MSFA to a wider range of RL problems and environments.

Summary updated

BibTeX
@inproceedings{carvalho2023composing,
  author = {Wilka Carvalho and Angelos Filos and Richard L. Lewis and Honglak Lee and Satinder Singh},
  title = {{Composing Task Knowledge with Modular Successor Feature Approximators}},
  booktitle = {International Conference on Learning Representations},
  year = {2023},
  url = {https://openreview.net/forum?id=DrtSx1z40Ib},
}
Figure