Skip to main content
QUICK REVIEW

[Paper Review] Parallelizing Linear Transformers with the Delta Rule over Sequence Length

Songlin Yang, Bailin Wang|arXiv (Cornell University)|Jun 10, 2024
Cellular Automata and ApplicationsComputer Science3 citations
TL;DR

This paper proposes a hardware-efficient, parallelizable training algorithm for DeltaNet, a linear transformer variant that uses the delta rule to improve associative recall. By reparameterizing DeltaNet as a matrix-valued RNN with Householder transformations and leveraging the memory-efficient WY representation, the method enables sequence-length-parallel training, allowing scaling to 1.3B models on 100B tokens, which outperforms Mamba and GLA in perplexity and zero-shot downstream performance.

ABSTRACT

Transformers with linear attention (i.e., linear transformers) and state-space models have recently been suggested as a viable linear-time alternative to transformers with softmax attention. However, these models still underperform transformers especially on tasks that require in-context retrieval. While more expressive variants of linear transformers which replace the additive update in linear transformers with the delta rule (DeltaNet) have been found to be more effective at associative recall, existing algorithms for training such models do not parallelize over sequence length and are thus inefficient to train on modern hardware. This work describes a hardware-efficient algorithm for training linear transformers with the delta rule, which exploits a memory-efficient representation for computing products of Householder matrices. This algorithm allows us to scale up DeltaNet to standard language modeling settings. We train a 1.3B model for 100B tokens and find that it outperforms recent linear-time baselines such as Mamba and GLA in terms of perplexity and zero-shot performance on downstream tasks. We also experiment with two hybrid models which combine DeltaNet layers with (1) sliding-window attention layers every other layer or (2) two global attention layers, and find that these hybrids outperform strong transformer baselines.

Motivation & Objective

  • To address the inefficiency of existing sequential training algorithms for DeltaNet, which hinder scalability on modern hardware.
  • To enable parallelization of forward and backward passes over sequence length in DeltaNet, overcoming the bottleneck of sequential computation.
  • To scale DeltaNet to large-scale language modeling (1.3B parameters, 100B tokens) while maintaining high performance on long-context and retrieval-intensive tasks.
  • To demonstrate that DeltaNet surpasses strong linear-time baselines like Mamba and GLA in both language modeling and zero-shot downstream performance.

Proposed method

  • Reformulates DeltaNet as a matrix-valued RNN with recurrence governed by generalized Householder transformations.
  • Employs the WY representation for products of Householder matrices to avoid materializing large hidden states, reducing I/O and memory costs.
  • Adapts the chunkwise parallel training strategy from linear attention models to the DeltaNet setting, enabling efficient parallelization across sequence length.
  • Uses a parameterization where the state update involves a rank-one correction via Householder reflections, enabling efficient matrix updates.
  • Introduces a differentiable, memory-efficient recurrence that maintains the delta rule’s associative recall capability while enabling backpropagation.
  • Integrates the parallel DeltaNet layer into the FlashLinearAttention library for practical deployment and benchmarking.

Experimental results

Research questions

  • RQ1Can the delta rule in DeltaNet be trained efficiently at scale using modern hardware-parallelized training paradigms?
  • RQ2Does a parallelized training algorithm for DeltaNet enable better performance on long-context and retrieval-intensive tasks compared to existing linear-time models?
  • RQ3Can DeltaNet achieve competitive or superior performance to standard transformers and linear baselines like Mamba and GLA in large-scale language modeling?
  • RQ4How does combining DeltaNet with local or global attention layers affect performance and generalization?
  • RQ5What is the impact of memory-efficient Householder matrix representations on training throughput and model scalability?

Key findings

  • The proposed parallel training algorithm enables scaling DeltaNet to a 1.3B parameter model trained on 100B tokens, demonstrating feasibility at scale.
  • DeltaNet achieves lower perplexity than Mamba and GLA on standard language modeling benchmarks, indicating improved sequence modeling capacity.
  • On zero-shot downstream tasks, including those requiring in-context retrieval, DeltaNet outperforms Mamba and GLA, confirming its strength in associative recall.
  • Hybrid models combining DeltaNet with sliding-window attention or global attention layers surpass strong transformer baselines, suggesting complementary strengths.
  • The memory-efficient WY representation of Householder products enables high-throughput training without materializing large intermediate states, reducing I/O overhead.

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.