Meta-learning Priors for Efficient Online Bayesian Regression

James Harrison, Apoorva Sharma, Marco Pavone · OpenReview

Introduction

In the field of robotics, the ability to quantify uncertainty is paramount for safe planning and control. Gaussian Process (GP) regression has long been a staple for providing these uncertainty-aware predictions. However, GPs face two significant hurdles in real-time applications: computational scaling and the difficulty of incorporating complex physical priors. Standard GPs scale cubically ($\mathcal{O}(n^3)$) with the number of data points, which quickly becomes a bottleneck as a robot accumulates data during an episode. Furthermore, injecting domain-specific knowledge into a GP usually involves tuning generic kernel hyperparameters, which is often an unintuitive process for complex physical systems.

This paper introduces ALPaCA (Adaptive Learning for Probabilistic Connectionist Architectures), a meta-learning algorithm designed to bridge the gap between the flexibility of neural networks and the probabilistic rigor of Bayesian regression. By learning domain-specific basis functions offline, ALPaCA enables exact, real-time posterior updates that scale linearly ($\mathcal{O}(n)$), making it ideal for high-frequency robotic control.

The ALPaCA Framework

ALPaCA reimagines the regression problem by using a neural network to learn a set of custom basis functions from offline data. The approach is divided into two distinct phases:

1. Offline Meta-Learning

During the offline phase, the model undergoes a "learning-to-learn" process. Instead of training a network to map inputs directly to outputs, ALPaCA trains the network to act as a feature extractor. It jointly learns the network weights (the basis functions) and a Matrix Normal prior for the weights of the final layer. The training objective is to minimize the Kullback-Leibler (KL) divergence between the model's predicted posterior and the true empirical posterior across a variety of related tasks. This ensures that the learned prior is highly informative for the specific domain.

2. Online Inference

When the model is deployed online, the feature extractor (the hidden layers of the neural network) remains frozen. As new data arrives, the model performs exact Bayesian linear regression on the final layer. Because this update is analytical—essentially a recursive least squares calculation—it avoids the instability and computational cost of gradient-based adaptation methods like Model-Agnostic Meta-Learning (MAML). This shift from function-space (the "kernel trick") to weight-space regression is what allows the algorithm to achieve linear time complexity relative to the number of online data points.

Experimental Evaluation

The authors evaluated ALPaCA across a diverse set of benchmarks ranging from toy problems to real-world datasets:

  • Toy Regression Problems: Testing on sinusoids and step-functions demonstrated the model's ability to incorporate structural priors and reduce uncertainty with as few as one to five samples.
  • Simulated Dynamics: In OpenAI Gym's Pendulum and Hopper environments, the researchers varied physical parameters like mass, length, and friction. ALPaCA maintained flat evaluation times even as data accumulated, whereas GP computation time grew exponentially.
  • Real-World Driving: Using a dataset of human lane-change maneuvers, ALPaCA was tasked with predicting driver intent and style. The model successfully identified latent driving styles on the fly, reducing prediction uncertainty as the episode progressed.

Key Insights

The performance of ALPaCA highlights several critical advantages for roboticists:

  • Data-Driven Priors Beat Generic Kernels: By extracting priors from offline datasets, ALPaCA can make highly structured, globally aware predictions from just a single new data point.
  • Stability and Speed: Analytical updates are inherently more stable than gradient steps for online adaptation. ALPaCA avoids "meta-overfitting" and provides a predictable computational budget for real-time systems.
  • Sample Efficiency: ALPaCA consistently outperformed both standard GPs (in terms of negative log-likelihood) and MAML (in terms of Mean Squared Error), showing near-monotonic improvement as more data arrived.

Limitations and Future Directions

While ALPaCA offers significant improvements in speed and efficiency, it currently assumes Gaussian noise with a known covariance, which may not hold in all real-world scenarios. Additionally, because only the last layer is updated online, the model's online capacity is lower than methods that update the entire network.

Future work aims to integrate ALPaCA with standard GP methods to provide safety guarantees and out-of-distribution detection. Other proposed extensions include handling unknown noise covariance using multivariate t-distributions and implementing exponential forgetting algorithms to track time-varying parameters in dynamic environments.

Summary updated

BibTeX
@misc{harrison2018meta,
  author = {James Harrison and Apoorva Sharma and Marco Pavone},
  title = {{Meta-learning Priors for Efficient Online Bayesian Regression}},
  year = {2018},
  eprint = {1807.08912},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/1807.08912},
}
Figure