Dynamic Short Convolutions Improve Transformers
作者: Oliver Sieberling, Bharat Runwal, Rameswar Panda, Yoon Kim
分类: cs.LG, cs.CL
发布日期: 2026-06-02
💡 一句话要点
提出动态短卷积以提升Transformer性能
🎯 匹配领域: 支柱二:RL算法与架构 (RL & Architecture) 支柱九:具身大模型 (Embodied Foundation Models)
关键词: 动态短卷积 Transformer 语言模型 计算效率 深度学习 神经网络 输入依赖
📋 核心要点
- 现有的Transformer模型在处理复杂任务时,静态短卷积的表达能力有限,难以充分利用输入信息。
- 本文提出动态短卷积,通过使用输入依赖的滤波器,增强了卷积的表达能力,同时保留了局部性偏差。
- 实验结果显示,动态短卷积在多项语言建模任务中表现优异,尤其在计算效率上相较于传统Transformer有显著提升。
📝 摘要(中文)
Transformer架构已成为大型语言模型的主流,因其在注意力机制、前馈层、残差连接和归一化方面的可扩展性和灵活性。本文提出动态短卷积作为一种新的神经网络原语,以改善Transformer的性能。与静态短卷积不同,动态卷积使用依赖于输入的滤波器,既保留了卷积的局部性偏差,又增强了表达能力。实验表明,将动态短卷积应用于键、查询和值表示,在困难的关联记忆任务上相较于静态卷积变体表现更佳。在150M到2B参数的语言建模实验中,动态卷积始终优于标准Transformer和静态短卷积增强的Transformer。适应性缩放法则表明,当动态卷积应用于键、查询和值向量时,相较于计算匹配的Transformer具有1.33倍的计算优势,若在每个线性层后添加动态卷积,则优势提升至1.60倍。动态卷积还在线性RNN和混合专家架构上提供了改进。我们通过定制的Triton内核使这些增益在训练中高效可行,且整体延迟可控。这些结果表明,动态短卷积是一种可扩展、高效且富有表现力的原语,能够推动基于Transformer的语言模型的发展。
🔬 方法详解
问题定义:本文旨在解决现有Transformer模型在复杂任务中由于静态短卷积导致的表达能力不足的问题。现有方法在处理输入信息时未能充分利用其动态特性,限制了模型的性能。
核心思路:论文提出动态短卷积,利用输入依赖的滤波器来增强卷积的表达能力,同时保持卷积的局部性偏差。这种设计使得模型能够更灵活地适应不同的输入特征,从而提高性能。
技术框架:整体架构包括动态短卷积模块,该模块被应用于Transformer的关键、查询和值表示中。通过在每个线性层后添加动态卷积,模型能够在不同层次上捕捉到更丰富的特征。
关键创新:动态短卷积是本研究的核心创新,与传统的静态短卷积相比,动态卷积能够根据输入动态调整滤波器,从而显著提升模型的表达能力和性能。
关键设计:在参数设置上,动态卷积的滤波器是根据输入动态生成的,损失函数采用标准的交叉熵损失,网络结构则在每个线性层后添加动态卷积模块以增强特征提取能力。实验中使用了定制的Triton内核以优化训练效率。
🖼️ 关键图片
📊 实验亮点
实验结果表明,动态短卷积在150M到2B参数的语言建模任务中,始终优于标准Transformer和静态短卷积增强的Transformer,计算效率上具有1.33倍至1.60倍的优势,显示出其在复杂任务中的显著提升。
🎯 应用场景
该研究的潜在应用领域包括自然语言处理、机器翻译和对话系统等。动态短卷积的引入不仅提升了Transformer模型的性能,还为未来的语言模型设计提供了新的思路,具有广泛的实际价值和影响力。
📄 摘要(原文)
Transformers have become the dominant architecture for large language models, largely due to the scalability and flexibility of attention, feed-forward layers, residual connections, and normalization. This paper introduces dynamic short convolutions as an additional neural network primitive for improving Transformers. Unlike static short convolutions, dynamic convolutions use input-dependent filters, which preserves the locality bias of convolution while increasing expressivity. Motivating experiments show that applying dynamic short convolutions to key, query, and value representations improves performance on challenging associative recall tasks compared with static convolutional variants. Across language-modeling experiments ranging from 150M to 2B parameters, dynamic convolutions consistently outperform standard Transformers and Transformers augmented with static short convolutions. Fitting scaling laws indicates a 1.33$\times$ compute advantage over compute-matched Transformers when dynamic convolutions are applied to the key, query, and value vectors, and a 1.60$\times$ advantage when adding dynamic convolutions after every linear layer. Dynamic convolutions also offer improvements on linear RNNs (Mamba-2/Gated DeltaNet) and mixture-of-experts architectures. We make these gains practical with custom Triton kernels that enable efficient training with a manageable end-to-end slowdown. These results suggest that dynamic short convolutions are a scalable, hardware-efficient, and expressive primitive for advancing Transformer-based language models.