Re-Mix: Optimizing Data Mixtures for Large Scale Imitation Learning

Joey Hejna, Chethan Bhateja, Yichen Jian, Karl Pertsch, Dorsa Sadigh

TL;DR

Training large-scale robot foundation models requires careful selection and weighting of diverse datasets. This paper introduces Re-Mix, a method that uses distributionally robust optimization to automatically learn optimal data mixtures, significantly outperforming uniform and human-curated approaches. Re-Mix demonstrates the crucial impact of data curation on downstream robot policy performance, even enabling substantial dataset subsetting without performance loss.

What Problem Does This Paper Address?

The field of robotics is increasingly leveraging large, diverse datasets to train generalist foundation models for imitation learning. However, unlike in vision and natural language processing, the critical question of how to best select and weight data from these heterogeneous sources has been largely under-explored in robotics. Robotics datasets are notoriously varied, differing in robots, environments, state and action spaces, and dynamics. Simply pooling these datasets can lead to suboptimal performance because standard training methods may not effectively handle this heterogeneity. Existing approaches often rely on manual, expert-driven curation, which is difficult to scale and requires extensive domain knowledge. This paper aims to address this gap by proposing an automated method for optimizing data mixtures to maximize the performance of generalist robot policies.

Methods

The core of Re-Mix is Distributionally Robust Optimization (DRO), specifically a group DRO approach adapted for robotics. The key idea is to learn a weighting vector over different "domains" (which can be subsets of a dataset or entire datasets) that maximizes the worst-case performance across all these domains.

To tackle the unique challenges of robotics data, Re-Mix incorporates several novel techniques:

  • Minimax Optimization: The problem is framed as a min-max optimization where a policy minimizes its excess behavior cloning (BC) loss over a reference model, while the domain weights are adjusted to maximize this excess loss. This "excess loss" measures how much room the policy has to improve on a given domain relative to a pre-trained reference model.
  • Action Normalization and Discretization: To handle the variability in action spaces and dynamics across datasets, Re-Mix applies Gaussian normalization to actions within each domain and then discretizes them. This ensures that loss magnitudes are comparable across domains, preventing some from being unfairly weighted due to their inherent action space characteristics.
  • Early Stopping for Reference Model: To prevent the reference model from overfitting to specific domains, aggressive early stopping is employed, selecting a checkpoint that has not overfit to a held-out validation set. This ensures the reference model provides a meaningful baseline for calculating excess loss.

The overall Re-Mix pipeline involves:

  1. Action Preprocessing: Gaussian normalization and discretization of actions per domain.
  2. Reference Model Training: Training a discrete reference model on a uniform mixture of all domains.
  3. Group DRO: Learning domain weights using the minimax optimization objective.
  4. Data Weighting: Using the learned weights to re-weight or subset datasets for final policy training.

Datasets

The paper uses the following datasets:

  • Bridge V2 Dataset: A large-scale dataset of 50k diverse teleoperated demonstrations for single-arm manipulation tasks, used with 32 scene-based domains.
  • Open X-Embodiment (OpenX) dataset: A collection of datasets totaling 350k demonstrations from various embodiments and environments, used with 11 datasets as domains. This dataset is particularly challenging due to its heterogeneity.
  • RoboMimic NutAssemblySquare task: A simulation dataset used for additional experiments, divided into domains based on operator "quality" labels.

Key Insights and Ideas

  • Data Curation is Paramount: The paper strongly emphasizes that how data is curated and weighted has a significant impact on the performance of generalist robot policies, often more so than the sheer volume of data.
  • Heterogeneity is a Major Hurdle: The diverse nature of robotics datasets (action spaces, dynamics, etc.) poses unique challenges for standard DRO techniques, necessitating specific adaptations like action normalization and discretization.
  • Excess Loss is Key: Using the "excess loss" (policy loss minus reference loss) is crucial for robust optimization in robotics. It allows the method to focus on domains where the policy can still improve, rather than just those with inherently high losses.
  • Subsetting is Viable: Re-Mix's learned weights can be effectively used to subset large datasets, reducing storage and compute requirements without significant performance degradation. This is because the weights highlight the most informative data portions.
  • Human Expertise is Not Always Optimal: While human-expert curated weights showed improvement over uniform sampling, Re-Mix consistently outperformed both, suggesting that automated methods can discover better data mixtures.

Key Results

  • Performance Improvement: Re-Mix achieved an average performance improvement of 38% over uniform weighting and 32% over human-selected weights on the RT-X dataset mix.
  • Dataset Subsetting: Re-Mix enabled effective subsetting of datasets to 25% of their original size while retaining competitive performance, outperforming uniform and human-weighted subsetting significantly. For example, on RT-X datasets, Re-Mix retained performance while human weights dropped over 10%.
  • Ablation Studies:
    • Action Discretization: Using discrete actions for Re-Mix estimation led to significantly better performance than using continuous actions.
  • Reference Model Overfitting: Choosing a reference model checkpoint that is overfit to the training data decreased performance by over 15% on average.
  • Bridge Dataset: On the Bridge V2 dataset, Re-Mix showed similar performance to uniform weighting when using the full dataset, suggesting that uniform sampling is sufficient when the dataset is less heterogeneous or when the model can easily fit all scenes.

Limitations and Future Work

  • Real-World Evaluation: While evaluations were conducted on WidowX and Franka robots, extending evaluations to more embodiments, potentially via simulated environments, is a future direction.
  • Abnormal Action Distributions: Re-Mix tends to upweight datasets with abnormal action distributions (e.g., Toto dataset). Future work aims to achieve less sensitivity to such irregularities.
  • Computational Cost: The current approach requires training policies twice (for the reference model and DRO). Future work could explore "on-the-fly" data curation within a single training run.
  • Scaling to Larger Datasets: The paper demonstrates success on two large datasets, but scaling Re-Mix to even larger datasets like the full OpenX dataset (>2M episodes) is an exciting next step.

Summary updated

BibTeX
@inproceedings{hejna2024re,
  author = {Joey Hejna and Chethan Bhateja and Yichen Jian and Karl Pertsch and Dorsa Sadigh},
  title = {{Re-Mix: Optimizing Data Mixtures for Large Scale Imitation Learning}},
  booktitle = {XE @ CoRL},
  year = {2024},
  url = {https://openreview.net/forum?id=jgys46dD4i},
}
Figure