Skip to main content
QUICK REVIEW

[Paper Review] Efficient Long Sequence Modeling via State Space Augmented Transformer

Simiao Zuo, Xiaodong Liu|arXiv (Cornell University)|Dec 15, 2022
Topic ModelingComputer Science7 citations
TL;DR

This paper proposes SPADE, a hybrid Transformer architecture that enhances long sequence modeling by integrating a state space model (SSM) in the first layer to capture global dependencies, while using efficient local attention in subsequent layers for fine-grained local modeling. The method achieves linear complexity, outperforms baselines on Long Range Arena and language modeling, and scales effectively to large pre-trained models for NLU and generation tasks.

ABSTRACT

Transformer models have achieved superior performance in various natural language processing tasks. However, the quadratic computational cost of the attention mechanism limits its practicality for long sequences. There are existing attention variants that improve the computational efficiency, but they have limited ability to effectively compute global information. In parallel to Transformer models, state space models (SSMs) are tailored for long sequences, but they are not flexible enough to capture complicated local information. We propose SPADE, short for $\underline{ extbf{S}}$tate s$\underline{ extbf{P}}$ace $\underline{ extbf{A}}$ugmente$\underline{ extbf{D}}$ Transform$\underline{ extbf{E}}$r. Specifically, we augment a SSM into the bottom layer of SPADE, and we employ efficient local attention methods for the other layers. The SSM augments global information, which complements the lack of long-range dependency issue in local attention methods. Experimental results on the Long Range Arena benchmark and language modeling tasks demonstrate the effectiveness of the proposed method. To further demonstrate the scalability of SPADE, we pre-train large encoder-decoder models and present fine-tuning results on natural language understanding and natural language generation tasks.

Motivation & Objective

  • To address the quadratic computational cost of standard Transformers in long sequence modeling.
  • To overcome the limitation of local attention mechanisms in capturing long-range dependencies.
  • To integrate the global modeling strength of state space models (SSMs) with the local inductive bias of efficient attention.
  • To design a scalable, efficient, and effective architecture for long-context NLP tasks.
  • To demonstrate the method's effectiveness through pre-training and fine-tuning on downstream NLU and generation tasks.

Proposed method

  • SPADE uses a multi-layer Transformer where the first layer is a state space model (SSM) to inject coarse global information into the sequence.
  • The SSM layer is followed by multiple layers of efficient local attention (e.g., window-based attention) to refine local dependencies.
  • The SSM operates with linear time and space complexity, enabling efficient processing of long sequences.
  • The method combines the global inductive bias of SSMs with the local modeling flexibility of attention, complementing their individual weaknesses.
  • The architecture supports both autoregressive and non-autoregressive sequence modeling, including encoder-decoder setups.
  • The model is trained using standard objectives and fine-tuned on GLUE and summarization benchmarks.

Experimental results

Research questions

  • RQ1Can a hybrid architecture combining SSMs and local attention improve long-range dependency modeling in Transformers?
  • RQ2Does integrating an SSM in the first layer enhance performance on long sequence benchmarks like Long Range Arena?
  • RQ3Can SPADE maintain efficiency (linear complexity) while outperforming quadratic-attention and sparse-attention baselines?
  • RQ4How well does SPADE scale when pre-trained on large-scale language modeling and fine-tuned on downstream tasks?
  • RQ5What is the contribution of the SSM layer versus local attention layers in the overall performance gain?

Key findings

  • SPADE achieves state-of-the-art performance on the Long Range Arena benchmark, outperforming models with full, sparse, and low-rank attention.
  • On autoregressive language modeling, SPADE is significantly faster than vanilla Transformers and achieves better perplexity scores.
  • The model demonstrates strong scalability, with pre-trained encoder-decoder versions achieving superior results on GLUE and summarization tasks.
  • Ablation studies confirm that the SSM layer is critical for capturing long-range dependencies, while local attention layers refine local patterns.
  • SPADE reduces GPU memory consumption to under 80GB for 8k-length sequences, making long-context modeling practical.
  • The method maintains high performance even with limited structural bias, outperforming models that rely solely on positional encoding or sparse patterns.

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.