Abstract
Self-attention is usually described as a flexible, content-adaptive way to mix a token with information from its past. We reinterpret causal self-attention transformers, the backbone of modern foundation models, within a probabilistic framework, much as classical PCA is extended to probabilistic PCA. This reformulation reveals a key structural consequence of the underlying change of variables - a barrier constraint emerges on the parameters of self-attention. The resulting geometry exposes a degeneracy boundary where the attention-induced mapping becomes locally ill-conditioned, yielding a stability-margin interpretation analogous to the margin in support vector machines. This, in turn, naturally gives rise to the concept of support tokens. We further show that causal transformers define a consistent stochastic process over infinite token sequences, providing a rigorous probabilistic foundation for sequence modeling. Building on this view, we derive a Bayesian MAP training objective that requires only a minimal modification to standard LLM training - adding a smooth log-barrier penalty to the usual cross-entropy loss. Empirically, the resulting training objective improves robustness to input perturbations and sharpens the margin geometry of the learned representations without sacrificing out-of-sample accuracy.
Type
Publication
arXiv preprint
45 pages, 9 figures. Subject classes cs.LG, math.PR, math.ST; ACM classes
I.2.7, G.3, G.4. Latest revision v3 (21 March 2026).
Treating causal self-attention rigorously as a probabilistic model over embeddings โ
the way PCA extends to probabilistic PCA โ makes a barrier constraint fall out of the
change of variables. The geometry that follows has a degeneracy boundary where the
attention map goes locally ill-conditioned, which reads as a stability margin in the
same sense an SVM has one, and support tokens are the tokens sitting on it.
The practical consequence is small on purpose: add a smooth log-barrier penalty to
ordinary cross-entropy and you get better robustness to input perturbations and a
sharper margin geometry, without giving up out-of-sample accuracy.