BRUNO: A Deep Recurrent Model for Exchangeable Data

Iryna Korshunova, Jonas Degrave, Ferenc Huszar, Yarin Gal, Arthur Gretton, Joni Dambre

Introduction

BRUNO is a novel model architecture that combines the representational power of deep learning with the mathematical rigor of exact Bayesian inference for sets of data where order does not matter (exchangeable data). By pairing bijective normalizing flows with Student-t processes, BRUNO achieves exact, permutation-invariant inference with linear computational complexity. This makes it highly effective for tasks like few-shot learning and conditional image generation.

The Challenge of Exchangeable Data

In many machine learning tasks, we deal with "sets" of objects rather than sequential data. Examples include a collection of photos of the same person or a set of medical scans for a single patient. In statistics, these are called exchangeable sequences—meaning the joint probability of the data remains identical regardless of how you shuffle the order of observations.

Standard deep learning tools, such as Recurrent Neural Networks (RNNs), are inherently sensitive to order. While researchers have attempted to adapt models for sets (e.g., the "Neural Statistician"), these approaches often rely on variational approximations that can be computationally expensive or mathematically "loose." The core challenge is to create a model that is simultaneously:

  1. Provably exchangeable: Mathematically guaranteed to ignore input order.
  2. Flexible: Able to model complex, high-dimensional data like images.
  3. Efficient: Capable of making predictions and generating new samples without the $O(n^3)$ computational cost typically associated with exact Bayesian methods like Gaussian Processes.

Methods: Introducing BRUNO

The authors propose BRUNO (Bayesian RecUrrent Neural mOdel), which elegantly solves these challenges using two main components:

BRUNO Architecture
  • Real NVP (Normalizing Flows): This acts as a bijective (two-way) feature extractor. It maps complex input data (like image pixels) into a latent space $Z$. Because the mapping is strictly bijective, the model can move from data to latents and back to data without losing any information.
  • Student-t Process (TP): In the latent space, the model assumes the data follows a Student-t process. TPs are a generalized version of Gaussian Processes that handle "heavy-tailed" distributions better, making them more robust to outliers.
  • Recurrent Updates: The core mathematical innovation is the derivation of recurrent equations for the TP. Usually, Bayesian inference on $n$ points requires inverting a covariance matrix, costing $O(n^3)$. The authors demonstrate that for exchangeable sequences, the model's "hidden state" (the TP parameters) can be updated in $O(n)$ time.

This combination allows BRUNO to behave operationally like an RNN—processing one item at a time and updating a hidden state—but with the strict mathematical guarantee that the final joint distribution is independent of the input order.

Key Insights

  • Exchangeability-by-Design: Unlike models that try to learn to be order-independent, BRUNO is exchangeable by its very architecture. This makes it a "meta-learner" that naturally understands how to generalize from a few examples.
  • Exact vs. Approximate: Most deep Bayesian models rely on Variational Inference (approximations). BRUNO performs exact Bayesian inference in the latent space.
  • The "Aha" Moment: A bijective flow preserves exchangeability. If you shuffle the inputs $x$, the corresponding latent codes $z$ are shuffled identically, and the underlying Student-t Process is invariant to the order of $z$.

Key Results

The model was evaluated on standard image benchmarks, including Omniglot (the gold standard for few-shot learning), MNIST, Fashion-MNIST, and CIFAR-10.

Few-Shot Learning Results on Omniglot
  • Few-Shot Learning: On the Omniglot 20-way, 1-shot task (identifying a character after seeing only one example among 20 choices), BRUNO achieved 86.3% accuracy using a purely generative approach. When fine-tuned with a discriminative objective, it reached 97.1%, making it highly competitive with specialized state-of-the-art models like Matching Networks (98.1%).
  • Conditional Generation: BRUNO can generate new, diverse versions of a character after seeing just a few examples. Unlike some VAE-based models, BRUNO's generated samples become less variable as it sees more examples of the same class, correctly reflecting its increased statistical certainty.
  • Anomaly Detection: Because it computes exact likelihoods, BRUNO can effectively identify "outliers" in a set (e.g., detecting a dog image hidden within a set of cats).

Limitations and Future Work

While powerful, BRUNO has a few limitations:

  • Latent Independence: The current model assumes that different dimensions in the latent space are independent. While this simplifies the math for linear scaling, it might limit the model's ability to capture complex cross-dimensional correlations.
  • Fixed Mean: The mean of the Student-t process is fixed to zero during training, which might be a restrictive prior for certain data types.
  • Scaling to High-Res: While it performs exceptionally well on $28 \times 28$ images, scaling normalizing flows to very high-resolution, diverse natural images (like ImageNet) remains a general challenge.

Looking forward, the authors suggest BRUNO could be a powerful tool for federated learning or on-device machine learning, where privacy, exact inference, and data efficiency are paramount.

Summary updated

BibTeX
@inproceedings{korshunova2018bruno,
  author = {Iryna Korshunova and Jonas Degrave and Ferenc Huszar and Yarin Gal and Arthur Gretton and Joni Dambre},
  title = {{BRUNO: A Deep Recurrent Model for Exchangeable Data}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2018},
  url = {https://openreview.net/forum?id=VsXPJiDL7EEy},
}
Figure