Efficient Marginalization of Discrete and Structured Latent Variables via Sparsity

Gonçalo M. Correia, Vlad Niculae, Wilker Aziz, André F. T. Martins
7/3/2020
cs.LGstat.ML

Official code: deep-spin/sparse-marginalization-lvm (27 stars, Python, MIT, PyTorch, last commit 2021-05-03).

Abstract

Training neural network models with discrete (categorical or structured) latent variables can be computationally challenging, due to the need for marginalization over large or combinatorial sets. To circumvent this issue, one typically resorts to sampling-based approximations of the true marginal, requiring noisy gradient estimators (e.g., score function estimator) or continuous relaxations with lower-variance reparameterized gradients (e.g., Gumbel-Softmax).

Show full abstract

In this paper, we propose a new training strategy which replaces these estimators by an exact yet efficient marginalization. To achieve this, we parameterize discrete distributions over latent assignments using differentiable sparse mappings: sparsemax and its structured counterparts. In effect, the support of these distributions is greatly reduced, which enables efficient marginalization. We report successful results in three tasks covering a range of latent variable modeling applications: a semisupervised deep generative model, a latent communication game, and a generative model with a bit-vector latent representation. In all cases, we obtain good performance while still achieving the practicality of sampling-based approximations.

View on arXivView PDF

Code Implementations(1)

PyTorchMIT

Official PyTorch (Lightning) implementation of the NeurIPS 2020 paper "Efficient Marginalization of Discrete and Structured Latent Variables via Sparsity".

278Python, C++Oct 12, 20205 years agoMIT
deep-learningdiscreteemergent-communicationgenerative-modelmarginalization+11 more

Similar Papers

Cite this paper

@article{correia2020efficient,
  title  = {Efficient Marginalization of Discrete and Structured Latent Variables via Sparsity},
  author = {Gonçalo M. Correia and Vlad Niculae and Wilker Aziz and André F. T. Martins},
  year   = {2020},
  eprint = {2007.01919},
  archivePrefix = {arXiv},
  url    = {https://arxiv.org/abs/2007.01919}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2007.01919.svg)](https://codeofpaper.com/paper/2007.01919)

Discussion