残差变换增强了大型语言模型(LLMs)的表示深度和表达能力。然而,在自回归生成过程中对所有token应用静态残差变换会导致推理效率与生成保真度之间的次优权衡。现有方法,包括Early Exiting、Skip Decoding和Mixture-of-Depth,通过基于token级复杂度调制残差变换来解决这一问题。然而,这些方法主要考虑token在模型层中穿行的距离,忽略了残差演化的潜在速度。我们提出Mixture of Multi-rate Residuals(M2R2),这是一个动态调制残差速度以改善早期对齐、提升推理效率的框架。在面向推理的任务(如Koala、Self-Instruct、WizardLM和MT-Bench)上的评估表明,M2R2超越了最先进的基于距离的策略,平衡了生成质量和加速效果。在自推测解码设置中,M2R2在MT-Bench上实现了高达2.8倍的加速,优于2-model speculative decoding、Medusa、LookAhead Decoding和DEED等方法。在Mixture-of-Experts(MoE)架构中,将早期残差对齐与提前将专家加载到高带宽内存(HBM)相结合,可加速解码、减少专家切换瓶颈,并实现2.9倍的加速,使其在资源受限环境中非常有效。
英文摘要:
Residual transformations enhance the representational depth and expressive power of large language models (LLMs). However, applying static residual transformations across all tokens in auto-regressive generation leads to a suboptimal trade-off between inference efficiency and generation fidelity. Existing methods, including Early Exiting, Skip Decoding, and Mixture-of-Depth address this by modulating the residual transformation based on token-level complexity. Nevertheless, these approaches predominantly consider the distance traversed by tokens through the model layers, neglecting the underlying velocity of residual evolution. We introduce Mixture of Multi-rate Residuals (M2R2), a framework that dynamically modulates residual velocity to improve early alignment, enhancing inference efficiency. Evaluations on reasoning oriented tasks such as Koala, Self-Instruct, WizardLM, and MT-Bench show M2R2 surpasses state-of-the-art distance-based strategies, balancing generation quality and speedup. In self-speculative decoding setup, M2R2 achieves up to 2.8x speedups on MT-Bench, outperforming methods like 2-model speculative decoding, Medusa, LookAhead Decoding, and DEED. In Mixture-of-Experts (MoE) architectures, integrating early residual alignment with ahead-of-time expert loading into high-bandwidth memory (HBM) accelerates decoding, reduces expert-switching bottlenecks, and achieves a 2.9x speedup, making it highly effective in resource-constrained environments.
Transformers represent belief state geometry in their residual stream
Simplex(辛普莱克斯);PIBBSS;Pitzer and Scripps College(皮策与斯克里普斯学院);University College London(伦敦大学学院);BITS Principles of Intelligent Behaviour in Biological and Social Systems(BITS生物与社会系统智能行为原理中心)
Transformer是现代NLP模型的支柱。在本文中,我们提出了RealFormer,一个简单而通用的技术来创建剩余注意力层Transformer网络,显着优于规范的Transformer及其变体(BERT,ETC等)。在各种各样的任务上,包括Masked Language Modeling、GLUE、SQuAD、Neural机器翻译、WikiHop、HotpotQA、Natural Questions和OpenKP。我们还根据经验观察到,RealFormer稳定了训练,并导致模型具有更稀疏的注意力。RealFormer的源代码和预先训练的检查点可以在https://github.com/google-research/google-research/tree/master/realformer上找到。
ResLRP: The Role of Residual Cancellation in Attribution Instability in Vision Transformers
Fraunhofer Heinrich Hertz Institute(弗劳恩霍夫海因里希·赫兹研究所);DSC ScaDS.AI, Leipzig University(莱比锡大学DSC ScaDS.AI);ICT Cluster, Singapore Institute of Technology(新加坡理工大学ICT集群);Institute for Cancer Genetics and Informatics (ICGI), Oslo, Norway(奥斯陆癌症遗传学与信息学研究所);Technische Universität Berlin(柏林工业大学);BIFOLD – Berlin Institute for the Foundations of Learning and Data(BIFOLD – 柏林学习与数据基础研究所)
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相当或更好的性能。
Adaptive Graph Mixture of Residual Experts: Unsupervised Learning on Diverse Graphs with Heterogeneous Specialization
School of New Media and Communication, Tianjin University(新媒体与传播学院,天津大学);Baidu(百度);School of Computer Science and Engineering, Beihang University(计算机科学与工程学院,北航大学)
Dynamic Mixture of Experts: An Auto-Tuning Approach for Efficient Transformer Models
The Chinese University of Hong Kong, Shenzhen(香港中文大学(深圳));Shenzhen Institute of Artificial Intelligence and Robotics for Society (AIRS)(深圳市人工智能与机器人研究院);Zhejiang University(浙江大学);Westlake University(西湖大学);SII;Research Center for Industries of the Future, Westlake University(西湖大学未来产业研究中心);Tencent AI Lab(腾讯AI Lab)
Residual Cross-Attention Transformer-Based Multi-User CSI Feedback with Deep Joint Source-Channel Coding
School of Information and Electronics, Beijing Institute of Technology(信息与电子学院,北京理工大学);State Key Laboratory of CNS/ATM and the MIIT Key Laboratory of Complex-Field Intelligent Sensing, Beijing Institute of Technology (BIT)(国家 CNS/ATM 工程重点实验室和工信部复杂场智能感知关键实验室,北京理工大学);Guangzhou Institute of Technology, Xidian University(广州理工大学,西安电子科技大学)
Transformers as Unsupervised Learning Algorithms: A study on Gaussian Mixtures
Shanghai Center for Mathematical Sciences, Fudan University(复旦大学上海数学中心);Department of Statistics and Data Science, School of Management, Fudan University(复旦大学管理学院统计与数据科学系)
Mixture-of-Transformers Learn Faster: A Theoretical Study on Classification Problems
Department of ECE The Ohio State University(电子工程系,俄亥俄州立大学);Department of CSE The Ohio State University(计算机科学与工程系,俄亥俄州立大学);Department of Computer Science University of Houston(计算机科学系,休斯顿大学);Department of ECE Department of CSE The Ohio State University(电子工程系、计算机科学与工程系,俄亥俄州立大学)
MGDT: MLLM-Guided Diffusion Transformer with Relation-Adaptive Mixture-of-Experts for Multimodal Knowledge Graph Completion
Beijing University of Posts and Telecommunications(北京邮电大学);Zhejiang University(浙江大学);University of Science and Technology of China(中国科学技术大学);Communication University of China(中国传媒大学)
Conditional Capacity and Routing in Mixture-of-Experts Particle Transformers
University of California San Diego(加州大学圣迭戈分校);University of Illinois at Chicago(伊利诺伊大学芝加哥分校);Fermi National Accelerator Laboratory(费米国家加速器实验室);University of California Davis(加州大学戴维斯分校)