Sparse Continuous Distributions and Fenchel-Young Losses

André F. T. Martins, Marcos Treviso, António Farinhas, Pedro M. Q. Aguiar, Mário A. T. Figueiredo +2 more
8/4/2021
cs.LGcs.AIstat.ML

Official code: deep-spin/sparse_continuous_distributions (15 stars, Python, MIT, last commit 2023-05-10).

Abstract

Exponential families are widely used in machine learning, including many distributions in continuous and discrete domains (e.g., Gaussian, Dirichlet, Poisson, and categorical distributions via the softmax transformation). Distributions in each of these families have fixed support.

Show full abstract

In contrast, for finite domains, recent work on sparse alternatives to softmax (e.g., sparsemax, $α$-entmax, and fusedmax), has led to distributions with varying support. This paper develops sparse alternatives to continuous distributions, based on several technical contributions: First, we define $Ω$-regularized prediction maps and Fenchel-Young losses for arbitrary domains (possibly countably infinite or continuous). For linearly parametrized families, we show that minimization of Fenchel-Young losses is equivalent to moment matching of the statistics, generalizing a fundamental property of exponential families. When $Ω$ is a Tsallis negentropy with parameter $α$, we obtain ``deformed exponential families,'' which include $α$-entmax and sparsemax ($α=2$) as particular cases. For quadratic energy functions, the resulting densities are $β$-Gaussians, an instance of elliptical distributions that contain as particular cases the Gaussian, biweight, triweight, and Epanechnikov densities, and for which we derive closed-form expressions for the variance, Tsallis entropy, and Fenchel-Young loss. When $Ω$ is a total variation or Sobolev regularizer, we obtain a continuous version of the fusedmax. Finally, we introduce continuous-domain attention mechanisms, deriving efficient gradient backpropagation algorithms for $α\in \{1, 4/3, 3/2, 2\}$. Using these algorithms, we demonstrate our sparse continuous distributions for attention-based audio classification and visual question answering, showing that they allow attending to time intervals and compact regions.

View on arXivView PDF

Code Implementations(1)

MIT

This repository provides open-source code for sparse continuous distributions and corresponding Fenchel-Young losses.

155PythonFeb 14, 20213 years agoMIT

Similar Papers

Cite this paper

@article{martins2021sparse,
  title  = {Sparse Continuous Distributions and Fenchel-Young Losses},
  author = {André F. T. Martins and Marcos Treviso and António Farinhas and Pedro M. Q. Aguiar and Mário A. T. Figueiredo and Mathieu Blondel and Vlad Niculae},
  year   = {2021},
  eprint = {2108.01988},
  archivePrefix = {arXiv},
  url    = {https://arxiv.org/abs/2108.01988}
}

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

Discussion