# 等变神经网络

等变神经网络是这样一种网络：当输入被变换时，其输出以可预测的方式随之变换。对群元素 g，f 在变换后输入上的输出等于变换后的输出，即 \( f(D_{X}(g) \cdot x) = D_{Y}(g) \cdot f(x) \)，其中 \( D_{X} \) 与 \( D_{Y} \) 分别是 g 作用于输入空间与输出空间的表示。<sup>[1](https://doi.org/10.48550/arxiv.2207.09453)</sup> 不变网络是其特例：输出在每一种变换下都保持不变。例如 NequIP 产生的势能对平移、旋转和反射不变，而它的特征是随分子一同旋转和反射的几何张量。<sup>[2](https://www.nature.com/articles/s41467-022-29939-5)</sup> 只要数据具有已知的对称性——如三维原子体系和点云——这一保证就很重要，因为网络不必浪费容量去在每一个朝向上重新学习同一套物理。

| 关键事实 | 内容 |
|---|---|
| 定义条件 | 对 G 中所有 \( g \)，\( f(D_{X}(g) \cdot x) = D_{Y}(g) \cdot f(x) \)；等变函数的复合仍为等变函数 <sup>[1](https://doi.org/10.48550/arxiv.2207.09453)</sup> |
| 理论基础 | 对紧群而言，等变性迫使每一层实现一种广义卷积（孔多尔与特里维迪，ICML 2018）<sup>[3](https://proceedings.mlr.press/v80/kondor18a/kondor18a.pdf)</sup> |
| 数据效率 | NequIP 以最多少三个数量级的训练数据，达到了当时原子间势的最先进精度 <sup>[2](https://www.nature.com/articles/s41467-022-29939-5)</sup> |
| 速度 | MACE 的 \( L = 0 \) 模型比先前模型快近 10 倍；其 \( L = 2 \) 模型比其他等变 MPNN 快约四倍 <sup>[4](https://doi.org/10.48550/arxiv.2206.07697)</sup> |
| 成本上限 | SO(3) 卷积按 \( l_{\max}^{6} \) 增长，每个构象的耗时可比不变模型高两个数量级 <sup>[5](https://www.nature.com/articles/s41467-024-50620-6)</sup> |
| 与数据增强对比 | 在同等算力下，等变 Transformer 的损失约低一半，但训练轮数足够多时数据增强可以补上这一差距 <sup>[6](https://arxiv.org/abs/2410.23179v1)</sup> |
| 主要库 | e3nn <sup>[1](https://doi.org/10.48550/arxiv.2207.09453)</sup> 与 escnn <sup>[7](https://github.com/QUVA-Lab/escnn)</sup> |

## 工作原理

等变性是通过把每一层的权重约束到由所选群固定的子空间来强制实现的。输入表示为 \( \rho_{\text{in}} \)、输出表示为 \( \rho_{\text{out}} \) 的线性层，通过把 \( W \) 限制在等变子空间上，保证对所有 \( g \) 都有 \( W \rho_{\text{in}}(g) v = \rho_{\text{out}}(g) W v \)。<sup>[8](https://quva-lab.github.io/escnn/api/escnn.nn.html)</sup> 对卷积而言，核约束是线性的，因此等变核构成一个由基描述的向量空间；等变性让径向部分保持自由，只约束角向部分，后者在二维由圆谐函数、在三维由球谐函数构成。<sup>[9](https://quva-lab.github.io/escnn/api/escnn.kernels.html)</sup> 孔多尔与特里维迪证明，在自然约束下，这种卷积结构对紧群作用的等变性而言不仅是充分的，而且是必要的。<sup>[3](https://proceedings.mlr.press/v80/kondor18a/kondor18a.pdf)</sup>

特征按不可约表示（irreps）分类，后者是紧群任意有限维表示分解成的基本构件；克莱布施–戈丹变换（耦合角动量表示的数学系数）可以充当等变非线性的角色，它把两个不可约表示耦合起来。<sup>[10](https://www.pnas.org/doi/10.1073/pnas.2415656122)</sup> 球谐函数 \( Y^{l} \) 构成一族 \( 2l+1 \) 个函数，它们按同阶的不可约表示变换。<sup>[1](https://doi.org/10.48550/arxiv.2207.09453)</sup> 张量积就是等变乘法：\( (D x) \otimes (D y) = D (x \otimes y) \)；例如不可约表示 2x1o 与 0e + 1e 的 FullTensorProduct 得到 2x0o + 4x1o + 2x2o，这是从可约乘积到不可约表示的一次基变换。<sup>[11](https://docs.e3nn.org/en/latest/api/o3/o3%5Ftp.html)</sup> 在 NequIP 风格的层中，卷积滤波器是可学习径向函数与球谐函数的乘积，张量积则通过与克莱布施–戈丹系数的缩并来计算。<sup>[2](https://www.nature.com/articles/s41467-022-29939-5)</sup>

## 实现方式

构建网络首先要选择群与场类型：escnn 为平面与三维等距群 E(2) 和 E(3) 提供 gspaces，包括反射、二面体群 D_N、循环群 C_N、SO(2)、O(2)、SO(3) 和 O(3) 等子群，并用 maximum_frequency 控制带限子空间。<sup>[7](https://github.com/QUVA-Lab/escnn)</sup><sup> • </sup><sup>[9](https://quva-lab.github.io/escnn/api/escnn.kernels.html)</sup> 特征被封装在 GeometricTensor 对象中，后者携带其变换律，并在运行时进行类型检查。<sup>[7](https://github.com/QUVA-Lab/escnn)</sup>

在 e3nn 中，使用者选定输入与输出的不可约表示以及一个张量积层：FullyConnectedTensorProduct 生成 \( |l_1 - l_2| \leq l_{\text{out}} \leq l_1 + l_2 \) 所允许的全部路径，并对路径做可学习的加权求和；FullTensorProduct 计算不加权的乘积；ElementwiseTensorProduct 配对相匹配的不可约表示；TensorSquare 对一个表示求平方。<sup>[11](https://docs.e3nn.org/en/latest/api/o3/o3%5Ftp.html)</sup> 一个典型的等变点卷积实现为

\[ f'_i = \frac{1}{\sqrt{z}} \sum_{j \in \partial(i)} f_j \; \otimes\!(h(\|x_{ij}\|)) \; Y(x_{ij} / \|x_{ij}\|) \]

其中 z 是平均节点度，h 是把距离嵌入映射为张量积权重的小型网络，Y 是球谐函数。<sup>[12](https://docs.e3nn.org/en/stable/guide/convolution.html)</sup> 等变性通过数值方式验证：在层之前旋转输入、在层之后旋转输出，并用 rtol = 1e-4、atol = 1e-4 的 torch.allclose 检查。<sup>[12](https://docs.e3nn.org/en/stable/guide/convolution.html)</sup>

## 起源

科恩与韦林的 G-CNN 论文（2016，arXiv）提出了群等变卷积网络，这是 CNN 的一种推广，通过利用对称性来降低样本复杂度；G-卷积以高得多的程度共享权重，在不增加参数量的前提下提升表达能力，并在 CIFAR10 和旋转 MNIST 上取得了当时最先进的结果。<sup>[13](https://doi.org/10.48550/arxiv.1602.07576)</sup> 同一批作者的可操控CNN（2016，arXiv）给出了可操控表示的一般理论，使计算成本与群的大小解耦；G-CNN 就是带正则胶囊的可操控 CNN，而 H = D4 的可操控滤波器组对参数的使用强度是普通卷积层的 8 倍。<sup>[14](https://doi.org/10.48550/arxiv.1612.08498)</sup>

三维领域的先驱工作来自 Harmonic Networks（沃勒尔及其同事，2016，arXiv），它用圆谐函数实现了二维旋转等变性；以及 SchNet（许特及其同事，2017），这是一个使用连续卷积的旋转不变网络；张量场网络（托马斯及其同事，2018，arXiv）直接建立在这两者之上。<sup>[15](https://doi.org/10.48550/arxiv.1612.04642)</sup><sup> • </sup><sup>[16](https://doi.org/10.48550/arxiv.1712.06113)</sup><sup> • </sup><sup>[17](https://doi.org/10.48550/arxiv.1802.08219)</sup> 孔多尔与特里维迪（2018）证明了紧群下“等变性蕴含卷积”的定理 <sup>[3](https://proceedings.mlr.press/v80/kondor18a/kondor18a.pdf)</sup>，科恩、盖格与魏勒（2018，arXiv）把等变 CNN 推广到齐性空间 <sup>[18](https://doi.org/10.48550/arxiv.1811.02017)</sup>，魏勒及其同事（2018，arXiv）为体数据发展了三维可操控 CNN。<sup>[19](https://doi.org/10.48550/arxiv.1807.02547)</sup> e3nn 库的论文由 盖格与施密特（2022，arXiv）所著。<sup>[1](https://doi.org/10.48550/arxiv.2207.09453)</sup>

## 变体

面向三维原子体系的几何 GNN 通常被分为四类：不变网络、笛卡尔基下的等变网络、球基下的等变网络，以及无约束网络。<sup>[20](https://ar5iv.labs.arxiv.org/html/2312.07511)</sup>

SE(3)-[Transformer](https://www.edgepedia.org/zh/transformer)（富克斯、沃勒尔、费舍尔与韦林，2020，arXiv）是一种用于三维点云与图的自注意力变体，具有不变注意力权重与等变值消息；邻域把注意力成本从关于点数的二次降为线性。<sup>[21](https://doi.org/10.48550/arxiv.2006.10503)</sup> EGNN（萨托拉斯、胡格布姆与韦林，2021）对旋转、平移、反射和置换等变，同时避免在中间层使用昂贵的高阶表示或球谐函数，且不限于三维。<sup>[22](https://proceedings.mlr.press/v139/satorras21a/satorras21a.pdf)</sup> NequIP（巴茨纳及其同事，2022，《自然·通讯》）把等变运算与原子图上的消息传递结合起来，在几何张量上使用 E(3) 等变卷积，而非在标量上使用不变卷积。<sup>[2](https://www.nature.com/articles/s41467-022-29939-5)</sup><sup> • </sup><sup>[23](https://www.nature.com/articles/s42256-024-00956-x)</sup> MACE（巴塔蒂亚、科瓦奇、西姆、奥特纳与昌尼，2022，arXiv）在张量分解的原子簇展开层堆叠中，使用更高体序（四体）的等变消息。<sup>[4](https://doi.org/10.48550/arxiv.2206.07697)</sup><sup> • </sup><sup>[23](https://www.nature.com/articles/s42256-024-00956-x)</sup> Allegro（穆萨埃利安及其同事，2023，《自然·通讯》）为大规模原子动力学学习局部等变表示。<sup>[24](https://doi.org/10.1038/s41467-023-36329-y)</sup>

## 应用

[力场](https://www.edgepedia.org/zh/force-field-chemistry)学习是等变网络最早流行起来的领域之一 <sup>[10](https://www.pnas.org/doi/10.1073/pnas.2415656122)</sup>：NequIP 在多个数据集上把当时的最先进精度提升了约一倍 <sup>[23](https://www.nature.com/articles/s42256-024-00956-x)</sup>，同时所需训练数据最多少三个数量级。<sup>[2](https://www.nature.com/articles/s41467-022-29939-5)</sup> SE(3)-Transformer 在 N 体模拟、ScanObjectNN 和 QM9 上，同时胜过非等变注意力基线与不带注意力的等变模型。<sup>[21](https://doi.org/10.48550/arxiv.2006.10503)</sup> 几何 GNN 也是蛋白质结构预测、蛋白质设计与材料发现背后的核心架构。<sup>[20](https://ar5iv.labs.arxiv.org/html/2312.07511)</sup>

## 局限与替代方案

主要成本来自克莱布施–戈丹张量积。SO(3) 卷积的计算成本随角分辨率 \( l_{\max} \) 的六次方增长，与不变模型相比，每个构象的预测时间最多可增加两个数量级。<sup>[5](https://www.nature.com/articles/s41467-024-50620-6)</sup> CG 乘积基本上是等变网络中标准工具集之外的唯一运算，而把它实现为稠密张量积加矩阵乘法通常并无计算优势，这正是专用库 e3nn 与 GElib 的动机所在 <sup>[10](https://www.pnas.org/doi/10.1073/pnas.2415656122)</sup>；MACE 只在第二层、在节点而非边上计算一次张量积，以此限制成本。<sup>[4](https://doi.org/10.48550/arxiv.2206.07697)</sup> 处理非紧群仍是未解决的理论问题 <sup>[10](https://www.pnas.org/doi/10.1073/pnas.2415656122)</sup>，而离散网格卷积的连续等变性并不完美，可通过充分带限的滤波器加以约束。<sup>[8](https://quva-lab.github.io/escnn/api/escnn.nn.html)</sup>

与替代方案相比：SchNet 这类基于不变距离的 GNN 无法区分成对距离相同但键角不同的体系。<sup>[20](https://ar5iv.labs.arxiv.org/html/2312.07511)</sup> 在一个 E(3) 对称基准上，同等算力预算下等变 Transformer 的损失比基线 Transformer 约低一半，但训练轮数足够多时，用数据增强训练的非等变模型表现同样好，而近来的蛋白质折叠与构象生成工作选择了带数据增强的非等变模型。<sup>[6](https://arxiv.org/abs/2410.23179v1)</sup> 在不需要精确对称性的地方，松弛群卷积可以发现对称性破缺。<sup>[25](https://doi.org/10.48550/arxiv.2310.02299)</sup> [效率](https://www.edgepedia.org/zh/efficiency)方面的工作直接针对瓶颈：SO3krates 用欧氏自注意力取代张量积，比等变 MPNN 最多快约 30 倍，把一次约 3000 万次力评估的势能面探索从超过一个月缩短到 2.5 天。<sup>[5](https://www.nature.com/articles/s41467-024-50620-6)</sup>

## References

1. [Geiger, Mario, Smidt, Tess (2022). e3nn: Euclidean Neural Networks. arXiv (Cornell University).](https://doi.org/10.48550/arxiv.2207.09453)
2. [E(3)-equivariant graph neural networks for data-efficient and accurate interatomic potentials (NequIP)](https://www.nature.com/articles/s41467-022-29939-5)
3. [On the Generalization of Equivariance and Convolution in Neural Networks to the Action of Compact Groups (ICML 2018)](https://proceedings.mlr.press/v80/kondor18a/kondor18a.pdf)
4. [Batatia, Ilyes and colleagues (2022). MACE: Higher Order Equivariant Message Passing Neural Networks for Fast and Accurate Force Fields. arXiv (Cornell University).](https://doi.org/10.48550/arxiv.2206.07697)
5. [A Euclidean transformer for fast and stable machine learned force fields (SO3krates)](https://www.nature.com/articles/s41467-024-50620-6)
6. [Does equivariance matter at scale?](https://arxiv.org/abs/2410.23179v1)
7. [QUVA-Lab/escnn: Equivariant Steerable CNNs library (GitHub README)](https://github.com/QUVA-Lab/escnn)
8. [escnn.nn API documentation](https://quva-lab.github.io/escnn/api/escnn.nn.html)
9. [escnn.kernels API documentation](https://quva-lab.github.io/escnn/api/escnn.kernels.html)
10. [The principles behind equivariant neural networks for physics and chemistry (PNAS Perspective)](https://www.pnas.org/doi/10.1073/pnas.2415656122)
11. [e3nn API documentation: Tensor Product (o3.tp)](https://docs.e3nn.org/en/latest/api/o3/o3%5Ftp.html)
12. [e3nn User Guide: Convolution](https://docs.e3nn.org/en/stable/guide/convolution.html)
13. [Cohen, Taco S., Welling, Max (2016). Group Equivariant Convolutional Networks. arXiv (Cornell University).](https://doi.org/10.48550/arxiv.1602.07576)
14. [Cohen, Taco S., Welling, Max (2016). Steerable CNNs. arXiv (Cornell University).](https://doi.org/10.48550/arxiv.1612.08498)
15. [Worrall, Daniel E. and colleagues (2016). Harmonic Networks: Deep Translation and Rotation Equivariance. arXiv (Cornell University).](https://doi.org/10.48550/arxiv.1612.04642)
16. [Schütt, Kristof T. and colleagues (2017). SchNet - a deep learning architecture for molecules and materials. MPG.PuRe (Max Planck Society).](https://doi.org/10.48550/arxiv.1712.06113)
17. [Thomas, Nathaniel and colleagues (2018). Tensor field networks: Rotation- and translation-equivariant neural networks for 3D point clouds. arXiv (Cornell University).](https://doi.org/10.48550/arxiv.1802.08219)
18. [Cohen, Taco, Geiger, Mario, Weiler, Maurice (2018). A General Theory of Equivariant CNNs on Homogeneous Spaces. arXiv (Cornell University).](https://doi.org/10.48550/arxiv.1811.02017)
19. [Weiler, Maurice and colleagues (2018). 3D Steerable CNNs: Learning Rotationally Equivariant Features in Volumetric Data. arXiv (Cornell University).](https://doi.org/10.48550/arxiv.1807.02547)
20. [A Hitchhiker's Guide to Geometric GNNs for 3D Atomic Systems](https://ar5iv.labs.arxiv.org/html/2312.07511)
21. [Fuchs, Fabian B. and colleagues (2020). SE(3)-Transformers: 3D Roto-Translation Equivariant Attention Networks. arXiv (Cornell University).](https://doi.org/10.48550/arxiv.2006.10503)
22. [E(n) Equivariant Graph Neural Networks (EGNN)](https://proceedings.mlr.press/v139/satorras21a/satorras21a.pdf)
23. [The design space of E(3)-equivariant atom-centred interatomic potentials (Multi-ACE)](https://www.nature.com/articles/s42256-024-00956-x)
24. [Albert Musaelian and colleagues (2023). Learning local equivariant representations for large-scale atomistic dynamics. Nature Communications.](https://doi.org/10.1038/s41467-023-36329-y)
25. [Wang, Rui and colleagues (2023). Discovering Symmetry Breaking in Physical Systems with Relaxed Group Convolution. arXiv (Cornell University).](https://doi.org/10.48550/arxiv.2310.02299)

---
*Initially written Sep 29, 2026 · Edited: Oct 15, 2026; Oct 21, 2026*

Topic: 技术与人造世界 › 计算技术与数字系统 › 人工智能与数据 › 机器学习与神经计算 › 神经网络与深度学习 › 标题：A至H

Copyright 2026 Edgepedia

License: Edgepedia Community License 1.0, https://www.edgepedia.org/edgepedia/license

Source: https://www.edgepedia.org/zh/equivariant-neural-network

English original: https://www.edgepedia.org/equivariant-neural-network
