LGSep 21, 2022

Mega: Moving Average Equipped Gated Attention

CMUUW
arXiv:2209.10655v3239 citationsh-index: 116
Originality Highly original
AI Analysis

This addresses the problem of modeling long sequences more efficiently for applications in NLP, vision, and speech, offering a novel method with competitive performance.

The paper tackles the limitations of Transformer attention for long sequences by introducing Mega, a gated attention mechanism with moving average, achieving significant improvements across multiple sequence modeling benchmarks.

The design choices in the Transformer attention mechanism, including weak inductive bias and quadratic computational complexity, have limited its application for modeling long sequences. In this paper, we introduce Mega, a simple, theoretically grounded, single-head gated attention mechanism equipped with (exponential) moving average to incorporate inductive bias of position-aware local dependencies into the position-agnostic attention mechanism. We further propose a variant of Mega that offers linear time and space complexity yet yields only minimal quality loss, by efficiently splitting the whole sequence into multiple chunks with fixed length. Extensive experiments on a wide range of sequence modeling benchmarks, including the Long Range Arena, neural machine translation, auto-regressive language modeling, and image and speech classification, show that Mega achieves significant improvements over other sequence models, including variants of Transformers and recent state space models.

Code Implementations7 repos

Data from Papers with Code (CC-BY-SA-4.0)

Foundations

The foundational work for this paper's niche, ranked by how specifically the neighbourhood builds on it — not by global fame.

Your Notes