{"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/make-continual-learning-stronger-via-c-flat","title":"Make Continual Learning Stronger via C-Flat","arxiv_id":"2404.00986","date":"2024-04-01","proceeding":null,"authors":["Ang Bian","Wei Li","Hangjie Yuan","Chengrong Yu","Mang Wang","Zixiang Zhao","Aojun Lu","Pengliang Ji","Tao Feng"],"abstract":"Model generalization ability upon incrementally acquiring dynamically updating knowledge from sequentially arriving tasks is crucial to tackle the sensitivity-stability dilemma in Continual Learning (CL). Weight loss landscape sharpness minimization seeking for flat minima lying in neighborhoods with uniform low loss or smooth gradient is proven to be a strong training regime improving model generalization compared with loss minimization based optimizer like SGD. Yet only a few works have discussed this training regime for CL, proving that dedicated designed zeroth-order sharpness optimizer can improve CL performance. In this work, we propose a Continual Flatness (C-Flat) method featuring a flatter loss landscape tailored for CL. C-Flat could be easily called with only one line of code and is plug-and-play to any CL methods. A general framework of C-Flat applied to all CL categories and a thorough comparison with loss minima optimizer and flat minima based CL approaches is presented in this paper, showing that our method can boost CL performance in almost all cases. Code is available at https://github.com/WanNaa/C-Flat.","url_abs":"https://arxiv.org/abs/2404.00986v2","url_pdf":"https://arxiv.org/pdf/2404.00986v2.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":"make-continual-learning-stronger-via-c-flat","repo_url":"https://github.com/wannaa/c-flat","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":0,"framework":"pytorch","reach":{"status":"ok"}}],"tasks":[{"task_slug":"continual-learning","task_name":"Continual Learning"}],"methods":[{"method_slug":"sgd","method_name":"SGD"}],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"atlas_url":"https://app.syntology.ai/?focus=2404.00986","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2404.00986"}},"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":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/wannaa/c-flat","reach":{"status":"ok"}}],"summary":{"ran_draft_wrong":6,"ran":1,"unverified":5},"by_repo_kind":{"official":{"samples":12,"ran":7,"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":12,"samples":[{"code_sha256_prefix":"d9def42110729a85","entry":"conv1x1","repo":"wannaa/c-flat","repo_kind":"official","path":"convs/memo_resnet.py","file_url":"https://github.com/wannaa/c-flat/blob/HEAD/convs/memo_resnet.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":"d9def42110729a85"}},{"code_sha256_prefix":"d5cd7ffe2dc51b21","entry":"conv1x1","repo":"wannaa/c-flat","repo_kind":"official","path":"convs/modified_represnet.py","file_url":"https://github.com/wannaa/c-flat/blob/HEAD/convs/modified_represnet.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":"d5cd7ffe2dc51b21"}},{"code_sha256_prefix":"160bb14bd76201b4","entry":"conv3x3","repo":"wannaa/c-flat","repo_kind":"official","path":"convs/memo_resnet.py","file_url":"https://github.com/wannaa/c-flat/blob/HEAD/convs/memo_resnet.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":"160bb14bd76201b4"}},{"code_sha256_prefix":"fac5364e2f53c6db","entry":"conv3x3","repo":"wannaa/c-flat","repo_kind":"official","path":"convs/resnet_cbam.py","file_url":"https://github.com/wannaa/c-flat/blob/HEAD/convs/resnet_cbam.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":"fac5364e2f53c6db"}},{"code_sha256_prefix":"1907f2ae25449f39","entry":"conv3x3","repo":"wannaa/c-flat","repo_kind":"official","path":"convs/modified_represnet.py","file_url":"https://github.com/wannaa/c-flat/blob/HEAD/convs/modified_represnet.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":"1907f2ae25449f39"}},{"code_sha256_prefix":"9d556d61294bb0a8","entry":"conv_block","repo":"wannaa/c-flat","repo_kind":"official","path":"convs/conv_imagenet.py","file_url":"https://github.com/wannaa/c-flat/blob/HEAD/convs/conv_imagenet.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":"9d556d61294bb0a8"}},{"code_sha256_prefix":"5af62c5da8dacdb2","entry":"first_block","repo":"wannaa/c-flat","repo_kind":"official","path":"convs/conv_imagenet.py","file_url":"https://github.com/wannaa/c-flat/blob/HEAD/convs/conv_imagenet.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":"5af62c5da8dacdb2"}},{"code_sha256_prefix":"b8e5c22b79010344","entry":"resnet10","repo":"wannaa/c-flat","repo_kind":"official","path":"convs/resnet.py","file_url":"https://github.com/wannaa/c-flat/blob/HEAD/convs/resnet.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":"b8e5c22b79010344"}},{"code_sha256_prefix":"4742faeabce1f66b","entry":"resnet18","repo":"wannaa/c-flat","repo_kind":"official","path":"convs/ucir_resnet.py","file_url":"https://github.com/wannaa/c-flat/blob/HEAD/convs/ucir_resnet.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":"4742faeabce1f66b"}},{"code_sha256_prefix":"9d7277889d69cf2d","entry":"resnet18_cbam","repo":"wannaa/c-flat","repo_kind":"official","path":"convs/resnet_cbam.py","file_url":"https://github.com/wannaa/c-flat/blob/HEAD/convs/resnet_cbam.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":"9d7277889d69cf2d"}},{"code_sha256_prefix":"ecaa7ca05d715804","entry":"resnet18_rep","repo":"wannaa/c-flat","repo_kind":"official","path":"convs/modified_represnet.py","file_url":"https://github.com/wannaa/c-flat/blob/HEAD/convs/modified_represnet.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":"ecaa7ca05d715804"}},{"code_sha256_prefix":"9eb3d43ee2e8ae7d","entry":"resnet34_cbam","repo":"wannaa/c-flat","repo_kind":"official","path":"convs/resnet_cbam.py","file_url":"https://github.com/wannaa/c-flat/blob/HEAD/convs/resnet_cbam.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":"9eb3d43ee2e8ae7d"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}