Skip to main content
QUICK REVIEW

[Paper Review] Hyena Hierarchy: Towards Larger Convolutional Language Models

Michael Poli, Stefano Massaroli|arXiv (Cornell University)|Feb 21, 2023
Topic ModelingComputer Science75 citations
TL;DR

Hyena presents a subquadratic, attention-free operator built from a recurrence of implicit long convolutions and gating, achieving Transformer-like language modeling quality with reduced compute and faster inference on long contexts.

ABSTRACT

Recent advances in deep learning have relied heavily on the use of large Transformers due to their ability to learn at scale. However, the core building block of Transformers, the attention operator, exhibits quadratic cost in sequence length, limiting the amount of context accessible. Existing subquadratic methods based on low-rank and sparse approximations need to be combined with dense attention layers to match Transformers, indicating a gap in capability. In this work, we propose Hyena, a subquadratic drop-in replacement for attention constructed by interleaving implicitly parametrized long convolutions and data-controlled gating. In recall and reasoning tasks on sequences of thousands to hundreds of thousands of tokens, Hyena improves accuracy by more than 50 points over operators relying on state-spaces and other implicit and explicit methods, matching attention-based models. We set a new state-of-the-art for dense-attention-free architectures on language modeling in standard datasets (WikiText103 and The Pile), reaching Transformer quality with a 20% reduction in training compute required at sequence length 2K. Hyena operators are twice as fast as highly optimized attention at sequence length 8K, and 100x faster at sequence length 64K.

Motivation & Objective

  • Motivate the search for subquadratic operators that can match attention at scale.
  • Introduce Hyena as a data-controlled, long-convolution-based operator with gating.
  • Show that Hyena closes the performance gap to attention on language modeling and tasks requiring long context.
  • Demonstrate Hyena’s efficiency advantages on long sequences and vision tasks.
  • Evaluate Hyena’s scalability and generality across benchmarks and datasets.

Proposed method

  • Define Hyena as a recurrence of long convolutions interleaved with multiplicative gating to form a data-controlled operator.
  • Parametrize long convolutions implicitly via learnable filters implemented with neural implicit representations (FFN-based windows).
  • Evaluate Hyena without materializing the full operator using FFT-based fast convolutions for O(L log L) computation.
  • Ensure causality for autoregressive settings by using causal convolutions and padding strategies.
  • Compare Hyena to state-of-the-art subquadratic methods across associative recall, language modeling, and vision tasks.
  • Benchmark runtime against attention and FlashAttention to quantify speedups on very long sequences.

Experimental results

Research questions

  • RQ1Can a subquadratic, attention-free operator achieve comparable quality to dense attention at scale?
  • RQ2To what extent do data-controlled, long convolution-based architectures close the performance gap on long-context reasoning tasks?
  • RQ3How do different implicit parametrizations of long convolutions affect scalability, memory, and accuracy?
  • RQ4What are the efficiency and speedup benefits of Hyena on long sequences compared to attention-based methods?
  • RQ5Is Hyena effective beyond language tasks, e.g., in large-scale image classification?

Key findings

  • Hyena achieves similar perplexity and downstream performance to Transformer-based models on The Pile with a 20% reduction in total FLOPs at sequence length 2K.
  • Hyena attains up to 5x to 100x speedups over dense attention at sequence lengths from 8K to 64K.
  • On The Pile at 335M parameters, Hyena matches Transformer perplexity with a 20% FLOP reduction.
  • Hyena reaches Transformer-like quality on WikiText103 and The Pile with subquadratic compute, without hybridizing with attention.
  • In image classification, Hyena matches attention-based ViT performance on ImageNet-1k when replacing attention layers.
  • Across long associative recall tasks, implicit parametrizations outperform other long-convolution approaches, with larger gains for longer sequences and bigger vocabularies.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.