arXiv:2411.03493cs.LGcs.CL2024-11ICML被引 3

改进注意力梯度传播,提升大模型训练效率

LASER: Attention with Exponential Transformation

  • 用指数变换替代softmax,增强梯度信号
  • 在77亿参数语言模型上提升1.44%下游性能
  • 跨文本、视觉、语音任务均表现更优

Transformer在序列任务中表现优异,主要得益于其通过softmax点积注意力从序列任意位置获取信息的能力。我们分析了注意力机制中softmax操作的反向传播梯度,发现梯度常过小,导致注意力前参数学习效率低下。为此,提出新型注意力机制LASER,理论上可传递更强梯度信号。实验证明,LASER仅需微小修改即可集成至现有实现中,在自回归大语言模型(最大77亿参数)上,下游评估平均提升1.44%,微调性能提升1.65%。此外,其在多种任务上均有泛化优势:如ViT在ImageNet、Conformer在Librispeech语音识别、以及22亿参数BERT。

原文摘要 · Abstract (English)

Transformers have had tremendous impact for several sequence related tasks, largely due to their ability to retrieve from any part of the sequence via softmax based dot-product attention. This mechanism plays a crucial role in Transformer's performance. We analyze the gradients backpropagated through the softmax operation in the attention mechanism and observe that these gradients can often be small. This poor gradient signal backpropagation can lead to inefficient learning of parameters preceeding the attention operations. To this end, we introduce a new attention mechanism called LASER, which we analytically show to admit a larger gradient signal. We show that LASER attention can be implemented by making small modifications to existing attention implementations. We conduct experiments on autoregressive large language models (LLMs) with upto 7.7 billion parameters with an average improvement of upto 1.44% over standard attention on downstream evaluations and 1.65% finetuning improvements. Additionally, LASER demonstrates generalization performance improvement across a variety of tasks (vision, text and speech):Vision Transformer (ViT) on Imagenet, Conformer on the Librispeech speech-to-text and BERT with 2.2 billion parameters.

注意力机制大模型训练梯度优化

Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。