TL;DR
Researchers have developed OpTI-BFM, a method that allows Behavior Foundation Models (BFMs) to figure out new tasks through active interaction rather than relying on massive pre-labeled datasets. By treating task inference as a linear bandit problem, the agent uses "optimism under uncertainty" to identify and master unseen reward functions in just a handful of episodes.
What Problem Does This Paper Address?
Behavior Foundation Models (BFMs) are the "Swiss Army Knives" of reinforcement learning. Once trained on large unlabeled datasets, they can theoretically perform any task—provided you tell them what the reward function is. This is commonly referred to as zero-shot RL.
However, there’s a catch: "zero-shot" usually refers to the policy improvement step, not the task inference step. To actually use a BFM on a new task, you typically need a large dataset of state-reward pairs to calculate a "task embedding"—a vector that tells the model which of its internal behaviors to activate. In the real world, getting these labels is expensive, and the original training data might be proprietary or unavailable.
The authors ask: Can we skip the big labeled dataset and just let the agent figure out the task by poking around the environment at test-time?
Methods
The paper introduces OpTI-BFM (Optimistic Task Inference for BFMs). It builds on two core concepts:
- Successor Features (SFs): These are a way of representing state-action values that decouple the environment's dynamics from the specific reward. In SF-based models, the value of a policy is a simple linear product of the successor features and a task embedding ($z$).
- Linear Bandits & Optimism: The authors realize that if a BFM is well-trained, finding the right task embedding is essentially a linear bandit problem.
Instead of guessing a single task embedding, OpTI-BFM maintains a confidence ellipsoid—a "cloud" of possible task embeddings that are consistent with the rewards seen so far. In each episode, the agent acts optimistically: it chooses the task embedding within that cloud that promises the highest possible return. This naturally encourages the agent to explore states that are most informative about the true reward function.
The authors also propose a Thompson Sampling (TS) variant, which samples from the belief distribution instead of picking the optimistic peak, and a Non-stationary variant that uses a decay factor to handle rewards that change over time.
Datasets
The researchers evaluated their approach on standard continuous control benchmarks:
- Deepmind Control Suite (DMC): Specifically the Walker, Cheetah, and Quadruped environments, each with four distinct reward tasks (e.g., walk, run, flip).
- ExORL: Used for the offline pre-training data (10 million transitions collected via random exploration).
- OGBench (AntMaze): A more complex "loco-navigation" task where a quadruped must navigate a maze to reach a goal.
Key Insights and Ideas
- The "Bandit" Connection: The most powerful insight is the formal proof that task inference in a well-trained BFM reduces to a linear bandit problem. This allows the authors to provide "regret bounds"—theoretical guarantees that the agent won't fail too badly while learning.
- Active vs. Passive Learning: Passive task inference (just looking at random data) is slow. Active inference (OpTI-BFM) is much faster because the agent specifically visits states that help it distinguish between different possible reward functions.
- Computational Efficiency: Unlike "black-box" policy search methods (like LoLA), OpTI-BFM leverages the internal linear structure of the BFM. This makes it incredibly fast—only about 4-5 times slower than running a single pre-trained policy, whereas other methods might require heavy optimization.
Key Results
- Rapid Convergence: OpTI-BFM typically recovers "Oracle" performance (the performance of an agent that already knows the reward perfectly) within just 5 episodes of interaction.
- Data Efficiency: It achieves this using orders of magnitude fewer reward labels than standard offline inference methods (which often use 50,000+ labels).
- Adaptability: In the "speedup/slowdown" tasks, the non-stationary variant of OpTI-BFM successfully tracked a target velocity that changed mid-episode, while standard methods got stuck.
- Maze Solving: In the AntMaze environment, the agent successfully explored the maze and "latched onto" the goal reward after seeing it just once, eventually matching the Oracle's success rate.
Limitations and Future Work
- Dependence on Pre-training: OpTI-BFM is only as good as the underlying BFM. If the pre-training didn't cover the necessary behaviors or if the Successor Features are poorly estimated, the "optimism" might lead the agent astray.
- Linearity Assumption: The method assumes the reward function is linear with respect to the learned features. If the reward is highly non-linear or "misspecified," the regret bound is no longer sublinear, meaning the agent might incur a constant error.
- Episode-level vs. Step-level: While the theory covers episode-level updates, the authors found that updating the task embedding at every single step works much better in practice. Bridging this gap in the formal theory is a noted direction for future work.
Summary updated