{"url":"/method/routed-attention","slug":"routed-attention","name":"Routing Attention","full_name":"Routing Attention","full_name_withheld":false,"description_markdown":"**Routed Attention** is an attention pattern proposed as part of the [Routing Transformer](https://paperswithcode.com/method/routing-transformer) architecture.  Each attention module\r\nconsiders a clustering of the space: the current timestep only attends to context belonging to the same cluster. In other word, the current time-step query is routed to a limited number of context through its cluster assignment. This can be contrasted with [strided](https://paperswithcode.com/method/strided-attention) attention patterns and those proposed with the [Sparse Transformer](https://paperswithcode.com/method/sparse-transformer).\r\n\r\nIn the image to the right, the rows represent the outputs while the columns represent the inputs. The different colors represent cluster memberships for the output token.","description_state":"present","introduced_year":null,"introduced_by":{"title":"Efficient Content-Based Sparse Attention with Routing Transformers","paper":"/paper/efficient-content-based-sparse-attention-with-1","first_author":"Aurko Roy","n_authors":4,"url_abs":null,"archive_paper_url":"https://paperswithcode.com/paper/efficient-content-based-sparse-attention-with-1"},"source":{"url":"https://arxiv.org/abs/2003.05997v5","title":"Efficient Content-Based Sparse Attention with Routing Transformers","url_on_a_paper_host":true},"code_snippet_url":"https://github.com/lucidrains/routing-transformer/blob/bb572b6efe533ac30f30e495fc41e0454b21736e/routing_transformer/routing_transformer.py#L247","code_snippet_url_on_a_code_host":true,"categories":[{"area":"Natural Language Processing","area_id":"natural-language-processing","collection":"Attention Patterns","url":"/methods/category/attention-patterns","pwc_aliases":["factorized-attention"]}],"n_papers_tagged":13,"archive_num_papers":13,"papers_newest_first":[{"paper":null,"title":"Lightweight Relational Embedding in Task-Interpolated Few-Shot Networks for Enhanced Gastrointestinal Disease Classification","date":"2025-05-30","arxiv_id":"2505.24792","n_code_links":0,"syntology":null},{"paper":"/paper/cl-mfap-a-contrastive-learning-based","title":"CL-MFAP: A Contrastive Learning-Based Multimodal Foundation Model for Molecular Property Prediction and Antibiotic Screening","date":"2025-02-16","arxiv_id":"2502.11001","n_code_links":1,"syntology":{"ran":0,"of":1,"unverified":1,"pointer_only":1}},{"paper":"/paper/hybrid-attention-network-an-efficient","title":"HYATT-Net is Grand: A Hybrid Attention Network for Performant Anatomical Landmark Detection","date":"2024-12-09","arxiv_id":"2412.06499","n_code_links":1,"syntology":null},{"paper":null,"title":"Pubic Symphysis-Fetal Head Segmentation Network Using BiFormer Attention Mechanism and Multipath Dilated Convolution","date":"2024-10-14","arxiv_id":"2410.10352","n_code_links":0,"syntology":null},{"paper":"/paper/debiformer-vision-transformer-with-deformable","title":"DeBiFormer: Vision Transformer with Deformable Agent Bi-level Routing Attention","date":"2024-10-11","arxiv_id":"2410.08582","n_code_links":1,"syntology":null},{"paper":null,"title":"Vision Transformer with Key-select Routing Attention for Single Image Dehazing","date":"2024-06-28","arxiv_id":"2406.19703","n_code_links":0,"syntology":null},{"paper":"/paper/brau-net-u-shaped-hybrid-cnn-transformer","title":"BRAU-Net++: U-Shaped Hybrid CNN-Transformer Network for Medical Image Segmentation","date":"2024-01-01","arxiv_id":"2401.00722","n_code_links":1,"syntology":null},{"paper":null,"title":"Pubic Symphysis-Fetal Head Segmentation Using Pure Transformer with Bi-level Routing Attention","date":"2023-09-30","arxiv_id":"2310.00289","n_code_links":0,"syntology":null},{"paper":"/paper/bgf-yolo-enhanced-yolov8-with-multiscale","title":"BGF-YOLO: Enhanced YOLOv8 with Multiscale Attentional Feature Fusion for Brain Tumor Detection","date":"2023-09-22","arxiv_id":"2309.12585","n_code_links":1,"syntology":null},{"paper":"/paper/student-classroom-behavior-detection-based-on","title":"Student Classroom Behavior Detection based on YOLOv7-BRA and Multi-Model Fusion","date":"2023-05-13","arxiv_id":"2305.07825","n_code_links":1,"syntology":null},{"paper":null,"title":"Hybrid Routing Transformer for Zero-Shot Learning","date":"2022-03-29","arxiv_id":"2203.15310","n_code_links":0,"syntology":null},{"paper":"/paper/hurdles-to-progress-in-long-form-question","title":"Hurdles to Progress in Long-form Question Answering","date":"2021-03-10","arxiv_id":"2103.06332","n_code_links":2,"syntology":null},{"paper":"/paper/efficient-content-based-sparse-attention-with-1","title":"Efficient Content-Based Sparse Attention with Routing Transformers","date":"2020-03-12","arxiv_id":"2003.05997","n_code_links":2,"syntology":{"ran":3,"of":3,"unverified":0,"pointer_only":2}}],"papers_shown":13,"tasks":[{"task":"/task/decoder","name":"Decoder","papers":3},{"task":"/task/segmentation","name":"Segmentation","papers":3},{"task":"/task/semantic-segmentation","name":"Semantic Segmentation","papers":3},{"task":"/task/image-segmentation","name":"Image Segmentation","papers":2},{"task":"/task/object-detection","name":"Object Detection","papers":2},{"task":"/task/object-detection-1","name":"object-detection","papers":2},{"task":"/task/2d-object-detection","name":"2D Object Detection","papers":1},{"task":"/task/anatomical-landmark-detection","name":"Anatomical Landmark Detection","papers":1},{"task":"/task/anatomy","name":"Anatomy","papers":1},{"task":"/task/attribute","name":"Attribute","papers":1},{"task":"/task/computational-efficiency","name":"Computational Efficiency","papers":1},{"task":"/task/contrastive-learning","name":"Contrastive Learning","papers":1},{"task":"/task/diagnostic","name":"Diagnostic","papers":1},{"task":"/task/few-shot-learning","name":"Few-Shot Learning","papers":1},{"task":"/task/form","name":"Form","papers":1},{"task":"/task/image-classification","name":"Image Classification","papers":1},{"task":"/task/image-dehazing","name":"Image Dehazing","papers":1},{"task":"/task/image-generation","name":"Image Generation","papers":1},{"task":"/task/language-modeling","name":"Language Modeling","papers":1},{"task":"/task/language-modelling","name":"Language Modelling","papers":1}],"tasks_shown":20,"n_tasks":37,"usage_by_year":[{"year":"2020","papers":1},{"year":"2021","papers":1},{"year":"2022","papers":1},{"year":"2023","papers":3},{"year":"2024","papers":5},{"year":"2025","papers":2}],"row_source":"methods_table","archive":{"source":"pwc-archive (Hugging Face), CC BY-SA 4.0","snapshot":"2025-07-28","archive_url":"https://paperswithcode.com/method/routed-attention"},"syntology_read_at":"2026-09-24T18:15:14+00:00"}