论文标题
SAC:通过稀疏的自适应连接加速和构造自我注意
SAC: Accelerating and Structuring Self-Attention via Sparse Adaptive Connection
论文作者
论文摘要
尽管自我发挥的机制已被广泛用于各种任务,但对于输入长度,它具有二次成本的不幸属性,这使得很难处理长期输入。在本文中,我们提出了一种加速和构造自我的方法:稀疏适应性连接(SAC)。在SAC中,我们将输入序列视为图形,并且在链接节点之间执行注意力操作。与先前具有预定义结构(边)的自我发场模型相反,该模型学会了构建注意力边缘以改善特定于任务的性能。通过这种方式,无论序列长度如何,模型都可以选择最显着的节点并降低二次复杂性。基于SAC,我们表明自我注意力模型的先前变体是其特殊情况。通过对神经机器翻译,语言建模,图表的学习和图像分类的广泛实验,我们证明SAC与最先进的模型具有竞争力,同时大大降低了内存成本。
While the self-attention mechanism has been widely used in a wide variety of tasks, it has the unfortunate property of a quadratic cost with respect to the input length, which makes it difficult to deal with long inputs. In this paper, we present a method for accelerating and structuring self-attentions: Sparse Adaptive Connection (SAC). In SAC, we regard the input sequence as a graph and attention operations are performed between linked nodes. In contrast with previous self-attention models with pre-defined structures (edges), the model learns to construct attention edges to improve task-specific performances. In this way, the model is able to select the most salient nodes and reduce the quadratic complexity regardless of the sequence length. Based on SAC, we show that previous variants of self-attention models are its special cases. Through extensive experiments on neural machine translation, language modeling, graph representation learning and image classification, we demonstrate SAC is competitive with state-of-the-art models while significantly reducing memory cost.