Attention mechanisms have achieved significant empirical success in multiple fields, but their underlying optimization objectives remain unclear yet. Moreover, the quadratic complexity of self-attention has become increasingly prohibitive. Although interpretability and efficiency are two mutually reinforcing pursuits, prior work typically investigates them separately. In this paper, we propose a unified optimization objective that derives inherently interpretable and efficient attention mechanisms through algorithm unrolling. Precisely, we construct a gradient step of the proposed objective with a set of forward-pass operations of our \emph{Contract-and-Broadcast Self-Attention} (CBSA), which compresses input tokens towards low-dimensional structures by contracting a few representatives of them. This novel mechanism can not only scale linearly by fixing the number of representatives, but also covers the instantiations of varied attention mechanisms when using different sets of representatives. We conduct extensive experiments to demonstrate comparable performance and superior advantages over black-box attention mechanisms on visual tasks. Our work sheds light on the integration of interpretability and efficiency, as well as the unified formula of attention mechanisms.


翻译:注意力机制已在多个领域取得显著的实证成功,但其底层优化目标仍不明确。此外,自注意力机制的二次复杂度日益成为计算瓶颈。尽管可解释性与效率是两项相互促进的研究目标,先前工作通常将它们分开探讨。本文提出一个统一的优化目标,通过算法展开推导出本质可解释且高效的注意力机制。具体而言,我们通过一组前向传播操作构建了该目标的梯度步进,即我们的“压缩与广播自注意力”(CBSA)机制,该机制通过压缩输入令牌中少数代表向量,将其向低维结构压缩。这一新颖机制不仅能通过固定代表数量实现线性复杂度,还能在使用不同代表集合时覆盖多种注意力机制的实例化形式。我们通过大量实验证明,在视觉任务上,该机制与黑盒注意力机制性能相当且具有显著优势。本研究为可解释性与效率的融合以及注意力机制的统一形式化提供了新的视角。

0
下载
关闭预览

相关内容

Attention机制最早是在视觉图像领域提出来的,但是真正火起来应该算是google mind团队的这篇论文《Recurrent Models of Visual Attention》[14],他们在RNN模型上使用了attention机制来进行图像分类。随后,Bahdanau等人在论文《Neural Machine Translation by Jointly Learning to Align and Translate》 [1]中,使用类似attention的机制在机器翻译任务上将翻译和对齐同时进行,他们的工作算是是第一个提出attention机制应用到NLP领域中。接着类似的基于attention机制的RNN模型扩展开始应用到各种NLP任务中。最近,如何在CNN中使用attention机制也成为了大家的研究热点。下图表示了attention研究进展的大概趋势。
[ICML2024]消除偏差:微调基础模型以进行半监督学习
专知会员服务
17+阅读 · 2024年5月23日
【ICML2023】SEGA:结构熵引导的图对比学习锚视图
专知会员服务
22+阅读 · 2023年5月10日
【NeurIPS2022】VICRegL:局部视觉特征的自监督学习
专知会员服务
32+阅读 · 2022年10月6日
UTC: 用于视觉对话的任务间对比学习的统一Transformer
专知会员服务
14+阅读 · 2022年5月4日
【CVPR 2020 Oral】小样本类增量学习
专知
20+阅读 · 2020年6月26日
论文笔记之Feature Selective Networks for Object Detection
统计学习与视觉计算组
21+阅读 · 2018年7月26日
误差反向传播——CNN
统计学习与视觉计算组
30+阅读 · 2018年7月12日
MNIST入门:贝叶斯方法
Python程序员
23+阅读 · 2017年7月3日
国家自然科学基金
2+阅读 · 2015年12月31日
国家自然科学基金
4+阅读 · 2015年12月31日
国家自然科学基金
46+阅读 · 2015年12月31日
国家自然科学基金
6+阅读 · 2014年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
VIP会员
相关VIP内容
相关资讯
【CVPR 2020 Oral】小样本类增量学习
专知
20+阅读 · 2020年6月26日
论文笔记之Feature Selective Networks for Object Detection
统计学习与视觉计算组
21+阅读 · 2018年7月26日
误差反向传播——CNN
统计学习与视觉计算组
30+阅读 · 2018年7月12日
MNIST入门:贝叶斯方法
Python程序员
23+阅读 · 2017年7月3日
相关基金
国家自然科学基金
2+阅读 · 2015年12月31日
国家自然科学基金
4+阅读 · 2015年12月31日
国家自然科学基金
46+阅读 · 2015年12月31日
国家自然科学基金
6+阅读 · 2014年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
Top
微信扫码咨询专知VIP会员