
Companion paper to "Predicting How Transformers Attend" https://zenodo.org/records/20314038 Which introduced the Thermodynamic Attention Framework (TAF) and the closed-form predictor γ_Padé(θ, T) = (2θ - T√2)/(2θ + T√2) for the attention-decay exponent γ. This paper presents a phenomenological extension of TAF with five constructive contributions (ordered by empirical strength): (1) A precision-direction rule for 4-bit NF4 inference on full multi-head attention: the R² of the bf16 power-law fit predicts the sign of Δγ_{4-bit − bf16}. Sign-correct on 5/5 paired bf16/4-bit measurements (DeepSeek-7B-base, DeepSeek-7B-chat, Pythia-2.8B, Pythia-1B, Llama-3-8B, Qwen2.5-7B-Instruct) — a deployment heuristic for practitioners serving 4-bit inference. (2) A learned-imprint axis with slope ν ≈ -1/(2π), supported by three convergent arguments and a random-init falsifier (Pythia 70M/410M/1B at random init, p = 0.44). Honest caveats: bootstrap CI is wide ([-0.260, -0.008]) and a Pythia-70M trajectory across 9 checkpoints does not monotonically converge. (3) An algebraic decomposition of the Cardy-like entropy anomaly: ΔH_Padé(γ) = log(z/2) + 2·arctanh(γ), linearising empirically with slope ≈ 5 across the panel. (4) A bimodal phase structure of γ_text across the panel, with ~36% of measured LLMs sitting at γ ≥ 1 (Hagedorn zone), reframed as an industrial GQA-design correlate rather than a phase attractor. (5) Machine-verified algebraic backbone: all 15 algebraic identities of the framework verified by both Sage Groebner basis and Lean Mathlib4, including a previously-unstated quadratic identity D-SAGE-1: 2η² + η·γ_χ + 1 = 0. To our knowledge, this is the first transformer-attention paper with end-to-end dual-tool machine verification of its algebraic content. A separate correlation finding sits below the constructive contributions: the architectural concentration relation γ_text ≈ γ_Padé − 0.012·n_kv reproduces an in-sample R² = 0.30 (vs R² = 0.02 for Padé alone) but fails out-of-sample (median 70/30 hold-out R² ≈ -0.09 over 1000 random splits; family-leave-out aggregate R² = -0.027). The n_kv coefficient is statistically significant (bootstrap CI excludes zero) and the relative improvement over Padé alone is robust (+0.20 R² family-LOO), but absolute predictive power is essentially nil. We report it as a cross-panel correlation structure, not a predictive law — a down-grade documented internally rather than discovered by reviewers. A symmetric set of honest revisions accompanies the constructive material: seven claims from paper I or paper II drafts are withdrawn or demoted (R_c* ≈ 1.68 as a sharp boundary, γ = 1 - 1/φ as a code-tuning attractor, the Mittag-Leffler prefactor 1/Γ(1-γ), the universal soft-decay KV truncation rule, the "0.3% match" framing for ν, the d_horizon "law" which we show is algebraically ≡ T when γ matches Padé, and the κ·N_sem topological invariant). The framework emerges leaner and more honest. The accompanying public dataset (karlexmarin/taf-attention-decay on HuggingFace, 79 records across 33 models, CC-BY-4.0) and the diagnostic tool (karlexmarin/taf-agent on HuggingFace Spaces) provide reproducible measurements and operational recipes. This release includes both the English version (73 pages) and the Spanish version (76 pages) of the paper.
This is Part II of the "Predicting How Transformers Attend" series. Companion papers in the series: Part I — Analytic Power-Law Theory (10.5281/zenodo.20314038): introduces the Thermodynamic Attention Framework (TAF) and explains from first principles why attention weights decay as a power law of distance in RoPE transformers, with the closed-form predictor γ_Padé(θ,T) for the decay exponent γ, its phase transitions, and practical compression tools. Part III — From Attention to Residual Computation (10.5281/zenodo.21288264): moves from the attention map to the residual stream, separating transport, writing, and commitment. Companion resources: the TAF Attention-Decay Measurements dataset (HuggingFace) and the browser-based TAF Agent diagnostic tool (HuggingFace Spaces).
LLM, Lean Mathlib4 Sage, rotary position embedding, hyperscaling, Thermodynamic Attention Framework, GQA, attention decay, formal proof, scaling laws, Hagedorn transition, machine verification, power law, RoPE, phenomenological framework, deep learning, Cardy entropy, phase transition, TAF, honest revision, transformer, critical exponents, Lévy stability, 4-bit quantization, attention mechanism, interpretability, Groebner basis, attention sink
LLM, Lean Mathlib4 Sage, rotary position embedding, hyperscaling, Thermodynamic Attention Framework, GQA, attention decay, formal proof, scaling laws, Hagedorn transition, machine verification, power law, RoPE, phenomenological framework, deep learning, Cardy entropy, phase transition, TAF, honest revision, transformer, critical exponents, Lévy stability, 4-bit quantization, attention mechanism, interpretability, Groebner basis, attention sink
| selected citations These citations are derived from selected sources. This is an alternative to the "Influence" indicator, which also reflects the overall/total impact of an article in the research community at large, based on the underlying citation network (diachronically). | 0 | |
| popularity This indicator reflects the "current" impact/attention (the "hype") of an article in the research community at large, based on the underlying citation network. | Average | |
| influence This indicator reflects the overall/total impact of an article in the research community at large, based on the underlying citation network (diachronically). | Average | |
| impulse This indicator reflects the initial momentum of an article directly after its publication, based on the underlying citation network. | Average |
