Black-box coreset variational inference

Dionysios Manousakas, Hippolyt Ritter, Theofanis Karaletsos

The Challenge of Big Data in Bayesian Inference

In the era of "Big Data," training probabilistic models on millions of data points is computationally grueling and hardware-intensive. Bayesian coresets offer an elegant solution: finding a small, weighted subset of the data (or "pseudodata") that acts as a proxy for the full dataset. This coreset preserves the essential statistical information of the original data while drastically speeding up downstream inference tasks.

However, existing coreset methods—such as Sparse Variational Inference (Sparse VI) or Pseudocoreset Variational Inference (PSVI)—hit a "tractability wall." They typically require the model's posterior to be easy to sample from or have a closed-form expression. This limitation excludes some of the most exciting models in modern AI, such as Bayesian Neural Networks (BNNs), where the posterior is notoriously messy and intractable. Consequently, practitioners have often been forced to rely on crude heuristics or abandon coresets for deep learning entirely.

Black-box Coreset Variational Inference

To overcome these limitations, researchers have introduced Black-box Coreset Variational Inference, a framework that reframes coreset construction as a variational optimization problem agnostic to the internal complexity of the model.

The framework relies on several key components:

  • Coresets as Variational Families: The coreset (comprising the locations and weights of the points) is interpreted as parameters of a rich variational distribution.
  • The Black-Box Objective: Because sampling directly from the coreset posterior is intractable for complex models, the authors employ Self-Normalized Importance Sampling (IS). They draw samples from a simpler, tractable "proposal" distribution and use importance weights to "correct" those samples, making them behave as if they originated from the true coreset posterior.
  • Nested Optimization: The algorithm operates in two loops. An "inner" loop fits a standard variational approximation to the current coreset, while an "outer" loop updates the coreset points and weights to better match the true full-data posterior.

The authors propose two primary flavors of this method:

  1. BB Sparse VI: Selects and weights actual points from the original dataset.
  2. BB PSVI: Learns "pseudodata"—synthetic points that do not exist in the original set but perfectly summarize the data's geometry.

Visualizing Coresets: The Power of Pseudodata

The authors evaluated their framework across various tasks, starting with synthetic 2D datasets like the "half-moon" binary classification problem. This visualization highlights a key insight: pseudodata is a powerhouse.

Comparison of HMC on full data, an extracted coreset, and a random coreset for a 2D half-moon dataset.

As seen in the synthetic experiments, BB PSVI can "invent" a handful of synthetic points that, when placed strategically (often near decision boundaries), provide much better inference results than a larger number of randomly selected real points. You don't need real data points to accurately represent a dataset's decision boundaries.

Key Results and Extreme Compression

Beyond synthetic data, the framework was tested on classic binary classification benchmarks (Webspam, Phishing, and Adult) ranging from 10k to 150k points, as well as computer vision tasks like MNIST using a LeNet architecture.

  • Extreme Compression: On logistic regression tasks, BB PSVI achieved performance comparable to the full dataset (up to 150,000 points) using fewer than 50 weighted points.
  • Bridging the Gap to BNNs: By using the black-box Evidence Lower Bound (ELBO), this method provides one of the first principled ways to apply Bayesian coresets to BNNs, bypassing the model-specific math that previously limited coresets to simpler models.
  • Outperforming Baselines: On MNIST, the black-box coreset method consistently beat random coreset selection and outperformed several frequentist "dataset distillation" techniques at small coreset sizes.
Performance table showing BB PSVI achieving highly competitive results across Webspam, Phishing, and Adult datasets compared to baselines.

The authors also demonstrated that these coresets could be utilized for continual learning, acting as a memory buffer that prevents a model from forgetting old tasks as it learns new ones. Furthermore, they found that Importance Sampling is surprisingly resilient; even a "non-trivial" Effective Sample Size (ESS) provided enough signal to guide the coreset optimization effectively.

Limitations and Future Directions

The primary limitation of this approach is its reliance on Importance Sampling. As the model parameter space grows extremely large (e.g., in very deep ResNets), the variance of the importance weights can become too high, leading to noisy gradients.

Future work could integrate more sophisticated sampling schemes, such as Sequential Monte Carlo (SMC), to handle even higher-dimensional models. Additionally, there is significant potential for using these coresets in privacy-preserving machine learning, where a coreset could summarize a sensitive dataset without revealing individual private records.

Summary updated

BibTeX
@inproceedings{manousakas2022black,
  author = {Dionysios Manousakas and Hippolyt Ritter and Theofanis Karaletsos},
  title = {{Black-box coreset variational inference}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2022},
  url = {https://openreview.net/forum?id=XBXEfw6OxRh},
}
Figure