{"about":{"site":"https://codewithpapers.app","non_affiliation":"Code with Papers and Syntology are not affiliated with, endorsed by, or sponsored by Papers with Code, Meta, or the pwc-archive mirror.","licence":"CC BY-SA 4.0","licence_url":"https://creativecommons.org/licenses/by-sa/4.0/legalcode","attribution":"https://codewithpapers.app/attribution","modified":"archive material modified by Syntology; see the attribution page"},"url":"/paper/cluster-former-clustering-based-sparse","title":"Cluster-Former: Clustering-based Sparse Transformer for Long-Range Dependency Encoding","arxiv_id":"2009.06097","date":"2020-09-13","proceeding":null,"authors":["Shuohang Wang","Luowei Zhou","Zhe Gan","Yen-Chun Chen","Yuwei Fang","Siqi Sun","Yu Cheng","Jingjing Liu"],"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.","url_abs":"https://arxiv.org/abs/2009.06097v2","url_pdf":"https://arxiv.org/pdf/2009.06097v2.pdf","source":{"archive":"pwc-archive (Hugging Face), CC BY-SA 4.0","snapshot":"2025-07-28","licence_url":"https://creativecommons.org/licenses/by-sa/4.0/legalcode","row_kind":"abstracts"},"code_links":[],"tasks":[{"task_slug":"clustering","task_name":"Clustering"},{"task_slug":"language-modelling","task_name":"Language Modelling"},{"task_slug":"open-domain-question-answering","task_name":"Open-Domain Question Answering"},{"task_slug":"question-answering","task_name":"Question Answering"}],"methods":[{"method_slug":"adam","method_name":"Adam"},{"method_slug":"attention","method_name":"Attention"},{"method_slug":"attention-dropout","method_name":"Attention Dropout"},{"method_slug":"cosine-annealing","method_name":"Cosine Annealing"},{"method_slug":"dense-connections","method_name":"Dense Connections"},{"method_slug":"dropout","method_name":"Dropout"},{"method_slug":"layer-normalization","method_name":"Layer Normalization"},{"method_slug":"linear-layer","method_name":"Linear Layer"},{"method_slug":"linear-warmup-with-cosine-annealing","method_name":"Linear Warmup With Cosine Annealing"},{"method_slug":"multi-head-attention","method_name":"Multi-Head Attention"},{"method_slug":"residual-connection","method_name":"Residual Connection"},{"method_slug":"softmax","method_name":"Softmax"},{"method_slug":"sparse-transformer","method_name":"Sparse Transformer"},{"method_slug":"weight-decay","method_name":"Weight Decay"}],"datasets_introduced":[],"methods_introduced":[],"results":[{"leaderboard":"/sota/language-modelling-on-enwiki8","task":"Language Modelling","dataset":"enwik8","model":"Cluster-Former (#C=512)","rank_in_archive_order":32,"of":42,"metrics":{"Bit per Character (BPC)":"1.22"},"uses_additional_data":false},{"leaderboard":"/sota/open-domain-question-answering-on-searchqa","task":"Open-Domain Question Answering","dataset":"SearchQA","model":"Cluster-Former (#C=512)","rank_in_archive_order":1,"of":14,"metrics":{"EM":"68.0"},"uses_additional_data":false},{"leaderboard":"/sota/question-answering-on-natural-questions-long","task":"Question Answering","dataset":"Natural Questions (long)","model":"Cluster-Former (#C=512)","rank_in_archive_order":2,"of":13,"metrics":{"F1":"76.5"},"uses_additional_data":false},{"leaderboard":"/sota/question-answering-on-quasart-t","task":"Question Answering","dataset":"Quasart-T","model":"Cluster-Former (#C=512)","rank_in_archive_order":1,"of":7,"metrics":{"EM":"54"},"uses_additional_data":false}],"syntology":{"atlas_url":"https://app.syntology.ai/?focus=2009.06097","mcp":null,"developers":"https://syntology.ai/developers"},"arxiv_metadata":null,"syntology_extracted_results":null}