math-skill 3.0.0 → 3.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.en-US.md +50 -30
- package/README.md +26 -6
- package/agents/math-critic.en.md +30 -28
- package/agents/math-critic.md +30 -30
- package/commands/ask.en.md +15 -0
- package/commands/ask.md +6 -1
- package/design-patterns/attention/equivariant-attention.en.md +17 -11
- package/design-patterns/attention/equivariant-attention.md +16 -10
- package/design-patterns/attention/geometry-aware-attention.en.md +11 -11
- package/design-patterns/attention/geometry-aware-attention.md +10 -10
- package/design-patterns/attention/information-bottleneck-attention.en.md +40 -20
- package/design-patterns/attention/information-bottleneck-attention.md +40 -20
- package/design-patterns/attention/projection-attention.en.md +12 -12
- package/design-patterns/attention/projection-attention.md +11 -11
- package/design-patterns/attention/spectral-attention.en.md +27 -13
- package/design-patterns/attention/spectral-attention.md +26 -12
- package/design-patterns/compression/leverage-score-selection.en.md +14 -14
- package/design-patterns/compression/leverage-score-selection.md +14 -14
- package/design-patterns/compression/low-rank-kv-cache.en.md +40 -13
- package/design-patterns/compression/low-rank-kv-cache.md +39 -13
- package/design-patterns/compression/spectral-token-pruning.en.md +17 -15
- package/design-patterns/compression/spectral-token-pruning.md +17 -15
- package/design-patterns/compression/topology-preserving-compression.en.md +11 -11
- package/design-patterns/compression/topology-preserving-compression.md +11 -11
- package/design-patterns/loss/constraint-penalty.en.md +9 -5
- package/design-patterns/loss/constraint-penalty.md +10 -7
- package/design-patterns/loss/contrastive-loss.en.md +38 -12
- package/design-patterns/loss/contrastive-loss.md +39 -13
- package/design-patterns/loss/information-bottleneck-loss.en.md +6 -6
- package/design-patterns/loss/information-bottleneck-loss.md +7 -7
- package/design-patterns/loss/orthogonality-loss.en.md +25 -18
- package/design-patterns/loss/orthogonality-loss.md +25 -19
- package/design-patterns/loss/variational-loss.en.md +5 -5
- package/design-patterns/loss/variational-loss.md +6 -6
- package/design-patterns/overview.en.md +36 -0
- package/design-patterns/overview.md +36 -0
- package/design-patterns/representation/equivariant-split.en.md +5 -5
- package/design-patterns/representation/equivariant-split.md +5 -6
- package/design-patterns/representation/manifold-representation.en.md +13 -13
- package/design-patterns/representation/manifold-representation.md +14 -15
- package/design-patterns/representation/shared-private-decomposition.en.md +13 -8
- package/design-patterns/representation/shared-private-decomposition.md +13 -10
- package/design-patterns/representation/subspace-alignment.en.md +13 -13
- package/design-patterns/representation/subspace-alignment.md +13 -13
- package/design-patterns/routing/graph-routing.en.md +12 -12
- package/design-patterns/routing/graph-routing.md +12 -12
- package/design-patterns/routing/moe-routing.en.md +13 -13
- package/design-patterns/routing/moe-routing.md +13 -15
- package/design-patterns/routing/optimal-transport-routing.en.md +6 -6
- package/design-patterns/routing/optimal-transport-routing.md +7 -7
- package/design-patterns/routing/spectral-clustering-routing.en.md +27 -16
- package/design-patterns/routing/spectral-clustering-routing.md +27 -18
- package/knowledge-base/differential-geometry/connection.en.md +17 -2
- package/knowledge-base/differential-geometry/connection.md +17 -2
- package/knowledge-base/differential-geometry/curvature.en.md +14 -1
- package/knowledge-base/differential-geometry/curvature.md +14 -1
- package/knowledge-base/differential-geometry/geodesic.en.md +16 -2
- package/knowledge-base/differential-geometry/geodesic.md +16 -2
- package/knowledge-base/differential-geometry/index.en.md +52 -0
- package/knowledge-base/differential-geometry/index.md +52 -0
- package/knowledge-base/differential-geometry/manifold.en.md +15 -2
- package/knowledge-base/differential-geometry/manifold.md +15 -2
- package/knowledge-base/differential-geometry/metric-tensor.en.md +16 -2
- package/knowledge-base/differential-geometry/metric-tensor.md +17 -3
- package/knowledge-base/differential-geometry/tangent-space.en.md +17 -3
- package/knowledge-base/differential-geometry/tangent-space.md +17 -3
- package/knowledge-base/information-geometry/fisher-metric.en.md +32 -13
- package/knowledge-base/information-geometry/fisher-metric.md +32 -13
- package/knowledge-base/information-geometry/index.en.md +45 -0
- package/knowledge-base/information-geometry/index.md +45 -0
- package/knowledge-base/information-geometry/natural-gradient.en.md +24 -10
- package/knowledge-base/information-geometry/natural-gradient.md +24 -10
- package/knowledge-base/lie-theory/equivariance.en.md +18 -3
- package/knowledge-base/lie-theory/equivariance.md +18 -3
- package/knowledge-base/lie-theory/group-action.en.md +16 -2
- package/knowledge-base/lie-theory/group-action.md +16 -2
- package/knowledge-base/lie-theory/index.en.md +52 -0
- package/knowledge-base/lie-theory/index.md +52 -0
- package/knowledge-base/lie-theory/lie-algebra.en.md +17 -2
- package/knowledge-base/lie-theory/lie-algebra.md +17 -2
- package/knowledge-base/lie-theory/lie-group.en.md +17 -3
- package/knowledge-base/lie-theory/lie-group.md +17 -3
- package/knowledge-base/lie-theory/representation.en.md +17 -2
- package/knowledge-base/lie-theory/representation.md +17 -2
- package/knowledge-base/matrix-analysis/index.en.md +49 -0
- package/knowledge-base/matrix-analysis/index.md +49 -0
- package/knowledge-base/matrix-analysis/low-rank-approximation.en.md +20 -7
- package/knowledge-base/matrix-analysis/low-rank-approximation.md +20 -7
- package/knowledge-base/matrix-analysis/matrix-perturbation.en.md +13 -1
- package/knowledge-base/matrix-analysis/matrix-perturbation.md +13 -1
- package/knowledge-base/matrix-analysis/positive-semidefinite.en.md +20 -6
- package/knowledge-base/matrix-analysis/positive-semidefinite.md +20 -6
- package/knowledge-base/matrix-analysis/projection.en.md +14 -1
- package/knowledge-base/matrix-analysis/projection.md +14 -1
- package/knowledge-base/matrix-analysis/spectral-decomposition.en.md +14 -1
- package/knowledge-base/matrix-analysis/spectral-decomposition.md +14 -1
- package/knowledge-base/optimization/constrained-optimization.en.md +17 -3
- package/knowledge-base/optimization/constrained-optimization.md +17 -3
- package/knowledge-base/optimization/convex-optimization.en.md +15 -2
- package/knowledge-base/optimization/convex-optimization.md +15 -2
- package/knowledge-base/optimization/index.en.md +50 -0
- package/knowledge-base/optimization/index.md +50 -0
- package/knowledge-base/optimization/lagrangian-duality.en.md +18 -4
- package/knowledge-base/optimization/lagrangian-duality.md +18 -4
- package/knowledge-base/optimization/proximal-method.en.md +15 -1
- package/knowledge-base/optimization/proximal-method.md +15 -1
- package/knowledge-base/optimization/riemannian-optimization.en.md +18 -4
- package/knowledge-base/optimization/riemannian-optimization.md +18 -4
- package/knowledge-base/overview.en.md +20 -8
- package/knowledge-base/overview.md +20 -8
- package/knowledge-base/probability/concentration-inequality.en.md +21 -7
- package/knowledge-base/probability/concentration-inequality.md +21 -7
- package/knowledge-base/probability/entropy.en.md +24 -8
- package/knowledge-base/probability/entropy.md +23 -7
- package/knowledge-base/probability/fisher-information.en.md +24 -10
- package/knowledge-base/probability/fisher-information.md +24 -10
- package/knowledge-base/probability/index.en.md +51 -0
- package/knowledge-base/probability/index.md +51 -0
- package/knowledge-base/probability/information-bottleneck.en.md +24 -8
- package/knowledge-base/probability/information-bottleneck.md +24 -8
- package/knowledge-base/probability/kl-divergence.en.md +21 -8
- package/knowledge-base/probability/kl-divergence.md +21 -8
- package/knowledge-base/topology/euler-characteristic.en.md +15 -2
- package/knowledge-base/topology/euler-characteristic.md +15 -2
- package/knowledge-base/topology/fundamental-group.en.md +16 -2
- package/knowledge-base/topology/fundamental-group.md +16 -2
- package/knowledge-base/topology/index.en.md +48 -0
- package/knowledge-base/topology/index.md +48 -0
- package/knowledge-base/topology/persistent-homology.en.md +17 -2
- package/knowledge-base/topology/persistent-homology.md +17 -2
- package/lenses/algorithmic.en.md +1 -1
- package/lenses/algorithmic.md +1 -1
- package/lenses/axiomatization.en.md +1 -1
- package/lenses/axiomatization.md +1 -1
- package/lenses/categorical.en.md +1 -1
- package/lenses/categorical.md +1 -1
- package/lenses/causal.en.md +1 -1
- package/lenses/causal.md +1 -1
- package/lenses/duality.en.md +1 -1
- package/lenses/duality.md +1 -1
- package/lenses/game.en.md +2 -2
- package/lenses/game.md +2 -2
- package/lenses/geometric.en.md +1 -1
- package/lenses/geometric.md +1 -1
- package/lenses/local-to-global.en.md +1 -1
- package/lenses/local-to-global.md +1 -1
- package/lenses/perturbation.en.md +1 -1
- package/lenses/perturbation.md +1 -1
- package/lenses/probabilistic.en.md +1 -1
- package/lenses/probabilistic.md +1 -1
- package/lenses/projection.en.md +1 -1
- package/lenses/projection.md +1 -1
- package/lenses/spectral.en.md +2 -2
- package/lenses/spectral.md +2 -2
- package/lenses/symmetry.en.md +1 -1
- package/lenses/symmetry.md +1 -1
- package/lenses/topological.en.md +2 -2
- package/lenses/topological.md +2 -2
- package/lenses/variational.en.md +1 -1
- package/lenses/variational.md +1 -1
- package/package.json +5 -5
- package/references/agentic-workflow.en.md +3 -3
- package/references/agentic-workflow.md +1 -1
- package/references/books/abstract-algebra.en.md +124 -0
- package/references/books/abstract-algebra.md +17 -17
- package/references/books/algebraic-geometry-rising-sea.en.md +171 -0
- package/references/books/algebraic-geometry-rising-sea.md +7 -7
- package/references/books/differential-geometry.en.md +140 -0
- package/references/books/differential-geometry.md +23 -23
- package/references/books/matrix-analysis.en.md +146 -0
- package/references/books/matrix-analysis.md +32 -32
- package/references/books/micro-lie-theory.en.md +116 -0
- package/references/books/micro-lie-theory.md +16 -16
- package/references/books/optimization-ml.en.md +163 -0
- package/references/books/optimization-ml.md +20 -21
- package/references/books/smooth-manifolds.en.md +105 -0
- package/references/books/smooth-manifolds.md +15 -15
- package/references/gpu-friendly-math.en.md +35 -9
- package/references/gpu-friendly-math.md +33 -5
- package/references/skill-index.en.md +105 -0
- package/references/skill-index.md +105 -0
- package/skills/math-research-activator/SKILL.en.md +72 -88
- package/skills/math-research-activator/SKILL.md +61 -78
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
# Differential Geometry Activation Index
|
|
2
|
+
|
|
3
|
+
## Domain Signals
|
|
4
|
+
Activate this domain direction when the problem involves:
|
|
5
|
+
- Parameter space curvature: geometric curvature of parameter space affects optimization or inference
|
|
6
|
+
- Manifold constraints: parameters must remain on a specific manifold
|
|
7
|
+
- Geodesic distance: need to compute shortest paths or distances along a manifold
|
|
8
|
+
- Connection / parallel transport: need to compare tangent vectors at different points on a manifold
|
|
9
|
+
- Riemannian metric: need to define inner products and lengths on a manifold
|
|
10
|
+
- Index raising/lowering: need to convert between tangent and cotangent spaces
|
|
11
|
+
|
|
12
|
+
## Core Anchors
|
|
13
|
+
- `manifold.en.md` — Fundamental concepts of manifolds
|
|
14
|
+
- `tangent-space.en.md` — Tangent space and tangent map
|
|
15
|
+
- `metric-tensor.en.md` — Metric tensor and Riemannian metric
|
|
16
|
+
- `geodesic.en.md` — Geodesics
|
|
17
|
+
- `curvature.en.md` — Curvature
|
|
18
|
+
- `connection.en.md` — Connection and covariant derivative
|
|
19
|
+
|
|
20
|
+
## Extended Concepts
|
|
21
|
+
When core anchors are insufficient, the following concepts may need temporary activation:
|
|
22
|
+
- Lie derivative: Lie derivative and rate of change along a vector field
|
|
23
|
+
- exterior calculus (differential forms, wedge product, exterior derivative): exterior differentiation and differential form operations
|
|
24
|
+
- Hodge decomposition: Hodge decomposition theorem
|
|
25
|
+
- fiber bundle: fiber bundles and sections
|
|
26
|
+
- principal bundle: principal bundles and gauge theory
|
|
27
|
+
- holonomy: holonomy group and closure of parallel transport
|
|
28
|
+
- Riemannian submersion: Riemannian submersions and quotient metrics
|
|
29
|
+
- symmetric space: symmetric spaces
|
|
30
|
+
- homogeneous space: homogeneous spaces G/H
|
|
31
|
+
- Cartan geometry: Cartan geometry and moving frames
|
|
32
|
+
- spin structure: spin structures
|
|
33
|
+
- Dirac operator: Dirac operator
|
|
34
|
+
- Ricci flow: Ricci flow
|
|
35
|
+
|
|
36
|
+
## Reference Book Directions
|
|
37
|
+
- `../../references/books/differential-geometry.en.md`: core content of Riemannian geometry
|
|
38
|
+
- `../../references/books/smooth-manifolds.en.md`: smooth manifolds, vector bundles, and differential forms
|
|
39
|
+
|
|
40
|
+
## AI Translation Directions
|
|
41
|
+
- manifold → latent space geometry / manifold-valued predictions / hyperbolic embeddings
|
|
42
|
+
- tangent space → local linearization of parameter updates / tangent-space features
|
|
43
|
+
- metric tensor → learned distance metrics / Fisher-Rao natural gradient / metric-aware loss
|
|
44
|
+
- geodesic → interpolation on manifolds / geodesic regularization / shortest-path loss
|
|
45
|
+
- curvature → loss landscape analysis / curvature-aware optimization / flatness seeking
|
|
46
|
+
- connection → parallel transport of features / gauge-equivariant layers
|
|
47
|
+
|
|
48
|
+
## Temporary Activation Rules
|
|
49
|
+
When the problem requires mathematics not in the core anchors:
|
|
50
|
+
1. First check whether extended concepts contain a match
|
|
51
|
+
2. If yes, generate a temporary knowledge card based on the lens
|
|
52
|
+
3. If no, enter the Knowledge Gap Protocol
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
# 微分几何 激活索引 / Differential Geometry Activation Index
|
|
2
|
+
|
|
3
|
+
## 领域信号
|
|
4
|
+
当问题涉及以下信号时,激活本领域方向:
|
|
5
|
+
- 参数空间曲率:参数空间的几何弯曲影响优化或推断
|
|
6
|
+
- 流形约束:参数必须保持在特定流形上
|
|
7
|
+
- 测地线距离:需要沿流形计算最短路径或距离
|
|
8
|
+
- 联络/平行移动:需要在流形上比较不同点的切向量
|
|
9
|
+
- 黎曼度量:需要定义流形上的内积和长度
|
|
10
|
+
- 指标升降:需要在切空间与余切空间之间转换
|
|
11
|
+
|
|
12
|
+
## 核心锚点
|
|
13
|
+
- `manifold.md` — 流形的基本概念
|
|
14
|
+
- `tangent-space.md` — 切空间与切映射
|
|
15
|
+
- `metric-tensor.md` — 度量张量与黎曼度量
|
|
16
|
+
- `geodesic.md` — 测地线
|
|
17
|
+
- `curvature.md` — 曲率
|
|
18
|
+
- `connection.md` — 联络与协变导数
|
|
19
|
+
|
|
20
|
+
## 扩展概念
|
|
21
|
+
当核心锚点不够时,以下概念可能需要临时激活:
|
|
22
|
+
- Lie derivative:Lie 导数与沿向量场的变化率
|
|
23
|
+
- exterior calculus(differential forms, wedge product, exterior derivative):外微分与微分形式运算
|
|
24
|
+
- Hodge decomposition:Hodge 分解定理
|
|
25
|
+
- fiber bundle:纤维丛与截面
|
|
26
|
+
- principal bundle:主丛与规范理论
|
|
27
|
+
- holonomy:和乐群与平行移动的闭合性
|
|
28
|
+
- Riemannian submersion:黎曼浸没与商度量
|
|
29
|
+
- symmetric space:对称空间
|
|
30
|
+
- homogeneous space:齐性空间 G/H
|
|
31
|
+
- Cartan geometry:Cartan 几何与活动标架
|
|
32
|
+
- spin structure:旋量结构
|
|
33
|
+
- Dirac operator:Dirac 算子
|
|
34
|
+
- Ricci flow:Ricci 流
|
|
35
|
+
|
|
36
|
+
## 参考书方向
|
|
37
|
+
- `../../references/books/differential-geometry.md`:黎曼几何的核心内容
|
|
38
|
+
- `../../references/books/smooth-manifolds.md`:光滑流形、向量丛和微分形式
|
|
39
|
+
|
|
40
|
+
## AI 翻译方向
|
|
41
|
+
- manifold → latent space geometry / manifold-valued predictions / hyperbolic embeddings
|
|
42
|
+
- tangent space → local linearization of parameter updates / tangent-space features
|
|
43
|
+
- metric tensor → learned distance metrics / Fisher-Rao natural gradient / metric-aware loss
|
|
44
|
+
- geodesic → interpolation on manifolds / geodesic regularization / shortest-path loss
|
|
45
|
+
- curvature → loss landscape analysis / curvature-aware optimization / flatness seeking
|
|
46
|
+
- connection → parallel transport of features / gauge-equivariant layers
|
|
47
|
+
|
|
48
|
+
## 临时激活规则
|
|
49
|
+
当问题需要的数学不在核心锚点中时:
|
|
50
|
+
1. 先检查扩展概念中是否有匹配
|
|
51
|
+
2. 若有,根据透镜生成临时知识卡
|
|
52
|
+
3. 若无,进入 Knowledge Gap Protocol
|
|
@@ -41,7 +41,20 @@ Moderate GPU friendliness. Coordinate chart transformations are element-wise map
|
|
|
41
41
|
|
|
42
42
|
## Further References
|
|
43
43
|
|
|
44
|
-
- Distillation notes: references/books/smooth-manifolds.md (Ch 1-2 Smooth Manifolds / Smooth Maps)
|
|
45
|
-
- Distillation notes: references/books/differential-geometry.md (Ch 1-2 Differentiable Manifolds / The Tangent Structure)
|
|
44
|
+
- Distillation notes: ../../references/books/smooth-manifolds.en.md (Ch 1-2 Smooth Manifolds / Smooth Maps)
|
|
45
|
+
- Distillation notes: ../../references/books/differential-geometry.en.md (Ch 1-2 Differentiable Manifolds / The Tangent Structure)
|
|
46
46
|
- Original text: John M. Lee, *Introduction to Smooth Manifolds*, 2nd Edition, Ch 1-2 (topological manifolds, smooth structures, partition of unity)
|
|
47
47
|
- Original text: Jeffrey M. Lee, *Manifolds and Differential Geometry*, Ch 1-2
|
|
48
|
+
|
|
49
|
+
|
|
50
|
+
## Routing Extensions
|
|
51
|
+
- If local structure analysis is needed -> `tangent-space.en.md` (tangent space provides local linear approximation)
|
|
52
|
+
- If distance definition is needed -> `metric-tensor.en.md` (metric tensor defines distance on manifolds)
|
|
53
|
+
- If optimization on manifolds is needed -> `../optimization/riemannian-optimization.md` (Riemannian optimization methods)
|
|
54
|
+
|
|
55
|
+
## Extensible Directions
|
|
56
|
+
- Submanifold: embedded and immersed submanifolds
|
|
57
|
+
- Product manifold: direct product construction of multiple manifolds
|
|
58
|
+
- Quotient manifold: quotient space under equivalence relations
|
|
59
|
+
- Stiefel / Grassmann manifolds: orthogonal matrix and subspace manifolds
|
|
60
|
+
- Manifold learning (Isomap / LLE / diffusion maps): discovering low-dimensional manifolds from high-dimensional data
|
|
@@ -41,7 +41,20 @@ GPU 友好度中等。坐标卡变换本身是逐元素的映射(可并行)
|
|
|
41
41
|
|
|
42
42
|
## 深入参考
|
|
43
43
|
|
|
44
|
-
-
|
|
45
|
-
-
|
|
44
|
+
- 蒸馏稿:../../references/books/smooth-manifolds.md(Ch 1-2 Smooth Manifolds / Smooth Maps)
|
|
45
|
+
- 蒸馏稿:../../references/books/differential-geometry.md(Ch 1-2 Differentiable Manifolds / The Tangent Structure)
|
|
46
46
|
- 原书:John M. Lee, *Introduction to Smooth Manifolds*, 2nd Edition, Ch 1-2(拓扑流形、光滑结构、单位分解)
|
|
47
47
|
- 原书:Jeffrey M. Lee, *Manifolds and Differential Geometry*, Ch 1-2
|
|
48
|
+
|
|
49
|
+
|
|
50
|
+
## 路由扩展
|
|
51
|
+
- 若需要局部结构分析 → `tangent-space.md`(切空间提供局部线性近似)
|
|
52
|
+
- 若需要距离定义 → `metric-tensor.md`(度量张量定义流形上的距离)
|
|
53
|
+
- 若需要在流形上做优化 → `../optimization/riemannian-optimization.md`(黎曼优化方法)
|
|
54
|
+
|
|
55
|
+
## 可扩展方向
|
|
56
|
+
- 子流形(submanifold):嵌入子流形与浸没子流形
|
|
57
|
+
- 积流形(product manifold):多个流形的直积构造
|
|
58
|
+
- 商流形(quotient manifold):等价关系下的商空间
|
|
59
|
+
- Stiefel / Grassmann 流形:正交矩阵与子空间流形
|
|
60
|
+
- 流形学习(Isomap / LLE / diffusion maps):从高维数据发现低维流形
|
|
@@ -44,7 +44,21 @@ GPU friendliness depends on the structure of the metric:
|
|
|
44
44
|
|
|
45
45
|
## Further References
|
|
46
46
|
|
|
47
|
-
- Distillation notes: references/books/differential-geometry.md (Ch 7 Section 7.6 Metric Tensors, Ch 13 Section 13.1 Levi-Civita)
|
|
48
|
-
- Distillation notes: references/books/smooth-manifolds.md (Ch 13 Riemannian Metrics)
|
|
47
|
+
- Distillation notes: ../../references/books/differential-geometry.en.md (Ch 7 Section 7.6 Metric Tensors, Ch 13 Section 13.1 Levi-Civita)
|
|
48
|
+
- Distillation notes: ../../references/books/smooth-manifolds.en.md (Ch 13 Riemannian Metrics)
|
|
49
49
|
- Original text: Jeffrey M. Lee, *Manifolds and Differential Geometry*, Section 7.6 Metric Tensors
|
|
50
50
|
- Original text: John M. Lee, *Introduction to Smooth Manifolds*, Ch 13 (Riemannian metrics, musical isomorphisms sharp/flat)
|
|
51
|
+
|
|
52
|
+
|
|
53
|
+
## Routing Extensions
|
|
54
|
+
- If the metric comes from Fisher information -> `../information-geometry/natural-gradient.md` (natural gradient under Fisher metric)
|
|
55
|
+
- If Riemannian gradient computation is needed -> `../optimization/riemannian-optimization.md` (metric determines gradient direction)
|
|
56
|
+
- If curvature analysis is needed -> `curvature.en.md` (metric determines curvature tensor)
|
|
57
|
+
|
|
58
|
+
## Extensible Directions
|
|
59
|
+
- Finsler metric: generalized non-quadratic metrics
|
|
60
|
+
- Sub-Riemannian metric: metrics under distribution constraints
|
|
61
|
+
- Information metric: Fisher-Rao metric on statistical manifolds
|
|
62
|
+
- Pullback metric: metric induced by a mapping
|
|
63
|
+
- Metric learning: learning optimal metrics from data
|
|
64
|
+
- Distance metric learning: supervised distance learning
|
|
@@ -44,7 +44,21 @@ GPU 友好度取决于度量的结构化程度:
|
|
|
44
44
|
|
|
45
45
|
## 深入参考
|
|
46
46
|
|
|
47
|
-
-
|
|
48
|
-
-
|
|
47
|
+
- 蒸馏稿:../../references/books/differential-geometry.md(Ch 7 §7.6 Metric Tensors, Ch 13 §13.1 Levi-Civita)
|
|
48
|
+
- 蒸馏稿:../../references/books/smooth-manifolds.md(Ch 13 Riemannian Metrics)
|
|
49
49
|
- 原书:Jeffrey M. Lee, *Manifolds and Differential Geometry*, §7.6 Metric Tensors
|
|
50
|
-
- 原书:John M. Lee, *Introduction to Smooth Manifolds*, Ch 13(黎曼度量、升降指标
|
|
50
|
+
- 原书:John M. Lee, *Introduction to Smooth Manifolds*, Ch 13(黎曼度量、升降指标 (sharp)/(flat))
|
|
51
|
+
|
|
52
|
+
|
|
53
|
+
## 路由扩展
|
|
54
|
+
- 若度量来自 Fisher 信息 → `../information-geometry/natural-gradient.md`(Fisher 度量下的自然梯度)
|
|
55
|
+
- 若需要黎曼梯度计算 → `../optimization/riemannian-optimization.md`(度量决定的梯度方向)
|
|
56
|
+
- 若需要曲率分析 → `curvature.md`(度量决定的曲率张量)
|
|
57
|
+
|
|
58
|
+
## 可扩展方向
|
|
59
|
+
- Finsler 度量(Finsler metric):非二次型的广义度量
|
|
60
|
+
- 亚黎曼度量(sub-Riemannian metric):分布约束下的度量
|
|
61
|
+
- 信息度量(information metric):统计流形上的 Fisher-Rao 度量
|
|
62
|
+
- 拉回度量(pullback metric):映射诱导的度量
|
|
63
|
+
- 度量学习(metric learning):从数据学习最优度量
|
|
64
|
+
- 距离度量学习(distance metric learning):监督距离学习
|
|
@@ -13,7 +13,7 @@ The tangent space $T_pM$ is the $n$-dimensional vector space of all tangent vect
|
|
|
13
13
|
|
|
14
14
|
## Applicable Problems
|
|
15
15
|
|
|
16
|
-
- Geometric interpretation of backpropagation: the chain rule equals pushforward
|
|
16
|
+
- Geometric interpretation of backpropagation: the chain rule equals pullback on the cotangent bundle, i.e., VJP (vector-Jacobian product) = pullback of covectors $df_p^*(\omega) = J^T \omega$. Note: pushforward corresponds to JVP (forward-mode AD), not backpropagation
|
|
17
17
|
- Correct gradient direction computation: autodiff outputs are covectors (1-forms), requiring a metric to convert them into descent directions
|
|
18
18
|
- Gradient projection in constrained optimization: projecting the Euclidean gradient onto the tangent space of the constraint submanifold
|
|
19
19
|
- Linearized approximations on manifolds: using linear methods within the tangent space to handle local problems
|
|
@@ -42,7 +42,21 @@ High GPU friendliness. The core operations of the tangent space are linear algeb
|
|
|
42
42
|
|
|
43
43
|
## Further References
|
|
44
44
|
|
|
45
|
-
- Distillation notes: references/books/smooth-manifolds.md (Ch 3 Tangent Vectors, Ch 11 The Cotangent Bundle)
|
|
46
|
-
- Distillation notes: references/books/differential-geometry.md (Ch 1-2, Ch 7 Tensors)
|
|
45
|
+
- Distillation notes: ../../references/books/smooth-manifolds.en.md (Ch 3 Tangent Vectors, Ch 11 The Cotangent Bundle)
|
|
46
|
+
- Distillation notes: ../../references/books/differential-geometry.en.md (Ch 1-2, Ch 7 Tensors)
|
|
47
47
|
- Original text: John M. Lee, *Introduction to Smooth Manifolds*, 2nd Edition, Ch 3 (tangent spaces, pushforward, tangent bundle)
|
|
48
48
|
- Original text: John M. Lee, *Introduction to Smooth Manifolds*, Ch 11 (cotangent bundle, 1-forms, pullback)
|
|
49
|
+
|
|
50
|
+
|
|
51
|
+
## Routing Extensions
|
|
52
|
+
- If gradient computation on manifolds is needed -> `../optimization/riemannian-optimization.md` (gradient descent on manifolds)
|
|
53
|
+
- If the tangent space of a group structure is involved -> `../lie-theory/lie-algebra.md` (tangent space of a Lie group is its Lie algebra)
|
|
54
|
+
- If covariant derivative is needed -> `connection.en.md` (connection defines covariant differentiation)
|
|
55
|
+
|
|
56
|
+
## Extensible Directions
|
|
57
|
+
- Cotangent space: dual space and differential forms
|
|
58
|
+
- Differential / pushforward: tangent map of smooth maps
|
|
59
|
+
- Vector field: smooth vector fields on manifolds
|
|
60
|
+
- Lie bracket: commutation relations of vector fields
|
|
61
|
+
- Integral curve: integral curves and flows of vector fields
|
|
62
|
+
- Exponential map: mapping from tangent space to manifold
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
|
|
14
14
|
## 适用问题
|
|
15
15
|
|
|
16
|
-
- 反向传播的几何理解:链式法则 =
|
|
16
|
+
- 反向传播的几何理解:链式法则 = 余切丛上的 pullback(拉回),即 VJP(vector-Jacobian product)= 余向量的拉回 $df_p^*(\omega) = J^T \omega$。注意:pushforward 对应的是 JVP(前向模式 AD),不是反向传播
|
|
17
17
|
- 梯度方向的正确计算:autodiff 输出是余向量(1-form),需要度量才能变成下降方向
|
|
18
18
|
- 约束优化中梯度投影:将欧氏梯度投影到约束子流形的切空间
|
|
19
19
|
- 流形上的线性化近似:在切空间中用线性方法处理局部问题
|
|
@@ -42,7 +42,21 @@ GPU 友好度高。切空间的核心操作是线性代数:
|
|
|
42
42
|
|
|
43
43
|
## 深入参考
|
|
44
44
|
|
|
45
|
-
-
|
|
46
|
-
-
|
|
45
|
+
- 蒸馏稿:../../references/books/smooth-manifolds.md(Ch 3 Tangent Vectors, Ch 11 The Cotangent Bundle)
|
|
46
|
+
- 蒸馏稿:../../references/books/differential-geometry.md(Ch 1-2, Ch 7 Tensors)
|
|
47
47
|
- 原书:John M. Lee, *Introduction to Smooth Manifolds*, 2nd Edition, Ch 3(切空间、pushforward、切丛)
|
|
48
48
|
- 原书:John M. Lee, *Introduction to Smooth Manifolds*, Ch 11(余切丛、1-form、pullback)
|
|
49
|
+
|
|
50
|
+
|
|
51
|
+
## 路由扩展
|
|
52
|
+
- 若需要在流形上计算梯度 → `../optimization/riemannian-optimization.md`(流形上的梯度下降)
|
|
53
|
+
- 若涉及群结构的切空间 → `../lie-theory/lie-algebra.md`(李群的切空间即李代数)
|
|
54
|
+
- 若需要协变导数 → `connection.md`(联络定义协变微分)
|
|
55
|
+
|
|
56
|
+
## 可扩展方向
|
|
57
|
+
- 余切空间(cotangent space):对偶空间与微分形式
|
|
58
|
+
- 微分/前推算子(differential / pushforward):光滑映射的切映射
|
|
59
|
+
- 向量场(vector field):流形上的光滑向量场
|
|
60
|
+
- Lie 括号(Lie bracket):向量场的对易关系
|
|
61
|
+
- 积分曲线(integral curve):向量场的积分曲线与流
|
|
62
|
+
- 指数映射(exponential map):从切空间到流形的映射
|
|
@@ -6,10 +6,14 @@ The Fisher-Rao metric is a **Riemannian metric** on the parameter space of a fam
|
|
|
6
6
|
## Core Formulas
|
|
7
7
|
|
|
8
8
|
**Metric Tensor (i.e., Fisher Information Matrix)**:
|
|
9
|
-
$$g_{ij}(\theta) = \mathcal{I}_{ij}(\theta) = \mathbb{E}_\theta\left[\frac{\partial \log p}{\partial \theta_i} \frac{\partial \log p}{\partial \theta_j}\right]$$
|
|
9
|
+
$$g_{ij}(\theta) = \mathcal{I}_{ij}(\theta) = \mathbb{E}_\theta\left[\frac{\partial \log p}{\partial \theta_i} \frac{\partial \log p}{\partial \theta_j}\right] = -\mathbb{E}_\theta\left[\frac{\partial^2 \log p}{\partial \theta_i \partial \theta_j}\right]$$
|
|
10
|
+
|
|
11
|
+
**Second-Order Taylor Expansion of KL Divergence**: The Fisher metric is precisely the Hessian of KL divergence at $\theta' = \theta$:
|
|
12
|
+
$$g_{ij}(\theta) = \frac{\partial^2}{\partial \theta_i' \partial \theta_j'} D_{KL}(p_\theta \| p_{\theta'})\bigg|_{\theta'=\theta}$$
|
|
13
|
+
That is, $D_{KL}(p_\theta \| p_{\theta+d\theta}) = \frac{1}{2} \sum_{i,j} g_{ij}(\theta) \, d\theta_i \, d\theta_j + O(\|d\theta\|^3)$.
|
|
10
14
|
|
|
11
15
|
**Line Element (infinitesimal distance between distributions)**:
|
|
12
|
-
$$ds^2 = \sum_{i,j} g_{ij}(\theta) \, d\theta_i \, d\theta_j
|
|
16
|
+
$$ds^2 = \sum_{i,j} g_{ij}(\theta) \, d\theta_i \, d\theta_j \approx 2 \, D_{KL}(p_\theta \| p_{\theta+d\theta}) \quad \text{(second-order local expansion, asymptotically exact as } d\theta \to 0\text{)}$$
|
|
13
17
|
|
|
14
18
|
**Geodesic Distance (finite distance between distributions)**:
|
|
15
19
|
$$d(p_{\theta_1}, p_{\theta_2}) = \inf_{\gamma} \int_0^1 \sqrt{\dot{\gamma}^T \mathcal{I}(\gamma(t)) \dot{\gamma}} \, dt$$
|
|
@@ -20,7 +24,7 @@ $$\Gamma_{ijk}^{(\alpha)} = \mathbb{E}\left[\left(\partial_i \partial_j \ell + \
|
|
|
20
24
|
- $\alpha = 1$: $e$-connection (exponential connection), corresponding to straight lines in the natural parameters of the exponential family
|
|
21
25
|
- $\alpha = -1$: $m$-connection (mixture connection), corresponding to straight lines in the expectation parameters of the mixture family
|
|
22
26
|
|
|
23
|
-
**Dually Flat Structure**: $(\mathcal{M}, g, \nabla^{(e)}, \nabla^{(m)})$
|
|
27
|
+
**Dually Flat Structure (conditional)**: Exponential families, mixture families, and related structured statistical models can make $(\mathcal{M}, g, \nabla^{(e)}, \nabla^{(m)})$ a dually flat manifold, where the $e$-connection and $m$-connection are dual with respect to $g$ and the generalized Pythagorean theorem holds. A general Fisher-Rao statistical manifold is not automatically dually flat; the model-family structure must be verified.
|
|
24
28
|
|
|
25
29
|
## Applicable Problems
|
|
26
30
|
- **Geometric distance between distributions**: Comparing the "intrinsic difference" between two probabilistic models (e.g., output distributions of two language models)
|
|
@@ -33,14 +37,14 @@ $$\Gamma_{ijk}^{(\alpha)} = \mathbb{E}\left[\left(\partial_i \partial_j \ell + \
|
|
|
33
37
|
- **Geometric analysis of MoE expert distributions**: The degree of separation between the output distributions of different experts under the Fisher metric can quantify expert diversity
|
|
34
38
|
|
|
35
39
|
## Engineering Feasibility
|
|
36
|
-
- **
|
|
37
|
-
- **
|
|
38
|
-
- **
|
|
39
|
-
- **
|
|
40
|
-
- **
|
|
41
|
-
- **
|
|
42
|
-
- **
|
|
43
|
-
- **
|
|
40
|
+
- **D1[x]**: The full metric tensor $g_{ij}$ is $d \times d$; infeasible to materialize when $d \sim 10^{10}$
|
|
41
|
+
- **D2[~]**: Kronecker/diagonal approximations can be mapped; the exact metric cannot
|
|
42
|
+
- **D3[x]**: Geodesic computation requires solving a second-order ODE; exact computation is intractable
|
|
43
|
+
- **D4[x]**: Full metric tensor storage is $O(d^2)$; completely impossible at LLM scale
|
|
44
|
+
- **D5[~]**: The condition number of the metric tensor may be very large, leading to instability under low precision
|
|
45
|
+
- **D6[~]**: Approximate versions (K-FAC, diagonal) can be parallelized; exact versions cannot
|
|
46
|
+
- **D7[~]**: The Fisher information matrix is typically dense; block-diagonal approximations (inter-layer independence) introduce structured sparsity
|
|
47
|
+
- **D8[v]**: Approximate versions can be fused into optimizer updates
|
|
44
48
|
|
|
45
49
|
**Conclusion**: The exact Fisher metric is infeasible at LLM scale, but **approximate versions** (K-FAC, diagonal Fisher, low-rank) are engineering-viable. The theoretical value of information geometry lies primarily in **guiding design** rather than direct computation.
|
|
46
50
|
|
|
@@ -49,8 +53,23 @@ $$\Gamma_{ijk}^{(\alpha)} = \mathbb{E}\left[\left(\partial_i \partial_j \ell + \
|
|
|
49
53
|
- **Singularities of the statistical manifold**: In certain regions of the parameter space (e.g., degenerate points of mixture distributions), the Fisher metric may degenerate ($\det \mathcal{I} = 0$), causing geodesic distances to be undefined. This type of degeneracy arises in MoE when an expert's weight is zero.
|
|
50
54
|
|
|
51
55
|
## Further References
|
|
52
|
-
- Distillation draft:
|
|
56
|
+
- Distillation draft: `../../references/books/` — no dedicated information geometry distillation draft at present
|
|
53
57
|
- Amari & Nagaoka. *Methods of Information Geometry*. AMS/Oxford, 2000
|
|
54
58
|
- Amari. *Information Geometry and Its Applications*. Springer, 2016
|
|
55
59
|
- Ay, Jost, Le, Schwachhofer. *Information Geometry*. Springer, 2017
|
|
56
|
-
- Related knowledge cards:
|
|
60
|
+
- Related knowledge cards: `../probability/fisher-information.en.md`, `natural-gradient.en.md`
|
|
61
|
+
|
|
62
|
+
|
|
63
|
+
## Routing Extensions
|
|
64
|
+
- If optimization application is needed -> `natural-gradient.en.md` (natural gradient descent under Fisher metric)
|
|
65
|
+
- If a general Riemannian metric is needed -> `../differential-geometry/metric-tensor.md` (Fisher metric is a special case of Riemannian metric)
|
|
66
|
+
- If local KL analysis is needed -> `../probability/kl-divergence.md` (local KL divergence equals Fisher metric)
|
|
67
|
+
|
|
68
|
+
## Extensible Directions
|
|
69
|
+
- Rao's distance: geodesic distance under Fisher-Rao metric
|
|
70
|
+
- Fisher-Rao geodesic: shortest paths in distribution space
|
|
71
|
+
- Alpha-connection family: Amari's alpha-connections
|
|
72
|
+
- Dual flatness: e-flat and m-flat structures
|
|
73
|
+
- Chentsov's uniqueness theorem: uniqueness of Fisher metric
|
|
74
|
+
- Infinite-dimensional Fisher metric: Fisher metric on function spaces
|
|
75
|
+
- Fisher metric in function space: Fisher metric for neural networks
|
|
@@ -6,10 +6,14 @@ Fisher-Rao 度量是概率分布族(统计模型)参数空间上的**黎曼
|
|
|
6
6
|
## 核心公式
|
|
7
7
|
|
|
8
8
|
**度量张量(即 Fisher 信息矩阵)**:
|
|
9
|
-
$$g_{ij}(\theta) = \mathcal{I}_{ij}(\theta) = \mathbb{E}_\theta\left[\frac{\partial \log p}{\partial \theta_i} \frac{\partial \log p}{\partial \theta_j}\right]$$
|
|
9
|
+
$$g_{ij}(\theta) = \mathcal{I}_{ij}(\theta) = \mathbb{E}_\theta\left[\frac{\partial \log p}{\partial \theta_i} \frac{\partial \log p}{\partial \theta_j}\right] = -\mathbb{E}_\theta\left[\frac{\partial^2 \log p}{\partial \theta_i \partial \theta_j}\right]$$
|
|
10
|
+
|
|
11
|
+
**KL 散度的二阶 Taylor 展开**:Fisher 度量恰好是 KL 散度在 $\theta' = \theta$ 处的 Hessian:
|
|
12
|
+
$$g_{ij}(\theta) = \frac{\partial^2}{\partial \theta_i' \partial \theta_j'} D_{KL}(p_\theta \| p_{\theta'})\bigg|_{\theta'=\theta}$$
|
|
13
|
+
即 $D_{KL}(p_\theta \| p_{\theta+d\theta}) = \frac{1}{2} \sum_{i,j} g_{ij}(\theta) \, d\theta_i \, d\theta_j + O(\|d\theta\|^3)$。
|
|
10
14
|
|
|
11
15
|
**线元(分布间的无穷小距离)**:
|
|
12
|
-
$$ds^2 = \sum_{i,j} g_{ij}(\theta) \, d\theta_i \, d\theta_j
|
|
16
|
+
$$ds^2 = \sum_{i,j} g_{ij}(\theta) \, d\theta_i \, d\theta_j \approx 2 \, D_{KL}(p_\theta \| p_{\theta+d\theta}) \quad \text{(二阶局部展开,当 } d\theta \to 0 \text{ 时渐近成立)}$$
|
|
13
17
|
|
|
14
18
|
**测地线距离(有限分布间距离)**:
|
|
15
19
|
$$d(p_{\theta_1}, p_{\theta_2}) = \inf_{\gamma} \int_0^1 \sqrt{\dot{\gamma}^T \mathcal{I}(\gamma(t)) \dot{\gamma}} \, dt$$
|
|
@@ -20,7 +24,7 @@ $$\Gamma_{ijk}^{(\alpha)} = \mathbb{E}\left[\left(\partial_i \partial_j \ell + \
|
|
|
20
24
|
- $\alpha = 1$:$e$-联络(指数联络),对应指数族的自然参数直线
|
|
21
25
|
- $\alpha = -1$:$m$-联络(混合联络),对应混合族的期望参数直线
|
|
22
26
|
|
|
23
|
-
|
|
27
|
+
**对偶平坦性(有条件)**:指数族、混合族等特定统计模型可使 $(\mathcal{M}, g, \nabla^{(e)}, \nabla^{(m)})$ 构成对偶平坦流形,$e$-联络和 $m$-联络关于 $g$ 互为对偶,广义勾股定理成立。一般 Fisher-Rao 统计流形不自动对偶平坦,需验证模型族结构。
|
|
24
28
|
|
|
25
29
|
## 适用问题
|
|
26
30
|
- **分布间的几何距离**:比较两个概率模型(如两个语言模型的输出分布)的"本质差异"
|
|
@@ -33,14 +37,14 @@ $$\Gamma_{ijk}^{(\alpha)} = \mathbb{E}\left[\left(\partial_i \partial_j \ell + \
|
|
|
33
37
|
- **MoE 专家分布的几何分析**:不同专家的输出分布在 Fisher 度量下的分离度可量化专家多样性
|
|
34
38
|
|
|
35
39
|
## 工程可行性
|
|
36
|
-
-
|
|
37
|
-
-
|
|
38
|
-
-
|
|
39
|
-
-
|
|
40
|
-
-
|
|
41
|
-
-
|
|
42
|
-
-
|
|
43
|
-
-
|
|
40
|
+
- **D1[x]**:完整度量张量 $g_{ij}$ 是 $d \times d$,$d \sim 10^{10}$ 时不可物化
|
|
41
|
+
- **D2[~]**:Kronecker/对角近似可,精确度量不可
|
|
42
|
+
- **D3[x]**:测地线计算需解二阶 ODE,精确计算不可行
|
|
43
|
+
- **D4[x]**:完整度量张量存储 $O(d^2)$,LLM 级完全不可能
|
|
44
|
+
- **D5[~]**:度量张量的条件数可能很大,低精度下不稳定
|
|
45
|
+
- **D6[~]**:近似版本(K-FAC、对角)可并行,精确版本不可
|
|
46
|
+
- **D7[~]**:Fisher 信息矩阵通常稠密;块对角近似(层间独立)引入结构化稀疏
|
|
47
|
+
- **D8[v]**:近似版本可融入优化器更新
|
|
44
48
|
|
|
45
49
|
**结论**:精确 Fisher 度量在 LLM 规模下不可行,但**近似版本**(K-FAC、对角 Fisher、低秩)在工程上可落地。信息几何的理论价值主要在**指导设计**而非直接计算。
|
|
46
50
|
|
|
@@ -49,8 +53,23 @@ $$\Gamma_{ijk}^{(\alpha)} = \mathbb{E}\left[\left(\partial_i \partial_j \ell + \
|
|
|
49
53
|
- **统计流形的奇点**:在参数空间的某些区域(如混合分布的退化点),Fisher 度量可能退化($\det \mathcal{I} = 0$),导致测地线距离不定义。在 MoE 中某专家权重为零时即出现此类退化。
|
|
50
54
|
|
|
51
55
|
## 深入参考
|
|
52
|
-
-
|
|
56
|
+
- 蒸馏稿:`../../references/books/` 暂无专用信息几何蒸馏稿
|
|
53
57
|
- Amari & Nagaoka. *Methods of Information Geometry*. AMS/Oxford, 2000
|
|
54
58
|
- Amari. *Information Geometry and Its Applications*. Springer, 2016
|
|
55
59
|
- Ay, Jost, Le, Schwachhofer. *Information Geometry*. Springer, 2017
|
|
56
|
-
-
|
|
60
|
+
- 关联知识卡:`../probability/fisher-information.md`、`natural-gradient.md`
|
|
61
|
+
|
|
62
|
+
|
|
63
|
+
## 路由扩展
|
|
64
|
+
- 若需要优化应用 → `natural-gradient.md`(Fisher 度量下的自然梯度下降)
|
|
65
|
+
- 若需要一般黎曼度量 → `../differential-geometry/metric-tensor.md`(Fisher 度量是黎曼度量的特例)
|
|
66
|
+
- 若需要局部 KL 分析 → `../probability/kl-divergence.md`(局部 KL 散度等于 Fisher 度量)
|
|
67
|
+
|
|
68
|
+
## 可扩展方向
|
|
69
|
+
- Rao 距离(Rao's distance):Fisher-Rao 度量下的测地距离
|
|
70
|
+
- Fisher-Rao 测地线(Fisher-Rao geodesic):分布空间中的最短路径
|
|
71
|
+
- alpha-联络族(alpha-connection family):Amari 的 alpha-联络
|
|
72
|
+
- 对偶平坦性(dual flatness):e-平坦与 m-平坦结构
|
|
73
|
+
- Chentsov 唯一性定理(Chentsov's uniqueness theorem):Fisher 度量的唯一性
|
|
74
|
+
- 无穷维 Fisher 度量(infinite-dimensional Fisher metric):函数空间上的 Fisher 度量
|
|
75
|
+
- 函数空间 Fisher 度量(Fisher metric in function space):神经网络的 Fisher 度量
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
# Information Geometry Activation Index
|
|
2
|
+
|
|
3
|
+
## Domain Signals
|
|
4
|
+
Activate this domain direction when the problem involves:
|
|
5
|
+
- Distribution family geometry: probability distribution families have intrinsic geometric structure
|
|
6
|
+
- Parameterization-independent optimization: optimization methods should not depend on specific parameterization
|
|
7
|
+
- Statistical model complexity: need to measure the intrinsic complexity of statistical models
|
|
8
|
+
- Distance between distributions: need to define geometric distance in distribution space
|
|
9
|
+
- Natural gradient: gradient direction must account for the geometric structure of parameter space
|
|
10
|
+
|
|
11
|
+
## Core Anchors
|
|
12
|
+
- `natural-gradient.en.md` — Natural gradient
|
|
13
|
+
- `fisher-metric.en.md` — Fisher metric
|
|
14
|
+
|
|
15
|
+
## Extended Concepts
|
|
16
|
+
When core anchors are insufficient, the following concepts may need temporary activation:
|
|
17
|
+
- alpha-divergence: alpha-divergence family
|
|
18
|
+
- Amari-Chentsov tensor: Amari-Chentsov tensor and cubic differential structure
|
|
19
|
+
- dually flat manifold: dually flat manifolds
|
|
20
|
+
- e-connection / m-connection: exponential connection and mixture connection
|
|
21
|
+
- Pythagorean theorem for KL: generalized Pythagorean theorem for KL divergence
|
|
22
|
+
- Bregman divergence: Bregman divergence and convex duality
|
|
23
|
+
- mirror descent as natural gradient: equivalence between mirror descent and natural gradient
|
|
24
|
+
- EM algorithm geometry: geometric interpretation of the EM algorithm
|
|
25
|
+
- variational Bayes geometry: geometric structure of variational Bayes
|
|
26
|
+
- information geometry of neural networks (loss landscape curvature): information geometry of neural networks and loss landscape curvature
|
|
27
|
+
- neural tangent kernel as metric: neural tangent kernel as a metric
|
|
28
|
+
- Fisher-Rao gradient flow: Fisher-Rao gradient flow
|
|
29
|
+
- Wasserstein gradient flow: Wasserstein gradient flow
|
|
30
|
+
|
|
31
|
+
## Reference Book Directions
|
|
32
|
+
- `../../references/books/smooth-manifolds.en.md`: Chapter 13 on Riemannian metrics, providing differential geometry foundations for information geometry
|
|
33
|
+
|
|
34
|
+
## AI Translation Directions
|
|
35
|
+
- natural gradient → parameter-space-aware optimizer / K-FAC / natural policy gradient
|
|
36
|
+
- fisher metric → distribution distance in parameter space / model merging geometry / loss landscape metric
|
|
37
|
+
- α-divergence → generalized variational inference / robust posterior approximation
|
|
38
|
+
- Bregman divergence → mirror descent / online learning updates / exponential family fitting
|
|
39
|
+
- dual flatness → efficient projection in distribution space / EM algorithm geometry
|
|
40
|
+
|
|
41
|
+
## Temporary Activation Rules
|
|
42
|
+
When the problem requires mathematics not in the core anchors:
|
|
43
|
+
1. First check whether extended concepts contain a match
|
|
44
|
+
2. If yes, generate a temporary knowledge card based on the lens
|
|
45
|
+
3. If no, enter the Knowledge Gap Protocol
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
# 信息几何 激活索引 / Information Geometry Activation Index
|
|
2
|
+
|
|
3
|
+
## 领域信号
|
|
4
|
+
当问题涉及以下信号时,激活本领域方向:
|
|
5
|
+
- 分布族几何:概率分布族本身具有几何结构
|
|
6
|
+
- 参数化无关优化:优化方法应不依赖于具体参数化方式
|
|
7
|
+
- 统计模型复杂度:需要度量统计模型的内在复杂度
|
|
8
|
+
- 分布间距离:需要在分布空间中定义几何距离
|
|
9
|
+
- 自然梯度:梯度方向需要考虑参数空间的几何结构
|
|
10
|
+
|
|
11
|
+
## 核心锚点
|
|
12
|
+
- `natural-gradient.md` — 自然梯度
|
|
13
|
+
- `fisher-metric.md` — Fisher 度量
|
|
14
|
+
|
|
15
|
+
## 扩展概念
|
|
16
|
+
当核心锚点不够时,以下概念可能需要临时激活:
|
|
17
|
+
- alpha-divergence:alpha-散度族
|
|
18
|
+
- Amari-Chentsov tensor:Amari-Chentsov 张量与三次微分结构
|
|
19
|
+
- dually flat manifold:对偶平坦流形
|
|
20
|
+
- e-connection / m-connection:指数联络与混合联络
|
|
21
|
+
- Pythagorean theorem for KL:KL 散度的广义勾股定理
|
|
22
|
+
- Bregman divergence:Bregman 散度与凸对偶
|
|
23
|
+
- mirror descent as natural gradient:镜像下降与自然梯度的等价性
|
|
24
|
+
- EM algorithm geometry:EM 算法的几何解释
|
|
25
|
+
- variational Bayes geometry:变分贝叶斯的几何结构
|
|
26
|
+
- information geometry of neural networks(loss landscape curvature):神经网络的信息几何与损失景观曲率
|
|
27
|
+
- neural tangent kernel as metric:神经切线核作为度量
|
|
28
|
+
- Fisher-Rao gradient flow:Fisher-Rao 梯度流
|
|
29
|
+
- Wasserstein gradient flow:Wasserstein 梯度流
|
|
30
|
+
|
|
31
|
+
## 参考书方向
|
|
32
|
+
- `../../references/books/smooth-manifolds.md`:第 13 章黎曼度量,为信息几何提供微分几何基础
|
|
33
|
+
|
|
34
|
+
## AI 翻译方向
|
|
35
|
+
- natural gradient → parameter-space-aware optimizer / K-FAC / natural policy gradient
|
|
36
|
+
- fisher metric → distribution distance in parameter space / model merging geometry / loss landscape metric
|
|
37
|
+
- α-divergence → generalized variational inference / robust posterior approximation
|
|
38
|
+
- Bregman divergence → mirror descent / online learning updates / exponential family fitting
|
|
39
|
+
- dual flatness → efficient projection in distribution space / EM algorithm geometry
|
|
40
|
+
|
|
41
|
+
## 临时激活规则
|
|
42
|
+
当问题需要的数学不在核心锚点中时:
|
|
43
|
+
1. 先检查扩展概念中是否有匹配
|
|
44
|
+
2. 若有,根据透镜生成临时知识卡
|
|
45
|
+
3. 若无,进入 Knowledge Gap Protocol
|
|
@@ -12,7 +12,7 @@ $$\theta_{t+1} = \theta_t - \eta \nabla_\theta \mathcal{L}(\theta)$$
|
|
|
12
12
|
$$\tilde{\nabla} \mathcal{L}(\theta) = \mathcal{I}(\theta)^{-1} \nabla_\theta \mathcal{L}(\theta)$$
|
|
13
13
|
$$\theta_{t+1} = \theta_t - \eta \, \mathcal{I}(\theta)^{-1} \nabla_\theta \mathcal{L}(\theta)$$
|
|
14
14
|
|
|
15
|
-
where $\mathcal{I}(\theta)$ is the Fisher information matrix (see
|
|
15
|
+
where $\mathcal{I}(\theta)$ is the Fisher information matrix (see `../probability/fisher-information.en.md`).
|
|
16
16
|
|
|
17
17
|
**Equivalent Derivation (Constrained Optimization Perspective)**: The natural gradient is the solution to the following constrained optimization problem —
|
|
18
18
|
$$\min_{\Delta\theta} \mathcal{L}(\theta + \Delta\theta) \quad \text{s.t.} \quad D_{KL}(p_\theta \| p_{\theta+\Delta\theta}) \leq \epsilon$$
|
|
@@ -34,21 +34,35 @@ where $A_l = \mathbb{E}[a_l a_l^T]$ (activation covariance) and $B_l = \mathbb{E
|
|
|
34
34
|
- **Natural Gradient in Variational Inference**: For exponential family parameters, the natural gradient equals the difference in expected sufficient statistics, avoiding Fisher matrix inversion
|
|
35
35
|
|
|
36
36
|
## Engineering Feasibility
|
|
37
|
-
- **
|
|
38
|
-
- **
|
|
39
|
-
- **
|
|
40
|
-
- **
|
|
41
|
-
- **
|
|
42
|
-
- **
|
|
43
|
-
- **
|
|
37
|
+
- **D1[~]**: The Kronecker factors of the FIM are dense matrices and can be tensorized; the full FIM cannot
|
|
38
|
+
- **D2[v]**: K-FAC's $A_l^{-1} (\nabla W_l) B_l^{-1}$ is two matrix multiplications, naturally GEMM
|
|
39
|
+
- **D3[~]**: K-FAC adds $O(d_A^2 + d_B^2)$ per-layer covariance estimation + $O(d_A^3 + d_B^3)$ matrix inversion; diagonal approximation is $O(d)$
|
|
40
|
+
- **D4[~]**: Requires additional storage of $A_l$ and $B_l$ per layer ($O(d_A^2 + d_B^2)$); acceptable for LLMs but non-trivial
|
|
41
|
+
- **D5[~]**: Matrix inversion may be unstable in fp16; fp32 or Tikhonov regularization $(A + \epsilon I)^{-1}$ is needed
|
|
42
|
+
- **D6[v]**: Kronecker factors for each layer are computed independently; fully parallel across layers
|
|
43
|
+
- **D8[v]**: Natural gradient updates can be fused into the parameter update kernel
|
|
44
44
|
|
|
45
45
|
## Risks and Failure Conditions
|
|
46
46
|
- **K-FAC's inter-layer independence assumption is overly strong**: It assumes the Fisher information is block-diagonal across layers, ignoring inter-layer correlations. In deep networks, this may underestimate the effective curvature, leading to excessively large steps. Line search or trust-region safeguards are needed.
|
|
47
47
|
- **Burn-in problem for covariance estimation**: In early training, $A_l, B_l$ estimates are inaccurate and the natural gradient direction may be wrong. The standard practice is to warm up with Adam/SGD for the first few hundred steps, then switch to K-FAC.
|
|
48
48
|
|
|
49
49
|
## Further References
|
|
50
|
-
- Distillation draft:
|
|
50
|
+
- Distillation draft: `../../references/books/` — no dedicated information geometry distillation draft at present
|
|
51
51
|
- Amari. *Natural Gradient Works Efficiently in Learning.* Neural Computation, 1998
|
|
52
52
|
- Martens & Grosse. "Optimizing Neural Networks with Kronecker-Factored Approximate Curvature." *ICML*, 2015
|
|
53
53
|
- Schulman et al. "Trust Region Policy Optimization." *ICML*, 2015
|
|
54
|
-
- Related knowledge cards:
|
|
54
|
+
- Related knowledge cards: `../probability/fisher-information.en.md`, `fisher-metric.en.md`
|
|
55
|
+
|
|
56
|
+
|
|
57
|
+
## Routing Extensions
|
|
58
|
+
- If metric definition is needed -> `fisher-metric.en.md` (Fisher metric is the foundation of natural gradient)
|
|
59
|
+
- If a general Riemannian optimization framework is needed -> `../optimization/riemannian-optimization.md` (natural gradient is a special case of Riemannian gradient)
|
|
60
|
+
- If an information-theoretic perspective is needed -> `../probability/fisher-information.en.md` (statistical interpretation of Fisher information)
|
|
61
|
+
|
|
62
|
+
## Extensible Directions
|
|
63
|
+
- Mirror descent as natural gradient: equivalence on dual spaces
|
|
64
|
+
- Amari's alpha-geometry: alpha-connection family
|
|
65
|
+
- Natural policy gradient (RL): natural gradient in reinforcement learning
|
|
66
|
+
- Natural evolution strategies (NES): NES optimizer
|
|
67
|
+
- Practical natural gradient: efficient implementations such as K-FAC, diagonal approximations
|
|
68
|
+
- Adaptive natural gradient: methods for dynamically estimating Fisher information
|
|
@@ -12,7 +12,7 @@ $$\theta_{t+1} = \theta_t - \eta \nabla_\theta \mathcal{L}(\theta)$$
|
|
|
12
12
|
$$\tilde{\nabla} \mathcal{L}(\theta) = \mathcal{I}(\theta)^{-1} \nabla_\theta \mathcal{L}(\theta)$$
|
|
13
13
|
$$\theta_{t+1} = \theta_t - \eta \, \mathcal{I}(\theta)^{-1} \nabla_\theta \mathcal{L}(\theta)$$
|
|
14
14
|
|
|
15
|
-
其中 $\mathcal{I}(\theta)$ 为 Fisher 信息矩阵(详见
|
|
15
|
+
其中 $\mathcal{I}(\theta)$ 为 Fisher 信息矩阵(详见 `../probability/fisher-information.md`)。
|
|
16
16
|
|
|
17
17
|
**等价推导(约束优化视角)**:自然梯度是以下约束优化问题的解——
|
|
18
18
|
$$\min_{\Delta\theta} \mathcal{L}(\theta + \Delta\theta) \quad \text{s.t.} \quad D_{KL}(p_\theta \| p_{\theta+\Delta\theta}) \leq \epsilon$$
|
|
@@ -34,21 +34,35 @@ $$\mathcal{I}_l \approx A_l \otimes B_l$$
|
|
|
34
34
|
- **变分推断中的自然梯度**:指数族参数的自然梯度 = 充分统计量的期望差,避免 Fisher 矩阵求逆
|
|
35
35
|
|
|
36
36
|
## 工程可行性
|
|
37
|
-
-
|
|
38
|
-
-
|
|
39
|
-
-
|
|
40
|
-
-
|
|
41
|
-
-
|
|
42
|
-
-
|
|
43
|
-
-
|
|
37
|
+
- **D1[~]**:FIM 的 Kronecker 因子为稠密矩阵,可张量化;完整 FIM 不可
|
|
38
|
+
- **D2[v]**:K-FAC 的 $A_l^{-1} (\nabla W_l) B_l^{-1}$ 是两次矩阵乘,天然 GEMM
|
|
39
|
+
- **D3[~]**:K-FAC 每层额外 $O(d_A^2 + d_B^2)$ 协方差估计 + $O(d_A^3 + d_B^3)$ 矩阵逆;对角近似 $O(d)$
|
|
40
|
+
- **D4[~]**:需额外存储每层的 $A_l$ 和 $B_l$($O(d_A^2 + d_B^2)$),对 LLM 可接受但非零
|
|
41
|
+
- **D5[~]**:矩阵求逆在 fp16 下可能不稳定,需 fp32 或 Tikhonov 正则化 $(A + \epsilon I)^{-1}$
|
|
42
|
+
- **D6[v]**:各层 Kronecker 因子独立计算,层间完全并行
|
|
43
|
+
- **D8[v]**:自然梯度更新可融入参数更新 kernel
|
|
44
44
|
|
|
45
45
|
## 风险与失效条件
|
|
46
46
|
- **K-FAC 的层间独立性假设过强**:假设各层 Fisher 信息块对角,忽略层间相关性。在深网络中可能低估有效曲率,导致步长过大。需搭配线搜索或 trust-region 安全机制。
|
|
47
47
|
- **协方差估计的 burn-in 问题**:训练初期 $A_l, B_l$ 估计不准确,自然梯度方向可能错误。标准做法是前几百步用 Adam/SGD warmup,再切换到 K-FAC。
|
|
48
48
|
|
|
49
49
|
## 深入参考
|
|
50
|
-
-
|
|
50
|
+
- 蒸馏稿:`../../references/books/` 暂无专用信息几何蒸馏稿
|
|
51
51
|
- Amari. *Natural Gradient Works Efficiently in Learning.* Neural Computation, 1998
|
|
52
52
|
- Martens & Grosse. "Optimizing Neural Networks with Kronecker-Factored Approximate Curvature." *ICML*, 2015
|
|
53
53
|
- Schulman et al. "Trust Region Policy Optimization." *ICML*, 2015
|
|
54
|
-
-
|
|
54
|
+
- 关联知识卡:`../probability/fisher-information.md`、`fisher-metric.md`
|
|
55
|
+
|
|
56
|
+
|
|
57
|
+
## 路由扩展
|
|
58
|
+
- 若需要度量的定义 → `fisher-metric.md`(Fisher 度量是自然梯度的基础)
|
|
59
|
+
- 若需要一般黎曼优化框架 → `../optimization/riemannian-optimization.md`(自然梯度是黎曼梯度的特例)
|
|
60
|
+
- 若需要信息论视角 → `../probability/fisher-information.md`(Fisher 信息的统计解释)
|
|
61
|
+
|
|
62
|
+
## 可扩展方向
|
|
63
|
+
- 镜像下降即自然梯度(mirror descent as natural gradient):对偶空间上的等价性
|
|
64
|
+
- Amari 的 alpha-几何(Amari's alpha-geometry):alpha-联络族
|
|
65
|
+
- 自然策略梯度(natural policy gradient / RL):强化学习中的自然梯度
|
|
66
|
+
- 自然进化策略(natural evolution strategies):NES 优化器
|
|
67
|
+
- 实用自然梯度(practical natural gradient):K-FAC, 对角近似等高效实现
|
|
68
|
+
- 自适应自然梯度(adaptive natural gradient):动态估计 Fisher 信息的方法
|