中文

关注注意力分布:Transformer 的新型局部 Lipschitz 界

机器学习 2025-07-11 v1 数值分析 数值分析

摘要

我们为 Transformer 的自注意力模块提出了一种新型的局部 Lipschitz 界。该界基于 softmax 函数谱范数的一个精化的闭式表达式。所得出的界不仅比现有技术更为准确,还揭示了 Lipschitz 常数对注意力分数图的依赖关系。基于这些新发现,我们从 Lipschitz 常数的角度解释了注意力图内部的分布如何影响鲁棒性。我们还引入了一种名为 JaSMin(Jacobian Softmax norm Minimization,雅可比 softmax 范数最小化)的新型轻量级正则化项,它增强了 Transformer 的鲁棒性并降低了整个网络的局部 Lipschitz 常数。

关键词

引用

@article{arxiv.2507.07814,
  title  = {Pay Attention to Attention Distribution: A New Local Lipschitz Bound for Transformers},
  author = {Nikolay Yudin and Alexander Gaponov and Sergei Kudriashov and Maxim Rakhuba},
  journal= {arXiv preprint arXiv:2507.07814},
  year   = {2025}
}