Variational Classification

Shehzaad Dhuliawala, Mrinmaya Sachan, Carl Allen
5/17/2023
8 citations
cs.LGcs.AIcs.CV

Official code: shehzaadzd/variational-classification (3 stars, Python, last commit 2023-12-22).

Abstract

We present a latent variable model for classification that provides a novel probabilistic interpretation of neural network softmax classifiers. We derive a variational objective to train the model, analogous to the evidence lower bound (ELBO) used to train variational auto-encoders, that generalises the softmax cross-entropy loss.

Show full abstract

Treating inputs to the softmax layer as samples of a latent variable, our abstracted perspective reveals a potential inconsistency between their anticipated distribution, required for accurate label predictions, and their empirical distribution found in practice. We augment the variational objective to mitigate such inconsistency and induce a chosen latent distribution, instead of the implicit assumption found in a standard softmax layer. Overall, we provide new theoretical insight into the inner workings of widely-used softmax classifiers. Empirical evaluation on image and text classification datasets demonstrates that our proposed approach, variational classification, maintains classification accuracy while the reshaped latent space improves other desirable properties of a classifier, such as calibration, adversarial robustness, robustness to distribution shift and sample efficiency useful in low data settings.

View on arXivView PDF

Code Implementations(1)

31Python, ShellMay 17, 20232 years ago

Similar Papers

Cite this paper

@article{dhuliawala2023variational,
  title  = {Variational Classification},
  author = {Shehzaad Dhuliawala and Mrinmaya Sachan and Carl Allen},
  year   = {2023},
  eprint = {2305.10406},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2305.10406v5}
}

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/2305.10406.svg)](https://codeofpaper.com/paper/2305.10406)

Discussion