Support Tokens, Stability Margins, and a New Foundation for Robust LLMs
Organizations: LinkedIn, Mountain View, CA
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.
Figures & tables
| Dataset | Clean perplexity | Degradation ratio | Contextual embedding error | Effective support size | |
|---|---|---|---|---|---|
| wikitext-103 | 0.00 | 15.68 | 775.81 | 0.608 | — |
| wikitext-103 | 0.02 | 15.74 | 328.51 | 0.583 | 2.75 |
| wikitext-103 | 0.05 | 15.71 | 364.92 | 0.596 | 3.10 |
| simplebooks-92 | 0.00 | 10.67 | 413.45 | 0.626 | — |
| simplebooks-92 | 0.02 | 10.75 | 127.30 | 0.554 | 4.77 |
| simplebooks-92 | 0.05 | 10.67 | 130.91 | 0.557 | 4.88 |
Appendix figures & tables8 assets
Supplementary material from the paper’s appendix.
Appendix
| Level | Cross-entropy-only | Margin-regularized |
|---|---|---|
| Clean | 1.00 | 1.00 |
| 51.10 | 55.75 | |
| [95%] | [44.71, 62.41] | [48.01, 70.16] |
| 311.32 | 116.99 | |
| [95%] | [271.24, 401.72] | [99.58, 152.81] |
| 525.27 | 180.72 |
| Level | Cross-entropy-only | Margin-regularized |
|---|---|---|
| Clean | 1.00 | 1.00 |
| 59.48 | 50.88 | |
| [95%] | [38.07, 86.18] | [35.12, 83.29] |
| 201.56 | 135.75 | |
| [95%] | [131.63, 312.16] | [86.22, 219.54] |
| 329.51 | 207.99 |
| Level | Cross-entropy-only | Margin-regularized |
|---|---|---|
| Clean | 1.00 | 1.00 |
| 33.41 | 32.82 | |
| [95%] | [29.32, 36.88] | [29.71, 37.11] |
| 212.11 | 75.98 | |
| [95%] | [187.51, 233.99] | [67.99, 85.44] |
| 338.38 | 90.81 |
| Level | Cross-entropy-only | Margin-regularized |
|---|---|---|
| Clean | 1.00 | 1.00 |
| 41.05 | 23.25 | |
| [95%] | [31.08, 58.49] | [18.62, 30.14] |
| 127.55 | 56.74 | |
| [95%] | [84.59, 214.33] | [44.73, 74.50] |
| 202.22 | 83.00 |
| Clean perplexity | Degradation ratio | Contextual embedding error | Effective support size | |
|---|---|---|---|---|
| 0.00 | 15.68 | 775.81 | 0.608 | — |
| [95%] | [12.40, 18.10] | [661.68, 974.21] | [0.567, 0.630] | — |
| 0.02 | 15.74 | 328.51 | 0.583 | 2.75 |
| [95%] | [12.53, 18.15] | [273.81, 424.92] | [0.550, 0.614] | [2.06, 3.77] |
| 0.05 | 15.71 | 364.92 | 0.596 | 3.10 |
| [95%] | [12.50, 18.12] | [308.30, 473.11] | [0.563, 0.625] | [2.13, 4.02] |
| Clean perplexity | Degradation ratio | Contextual embedding error | Effective support size | |
|---|---|---|---|---|
| 0.00 | 10.67 | 413.45 | 0.626 | — |
| [95%] | [9.76, 11.76] | [372.86, 462.31] | [0.610, 0.641] | — |
| 0.02 | 10.75 | 127.30 | 0.554 | 4.77 |
| [95%] | [9.82, 11.71] | [114.70, 142.45] | [0.532, 0.580] | [3.83, 5.85] |
| 0.05 | 10.67 | 130.91 | 0.557 | 4.88 |
| [95%] | [9.81, 11.67] | [118.78, 148.52] | [0.534, 0.586] | [3.83, 6.15] |
Self-Attention
Self-attention lets sequence elements exchange context through learned query-key matches, powering Transformers and their efficient variants.
See all 225 papers