{"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/heterogeneous-forgetting-compensation-for","title":"Heterogeneous Forgetting Compensation for Class-Incremental Learning","arxiv_id":"2308.03374","date":"2023-08-07","proceeding":"ICCV 2023 1","authors":["Jiahua Dong","Wenqi Liang","Yang Cong","Gan Sun"],"abstract":"Class-incremental learning (CIL) has achieved remarkable successes in learning new classes consecutively while overcoming catastrophic forgetting on old categories. However, most existing CIL methods unreasonably assume that all old categories have the same forgetting pace, and neglect negative influence of forgetting heterogeneity among different old classes on forgetting compensation. To surmount the above challenges, we develop a novel Heterogeneous Forgetting Compensation (HFC) model, which can resolve heterogeneous forgetting of easy-to-forget and hard-to-forget old categories from both representation and gradient aspects. Specifically, we design a task-semantic aggregation block to alleviate heterogeneous forgetting from representation aspect. It aggregates local category information within each task to learn task-shared global representations. Moreover, we develop two novel plug-and-play losses: a gradient-balanced forgetting compensation loss and a gradient-balanced relation distillation loss to alleviate forgetting from gradient aspect. They consider gradient-balanced compensation to rectify forgetting heterogeneity of old categories and heterogeneous relation consistency. Experiments on several representative datasets illustrate effectiveness of our HFC model. The code is available at https://github.com/JiahuaDong/HFC.","url_abs":"https://arxiv.org/abs/2308.03374v2","url_pdf":"https://arxiv.org/pdf/2308.03374v2.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":"heterogeneous-forgetting-compensation-for","repo_url":"https://github.com/jiahuadong/hfc","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok"}}],"tasks":[{"task_slug":"class-incremental-learning","task_name":"Class Incremental Learning"},{"task_slug":"incremental-learning","task_name":"Incremental Learning"},{"task_slug":null,"task_name":"Relation"},{"task_slug":"class-incremental-learning-1","task_name":"class-incremental learning"}],"methods":[],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"atlas_url":"https://app.syntology.ai/?focus=2308.03374","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2308.03374"}},"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/JiahuaDong/HFC","reach":{"status":"ok"}}],"summary":{"ran":10,"unverified":1},"by_repo_kind":{"official":{"samples":11,"ran":10,"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":"cfae7624aaadda21","entry":"build_transform","repo":"JiahuaDong/HFC","repo_kind":"official","path":"dataset.py","file_url":"https://github.com/JiahuaDong/HFC/blob/HEAD/dataset.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":"cfae7624aaadda21"}},{"code_sha256_prefix":"1f65552c7dfe6207","entry":"checkpoint_filter_fn","repo":"JiahuaDong/HFC","repo_kind":"official","path":"vit.py","file_url":"https://github.com/JiahuaDong/HFC/blob/HEAD/vit.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":"1f65552c7dfe6207"}},{"code_sha256_prefix":"b7350611f8e37d00","entry":"get_class_order","repo":"JiahuaDong/HFC","repo_kind":"official","path":"dataset.py","file_url":"https://github.com/JiahuaDong/HFC/blob/HEAD/dataset.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":"b7350611f8e37d00"}},{"code_sha256_prefix":"6c600a2f0f2361f1","entry":"get_init_weights_vit","repo":"JiahuaDong/HFC","repo_kind":"official","path":"vit.py","file_url":"https://github.com/JiahuaDong/HFC/blob/HEAD/vit.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":"6c600a2f0f2361f1"}},{"code_sha256_prefix":"c5268f4f4b95766d","entry":"get_sampler","repo":"JiahuaDong/HFC","repo_kind":"official","path":"samplers.py","file_url":"https://github.com/JiahuaDong/HFC/blob/HEAD/samplers.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":"c5268f4f4b95766d"}},{"code_sha256_prefix":"257ab70d9dfb0e64","entry":"get_train_sampler","repo":"JiahuaDong/HFC","repo_kind":"official","path":"samplers.py","file_url":"https://github.com/JiahuaDong/HFC/blob/HEAD/samplers.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":"257ab70d9dfb0e64"}},{"code_sha256_prefix":"56c8f65df5e769cf","entry":"herd_samples","repo":"JiahuaDong/HFC","repo_kind":"official","path":"rehearsal.py","file_url":"https://github.com/JiahuaDong/HFC/blob/HEAD/rehearsal.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":"56c8f65df5e769cf"}},{"code_sha256_prefix":"bf7ca0703632a724","entry":"icarl_selection","repo":"JiahuaDong/HFC","repo_kind":"official","path":"rehearsal.py","file_url":"https://github.com/JiahuaDong/HFC/blob/HEAD/rehearsal.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":"bf7ca0703632a724"}},{"code_sha256_prefix":"93244ce3ac422ad4","entry":"model_eval","repo":"JiahuaDong/HFC","repo_kind":"official","path":"utils.py","file_url":"https://github.com/JiahuaDong/HFC/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":"93244ce3ac422ad4"}},{"code_sha256_prefix":"321424d80e3f6eed","entry":"resize_pos_embed","repo":"JiahuaDong/HFC","repo_kind":"official","path":"vit.py","file_url":"https://github.com/JiahuaDong/HFC/blob/HEAD/vit.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":"321424d80e3f6eed"}},{"code_sha256_prefix":"c4a2a6fc8d847c56","entry":"extract_features","repo":"JiahuaDong/HFC","repo_kind":"official","path":"rehearsal.py","file_url":"https://github.com/JiahuaDong/HFC/blob/HEAD/rehearsal.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":"c4a2a6fc8d847c56"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}