Neural Bayes: A Generic Parameterization Method for Unsupervised Learning

Devansh Arpit, Huan Wang, Caiming Xiong, Richard Socher, Yoshua Bengio

Abstract

Neural Bayes is a novel parameterization method that allows neural networks to express complex Bayesian statistical quantities—like posterior and conditional distributions—in closed form. By leveraging this, the authors develop powerful unsupervised learning objectives for maximizing mutual information and labeling disjoint manifolds, outperforming several established baselines in representation learning.

Introduction

In unsupervised representation learning, the objective is to learn meaningful features from data without explicit labels. Common approaches include Mutual Information Maximization (MIM) and Clustering. However, calculating statistical quantities involving latent variables is notoriously difficult, often requiring "variational bounds" or restrictive distributional assumptions. Furthermore, clustering high-dimensional data on "disjoint manifolds" (separate, non-overlapping surfaces) remains a significant challenge.

Methods

The authors introduce Neural Bayes, a method to parameterize discrete latent variable models.

The Parameterization

Given an input $x$ and a discrete latent variable $z$, the authors demonstrate that a neural network $L(x)$ with a softmax output can express the posterior $p(z|x)$, the conditional $p(x|z)$, and the marginal $p(z)$ in closed form. This approach does not require assuming a specific distribution shape for the data.

Unsupervised Objectives

  1. MIM Objective: An objective to maximize the mutual information between $x$ and $z$. Theorem 1 proves that gradients for this objective can be simplified, allowing training with standard mini-batches despite the objective requiring global dataset expectations.
  2. Disjoint Manifold Labeling (DML): An objective based on Jensen-Shannon divergence to partition data by assigning different labels to samples from different disjoint manifolds.

Regularization

Two specific regularization terms are crucial for practical success:

  • Uniform Prior Regularization ($\alpha$): Prevents "dead filters" by encouraging equal use of latent states.
  • Jacobian Regularization ($\beta$): Enforces network smoothness, which is theoretically necessary to correctly identify separate manifolds.
Learned MNIST features with optimal regularization ($\alpha=4, \beta=4$).

Experimental Results

The paper evaluates Neural Bayes on MNIST, CIFAR-10, CIFAR-100, and STL-10.

State-of-the-Art Features

On CIFAR-10, Neural Bayes-MIM achieved a classification accuracy of 82.81%, outperforming Deep Infomax (80.95%). On CIFAR-100, it reached 55.47%, significantly beating Deep Infomax's 49.74%.

Manifold Labeling

On MNIST, the DML approach labeled the 10 digit classes with 99.22% accuracy purely by treating them as disjoint manifolds—achieving nearly perfect unsupervised clustering.

Sensitivity and Ablation

Ablation studies showed that regularization is essential. Without the uniform prior, filters stop responding; without smoothness, the model fails to generalize. Figure 5 shows the sensitivity of test accuracy to the hyperparameter $\alpha$ and the impact of feature scaling.

Impact of regularization weight $\alpha$ and feature scaling on test accuracy.

Discussion and Limitations

While powerful, Neural Bayes has limitations:

  • Batch Size Sensitivity: High-fidelity gradients generally require large batch sizes (500+).
  • Discrete Latents: The current framework is limited to discrete latent variables ($z$).
  • Hyper-parameter Tuning: Performance is sensitive to the weights $\alpha$ and $\beta$, requiring careful tuning for new datasets.

Conclusion

Neural Bayes provides a flexible bridge between deep learning and Bayesian inference. By enabling closed-form computation of statistical quantities, it allows for more rigorous and effective unsupervised representation learning.

Summary updated

Abstract

We introduce a parameterization method called Neural Bayes which allows computing statistical quantities that are in general difficult to compute and opens avenues for formulating new objectives for unsupervised representation learning. Specifically, given an observed random variable x and a latent discrete variable z, we can express p(x|z), p(z|x) and p(z) in closed form in terms of a sufficiently expressive function (Eg. neural network) using our parameterization without restricting the class of these distributions. To demonstrate its usefulness, we develop two independent use cases for this parameterization: 1. Disjoint Manifold Separation: Neural Bayes allows us to formulate an objective which can optimally label samples from disjoint manifolds present in the support of a continuous distribution. This can be seen as a specific form of clustering where each disjoint manifold in the support is a separate cluster. We design clustering tasks that obey this formulation and empirically show that the model optimally labels the disjoint manifolds. 2. Mutual Information Maximization (MIM): MIM has become a popular means for self-supervised representation learning. Neural Bayes allows us to compute mutual information between observed random variables x and latent discrete random variables z in closed form. We use this for learning image representations and show its usefulness on downstream classification tasks.
BibTeX
@misc{arpit2021neural,
  author = {Devansh Arpit and Huan Wang and Caiming Xiong and Richard Socher and Yoshua Bengio},
  title = {{Neural Bayes: A Generic Parameterization Method for Unsupervised Learning}},
  year = {2021},
}
Figure