{"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/understanding-and-minimising-outlier-features","title":"Understanding and Minimising Outlier Features in Neural Network Training","arxiv_id":"2405.19279","date":"2024-05-29","proceeding":null,"authors":["Bobby He","Lorenzo Noci","Daniele Paliotta","Imanol Schlag","Thomas Hofmann"],"abstract":"Outlier Features (OFs) are neurons whose activation magnitudes significantly exceed the average over a neural network's (NN) width. They are well known to emerge during standard transformer training and have the undesirable effect of hindering quantisation in afflicted models. Despite their practical importance, little is known behind why OFs emerge during training, nor how one can minimise them. Our work focuses on the above questions, first identifying several quantitative metrics, such as the kurtosis over neuron activation norms, to measure OFs. With these metrics, we study how architectural and optimisation choices influence OFs, and provide practical insights to minimise OFs during training. As highlights, we introduce a novel unnormalised transformer block, the Outlier Protected block, and present a previously unknown benefit of non-diagonal preconditioning optimisers, finding both approaches to significantly reduce OFs and improve quantisation without compromising convergence speed, at scales of up to 7B parameters. Notably, our combination of OP block and non-diagonal preconditioner (SOAP) achieves 14.87 int8 weight-and-activation perplexity (from 14.71 in standard precision), compared to 63.4 int8 perplexity (from 16.00) with a default OF-prone combination of Pre-Norm model and Adam, when quantising OPT-125m models post-training. Overall, our findings shed new light on our understanding of, our ability to prevent, and the complexity of this important aspect of NN training dynamics.","url_abs":"https://arxiv.org/abs/2405.19279v2","url_pdf":"https://arxiv.org/pdf/2405.19279v2.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":"understanding-and-minimising-outlier-features","repo_url":"https://github.com/bobby-he/simplified_transformers","is_official":1,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok","spdx":"MIT"}}],"tasks":[],"methods":[{"method_slug":"adam","method_name":"Adam"},{"method_slug":"speed","method_name":"SPEED"}],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"syntology_url":"https://syntology.ai/paper/2405.19279","atlas_url":"https://app.syntology.ai/?focus=2405.19279","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2405.19279"}},"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":"deterministic:regex_extraction","url":"https://github.com/nikhilvyas/SOAP","reach":{"status":"ok","spdx":"MIT"}},{"provenance":"deterministic:regex_extraction","url":"https://github.com/huggingface/nanotron","reach":{"status":"ok","spdx":"Apache-2.0"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/bobby-he/simplified_transformers","reach":{"status":"ok","spdx":"MIT"}}],"summary":{"ran":6,"unverified":6},"by_repo_kind":{"official":{"samples":1,"ran":0,"repositories":1},"found_in_text":{"samples":11,"ran":6,"repositories":2}},"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":"eb326174c926895a","entry":"compute_kurtosis","repo":"huggingface/nanotron","repo_kind":"found_in_text","path":"src/nanotron/metrics_logging.py","file_url":"https://github.com/huggingface/nanotron/blob/HEAD/src/nanotron/metrics_logging.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"eb326174c926895a"}},{"code_sha256_prefix":"a72c22a93e228377","entry":"compute_tensor_norm","repo":"huggingface/nanotron","repo_kind":"found_in_text","path":"src/nanotron/metrics_logging.py","file_url":"https://github.com/huggingface/nanotron/blob/HEAD/src/nanotron/metrics_logging.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"a72c22a93e228377"}},{"code_sha256_prefix":"13ac96439b0894ca","entry":"get_attribute_by_path","repo":"huggingface/nanotron","repo_kind":"found_in_text","path":"src/nanotron/metrics_logging.py","file_url":"https://github.com/huggingface/nanotron/blob/HEAD/src/nanotron/metrics_logging.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"13ac96439b0894ca"}},{"code_sha256_prefix":"0a00ba3983dd6e58","entry":"get_parameter_and_parent_module","repo":"huggingface/nanotron","repo_kind":"found_in_text","path":"src/nanotron/utils.py","file_url":"https://github.com/huggingface/nanotron/blob/HEAD/src/nanotron/utils.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"0a00ba3983dd6e58"}},{"code_sha256_prefix":"89dc6d87894c3644","entry":"get_size","repo":"huggingface/nanotron","repo_kind":"found_in_text","path":"src/nanotron/trainer.py","file_url":"https://github.com/huggingface/nanotron/blob/HEAD/src/nanotron/trainer.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"89dc6d87894c3644"}},{"code_sha256_prefix":"a56a30fdb336647c","entry":"get_untyped_storage","repo":"huggingface/nanotron","repo_kind":"found_in_text","path":"src/nanotron/utils.py","file_url":"https://github.com/huggingface/nanotron/blob/HEAD/src/nanotron/utils.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"a56a30fdb336647c"}},{"code_sha256_prefix":"f2e2f9c92f1493e5","entry":"SOAP","repo":"nikhilvyas/SOAP","repo_kind":"found_in_text","path":"soap.py","file_url":"https://github.com/nikhilvyas/SOAP/blob/HEAD/soap.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":"f2e2f9c92f1493e5"}},{"code_sha256_prefix":"22aa5bcc567897ad","entry":"all_gather_into_tensor","repo":"huggingface/nanotron","repo_kind":"found_in_text","path":"src/nanotron/distributed.py","file_url":"https://github.com/huggingface/nanotron/blob/HEAD/src/nanotron/distributed.py","link_basis":"first_harvest_node","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":"22aa5bcc567897ad"}},{"code_sha256_prefix":"f021200d293b3b7f","entry":"checkpoint_method","repo":"huggingface/nanotron","repo_kind":"found_in_text","path":"src/nanotron/utils.py","file_url":"https://github.com/huggingface/nanotron/blob/HEAD/src/nanotron/utils.py","link_basis":"first_harvest_node","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":"f021200d293b3b7f"}},{"code_sha256_prefix":"06ee5a859c15c954","entry":"convertGPT2model","repo":"bobby-he/simplified_transformers","repo_kind":"official","path":"simplified_transformers/model_utils.py","file_url":"https://github.com/bobby-he/simplified_transformers/blob/HEAD/simplified_transformers/model_utils.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":"06ee5a859c15c954"}},{"code_sha256_prefix":"4db6f468bd875ddf","entry":"new_group","repo":"huggingface/nanotron","repo_kind":"found_in_text","path":"src/nanotron/distributed.py","file_url":"https://github.com/huggingface/nanotron/blob/HEAD/src/nanotron/distributed.py","link_basis":"first_harvest_node","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":"4db6f468bd875ddf"}},{"code_sha256_prefix":"706bb90608ef58d5","entry":"reduce_scatter_tensor","repo":"huggingface/nanotron","repo_kind":"found_in_text","path":"src/nanotron/distributed.py","file_url":"https://github.com/huggingface/nanotron/blob/HEAD/src/nanotron/distributed.py","link_basis":"first_harvest_node","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":"706bb90608ef58d5"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}