{"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/normalized-attention-without-probability-cage","title":"Normalized Attention Without Probability Cage","arxiv_id":"2005.09561","date":"2020-05-19","proceeding":null,"authors":["Oliver Richter","Roger Wattenhofer"],"abstract":"Attention architectures are widely used; they recently gained renewed popularity with Transformers yielding a streak of state of the art results. Yet, the geometrical implications of softmax-attention remain largely unexplored. In this work we highlight the limitations of constraining attention weights to the probability simplex and the resulting convex hull of value vectors. We show that Transformers are sequence length dependent biased towards token isolation at initialization and contrast Transformers to simple max- and sum-pooling - two strong baselines rarely reported. We propose to replace the softmax in self-attention with normalization, yielding a hyperparameter and data-bias robust, generally applicable architecture. We support our insights with empirical results from more than 25,000 trained models. All results and implementations are made available.","url_abs":"https://arxiv.org/abs/2005.09561v1","url_pdf":"https://arxiv.org/pdf/2005.09561v1.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":"normalized-attention-without-probability-cage","repo_url":"https://github.com/OliverRichter/normalized-attention","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":0,"framework":"tf","reach":{"status":"ok"}},{"paper_slug":"normalized-attention-without-probability-cage","repo_url":"https://github.com/lucidrains/all-normalization-transformer","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"pytorch","reach":null}],"tasks":[],"methods":[{"method_slug":"softmax","method_name":"Softmax"}],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"atlas_url":"https://app.syntology.ai/?focus=2005.09561","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2005.09561"}},"developers":"https://syntology.ai/developers","read_at":"2026-09-24T18:15:14+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/lucidrains/all-normalization-transformer","reach":null},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/OliverRichter/normalized-attention","reach":{"status":"ok"}}],"summary":{"ran_violates":1,"ran_honours":2,"ran_draft_wrong":1,"ran_fixture":1},"by_repo_kind":{"listed":{"samples":5,"ran":5,"repositories":1}},"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":0,"samples":[{"code_sha256_prefix":"27a2c9aae4bdb7fe","entry":"causal_normalize","repo":"lucidrains/all-normalization-transformer","repo_kind":"listed","path":"all_normalization_transformer/all_normalization_transformer.py","file_url":"https://github.com/lucidrains/all-normalization-transformer/blob/HEAD/all_normalization_transformer/all_normalization_transformer.py","link_basis":"first_harvest_node","language":"python","status":"ran_violates","verification_level":1,"contract_check":"VIOLATES","metamorphic_tier":"invariant","behaviour_fingerprint":true,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"27a2c9aae4bdb7fe"}},{"code_sha256_prefix":"f205d74f98f430f5","entry":"cum_mean","repo":"lucidrains/all-normalization-transformer","repo_kind":"listed","path":"all_normalization_transformer/all_normalization_transformer.py","file_url":"https://github.com/lucidrains/all-normalization-transformer/blob/HEAD/all_normalization_transformer/all_normalization_transformer.py","link_basis":"first_harvest_node","language":"python","status":"ran_honours","verification_level":1,"contract_check":"HONOURS","metamorphic_tier":"invariant","behaviour_fingerprint":true,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"f205d74f98f430f5"}},{"code_sha256_prefix":"068b17b5ae41f738","entry":"decode_token","repo":"lucidrains/all-normalization-transformer","repo_kind":"listed","path":"train_enwik8.py","file_url":"https://github.com/lucidrains/all-normalization-transformer/blob/HEAD/train_enwik8.py","link_basis":"first_harvest_node","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"OUTPUT_MISDECLARED","metamorphic_tier":"deterministic","behaviour_fingerprint":true,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"068b17b5ae41f738"}},{"code_sha256_prefix":"eecbbddb3f150af3","entry":"decode_tokens","repo":"lucidrains/all-normalization-transformer","repo_kind":"listed","path":"train_enwik8.py","file_url":"https://github.com/lucidrains/all-normalization-transformer/blob/HEAD/train_enwik8.py","link_basis":"first_harvest_node","language":"python","status":"ran_fixture","verification_level":1,"contract_check":"RAISES","metamorphic_tier":"deterministic","behaviour_fingerprint":true,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"eecbbddb3f150af3"}},{"code_sha256_prefix":"1d4fa3c94a2cfb82","entry":"normalize","repo":"lucidrains/all-normalization-transformer","repo_kind":"listed","path":"all_normalization_transformer/all_normalization_transformer.py","file_url":"https://github.com/lucidrains/all-normalization-transformer/blob/HEAD/all_normalization_transformer/all_normalization_transformer.py","link_basis":"first_harvest_node","language":"python","status":"ran_honours","verification_level":1,"contract_check":"HONOURS","metamorphic_tier":"invariant","behaviour_fingerprint":true,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"1d4fa3c94a2cfb82"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}