{"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/surgeon-memory-adaptive-fully-test-time","title":"SURGEON: Memory-Adaptive Fully Test-Time Adaptation via Dynamic Activation Sparsity","arxiv_id":"2503.20354","date":"2025-03-26","proceeding":"CVPR 2025 1","authors":["Ke Ma","Jiaqi Tang","Bin Guo","Fan Dang","Sicong Liu","Zhui Zhu","Lei Wu","Cheng Fang","Ying-Cong Chen","Zhiwen Yu","Yunhao Liu"],"abstract":"Despite the growing integration of deep models into mobile terminals, the accuracy of these models declines significantly due to various deployment interferences. Test-time adaptation (TTA) has emerged to improve the performance of deep models by adapting them to unlabeled target data online. Yet, the significant memory cost, particularly in resource-constrained terminals, impedes the effective deployment of most backward-propagation-based TTA methods. To tackle memory constraints, we introduce SURGEON, a method that substantially reduces memory cost while preserving comparable accuracy improvements during fully test-time adaptation (FTTA) without relying on specific network architectures or modifications to the original training procedure. Specifically, we propose a novel dynamic activation sparsity strategy that directly prunes activations at layer-specific dynamic ratios during adaptation, allowing for flexible control of learning ability and memory cost in a data-sensitive manner. Among this, two metrics, Gradient Importance and Layer Activation Memory, are considered to determine the layer-wise pruning ratios, reflecting accuracy contribution and memory efficiency, respectively. Experimentally, our method surpasses the baselines by not only reducing memory usage but also achieving superior accuracy, delivering SOTA performance across diverse datasets, architectures, and tasks.","url_abs":"https://arxiv.org/abs/2503.20354v1","url_pdf":"https://arxiv.org/pdf/2503.20354v1.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":"surgeon-memory-adaptive-fully-test-time","repo_url":"https://github.com/kadmkbl/SURGEON","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"pytorch","reach":null}],"tasks":[{"task_slug":"test-time-adaptation","task_name":"Test-time Adaptation"}],"methods":[{"method_slug":"pruning","method_name":"Pruning"}],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"atlas_url":"https://app.syntology.ai/?focus=2503.20354","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2503.20354"}},"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/kadmkbl/SURGEON","reach":null}],"summary":{"ran":4,"ran_draft_wrong":3,"ran_fixture":2,"ran_honours":5,"ran_violates":1,"unverified":4},"by_repo_kind":{"listed":{"samples":19,"ran":15,"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":19,"samples":[{"code_sha256_prefix":"3ab07e39284c363b","entry":"AutoFreezeConv2dFunction","repo":"kadmkbl/SURGEON","repo_kind":"listed","path":"methods/das.py","file_url":"https://github.com/kadmkbl/SURGEON/blob/HEAD/methods/das.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":"3ab07e39284c363b"}},{"code_sha256_prefix":"a62d806a71151d70","entry":"AutoFreezeFCFunction","repo":"kadmkbl/SURGEON","repo_kind":"listed","path":"methods/das.py","file_url":"https://github.com/kadmkbl/SURGEON/blob/HEAD/methods/das.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":"a62d806a71151d70"}},{"code_sha256_prefix":"a75f9647bc45a8df","entry":"Clipper","repo":"kadmkbl/SURGEON","repo_kind":"listed","path":"methods/das.py","file_url":"https://github.com/kadmkbl/SURGEON/blob/HEAD/methods/das.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":"a75f9647bc45a8df"}},{"code_sha256_prefix":"ddaf38ed7b1cf5a6","entry":"ImageNormalizer","repo":"kadmkbl/SURGEON","repo_kind":"listed","path":"methods/das.py","file_url":"https://github.com/kadmkbl/SURGEON/blob/HEAD/methods/das.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":"deterministic","behaviour_fingerprint":true,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"ddaf38ed7b1cf5a6"}},{"code_sha256_prefix":"8a69f6beafdd8b41","entry":"_ntuple","repo":"kadmkbl/SURGEON","repo_kind":"listed","path":"methods/das.py","file_url":"https://github.com/kadmkbl/SURGEON/blob/HEAD/methods/das.py","link_basis":"first_harvest_node","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":"8a69f6beafdd8b41"}},{"code_sha256_prefix":"62be6c250b9d0a8b","entry":"backward_compute","repo":"kadmkbl/SURGEON","repo_kind":"listed","path":"methods/das.py","file_url":"https://github.com/kadmkbl/SURGEON/blob/HEAD/methods/das.py","link_basis":"first_harvest_node","language":"python","status":"ran_fixture","verification_level":1,"contract_check":"RAISES","metamorphic_tier":"invariant","behaviour_fingerprint":true,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"62be6c250b9d0a8b"}},{"code_sha256_prefix":"45406eec57fc2f7d","entry":"consistency","repo":"kadmkbl/SURGEON","repo_kind":"listed","path":"methods/das.py","file_url":"https://github.com/kadmkbl/SURGEON/blob/HEAD/methods/das.py","link_basis":"first_harvest_node","language":"python","status":"ran_honours","verification_level":1,"contract_check":"HONOURS","metamorphic_tier":"invariant","behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"45406eec57fc2f7d"}},{"code_sha256_prefix":"cfe53e17ff979be5","entry":"forward_compute","repo":"kadmkbl/SURGEON","repo_kind":"listed","path":"methods/das.py","file_url":"https://github.com/kadmkbl/SURGEON/blob/HEAD/methods/das.py","link_basis":"first_harvest_node","language":"python","status":"ran_fixture","verification_level":1,"contract_check":"RAISES","metamorphic_tier":"invariant","behaviour_fingerprint":true,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"cfe53e17ff979be5"}},{"code_sha256_prefix":"b84c0781bc911e1e","entry":"gauss_kl_divergence","repo":"kadmkbl/SURGEON","repo_kind":"listed","path":"methods/das.py","file_url":"https://github.com/kadmkbl/SURGEON/blob/HEAD/methods/das.py","link_basis":"first_harvest_node","language":"python","status":"ran_honours","verification_level":1,"contract_check":"HONOURS","metamorphic_tier":"invariant","behaviour_fingerprint":true,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"b84c0781bc911e1e"}},{"code_sha256_prefix":"2609b174a5a12537","entry":"gauss_symm_kl_divergence","repo":"kadmkbl/SURGEON","repo_kind":"listed","path":"methods/das.py","file_url":"https://github.com/kadmkbl/SURGEON/blob/HEAD/methods/das.py","link_basis":"first_harvest_node","language":"python","status":"ran_honours","verification_level":1,"contract_check":"HONOURS","metamorphic_tier":"invariant","behaviour_fingerprint":true,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"2609b174a5a12537"}},{"code_sha256_prefix":"899f5102d34cc83e","entry":"get_tgi","repo":"kadmkbl/SURGEON","repo_kind":"listed","path":"methods/das.py","file_url":"https://github.com/kadmkbl/SURGEON/blob/HEAD/methods/das.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":"899f5102d34cc83e"}},{"code_sha256_prefix":"d343b36a78d08d71","entry":"get_tta_transforms","repo":"kadmkbl/SURGEON","repo_kind":"listed","path":"methods/das.py","file_url":"https://github.com/kadmkbl/SURGEON/blob/HEAD/methods/das.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":"d343b36a78d08d71"}},{"code_sha256_prefix":"37fad9913f611960","entry":"simple_divergence","repo":"kadmkbl/SURGEON","repo_kind":"listed","path":"methods/das.py","file_url":"https://github.com/kadmkbl/SURGEON/blob/HEAD/methods/das.py","link_basis":"first_harvest_node","language":"python","status":"ran_honours","verification_level":1,"contract_check":"HONOURS","metamorphic_tier":"invariant","behaviour_fingerprint":true,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"37fad9913f611960"}},{"code_sha256_prefix":"db8b634a36fc3530","entry":"softmax_entropy","repo":"kadmkbl/SURGEON","repo_kind":"listed","path":"methods/das.py","file_url":"https://github.com/kadmkbl/SURGEON/blob/HEAD/methods/das.py","link_basis":"first_harvest_node","language":"python","status":"ran_violates","verification_level":1,"contract_check":"VIOLATES","metamorphic_tier":"invariant","behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"db8b634a36fc3530"}},{"code_sha256_prefix":"30c492fa1b06fd3a","entry":"softmax_entropy_sample","repo":"kadmkbl/SURGEON","repo_kind":"listed","path":"methods/das.py","file_url":"https://github.com/kadmkbl/SURGEON/blob/HEAD/methods/das.py","link_basis":"first_harvest_node","language":"python","status":"ran_honours","verification_level":1,"contract_check":"HONOURS","metamorphic_tier":"invariant","behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"30c492fa1b06fd3a"}},{"code_sha256_prefix":"c91ae8a8f9eb5bf0","entry":"AutoFreezeNorm2dFunction","repo":"kadmkbl/SURGEON","repo_kind":"listed","path":"methods/das.py","file_url":"https://github.com/kadmkbl/SURGEON/blob/HEAD/methods/das.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":"c91ae8a8f9eb5bf0"}},{"code_sha256_prefix":"2b1c178da36a6016","entry":"DAS","repo":"kadmkbl/SURGEON","repo_kind":"listed","path":"methods/das.py","file_url":"https://github.com/kadmkbl/SURGEON/blob/HEAD/methods/das.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":"2b1c178da36a6016"}},{"code_sha256_prefix":"58fd6b677c71df61","entry":"ResNetDomainNet126","repo":"kadmkbl/SURGEON","repo_kind":"listed","path":"methods/das.py","file_url":"https://github.com/kadmkbl/SURGEON/blob/HEAD/methods/das.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":"58fd6b677c71df61"}},{"code_sha256_prefix":"3ae0a49e0a49f74e","entry":"TTAMethod","repo":"kadmkbl/SURGEON","repo_kind":"listed","path":"methods/das.py","file_url":"https://github.com/kadmkbl/SURGEON/blob/HEAD/methods/das.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":"3ae0a49e0a49f74e"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}