Tsallis entropy, one dial at a time
by Kleyton da Costa ·
- research
- science
Most of the statistics in modern machine learning (softmax, cross-entropy, the Gaussian, the KL divergence) descends from one quantity, the Shannon entropy , and from one assumption hidden inside it: that information is additive. In 1988 Constantino Tsallis proposed a one-parameter generalisation,
The entropic index is a dial. Values give more weight to rare events and to frequent ones, and at everything collapses back to the standard theory. This note follows our perspective paper, Perspectives on Tsallis Statistics for Artificial Intelligence, and keeps only the essentials.
Non-additive, so that it can be extensive
For two independent systems the Tsallis entropy does not simply add:
This looks like a defect until one separates two properties that are easy to conflate. Additivity belongs to the entropy functional. Extensivity, , belongs to a physical system. They coincide only when the parts are weakly correlated. If strong correlations make the number of accessible states grow as a power law, , then the Shannon entropy grows only logarithmically, while is extensive for exactly one index, .
The q-algebra
The theory rests on a deformed logarithm and its inverse,
where . That small bracket, the Tsallis cut-off, carries most of the consequences. For the q-exponential reaches exactly zero at a finite point, which is the source of sparsity. For it decays as a power law, which is the source of heavy tails. Maximising under normalisation and an energy constraint replaces the Boltzmann weight by .
q-Gaussians
Maximising at fixed (generalised) variance gives the q-Gaussian, , a single family that moves continuously between familiar distributions:
| distribution | tails | |
|---|---|---|
| compact support | none | |
| Gaussian | light | |
| Student-, | power law | |
| Cauchy | power law |
The variance is finite only for . Just as the Gaussian is the limit of sums of independent variables, q-Gaussians are the limits of sums of strongly correlated ones (the q-central limit theorem). Many models that are called "robust" or "heavy-tailed" are q-Gaussian models in disguise.
Where q comes from
Where does the value of come from? Superstatistics gives the clearest answer. Suppose a system is locally Boltzmann, , but its inverse temperature fluctuates slowly from place to place. If is gamma-distributed, the average is exactly a q-exponential, with
So measures heterogeneity. Machine learning is full of such mixtures: mini-batches sample different local losses, dropout and ensembles average over parameters, and mixture-of-experts layers combine components working at different scales.
Sparse attention is a Tsallis softmax
The softmax solves an entropy-regularised problem, . Shannon entropy is infinitely steep at the edge of the simplex, so every option keeps some probability. Swapping for the Tsallis entropy gives α-entmax, with playing the role of :
At this is the softmax and at it is sparsemax. In between, is a popular differentiable compromise.1 Because of the cut-off, low-scoring options get exactly zero weight, so the model commits to a small and readable support.
The q-dial
The same move recurs across AI. Take a Boltzmann–Gibbs–Shannon object, deform it by , and you get a continuum whose endpoint at is the standard method:
| area | at | moving away from 1 |
|---|---|---|
| attention, outputs | softmax | α-entmax: exactly sparse weights |
| reinforcement | Shannon max-ent (SAC) | Tsallis max-ent: tunable, near-greedy policies |
| generative models | Gaussian prior | q-Gaussian: heavy tails, outlier robustness |
| losses | cross-entropy | q-cross-entropy: robust to noisy labels |
| optimisation | Gaussian search steps | q-Gaussian steps: long jumps out of local minima |
Two observations follow. First, the deformation is backward-compatible, so a well-chosen cannot do worse than the standard baseline. Second, deep networks already show the signatures of nonextensive statistics: their weight spectra and gradient noise are heavy-tailed, just as the q-CLT and superstatistics predict. That is the case for treating as a learnable inductive bias, fitted to the data, rather than a constant inherited from physics.
Footnotes
-
The entmax literature normalises the regulariser as , which only rescales the scores; the figure uses that convention. ↩