{"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/arxiv-2607-17653","title":"LFM: Leveraging Foundation Models for Source-Free Universal Domain Adaptation","arxiv_id":"2607.17653","date":"2026-07-20","proceeding":null,"authors":["Jing Li","Pan Liu","Meng Zhao","Wanli Xue","Yanhong Yang","Xu Cheng","Fan Shi","Jianhua Zhang","Qinghua Hu","Shengyong Chen"],"abstract":"Source-free universal domain adaptation (SF-UniDA) adapts a pre-trained source model to an unlabeled target domain under both covariate and label shifts, without access to source data. However, existing SF-UniDA methods rely on inefficient techniques such as threshold tuning and clustering. Foundation models (FMs), known for their generalization and zero-shot capabilities, remain underexplored in SF-UniDA. In this paper, we propose a framework that leverages foundation models (LFM) for SF-UniDA. We use a vision-language model (VLM) to compute similarities between target samples and text labels, including those for unknown classes generated by prompting a large language model. The label shift type is determined by analyzing the coefficient of variation of a similarity-based sample-level score. Unknown samples are identified using a binary Gaussian mixture model fitted to another similarity-based metric. Under a consensus strategy, the pseudo-labels generated by the VLM are refined by the target model initialized with the pre-trained source model, integrating knowledge from both the source domain and foundation models. Finally, these refined pseudo-labels are used to train the target model. Extensive experiments across all possible label shifts and multiple benchmarks demonstrate the effectiveness and superiority of our proposed LFM framework. Our code is available at https://github.com/iamjingli/LFM.","url_abs":"https://arxiv.org/abs/2607.17653","url_pdf":"https://arxiv.org/pdf/2607.17653","source":{"archive":null,"snapshot":"2025-07-28","note":"not in the Papers with Code archive (frozen at the snapshot)","row_kind":"graph","title_abstract_authors_date":"arXiv metadata, CC0 1.0 (https://info.arxiv.org/help/license)"},"code_links":[],"tasks":[],"methods":[],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"atlas_url":"https://app.syntology.ai/?focus=2607.17653","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2607.17653"}},"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":[{"mentioned_in_github":null,"is_official":null,"provenance":"deterministic:regex_extraction","mentioned_in_paper":null,"url":"https://github.com/iamjingli/LFM","reach":null}],"summary":{"ran":3,"ran_draft_wrong":12,"ran_fixture":4,"unverified":11},"by_repo_kind":{"found_in_text":{"samples":26,"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":4,"samples":[{"code_sha256_prefix":"590aa0969d97b025","entry":"Classifier","repo":"iamjingli/LFM","repo_kind":"found_in_text","path":"train_target.py","file_url":"https://github.com/iamjingli/LFM/blob/HEAD/train_target.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":"590aa0969d97b025"}},{"code_sha256_prefix":"85470d3ab6c52602","entry":"Embedding","repo":"iamjingli/LFM","repo_kind":"found_in_text","path":"train_target.py","file_url":"https://github.com/iamjingli/LFM/blob/HEAD/train_target.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":"85470d3ab6c52602"}},{"code_sha256_prefix":"94b5622f0aa7add1","entry":"Entropy","repo":null,"repo_kind":null,"path":null,"file_url":null,"link_basis":"identical_code_first_harvested_elsewhere","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"MISDECLARED","metamorphic_tier":"invariant","behaviour_fingerprint":true,"licence":null,"inline_ok":false,"mcp_get_code":{"code_sha256":"94b5622f0aa7add1"}},{"code_sha256_prefix":"db868eb88f5a2b9b","entry":"SFUniDADataset","repo":"iamjingli/LFM","repo_kind":"found_in_text","path":"train_target.py","file_url":"https://github.com/iamjingli/LFM/blob/HEAD/train_target.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":"db868eb88f5a2b9b"}},{"code_sha256_prefix":"57ee79329c2933a6","entry":"compute_h_score","repo":"iamjingli/LFM","repo_kind":"found_in_text","path":"train_target.py","file_url":"https://github.com/iamjingli/LFM/blob/HEAD/train_target.py","link_basis":"first_harvest_node","language":"python","status":"ran_fixture","verification_level":1,"contract_check":"RAISES","metamorphic_tier":"deterministic","behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"57ee79329c2933a6"}},{"code_sha256_prefix":"51eb44363c6c9cea","entry":"get_ood_scores_clip","repo":"iamjingli/LFM","repo_kind":"found_in_text","path":"train_target.py","file_url":"https://github.com/iamjingli/LFM/blob/HEAD/train_target.py","link_basis":"first_harvest_node","language":"python","status":"ran_fixture","verification_level":1,"contract_check":"RAISES","metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"51eb44363c6c9cea"}},{"code_sha256_prefix":"beb9eadd0bfb2292","entry":"get_pseudo_labels","repo":"iamjingli/LFM","repo_kind":"found_in_text","path":"train_target.py","file_url":"https://github.com/iamjingli/LFM/blob/HEAD/train_target.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":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"beb9eadd0bfb2292"}},{"code_sha256_prefix":"1069918b276d2855","entry":"load_json","repo":"iamjingli/LFM","repo_kind":"found_in_text","path":"train_target.py","file_url":"https://github.com/iamjingli/LFM/blob/HEAD/train_target.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":"1069918b276d2855"}},{"code_sha256_prefix":"a7928c7cf111366a","entry":"log_args","repo":"iamjingli/LFM","repo_kind":"found_in_text","path":"train_target.py","file_url":"https://github.com/iamjingli/LFM/blob/HEAD/train_target.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":"a7928c7cf111366a"}},{"code_sha256_prefix":"0b7ffc9f8b77529c","entry":"lr_scheduler","repo":null,"repo_kind":null,"path":null,"file_url":null,"link_basis":"identical_code_first_harvested_elsewhere","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"OUTPUT_MISDECLARED","metamorphic_tier":"deterministic","behaviour_fingerprint":false,"licence":null,"inline_ok":false,"mcp_get_code":{"code_sha256":"0b7ffc9f8b77529c"}},{"code_sha256_prefix":"e21790f387e86204","entry":"obtain_gpt_class_and_save","repo":"iamjingli/LFM","repo_kind":"found_in_text","path":"train_target.py","file_url":"https://github.com/iamjingli/LFM/blob/HEAD/train_target.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":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"e21790f387e86204"}},{"code_sha256_prefix":"93a11f62e4a129f0","entry":"op_copy","repo":null,"repo_kind":null,"path":null,"file_url":null,"link_basis":"identical_code_first_harvested_elsewhere","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"OUTPUT_MISDECLARED","metamorphic_tier":"deterministic","behaviour_fingerprint":false,"licence":null,"inline_ok":false,"mcp_get_code":{"code_sha256":"93a11f62e4a129f0"}},{"code_sha256_prefix":"d9512c44141b4aa8","entry":"pre_filter","repo":"iamjingli/LFM","repo_kind":"found_in_text","path":"train_target.py","file_url":"https://github.com/iamjingli/LFM/blob/HEAD/train_target.py","link_basis":"first_harvest_node","language":"python","status":"ran_fixture","verification_level":1,"contract_check":"RAISES","metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"d9512c44141b4aa8"}},{"code_sha256_prefix":"f32a4c158be3016c","entry":"remove_overlap_class","repo":"iamjingli/LFM","repo_kind":"found_in_text","path":"train_target.py","file_url":"https://github.com/iamjingli/LFM/blob/HEAD/train_target.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":"f32a4c158be3016c"}},{"code_sha256_prefix":"4c7a1e20b84ac632","entry":"set_logger","repo":"iamjingli/LFM","repo_kind":"found_in_text","path":"train_target.py","file_url":"https://github.com/iamjingli/LFM/blob/HEAD/train_target.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":"4c7a1e20b84ac632"}},{"code_sha256_prefix":"46062947cf3ab0e6","entry":"stringtolist","repo":null,"repo_kind":null,"path":null,"file_url":null,"link_basis":"identical_code_first_harvested_elsewhere","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"OUTPUT_MISDECLARED","metamorphic_tier":"deterministic","behaviour_fingerprint":true,"licence":null,"inline_ok":false,"mcp_get_code":{"code_sha256":"46062947cf3ab0e6"}},{"code_sha256_prefix":"fe73cf9445756920","entry":"test","repo":"iamjingli/LFM","repo_kind":"found_in_text","path":"train_target.py","file_url":"https://github.com/iamjingli/LFM/blob/HEAD/train_target.py","link_basis":"first_harvest_node","language":"python","status":"ran_fixture","verification_level":1,"contract_check":"RAISES","metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"fe73cf9445756920"}},{"code_sha256_prefix":"13b7b1c692c187e0","entry":"test_transform","repo":"iamjingli/LFM","repo_kind":"found_in_text","path":"train_target.py","file_url":"https://github.com/iamjingli/LFM/blob/HEAD/train_target.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":"13b7b1c692c187e0"}},{"code_sha256_prefix":"ada9656c14c75934","entry":"train_transform","repo":"iamjingli/LFM","repo_kind":"found_in_text","path":"train_target.py","file_url":"https://github.com/iamjingli/LFM/blob/HEAD/train_target.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":"ada9656c14c75934"}},{"code_sha256_prefix":"4db77fc0e9bf39b0","entry":"PromptGenerator","repo":"iamjingli/LFM","repo_kind":"found_in_text","path":"train_target.py","file_url":"https://github.com/iamjingli/LFM/blob/HEAD/train_target.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":"4db77fc0e9bf39b0"}},{"code_sha256_prefix":"380df4780014a94c","entry":"ResBase","repo":"iamjingli/LFM","repo_kind":"found_in_text","path":"train_target.py","file_url":"https://github.com/iamjingli/LFM/blob/HEAD/train_target.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":"380df4780014a94c"}},{"code_sha256_prefix":"6153fbffb3985887","entry":"SFUniDA","repo":"iamjingli/LFM","repo_kind":"found_in_text","path":"train_target.py","file_url":"https://github.com/iamjingli/LFM/blob/HEAD/train_target.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":"6153fbffb3985887"}},{"code_sha256_prefix":"112349e40ab69ddb","entry":"VGGBase","repo":"iamjingli/LFM","repo_kind":"found_in_text","path":"train_target.py","file_url":"https://github.com/iamjingli/LFM/blob/HEAD/train_target.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":"112349e40ab69ddb"}},{"code_sha256_prefix":"4528e48fcffa0b3d","entry":"get_completion","repo":"iamjingli/LFM","repo_kind":"found_in_text","path":"train_target.py","file_url":"https://github.com/iamjingli/LFM/blob/HEAD/train_target.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":"4528e48fcffa0b3d"}},{"code_sha256_prefix":"dd65b4eaa2bc257e","entry":"get_completion_from_messages","repo":"iamjingli/LFM","repo_kind":"found_in_text","path":"train_target.py","file_url":"https://github.com/iamjingli/LFM/blob/HEAD/train_target.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":"dd65b4eaa2bc257e"}},{"code_sha256_prefix":"780faf558bba6b54","entry":"get_idx","repo":"iamjingli/LFM","repo_kind":"found_in_text","path":"train_target.py","file_url":"https://github.com/iamjingli/LFM/blob/HEAD/train_target.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":"780faf558bba6b54"}},{"code_sha256_prefix":"6bad6d16ba57825e","entry":"load_llm_classes","repo":"iamjingli/LFM","repo_kind":"found_in_text","path":"train_target.py","file_url":"https://github.com/iamjingli/LFM/blob/HEAD/train_target.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":"6bad6d16ba57825e"}},{"code_sha256_prefix":"51b1a343a1c5c316","entry":"main","repo":"iamjingli/LFM","repo_kind":"found_in_text","path":"train_target.py","file_url":"https://github.com/iamjingli/LFM/blob/HEAD/train_target.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":"51b1a343a1c5c316"}},{"code_sha256_prefix":"92aa3c44ba29df0c","entry":"set_model_clip","repo":"iamjingli/LFM","repo_kind":"found_in_text","path":"train_target.py","file_url":"https://github.com/iamjingli/LFM/blob/HEAD/train_target.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":"92aa3c44ba29df0c"}},{"code_sha256_prefix":"721005b41f811e51","entry":"tr","repo":"iamjingli/LFM","repo_kind":"found_in_text","path":"train_target.py","file_url":"https://github.com/iamjingli/LFM/blob/HEAD/train_target.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":"721005b41f811e51"}}]},"arxiv_metadata":{"licence":"arXiv metadata, CC0 1.0 (https://info.arxiv.org/help/license)","fields":["title","abstract","authors","date"],"primary_category":"cs.LG","source":"arxiv_2026.jsonl"},"syntology_extracted_results":{"kind":"leaderboard_placements","source":"Syntology's leaderboard-shaped extractor over the paper's own arXiv-HTML tables: a model pointed at a cell, the number was read from that cell and checked against the board's metric, dataset, split and scale, and an independent check accepted the entry; not reviewed by the paper's authors or the archive's editors","extractor_model":"global.anthropic.claude-sonnet-4-5-20250929-v1:0","verifier_model":"global.anthropic.claude-sonnet-4-5-20250929-v1:0","prompt_sha":"fa63d4bb9d755694","coverage":{"sentence":"Syntology has checked 6,264 of the 9,581 papers on this site that are newer than the archive; results from the others appear after they are checked.","papers_newer_than_archive":9581,"papers_checked":6264},"entries":[],"not_placed":{"boards":4,"rejected_by_independent_check":4,"refused_by_a_rule":0,"check_did_not_answer":0,"proposed_without_a_cell":0,"declined_by_site":0}}}