用三维空间分析神经网络,发现残差与注意力能力相当。
Low-dimensional topology of deep neural networks

- 限制每层宽度为3,用拓扑不变量追踪网络变化
- 残差和注意力在改变链接数上效果相当,强于单调激活的前馈网络
- 非单调激活可让前馈网络达到残差与注意力水平
我们研究了前馈网络、ResNet 和 Transformer 等层级模型,将每层宽度限制在 $d = 3$,即以 $bR^3$ 作为表示空间。这使我们能够追踪神经网络在各层中对低维拓扑不变量的影响。通常,高维空间会简化甚至消除任何拓扑结构(如任意纽结在 $bR^4$ 中等价于平凡纽结)。通过限制在 $bR^3$,我们不仅隔离了激活函数和深度对宽度的影响,也获得了便于可视化的空间。本文聚焦于链接数,暂不涉及链群、米尔诺 $arμ$-不变量、纽结类型等。我们提供了完整证明和实验,得出以下结论:在改变链接数的能力上,ResNet 的层跳接机制与 Transformer 的注意力机制相当;两者均强于具有单调激活的前馈网络,后者又强于可逆与流式模型;但将单调激活替换为非单调激活后,前馈网络的表达能力提升至与 ResNet 及 Transformer 同一水平。这些结果表明,低维拓扑可为人工智能架构设计提供指导。我们还将结果从 $d = 3$ 推广至任意 $d > 3$。
原文摘要 · Abstract (English)
We study layered models, including feedforward networks, ResNets, and transformers, by limiting each layer to a width of $d = 3$, i.e., $\mathbb{R}^3$ as representation space. This allows us to track how a neural network changes low-dimensional topological invariants through its layers. Just about any topological structure may be simplified or even trivialized by simply increasing dimension; e.g., any knot is equivalent to an unknot in $\mathbb{R}^4$. By restricting to $\mathbb{R}^3$, we not only isolate the effects of activation and depth from that of width, we work in a space that lends itself to easy visualization. We focus on linking number here, deferring other invariants like link groups, Milnor's $\barμ$-invariants, knot types, ambient cobordisms, to a sequel. We provide full proofs and empirical experiments to justify the following insights: When measured by their power to effect changes in linking numbers, the layer-skipping feature in ResNets is as powerful as the attention mechanism in transformers; both ResNets and transformers are strictly more powerful than feedforward neural networks with monotonic activations, which are in turn more powerful than invertible and flow-based models; but replacing monotonic activation with a nonmonotonic one elevates a feedforward network into the same expressivity class as ResNets and transformers. These results suggest that low-dimensional topology can be a useful tool to guide designs of AI architectures. We also generalize our results from $d = 3$ to arbitrary $d > 3$.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。