# When Dynamics Shift, Robust Task Inference Wins: Offline Imitation Learning with Behavior Foundation Models Revisited

*Rishabh Agrawal, Rahul Jain, Ashutosh Nayyar*

[NeurIPS page](https://neurips.cc/virtual/2026/poster/148762) · [OpenReview](https://openreview.net/forum?id=vFC88YZZSH) · [alphaXiv](https://www.alphaxiv.org/abs/2605.17017) · [Open on the map](../papers.html#p148762)

Category: [Reinforcement Learning & Games](../pcat/10.md) › [Spectral and Structural Reinforcement Learning](../pgroup/14.md) · Type: new method · Keywords: robust imitation learning, minimax optimization, behavior foundation models, offline IL, dynamics shift

Areas: [AI Agents](../areas/agents.md) › Agent Optimization and Evaluation › Robotic Reinforcement Learning; [Continual Learning & Adaptation](../areas/continual-adaptation.md) › Non-Stationarity Adaptation › Environmental Shift Adaptation; [Robotics & Embodied AI](../areas/robotics.md) › Robotic Control and Planning › Reinforcement Learning

## Summary
The paper introduces a robust minimax formulation for task-inference in imitation-learning foundation models that adapts to dynamics shifts using only offline data from a single nominal environment.

## Explained to a 5-year-old
When robots learn from watching people, they use a special brain that can change how they understand new situations. This brain normally works with one kind of world, but sometimes the world changes (like the floor becomes slippery). The new idea makes the brain think about the worst possible changes, so it can still act safely even if the world is different. This way, robots can be more robust without needing to learn again.

## Explained to a 5-year-old, longer
Imagine a robot that watches videos of how to do a task, like picking up blocks. It learns a general idea of what to do, but only for one kind of table. If the table becomes wobbly or the robot's sensors get noisy, the robot might fail. The researchers gave the robot a new trick: they made it think about the worst possible changes in the table and sensors, and they trained it to handle those worst cases. This way, the robot can still pick up blocks even if the table shakes or the camera is blurry, all without needing new videos. The robot does this by using a special math method that looks at the hardest situations and learns to be safe. This makes the robot more reliable in real life where things often change unexpectedly.

## For a technical reader
The paper reframes task inference in imitation-learning foundation models as a robust minimax problem, allowing the model to anticipate worst-case dynamics perturbations at inference time. By solving this optimization, the system adapts its policy without altering the pretrained representations, thus preserving scalability and reducing data requirements. Experiments show substantial gains over standard and existing robust baselines when dynamics shift, confirming the practicality of the approach.

## Problem
Existing task-agnostic representation models used for imitation learning assume static environment dynamics, which reduces their reliability when real-world dynamics shift (e.g., changes in friction, actuation, or sensor noise). This limitation hinders robust adaptation to new tasks without access to additional data from the shifted environment.

## Method
The approach formulates task-inference as a robust minimax optimization problem, allowing adaptation to worst-case dynamics perturbations while keeping the pretrained model unchanged.

## Results
The approach significantly outperforms standard imitation-learning baselines and robust offline IL methods under dynamics shifts, demonstrating that robust policies can be achieved at task-inference time.

## Contributions
A novel robust minimax formulation for task-inference that works with offline data from a single environment, and empirical evidence that robustness can be attained without modifying the pretrained model.

## Practical relevance
Enables reliable deployment of imitation-learning systems in dynamic real-world settings where only nominal data is available.

## Research questions this paper is counted under

- [How can we achieve robust adaptation of learned models to uncertain and changing environment dynamics?](../q/672.md)

This page was written by language models from the title and abstract of each paper, and the answers were checked by two other models. It can be wrong: check the paper itself. [Suggest a correction](../feedback/?on=p/148762)
