arXivDaily arXiv每日学术速递 周一至周五更新
arXiv周末暂无论文更新,休息一下吧,周末愉快~~
arXiv 2502.06785cs.LG
收藏

DeepCrossAttention:增强 Transformer 残差连接

DeepCrossAttention: Supercharging Transformer Residual Connections

Department of Computer Science, University of California, Irvine, USA(加州大学尔湾分校计算机科学系);Marshall School of Business, University of Southern California, Los Angeles, USA(南加州大学马歇尔商学院);Google Research, New York, USA(谷歌研究)

Mike Heddes, Adel Javanmard, Kyriakos Axiotis, Gang Fu, MohammadHossein Bateni, Vahab Mirrokni

AI总结:

本文提出 DeepCrossAttention(DCA),通过输入依赖的动态权重和深度交叉注意力改进 Transformer 残差连接,在几乎不增加参数的情况下提升语言建模效率,并给出理论权衡条件。

摘要:

Transformer 网络已在多个不同领域取得显著成功,这得益于包括残差连接在内的多种架构创新。然而,传统残差连接只是简单地将先前各层的输出相加,可能会稀释关键信息。本工作提出 DeepCrossAttention(DCA),这是一种增强 Transformer 中残差学习的方法。DCA 采用可学习的、依赖于输入的权重来动态组合各层输出,使模型能够选择性地关注任意先前层中最相关的信息。此外,DCA 融入了深度交叉注意力,允许不同深度的层之间进行更丰富的交互。我们的语言建模实验表明,在给定训练时间下,DCA 实现了更低的困惑度。此外,DCA 能以最高 3 倍的速度获得相同的模型质量,同时只增加可忽略不计的参数量。理论分析证实,当各层秩的总和与环境维度之比低于某个临界阈值时,DCA 在准确率与模型规模之间提供了更优的权衡。

英文摘要:

Transformer networks have achieved remarkable success across diverse domains, leveraging a variety of architectural innovations, including residual connections. However, traditional residual connections, which simply sum the outputs of previous layers, can dilute crucial information. This work introduces DeepCrossAttention (DCA), an approach that enhances residual learning in transformers. DCA employs learnable, input-dependent weights to dynamically combine layer outputs, enabling the model to selectively focus on the most relevant information in any of the previous layers. Furthermore, DCA incorporates depth-wise cross-attention, allowing for richer interactions between layers at different depths. Our language modeling experiments show that DCA achieves improved perplexity for a given training time. Moreover, DCA obtains the same model quality up to 3x faster while adding a negligible number of parameters. Theoretical analysis confirms that DCA provides an improved trade-off between accuracy and model size when the ratio of collective layer ranks to the ambient dimension falls below a critical threshold.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