We propose a novel method to sparsify attention in the Transformer model by learning to select the most-informative token representations during the training process, thus focusing on task-specific parts of the input. A reduction of quadratic time and memory complexity to sublinear was achieved due to a robust trainable top-k operator. For example, our experiments on a challenging summarization task of long documents show that our method is over 3 times faster and up to 16 times more memory efficient while significantly outperforming both dense and state-of-the-art sparse transformer models. The method can be effortlessly applied to many models used in NLP and CV, simultaneously with other improvements.
翻译:我们提出一种新的方法,通过学习在培训过程中选择信息最丰富的象征性表示方式来分散变异器模型的注意力,从而集中关注投入中的任务特定部分。由于一个强大的可培训的顶级操作员,四边时间和内存的复杂性已经降低到亚线性。例如,我们对具有挑战性的长文件总结任务的实验表明,我们的方法比高3倍,记忆效率高16倍,同时大大超过密度和最先进的稀有变异器模型。这种方法可以不费力地应用于NLP和CV中的许多模型,同时进行其他改进。