{"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/a-probabilistic-framework-for-lifelong-test","title":"A Probabilistic Framework for Lifelong Test-Time Adaptation","arxiv_id":"2212.09713","date":"2022-12-19","proceeding":"CVPR 2023 1","authors":["Dhanajit Brahma","Piyush Rai"],"abstract":"Test-time adaptation (TTA) is the problem of updating a pre-trained source model at inference time given test input(s) from a different target domain. Most existing TTA approaches assume the setting in which the target domain is stationary, i.e., all the test inputs come from a single target domain. However, in many practical settings, the test input distribution might exhibit a lifelong/continual shift over time. Moreover, existing TTA approaches also lack the ability to provide reliable uncertainty estimates, which is crucial when distribution shifts occur between the source and target domain. To address these issues, we present PETAL (Probabilistic lifElong Test-time Adaptation with seLf-training prior), which solves lifelong TTA using a probabilistic approach, and naturally results in (1) a student-teacher framework, where the teacher model is an exponential moving average of the student model, and (2) regularizing the model updates at inference time using the source model as a regularizer. To prevent model drift in the lifelong/continual TTA setting, we also propose a data-driven parameter restoration technique which contributes to reducing the error accumulation and maintaining the knowledge of recent domains by restoring only the irrelevant parameters. In terms of predictive error rate as well as uncertainty based metrics such as Brier score and negative log-likelihood, our method achieves better results than the current state-of-the-art for online lifelong test-time adaptation across various benchmarks, such as CIFAR-10C, CIFAR-100C, ImageNetC, and ImageNet3DCC datasets. The source code for our approach is accessible at https://github.com/dhanajitb/petal.","url_abs":"https://arxiv.org/abs/2212.09713v2","url_pdf":"https://arxiv.org/pdf/2212.09713v2.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":"a-probabilistic-framework-for-lifelong-test","repo_url":"https://github.com/dhanajitb/petal","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":0,"framework":"pytorch","reach":{"status":"ok","spdx":"MIT"}}],"tasks":[{"task_slug":"test-time-adaptation","task_name":"Test-time Adaptation"}],"methods":[{"method_slug":"test","method_name":"Test"}],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"syntology_url":"https://syntology.ai/paper/2212.09713","atlas_url":"https://app.syntology.ai/?focus=2212.09713","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2212.09713"}},"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":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/dhanajitb/petal","reach":{"status":"ok","spdx":"MIT"}}],"summary":{"ran":4,"ran_draft_wrong":1,"unverified":4},"by_repo_kind":{"official":{"samples":9,"ran":5,"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":"f54079a9c41b28c2","entry":"find_quantile","repo":"dhanajitb/petal","repo_kind":"official","path":"imagenet/petal.py","file_url":"https://github.com/dhanajitb/petal/blob/HEAD/imagenet/petal.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":"f54079a9c41b28c2"}},{"code_sha256_prefix":"0672ea0fb52d2dde","entry":"load_imagenet_train","repo":"dhanajitb/petal","repo_kind":"official","path":"imagenet/train-swag-diagonal-imagenet.py","file_url":"https://github.com/dhanajitb/petal/blob/HEAD/imagenet/train-swag-diagonal-imagenet.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":"0672ea0fb52d2dde"}},{"code_sha256_prefix":"ee9939f76f4640cd","entry":"read_file","repo":"dhanajitb/petal","repo_kind":"official","path":"imagenet/eval_corruptionwise_img3d.py","file_url":"https://github.com/dhanajitb/petal/blob/HEAD/imagenet/eval_corruptionwise_img3d.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":"ee9939f76f4640cd"}},{"code_sha256_prefix":"12bedd590f1cccb3","entry":"read_files","repo":"dhanajitb/petal","repo_kind":"official","path":"imagenet/eval_corruptionwise_img3d.py","file_url":"https://github.com/dhanajitb/petal/blob/HEAD/imagenet/eval_corruptionwise_img3d.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":"12bedd590f1cccb3"}},{"code_sha256_prefix":"a77d556c0aea19c1","entry":"update_ema_variables","repo":"dhanajitb/petal","repo_kind":"official","path":"imagenet/petal.py","file_url":"https://github.com/dhanajitb/petal/blob/HEAD/imagenet/petal.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":"a77d556c0aea19c1"}},{"code_sha256_prefix":"253c745e2e017386","entry":"read_file","repo":"dhanajitb/petal","repo_kind":"official","path":"imagenet/eval_corruptionwise.py","file_url":"https://github.com/dhanajitb/petal/blob/HEAD/imagenet/eval_corruptionwise.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":"253c745e2e017386"}},{"code_sha256_prefix":"839f811c5c952569","entry":"read_file_corr","repo":"dhanajitb/petal","repo_kind":"official","path":"imagenet/eval_corruptionwise.py","file_url":"https://github.com/dhanajitb/petal/blob/HEAD/imagenet/eval_corruptionwise.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":"839f811c5c952569"}},{"code_sha256_prefix":"0891a836fd0057e6","entry":"read_file_corr","repo":"dhanajitb/petal","repo_kind":"official","path":"imagenet/eval_corruptionwise_img3d.py","file_url":"https://github.com/dhanajitb/petal/blob/HEAD/imagenet/eval_corruptionwise_img3d.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":"0891a836fd0057e6"}},{"code_sha256_prefix":"dc4b17c489a20513","entry":"read_files","repo":"dhanajitb/petal","repo_kind":"official","path":"imagenet/eval_corruptionwise.py","file_url":"https://github.com/dhanajitb/petal/blob/HEAD/imagenet/eval_corruptionwise.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":"dc4b17c489a20513"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}