{"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/fed-grab-federated-long-tailed-learning-with-1","title":"Fed-GraB: Federated Long-tailed Learning with Self-Adjusting Gradient Balancer","arxiv_id":"2310.07587","date":"2023-10-11","proceeding":"NeurIPS 2023 11","authors":["Zikai Xiao","Zihan Chen","Songshang Liu","Hualiang Wang","Yang Feng","Jin Hao","Joey Tianyi Zhou","Jian Wu","Howard Hao Yang","Zuozhu Liu"],"abstract":"Data privacy and long-tailed distribution are the norms rather than the exception in many real-world tasks. This paper investigates a federated long-tailed learning (Fed-LT) task in which each client holds a locally heterogeneous dataset; if the datasets can be globally aggregated, they jointly exhibit a long-tailed distribution. Under such a setting, existing federated optimization and/or centralized long-tailed learning methods hardly apply due to challenges in (a) characterizing the global long-tailed distribution under privacy constraints and (b) adjusting the local learning strategy to cope with the head-tail imbalance. In response, we propose a method termed $\\texttt{Fed-GraB}$, comprised of a Self-adjusting Gradient Balancer (SGB) module that re-weights clients' gradients in a closed-loop manner, based on the feedback of global long-tailed distribution evaluated by a Direct Prior Analyzer (DPA) module. Using $\\texttt{Fed-GraB}$, clients can effectively alleviate the distribution drift caused by data heterogeneity during the model training process and obtain a global model with better performance on the minority classes while maintaining the performance of the majority classes. Extensive experiments demonstrate that $\\texttt{Fed-GraB}$ achieves state-of-the-art performance on representative datasets such as CIFAR-10-LT, CIFAR-100-LT, ImageNet-LT, and iNaturalist.","url_abs":"https://arxiv.org/abs/2310.07587v4","url_pdf":"https://arxiv.org/pdf/2310.07587v4.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":"fed-grab-federated-long-tailed-learning-with-1","repo_url":"https://github.com/zackzikaixiao/fedgrab","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":0,"framework":"pytorch","reach":{"status":"ok"}}],"tasks":[],"methods":[],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"atlas_url":"https://app.syntology.ai/?focus=2310.07587","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2310.07587"}},"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/ZackZikaiXiao/FedGraB","reach":{"status":"ok"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/zackzikaixiao/fedgrab","reach":{"status":"ok"}}],"summary":{"ran":8,"ran_draft_wrong":7,"ran_violates":1,"unverified":4},"by_repo_kind":{"official":{"samples":20,"ran":16,"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":20,"samples":[{"code_sha256_prefix":"7248400cfaf54981","entry":"ResNet18","repo":"ZackZikaiXiao/FedGraB","repo_kind":"official","path":"model/model_res.py","file_url":"https://github.com/ZackZikaiXiao/FedGraB/blob/HEAD/model/model_res.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":"7248400cfaf54981"}},{"code_sha256_prefix":"20a02fb684e52cb6","entry":"ResNet34","repo":"ZackZikaiXiao/FedGraB","repo_kind":"official","path":"model/model_res.py","file_url":"https://github.com/ZackZikaiXiao/FedGraB/blob/HEAD/model/model_res.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":"20a02fb684e52cb6"}},{"code_sha256_prefix":"e23b33e37ebd0ef6","entry":"calculate_mean_std","repo":"ZackZikaiXiao/FedGraB","repo_kind":"official","path":"mytools/cal_deviation.py","file_url":"https://github.com/ZackZikaiXiao/FedGraB/blob/HEAD/mytools/cal_deviation.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":"e23b33e37ebd0ef6"}},{"code_sha256_prefix":"2a80220dabcb742a","entry":"conv1x1","repo":"ZackZikaiXiao/FedGraB","repo_kind":"official","path":"model/model_res_official.py","file_url":"https://github.com/ZackZikaiXiao/FedGraB/blob/HEAD/model/model_res_official.py","link_basis":"harvester_set","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":"2a80220dabcb742a"}},{"code_sha256_prefix":"600ff2c45e0de056","entry":"conv3x3","repo":"ZackZikaiXiao/FedGraB","repo_kind":"official","path":"model/model_res_official.py","file_url":"https://github.com/ZackZikaiXiao/FedGraB/blob/HEAD/model/model_res_official.py","link_basis":"harvester_set","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":"600ff2c45e0de056"}},{"code_sha256_prefix":"583f9780bdd00a45","entry":"conv3x3","repo":"ZackZikaiXiao/FedGraB","repo_kind":"official","path":"model/model_res.py","file_url":"https://github.com/ZackZikaiXiao/FedGraB/blob/HEAD/model/model_res.py","link_basis":"harvester_set","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":"583f9780bdd00a45"}},{"code_sha256_prefix":"f1e3c822763f3ebb","entry":"drop_connect","repo":"ZackZikaiXiao/FedGraB","repo_kind":"official","path":"model/effutil.py","file_url":"https://github.com/ZackZikaiXiao/FedGraB/blob/HEAD/model/effutil.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":"f1e3c822763f3ebb"}},{"code_sha256_prefix":"1a589719693e1216","entry":"extract_global_test_acc","repo":"ZackZikaiXiao/FedGraB","repo_kind":"official","path":"mytools/accuracy_trend.py","file_url":"https://github.com/ZackZikaiXiao/FedGraB/blob/HEAD/mytools/accuracy_trend.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":"1a589719693e1216"}},{"code_sha256_prefix":"d8889674cfd7a393","entry":"get_valid_models","repo":"zackzikaixiao/fedgrab","repo_kind":"official","path":"util/averaging.py","file_url":"https://github.com/zackzikaixiao/fedgrab/blob/HEAD/util/averaging.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":"d8889674cfd7a393"}},{"code_sha256_prefix":"33feb628adca5b16","entry":"is_valid_model","repo":"zackzikaixiao/fedgrab","repo_kind":"official","path":"util/averaging.py","file_url":"https://github.com/zackzikaixiao/fedgrab/blob/HEAD/util/averaging.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":"33feb628adca5b16"}},{"code_sha256_prefix":"bf29b73605eff124","entry":"median_opt","repo":"zackzikaixiao/fedgrab","repo_kind":"official","path":"util/averaging.py","file_url":"https://github.com/zackzikaixiao/fedgrab/blob/HEAD/util/averaging.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":"bf29b73605eff124"}},{"code_sha256_prefix":"49d76a6212141b87","entry":"random_unit","repo":"ZackZikaiXiao/FedGraB","repo_kind":"official","path":"util/losses.py","file_url":"https://github.com/ZackZikaiXiao/FedGraB/blob/HEAD/util/losses.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":"49d76a6212141b87"}},{"code_sha256_prefix":"e01e012526dcaecc","entry":"repeated_median","repo":"zackzikaixiao/fedgrab","repo_kind":"official","path":"util/averaging.py","file_url":"https://github.com/zackzikaixiao/fedgrab/blob/HEAD/util/averaging.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":"e01e012526dcaecc"}},{"code_sha256_prefix":"bde7e7ccb8dae4f5","entry":"round_filters","repo":"ZackZikaiXiao/FedGraB","repo_kind":"official","path":"model/effutil.py","file_url":"https://github.com/ZackZikaiXiao/FedGraB/blob/HEAD/model/effutil.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":"bde7e7ccb8dae4f5"}},{"code_sha256_prefix":"70f48a3907311f52","entry":"round_repeats","repo":"ZackZikaiXiao/FedGraB","repo_kind":"official","path":"model/effutil.py","file_url":"https://github.com/ZackZikaiXiao/FedGraB/blob/HEAD/model/effutil.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":"70f48a3907311f52"}},{"code_sha256_prefix":"2af42978303848f8","entry":"weighted_average","repo":"zackzikaixiao/fedgrab","repo_kind":"official","path":"util/averaging.py","file_url":"https://github.com/zackzikaixiao/fedgrab/blob/HEAD/util/averaging.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":"2af42978303848f8"}},{"code_sha256_prefix":"d0a680060dc51f1a","entry":"IRLS_aggregation_split_restricted","repo":"zackzikaixiao/fedgrab","repo_kind":"official","path":"util/averaging.py","file_url":"https://github.com/zackzikaixiao/fedgrab/blob/HEAD/util/averaging.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":"d0a680060dc51f1a"}},{"code_sha256_prefix":"b658a92985b03a37","entry":"ResNet50","repo":"ZackZikaiXiao/FedGraB","repo_kind":"official","path":"model/model_res_official.py","file_url":"https://github.com/ZackZikaiXiao/FedGraB/blob/HEAD/model/model_res_official.py","link_basis":"harvester_set","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":"b658a92985b03a37"}},{"code_sha256_prefix":"94005e959c4ccf4c","entry":"get_acc_file_path","repo":"zackzikaixiao/fedgrab","repo_kind":"official","path":"fed_grab.py","file_url":"https://github.com/zackzikaixiao/fedgrab/blob/HEAD/fed_grab.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":"94005e959c4ccf4c"}},{"code_sha256_prefix":"aaabe8c3ebf47b0a","entry":"reweight_algorithm_restricted","repo":"zackzikaixiao/fedgrab","repo_kind":"official","path":"util/averaging.py","file_url":"https://github.com/zackzikaixiao/fedgrab/blob/HEAD/util/averaging.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":"aaabe8c3ebf47b0a"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}