Fighting Uncertainty with Gradients: Offline Reinforcement Learning via Diffusion Score Matching


H.J. Terry Suh, Glen Chou*, Hongkai Dai*, Lujie Yang*, Abhishek Gupta, Russ Tedrake

*the three authors contributed equally

Abstract

Gradient-based methods enable efficient search capabilities in high dimensions. However, in order to apply them effectively in offline optimization paradigms such as offline Reinforcement Learning (RL) or Imitation Learning (IL), we require a more careful consideration of how uncertainty estimation interplays with first-order methods that attempt to minimize them. We study smoothed distance to data as an uncertainty metric, and claim that it has two beneficial properties: (i) it is stably convergent to data when minimized with gradient-based methods, and (ii) allows us to analyze model bias with Lipschitz constants. As distance to data can be expensive to compute online, we consider settings where we need amortize this computation. Instead of learning the distance however, we propose to learn the gradients of distance, as many first-order optimizers only requires access to gradients. We show these gradients can be efficiently learned with score-matching techniques by leveraging the equivalence between distance to data and data likelihood. Using this insight, we propose Score-Guided Planning (SGP), a planning algorithm for offline RL that utilizes score-matching to enable first-order planning in high-dimensional problems, where zeroth-order methods were unable to scale, and ensembles were unable to overcome local minima.