{"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/discriminative-sample-guided-and-parameter","title":"Discriminative Sample-Guided and Parameter-Efficient Feature Space Adaptation for Cross-Domain Few-Shot Learning","arxiv_id":"2403.04492","date":"2024-03-07","proceeding":"CVPR 2024 1","authors":["Rashindrie Perera","Saman Halgamuge"],"abstract":"In this paper, we look at cross-domain few-shot classification which presents the challenging task of learning new classes in previously unseen domains with few labelled examples. Existing methods, though somewhat effective, encounter several limitations, which we alleviate through two significant improvements. First, we introduce a lightweight parameter-efficient adaptation strategy to address overfitting associated with fine-tuning a large number of parameters on small datasets. This strategy employs a linear transformation of pre-trained features, significantly reducing the trainable parameter count. Second, we replace the traditional nearest centroid classifier with a discriminative sample-aware loss function, enhancing the model's sensitivity to the inter- and intra-class variances within the training set for improved clustering in feature space. Empirical evaluations on the Meta-Dataset benchmark showcase that our approach not only improves accuracy up to 7.7\\% and 5.3\\% on previously seen and unseen datasets, respectively, but also achieves the above performance while being at least $\\sim3\\times$ more parameter-efficient than existing methods, establishing a new state-of-the-art in cross-domain few-shot learning. Our code is available at https://github.com/rashindrie/DIPA.","url_abs":"https://arxiv.org/abs/2403.04492v3","url_pdf":"https://arxiv.org/pdf/2403.04492v3.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":"discriminative-sample-guided-and-parameter","repo_url":"https://github.com/rashindrie/dipa","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":1,"framework":"pytorch","reach":null}],"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":[{"method_slug":"set","method_name":"SET"}],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"atlas_url":"https://app.syntology.ai/?focus=2403.04492","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2403.04492"}},"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":"deterministic:regex_extraction","url":"https://github.com/rashindrie/DIPA","reach":null}],"summary":{"ran":4,"ran_draft_wrong":1,"ran_honours":1,"unverified":1},"by_repo_kind":{"official":{"samples":6,"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":1,"samples":[{"code_sha256_prefix":"9d399688f8fea385","entry":"Attention","repo":"rashindrie/DIPA","repo_kind":"official","path":"models/vision_transformer_extended.py","file_url":"https://github.com/rashindrie/DIPA/blob/HEAD/models/vision_transformer_extended.py","link_basis":"first_harvest_node","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":"9d399688f8fea385"}},{"code_sha256_prefix":"045a9bd3f28b8448","entry":"Block","repo":"rashindrie/DIPA","repo_kind":"official","path":"models/vision_transformer_extended.py","file_url":"https://github.com/rashindrie/DIPA/blob/HEAD/models/vision_transformer_extended.py","link_basis":"first_harvest_node","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":"045a9bd3f28b8448"}},{"code_sha256_prefix":"a5dd5f3730a5fb22","entry":"Mlp","repo":"rashindrie/DIPA","repo_kind":"official","path":"models/vision_transformer_extended.py","file_url":"https://github.com/rashindrie/DIPA/blob/HEAD/models/vision_transformer_extended.py","link_basis":"first_harvest_node","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":"a5dd5f3730a5fb22"}},{"code_sha256_prefix":"80476e1433f3adf6","entry":"PatchEmbed","repo":"rashindrie/DIPA","repo_kind":"official","path":"models/vision_transformer_extended.py","file_url":"https://github.com/rashindrie/DIPA/blob/HEAD/models/vision_transformer_extended.py","link_basis":"first_harvest_node","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":"80476e1433f3adf6"}},{"code_sha256_prefix":"6606a439addc1bd3","entry":"init_ssf_scale_shift","repo":"rashindrie/DIPA","repo_kind":"official","path":"models/vision_transformer_extended.py","file_url":"https://github.com/rashindrie/DIPA/blob/HEAD/models/vision_transformer_extended.py","link_basis":"first_harvest_node","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"OUTPUT_MISDECLARED","metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"6606a439addc1bd3"}},{"code_sha256_prefix":"61e8364b7e9bcb70","entry":"ssf_ada","repo":null,"repo_kind":null,"path":null,"file_url":null,"link_basis":"identical_code_first_harvested_elsewhere","language":"python","status":"ran_honours","verification_level":1,"contract_check":"HONOURS","metamorphic_tier":"invariant","behaviour_fingerprint":true,"licence":null,"inline_ok":false,"mcp_get_code":{"code_sha256":"61e8364b7e9bcb70"}},{"code_sha256_prefix":"42fb36efea49e311","entry":"VisionTransformerExtended","repo":"rashindrie/DIPA","repo_kind":"official","path":"models/vision_transformer_extended.py","file_url":"https://github.com/rashindrie/DIPA/blob/HEAD/models/vision_transformer_extended.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":"42fb36efea49e311"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}