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

43 lines
1.8 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: "Bayesian Attention Geometry (贝叶斯注意力几何)"
created: 2026-05-26
type: concept
tags: ["transformers", "attention", "geometry", "bayesian-inference"]
sources: ["agarwal-bayesian-attention-geometry"]
---
# Bayesian Attention Geometry
> 在 Bayesian wind tunnel 中Transformer 的注意力头展现出可诊断的几何结构——正交 key 基、熵参数化的 value 流形、状态聚类。
## 三项几何发现
### 1. 正交 Key 基
注意力头的 key 投影形成近似正交的基底——每个头专注于不同的特征子空间,最大化信息覆盖。
### 2. 熵参数化的 Value 流形
Value 向量分布在一个**低维流形**上,该流形被 posterior 熵参数化。不确定性越高 → value 流形结构越丰富。
### 3. Mamba 的状态聚类
在 HMM 追踪任务中Mamba 的最终层自组织为 **5 个离散簇**——每个簇精确对应一个 HMM 隐藏状态。模型发现了 belief simplex 的角落几何。
## 几何诊断作为可解释性工具
这些几何特征不是设计出来的,而是训练过程中自然涌现的。它们提供了一种**无监督的诊断手段**
- 正交 key 基 → 模型在做结构化的推理
- 熵参数化 → 模型正确编码了不确定性
- 状态聚类 → 模型发现了任务的潜在结构
## 与 [[inference-primitives|推理原语]] 的关系
几何是实现原语的物理基础:
- 正交 key 基 → 高效实现内容寻址([[random-access-binding|绑定]]
- Value 流形 → [[belief-accumulation|信念累积]]的几何表示
- 状态聚类 → [[belief-transport|信念传输]]的离散化
## 相关页面
- [[agarwal-bayesian-attention-geometry]] — 原始论文
- [[bayesian-wind-tunnels]] — 产生这些几何发现的实验方法
- [[inference-primitives]] — 几何结构实现的原语体系