{"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/fully-test-time-adaptation-by-entropy","title":"Tent: Fully Test-time Adaptation by Entropy Minimization","arxiv_id":"2006.10726","date":"2020-06-18","proceeding":"ICLR 2021 1","authors":["Dequan Wang","Evan Shelhamer","Shaoteng Liu","Bruno Olshausen","Trevor Darrell"],"abstract":"A model must adapt itself to generalize to new and different data during testing. In this setting of fully test-time adaptation the model has only the test data and its own parameters. We propose to adapt by test entropy minimization (tent): we optimize the model for confidence as measured by the entropy of its predictions. Our method estimates normalization statistics and optimizes channel-wise affine transformations to update online on each batch. Tent reduces generalization error for image classification on corrupted ImageNet and CIFAR-10/100 and reaches a new state-of-the-art error on ImageNet-C. Tent handles source-free domain adaptation on digit recognition from SVHN to MNIST/MNIST-M/USPS, on semantic segmentation from GTA to Cityscapes, and on the VisDA-C benchmark. These results are achieved in one epoch of test-time optimization without altering training.","url_abs":"https://arxiv.org/abs/2006.10726v3","url_pdf":"https://arxiv.org/pdf/2006.10726v3.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":"fully-test-time-adaptation-by-entropy","repo_url":"https://github.com/DequanWang/tent","is_official":1,"mentioned_in_paper":0,"mentioned_in_github":0,"framework":"pytorch","reach":null},{"paper_slug":"fully-test-time-adaptation-by-entropy","repo_url":"https://github.com/mr-eggplant/eata","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok","spdx":"NOASSERTION"}}],"tasks":[{"task_slug":"domain-adaptation","task_name":"Domain Adaptation"},{"task_slug":"classification","task_name":"General Classification"},{"task_slug":"image-classification","task_name":"Image Classification"},{"task_slug":"semantic-segmentation","task_name":"Semantic Segmentation"},{"task_slug":"source-free-domain-adaptation","task_name":"Source-Free Domain Adaptation"},{"task_slug":"test-time-adaptation","task_name":"Test-time Adaptation"},{"task_slug":"image-classification","task_name":"image-classification"}],"methods":[],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"atlas_url":"https://app.syntology.ai/?focus=2006.10726","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2006.10726"}},"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/DequanWang/tent","reach":null},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/mr-eggplant/eata","reach":{"status":"ok","spdx":"NOASSERTION"}}],"summary":{"ran_fixture":2,"ran":2,"ran_draft_wrong":4,"unverified":1},"by_repo_kind":{"official":{"samples":6,"ran":5,"repositories":1},"listed":{"samples":3,"ran":3,"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":3,"samples":[{"code_sha256_prefix":"5f3e7b3e8f7ad589","entry":"softmax_entropy","repo":"DequanWang/tent","repo_kind":"official","path":"tent.py","file_url":"https://github.com/DequanWang/tent/blob/HEAD/tent.py","link_basis":"first_harvest_node","language":"python","status":"ran_fixture","verification_level":2,"contract_check":"RAISES","metamorphic_tier":"invariant","behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"5f3e7b3e8f7ad589"}},{"code_sha256_prefix":"9b0b70ed44f66088","entry":"Tent","repo":"DequanWang/tent","repo_kind":"official","path":"tent.py","file_url":"https://github.com/DequanWang/tent/blob/HEAD/tent.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":"deterministic","behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"9b0b70ed44f66088"}},{"code_sha256_prefix":"b927793a8ed0ea9a","entry":"Tent","repo":"mr-eggplant/eata","repo_kind":"listed","path":"tent.py","file_url":"https://github.com/mr-eggplant/eata/blob/HEAD/tent.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NOASSERTION","inline_ok":false,"mcp_get_code":{"code_sha256":"b927793a8ed0ea9a"}},{"code_sha256_prefix":"ddcda7ec86db3b8c","entry":"collect_params","repo":"DequanWang/tent","repo_kind":"official","path":"tent.py","file_url":"https://github.com/DequanWang/tent/blob/HEAD/tent.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":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"ddcda7ec86db3b8c"}},{"code_sha256_prefix":"2471575c724b32c5","entry":"forward_and_adapt","repo":"DequanWang/tent","repo_kind":"official","path":"tent.py","file_url":"https://github.com/DequanWang/tent/blob/HEAD/tent.py","link_basis":"first_harvest_node","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"MISDECLARED","metamorphic_tier":"invariant","behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"2471575c724b32c5"}},{"code_sha256_prefix":"1d10e9bc70ce18a5","entry":"forward_and_adapt","repo":"DequanWang/tent","repo_kind":"official","path":"tent.py","file_url":"https://github.com/DequanWang/tent/blob/HEAD/tent.py","link_basis":"first_harvest_node","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"MISDECLARED","metamorphic_tier":"invariant","behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"1d10e9bc70ce18a5"}},{"code_sha256_prefix":"5afe3f9d26c1b278","entry":"forward_and_adapt","repo":"mr-eggplant/eata","repo_kind":"listed","path":"tent.py","file_url":"https://github.com/mr-eggplant/eata/blob/HEAD/tent.py","link_basis":"first_harvest_node","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"MISDECLARED","metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NOASSERTION","inline_ok":false,"mcp_get_code":{"code_sha256":"5afe3f9d26c1b278"}},{"code_sha256_prefix":"be510b4c74ce8440","entry":"softmax_entropy","repo":"mr-eggplant/eata","repo_kind":"listed","path":"tent.py","file_url":"https://github.com/mr-eggplant/eata/blob/HEAD/tent.py","link_basis":"first_harvest_node","language":"python","status":"ran_fixture","verification_level":1,"contract_check":"RAISES","metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NOASSERTION","inline_ok":false,"mcp_get_code":{"code_sha256":"be510b4c74ce8440"}},{"code_sha256_prefix":"5014c3a1f79a6661","entry":"load_model_and_optimizer","repo":"DequanWang/tent","repo_kind":"official","path":"tent.py","file_url":"https://github.com/DequanWang/tent/blob/HEAD/tent.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":"5014c3a1f79a6661"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}