Cluster-Former: Clustering-based Sparse Transformer for Long-Range Dependency Encoding
arXiv:2009.06097
Abstract
Transformer has become ubiquitous in the deep learning field. One of the key ingredients that destined its success is the self-attention mechanism, which allows fully-connected contextual encoding over input tokens. However, despite its effectiveness in modeling short sequences, self-attention suffers when handling inputs with extreme long-range dependencies, as its complexity grows quadratically with respect to the sequence length. Therefore, long sequences are often encoded by Transformer in chunks using a sliding window. In this paper, we propose Cluster-Former, a novel clustering-based sparse Transformer to perform attention across chunked sequences. The proposed framework is pivoted on two unique types of Transformer layer: Sliding-Window Layer and Cluster-Former Layer, which encode local sequence information and global context jointly and iteratively. This new design allows information integration beyond local windows, which is especially beneficial for question answering (QA) tasks that rely on long-range dependencies. Experiments show that Cluster-Former achieves state-of-the-art performance on several major QA benchmarks.
arXiv commentACL Findings 2021, 11 pages
References in corpus (13)
- Longformer: The Long-Document Transformer
- Linformer: Self-Attention with Linear Complexity
- Generating Long Sequences with Sparse Transformers
- SearchQA: A New Q&A Dataset Augmented with Context from a Search Engine
- Reformer: The Efficient Transformer
- Big Bird: Transformers for Longer Sequences
- Synthesizer: Rethinking Self-Attention in Transformer Models
- Quasar: Datasets for Question Answering by Search and Reading
- A BERT Baseline for the Natural Questions
- Sparse Sinkhorn Attention
- Compressive Transformers for Long-Range Sequence Modelling
- Densely Connected Attention Propagation for Reading Comprehension
- Masked Language Modeling for Proteins via Linearly Scalable Long-Context Transformers