TL;DR
Simulators and AI coding tools have made generating diverse training environments cheap, yet manually designing every reward function an AI agent might ever need remains a painstaking bottleneck. This paper introduces MetaBFM, a unified reinforcement learning framework that fuses supervised meta-RL with unsupervised Behavior Foundation Models. The result is an agent with test-time "knobs" that can match specialist meta-RL performance on familiar objectives while adapting on the fly to completely novel, out-of-distribution goals.
What Problem Does This Paper Address?
Imagine teaching a robot to adapt quickly to new situations at test time. Standard Meta-Reinforcement Learning (Meta-RL) excels at this—learning to infer hidden rules from a few trial-and-error episodes—provided you train it on a massive variety of both environments (physics, layouts) and reward functions (goals). However, crafting thousands of bug-free reward functions is notoriously difficult; if you miss a behavior during training, the agent overfits and fails at test time.
On the flip side, Behavior Foundation Models (BFMs) learn from reward-free data using successor features—essentially learning how to reach any future state so they can pursue new goals at test time via Zero-Shot RL (ZSRL) without retraining. Historically, BFMs needed an offline dataset to infer a new task, though recent work (OptiBFM) showed they can infer tasks online just like Meta-RL.
So, can BFMs replace reward-hungry Meta-RL? Not quite. When the authors tested standard BFMs across changing environments, the models completely collapsed—averaging their actions across incompatible physics instead of figuring out which world they were in.
To bridge these two worlds, an agent needs four capabilities: identifying novel environment dynamics, collecting its own diverse data online, balancing exploration and exploitation at test time, and utilizing supervised rewards whenever they are available.
Methods
Rather than altering the core BFM machinery (primarily built on TD-JEPA here), the authors build a modular, hybrid architecture called MetaBFM:
- Latent Context Learning (LCL): To stop BFMs from going blind across different environments, a causal sequence model reads the agent's interaction history and outputs an online estimate of the environment's dynamics ($\tilde{c}_d$) at every timestep. It learns via self-supervised inverse dynamics (predicting actions from states) and latent dynamics (predicting next-step embeddings), with actions staggered by two steps so the network can't cheat. This context is simply appended to the state.
- Episodic Curiosity ($\alpha$): Standard BFMs collapse onto narrow behaviors if trained online. MetaBFM adds a memory-equipped critic trained on episodic intrinsic rewards—bonuses that decay within a multi-episode trial—encouraging the agent to visit new states and reduce LCL dynamics uncertainty.
- Configurable Hybrid Objective ($\alpha$ and $\beta$): MetaBFM trains its policy to optimize a blend of unsupervised successor-feature values and a critic that mixes intrinsic curiosity with extrinsic (supervised) task rewards. By conditioning the policy on two continuous weights, $\alpha$ and $\beta$, you get a single agent with test-time dials:
- $\alpha=1, \beta=1$: Pure supervised Meta-RL mode (exploit training task priors).
- $\alpha=1, \beta=0$: Pure Exploration mode (search the environment).
- $\alpha=0, \beta=0$: Pure ZSRL mode (pursue brand-new reward functions inferred online).
Datasets
Because MetaBFM focuses on online adaptation, experiments span custom diagnostic worlds and established continuous-control simulators (sometimes seeded with offline data):
- ColorGrid: A newly introduced diagnostic $n \times n$ continuous 2D gridworld where cell layouts are randomly permuted ($(n^2)!$ possible dynamics) and cell rewards are randomized.
- G1 Humanoid Motion Tracking (LAFAN): 4.6 hours of human motion-capture sequences evaluated under randomized wind and gravity perturbations.
- Wind: A 2D navigation benchmark with random wind directions and a held-out goal quadrant for testing out-of-distribution (OOD) reward generalization.
- DeepMind Control (DMC) Walker: Simulated bipedal locomotion across 10k randomized body geometries, friction, and damping parameters, trained only to walk forward and tested on unseen skills (e.g., walk backward, crouch).
- MetaWorld (ML1 & ML45): Hardware-accelerated tabletop robotic manipulation across 50 environments, initialized with an offline replay buffer of demonstrations before continuing online training.
Key Insights and Ideas
- BFMs average over ambiguity: Without an explicit mechanism to infer environment physics, a BFM trained across multiple dynamics performs worse on normal physics than one trained in a single environment, because it hedges its bets across all worlds.
- Offloading reward memory unlocks length extrapolation: Standard black-box Meta-RL struggles to adapt past the number of episodes it saw during training. In ZSRL mode, MetaBFM keeps improving for $k > 20$ episodes even when trained on just $k = 2$ or $3$ episodes, likely because estimating the goal is offloaded from policy weights to linear regression on successor features ($z^*$).
- Joint context learning scales: Pretraining the LCL dynamics module isn't strictly necessary; training it jointly from scratch alongside the BFM matches pretrained performance once task diversity is large enough—crucial for purely online RL.
Key Results
- Humanoid Locomotion: Adding LDM context learning to a multi-dynamics BFM drops in-distribution joint tracking error (
mpjpe-l) from 132.7 down to 121.5 (nearly recovering the single-environment oracle's 117.2) and improves OOD dynamics error from 151.6 to 145.9 (versus 194.7 for the single-dynamics baseline). - Zero-Shot Skill Generalization: On DMC Walker (trained solely on
walk) and Wind (with an excluded quadrant), supervised Meta-RL completely flatlines on OOD objectives likewalk_backwardorcrouch_walk. Switching MetaBFM to ZSRL mode ($\beta=0$) enables steady online adaptation while matching Meta-RL on in-distributionwalkin reward-following mode ($\alpha=1, \beta=1$). - Robotic Manipulation: On MetaWorld ML45, MetaBFM matches supervised Meta-RL's high success rates (~80%+) on the 45 training tasks, explores over 3$\times$ more workspace regions in exploration mode, and reaches ~18% success on a novel 50-environment goal-reaching task where supervised modes stay near 0% chance.
Limitations and Future Work
- Limits of OOD Manipulation: MetaBFM is no silver bullet for completely foreign object interactions. On MetaWorld's 5 held-out manipulation tasks, it failed to generalize in any mode—likely because unstructured curiosity doesn't naturally stumble into complex, multi-step object manipulations enough to learn their successor features.
- Computational Overhead & Manual Knobs: Training MetaBFM is heavier than a standalone BFM (mitigated partially by sharing Transformer backbones), and in these experiments, the test-time $\alpha$ and $\beta$ schedules are set manually rather than adapted automatically.
- Future Direction: The authors envision shifting generalist RL effort away from hand-engineering endless reward functions and toward scaling up diverse, easily generated environments.
Summary updated