[Paper Review] Long Range Language Modeling via Gated State Spaces
This paper introduces the Gated State Space (GSS) layer for autoregressive language modeling, achieving 2–3× faster training than DSS while remaining competitive with Transformer baselines and exhibiting strong length generalization up to 65k tokens. A GSS-Transformer hybrid further improves results.
State space models have shown to be effective at modeling long range dependencies, specially on sequence classification tasks. In this work we focus on autoregressive sequence modeling over English books, Github source code and ArXiv mathematics articles. Based on recent developments around the effectiveness of gated activation functions, we propose a new layer named Gated State Space (GSS) and show that it trains significantly faster than the diagonal version of S4 (i.e. DSS) on TPUs, is fairly competitive with several well-tuned Transformer-based baselines and exhibits zero-shot generalization to longer inputs while being straightforward to implement. Finally, we show that leveraging self-attention to model local dependencies improves the performance of GSS even further.
Motivation & Objective
- Motivate modeling long-range dependencies in language data beyond fixed-length windows.
- Develop a fast, scalable autoregressive layer based on gated state spaces that reduces computational bottlenecks.
- Demonstrate that GSS trains faster than DSS while maintaining competitive perplexity on long-range LM benchmarks.
- Show that incorporating small amounts of local self-attention or Transformer blocks can further improve performance.
- Evaluate length generalization by testing on sequences longer than those seen during training.
Proposed method
- Introduce the Gated State Space (GSS) layer that combines gating units with a DSS-like state space module.
- Use GELU activations and a gating mechanism to reduce the effective dimensionality of FFT-heavy operations.
- Simplify DSS by fixing Delta to 1 and randomizing initialization of Lambda, avoiding strict HiPPO-based initializations.
- Compute the DSS context via a gated path where U = GELU(XW1) and V = GELU(XW2), with Y = DSS(U) and O = (YW3 * V)W4 plus a residual connection.
- Optionally interleave Transformer blocks in a GSS stack (GSS-Transformer-Hybrid) and chunk long inputs for Transformer layers (non-overlapping chunks of length 512).
- Train and evaluate on long-range LM benchmarks (LM1B, PG-19, ArXiv LaTeX, Github code) using token-level perplexity; compare with DSS and well-tuned Block Recurrent Transformers.
Experimental results
Research questions
- RQ1Can GSS train autoregressive language models faster than DSS while maintaining or improving perplexity on long-range text?
- RQ2Does integrating a lightweight, local-attention Transformer hybrid with GSS yield additional gains without prohibitive training cost?
- RQ3How well does GSS generalize to longer sequence lengths than those seen during training (length generalization)?
- RQ4What is the impact of initialization and gating on training stability and performance for state-space LM layers?
Key findings
- GSS trains 2–3× faster than DSS on multiple long-range LM benchmarks.
- GSS is fairly competitive with well-tuned Transformer baselines in fixed-compute and fixed-parameter comparisons across several datasets (LM1B, PG-19, ArXiv, Github).
- GSS exhibits strong length generalization, with performance not degrading—and often improving—as sequence length increases beyond training length (up to 65k).
- A GSS-Transformer-Hybrid further improves performance, combining the strengths of state-space layers with local attention.
- Simplifications such as fixing Delta=1 and random Gaussian-like initialization of Lambda reduce training bottlenecks while preserving performance.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.