Manuscript Offprint

arXiv:2610.20238

MAEM: Mitigating Recency Bias via a Replay-Free, Capacity-Controlled Dynamic Mixture of Experts for Class-Incremental Graph Learning

Junlin Chen, Wenhao Wang, Junchao Xu, Qingsong Yao, Fei Xue, Li Sun, Xiao Wang, Ruijie Wang

Open access. PaperVantage converted this article to text, so layout and figures may differ from the original.

Abstract

Graph Neural Networks (GNNs) excel on graph-structured data but suffer catastrophic forgetting when classes arrive sequentially. In class-incremental graph learning, predictions are often dominated by recently learned classes, causing severe recency bias. Dynamic expansion can isolate knowledge across sessions, but many methods assume task-incremental settings and require task identities at test time to select branches or heads—information unavailable in class-incremental learning. Learnable routers offer an alternative, yet continual fine-tuning the router on new data can bias routing toward recent components. We propose MAEM, a replay-free, capacity-controlled dynamic mixture-of-experts framework for class-incremental graph learning. MAEM builds representations with Simplified Graph Convolution (SGC) and trains a dedicated expert for each new session, then freezes it to protect prior knowledge. For routing without task IDs or a shared trainable router, each expert uses a masked autoencoder (MAE); test nodes are assigned to the expert with the lowest reconstruction error, reducing routing-level recency bias. When the expert pool reaches a fixed capacity, MAEM merges the least-used experts via Git Re-Basin alignment and further distills them into a fused expert using topology-aware pseudo data synthesized from MAE distributions (DeepInversion-style), without storing or revisiting historical graph data. On four class-incremental graph benchmarks, MAEM mitigates recency bias, outperforms strong continual graph learning baselines, and keeps model capacity bounded under strict replay-free learning.

1 Introduction

Graph Neural Networks (GNNs) have achieved strong performance in learning from graph-structured data (Kipf and Welling 2017; Hamilton, Ying, and Leskovec 2017; Veličković et al. 2018). However, real-world graphs often evolve continuously, with new nodes and classes arriving over time (Zhang, Song, and Tao 2022). Class-incremental graph learning requires a model to learn newly emerging classes while retaining its ability to recognize all previously observed ones (van de Ven and Tolias 2019; Zhang, Song, and Tao 2022). In this setting, catastrophic forgetting is primarily manifested as recency bias: because only the newly introduced classes are supervised during the current session, the continually updated model becomes disproportionately biased toward these classes (Hou et al. 2019;

LwF

Figure

Figure 1: Session-wise accuracy matrix of LwF on cora-full. The entry in row i and column j denotes the accuracy on session j after training through session i.

Wu et al. 2019b). Consequently, nodes from earlier sessions are increasingly misclassified as belonging to the most recent classes. Figure 1 illustrates this problem using LwF on cora-full (Bojchevski and Günnemann 2018). Although LwF preserves previous predictions through knowledge distillation, its accuracy on earlier sessions rapidly decreases as new classes are learned (Li and Hoiem 2018). Existing continual learning methods mainly rely on regularization, replay, or architecture expansion (Parisi et al. 2019; De Lange et al. 2022). Regularization-based methods constrain model updates but still repeatedly optimize a shared model on newly arriving classes, which cannot effectively suppress recency bias since such constraints preserve previously learned knowledge only approximately (Kirkpatrick et al. 2017; Aljundi et al. 2018; Liu, Yang, and Wang 2021). Replay-based methods recover historical knowledge by storing previous samples, which introduces additional memory costs and may violate data-retention constraints (Rebuffi et al. 2017; Lopez-Paz and Ranzato 2017; Zhou and Cao 2021). In contrast, architecture-expansion methods allocate separate components to different sessions, naturally reducing interference between old and new knowledge (Rusu et al. 2016; Yoon et al. 2018; Aljundi, Chakravarty, and Tuytelaars 2017). Nevertheless, existing expansion-based methods face two important limitations. First, many of them are designed for task-incremental learning and require the task identity of each test instance to select the corresponding branch or prediction head (van de Ven and Tolias 2019; Rusu et al. 2016). Progressive Neural Networks (PNNs), for example, assign a separate column to each task and normally rely on task identity during inference (Rusu et al. 2016). This information is unavailable in class-incremental learning, where a test node must be classified among all classes observed so far (van de Ven and Tolias 2019). Second, replacing task identities with a learnable router does not fully solve the problem. Because the router is continually fine-tuned on newly arriving data, it can itself develop recency bias and preferentially assign nodes to recently added experts. Moreover, continuously creating new components leads to unbounded model growth (Rusu et al. 2016; Yoon et al. 2018). To address these limitations, we propose MAEM, a replay-free and capacity-controlled dynamic Mixture-of-Experts framework for class-incremental graph learning. MAEM first employs Simplified Graph Convolution (SGC) to obtain graph representations (Wu et al. 2019a). At each incremental session, it creates a dedicated expert for the newly introduced classes and freezes the expert after training. In this way, subsequent learning does not directly overwrite the decision functions acquired in previous sessions. To perform expert selection without task identities, MAEM equips each expert with an independent Masked Autoencoder (MAE) (He et al. 2022; Hou et al. 2022). During inference, all experts reconstruct the representation of each test node, and the node is assigned to the expert with the lowest reconstruction error. The MAE reconstruction error therefore serves as an unbiased routing signal. Unlike a shared learnable router, this mechanism requires neither the session identity of the test node nor continual router fine-tuning, thereby mitigating recency bias at the routing level. MAEM further controls model growth by maintaining a predefined expert capacity. Once this capacity is reached, selected experts are consolidated into a single expert. Git Re-Basin first aligns their hidden neurons and performs an initial weight-space fusion (Ainsworth, Hayase, and Srinivasa 2023). A DeepInversion-based procedure then leverages the distributional knowledge retained in the MAEs to generate topology-aware pseudo data for further distilling the original experts into the fused expert (Yin et al. 2020). This process preserves graph-related knowledge without storing or revisiting historical nodes and keeps the number of experts bounded throughout continual learning. Our main contributions are summarized as follows:

