# Sparse and Continuous Attention Mechanisms

Source: [Sparse and Continuous Attention Mechanisms](<https://www.sota2.com/research/paper/68fa689e1e209131cea1d21b>)

Collection index: [llms.txt](<https://www.sota2.com/research/llms.txt>)

Data updated: 2026-01-04T03:16:31.458Z

Authors: Andr\\'e F. T. Martins, Ant\\'onio Farinhas, Marcos Treviso, Vlad Niculae, Pedro M. Q. Aguiar, M\\'ario A. T. Figueiredo

Published: 2020-06-12T14:16:48.000Z

## Abstract

Exponential families are widely used in machine learning; they include 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. In contrast, for finite domains, there has been recent work on sparse alternatives to softmax (e.g. sparsemax and alpha-entmax), which have varying support, being able to assign zero probability to irrelevant categories. This paper expands that work in two directions: first, we extend alpha-entmax to continuous domains, revealing a link with Tsallis statistics and deformed exponential families. Second, we introduce continuous-domain attention mechanisms, deriving efficient gradient backpropagation algorithms for alpha in {1,2}. Experiments on attention-based text classification, machine translation, and visual question answering illustrate the use of continuous attention in 1D and 2D, showing that it allows attending to time intervals and compact regions.

## Recorded benchmark results

A research result applies to its stated dataset, split, metric and evaluation configuration. Compare like-for-like settings, preserve the metric's unit and direction, and distinguish paper-reported results from independent reproduction. The best result recorded here is not a claim of exhaustive, current global coverage.

## Original sources and implementation

[Original paper](<https://arxiv.org/abs/2006.07214>)

[PDF](<https://arxiv.org/pdf/2006.07214.pdf>)

[Implementation](<https://github.com/deep-spin/mcan-vqa-continuous-attention>)
