Abstract
Standard Transformer architectures face significant memory and computational bottlenecks when processing long documents due to the quadratic scaling of self-attention. This paper introduces LOCOST (LOng Document Abstractive Summarization with State-Space Models), an encoder-decoder architecture that leverages State-Space Models (SSMs) to achieve $\mathcal{O}(L \log L)$ complexity. LOCOST can process sequences exceeding 600,000 tokens, enabling the summarization of entire books. Experimental results demonstrate that LOCOST achieves up to 87% memory savings during inference while maintaining 93-96% of the performance of state-of-the-art sparse attention models.
Introduction
In the field of Natural Language Processing (NLP), the ability to summarize extensive texts—such as legal documents, financial reports, and academic papers—is increasingly critical. However, the standard Transformer architecture relies on a self-attention mechanism that scales quadratically ($\mathcal{O}(L^2)$) with sequence length ($L$). This scaling makes processing very long sequences computationally prohibitive. While "sparse attention" variants like Longformer or BigBird mitigate this issue, they still encounter hardware limitations when dealing with hundreds of thousands of tokens.
The LOCOST Architecture
LOCOST addresses the quadratic bottleneck by replacing standard attention with State-Space Models (SSMs) within an encoder-decoder framework. SSMs, derived from control theory, map 1D sequences through implicit hidden states.
The primary innovation of LOCOST lies in adapting SSMs for conditional text generation. By treating input sequences as continuous signals, the model bypasses the need to compute pairwise attention scores between every token. This shift reduces computational complexity from $\mathcal{O}(L^2)$ to $\mathcal{O}(L \log L)$, effectively shifting the constraint on document length from hardware memory limits to the availability of long-form data.
Performance and Memory Efficiency
LOCOST was evaluated on long-document summarization tasks, including full-book summarization (e.g., the BookSum dataset). The model demonstrates remarkable efficiency:
- Context Window: LOCOST handles inputs exceeding 600,000 tokens at inference time, far surpassing the limits of standard Transformers.
- Memory Savings: Compared to sparse Transformers of equivalent size, LOCOST reduces memory usage by 50% during training and 87% during inference.
- Competitive Quality: The model retains high summarization quality, achieving 93% to 96% of the performance of the best sparse attention models.
Conclusion and Future Work
LOCOST proves that computationally expensive self-attention is not strictly necessary for high-quality long-document summarization. By utilizing SSMs, the model achieves state-of-the-art results in full-book summarization while being significantly more resource-efficient. This approach opens new avenues for processing massive contexts in other domains, such as multi-document reasoning, genome sequencing, and large-scale codebase analysis. Future research may focus on closing the small performance gap between SSM-based models and sparse attention architectures.
This summary is based on the paper presented at JEP-TALN-RECITAL 2024.
Summary updated