{"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-2605-13475","title":"FedHPro: Federated Hyper-Prototype Learning via Gradient Matching","arxiv_id":"2605.13475","date":"2026-05-13","proceeding":"ICML","authors":["Huan Wang","Jun Shen","Haoran Li","Zhenyu Yang","Jun Yan","Ousman Manjang","Yanlong Zhai","Di Wu","Guansong Pang"],"abstract":"Federated Learning (FL) enables collaborative training of distributed clients while protecting privacy. To enhance generalization capability in FL, prototype-based FL is in the spotlight, since shared global prototypes offer semantic anchors for aligning client-specific local prototypes. However, existing methods update global prototypes at the prototype-level via averaging local prototypes or refining global anchors, which often leads to semantic drift across clients and subsequently yields a misaligned global signal. To alleviate this issue, we introduce hyper-prototypes, defined by a set of learnable global class-wise prototypes to preserve underlying semantic knowledge across clients. The hyper-prototypes are optimized via gradient matching to align with class-relevant characteristics distilled directly from clients' real samples, rather than prototype-level descriptors. We further propose FedHPro, a Federated Hyper-Prototype Learning framework, to leverage hyper-prototypes to promote inter-class separability via mutual-contrastive learning with client-specific margin, while encouraging intra-class uniformity through a consistency penalty. Comprehensive experiments under diverse heterogeneous scenarios confirm that 1) hyper-prototypes produce a more semantically consistent global signal, and 2) FedHPro achieves state-of-the-art performance on several benchmark datasets. Code is available at \\href{https://github.com/mala-lab/FedHPro}{https://github.com/mala-lab/FedHPro}.","url_abs":"https://arxiv.org/abs/2605.13475","url_pdf":"https://arxiv.org/pdf/2605.13475","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=2605.13475","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2605.13475"}},"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/mala-lab/FedHPro","reach":null}],"summary":{"ran":2,"ran_fixture":2,"ran_draft_wrong":14,"ran_violates":1,"ran_honours":2,"unverified":8},"by_repo_kind":{"found_in_text":{"samples":29,"ran":21,"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":29,"samples":[{"code_sha256_prefix":"fb092ad2e962f35d","entry":"BasicBlock","repo":"mala-lab/FedHPro","repo_kind":"found_in_text","path":"main_run.py","file_url":"https://github.com/mala-lab/FedHPro/blob/HEAD/main_run.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":"fb092ad2e962f35d"}},{"code_sha256_prefix":"655f5003e174acea","entry":"DiffAugment","repo":"mala-lab/FedHPro","repo_kind":"found_in_text","path":"main_run.py","file_url":"https://github.com/mala-lab/FedHPro/blob/HEAD/main_run.py","link_basis":"first_harvest_node","language":"python","status":"ran_fixture","verification_level":1,"contract_check":"RAISES","metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"655f5003e174acea"}},{"code_sha256_prefix":"ec02bbab57d76432","entry":"TensorDataset","repo":"mala-lab/FedHPro","repo_kind":"found_in_text","path":"main_run.py","file_url":"https://github.com/mala-lab/FedHPro/blob/HEAD/main_run.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":"ec02bbab57d76432"}},{"code_sha256_prefix":"b57b5bd7c4b8f301","entry":"build_dataloader","repo":"mala-lab/FedHPro","repo_kind":"found_in_text","path":"main_run.py","file_url":"https://github.com/mala-lab/FedHPro/blob/HEAD/main_run.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":"b57b5bd7c4b8f301"}},{"code_sha256_prefix":"b4c1b12e55eb5ab1","entry":"build_non_iid_by_dirichlet","repo":"mala-lab/FedHPro","repo_kind":"found_in_text","path":"main_run.py","file_url":"https://github.com/mala-lab/FedHPro/blob/HEAD/main_run.py","link_basis":"first_harvest_node","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":"b4c1b12e55eb5ab1"}},{"code_sha256_prefix":"7f1c8cbd622ebc50","entry":"classify_label","repo":"mala-lab/FedHPro","repo_kind":"found_in_text","path":"main_run.py","file_url":"https://github.com/mala-lab/FedHPro/blob/HEAD/main_run.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":"7f1c8cbd622ebc50"}},{"code_sha256_prefix":"334d6dae5b67e789","entry":"conv3x3","repo":"mala-lab/FedHPro","repo_kind":"found_in_text","path":"main_run.py","file_url":"https://github.com/mala-lab/FedHPro/blob/HEAD/main_run.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":"334d6dae5b67e789"}},{"code_sha256_prefix":"5709bffb148052d0","entry":"dataset_on_cuda","repo":"mala-lab/FedHPro","repo_kind":"found_in_text","path":"main_run.py","file_url":"https://github.com/mala-lab/FedHPro/blob/HEAD/main_run.py","link_basis":"first_harvest_node","language":"python","status":"ran_violates","verification_level":1,"contract_check":"VIOLATES","metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"5709bffb148052d0"}},{"code_sha256_prefix":"5071564c5a3a5910","entry":"get_class_num","repo":"mala-lab/FedHPro","repo_kind":"found_in_text","path":"main_run.py","file_url":"https://github.com/mala-lab/FedHPro/blob/HEAD/main_run.py","link_basis":"first_harvest_node","language":"python","status":"ran_fixture","verification_level":1,"contract_check":"RAISES","metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"5071564c5a3a5910"}},{"code_sha256_prefix":"9685a8e3bdc388f2","entry":"match_meta","repo":"mala-lab/FedHPro","repo_kind":"found_in_text","path":"main_run.py","file_url":"https://github.com/mala-lab/FedHPro/blob/HEAD/main_run.py","link_basis":"first_harvest_node","language":"python","status":"ran_honours","verification_level":1,"contract_check":"HONOURS","metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"9685a8e3bdc388f2"}},{"code_sha256_prefix":"00adaf9b0e883dc4","entry":"move_batch_to_device","repo":"mala-lab/FedHPro","repo_kind":"found_in_text","path":"main_run.py","file_url":"https://github.com/mala-lab/FedHPro/blob/HEAD/main_run.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":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"00adaf9b0e883dc4"}},{"code_sha256_prefix":"bbcf3d37a05e74fa","entry":"rand_brightness","repo":"mala-lab/FedHPro","repo_kind":"found_in_text","path":"main_run.py","file_url":"https://github.com/mala-lab/FedHPro/blob/HEAD/main_run.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":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"bbcf3d37a05e74fa"}},{"code_sha256_prefix":"da0792c30cd6923d","entry":"rand_contrast","repo":"mala-lab/FedHPro","repo_kind":"found_in_text","path":"main_run.py","file_url":"https://github.com/mala-lab/FedHPro/blob/HEAD/main_run.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":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"da0792c30cd6923d"}},{"code_sha256_prefix":"ce0a33dfa808c724","entry":"rand_crop","repo":"mala-lab/FedHPro","repo_kind":"found_in_text","path":"main_run.py","file_url":"https://github.com/mala-lab/FedHPro/blob/HEAD/main_run.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":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"ce0a33dfa808c724"}},{"code_sha256_prefix":"d3cd62c7852afac2","entry":"rand_cutout","repo":"mala-lab/FedHPro","repo_kind":"found_in_text","path":"main_run.py","file_url":"https://github.com/mala-lab/FedHPro/blob/HEAD/main_run.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":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"d3cd62c7852afac2"}},{"code_sha256_prefix":"17a10de2cc4da2e2","entry":"rand_flip","repo":"mala-lab/FedHPro","repo_kind":"found_in_text","path":"main_run.py","file_url":"https://github.com/mala-lab/FedHPro/blob/HEAD/main_run.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":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"17a10de2cc4da2e2"}},{"code_sha256_prefix":"dffd8500daa6b52b","entry":"rand_rotate","repo":"mala-lab/FedHPro","repo_kind":"found_in_text","path":"main_run.py","file_url":"https://github.com/mala-lab/FedHPro/blob/HEAD/main_run.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":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"dffd8500daa6b52b"}},{"code_sha256_prefix":"0d4958248aaee956","entry":"rand_saturation","repo":"mala-lab/FedHPro","repo_kind":"found_in_text","path":"main_run.py","file_url":"https://github.com/mala-lab/FedHPro/blob/HEAD/main_run.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":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"0d4958248aaee956"}},{"code_sha256_prefix":"2cc42f2e0f92442c","entry":"rand_scale","repo":"mala-lab/FedHPro","repo_kind":"found_in_text","path":"main_run.py","file_url":"https://github.com/mala-lab/FedHPro/blob/HEAD/main_run.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":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"2cc42f2e0f92442c"}},{"code_sha256_prefix":"527678683212df5e","entry":"resnet10","repo":"mala-lab/FedHPro","repo_kind":"found_in_text","path":"main_run.py","file_url":"https://github.com/mala-lab/FedHPro/blob/HEAD/main_run.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":"527678683212df5e"}},{"code_sha256_prefix":"359d7476c4dac80c","entry":"show_clients_data_distribution","repo":"mala-lab/FedHPro","repo_kind":"found_in_text","path":"main_run.py","file_url":"https://github.com/mala-lab/FedHPro/blob/HEAD/main_run.py","link_basis":"first_harvest_node","language":"python","status":"ran_honours","verification_level":1,"contract_check":"HONOURS","metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"359d7476c4dac80c"}},{"code_sha256_prefix":"49b7d702febb94e7","entry":"FedHPro","repo":"mala-lab/FedHPro","repo_kind":"found_in_text","path":"main_run.py","file_url":"https://github.com/mala-lab/FedHPro/blob/HEAD/main_run.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":"49b7d702febb94e7"}},{"code_sha256_prefix":"1ea4d216b47f2c00","entry":"Global","repo":"mala-lab/FedHPro","repo_kind":"found_in_text","path":"main_run.py","file_url":"https://github.com/mala-lab/FedHPro/blob/HEAD/main_run.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":"1ea4d216b47f2c00"}},{"code_sha256_prefix":"b958dbfbdd00124a","entry":"Local","repo":"mala-lab/FedHPro","repo_kind":"found_in_text","path":"main_run.py","file_url":"https://github.com/mala-lab/FedHPro/blob/HEAD/main_run.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":"b958dbfbdd00124a"}},{"code_sha256_prefix":"65278bf1e0bee215","entry":"ParamAugment","repo":"mala-lab/FedHPro","repo_kind":"found_in_text","path":"main_run.py","file_url":"https://github.com/mala-lab/FedHPro/blob/HEAD/main_run.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":"65278bf1e0bee215"}},{"code_sha256_prefix":"f006f77e8ccb48cb","entry":"ResNet","repo":"mala-lab/FedHPro","repo_kind":"found_in_text","path":"main_run.py","file_url":"https://github.com/mala-lab/FedHPro/blob/HEAD/main_run.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":"f006f77e8ccb48cb"}},{"code_sha256_prefix":"7f3622cff695824d","entry":"args_parser","repo":"mala-lab/FedHPro","repo_kind":"found_in_text","path":"main_run.py","file_url":"https://github.com/mala-lab/FedHPro/blob/HEAD/main_run.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":"7f3622cff695824d"}},{"code_sha256_prefix":"36ba6f83059427dd","entry":"clients_indices","repo":"mala-lab/FedHPro","repo_kind":"found_in_text","path":"main_run.py","file_url":"https://github.com/mala-lab/FedHPro/blob/HEAD/main_run.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":"36ba6f83059427dd"}},{"code_sha256_prefix":"ffc176d761cbbebf","entry":"match_loss","repo":"mala-lab/FedHPro","repo_kind":"found_in_text","path":"main_run.py","file_url":"https://github.com/mala-lab/FedHPro/blob/HEAD/main_run.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":"ffc176d761cbbebf"}}]},"arxiv_metadata":{"licence":"arXiv metadata, CC0 1.0 (https://info.arxiv.org/help/license)","fields":["title","abstract","authors","date"],"primary_category":"cs.CV","source":"arxiv_2026.jsonl"},"syntology_extracted_results":null}