{"about":{"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.","site":"https://codewithpapers.app","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","syntology":{"site":"https://syntology.ai","developers":"https://syntology.ai/developers","mcp":{"server":"https://syntology.ai/mcp","transport":"streamable-http","server_card":"https://syntology.ai/.well-known/mcp/server-card.json","auth":{"type":"trial token, no account","trial_token":"https://syntology.ai/api/oauth/trial/token","method":"POST","docs":"https://syntology.ai/developers"}},"have":"https://syntology.ai/api/graph/have?x=<method, arXiv id or title> (free, answers coverage only)","paper_base":"https://syntology.ai/paper/","atlas_base":"https://app.syntology.ai/?focus="},"machine_readable":[{"url":"https://codewithpapers.app/llms.txt","what":"the machine catalog: every machine-readable file, counted"},{"url":"https://codewithpapers.app/index/manifest.json","what":"paper-to-code index by arXiv id, with Syntology's counts"},{"url":"https://codewithpapers.app/search/manifest.json","what":"site search index (titles, authors) and its files"},{"url":"https://codewithpapers.app/download","what":"bulk files: Syntology's layer, described there"},{"url":"https://codewithpapers.app/build_manifest.json","what":"the build record: inputs, counts, exclusions, probes"}]},"url":"/method/multi-head-linear-attention","slug":"multi-head-linear-attention","name":"Multi-Head Linear Attention","full_name":"Multi-Head Linear Attention","full_name_withheld":false,"description_markdown":"**Multi-Head Linear Attention** is a type of linear multi-head self-attention module, proposed with the [Linformer](https://paperswithcode.com/method/linformer) architecture. The main idea is to add two linear projection matrices $E\\_{i}, F\\_{i} \\in \\mathbb{R}^{n\\times{k}}$ when computing key and value. We first project the original $\\left(n \\times d\\right)$-dimensional key and value layers $KW\\_{i}^{K}$ and $VW\\_{i}^{V}$ into $\\left(k\\times{d}\\right)$-dimensional projected key and value layers. We then compute a $\\left(n\\times{k}\\right)$ dimensional context mapping $\\bar{P}$ using scaled-dot product attention:\r\n\r\n$$ \\bar{\\text{head}\\_{i}} = \\text{Attention}\\left(QW^{Q}\\_{i}, E\\_{i}KW\\_{i}^{K}, F\\_{i}VW\\_{i}^{V}\\right) $$\r\n\r\n$$ \\bar{\\text{head}\\_{i}} = \\text{softmax}\\left(\\frac{QW^{Q}\\_{i}\\left(E\\_{i}KW\\_{i}^{K}\\right)^{T}}{\\sqrt{d\\_{k}}}\\right) \\cdot F\\_{i}VW\\_{i}^{V} $$\r\n\r\nFinally, we compute context embeddings for each head using $\\bar{P} \\cdot \\left(F\\_{i}{V}W\\_{i}^{V}\\right)$.","description_state":"present","introduced_year":null,"introduced_by":{"title":"Linformer: Self-Attention with Linear Complexity","paper":"/paper/linformer-self-attention-with-linear","first_author":"Sinong Wang","n_authors":5,"url_abs":null,"archive_paper_url":"https://paperswithcode.com/paper/linformer-self-attention-with-linear"},"source":{"url":"https://arxiv.org/abs/2006.04768v3","title":"Linformer: Self-Attention with Linear Complexity","url_on_a_paper_host":true},"code_snippet_url":"https://github.com/tatp22/linformer-pytorch/blob/3f71fe757ea8c19135880414e707701b24de27f1/linformer_pytorch/linformer_pytorch.py#L173","code_snippet_url_on_a_code_host":true,"categories":[{"area":"General","area_id":"general","collection":"Attention Modules","url":"/methods/category/attention-modules","pwc_aliases":[]}],"n_papers_tagged":24,"archive_num_papers":24,"papers_newest_first":[{"paper":null,"slug":"facelivt-face-recognition-using-linear-vision","title":"FaceLiVT: Face Recognition using Linear Vision Transformer with Structural Reparameterization For Mobile Device","date":"2025-06-12","arxiv_id":"2506.10361","n_code_links":0,"syntology":null},{"paper":null,"slug":"cacheformer-high-attention-based-segment","title":"CacheFormer: High Attention-Based Segment Caching","date":"2025-04-18","arxiv_id":"2504.13981","n_code_links":0,"syntology":null},{"paper":null,"slug":"hiif-hierarchical-encoding-based-implicit","title":"HIIF: Hierarchical Encoding based Implicit Image Function for Continuous Super-resolution","date":"2024-12-04","arxiv_id":"2412.03748","n_code_links":0,"syntology":null},{"paper":null,"slug":"linformer-a-linear-based-lightweight","title":"LinFormer: A Linear-based Lightweight Transformer Architecture For Time-Aware MIMO Channel Prediction","date":"2024-10-28","arxiv_id":"2410.21351","n_code_links":0,"syntology":null},{"paper":"/paper/joint-fine-tuning-and-conversion-of","slug":"joint-fine-tuning-and-conversion-of","title":"Joint Fine-tuning and Conversion of Pretrained Speech and Language Models towards Linear Complexity","date":"2024-10-09","arxiv_id":"2410.06846","n_code_links":1,"syntology":{"ran":5,"of":5,"n_ran_checked":1,"n_instrument":4,"unverified":0,"pointer_only":0,"phrase":"5 ran (of which 0 constructed an object rather than computing a result; 1 with no instrument failure: 0 honoured, 0 violated, 1 with no contract checked; 4 where Syntology's instrument failed) · 0 unverified","official":{"repos":["idiap/linearize-distill-pretrained-transformers"],"state":"official (archive's flag): 5 ran","n_ran":5,"n_constructed":0,"n_ran_no_instrument_failure":1,"n_unverified":0,"ran_from_kinds":["official"]}}},{"paper":null,"slug":"glmha-a-guided-low-rank-multi-head-self","title":"GLMHA A Guided Low-rank Multi-Head Self-Attention for Efficient Image Restoration and Spectral Reconstruction","date":"2024-10-01","arxiv_id":"2410.00380","n_code_links":0,"syntology":null},{"paper":"/paper/attention-as-a-hypernetwork","slug":"attention-as-a-hypernetwork","title":"Attention as a Hypernetwork","date":"2024-06-09","arxiv_id":"2406.05816","n_code_links":1,"syntology":{"ran":1,"of":1,"n_ran_checked":1,"n_instrument":0,"unverified":0,"pointer_only":0,"phrase":"1 ran (of which 0 constructed an object rather than computing a result; 1 with no instrument failure: 1 honoured, 0 violated, 0 with no contract checked; 0 where Syntology's instrument failed) · 0 unverified","official":{"repos":["smonsays/hypernetwork-attention"],"state":"official (archive's flag): 1 ran","n_ran":1,"n_constructed":0,"n_ran_no_instrument_failure":1,"n_unverified":0,"ran_from_kinds":["official"]}}},{"paper":null,"slug":"sumformer-universal-approximation-for","title":"Sumformer: Universal Approximation for Efficient Transformers","date":"2023-07-05","arxiv_id":"2307.02301","n_code_links":0,"syntology":null},{"paper":"/paper/road-barlow-twins-redundancy-reduction-for","slug":"road-barlow-twins-redundancy-reduction-for","title":"RedMotion: Motion Prediction via Redundancy Reduction","date":"2023-06-19","arxiv_id":"2306.10840","n_code_links":3,"syntology":{"ran":1,"of":1,"n_ran_checked":0,"n_instrument":1,"unverified":0,"pointer_only":1,"phrase":"1 ran (of which 0 constructed an object rather than computing a result; 0 with no instrument failure: 0 honoured, 0 violated, 0 with no contract checked; 1 where Syntology's instrument failed) · 0 unverified","official":{"repos":["kit-mrt/red-motion","kit-mrt/road-barlow-twins","kit-mrt/future-motion"],"state":"official (archive's flag): 1 ran","n_ran":1,"n_constructed":0,"n_ran_no_instrument_failure":0,"n_unverified":0,"ran_from_kinds":["official"]}}},{"paper":null,"slug":"umat-uncertainty-aware-single-image-high-1","title":"UMat: Uncertainty-Aware Single Image High Resolution Material Capture","date":"2023-05-25","arxiv_id":"2305.16312","n_code_links":0,"syntology":null},{"paper":"/paper/mpcvit-searching-for-mpc-friendly-vision","slug":"mpcvit-searching-for-mpc-friendly-vision","title":"MPCViT: Searching for Accurate and Efficient MPC-Friendly Vision Transformer with Heterogeneous Attention","date":"2022-11-25","arxiv_id":"2211.13955","n_code_links":1,"syntology":null},{"paper":null,"slug":"treeformer-dense-gradient-trees-for-efficient","title":"Treeformer: Dense Gradient Trees for Efficient Attention Computation","date":"2022-08-18","arxiv_id":"2208.09015","n_code_links":0,"syntology":null},{"paper":null,"slug":"rethinking-attention-mechanism-in-time-series","title":"Rethinking Attention Mechanism in Time Series Classification","date":"2022-07-14","arxiv_id":"2207.07564","n_code_links":0,"syntology":null},{"paper":null,"slug":"linearizing-transformer-with-key-value-memory","title":"Linearizing Transformer with Key-Value Memory","date":"2022-03-23","arxiv_id":"2203.12644","n_code_links":0,"syntology":null},{"paper":"/paper/sketching-as-a-tool-for-understanding-and","slug":"sketching-as-a-tool-for-understanding-and","title":"Sketching as a Tool for Understanding and Accelerating Self-attention for Long Sequences","date":"2021-12-10","arxiv_id":"2112.05359","n_code_links":1,"syntology":null},{"paper":null,"slug":"greenformers-improving-computation-and-memory","title":"Greenformers: Improving Computation and Memory Efficiency in Transformer Models via Low-Rank Approximation","date":"2021-08-24","arxiv_id":"2108.10808","n_code_links":0,"syntology":null},{"paper":"/paper/vision-xformers-efficient-attention-for-image","slug":"vision-xformers-efficient-attention-for-image","title":"Vision Xformers: Efficient Attention for Image Classification","date":"2021-07-05","arxiv_id":"2107.02239","n_code_links":2,"syntology":null},{"paper":"/paper/styleformer-transformer-based-generative","slug":"styleformer-transformer-based-generative","title":"Styleformer: Transformer based Generative Adversarial Networks with Style Vector","date":"2021-06-13","arxiv_id":"2106.07023","n_code_links":3,"syntology":{"ran":4,"of":4,"n_ran_checked":3,"n_instrument":1,"unverified":0,"pointer_only":4,"phrase":"4 ran (of which 0 constructed an object rather than computing a result; 3 with no instrument failure: 2 honoured, 1 violated, 0 with no contract checked; 1 where Syntology's instrument failed) · 0 unverified","official":{"repos":["Jeeseung-Park/Styleformer","younggeun-kim/Styleformer"],"state":"official (archive's flag): 4 ran","n_ran":4,"n_constructed":0,"n_ran_no_instrument_failure":3,"n_unverified":0,"ran_from_kinds":["official"]}}},{"paper":null,"slug":"self-supervised-depth-estimation-leveraging","title":"Self-supervised Depth Estimation Leveraging Global Perception and Geometric Smoothness Using On-board Videos","date":"2021-06-07","arxiv_id":"2106.03505","n_code_links":0,"syntology":null},{"paper":null,"slug":"a-practical-survey-on-faster-and-lighter","title":"A Practical Survey on Faster and Lighter Transformers","date":"2021-03-26","arxiv_id":"2103.14636","n_code_links":0,"syntology":null},{"paper":null,"slug":"multi-head-linear-attention-generative","title":"Multi-Head Linear Attention Generative Adversarial Network for Thin Cloud Removal","date":"2020-12-20","arxiv_id":"2012.10898","n_code_links":0,"syntology":null},{"paper":null,"slug":"revisiting-linformer-with-a-modified-self","title":"Revisiting Linformer with a modified self-attention with linear complexity","date":"2020-12-16","arxiv_id":"2101.10277","n_code_links":0,"syntology":null},{"paper":null,"slug":"efficient-transformers-a-survey","title":"Efficient Transformers: A Survey","date":"2020-09-14","arxiv_id":"2009.06732","n_code_links":0,"syntology":null},{"paper":"/paper/linformer-self-attention-with-linear","slug":"linformer-self-attention-with-linear","title":"Linformer: Self-Attention with Linear Complexity","date":"2020-06-08","arxiv_id":"2006.04768","n_code_links":3,"syntology":{"ran":3,"of":4,"n_ran_checked":2,"n_instrument":1,"unverified":1,"pointer_only":2,"phrase":"3 ran (of which 0 constructed an object rather than computing a result; 2 with no instrument failure: 1 honoured, 1 violated, 0 with no contract checked; 1 where Syntology's instrument failed) · 1 unverified","official":{"repos":["facebookresearch/fairseq"],"state":"official: no sample here; runs from other or unrecorded repositories","n_ran":0,"n_constructed":0,"n_ran_no_instrument_failure":0,"n_unverified":0,"ran_from_kinds":["listed","unlocated"]}}}],"papers_shown":24,"papers_order":"date (newest first), then slug","paper_counts":{"archive_papers_tagged":24,"with_a_code_link":8,"where_syntology_ran_a_sample":5,"not_listed_spam_title":0,"listed":24,"listed_where_code_ran":5,"where_syntology_ran_a_sample_split":{"with_a_run_with_no_instrument_failure":4,"every_run_a_failure_of_syntologys_instrument":1,"listed_with_a_run_with_no_instrument_failure":4,"listed_every_run_a_failure_of_syntologys_instrument":1,"filter":{"states":["a run with no instrument failure","any run, instrument failures included"],"default":"a run with no instrument failure","note":"on the 'only where code ran' pages the default hides, in the browser, the rows where every run was a failure of Syntology's instrument; the second state shows them again. Rows are hidden, never re-ordered; these twins list every row"}},"definition":"distinct papers the archive tags; 'where Syntology ran a sample' counts papers with at least one harvested sample that ran, which is not a correctness claim"},"papers_where_code_ran":5,"papers_where_code_ran_first_page":"/method/multi-head-linear-attention/papers/ran/1","papers_where_code_ran_caption":"We ran code from the paper's repository; we did not isolate this method inside it.","pages":[{"order":"ran","page":1,"of":1,"url":"/method/multi-head-linear-attention/papers/ran/1","json":"/method/multi-head-linear-attention/papers/ran/1.json","rows":5}],"tasks":[{"task":"/task/knowledge-distillation","name":"Knowledge Distillation","papers":3},{"task":"/task/language-modelling","name":"Language Modelling","papers":3},{"task":"/task/classification-1","name":"Classification","papers":2},{"task":null,"name":"GPU","papers":2},{"task":"/task/language-modeling","name":"Language Modeling","papers":2},{"task":"/task/prediction","name":"Prediction","papers":2},{"task":"/task/survey","name":"Survey","papers":2},{"task":"/task/abstractive-text-summarization","name":"Abstractive Text Summarization","papers":1},{"task":"/task/active-learning","name":"Active Learning","papers":1},{"task":"/task/autonomous-driving","name":"Autonomous Driving","papers":1},{"task":"/task/cloud-removal","name":"Cloud Removal","papers":1},{"task":"/task/data-augmentation","name":"Data Augmentation","papers":1},{"task":"/task/deblurring","name":"Deblurring","papers":1},{"task":"/task/decoder","name":"Decoder","papers":1},{"task":"/task/depth-estimation","name":"Depth Estimation","papers":1},{"task":"/task/face-recognition","name":"Face Recognition","papers":1},{"task":null,"name":"Generative Adversarial Network","papers":1},{"task":"/task/image-classification","name":"Image Classification","papers":1},{"task":"/task/image-generation","name":"Image Generation","papers":1},{"task":"/task/image-restoration","name":"Image Restoration","papers":1}],"tasks_shown":20,"n_tasks":48,"usage_by_year":[{"year":"2020","papers":4},{"year":"2021","papers":6},{"year":"2022","papers":4},{"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/multi-head-linear-attention"},"syntology_read_at":"2026-10-05T00:36:11+00:00","syntology":{"source":"Syntology's have check for this name (the free coverage lookup), read from Syntology's graph","have_url":"https://syntology.ai/api/graph/have?x=Multi-Head%20Linear%20Attention","read_at":"2026-10-05T00:59:24+00:00","query":"Multi-Head Linear Attention","kind":"method","have":"unknown_name","tier":null,"verified_implementation":null,"level":null,"level_meaning":"the served verification level, per answer; never summed across methods","resolved_to":null,"resolution":null,"resolved_name_differs":false,"absence_asserted":false,"absence_unchecked":null,"no_code_is_about_this_method":false,"subject":null,"archive_paper_arxiv_id":"2006.04768","repositories":null,"retrieve_with":null,"name_competition":{"verdict":"none","may_be_wrong_sense":false,"bearers_found":0,"served":null,"leading_other_bearer":null,"n_other_bearers_listed":0,"note":"Nothing in this corpus is named 'Multi-Head Linear Attention' -- no method node, no paper announcing it in its title, no expanded form declaring it as an acronym."},"name_competition_text":null,"near_matches":["Multi-Head Knowledge Attention","Multihead Low-Rank Attention (MLRA)","Multi-head Attention Fusion Network","multi-head attention neural network","Gaussian Multi-head Attention (GMA)","Multi-head Explicit Attention (MEA)","Multi-Head Tropical Attention (MHTA)","Multi-Head Low-Rank Attention (MLRA)"],"code_nearby":[],"code_nearby_caption":null,"origin_paper":null,"line":"name not resolved (unknown_name). The lookup matched no method, paper or venue by this name; that asserts nothing about whether code exists.","level_legend":null},"syntology_have_state":"loaded","record_sha256":"d61d31f945642d14711bb18bd8af1e5a2d15ec8f158631e73ba352638550a87d","record_changed_at":"2026-10-05","record_changed_at_basis":"changed"}