Dynamic Short Convolutions Improve Transformers

Oliver Sieberling, Bharat Runwal, Rameswar Panda, Yoon KimarXiv 2026 · arXiv

TL;DR

Dynamic short convolutions introduce input-dependent filtering to Transformers, combining the strict local inductive bias of convolutions with the input-dependent expressivity of attention. By replacing fixed convolutional filters with weights generated dynamically from the hidden states, this approach yields up to a 1.60× compute advantage in language modeling while maintaining high hardware efficiency via custom Triton kernels.

What Problem Does This Paper Address?

Modern Large Language Models (LLMs) rely almost entirely on the attention mechanism to mix information across sequences. However, attention lacks an inherent inductive bias toward local context and is computationally expensive. While some architectures incorporate lightweight static short convolutions (depthwise-separable layers) to capture local token structures, these layers apply the exact same filter at every sequence position. This means they fail to capture context-dependent linguistic variations—such as dynamically adapting how words compose meaning depending on the surrounding phrase (e.g., parsing "can opener" vs. "can swim").

The authors address this limitation by introducing dynamic short convolutions to the Transformer architecture, allowing convolutional filters to change at each timestep based on the input tokens without sacrificing hardware efficiency.

Methods

  • Dynamic Parameterization: Instead of using fixed weights across the time axis, a dynamic short convolution uses a weight generator (like a linear projection) to produce time-varying, input-dependent convolution weights $w^{(t)}$ at each position $t$.
  • Parameter-Efficient Variants: Naively generating these weights would double the model's parameter count and create massive memory bottlenecks. To solve this, the authors propose two efficient parameterizations:
  • Low-rank factorization: Factoring the weight projection through a low-rank bottleneck of rank $R$.
  • Head-wise tying: Splitting the hidden dimensions into "heads" and broadcasting a single convolutional filter across all channels within a head.
  • Hardware Optimization via Custom Kernels: Because the dynamic weight tensor is large, it heavily dominates High Bandwidth Memory (HBM) traffic on GPUs. The authors developed custom Triton kernels that perform the entire operation on-chip. For the low-rank variant, the kernel fuses the second projection matrix multiplication directly into the convolution loop, generating weights on-chip and completely avoiding writing the massive intermediate weight tensor back to HBM.
  • Layer Placement: The convolutions are evaluated in two primary setups: placed on the Query, Key, and Value (QKV) representations right before Rotary Position Encodings (RoPE), or appended after every single linear layer in the Transformer block.

Datasets

  • Synthetic & Diagnostic Benchmarks: A modified version of the Multi-Query Associative Recall (MQAR) task featuring variable-length keys, alongside the Mechanistic Architecture Design (MAD) benchmark (which includes tasks like Fuzzy Recall and Selective Copy).
  • Language Modeling: Autoregressive pretraining and validation on the Nemotron-CC corpus, with additional perplexity evaluations on Wikitext-103 and LAMBADA.
  • Downstream Tasks: 11 zero-shot common-sense reasoning tasks evaluated via the lm-evaluation-harness library.
  • Long-Context Evaluation: The RULER benchmark, testing effective context utilization up to a length of 4096 tokens.

Key Insights and Ideas

  • The Middle Ground Between Attention and Convolution: Dynamic convolutions bridge the gap between two paradigms. They maintain the strict, hardware-friendly local window constraint of convolutions but gain the input-dependent flexibility typically reserved for attention mechanisms.
  • I/O Fusing is Mandatory for Speed: The primary bottleneck for dynamic layers on modern hardware isn't raw compute (FLOPs), but memory bandwidth (I/O). Fusing the weight generation directly into the convolution kernel is what makes this approach practical.
Latency comparison of Triton kernels vs baselines
  • Cross-Architecture Compatibility: Dynamic convolutions are not exclusive to standard Transformers. The authors demonstrate that they also boost the performance of state-of-the-art linear RNNs (like Mamba-2 and Gated DeltaNet) and Mixture-of-Experts (MoE) models, proving it is a robust, generalizable neural network primitive.

Key Results

  • Scaling Law Advantages: Fitting scaling laws across dense models ranging from 150M to 2B parameters reveals a 1.33× compute advantage when dynamic convolutions are applied to QKV layers, and a 1.60× compute advantage when placed after all linear layers compared to standard compute-matched Transformers.
Scaling laws for dynamic convolutions
  • Benchmark Superiority: On the MAD benchmark, the dynamic convolution variant achieves an average score of 0.822, outperforming the vanilla Transformer baseline (0.709) and the static convolution variant (0.793). It shows particularly massive gains on the context-dependent Fuzzy Recall task.
  • Manageable Overhead: The custom Triton kernels run 1.8× to 3.9× faster than the best torch.compile baselines. Integrated end-to-end at the 2B parameter scale, the QKV variant introduces only an 8% training throughput slowdown.

Limitations and Future Work

  • Scale Constraints: While the scaling trends are highly consistent, the dense models were only tested up to 2B parameters and the MoE up to 7B parameters (1B active). Validating these compute advantages at frontier scales (e.g., 70B+ parameters) remains an open question.
  • Inference Optimization: The current implementation focuses heavily on training throughput. Additional engineering is required to fully optimize these layers for low-latency inference and autoregressive decoding generation.
  • Broader Hardware & Fusion: The custom kernels are currently tailored for NVIDIA H100 GPUs. Future work includes expanding hardware support (e.g., to TPUs) and exploring even more aggressive kernel fusion, such as baking the dynamic convolution directly into the preceding matrix multiplication (matmul) epilogue to eliminate the remaining 22-25% overhead seen in the all-linear variant.

Summary updated

Abstract

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.
BibTeX
@misc{sieberling2026dynamic,
  author = {Oliver Sieberling and Bharat Runwal and Rameswar Panda and Yoon Kim},
  title = {{Dynamic Short Convolutions Improve Transformers}},
  year = {2026},
  eprint = {2606.03825},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2606.03825},
}

Loading related content...

Figure