Table of Contents
Fetching ...

Closing the Gap between TD Learning and Supervised Learning -- A Generalisation Point of View

Raj Ghugare, Matthieu Geist, Glen Berseth, Benjamin Eysenbach

TL;DR

This work formalises stitching in goal-conditioned RL as a form of combinatorial generalisation across state–goal pairs that are not jointly seen in training data, and argues that standard OCBC methods based on supervised learning do not inherently possess this property. It provides a theoretical framework showing that the BC policy derived from a mixture of data-collecting policies need not match the test-time state–goal distribution, thereby lacking guaranteed combinatorial generalisation. To address this, the authors introduce temporal data augmentation that samples new goals from trajectories via nearby waypoint states, and prove that, under Lipschitz smoothness, this augmentation approximates one-step stitching distributions; empirically, augmentation improves stitching performance on both low- and high-dimensional tasks and reveals that data scale alone does not guarantee combinatorial generalisation. The work also entails new offline datasets designed to explicitly test stitching, demonstrating that purely SL-based RL methods struggle on unseen state–goal pairs while augmentation can recover substantial performance gains, with limitations tied to distance metrics and spurious correlations. Overall, the paper highlights the central role of combinatorial generalisation for data-efficient time-series learning and points to data augmentation as a simple, effective remedy with potential applicability beyond RL to other sequential domains like audio, video, and text.

Abstract

Some reinforcement learning (RL) algorithms can stitch pieces of experience to solve a task never seen before during training. This oft-sought property is one of the few ways in which RL methods based on dynamic-programming differ from RL methods based on supervised-learning (SL). Yet, certain RL methods based on off-the-shelf SL algorithms achieve excellent results without an explicit mechanism for stitching; it remains unclear whether those methods forgo this important stitching property. This paper studies this question for the problems of achieving a target goal state and achieving a target return value. Our main result is to show that the stitching property corresponds to a form of combinatorial generalization: after training on a distribution of (state, goal) pairs, one would like to evaluate on (state, goal) pairs not seen together in the training data. Our analysis shows that this sort of generalization is different from i.i.d. generalization. This connection between stitching and generalisation reveals why we should not expect SL-based RL methods to perform stitching, even in the limit of large datasets and models. Based on this analysis, we construct new datasets to explicitly test for this property, revealing that SL-based methods lack this stitching property and hence fail to perform combinatorial generalization. Nonetheless, the connection between stitching and combinatorial generalisation also suggests a simple remedy for improving generalisation in SL: data augmentation. We propose a temporal data augmentation and demonstrate that adding it to SL-based methods enables them to successfully complete tasks not seen together during training. On a high level, this connection illustrates the importance of combinatorial generalization for data efficiency in time-series data beyond tasks beyond RL, like audio, video, or text.

Closing the Gap between TD Learning and Supervised Learning -- A Generalisation Point of View

TL;DR

This work formalises stitching in goal-conditioned RL as a form of combinatorial generalisation across state–goal pairs that are not jointly seen in training data, and argues that standard OCBC methods based on supervised learning do not inherently possess this property. It provides a theoretical framework showing that the BC policy derived from a mixture of data-collecting policies need not match the test-time state–goal distribution, thereby lacking guaranteed combinatorial generalisation. To address this, the authors introduce temporal data augmentation that samples new goals from trajectories via nearby waypoint states, and prove that, under Lipschitz smoothness, this augmentation approximates one-step stitching distributions; empirically, augmentation improves stitching performance on both low- and high-dimensional tasks and reveals that data scale alone does not guarantee combinatorial generalisation. The work also entails new offline datasets designed to explicitly test stitching, demonstrating that purely SL-based RL methods struggle on unseen state–goal pairs while augmentation can recover substantial performance gains, with limitations tied to distance metrics and spurious correlations. Overall, the paper highlights the central role of combinatorial generalisation for data-efficient time-series learning and points to data augmentation as a simple, effective remedy with potential applicability beyond RL to other sequential domains like audio, video, and text.

Abstract

