{"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/tasknorm-rethinking-batch-normalization-for","title":"TaskNorm: Rethinking Batch Normalization for Meta-Learning","arxiv_id":"2003.03284","date":"2020-03-06","proceeding":"ICML 2020 1","authors":["John Bronskill","Jonathan Gordon","James Requeima","Sebastian Nowozin","Richard E. Turner"],"abstract":"Modern meta-learning approaches for image classification rely on increasingly deep networks to achieve state-of-the-art performance, making batch normalization an essential component of meta-learning pipelines. However, the hierarchical nature of the meta-learning setting presents several challenges that can render conventional batch normalization ineffective, giving rise to the need to rethink normalization in this setting. We evaluate a range of approaches to batch normalization for meta-learning scenarios, and develop a novel approach that we call TaskNorm. Experiments on fourteen datasets demonstrate that the choice of batch normalization has a dramatic effect on both classification accuracy and training time for both gradient based and gradient-free meta-learning approaches. Importantly, TaskNorm is found to consistently improve performance. Finally, we provide a set of best practices for normalization that will allow fair comparison of meta-learning algorithms.","url_abs":"https://arxiv.org/abs/2003.03284v2","url_pdf":"https://arxiv.org/pdf/2003.03284v2.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":"tasknorm-rethinking-batch-normalization-for","repo_url":"https://github.com/cambridge-mlg/cnaps","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok","spdx":"MIT"}},{"paper_slug":"tasknorm-rethinking-batch-normalization-for","repo_url":"https://github.com/fmu2/PyTorch-MAML","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"pytorch","reach":null}],"tasks":[{"task_slug":"classification","task_name":"General Classification"},{"task_slug":"image-classification","task_name":"Image Classification"},{"task_slug":"meta-learning","task_name":"Meta-Learning"},{"task_slug":"image-classification","task_name":"image-classification"}],"methods":[{"method_slug":"batch-normalization","method_name":"Batch Normalization"}],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"atlas_url":"https://app.syntology.ai/?focus=2003.03284","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2003.03284"}},"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/fmu2/PyTorch-MAML","reach":null},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/cambridge-mlg/cnaps","reach":{"status":"ok","spdx":"MIT"}}],"summary":{"ran_draft_wrong":3,"unverified":5},"by_repo_kind":{"official":{"samples":8,"ran":3,"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":"d9def42110729a85","entry":"conv1x1","repo":"cambridge-mlg/cnaps","repo_kind":"official","path":"src/resnet.py","file_url":"https://github.com/cambridge-mlg/cnaps/blob/HEAD/src/resnet.py","link_basis":"harvester_set","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"OUTPUT_MISDECLARED","metamorphic_tier":"deterministic","behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"d9def42110729a85"}},{"code_sha256_prefix":"fac5364e2f53c6db","entry":"conv3x3","repo":"cambridge-mlg/cnaps","repo_kind":"official","path":"src/resnet.py","file_url":"https://github.com/cambridge-mlg/cnaps/blob/HEAD/src/resnet.py","link_basis":"harvester_set","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"OUTPUT_MISDECLARED","metamorphic_tier":"deterministic","behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"fac5364e2f53c6db"}},{"code_sha256_prefix":"36faaa70bb298474","entry":"split_first_dim_linear","repo":"cambridge-mlg/cnaps","repo_kind":"official","path":"src/utils.py","file_url":"https://github.com/cambridge-mlg/cnaps/blob/HEAD/src/utils.py","link_basis":"harvester_set","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"MISDECLARED","metamorphic_tier":"invariant","behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"36faaa70bb298474"}},{"code_sha256_prefix":"f87065055026fb7b","entry":"get_log_files","repo":"cambridge-mlg/cnaps","repo_kind":"official","path":"src/utils.py","file_url":"https://github.com/cambridge-mlg/cnaps/blob/HEAD/src/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":"f87065055026fb7b"}},{"code_sha256_prefix":"083d7c12137fe0b7","entry":"mean_pooling","repo":"cambridge-mlg/cnaps","repo_kind":"official","path":"src/set_encoder.py","file_url":"https://github.com/cambridge-mlg/cnaps/blob/HEAD/src/set_encoder.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":"083d7c12137fe0b7"}},{"code_sha256_prefix":"aa122878d6a7b1b3","entry":"process_cifar","repo":"cambridge-mlg/cnaps","repo_kind":"official","path":"src/prepare_extra_datasets.py","file_url":"https://github.com/cambridge-mlg/cnaps/blob/HEAD/src/prepare_extra_datasets.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":"aa122878d6a7b1b3"}},{"code_sha256_prefix":"b3b6db52dd02d932","entry":"process_mnist","repo":"cambridge-mlg/cnaps","repo_kind":"official","path":"src/prepare_extra_datasets.py","file_url":"https://github.com/cambridge-mlg/cnaps/blob/HEAD/src/prepare_extra_datasets.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":"b3b6db52dd02d932"}},{"code_sha256_prefix":"70f3ccf89a0a79b7","entry":"stack_first_dim","repo":"cambridge-mlg/cnaps","repo_kind":"official","path":"src/utils.py","file_url":"https://github.com/cambridge-mlg/cnaps/blob/HEAD/src/utils.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":"70f3ccf89a0a79b7"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}