Bayesian Beta-Bernoulli Process Sparse Coding with Deep Neural Networks

Arunesh Mittal, Kai Yang, Paul Sajda, John PaisleyarXiv 2023 · DOI

Abstract

Standard deep generative models like Variational Autoencoders (VAEs) often suffer from the amortization gap, lack of true sparsity, and sensitivity to local scale variations. This paper introduces a generative model that combines the representational power of deep neural networks with the interpretability of non-parametric sparse coding. By employing a Beta-Bernoulli process (BeP) prior and a non-parametric, greedy optimization-based encoder, the proposed framework achieves significantly sparser latent representations and superior reconstruction performance across various data modalities, including continuous, count, and binary data.

Introduction

Variational Autoencoders (VAEs) are widely used in deep generative modeling but face several key challenges. First, the "amortization gap" arises from using a parametric encoder to approximate latent variables, which often leads to sub-optimal encodings compared to direct optimization. Second, standard priors like Gaussian or Laplace encourage small values but rarely result in true sparsity, where most features are exactly zero. Finally, discrete latent factors often struggle to represent local scale variations (e.g., brightness in images), wasting capacity on encoding magnitude rather than structure.

To address these issues, we propose replacing the standard VAE encoder with a non-parametric approach driven by a MAP-EM greedy pursuit algorithm.

Methods

The proposed architecture integrates a non-parametric encoder with a deep neural network decoder to capture complex, non-linear relationships.

Beta-Bernoulli Process (BeP) Prior

Instead of a Gaussian prior, we utilize a Beta-Bernoulli process. This non-parametric prior naturally encourages sparsity by allowing the model to learn which latent factors are "active" for a given data point, pushing inactive elements to be exactly zero.

Non-Parametric Greedy Pursuit Encoding

Rather than using a neural network to map data to latent space, the model treats the latent code $z$ as a parameter to be optimized. For every data point, it performs a "greedy pursuit," iteratively activating the latent bits that most improve the reconstruction objective.

The greedy pursuit process iteratively selects latent factors to optimize the reconstruction objective.

Local Scaling and Deep Likelihood

To handle scale invariance, we introduce a local scaling variable $\lambda$ for each data point. This decouples the "intensity" of the data from the "structure" captured in the latent code $z$. The decoder $f_\theta$ remains a deep neural network. We present three variants: GaussBPE (continuous data), PoissBPE (count data), and BernBPE (binary data).

Results

The model was evaluated on standard benchmarks including MNIST, Scaled MNIST, CIFAR-10, and 20-Newsgroups.

Reconstruction and Sparsity

On Scaled MNIST, GaussBPE achieved a Mean Squared Error (MSE) of 9.18, significantly outperforming the standard VAE's 32.92 MSE. On CIFAR-10, the model achieved a sparsity score of 0.96 (where 1.0 is perfectly sparse), compared to 0.81 for the VAE, while also improving reconstruction likelihood (75.88 vs 79.15 NLL).

Computational Efficiency

While optimization-based encoding is typically more intensive than a forward pass, the authors found that as training progresses and the model learns sparser representations, the greedy pursuit algorithm speeds up. This is because it has fewer "active" bits to consider in later stages of training.

Experimental results showing (A) MNIST reconstructions, (B-C) sparsity across dimensions and classes, and (D) computational efficiency gains over training epochs.

Discussion

By decoupling scale from structure and utilizing a non-parametric encoder, the BPE framework effectively closes the amortization gap and achieves true sparsity. Although the current MAP-EM approach does not provide posterior uncertainty measures, it offers highly interpretable latent factors. Future work will focus on extending the framework to sparse continuous factors and incorporating uncertainty estimates via Laplace approximations.

Summary updated

BibTeX
@misc{mittal2023bayesian,
  author = {Arunesh Mittal and Kai Yang and Paul Sajda and John Paisley},
  title = {{Bayesian Beta-Bernoulli Process Sparse Coding with Deep Neural Networks}},
  year = {2023},
  eprint = {2303.08230},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2303.08230},
}
Figure