Some reinforcement learning (RL) algorithms can stitch pieces of experience to solve a task never seen before during training. This oft-sought property is one of the few ways in which RL methods based on dynamic-programming differ from RL methods based on supervised-learning (SL). Yet, certain RL methods based on off-the-shelf SL algorithms achieve excellent results without an explicit mechanism for stitching; it remains unclear whether those methods forgo this important stitching property. This paper studies this question for the problems of achieving a target goal state and achieving a target return value. Our main result is to show that the stitching property corresponds to a form of combinatorial generalization: after training on a distribution of (state, goal) pairs, one would like to evaluate on (state, goal) pairs not seen together in the training data. Our analysis shows that this sort of generalization is different from i.i.d. generalization. This connection between stitching and generalisation reveals why we should not expect SL-based RL methods to perform stitching, even in the limit of large datasets and models. Based on this analysis, we construct new datasets to explicitly test for this property, revealing that SL-based methods lack this stitching property and hence fail to perform combinatorial generalization. Nonetheless, the connection between stitching and combinatorial generalisation also suggests a simple remedy for improving generalisation in SL: data augmentation. We propose a temporal data augmentation and demonstrate that adding it to SL-based methods enables them to successfully complete tasks not seen together during training. On a high level, this connection illustrates the importance of combinatorial generalization for data efficiency in time-series data beyond tasks beyond RL, like audio, video, or text.
Paper Structure (45 sections, 5 theorems, 13 equations, 14 figures, 3 tables, 1 algorithm)

This paper contains 45 sections, 5 theorems, 13 equations, 14 figures, 3 tables, 1 algorithm.

Key Result

Lemma 3.1

Let a set of context-conditioned policies $\{\beta_h(a \mid s)\}$ and distribution over contexts $p(h)$ be given. There exists a Markovian policy $\beta(a \mid s)$ such that it has the same discounted state occupancy measure as the mixture of policies:

Figures (14)

  • Figure 1: (a) The MDP has 5 states and two actions (up and right). (b)Training distribution: Data is collected using two contexts conditioned policies shown in blue and red. (c)Testing distribution: The behavior cloned policy (equation \ref{['eq:policy-mixture']}) is shown in purple. During training, the state-goal pair $\{s_t=2, s_{t+}=4\}$ is never sampled, as no data collecting policy goes from state $2$ to state $4$. But the behavior cloned policy has non zero probability of sampling the state-goal pair $\{s_t=2, s_{t+}=4\}$. Because of this discrepancy between the train and test distributions, OCBC algorithms do not have any guarantees of outputting the correct action for the state-goal pair $\{s_t=2, s_{t+}=4\}$. Whereas dynamic programming based methods can propagate rewards through the backwards stitched path of $4 \rightarrow 3 \rightarrow 2$ to output the correct action.
  • Figure 2: Data augmentation for stitching: After sampling an initial training example $(s, a, g)$ (\ref{['eq:objective-in-terms-of-data-collection']}), we look for a waypoint state $w$ in the light blue region around the original goal $g$, and then sample a new augmented goal $\tilde{g}$ from later in that trajectory. This is a simple approach to sample cross trajectory goals $\tilde{g}$ such that the action $a$ is still an optimal action at state $s$.
  • Figure 3: Goal conditioned RL : Different colors represent the navigation regions of different data collecting policies. During data collection, these policies navigate between random state-goal pairs chosen from their region of navigation. These visualisations are for the "point" mazes. The "ant" maze datasets are similar. Appendix \ref{['fig:ant-weak-dataset']} shows the "ant" maze datasets.
  • Figure 4: Return conditioned RL : We visualise our new image based and partially observable environment created using Miniworld MinigridMiniworld23.
  • Figure 5: Adding data augmentation outperforms the OCBC baselines on most tasks. "Only goal augmentation" refers to an oracle version of our augmentation that uses privileged information ($x,y$ coordinates) when performing augmentation. Adding temporal data augmentation (both standard and oracle versions) improves the performance of both RvS and DT on $5/6$ tasks.
  • ...and 9 more figures

Theorems & Definitions (9)

  • Lemma 3.1: Rephrased from Theorem 2.8 of ziebart2010modeling, Theorem 6.1 of feinberg2012handbook
  • Definition 1: Combinatorial generalisation
  • Lemma 4.1
  • proof
  • Lemma 5.1
  • Lemma D.1
  • proof
  • Lemma D.2
  • proof