捉迷藏:Transformer 对称性掩盖锐度,黎曼几何揭示其真相
Hide & Seek: Transformer Symmetries Obscure Sharpness & Riemannian Geometry Finds It
AI总结:
本文针对 Transformer 对称性导致现有锐度度量失效的问题,提出在商流形上基于黎曼测地球定义测地锐度,并证明纳入高阶项能恢复其与泛化的强相关性。
摘要:
锐度概念已成功应用于 MLP 和 CNN 等传统架构以预测其泛化能力。然而对于 Transformer,近期工作报告平坦性与泛化之间的相关性较弱。我们认为现有锐度度量对 Transformer 失效,因为其注意力机制具有更丰富的对称性,这些对称性在参数空间中诱导出使网络或其损失保持不变的若干方向。我们主张锐度必须充分考虑这些对称性,因此我们在一个商流形上重新定义锐度,该商流形通过将 Transformer 对称性商掉而得到,从而消除其歧义。借助黎曼几何工具,我们提出了一个完全通用的锐度概念,以对称性校正后的商流形上的测地球来刻画。在实践中,我们需要对测地线进行近似。做到一阶近似可得到现有的自适应锐度度量,我们证明纳入高阶项对于恢复与泛化的相关性至关重要。我们给出了在合成数据上的对角网络结果,并表明我们的测地锐度在文本和图像分类任务上为真实世界 Transformer 揭示了强相关性。
英文摘要:
The concept of sharpness has been successfully applied to traditional architectures like MLPs and CNNs to predict their generalization. For transformers, however, recent work reported weak correlation between flatness and generalization. We argue that existing sharpness measures fail for transformers, because they have much richer symmetries in their attention mechanism that induce directions in parameter space along which the network or its loss remain identical. We posit that sharpness must account fully for these symmetries, and thus we redefine it on a quotient manifold that results from quotienting out the transformer symmetries, thereby removing their ambiguities. Leveraging tools from Riemannian geometry, we propose a fully general notion of sharpness, in terms of a geodesic ball on the symmetry-corrected quotient manifold. In practice, we need to resort to approximating the geodesics. Doing so up to first order yields existing adaptive sharpness measures, and we demonstrate that including higher-order terms is crucial to recover correlation with generalization. We present results on diagonal networks with synthetic data, and show that our geodesic sharpness reveals strong correlation for real-world transformers on both text and image classification tasks.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。