Multi-head attentive neural architectures have achieved state-of-the-art results on a variety of natural language processing tasks. Evidence has shown that they are overparameterized; attention heads can be pruned without significant performance loss. In this work, we instead "reallocate" them -- the model learns to activate different heads on different inputs. Drawing connections between multi-head attention and mixture of experts, we propose the mixture of attentive experts model (MAE). MAE is trained using a block coordinate descent algorithm that alternates between updating (1) the responsibilities of the experts and (2) their parameters. Experiments on machine translation and language modeling show that MAE outperforms strong baselines on both tasks. Particularly, on the WMT14 English to German translation dataset, MAE improves over "transformer-base" by 0.8 BLEU, with a comparable number of parameters. Our analysis shows that our model learns to specialize different experts to different inputs.
Better heads do not guarantee better binarized constituency parsing
The Chinese University of Hong Kong, Ma Liu Shui, Hong Kong(香港中文大学,大屿山分校);The University of British Columbia, Vancouver, Canada(不列颠哥伦比亚大学,温哥华,加拿大);Korea Advanced Institute of Science & Technology, Daejeon, South Korea(韩国科学技术院,大田,韩国)
Mixture of In-Context Experts Enhance LLMs' Long Context Awareness
Gaoling School of Artificial Intelligence, Renmin University of China(中国人民大学高瓴人工智能学院);XiaoMi AI Lab(小米AI实验室);Career Science Lab, BOSS Zhipin(BOSS直聘职业科学实验室);NLP Center, BOSS Zhipin(BOSS直聘自然语言处理中心)
Improving Transformers with Probabilistic Attention Keys
FPT Software AI Center(FPT软件人工智能中心);University of California, Los Angeles(加州大学洛杉矶分校);VinUniversity(文大);Deezer Research(Deezer研究院);Rice University(莱斯大学);The University of Texas at Austin(德克萨斯大学奥斯汀分校)
多头注意力是最先进的Transformers背后的驱动力,它在各种自然语言处理(NLP)和计算机视觉任务中实现了卓越的性能。已经观察到,对于许多应用,这些注意力头学习冗余嵌入,并且其中大多数可以在不降低模型性能的情况下被移除。受此启发,我们提出了Transformer与混合高斯密钥(transformer-MGK),一种新的Transformer架构,取代冗余的头在每个头的混合密钥的变压器。这些键的混合遵循高斯混合模型,并允许每个注意力头有效地集中在输入序列的不同部分。与传统的Transformer相比,Transformer-MGK加速了训练和推理,参数更少,需要计算的FLOP更少,同时在任务中实现了相当或更好的准确性。transformer-MGK也可以很容易地扩展到使用线性注意力。我们经验证明了Transformer-MGK在一系列实际应用中的优势,包括语言建模和涉及很长序列的任务。在Wikitext-103和Long Range Arena基准测试中,具有4个头的Transformer-MGK获得了与具有8个头的基线Transformers相当或更好的性能。
Multiple Heads are Better than One: Mixture of Modality Knowledge Experts for Entity Representation Learning
College of Computer Science and Technology, Zhejiang University(浙江大学计算机科学与技术学院);ZJU-Ant Group Joint Lab of Knowledge Graph(浙江大学-蚂蚁集团知识图谱联合实验室);Ant Group(蚂蚁集团);School of Software Technology, Zhejiang University(浙江大学软件学院);Zhejiang Key Laboratory of Big Data Intelligent Computing(浙江省大数据智能计算重点实验室)
Better Pre-Training by Reducing Representation Confusion
Tencent(腾讯);Peking University(北京大学)
在这项工作中,我们重新审视了基于transformer的预训练语言模型,并分别在位置编码和模型表示中识别出两种不同类型的信息混淆。首先,我们表明,在相对位置编码,相对距离和方向的联合建模带来了两个异构信息之间的混淆。这可能会使模型无法捕获相同距离和相反方向的关联语义,进而影响下游任务的性能。其次,我们注意到带有MLM(Mask Language Modeling)预训练目标的BERT输出相似的token表示(不同token的最后隐藏状态)和head表示(不同head的注意力权重),这可能使不同token和head所表达的信息的多样性受到限制。基于上述研究,我们提出了两种改进预训练语言模型的新技术:解耦方向相对位置(DDRP)编码和MTH预训练目标。DDRP是对经典相对位置编码中的相对距离特征和方向特征的继承。MTH除了MLM之外,还应用了两个新的辅助正则化器来扩大(a)不同令牌的最后隐藏状态和(b)不同头部的注意力权重之间的差异。这些设计允许模型更清晰地捕捉不同类别的信息,作为减轻表示学习中信息混乱的一种方式,以实现更好的优化。在GLUE基准上的大量实验和烧蚀研究证明了所提出方法的有效性。
Identifying Semantic Induction Heads to Understand In-Context Learning
Shanghai Jiao Tong University(上海交通大学);Shanghai Artificial Intelligence Laboratory(上海人工智能实验室);Fudan University(复旦大学);The Chinese University of Hong Kong(香港中文大学)
Towards Better Multi-head Attention via Channel-wise Sample Permutation
Gaoling School of Artificial Intelligence, Renmin University of China(中国人民大学高瓴人工智能学院);Beijing Key Laboratory of Big Data Management and Analysis Methods(北京大数据管理与分析方法重点实验室)
Attention Sink Forges Native MoE in Attention Layers: Sink-Aware Training to Address Head Collapse
Institute for Artificial Intelligence, Peking University, Beijing(人工智能研究院,北京大学,北京);School of Integrated Circuits, Peking University, Beijing(集成电路学院,北京大学,北京)