{"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/rethinking-attention-with-performers","title":"Rethinking Attention with Performers","arxiv_id":"2009.14794","date":"2020-09-30","proceeding":"ICLR 2021 1","authors":["Krzysztof Choromanski","Valerii Likhosherstov","David Dohan","Xingyou Song","Andreea Gane","Tamas Sarlos","Peter Hawkins","Jared Davis","Afroz Mohiuddin","Lukasz Kaiser","David Belanger","Lucy Colwell","Adrian Weller"],"abstract":"We introduce Performers, Transformer architectures which can estimate regular (softmax) full-rank-attention Transformers with provable accuracy, but using only linear (as opposed to quadratic) space and time complexity, without relying on any priors such as sparsity or low-rankness. To approximate softmax attention-kernels, Performers use a novel Fast Attention Via positive Orthogonal Random features approach (FAVOR+), which may be of independent interest for scalable kernel methods. FAVOR+ can be also used to efficiently model kernelizable attention mechanisms beyond softmax. This representational power is crucial to accurately compare softmax with other kernels for the first time on large-scale tasks, beyond the reach of regular Transformers, and investigate optimal attention-kernels. Performers are linear architectures fully compatible with regular Transformers and with strong theoretical guarantees: unbiased or nearly-unbiased estimation of the attention matrix, uniform convergence and low estimation variance. We tested Performers on a rich set of tasks stretching from pixel-prediction through text models to protein sequence modeling. We demonstrate competitive results with other examined efficient sparse and dense attention methods, showcasing effectiveness of the novel attention-learning paradigm leveraged by Performers.","url_abs":"https://arxiv.org/abs/2009.14794v4","url_pdf":"https://arxiv.org/pdf/2009.14794v4.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":[{"paper_slug":"rethinking-attention-with-performers","repo_url":"https://github.com/google-research/google-research","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":0,"framework":"tf","reach":null},{"paper_slug":"rethinking-attention-with-performers","repo_url":"https://github.com/facebookresearch/xformers","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"pytorch","reach":null},{"paper_slug":"rethinking-attention-with-performers","repo_url":"https://github.com/lucidrains/performer-pytorch","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"pytorch","reach":null},{"paper_slug":"rethinking-attention-with-performers","repo_url":"https://github.com/teddykoker/performer","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"none","reach":null},{"paper_slug":"rethinking-attention-with-performers","repo_url":"https://github.com/xl402/performer","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"tf","reach":{"status":"ok","spdx":"MIT"}},{"paper_slug":"rethinking-attention-with-performers","repo_url":"https://github.com/idiap/fast-transformers","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":0,"framework":"pytorch","reach":null},{"paper_slug":"rethinking-attention-with-performers","repo_url":"https://github.com/tensorflow/models/tree/master/official/nlp/modeling","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":0,"framework":"tf","reach":null}],"tasks":[{"task_slug":"d4rl","task_name":"D4RL"},{"task_slug":"image-generation","task_name":"Image Generation"},{"task_slug":"language-modelling","task_name":"Language Modelling"},{"task_slug":"offline-rl","task_name":"Offline RL"}],"methods":[{"method_slug":"absolute-position-encodings","method_name":"Absolute Position Encodings"},{"method_slug":"adam","method_name":"Adam"},{"method_slug":"attention","method_name":"Attention"},{"method_slug":"bpe","method_name":"BPE"},{"method_slug":"dense-connections","method_name":"Dense Connections"},{"method_slug":"dropout","method_name":"Dropout"},{"method_slug":"favor","method_name":"FAVOR+"},{"method_slug":"label-smoothing","method_name":"Label Smoothing"},{"method_slug":"layer-normalization","method_name":"Layer Normalization"},{"method_slug":"linear-layer","method_name":"Linear Layer"},{"method_slug":"multi-head-attention","method_name":"Multi-Head Attention"},{"method_slug":"performer","method_name":"Performer"},{"method_slug":"position-wise-feed-forward-layer","method_name":"Position-Wise Feed-Forward Layer"},{"method_slug":"residual-connection","method_name":"Residual Connection"},{"method_slug":"softmax","method_name":"Softmax"},{"method_slug":"transformer","method_name":"Transformer"}],"datasets_introduced":[],"methods_introduced":[{"slug":"performer","name":"Performer","full_name":"Performer"}],"results":[{"leaderboard":"/sota/d4rl-on-d4rl","task":"D4RL","dataset":"D4RL","model":"Performer","rank_in_archive_order":9,"of":9,"metrics":{"Average Reward":"63.8"},"uses_additional_data":false},{"leaderboard":"/sota/image-generation-on-imagenet-64x64","task":"Image Generation","dataset":"ImageNet 64x64","model":"Performer (12 layers)","rank_in_archive_order":51,"of":65,"metrics":{"Bits per dim":"3.636"},"uses_additional_data":false},{"leaderboard":"/sota/image-generation-on-imagenet-64x64","task":"Image Generation","dataset":"ImageNet 64x64","model":"Performer (6 layers)","rank_in_archive_order":57,"of":65,"metrics":{"Bits per dim":"3.719"},"uses_additional_data":false},{"leaderboard":"/sota/language-modelling-on-wikitext-103","task":"Language Modelling","dataset":"WikiText-103","model":"Performer 125M","rank_in_archive_order":64,"of":89,"metrics":{"Test perplexity":"26.8"},"uses_additional_data":false}],"syntology":{"syntology_url":"https://syntology.ai/paper/2009.14794","atlas_url":"https://app.syntology.ai/?focus=2009.14794","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2009.14794"}},"developers":"https://syntology.ai/developers","read_at":"2026-09-25T09:33:49+00:00","read_at_is":"when the build read Syntology's graph, not when any sample ran","claim":"Per-sample execution status on synthesized fixtures; not a correctness claim about the paper. Samples come from repositories linked to the paper, official or community; repo_kind says which.","repos":[{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/google-research/google-research","reach":null},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/teddykoker/performer","reach":null},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/lucidrains/performer-pytorch","reach":null},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/tensorflow/models/tree/master/official/nlp/modeling","reach":null},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/idiap/fast-transformers","reach":null},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/xl402/performer","reach":{"status":"ok","spdx":"MIT"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/facebookresearch/xformers","reach":null}],"summary":{"ran":6,"ran_fixture":1,"ran_draft_wrong":3,"ran_honours":1,"unverified":5},"by_repo_kind":{"official":{"samples":1,"ran":0,"repositories":1},"listed":{"samples":15,"ran":11,"repositories":4}},"repo_kind_vocabulary":{"official":"The archive marks this repository official for the paper","named_in_paper":"The archive records that the paper mentions this repository; it is not marked official","listed":"In the archive's code links for this paper, not marked official and not recorded as mentioned in the paper","found_in_text":"Syntology found this repository in the paper's own text; whether it is the authors' implementation is not asserted","community":"Not in the archive's code links for this paper; a community repository Syntology harvested"},"n_pointer_only_for_licence":6,"samples":[{"code_sha256_prefix":"6451bb5de4de0afc","entry":"Favor","repo":"idiap/fast-transformers","repo_kind":"listed","path":"fast_transformers/feature_maps/fourier_features.py","file_url":"https://github.com/idiap/fast-transformers/blob/HEAD/fast_transformers/feature_maps/fourier_features.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":"deterministic","behaviour_fingerprint":true,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"6451bb5de4de0afc"}},{"code_sha256_prefix":"7075608a1ad15a59","entry":"FeatureMap","repo":"idiap/fast-transformers","repo_kind":"listed","path":"fast_transformers/feature_maps/fourier_features.py","file_url":"https://github.com/idiap/fast-transformers/blob/HEAD/fast_transformers/feature_maps/fourier_features.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":"deterministic","behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"7075608a1ad15a59"}},{"code_sha256_prefix":"080893f281eb2f9d","entry":"RandomFourierFeatures","repo":"idiap/fast-transformers","repo_kind":"listed","path":"fast_transformers/feature_maps/fourier_features.py","file_url":"https://github.com/idiap/fast-transformers/blob/HEAD/fast_transformers/feature_maps/fourier_features.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":"deterministic","behaviour_fingerprint":true,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"080893f281eb2f9d"}},{"code_sha256_prefix":"58f9da6e70d9e0ad","entry":"build_linear_attention_equation","repo":"xl402/performer","repo_kind":"listed","path":"performer/networks/build_attention.py","file_url":"https://github.com/xl402/performer/blob/HEAD/performer/networks/build_attention.py","link_basis":"harvester_set","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"58f9da6e70d9e0ad"}},{"code_sha256_prefix":"26d17ff60efc0bc4","entry":"build_normalisation_equation","repo":"xl402/performer","repo_kind":"listed","path":"performer/networks/build_attention.py","file_url":"https://github.com/xl402/performer/blob/HEAD/performer/networks/build_attention.py","link_basis":"harvester_set","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"26d17ff60efc0bc4"}},{"code_sha256_prefix":"0b9a5b455433ca64","entry":"causal_linear_attention","repo":"lucidrains/performer-pytorch","repo_kind":"listed","path":"performer_pytorch/performer_pytorch.py","file_url":"https://github.com/lucidrains/performer-pytorch/blob/HEAD/performer_pytorch/performer_pytorch.py","link_basis":"first_harvest_node","language":"python","status":"ran_fixture","verification_level":1,"contract_check":"DEP_MISSING","metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"0b9a5b455433ca64"}},{"code_sha256_prefix":"d512c905ae6d1fb7","entry":"causal_linear_attention_noncuda","repo":"lucidrains/performer-pytorch","repo_kind":"listed","path":"performer_pytorch/performer_pytorch.py","file_url":"https://github.com/lucidrains/performer-pytorch/blob/HEAD/performer_pytorch/performer_pytorch.py","link_basis":"first_harvest_node","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"MISDECLARED","metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"d512c905ae6d1fb7"}},{"code_sha256_prefix":"678cef9796271045","entry":"gaussian_orthogonal_random_matrix","repo":"lucidrains/performer-pytorch","repo_kind":"listed","path":"performer_pytorch/performer_pytorch.py","file_url":"https://github.com/lucidrains/performer-pytorch/blob/HEAD/performer_pytorch/performer_pytorch.py","link_basis":"first_harvest_node","language":"python","status":"ran_honours","verification_level":1,"contract_check":"HONOURS","metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"678cef9796271045"}},{"code_sha256_prefix":"d859f1b3d3c7f242","entry":"null_context","repo":"lucidrains/performer-pytorch","repo_kind":"listed","path":"performer_pytorch/performer_pytorch.py","file_url":"https://github.com/lucidrains/performer-pytorch/blob/HEAD/performer_pytorch/performer_pytorch.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"d859f1b3d3c7f242"}},{"code_sha256_prefix":"d10e6f7a10a8b0d9","entry":"phi","repo":"teddykoker/performer","repo_kind":"listed","path":"performer.py","file_url":"https://github.com/teddykoker/performer/blob/HEAD/performer.py","link_basis":"first_harvest_node","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"OUTPUT_MISDECLARED","metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"d10e6f7a10a8b0d9"}},{"code_sha256_prefix":"829218b2f7e9682c","entry":"softmax_kernel","repo":"lucidrains/performer-pytorch","repo_kind":"listed","path":"performer_pytorch/performer_pytorch.py","file_url":"https://github.com/lucidrains/performer-pytorch/blob/HEAD/performer_pytorch/performer_pytorch.py","link_basis":"first_harvest_node","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"MISDECLARED","metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"829218b2f7e9682c"}},{"code_sha256_prefix":"03ed65c20de38e07","entry":"FastAttention","repo":"lucidrains/performer-pytorch","repo_kind":"listed","path":"performer_pytorch/performer_pytorch.py","file_url":"https://github.com/lucidrains/performer-pytorch/blob/HEAD/performer_pytorch/performer_pytorch.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"03ed65c20de38e07"}},{"code_sha256_prefix":"d8628e15a7dc6add","entry":"att_hat","repo":"teddykoker/performer","repo_kind":"listed","path":"performer.py","file_url":"https://github.com/teddykoker/performer/blob/HEAD/performer.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"d8628e15a7dc6add"}},{"code_sha256_prefix":"5e7a65b62164cc36","entry":"build_quadratic_attention_equation","repo":"xl402/performer","repo_kind":"listed","path":"performer/networks/build_attention.py","file_url":"https://github.com/xl402/performer/blob/HEAD/performer/networks/build_attention.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"5e7a65b62164cc36"}},{"code_sha256_prefix":"5365366fdf3b6d3b","entry":"get_fixed_sin_cos_encodings","repo":"google-research/google-research","repo_kind":"official","path":"COSTAR/src/models/utils_transformer.py","file_url":"https://github.com/google-research/google-research/blob/HEAD/COSTAR/src/models/utils_transformer.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":"RAISES","metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"5365366fdf3b6d3b"}},{"code_sha256_prefix":"39aea8b96624e6f3","entry":"orthogonal_random_matrix_","repo":"idiap/fast-transformers","repo_kind":"listed","path":"fast_transformers/feature_maps/fourier_features.py","file_url":"https://github.com/idiap/fast-transformers/blob/HEAD/fast_transformers/feature_maps/fourier_features.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"39aea8b96624e6f3"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}