{"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/switchable-whitening-for-deep-representation","title":"Switchable Whitening for Deep Representation Learning","arxiv_id":"1904.09739","date":"2019-04-22","proceeding":"ICCV 2019 10","authors":["Xingang Pan","Xiaohang Zhan","Jianping Shi","Xiaoou Tang","Ping Luo"],"abstract":"Normalization methods are essential components in convolutional neural networks (CNNs). They either standardize or whiten data using statistics estimated in predefined sets of pixels. Unlike existing works that design normalization techniques for specific tasks, we propose Switchable Whitening (SW), which provides a general form unifying different whitening methods as well as standardization methods. SW learns to switch among these operations in an end-to-end manner. It has several advantages. First, SW adaptively selects appropriate whitening or standardization statistics for different tasks (see Fig.1), making it well suited for a wide range of tasks without manual design. Second, by integrating benefits of different normalizers, SW shows consistent improvements over its counterparts in various challenging benchmarks. Third, SW serves as a useful tool for understanding the characteristics of whitening and standardization techniques. We show that SW outperforms other alternatives on image classification (CIFAR-10/100, ImageNet), semantic segmentation (ADE20K, Cityscapes), domain adaptation (GTA5, Cityscapes), and image style transfer (COCO). For example, without bells and whistles, we achieve state-of-the-art performance with 45.33% mIoU on the ADE20K dataset. Code is available at https://github.com/XingangPan/Switchable-Whitening.","url_abs":"https://arxiv.org/abs/1904.09739v4","url_pdf":"https://arxiv.org/pdf/1904.09739v4.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":"switchable-whitening-for-deep-representation","repo_url":"https://github.com/XingangPan/Switchable-Whitening","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok","spdx":"MIT"}}],"tasks":[{"task_slug":"domain-adaptation","task_name":"Domain Adaptation"},{"task_slug":"image-classification","task_name":"Image Classification"},{"task_slug":"representation-learning","task_name":"Representation Learning"},{"task_slug":"robust-object-detection","task_name":"Robust Object Detection"},{"task_slug":"semantic-segmentation","task_name":"Semantic Segmentation"},{"task_slug":"style-transfer","task_name":"Style Transfer"},{"task_slug":"image-classification","task_name":"image-classification"}],"methods":[],"datasets_introduced":[],"methods_introduced":[],"results":[{"leaderboard":"/sota/robust-object-detection-on-dwd","task":"Robust Object Detection","dataset":"DWD","model":"SW","rank_in_archive_order":10,"of":12,"metrics":{"mPC [AP50]":"26.1"},"uses_additional_data":false},{"leaderboard":"/sota/synthetic-to-real-translation-on-gtav-to","task":"Synthetic-to-Real Translation","dataset":"GTAV-to-Cityscapes Labels","model":"AdaptSetNet-SWa","rank_in_archive_order":69,"of":73,"metrics":{"mIoU":"35.7"},"uses_additional_data":false}],"syntology":{"syntology_url":null,"atlas_url":"https://app.syntology.ai/?focus=1904.09739","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"1904.09739"}},"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/XingangPan/Switchable-Whitening","reach":{"status":"ok","spdx":"MIT"}}],"summary":{"ran_draft_wrong":1,"ran_violates":1,"unverified":8},"by_repo_kind":{"official":{"samples":10,"ran":2,"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":"fac5364e2f53c6db","entry":"conv3x3","repo":"XingangPan/Switchable-Whitening","repo_kind":"official","path":"models/backbones/resnet.py","file_url":"https://github.com/XingangPan/Switchable-Whitening/blob/HEAD/models/backbones/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":"f017532fc389cbfe","entry":"str2bool","repo":"XingangPan/Switchable-Whitening","repo_kind":"official","path":"imagenet.py","file_url":"https://github.com/XingangPan/Switchable-Whitening/blob/HEAD/imagenet.py","link_basis":"harvester_set","language":"python","status":"ran_violates","verification_level":1,"contract_check":"VIOLATES","metamorphic_tier":"deterministic","behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"f017532fc389cbfe"}},{"code_sha256_prefix":"4d3faaaa1c706b0b","entry":"accuracy","repo":"XingangPan/Switchable-Whitening","repo_kind":"official","path":"utils/common_utils.py","file_url":"https://github.com/XingangPan/Switchable-Whitening/blob/HEAD/utils/common_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":"4d3faaaa1c706b0b"}},{"code_sha256_prefix":"8b1cc983e181dcff","entry":"densenet121","repo":"XingangPan/Switchable-Whitening","repo_kind":"official","path":"models/backbones/densenet.py","file_url":"https://github.com/XingangPan/Switchable-Whitening/blob/HEAD/models/backbones/densenet.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":"8b1cc983e181dcff"}},{"code_sha256_prefix":"5ea48f2ca6d1fa45","entry":"densenet169","repo":"XingangPan/Switchable-Whitening","repo_kind":"official","path":"models/backbones/densenet.py","file_url":"https://github.com/XingangPan/Switchable-Whitening/blob/HEAD/models/backbones/densenet.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":"5ea48f2ca6d1fa45"}},{"code_sha256_prefix":"9a4ab984f0c89842","entry":"densenet201","repo":"XingangPan/Switchable-Whitening","repo_kind":"official","path":"models/backbones/densenet.py","file_url":"https://github.com/XingangPan/Switchable-Whitening/blob/HEAD/models/backbones/densenet.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":"9a4ab984f0c89842"}},{"code_sha256_prefix":"10acaf274853ee5d","entry":"dist_init","repo":"XingangPan/Switchable-Whitening","repo_kind":"official","path":"utils/distributed_utils.py","file_url":"https://github.com/XingangPan/Switchable-Whitening/blob/HEAD/utils/distributed_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":"10acaf274853ee5d"}},{"code_sha256_prefix":"3189ae3bf8df668c","entry":"load_state","repo":"XingangPan/Switchable-Whitening","repo_kind":"official","path":"utils/common_utils.py","file_url":"https://github.com/XingangPan/Switchable-Whitening/blob/HEAD/utils/common_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":"3189ae3bf8df668c"}},{"code_sha256_prefix":"b25d4629e9a5918e","entry":"resnet18","repo":"XingangPan/Switchable-Whitening","repo_kind":"official","path":"models/backbones/resnet.py","file_url":"https://github.com/XingangPan/Switchable-Whitening/blob/HEAD/models/backbones/resnet.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":"b25d4629e9a5918e"}},{"code_sha256_prefix":"67db28aa5fbd8878","entry":"resnet34","repo":"XingangPan/Switchable-Whitening","repo_kind":"official","path":"models/backbones/resnet.py","file_url":"https://github.com/XingangPan/Switchable-Whitening/blob/HEAD/models/backbones/resnet.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":"67db28aa5fbd8878"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}