{"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/towards-real-world-test-time-adaptation-tri","title":"Towards Real-World Test-Time Adaptation: Tri-Net Self-Training with Balanced Normalization","arxiv_id":"2309.14949","date":"2023-09-26","proceeding":null,"authors":["Yongyi Su","Xun Xu","Kui Jia"],"abstract":"Test-Time Adaptation aims to adapt source domain model to testing data at inference stage with success demonstrated in adapting to unseen corruptions. However, these attempts may fail under more challenging real-world scenarios. Existing works mainly consider real-world test-time adaptation under non-i.i.d. data stream and continual domain shift. In this work, we first complement the existing real-world TTA protocol with a globally class imbalanced testing set. We demonstrate that combining all settings together poses new challenges to existing methods. We argue the failure of state-of-the-art methods is first caused by indiscriminately adapting normalization layers to imbalanced testing data. To remedy this shortcoming, we propose a balanced batchnorm layer to swap out the regular batchnorm at inference stage. The new batchnorm layer is capable of adapting without biasing towards majority classes. We are further inspired by the success of self-training (ST) in learning from unlabeled data and adapt ST for test-time adaptation. However, ST alone is prone to over adaption which is responsible for the poor performance under continual domain shift. Hence, we propose to improve self-training under continual domain shift by regularizing model updates with an anchored loss. The final TTA model, termed as TRIBE, is built upon a tri-net architecture with balanced batchnorm layers. We evaluate TRIBE on four datasets representing real-world TTA settings. TRIBE consistently achieves the state-of-the-art performance across multiple evaluation protocols. The code is available at https://github.com/Gorilla-Lab-SCUT/TRIBE.","url_abs":"https://arxiv.org/abs/2309.14949v2","url_pdf":"https://arxiv.org/pdf/2309.14949v2.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":"towards-real-world-test-time-adaptation-tri","repo_url":"https://github.com/gorilla-lab-scut/tribe","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok"}}],"tasks":[{"task_slug":"test-time-adaptation","task_name":"Test-time Adaptation"}],"methods":[{"method_slug":"fail","method_name":"fail"}],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"atlas_url":"https://app.syntology.ai/?focus=2309.14949","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2309.14949"}},"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/gorilla-lab-scut/tribe","reach":{"status":"ok"}}],"summary":{"ran":6,"ran_fixture":1,"ran_draft_wrong":2,"unverified":4},"by_repo_kind":{"official":{"samples":13,"ran":9,"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":13,"samples":[{"code_sha256_prefix":"b128b1b1c37a4fe0","entry":"cf_learning_rate","repo":"gorilla-lab-scut/tribe","repo_kind":"official","path":"train_for_petal_cifar10.py","file_url":"https://github.com/gorilla-lab-scut/tribe/blob/HEAD/train_for_petal_cifar10.py","link_basis":"first_harvest_node","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":"b128b1b1c37a4fe0"}},{"code_sha256_prefix":"340d65079d8e40ca","entry":"entropy_energy","repo":"gorilla-lab-scut/tribe","repo_kind":"official","path":"core/adapter/lame.py","file_url":"https://github.com/gorilla-lab-scut/tribe/blob/HEAD/core/adapter/lame.py","link_basis":"first_harvest_node","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":"340d65079d8e40ca"}},{"code_sha256_prefix":"75bf7879dc84bb70","entry":"load_cifar100_train","repo":"gorilla-lab-scut/tribe","repo_kind":"official","path":"train_for_petal_cifar100.py","file_url":"https://github.com/gorilla-lab-scut/tribe/blob/HEAD/train_for_petal_cifar100.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":"75bf7879dc84bb70"}},{"code_sha256_prefix":"c90018f7dd3ef01a","entry":"load_cifar10_train","repo":"gorilla-lab-scut/tribe","repo_kind":"official","path":"train_for_petal_cifar10.py","file_url":"https://github.com/gorilla-lab-scut/tribe/blob/HEAD/train_for_petal_cifar10.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":"c90018f7dd3ef01a"}},{"code_sha256_prefix":"8cc4004512e3fa2f","entry":"softmax_entropy","repo":"gorilla-lab-scut/tribe","repo_kind":"official","path":"core/adapter/base_adapter.py","file_url":"https://github.com/gorilla-lab-scut/tribe/blob/HEAD/core/adapter/base_adapter.py","link_basis":"plan_row","language":"python","status":"ran_fixture","verification_level":1,"contract_check":"RAISES","metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"8cc4004512e3fa2f"}},{"code_sha256_prefix":"bfba965ef40453f9","entry":"train","repo":"gorilla-lab-scut/tribe","repo_kind":"official","path":"train_mnist.py","file_url":"https://github.com/gorilla-lab-scut/tribe/blob/HEAD/train_mnist.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":"bfba965ef40453f9"}},{"code_sha256_prefix":"a77d556c0aea19c1","entry":"update_ema_variables","repo":"gorilla-lab-scut/tribe","repo_kind":"official","path":"core/adapter/cotta.py","file_url":"https://github.com/gorilla-lab-scut/tribe/blob/HEAD/core/adapter/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":"f4a71b97346fb88d","entry":"update_model_probs","repo":"gorilla-lab-scut/tribe","repo_kind":"official","path":"core/adapter/eata.py","file_url":"https://github.com/gorilla-lab-scut/tribe/blob/HEAD/core/adapter/eata.py","link_basis":"harvester_set","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"MISDECLARED","metamorphic_tier":"invariant","behaviour_fingerprint":true,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"f4a71b97346fb88d"}},{"code_sha256_prefix":"f787337c5aaa6127","entry":"val","repo":"gorilla-lab-scut/tribe","repo_kind":"official","path":"train_mnist.py","file_url":"https://github.com/gorilla-lab-scut/tribe/blob/HEAD/train_mnist.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":"f787337c5aaa6127"}},{"code_sha256_prefix":"7853dec9689a762f","entry":"forward_and_adapt_eata","repo":"gorilla-lab-scut/tribe","repo_kind":"official","path":"core/adapter/eata.py","file_url":"https://github.com/gorilla-lab-scut/tribe/blob/HEAD/core/adapter/eata.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":"7853dec9689a762f"}},{"code_sha256_prefix":"3dc11f35b4b01ab2","entry":"get_tta_transforms","repo":"gorilla-lab-scut/tribe","repo_kind":"official","path":"core/adapter/cotta.py","file_url":"https://github.com/gorilla-lab-scut/tribe/blob/HEAD/core/adapter/cotta.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":"3dc11f35b4b01ab2"}},{"code_sha256_prefix":"47e54051e894c2e3","entry":"laplacian_optimization","repo":"gorilla-lab-scut/tribe","repo_kind":"official","path":"core/adapter/lame.py","file_url":"https://github.com/gorilla-lab-scut/tribe/blob/HEAD/core/adapter/lame.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":"47e54051e894c2e3"}},{"code_sha256_prefix":"e589e47d748af885","entry":"softmax_entropy","repo":"gorilla-lab-scut/tribe","repo_kind":"official","path":"core/adapter/cotta.py","file_url":"https://github.com/gorilla-lab-scut/tribe/blob/HEAD/core/adapter/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":"e589e47d748af885"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}