{"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/outliers-dimensions-that-disrupt-transformers","title":"Outliers Dimensions that Disrupt Transformers Are Driven by Frequency","arxiv_id":"2205.11380","date":"2022-05-23","proceeding":null,"authors":["Giovanni Puccetti","Anna Rogers","Aleksandr Drozd","Felice Dell'Orletta"],"abstract":"While Transformer-based language models are generally very robust to pruning, there is the recently discovered outlier phenomenon: disabling only 48 out of 110M parameters in BERT-base drops its performance by nearly 30% on MNLI. We replicate the original evidence for the outlier phenomenon and we link it to the geometry of the embedding space. We find that in both BERT and RoBERTa the magnitude of hidden state coefficients corresponding to outlier dimensions correlates with the frequency of encoded tokens in pre-training data, and it also contributes to the \"vertical\" self-attention pattern enabling the model to focus on the special tokens. This explains the drop in performance from disabling the outliers, and it suggests that to decrease anisotropicity in future models we need pre-training schemas that would better take into account the skewed token distributions.","url_abs":"https://arxiv.org/abs/2205.11380v3","url_pdf":"https://arxiv.org/pdf/2205.11380v3.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":"outliers-dimensions-that-disrupt-transformers","repo_url":"https://github.com/gpucce/outliersvsfreq","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":0,"framework":"pytorch","reach":{"status":"ok","spdx":"Apache-2.0"}}],"tasks":[],"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":"attention-dropout","method_name":"Attention Dropout"},{"method_slug":"bert","method_name":"BERT"},{"method_slug":"bpe","method_name":"BPE"},{"method_slug":"dense-connections","method_name":"Dense Connections"},{"method_slug":"dropout","method_name":"Dropout"},{"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":"linear-warmup-with-linear-decay","method_name":"Linear Warmup With Linear Decay"},{"method_slug":"multi-head-attention","method_name":"Multi-Head Attention"},{"method_slug":"position-wise-feed-forward-layer","method_name":"Position-Wise Feed-Forward Layer"},{"method_slug":"residual-connection","method_name":"Residual Connection"},{"method_slug":"roberta","method_name":"RoBERTa"},{"method_slug":"softmax","method_name":"Softmax"},{"method_slug":"transformer","method_name":"Transformer"},{"method_slug":"weight-decay","method_name":"Weight Decay"},{"method_slug":"wordpiece","method_name":"WordPiece"}],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"atlas_url":"https://app.syntology.ai/?focus=2205.11380","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2205.11380"}},"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/gpucce/outliersvsfreq","reach":{"status":"ok","spdx":"Apache-2.0"}}],"summary":{"unverified":16},"by_repo_kind":{"official":{"samples":16,"ran":0,"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":"1b51980570480603","entry":"corr_freq","repo":"gpucce/outliersvsfreq","repo_kind":"official","path":"outliersvsfreq/pyplot/plotting_correlation.py","file_url":"https://github.com/gpucce/outliersvsfreq/blob/HEAD/outliersvsfreq/pyplot/plotting_correlation.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"1b51980570480603"}},{"code_sha256_prefix":"a33067a65c46cc19","entry":"free_gather_scores","repo":"gpucce/outliersvsfreq","repo_kind":"official","path":"outliersvsfreq/gather_scores.py","file_url":"https://github.com/gpucce/outliersvsfreq/blob/HEAD/outliersvsfreq/gather_scores.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"a33067a65c46cc19"}},{"code_sha256_prefix":"108985beabfedd43","entry":"free_gather_scores_with_layers","repo":"gpucce/outliersvsfreq","repo_kind":"official","path":"outliersvsfreq/gather_scores.py","file_url":"https://github.com/gpucce/outliersvsfreq/blob/HEAD/outliersvsfreq/gather_scores.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"108985beabfedd43"}},{"code_sha256_prefix":"c9b158755dc0f543","entry":"gather_scores","repo":"gpucce/outliersvsfreq","repo_kind":"official","path":"outliersvsfreq/gather_scores.py","file_url":"https://github.com/gpucce/outliersvsfreq/blob/HEAD/outliersvsfreq/gather_scores.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"c9b158755dc0f543"}},{"code_sha256_prefix":"f1f2a706bef961c1","entry":"get_layernorm_layers","repo":"gpucce/outliersvsfreq","repo_kind":"official","path":"outliersvsfreq/parameter_access.py","file_url":"https://github.com/gpucce/outliersvsfreq/blob/HEAD/outliersvsfreq/parameter_access.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"f1f2a706bef961c1"}},{"code_sha256_prefix":"2349f1f44cdb663a","entry":"get_layers","repo":"gpucce/outliersvsfreq","repo_kind":"official","path":"outliersvsfreq/parameter_access.py","file_url":"https://github.com/gpucce/outliersvsfreq/blob/HEAD/outliersvsfreq/parameter_access.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"2349f1f44cdb663a"}},{"code_sha256_prefix":"e11878a2b3bf9277","entry":"get_vit_layernorm_layers","repo":"gpucce/outliersvsfreq","repo_kind":"official","path":"outliersvsfreq/parameter_access.py","file_url":"https://github.com/gpucce/outliersvsfreq/blob/HEAD/outliersvsfreq/parameter_access.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"e11878a2b3bf9277"}},{"code_sha256_prefix":"508d37d044d4a5d6","entry":"replace_weight_name","repo":"gpucce/outliersvsfreq","repo_kind":"official","path":"outliersvsfreq/util.py","file_url":"https://github.com/gpucce/outliersvsfreq/blob/HEAD/outliersvsfreq/util.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"508d37d044d4a5d6"}},{"code_sha256_prefix":"01f7363ecd6f58ab","entry":"scale_param_","repo":"gpucce/outliersvsfreq","repo_kind":"official","path":"outliersvsfreq/parameter_hiding.py","file_url":"https://github.com/gpucce/outliersvsfreq/blob/HEAD/outliersvsfreq/parameter_hiding.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"01f7363ecd6f58ab"}},{"code_sha256_prefix":"0a19e5b39a0281f0","entry":"self_generate_sents","repo":"gpucce/outliersvsfreq","repo_kind":"official","path":"outliersvsfreq/util.py","file_url":"https://github.com/gpucce/outliersvsfreq/blob/HEAD/outliersvsfreq/util.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"0a19e5b39a0281f0"}},{"code_sha256_prefix":"1cc3a191a5fc8f71","entry":"smart_init_","repo":"gpucce/outliersvsfreq","repo_kind":"official","path":"outliersvsfreq/util.py","file_url":"https://github.com/gpucce/outliersvsfreq/blob/HEAD/outliersvsfreq/util.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"1cc3a191a5fc8f71"}},{"code_sha256_prefix":"d9d660f307837089","entry":"stack_plot_corr","repo":"gpucce/outliersvsfreq","repo_kind":"official","path":"outliersvsfreq/pyplot/plotting_correlation.py","file_url":"https://github.com/gpucce/outliersvsfreq/blob/HEAD/outliersvsfreq/pyplot/plotting_correlation.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"d9d660f307837089"}},{"code_sha256_prefix":"8ff4e48a0a36bb08","entry":"stack_plot_freq","repo":"gpucce/outliersvsfreq","repo_kind":"official","path":"outliersvsfreq/pyplot/plotting_correlation.py","file_url":"https://github.com/gpucce/outliersvsfreq/blob/HEAD/outliersvsfreq/pyplot/plotting_correlation.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"8ff4e48a0a36bb08"}},{"code_sha256_prefix":"c27f75a28dbe7d4a","entry":"stack_plot_perf","repo":"gpucce/outliersvsfreq","repo_kind":"official","path":"outliersvsfreq/pyplot/plotting_scores.py","file_url":"https://github.com/gpucce/outliersvsfreq/blob/HEAD/outliersvsfreq/pyplot/plotting_scores.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"c27f75a28dbe7d4a"}},{"code_sha256_prefix":"4763445fb22e6e94","entry":"zero_last_param_","repo":"gpucce/outliersvsfreq","repo_kind":"official","path":"outliersvsfreq/parameter_hiding.py","file_url":"https://github.com/gpucce/outliersvsfreq/blob/HEAD/outliersvsfreq/parameter_hiding.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"4763445fb22e6e94"}},{"code_sha256_prefix":"72570b46c29b7444","entry":"zero_param_","repo":"gpucce/outliersvsfreq","repo_kind":"official","path":"outliersvsfreq/parameter_hiding.py","file_url":"https://github.com/gpucce/outliersvsfreq/blob/HEAD/outliersvsfreq/parameter_hiding.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"72570b46c29b7444"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}