Using Temperature Sampling to Effectively Train Robot Learning Policies on Imbalanced Datasets

Basavasagar Patil, Sydney Belt, Jayjun Lee, Nima Fazeli, Bernadette Bucher

TL;DR

Large-scale robotic datasets are heavily imbalanced, often dominated by common actions like pick-and-place at the expense of rarer skills. This paper introduces a simple, few-lines-of-code temperature-based sampling strategy with a cosine warming schedule to dynamically rebalance training. The approach significantly boosts success rates on low-resource tasks in both simulation and real-world robot manipulation without sacrificing performance on high-resource ones.

What Problem Does This Paper Address?

As robot learning scales up, researchers are increasingly relying on massive, uncurated datasets (like the Open-X Embodiment Dataset) to train large multi-task policies. However, prioritizing data quantity over precise curation introduces a severe bottleneck: action-primitive imbalance.

While tasks might have distinct language descriptions (e.g., "pick up an apple" vs. "pick up an orange"), they often share identical physical action sequences. As a result, basic behaviors like pick-and-place dominate the dataset, while equally important skills like wiping, turning knobs, or opening drawers are severely under-represented. Standard random sampling causes neural networks to spend most of their capacity on these high-resource tasks, leading to biased representations and poor generalization on rare tasks. Existing solutions like data augmentation are computationally expensive, while adaptive data reweighting methods can be highly unstable and sensitive to hyperparameters.

Methods

The authors propose a straightforward Temperature-Based Sampling strategy that reshapes task probabilities during minibatch creation. Given a set of tasks with varying dataset sizes $|D_i|$, the probability $p_i$ of sampling task $i$ at temperature $\tau$ is defined as:

$$p_i^{(\tau)} = \frac{|D_i|^{1/\tau}}{\sum_{j=1}^m |D_j|^{1/\tau}}$$

  • When $\tau = 1$, the strategy reverts to standard random sampling (proportional to dataset size).
  • When $\tau > 1$, it upsamples low-resource tasks and downsamples high-resource ones.
Figure 1: Temperature-based sampling rebalances the distribution over tasks, enabling more equitable training and improved generalization across both high- and low-resource domains.

Crucially, instead of keeping $\tau$ fixed, the authors introduce a Cosine Warming Schedule. The training starts at $\tau = 1$ (fully imbalanced) and smoothly transitions to $\tau = 5$ (highly rebalanced) over the course of training. This allows the model to first anchor its representations using the abundant data from high-resource tasks before shifting its capacity to specialize in the nuances of low-resource tasks.

Datasets

The method was validated across three distinct environments:

  1. Sparse Parity (Toy Setup): A synthetic, controlled multi-task benchmark used to isolate the effects of sampling strategies under a heavy-tailed Zipfian task distribution.
  2. RoboCasa (Simulation): A large-scale kitchen manipulation dataset. The authors created an artificial imbalance of 3000:50 (3,000 demonstrations for seven pick-and-place tasks, but only 50 demonstrations for all other atomic tasks).
  3. LIBERO (Simulation): A lifelong robot manipulation benchmark where sub-suites were imbalanced using skewed ratios.
  4. Real-World Dataset: 588 demonstrations collected across 8 tasks using a Franka Panda 7-DoF robot arm, featuring an inherent real-world imbalance (e.g., 25.7% of data for "Egg in Carton" vs. 5.1% for "Pen in Mug").

Key Insights and Ideas

  • Warming Beats Decay: Intuitively, one might think starting with a balanced dataset and decaying to the true distribution (or vice versa) is ideal. However, the authors found that warming up the temperature—starting imbalanced and ending balanced—yielded the best results. This prevents the model from overfitting to low-resource tasks early on.
  • Stability Over Complexity: Sophisticated, loss-based adaptive reweighting frameworks like ReMix can fail to converge due to extreme sensitivity to hyperparameters. Temperature sampling provides a stable, non-adaptive alternative that achieves better results with zero training overhead.
  • Maximizing Fixed Capacity: Temperature sampling acts as an efficient allocator of model capacity. It prevents smaller models from wasting parameters on over-represented tasks, allowing them to achieve stronger performance even at smaller scales.

Key Results

Toy & Simulation Experiments

In the Sparse Parity task, temperature-based control led to significantly faster convergence compared to standard random sampling and adaptive methods.

Total training loss over time for sparse parity tasks

On the imbalanced RoboCasa dataset, temperature sampling achieved an overall success rate of 25%, outperforming random sampling (18%) and standard fixed upsampling (15%). It dramatically improved low-resource tasks like "Open/Close Drawers" (from 31% to 56%) and "Turn Levers" (from 18% to 47%) without degrading pick-and-place performance.

Figure 4: Average subtask success rates in simulation for high- and low-resource tasks under different sampling strategies. Temperature sampling provides the highest performance on low-resource tasks while preserving high performance on high-resource ones.

Real-World Hardware Validation

When deployed on a physical Franka Panda robot, the policy trained with a cosine warming schedule achieved an overall success rate of 58%, compared to just 42% using random sampling. Low-resource tasks saw massive improvements: "Pen in Mug" jumped from 20% to 50%, and "Slide Cube" increased from 20% to 40%.

Real-world performance on a Franka Panda robot across four tasks

Limitations and Future Work

While highly effective, the proposed method has two main limitations:

  1. Fixed Schedule Dependence: The cosine warming schedule requires knowing the total number of training steps in advance. This makes it difficult to apply directly to open-ended or continual learning setups.
  2. Assumption of Segmented Tasks: The strategy relies on the dataset being explicitly segmented into distinct tasks with known frequencies. It cannot be applied out-of-the-box to completely unstructured, unlabelled robot trajectories. The authors point to automated skill-decomposition and trajectory segmentation as vital next steps to bridge this gap.

Summary updated

BibTeX
@misc{patil2025using,
  author = {Basavasagar Patil and Sydney Belt and Jayjun Lee and Nima Fazeli and Bernadette Bucher},
  title = {{Using Temperature Sampling to Effectively Train Robot Learning Policies on Imbalanced Datasets}},
  year = {2025},
  eprint = {2510.19373},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2510.19373},
}
Figure