Table of Contents
Fetching ...

Less is More: Clustered Cross-Covariance Control for Offline RL

Nan Qiao, Sheng Yue, Shuning Wang, Yongheng Deng, Ju Ren

TL;DR

This work identifies harmful cross-covariance in the TD second moment as a primary instability source in offline RL under weak data coverage. It introduces Clustered Cross-Covariance Control for TD (C^4), an EM-style, gradient-space clustering framework that partitions the replay buffer into local clusters and performs single-cluster updates while applying a gradient-based penalty to bound within-cluster cross-covariance; it also proves that these modifications preserve a computable lower bound on the standard improvement targets. Theoretical analysis decomposes the TD variance into beneficial supervised-like terms and a harmful TD cross term, motivating the cluster-based and mixture-regularized objective. Empirically, C^4 yields up to about 30% improvements in returns on small data regimes across D4RL benchmarks, with modest computational overhead and strong plug-and-play compatibility with multiple offline RL backbones. Collectively, the approach offers a robust, scalable path to stabilizing offline RL under limited coverage and distributional shift.

Abstract

A fundamental challenge in offline reinforcement learning is distributional shift. Scarce data or datasets dominated by out-of-distribution (OOD) areas exacerbate this issue. Our theoretical analysis and experiments show that the standard squared error objective induces a harmful TD cross covariance. This effect amplifies in OOD areas, biasing optimization and degrading policy learning. To counteract this mechanism, we develop two complementary strategies: partitioned buffer sampling that restricts updates to localized replay partitions, attenuates irregular covariance effects, and aligns update directions, yielding a scheme that is easy to integrate with existing implementations, namely Clustered Cross-Covariance Control for TD (C^4). We also introduce an explicit gradient-based corrective penalty that cancels the covariance induced bias within each update. We prove that buffer partitioning preserves the lower bound property of the maximization objective, and that these constraints mitigate excessive conservatism in extreme OOD areas without altering the core behavior of policy constrained offline reinforcement learning. Empirically, our method showcases higher stability and up to 30% improvement in returns over prior methods, especially with small datasets and splits that emphasize OOD areas.

Less is More: Clustered Cross-Covariance Control for Offline RL

TL;DR

This work identifies harmful cross-covariance in the TD second moment as a primary instability source in offline RL under weak data coverage. It introduces Clustered Cross-Covariance Control for TD (C^4), an EM-style, gradient-space clustering framework that partitions the replay buffer into local clusters and performs single-cluster updates while applying a gradient-based penalty to bound within-cluster cross-covariance; it also proves that these modifications preserve a computable lower bound on the standard improvement targets. Theoretical analysis decomposes the TD variance into beneficial supervised-like terms and a harmful TD cross term, motivating the cluster-based and mixture-regularized objective. Empirically, C^4 yields up to about 30% improvements in returns on small data regimes across D4RL benchmarks, with modest computational overhead and strong plug-and-play compatibility with multiple offline RL backbones. Collectively, the approach offers a robust, scalable path to stabilizing offline RL under limited coverage and distributional shift.

Abstract

A fundamental challenge in offline reinforcement learning is distributional shift. Scarce data or datasets dominated by out-of-distribution (OOD) areas exacerbate this issue. Our theoretical analysis and experiments show that the standard squared error objective induces a harmful TD cross covariance. This effect amplifies in OOD areas, biasing optimization and degrading policy learning. To counteract this mechanism, we develop two complementary strategies: partitioned buffer sampling that restricts updates to localized replay partitions, attenuates irregular covariance effects, and aligns update directions, yielding a scheme that is easy to integrate with existing implementations, namely Clustered Cross-Covariance Control for TD (C^4). We also introduce an explicit gradient-based corrective penalty that cancels the covariance induced bias within each update. We prove that buffer partitioning preserves the lower bound property of the maximization objective, and that these constraints mitigate excessive conservatism in extreme OOD areas without altering the core behavior of policy constrained offline reinforcement learning. Empirically, our method showcases higher stability and up to 30% improvement in returns over prior methods, especially with small datasets and splits that emphasize OOD areas.
Paper Structure (47 sections, 10 theorems, 79 equations, 13 figures, 15 tables, 1 algorithm)

This paper contains 47 sections, 10 theorems, 79 equations, 13 figures, 15 tables, 1 algorithm.

Key Result

Theorem 1

All expectations, variances, and covariances below are taken over $k_{},k'_{},\mathbf{w}_{},\mathbf{w}'_{}$. With the first order approximation for $Q_\phi$ in feature space, the variance satisfies where $x$ and $x'$ are drawn from $\mathcal{D}$, with $x'$ being the next state action pair that follows $x$. By eq:second-moment-identity, this variance decomposition directly controls the TD second m

Figures (13)

  • Figure 1: Left four panels report cosine similarities between $\nabla \mathbb{E}[\delta^{2}]$ and $\nabla \mathrm{Var}[\delta]$ versus $\nabla (\mathbb{E}[\delta])^{2}$ under $\mathbb{E}[\delta^{2}] = (\mathbb{E}[\delta])^{2} + \mathrm{Var}[\delta]$, showing that the variance term dominates across benchmarks. Right four panels track $\mathrm{Var}[\delta] \approx \gamma^2(k')^2 A + k^2 B - 2kk'C$ and the score, where larger $A, B$ and smaller $C$ correlate with better performance, indicating $A$ and $B$ act as beneficial implicit regularizers while $C$ is harmful.
  • Figure 2: Intuition behind clustering and TD covariance. The left panel shows that without clustering, the overall covariance ellipse mixes within-cluster spread and between-cluster offsets, so the TD cross term couples unrelated modes and its sign can drift. Right panel clusters the stacked gradients $y=[g',g]$ and samples each minibatch from a single cluster, which removes the between-cluster driver and leaves updates governed by local within-cluster covariance $C_z$. The result is more local TD updates, weaker spurious coupling across modes, and improved stability in OOD directions.
  • Figure 3: Radar charts comparing normalized scores on D4RL MuJoCo locomotion tasks (10k samples).
  • Figure 4: Wall-clock runtime comparisons, and performance sensitivity to hyperparameters $\lambda$ and $\alpha$.
  • Figure 5: Performance comparison on CQL vs. (+LN), (+DR3) and (+$C^4$).
  • ...and 8 more figures

Theorems & Definitions (19)

  • Theorem 1
  • Theorem 2: Single-cluster sampling removes the between-cluster driver
  • Corollary 1
  • Remark 1: on the base term and the vanishing covariance
  • Proposition 1: block form under perturbation randomness
  • Corollary 2: equal–direction simplification
  • proof : Proof of Theorem \ref{['thm:within-only']}
  • Lemma 1: Alignment inside a cluster controls sign and magnitude
  • proof
  • Definition 1: f divergence and special cases
  • ...and 9 more