Abstract
Robotic datasets are often a heterogeneous collection of trajectories recorded at varying control frequencies, such as high-frequency human teleoperation and low-frequency autonomous exploration. Standard offline Reinforcement Learning (RL) algorithms assume a fixed time discretization, which causes value propagation to occur at different rates in "algorithmic time" versus "physical time." This discrepancy leads to inconsistent regression targets, unstable training, and exploding Q-values. We propose Adaptive $N$-Step Returns to synchronize these propagation rates by scaling the look-ahead horizon $N$ inversely with the sampling frequency. Our method improves performance by an average of 50% across various simulated robotic tasks and demonstrates significant stability gains in complex environments like FrankaKitchen.
Introduction: The Frequency Mismatch Problem
In the pursuit of generalist robotic agents, researchers aggregate data from diverse sources. However, a critical yet often overlooked form of heterogeneity is the control frequency ($\delta t$). Standard RL assumes a consistent discretization of time. When mixing data from a 10Hz source (e.g., human demonstrations) with a 1Hz source (e.g., robot exploration), the underlying Markov Decision Process (MDP) changes.
As illustrated in Figure 1, a single Bellman update for the 1Hz robot propagates information across one full second of real-world time, whereas the same update for the 10Hz human covers only 0.1 seconds. This mismatch creates conflicting signals for the neural network, as the "distance" covered per step varies significantly across the dataset. This discrepancy causes "value propagation" to happen at different speeds during training, leading to unstable targets and ultimately, a policy that performs worse than if it had been trained on less, but more consistent, data.
Methodology: Adaptive $N$-Step Returns
To address this, we introduce Adaptive $N$-Step Returns. The core idea is to align the update stride so that every gradient step propagates value across a consistent amount of physical time, regardless of the trajectory's original sampling rate.
- Baseline Alignment: We treat the coarsest data (largest $\delta t$) as the baseline.
- Scaling $N$: For any higher-frequency data, we increase the $N$ in the $N$-step return calculation such that the ratio $N / \delta t$ remains constant. For instance, if the baseline is 1Hz ($N=1$), a 10Hz trajectory uses $N=10$.
- Implementation: This is integrated into Conservative Q-Learning (CQL). We modify the Bellman error and CQL pessimism terms to incorporate these adaptive look-aheads.
- Handling Fractional Steps: When the required $N$ is not an integer, we use Bernoulli sampling between the two nearest integers to maintain the correct expected look-ahead time.
Experimental Evaluation
We evaluated our approach on three simulated environments modified to support multiple frequencies:
- Modified Pendulum (OpenAI Gym): A classic control task with sparse rewards, tested at 0.02s, 0.01s, and 0.005s discretizations.
- Meta-World (Door Open): A manipulation task using a Sawyer arm with dense rewards, tested with frame-skips of 1, 2, 5, and 10.
- FrankaKitchen: A complex 9-DoF task mixing "expert" (40 frame-skip) and "medium-replay" (30 frame-skip) data.
Key Results and Empirical Analysis
The primary failure mode of naive frequency mixing is the "corrosion" of the value function. Simply adding more data can hurt performance if the frequencies are inconsistent.
As shown in Figure 4, naive mixing in the Pendulum task leads to exploding Q-values and significantly lower average rewards compared to training on individual frequencies. Our Adaptive $N$-step method mitigates this, yielding a 50% average performance boost across all tasks. In the complex FrankaKitchen environment, our method nearly doubled the average return (27.3 vs 14.7) compared to naive mixing. Qualitatively, Adaptive $N$-step returns produce much "cleaner" and more distinct $Q$-value maps across the state space compared to the noisy, blurred maps produced by naive mixing.
Conclusion and Future Work
Adaptive $N$-step returns provide a simple, effective mechanism for handling multi-frequency data in offline RL. By ensuring that value propagation is synchronized in physical time, we enable agents to benefit from diverse, heterogeneous datasets rather than being hindered by them.
However, limitations remain. The current approach requires the time step ($\delta t$) for each trajectory to be known and fixed. Future work includes handling jittery frequencies and inferring $\delta t$ directly from observations when metadata is unavailable. While this paper focuses on time, other forms of heterogeneity (different sensors, different robot dynamics) remain open challenges for large-scale offline RL.
Summary updated