arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2102.08606cs.LGstat.ML
收藏

质心Transformers:学习注意力抽象

Centroid Transformers: Learning to Abstract with Attention

UT Austin(德克萨斯大学奥斯汀分校)

Lemeng Wu, Xingchao Liu, Qiang Liu

摘要:

自注意作为Transformers的关键模块,是从输入中提取特征的有力机制。本质上,自我注意所做的就是推断输入元素之间的成对关系,并通过在输入对之间传播信息来修改输入。因此,它将输入映射到N个输出,并转换二次$O(N^2)$内存和时间复杂度。我们提出了质心注意力,自我注意力的一种推广,将N个输入映射到M个输出$(M\leq N)$,这样输入中的关键信息就被总结在较少数量的输出(称为质心)中。我们设计的质心注意力摊销的梯度下降更新规则的聚类目标函数的输入,这揭示了一个潜在的注意力和聚类之间的联系。通过压缩质心的输入,我们提取了对预测有用的关键信息,并减少了注意力模块和后续层的计算。我们将我们的方法应用到各种应用中,包括抽象文本摘要,3D视觉和图像处理。实验结果表明,我们的方法在标准Transformers的有效性。

英文摘要:

Self-attention, as the key block of transformers, is a powerful mechanism for extracting features from the inputs. In essence, what self-attention does is to infer the pairwise relations between the elements of the inputs, and modify the inputs by propagating information between input pairs. As a result, it maps inputs to N outputs and casts a quadratic $O(N^2)$ memory and time complexity. We propose centroid attention, a generalization of self-attention that maps N inputs to M outputs $(M\leq N)$, such that the key information in the inputs are summarized in the smaller number of outputs (called centroids). We design centroid attention by amortizing the gradient descent update rule of a clustering objective function on the inputs, which reveals an underlying connection between attention and clustering. By compressing the inputs to the centroids, we extract the key information useful for prediction and also reduce the computation of the attention module and the subsequent layers. We apply our method to various applications, including abstractive text summarization, 3D vision, and image processing. Empirical results demonstrate the effectiveness of our method over the standard transformers.

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

↑