{"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/revisiting-realistic-test-time-training","title":"Revisiting Realistic Test-Time Training: Sequential Inference and Adaptation by Anchored Clustering","arxiv_id":"2206.02721","date":"2022-06-06","proceeding":null,"authors":["Yongyi Su","Xun Xu","Kui Jia"],"abstract":"Deploying models on target domain data subject to distribution shift requires adaptation. Test-time training (TTT) emerges as a solution to this adaptation under a realistic scenario where access to full source domain data is not available and instant inference on target domain is required. Despite many efforts into TTT, there is a confusion over the experimental settings, thus leading to unfair comparisons. In this work, we first revisit TTT assumptions and categorize TTT protocols by two key factors. Among the multiple protocols, we adopt a realistic sequential test-time training (sTTT) protocol, under which we further develop a test-time anchored clustering (TTAC) approach to enable stronger test-time feature learning. TTAC discovers clusters in both source and target domain and match the target clusters to the source ones to improve generalization. Pseudo label filtering and iterative updating are developed to improve the effectiveness and efficiency of anchored clustering. We demonstrate that under all TTT protocols TTAC consistently outperforms the state-of-the-art methods on six TTT datasets. We hope this work will provide a fair benchmarking of TTT methods and future research should be compared within respective protocols. A demo code is available at https://github.com/Gorilla-Lab-SCUT/TTAC.","url_abs":"https://arxiv.org/abs/2206.02721v2","url_pdf":"https://arxiv.org/pdf/2206.02721v2.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":"revisiting-realistic-test-time-training","repo_url":"https://github.com/gorilla-lab-scut/ttac","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok","spdx":"MIT"}}],"tasks":[{"task_slug":"benchmarking","task_name":"Benchmarking"},{"task_slug":"clustering","task_name":"Clustering"},{"task_slug":"pseudo-label","task_name":"Pseudo Label"},{"task_slug":"pseudo-label-filtering","task_name":"Pseudo Label Filtering"}],"methods":[],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"syntology_url":"https://syntology.ai/paper/2206.02721","atlas_url":"https://app.syntology.ai/?focus=2206.02721","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2206.02721"}},"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/Gorilla-Lab-SCUT/TTAC","reach":{"status":"ok","spdx":"MIT"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/gorilla-lab-scut/ttac","reach":{"status":"ok","spdx":"MIT"}}],"summary":{"ran":6},"by_repo_kind":{"official":{"samples":6,"ran":6,"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":"c95f91085d13f9a0","entry":"coral","repo":"Gorilla-Lab-SCUT/TTAC","repo_kind":"official","path":"cifar/discrepancy.py","file_url":"https://github.com/Gorilla-Lab-SCUT/TTAC/blob/HEAD/cifar/discrepancy.py","link_basis":"harvester_set","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"c95f91085d13f9a0"}},{"code_sha256_prefix":"f872e8da97313523","entry":"covariance","repo":"Gorilla-Lab-SCUT/TTAC","repo_kind":"official","path":"cifar/discrepancy.py","file_url":"https://github.com/Gorilla-Lab-SCUT/TTAC/blob/HEAD/cifar/discrepancy.py","link_basis":"harvester_set","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"f872e8da97313523"}},{"code_sha256_prefix":"8da0fe56566ec48b","entry":"extractor_from_layer2","repo":"Gorilla-Lab-SCUT/TTAC","repo_kind":"official","path":"cifar/models/SSHead.py","file_url":"https://github.com/Gorilla-Lab-SCUT/TTAC/blob/HEAD/cifar/models/SSHead.py","link_basis":"harvester_set","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"8da0fe56566ec48b"}},{"code_sha256_prefix":"b63ee690a5540952","entry":"extractor_from_layer3","repo":"Gorilla-Lab-SCUT/TTAC","repo_kind":"official","path":"cifar/models/SSHead.py","file_url":"https://github.com/Gorilla-Lab-SCUT/TTAC/blob/HEAD/cifar/models/SSHead.py","link_basis":"harvester_set","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"b63ee690a5540952"}},{"code_sha256_prefix":"7391885e7d0b7f9d","entry":"head_on_layer2","repo":"Gorilla-Lab-SCUT/TTAC","repo_kind":"official","path":"cifar/models/SSHead.py","file_url":"https://github.com/Gorilla-Lab-SCUT/TTAC/blob/HEAD/cifar/models/SSHead.py","link_basis":"harvester_set","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"7391885e7d0b7f9d"}},{"code_sha256_prefix":"fa6b9886e3f4d5e7","entry":"linear_mmd","repo":"Gorilla-Lab-SCUT/TTAC","repo_kind":"official","path":"cifar/discrepancy.py","file_url":"https://github.com/Gorilla-Lab-SCUT/TTAC/blob/HEAD/cifar/discrepancy.py","link_basis":"harvester_set","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"fa6b9886e3f4d5e7"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}