{"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/flatten-long-range-loss-landscapes-for-cross","title":"Flatten Long-Range Loss Landscapes for Cross-Domain Few-Shot Learning","arxiv_id":"2403.00567","date":"2024-03-01","proceeding":"CVPR 2024 1","authors":["Yixiong Zou","Yicong Liu","Yiman Hu","Yuhua Li","Ruixuan Li"],"abstract":"Cross-domain few-shot learning (CDFSL) aims to acquire knowledge from limited training data in the target domain by leveraging prior knowledge transferred from source domains with abundant training samples. CDFSL faces challenges in transferring knowledge across dissimilar domains and fine-tuning models with limited training data. To address these challenges, we initially extend the analysis of loss landscapes from the parameter space to the representation space, which allows us to simultaneously interpret the transferring and fine-tuning difficulties of CDFSL models. We observe that sharp minima in the loss landscapes of the representation space result in representations that are hard to transfer and fine-tune. Moreover, existing flatness-based methods have limited generalization ability due to their short-range flatness. To enhance the transferability and facilitate fine-tuning, we introduce a simple yet effective approach to achieve long-range flattening of the minima in the loss landscape. This approach considers representations that are differently normalized as minima in the loss landscape and flattens the high-loss region in the middle by randomly sampling interpolated representations. We implement this method as a new normalization layer that replaces the original one in both CNNs and ViTs. This layer is simple and lightweight, introducing only a minimal number of additional parameters. Experimental results on 8 datasets demonstrate that our approach outperforms state-of-the-art methods in terms of average accuracy. Moreover, our method achieves performance improvements of up to 9\\% compared to the current best approaches on individual datasets. Our code will be released.","url_abs":"https://arxiv.org/abs/2403.00567v2","url_pdf":"https://arxiv.org/pdf/2403.00567v2.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":"flatten-long-range-loss-landscapes-for-cross","repo_url":"https://github.com/zoilsen/flor","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":0,"framework":"pytorch","reach":{"status":"ok"}}],"tasks":[{"task_slug":"cross-domain-few-shot","task_name":"Cross-Domain Few-Shot"},{"task_slug":"few-shot-learning","task_name":"Few-Shot Learning"},{"task_slug":"cross-domain-few-shot-learning","task_name":"cross-domain few-shot learning"}],"methods":[],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"atlas_url":"https://app.syntology.ai/?focus=2403.00567","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2403.00567"}},"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/zoilsen/flor","reach":{"status":"ok"}}],"summary":{"ran":6,"ran_draft_wrong":2,"unverified":3},"by_repo_kind":{"official":{"samples":11,"ran":8,"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":11,"samples":[{"code_sha256_prefix":"c43e6e5f82ef6a4c","entry":"DBindex","repo":"zoilsen/flor","repo_kind":"official","path":"utils.py","file_url":"https://github.com/zoilsen/flor/blob/HEAD/utils.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":"c43e6e5f82ef6a4c"}},{"code_sha256_prefix":"4dd319c45d372246","entry":"euclidean_dist","repo":"zoilsen/flor","repo_kind":"official","path":"methods/protonet.py","file_url":"https://github.com/zoilsen/flor/blob/HEAD/methods/protonet.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":"4dd319c45d372246"}},{"code_sha256_prefix":"400a8db2fb9b1633","entry":"get_assigned_file","repo":"zoilsen/flor","repo_kind":"official","path":"options.py","file_url":"https://github.com/zoilsen/flor/blob/HEAD/options.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":"400a8db2fb9b1633"}},{"code_sha256_prefix":"7b02b06c5ac04f3d","entry":"get_resume_file","repo":"zoilsen/flor","repo_kind":"official","path":"options.py","file_url":"https://github.com/zoilsen/flor/blob/HEAD/options.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":"7b02b06c5ac04f3d"}},{"code_sha256_prefix":"f1324589fc273593","entry":"one_hot","repo":"zoilsen/flor","repo_kind":"official","path":"utils.py","file_url":"https://github.com/zoilsen/flor/blob/HEAD/utils.py","link_basis":"harvester_set","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":"f1324589fc273593"}},{"code_sha256_prefix":"938085d32a386023","entry":"softplus","repo":"zoilsen/flor","repo_kind":"official","path":"methods/backbone.py","file_url":"https://github.com/zoilsen/flor/blob/HEAD/methods/backbone.py","link_basis":"harvester_set","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"MISDECLARED","metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"938085d32a386023"}},{"code_sha256_prefix":"de09514deda6f881","entry":"sparsity","repo":"zoilsen/flor","repo_kind":"official","path":"utils.py","file_url":"https://github.com/zoilsen/flor/blob/HEAD/utils.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":"de09514deda6f881"}},{"code_sha256_prefix":"acf1008d411fbae3","entry":"train","repo":"zoilsen/flor","repo_kind":"official","path":"network_train.py","file_url":"https://github.com/zoilsen/flor/blob/HEAD/network_train.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":"acf1008d411fbae3"}},{"code_sha256_prefix":"7f253b800d51e8d9","entry":"ResNet10","repo":"zoilsen/flor","repo_kind":"official","path":"methods/backbone.py","file_url":"https://github.com/zoilsen/flor/blob/HEAD/methods/backbone.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":"7f253b800d51e8d9"}},{"code_sha256_prefix":"ee3b1d7df72ebb48","entry":"ResNet18","repo":"zoilsen/flor","repo_kind":"official","path":"methods/backbone.py","file_url":"https://github.com/zoilsen/flor/blob/HEAD/methods/backbone.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":"ee3b1d7df72ebb48"}},{"code_sha256_prefix":"ee012e3754df8726","entry":"parse_args","repo":"zoilsen/flor","repo_kind":"official","path":"options.py","file_url":"https://github.com/zoilsen/flor/blob/HEAD/options.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":"ee012e3754df8726"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}