Learning Embeddings for Sequential Tasks Using Population of Agents

Mridul Mahajan, Georgios Tzannetos, Goran Radanovic, Adish Singla · Submission to ICLR 2024 · Rejected

Introduction

Researchers have developed an information-theoretic framework to map Reinforcement Learning (RL) tasks into a fixed-dimensional vector space. By observing how a diverse population of agents succeeds or fails across different scenarios, the framework learns embeddings where the distance between vectors represents task similarity and the length of the vector represents task difficulty.

The Challenge of Quantifying Tasks

In Reinforcement Learning, we often deal with "sequential tasks"—problems where an agent must take a series of actions to reach a goal. While humans can intuitively see that "driving in rain" is similar to "driving in snow" but harder than "driving on a sunny day," quantifying these relationships for AI is difficult.

Existing methods for learning "task embeddings" (vector representations of tasks) often focus on helping an agent generalize to new tasks, but they don't explicitly organize the task space based on similarity or difficulty. Furthermore, many current approaches require expensive "rollouts" (running the full simulation) or access to internal agent data like value functions. This paper seeks a way to create a "map" of tasks that allows for one-shot reasoning: if we know how an agent performs on Task A, can we predict its performance on Task B without running a single simulation?

Methodology

The core innovation is using an agent population as a measuring stick for the task space.

Conceptual framework mapping tasks to embeddings
  1. The Similarity Metric: The authors define task similarity using Mutual Information. If knowing that an agent succeeded on Task A significantly reduces our uncertainty about whether they will succeed on Task B, those tasks are considered similar.
  2. Optimality Variables: They treat task success as a binary random variable. By sampling a diverse population of agents (created by taking "snapshots" of agents at different stages of training), they can calculate the correlation between successes across different tasks.
  3. Ordinal Constraints: Instead of trying to predict exact values, the framework learns from relative comparisons. It uses two types of constraints:
  4. Triplet Constraints: "Task 1 is more similar to Task 2 than it is to Task 3."
    • Norm Constraints: "Task 4 is harder than Task 5."
  5. The Embedding Network: A neural network is trained to map task descriptions (like initial states or goal parameters) into vectors. The training objective uses the Bradley-Terry-Luce (BTL) model to maximize the likelihood that the resulting vector space honors the similarity and difficulty constraints discovered from the agent population.

Evaluation Environments

The authors evaluated their framework across five diverse environments:

Examples of evaluation environments including CartPoleVar, PointMass, and Karel
  • MultiKeyNav: A navigation task requiring agents to pick up specific colored keys to unlock doors.
  • CartPoleVar: A variation of the classic physics balance problem where the underlying dynamics (forces) change.
  • PointMass: A continuous control task where an agent must navigate through gates of varying widths.
  • Karel & BasicKarel: Complex grid-world environments used in programming education, where tasks involve synthesizing programs with loops and conditionals.

Key Insights and Results

  • Similarity is Performance-Based: You don't need to manually define what makes tasks similar (e.g., "they both have blue keys"). If the same set of skills is required to solve both, the agent population's performance data will naturally reveal that link.
  • The Geometry of Difficulty: The framework elegantly encodes two different concepts into one vector: the direction of the vector represents the "type" of task (similarity), while the magnitude (norm) represents how hard it is.
  • Zero-Shot Utility: Once the embedding network is trained, it can take a brand-new task it has never seen before and instantly place it on the "map," allowing for immediate difficulty and similarity assessments.
  • Performance Prediction: The embeddings were used to predict an agent's success on a new task after observing a small "quiz" of 5–20 tasks. This method was nearly as accurate as an "Oracle" baseline that had full knowledge of the agent's capabilities.
  • Task Selection: In queries designed to find a task similar to a target but harder, the proposed method significantly outperformed baselines that relied on state-representation similarity or trajectory editing distances. This highlights the importance of the "Norm Constraint" in their loss function.

Limitations and Future Work

The current framework relies on binary success/failure. The authors note that future work could incorporate "partial success" (e.g., how close the agent got to the goal) to make the learning more signal-rich. Additionally, the method is currently designed for goal-based tasks; adapting it to non-goal-based RL (like continuous running for maximum score) remains a challenge. Finally, estimating mutual information requires many rollouts across the agent population. While this is a "one-time" cost during the embedding training phase, making this process more sample-efficient is a priority for scaling to even more complex environments.

Summary updated

BibTeX
@misc{mahajan2023learning,
  author = {Mridul Mahajan and Georgios Tzannetos and Goran Radanovic and Adish Singla},
  title = {{Learning Embeddings for Sequential Tasks Using Population of Agents}},
  year = {2023},
  eprint = {2306.03311},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2306.03311},
}
Figure