{"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/replay-and-forget-free-graph-class","title":"Replay-and-Forget-Free Graph Class-Incremental Learning: A Task Profiling and Prompting Approach","arxiv_id":"2410.10341","date":"2024-10-14","proceeding":null,"authors":["Chaoxi Niu","Guansong Pang","Ling Chen","Bing Liu"],"abstract":"Class-incremental learning (CIL) aims to continually learn a sequence of tasks, with each task consisting of a set of unique classes. Graph CIL (GCIL) follows the same setting but needs to deal with graph tasks (e.g., node classification in a graph). The key characteristic of CIL lies in the absence of task identifiers (IDs) during inference, which causes a significant challenge in separating classes from different tasks (i.e., inter-task class separation). Being able to accurately predict the task IDs can help address this issue, but it is a challenging problem. In this paper, we show theoretically that accurate task ID prediction on graph data can be achieved by a Laplacian smoothing-based graph task profiling approach, in which each graph task is modeled by a task prototype based on Laplacian smoothing over the graph. It guarantees that the task prototypes of the same graph task are nearly the same with a large smoothing step, while those of different tasks are distinct due to differences in graph structure and node attributes. Further, to avoid the catastrophic forgetting of the knowledge learned in previous graph tasks, we propose a novel graph prompting approach for GCIL which learns a small discriminative graph prompt for each task, essentially resulting in a separate classification model for each task. The prompt learning requires the training of a single graph neural network (GNN) only once on the first task, and no data replay is required thereafter, thereby obtaining a GCIL model being both replay-free and forget-free. Extensive experiments on four GCIL benchmarks show that i) our task prototype-based method can achieve 100% task ID prediction accuracy on all four datasets, ii) our GCIL model significantly outperforms state-of-the-art competing methods by at least 18% in average CIL accuracy, and iii) our model is fully free of forgetting on the four datasets.","url_abs":"https://arxiv.org/abs/2410.10341v2","url_pdf":"https://arxiv.org/pdf/2410.10341v2.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":"replay-and-forget-free-graph-class","repo_url":"https://github.com/mala-lab/tpp","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok","spdx":"MIT"}}],"tasks":[{"task_slug":"class-incremental-learning","task_name":"Class Incremental Learning"},{"task_slug":"graph-neural-network","task_name":"Graph Neural Network"},{"task_slug":"incremental-learning","task_name":"Incremental Learning"},{"task_slug":"node-classification","task_name":"Node Classification"},{"task_slug":"prompt-learning","task_name":"Prompt Learning"},{"task_slug":"class-incremental-learning-1","task_name":"class-incremental learning"}],"methods":[{"method_slug":"graph-neural-network","method_name":"Graph Neural Network"},{"method_slug":"set","method_name":"SET"}],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"atlas_url":"https://app.syntology.ai/?focus=2410.10341","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2410.10341"}},"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/mala-lab/TPP","reach":{"status":"ok","spdx":"MIT"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/mala-lab/tpp","reach":{"status":"ok","spdx":"MIT"}}],"summary":{"ran":1,"unverified":3},"by_repo_kind":{"official":{"samples":4,"ran":1,"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":0,"samples":[{"code_sha256_prefix":"db9df3652df16af3","entry":"mask_init","repo":"mala-lab/TPP","repo_kind":"official","path":"Backbones/gnnconv.py","file_url":"https://github.com/mala-lab/TPP/blob/HEAD/Backbones/gnnconv.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":"db9df3652df16af3"}},{"code_sha256_prefix":"78ee86b31e2503da","entry":"MultiClassCrossEntropy","repo":"mala-lab/TPP","repo_kind":"official","path":"Baselines/lwf_model.py","file_url":"https://github.com/mala-lab/TPP/blob/HEAD/Baselines/lwf_model.py","link_basis":"plan_row","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":"78ee86b31e2503da"}},{"code_sha256_prefix":"ccae8e89877adff4","entry":"addedges","repo":"mala-lab/TPP","repo_kind":"official","path":"Baselines/tpp_model.py","file_url":"https://github.com/mala-lab/TPP/blob/HEAD/Baselines/tpp_model.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":"ccae8e89877adff4"}},{"code_sha256_prefix":"cecf8d5bf86c6f95","entry":"get_model","repo":"mala-lab/TPP","repo_kind":"official","path":"Backbones/model_factory.py","file_url":"https://github.com/mala-lab/TPP/blob/HEAD/Backbones/model_factory.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":"cecf8d5bf86c6f95"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}