BRUNO: A Deep Recurrent Model for Exchangeable Data

Iryna Korshunova, Jonas Degrave, Ferenc Huszár, Yarin Gal, Arthur Gretton, Joni Dambre · DOI

Abstract

We present a novel model architecture which leverages deep learning tools to perform exact Bayesian inference on sets of high dimensional, complex observations. Our model is provably exchangeable, meaning that the joint distribution over observations is invariant under permutation: this property lies at the heart of Bayesian inference. The model does not require variational approximations to train, and new samples can be generated conditional on previous samples, with cost linear in the size of the conditioning set. The advantages of our architecture are demonstrated on learning tasks that require generalisation from short observed sequences while modelling sequence variability, such as conditional image generation, few-shot learning, and anomaly detection.

Introduction

In many real-world scenarios, we deal with "exchangeable" data: sets of objects where the specific order doesn't matter, but the shared characteristics do (e.g., a set of photos of the same person). Standard deep learning tools like Recurrent Neural Networks (RNNs) are inherently sensitive to the order of inputs. While Bayesian methods are the gold standard for modeling such sets, they often struggle with high-dimensional data like images. To make Bayesian inference work for complex data, researchers usually rely on variational approximations (like those in VAEs), which can be computationally expensive and may violate the core property of exchangeability.

BRUNO (Bayesian RecUrrent Neural mOdel) bridges this gap by creating a model that handles complex observations while maintaining exact, tractable Bayesian updates in a way that is computationally efficient ($O(n)$ complexity).

Architecture and Methodology

BRUNO's architecture is a clever marriage of two distinct mathematical frameworks:

  1. Real NVP (Normalizing Flows): This acts as a bijective (invertible) feature extractor. It maps high-dimensional observations ($x$, like pixels) into a latent feature space ($z$). Because it is bijective, the model can evaluate exact probability densities and generate samples without losing information.
  2. Student-t Process (TP): In the latent space, the model assumes the features follow a Student-t process. TPs are "exchangeable" by design and have an analytic form for predictive distributions. Unlike Gaussian Processes, TPs are more robust to outliers and provide a more flexible way to model uncertainty.
BRUNO Architecture: Real NVP maps observations to a latent space where a Student-t Process performs exact Bayesian updates.

The authors derived recurrent update equations for the TP parameters. This allows the model to function like an RNN—updating its "hidden state" (which represents the Bayesian posterior) as it sees new data—but with the mathematical guarantee that the final result is independent of the input order. By using an invertible mapping (Real NVP), the model ensures that the exchangeability property in the latent space perfectly translates back to the observation space.

Experimental Results

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

Few-Shot Learning

On the Omniglot 20-way, 1-shot task, BRUNO achieved 91.3% accuracy (with discriminative fine-tuning), making it competitive with specialized state-of-the-art models like Matching Networks.

Few-shot classification performance on Omniglot. BRUNO achieves competitive results, particularly with discriminative fine-tuning.

Conditional Generation and Anomaly Detection

The model can generate new images that match the "style" of a small set of provided examples. As more examples are provided, the generated samples become increasingly coherent and less variable. Furthermore, because the model computes exact likelihoods, it can perform "online" anomaly detection. In experiments with MNIST, it successfully flagged a '7' appearing in a sequence of '1's by showing a sharp drop in the predictive score.

Discussion and Limitations

While BRUNO offers a robust framework for exact inference, it currently assumes independence between latent dimensions. While this simplifies the math, it may limit the model's ability to capture complex correlations between features. Additionally, scaling normalizing flows to very high-resolution images remains a general challenge in the field due to memory constraints.

Future directions for BRUNO include applications in "many-shot" meta-learning and privacy-preserving federated learning, where sets of data are distributed across many devices.

Summary updated

BibTeX
@inproceedings{korshunova2018bruno,
  author = {Iryna Korshunova and Jonas Degrave and Ferenc Huszár 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