Files
myWiki/papers/agarwal-bayesian-attention-geometry.md
2026-06-01 10:46:01 +08:00

72 lines
2.7 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

---
title: "The Bayesian Geometry of Transformer Attention"
authors: "Naman Agarwal, Siddhartha R. Dalal, Vishal Misra"
arxiv: "2512.22471"
year: 2026
venue: "arXiv (cs.LG)"
series: "Bayesian Attention Trilogy, Paper I"
type: "paper"
tags: ["bayesian-inference", "transformers", "attention", "geometry", "inference-primitives", "mamba"]
---
# The Bayesian Geometry of Transformer Attention
> 首次实证证明:小型 Transformer 可以在受控环境中实现精确的贝叶斯后验10⁻³10⁻⁴ bit accuracy且这不是规模效应而是注意力架构的**推理原语完备性**。
## 核心问题
"Transformer 是在做真正的贝叶斯推理,还是仅仅是模式匹配?"
自然语言没有 ground-truth posterior 可验证,大模型也无法隔离记忆效应。本文用 **[[bayesian-wind-tunnels|Bayesian wind tunnels]]** 解决这个可验证性问题。
## 方法论Bayesian Wind Tunnels
受控预测环境,三个条件:
1. 解析 posterior 每一步都精确已知
2. 假设空间太大,记忆在计算上不可行
3. in-context prediction 需要真正的概率推理
→ 将定性问题转化为定量测试:模型的预测熵是否与解析 posterior 熵逐位置匹配?
## 推理三原语
贝叶斯推理分解为三个原语:
| 原语 | 定义 | 所需任务 |
|------|------|---------|
| [[belief-accumulation]] | 证据累积为 running posterior | 双射学习、HMM |
| [[belief-transport]] | 信念在随机动态下传播 | HMM 滤波 |
| [[random-access-binding]] | 按内容而非位置检索 | 联想回忆 |
详见 [[inference-primitives|推理原语分类法]]。
## 架构可实现性
| 架构 | 累积 | 传输 | 绑定 | 地位 |
|------|:---:|:---:|:---:|------|
| Transformer | ✅ | ✅ | ✅ | **原语完备** |
| Mamba | ✅ | ✅ | ❌ | HMM 滤波 SOTA |
| LSTM | ✅ | ❌ | ❌ | 仅静态充分统计量 |
| MLP | ❌ | ❌ | ❌ | 统一失败 |
核心结论:**[[primitive-completeness|原语完备性]]** — Transformer 是实现全部三原语的最小架构,这是其在推理任务中占主导的结构性原因。
## 几何诊断
详见 [[bayesian-attention-geometry]]
- 注意力头中的 **正交 key 基**
- 被 posterior 熵参数化的 **低维 value 流形**
- Mamba 最终层组织为 **5 个簇** — 对应 HMM 隐藏状态
## 三部曲定位
本文是 [[bayesian-attention-trilogy]] 的第一篇Lemma 1
- **Paper I**(本文):存在性 + 内部几何
- **Paper II**:贝叶斯结构从交叉熵梯度动力学中自然涌现
- **Paper III**:原语在部分可观测环境中如何组合
## 相关页面
- [[mamba-ssm]] — Mamba 选择性状态空间模型
- [[binding-constraint-thesis]] — 绑定的约束理论