• We propose MAEM, a replay-free dynamic MoE framework that mitigates recency bias through isolated and frozen session-specific experts.

• We introduce an MAE-based routing mechanism that uses reconstruction error as an unbiased routing signal, requiring neither task identities nor a continually fine-tuned shared router.

• We develop a capacity-controlled expert fusion strategy that combines Git Re-Basin with topology-aware pseudo data generated by DeepInversion-based synthesis, enabling knowledge consolidation without historical graph data.

• Experiments on four graph class-incremental benchmarks demonstrate that MAEM outperforms competitive baselines while maintaining bounded model capacity.

References (71)

  • Git Re-Basin: Merging Models modulo Permutation Symmetries
  • Memory Aware Synapses: Learning What (Not) to Forget
  • Expert Gate: Lifelong Learning with a Network of Experts
  • Deep Gaussian Embedding of Graphs: Unsupervised Inductive Learning via Ranking
  • Data-Free Learning of Student Networks
  • A Continual Learning Survey: Defying Forgetting in Classification Tasks
  • Inductive Representation Learning on Large Graphs
  • Masked Autoencoders Are Scalable Vision Learners
  • Distilling the Knowledge in a Neural Network
  • Learning a Unified Classifier Incrementally via Rebalancing
  • GraphMAE: Self-Supervised Masked Graph Autoencoders
  • Open Graph Benchmark: Datasets for Machine Learning on Graphs
  • Semi-Supervised Classification with Graph Convolutional Networks
  • Overcoming Catastrophic Forgetting in Neural Networks
  • Dynamic Mixture-of-Experts for Incremental Graph Learning (opens arXiv in a new tab)
  • What Matters in Graph Class Incremental Learning? An Information Preservation Perspective
  • Learning without Forgetting
  • Overcoming Catastrophic Forgetting in Graph Neural Networks
  • TAAM: Inductive Graph-Class Incremental Learning with Task-Aware Adaptive Modulation
  • CaT: Balanced Continual Graph Learning with Graph Condensation
  • Gradient Episodic Memory for Continual Learning
  • Wiki-CS: A Wikipedia-Based Benchmark for Graph Neural Networks (opens arXiv in a new tab)
  • Zero-Shot Knowledge Distillation in Deep Networks
  • Graph Continual Learning with Debiased Lossless Memory Replay
  • Continual Lifelong Learning with Neural Networks: A Review
  • iCaRL: Incremental Classifier and Representation Learning
  • Progressive Neural Networks
  • Outrageously Large Neural Networks: The Sparsely-Gated Mixture-of-Experts Layer
  • Pitfalls of Graph Neural Network Evaluation (opens arXiv in a new tab)
  • Three Scenarios for Continual Learning (opens arXiv in a new tab)
  • Graph Attention Networks
  • Graph Mixture of Experts: Learning on Large-Scale Graphs with Explicit Diversity Modeling
  • Model Soups: Averaging Weights of Multiple Fine-Tuned Models Improves Accuracy without Increasing Inference Time
  • Simplifying Graph Convolutional Networks
  • Large Scale Incremental Learning
  • Dreaming to Distill: Data-Free Knowledge Transfer via DeepInversion
  • Lifelong Learning with Dynamically Expandable Networks
  • Topology-aware Embedding Memory for Continual Learning on Expanding Networks
  • CGLB: Benchmark Tasks for Continual Graph Learning
  • Overcoming Catastrophic Forgetting in Graph Neural Networks with Experience Replay
  • Therefore, the SGC representation $\mathbf{H}_k$ depends only on the session-specific graph associated with $\mathcal{T}_k$ and is independent of which sessions were presented before $\mathcal{T}_k$
  • Thus, optimizing the expert associated with $\mathcal{T}_{k}$ neither reads nor modifies the parameters of any other expert
  • Therefore, $\mathfrak{E}_\pi$ and $\mathfrak{E}_\rho$ contain the same experts and differ only in their numerical expert indices
  • The selected expert implements the same classifier and local-to-global class mapping under both orders
  • Hence, the linear Taylor terms cancel exactly, and only the second-order remainder terms remain
  • OGBN-ARXIV (Hu et al. 2020), CORA-FULL (Bojchevski and Günnemann 2018), CoAUTHOR-CS (Shchur et al. 2018), and WIKICS (Mernyei and Cangea 2020)
  • Classes are partitioned into contiguous blocks of size $C$ (classes_per_task), yielding sessions $\{\mathcal{T}_1, \ldots, \mathcal{T}_K\}$
  • At session t, message passing is performed on the cumulative subgraph induced by all nodes whose labels belong to $C_{1:t}$ , including edges that connect nodes from different sessions
  • These values form a lower-triangular accuracy matrix
  • The per-task Micro entry $a_{k,j}$ is the fraction of correctly classified test nodes of session $j$ after session $k$
  • Classic regularization and replay methods follow the CGLB class-IL implementations (Zhang, Song, and Tao 2022); CaT, DeLoMe, PDGNNs, GSIP, and TAAM follow their official algorithms with protocol-level adaptations described below
  • Parameters important for previous sessions are discouraged from changing while learning new classes
  • The importance weights are accumulated across sessions
  • After each session, soft targets from the previous model are stored; subsequent training combines the current classification loss with a temperature-scaled distillation loss that encourages the student to match prior predictions on the current graph
  • When a new session arrives, the model is trained jointly on current nodes and buffered nodes
  • Each session condenses only the isolated current-task subgraph under a class-wise budget; later sessions replay the accumulated condensed memory together with the current data (optionally with TIM)
  • For each session it synthesizes a small set of class-conditional features that reproduce gradients of a fresh SGC on the current task, then trains with logit adjustment to mitigate imbalance when replaying condensed memory
  • Samplers include random selection and coverage-based selection over APPNP receptive fields
  • Memory selection follows coverage- or mean-feature-based samplers; classification and structure-preservation losses are jointly optimized on the cumulative graph
  • It freezes a shared SGC backbone and, for each session, trains a Neural Synapse Modulator (a low-rank, node-attentive FiLM generator) together with a session-specific classifier head; after training, both modules are frozen
  • the MAE mask ratio and the number of topology-aware pseudo samples generated per class during expert merging
  • We compare five such operators on OGBN-ARXIV and CORA-FULL, keeping all MAEM components unchanged
  • To assess whether these pseudo embeddings remain faithful to the corresponding real representations, we evaluate each expert on OGBN-ARXIV under a no-fusion setting with K=10 experts (four classes per expert)
  • Nevertheless, the average Ratio reaches 0.890: pseudo embeddings recover about 89% of the real-embedding accuracy (0.815 vs. 0.915)
  • >Backbone</td><td colspan=
  • MMD$^2$ uses a Gaussian kernel with median-heuristic bandwidth and an unbiased estimator
  • Richer parameter-free or lightly parameterized backbones may alleviate this issue, but they also reintroduce the risk of representation drift under continual updates
  • Plain MSE is highly sensitive to magnitude mismatch and can destabilize training
  • MSE can equivalently be expanded in terms of per-dimension statistics:
  • This motivates an explicit Pearson term that strengthens dimension-wise structural agreement beyond cosine similarity
  • Unless otherwise stated, we use $\gamma = 2$, $\alpha = 0.6$, and $\beta = 0.3$