{"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/un-mixing-test-time-normalization-statistics","title":"Un-Mixing Test-Time Normalization Statistics: Combatting Label Temporal Correlation","arxiv_id":"2401.08328","date":"2024-01-16","proceeding":null,"authors":["Devavrat Tomar","Guillaume Vray","Jean-Philippe Thiran","Behzad Bozorgtabar"],"abstract":"Recent test-time adaptation methods heavily rely on nuanced adjustments of batch normalization (BN) parameters. However, one critical assumption often goes overlooked: that of independently and identically distributed (i.i.d.) test batches with respect to unknown labels. This oversight leads to skewed BN statistics and undermines the reliability of the model under non-i.i.d. scenarios. To tackle this challenge, this paper presents a novel method termed 'Un-Mixing Test-Time Normalization Statistics' (UnMix-TNS). Our method re-calibrates the statistics for each instance within a test batch by mixing it with multiple distinct statistics components, thus inherently simulating the i.i.d. scenario. The core of this method hinges on a distinctive online unmixing procedure that continuously updates these statistics components by incorporating the most similar instances from new test batches. Remarkably generic in its design, UnMix-TNS seamlessly integrates with a wide range of leading test-time adaptation methods and pre-trained architectures equipped with BN layers. Empirical evaluations corroborate the robustness of UnMix-TNS under varied scenarios-ranging from single to continual and mixed domain shifts, particularly excelling with temporally correlated test data and corrupted non-i.i.d. real-world streams. This adaptability is maintained even with very small batch sizes or single instances. Our results highlight UnMix-TNS's capacity to markedly enhance stability and performance across various benchmarks. Our code is publicly available at https://github.com/devavratTomar/unmixtns.","url_abs":"https://arxiv.org/abs/2401.08328v2","url_pdf":"https://arxiv.org/pdf/2401.08328v2.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":"un-mixing-test-time-normalization-statistics","repo_url":"https://github.com/devavrattomar/unmixtns","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":0,"framework":"pytorch","reach":{"status":"ok"}}],"tasks":[{"task_slug":"test-time-adaptation","task_name":"Test-time Adaptation"}],"methods":[{"method_slug":"batch-normalization","method_name":"Batch Normalization"}],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"atlas_url":"https://app.syntology.ai/?focus=2401.08328","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2401.08328"}},"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":"deterministic:regex_extraction","url":"https://github.com/devavratTomar/unmixtns","reach":{"status":"ok"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/devavrattomar/unmixtns","reach":{"status":"ok"}}],"summary":{"ran":6,"ran_draft_wrong":8,"unverified":6},"by_repo_kind":{"official":{"samples":20,"ran":14,"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":20,"samples":[{"code_sha256_prefix":"7bf2445ffb6dcd2b","entry":"BaseNormLayer","repo":"devavrattomar/unmixtns","repo_kind":"official","path":"tta_experiments/unmixtns.py","file_url":"https://github.com/devavrattomar/unmixtns/blob/HEAD/tta_experiments/unmixtns.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"7bf2445ffb6dcd2b"}},{"code_sha256_prefix":"3ee3bf864db8867f","entry":"autocontrast","repo":"devavratTomar/unmixtns","repo_kind":"official","path":"tta_experiments/augmentations/transforms_memo_imagenet.py","file_url":"https://github.com/devavratTomar/unmixtns/blob/HEAD/tta_experiments/augmentations/transforms_memo_imagenet.py","link_basis":"harvester_set","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"MISDECLARED","metamorphic_tier":"well_formed","behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"3ee3bf864db8867f"}},{"code_sha256_prefix":"5af9cc28c5ec0d9a","entry":"ckpt_path_to_domain_seq","repo":"devavratTomar/unmixtns","repo_kind":"official","path":"tta_experiments/conf.py","file_url":"https://github.com/devavratTomar/unmixtns/blob/HEAD/tta_experiments/conf.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"5af9cc28c5ec0d9a"}},{"code_sha256_prefix":"e7ccaa89c8a835ad","entry":"complete_data_dir_path","repo":"devavratTomar/unmixtns","repo_kind":"official","path":"tta_experiments/conf.py","file_url":"https://github.com/devavratTomar/unmixtns/blob/HEAD/tta_experiments/conf.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"e7ccaa89c8a835ad"}},{"code_sha256_prefix":"a2f66c9bbd052a97","entry":"convert_iabn","repo":"devavratTomar/unmixtns","repo_kind":"official","path":"tta_experiments/methods/note.py","file_url":"https://github.com/devavratTomar/unmixtns/blob/HEAD/tta_experiments/methods/note.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"a2f66c9bbd052a97"}},{"code_sha256_prefix":"473a24407468b75e","entry":"entropy_energy","repo":"devavratTomar/unmixtns","repo_kind":"official","path":"tta_experiments/methods/lame.py","file_url":"https://github.com/devavratTomar/unmixtns/blob/HEAD/tta_experiments/methods/lame.py","link_basis":"harvester_set","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"473a24407468b75e"}},{"code_sha256_prefix":"ca3e2158c52023d8","entry":"equalize","repo":"devavratTomar/unmixtns","repo_kind":"official","path":"tta_experiments/augmentations/transforms_memo_imagenet.py","file_url":"https://github.com/devavratTomar/unmixtns/blob/HEAD/tta_experiments/augmentations/transforms_memo_imagenet.py","link_basis":"harvester_set","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"MISDECLARED","metamorphic_tier":"well_formed","behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"ca3e2158c52023d8"}},{"code_sha256_prefix":"d0fd88319e6d77c9","entry":"get_named_submodule","repo":"devavrattomar/unmixtns","repo_kind":"official","path":"tta_experiments/unmixtns.py","file_url":"https://github.com/devavrattomar/unmixtns/blob/HEAD/tta_experiments/unmixtns.py","link_basis":"first_harvest_node","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"OUTPUT_MISDECLARED","metamorphic_tier":"deterministic","behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"d0fd88319e6d77c9"}},{"code_sha256_prefix":"17a64140912eeb6b","entry":"get_named_submodule","repo":"devavratTomar/unmixtns","repo_kind":"official","path":"tta_experiments/unmixtns.py","file_url":"https://github.com/devavratTomar/unmixtns/blob/HEAD/tta_experiments/unmixtns.py","link_basis":"plan_row","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"OUTPUT_MISDECLARED","metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"17a64140912eeb6b"}},{"code_sha256_prefix":"a1872378501c3ba8","entry":"get_num_classes","repo":"devavratTomar/unmixtns","repo_kind":"official","path":"tta_experiments/conf.py","file_url":"https://github.com/devavratTomar/unmixtns/blob/HEAD/tta_experiments/conf.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"a1872378501c3ba8"}},{"code_sha256_prefix":"d7485ac8fc677c98","entry":"replace_bn_layers","repo":"devavrattomar/unmixtns","repo_kind":"official","path":"tta_experiments/unmixtns.py","file_url":"https://github.com/devavrattomar/unmixtns/blob/HEAD/tta_experiments/unmixtns.py","link_basis":"first_harvest_node","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"OUTPUT_MISDECLARED","metamorphic_tier":"deterministic","behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"d7485ac8fc677c98"}},{"code_sha256_prefix":"344ae735e72e78f3","entry":"rotate","repo":"devavratTomar/unmixtns","repo_kind":"official","path":"tta_experiments/augmentations/transforms_memo_imagenet.py","file_url":"https://github.com/devavratTomar/unmixtns/blob/HEAD/tta_experiments/augmentations/transforms_memo_imagenet.py","link_basis":"harvester_set","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"MISDECLARED","metamorphic_tier":"well_formed","behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"344ae735e72e78f3"}},{"code_sha256_prefix":"2fd0610ee153f304","entry":"timeliness_reweighting","repo":"devavratTomar/unmixtns","repo_kind":"official","path":"tta_experiments/methods/note.py","file_url":"https://github.com/devavratTomar/unmixtns/blob/HEAD/tta_experiments/methods/note.py","link_basis":"plan_row","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"MISDECLARED","metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"2fd0610ee153f304"}},{"code_sha256_prefix":"a77d556c0aea19c1","entry":"update_ema_variables","repo":"devavratTomar/unmixtns","repo_kind":"official","path":"tta_experiments/methods/cotta.py","file_url":"https://github.com/devavratTomar/unmixtns/blob/HEAD/tta_experiments/methods/cotta.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":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"a77d556c0aea19c1"}},{"code_sha256_prefix":"df14e688c0bb6e88","entry":"UnMixTNS2d","repo":"devavrattomar/unmixtns","repo_kind":"official","path":"tta_experiments/unmixtns.py","file_url":"https://github.com/devavrattomar/unmixtns/blob/HEAD/tta_experiments/unmixtns.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"df14e688c0bb6e88"}},{"code_sha256_prefix":"0c4495cb2187be84","entry":"create_file_list","repo":"devavratTomar/unmixtns","repo_kind":"official","path":"tta_experiments/datasets/imagenet_subsets.py","file_url":"https://github.com/devavratTomar/unmixtns/blob/HEAD/tta_experiments/datasets/imagenet_subsets.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"0c4495cb2187be84"}},{"code_sha256_prefix":"b723ea0fcdc2c948","entry":"create_imagenet_subset","repo":"devavratTomar/unmixtns","repo_kind":"official","path":"tta_experiments/datasets/imagenet_subsets.py","file_url":"https://github.com/devavratTomar/unmixtns/blob/HEAD/tta_experiments/datasets/imagenet_subsets.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"b723ea0fcdc2c948"}},{"code_sha256_prefix":"d2597d43cbd2fbca","entry":"laplacian_optimization","repo":"devavratTomar/unmixtns","repo_kind":"official","path":"tta_experiments/methods/lame.py","file_url":"https://github.com/devavratTomar/unmixtns/blob/HEAD/tta_experiments/methods/lame.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"d2597d43cbd2fbca"}},{"code_sha256_prefix":"991d0f3401682804","entry":"softmax_entropy_cifar","repo":"devavratTomar/unmixtns","repo_kind":"official","path":"tta_experiments/methods/cotta.py","file_url":"https://github.com/devavratTomar/unmixtns/blob/HEAD/tta_experiments/methods/cotta.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"991d0f3401682804"}},{"code_sha256_prefix":"6bdfed740b3da7ce","entry":"softmax_entropy_imagenet","repo":"devavratTomar/unmixtns","repo_kind":"official","path":"tta_experiments/methods/cotta.py","file_url":"https://github.com/devavratTomar/unmixtns/blob/HEAD/tta_experiments/methods/cotta.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"6bdfed740b3da7ce"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}