Reproduce “Convolution for Large Language Models” on OpenResearch

Run Claude Code, Codex or any coding agent as a research agent: literature, hypotheses and experiments on your laptop, cluster or cloud GPUs.

Universal app for Apple silicon and Intel. Requires macOS 11 or later.

About this paper

Yuchuan Tian, Yingte Shu, Wei He, Shuo Zhang, Tianchen Zhao, Chao Xu, Xinghao Chen, Yunhe Wang and 2 more

Researchers from Peking University, Huawei Technologies, and Tsinghua University systematically integrated lightweight depthwise convolutions into Transformer-based LLMs, demonstrating that a single residual Conv1D module placed after QKV projections, with a kernel size of 3, can improve average downstream task accuracy by up to 3.76 percentage points with less than 0.01% parameter overhead. This approach effectively introduces an explicit local inductive bias to complement global self-attention.

Key insights

  • The most effective placement for a lightweight depthwise Conv1D module is after the QKV linear projections, immediately before the attention mechanism, as it optimizes pre-attention feature aggregation.
  • A simple 'Conv + Shortcut' (residual connection) design with a kernel size of 3 and random initialization is optimal, with additional normalization or non-linear activations within the module proving detrimental.
  • The convolution module appears to enhance contextual differentiation, as evidenced by lower pairwise cosine similarity for repeated tokens in varying local contexts, suggesting improved local semantic understanding.

Summary by alphaXiv.

Tip: change arxiv.org to autoarxiv.org in any arXiv abstract link to open the paper here.