Skip to content

Menu

WorksComputer Science

Efficient Memory Crystallization for Graph Learning under Non-Stationary Distribution Shifts

Download PDFView on arXiv

Ask your agent about this work

Your agent reads this work through Valency, with its citations and similar works. Paste this at the start of a chat.

Use the Valency MCP. Work: W_sq83njhe. Fetch it with get_paper_by_id, then find its nearest works with find_similar_papers and tell me what it adds.

Works with any MCP client. Not connected yet? Connect your agent

Abstract

Deep graph learning models deployed in real-world systems often need to cope with non-stationary environments, where the underlying graph distribution drifts continually over time. Prevailing solutions rely on training auxiliary generative modules to synthesize memory graphs for cross-domain adaptation, which incurs substantial computational overhead and scales poorly under prolonged distribution shifts. We argue that a more economical path exists: rather than generating memory, one can crystallize it. To this end, we propose Efficient Memory Crystallization (EMC), a training-free test-time framework that distills each incoming graph domain into a compact, semantically faithful memory through a closed-form solution to a memory-oriented distribution-matching objective, thereby eliminating redundant domain information under continual covariate shifts. To preserve both generalizability and adaptability as the model traverses a long sequence of target domains, EMC further models inter-domain dependencies through state-evolving memories and admits a theoretically grounded, tighter generalization error bound than direct adaptation. Extensive experiments demonstrate the superior performance of EMC over state-of-the-art baselines on graphs under non-stationary distribution shifts, while reducing average runtime by 87.4% and GPU memory consumption by 92.4% relative to the recent competitor, making continual graph adaptation practical at scale.

Introduction

Graph-structured data is ubiquitous in real-world applications such as social network analysis, recommender systems, and epidemiological modeling. To effectively learn from such data, Graph Neural Networks (GNNs) [19, 46] have emerged as powerful models that integrate node features and structural information through neighborhood aggregation. While GNNs have demonstrated impressive performance under the assumption that training and testing data follow the same distribution, this assumption is often violated in practice due to distribution shift, that is, a mismatch between the training (source) and testing (target) distributions which poses a major challenge to the generalization ability of deep models. To bridge this gap, Graph Domain Adaptation (GDA) methods aim to transfer knowledge from the source domain to the target domain by mitigating the distributional discrepancy.

In real-world scenarios, the source data is often inaccessible during test time due to privacy or business constraints, making the adaptation problem more challenging. Moreover, the GNN model frequently operates in non-stationary environments, where the target graph distribution drifts continually over time. Transferring knowledge from the source domain to entirely unseen target domains can introduce inductive bias, which exacerbates catastrophic forgetting and degrades the model’s generalization ability to future domains, especially when distribution shifts arrive in a continual stream rather than a single jump, as illustrated in Figure 1. This necessitates addressing the problem of graph learning under non-stationary distribution shifts at test time.

Figure 1. A general paradigm of test-time adaptation under non-stationary distribution shifts. Compared with the first row, which directly adapts the model on the test data without modeling inter-domain relations or intra-domain redundancy, the second row illustrates our EMC, which crystallizes each domain into a compact memory and explicitly considers these factors to maintain both generalizability and adaptability, thereby ensuring efficiency and effectiveness.

Recently, there has been a growing research trend focusing on single-step domain adaptation, typically employing techniques such as Maximum Mean Discrepancy [8] and adversarial learning [5, 32, 47]. However, these approaches inevitably fall short when the model is exposed to distribution shifts that arrive continually across time or domains. As graph data evolves, models encounter new domains that require ongoing adaptation, while simultaneously losing the ability to perform well on previously seen graphs, which leads to catastrophic forgetting. To mitigate catastrophic forgetting, Continual Learning [37, 38, 48, 49, 50] has emerged as a promising direction. These methods typically adopt replay mechanisms, where the model periodically revisits selected or generated historical data to reinforce prior knowledge. Such strategies help balance training cost with long-term knowledge retention.

However, most existing approaches rely on labeled data to guide memory selection and replay, making them ill-suited for the test-time setting where labels are unavailable. Although GCAL [31] attempts to improve cross-domain adaptation by training an auxiliary generative module to synthesize memory graphs, its dependence on a separately trained generator introduces substantial computational overhead and limits its practicality under prolonged drift. Furthermore, as shown in Figure 1, current methods under test-time settings with continual drift often ignore the inter-domain relationships and the redundancy within each domain that is irrelevant to the underlying semantic information. We summarize that a desirable framework for adapting graph models under non-stationary distribution shifts at test time should pursue three core objectives: ensuring the model’s generalizability, maintaining its adaptability to novel domains, and mitigating forgetting throughout the continual adaptation process, all in a memory- and computation-efficient manner.

In this paper, we argue that a more economical path exists: rather than generating memory through a separately trained module, one can crystallize it directly from each incoming graph in closed form. We instantiate this idea as EMC (Efficient Memory Crystallization), a test-time framework for graph learning under non-stationary distribution shifts. Specifically, we introduce a memory- and computation-efficient procedure that crystallizes each incoming graph domain into a compact, semantically faithful memory through a closed-form solution to a memory-oriented distribution-matching objective, eliminating redundant domain information under continual covariate shifts. To preserve both generalizability and adaptability as the model traverses a long sequence of target domains, we further model inter-domain dependencies through state-evolving memories. We theoretically establish that the generalization error bounds with crystallized memories (from source to target domain) and with state-evolving memories (during continual adaptation on target domains) are both tighter than directly adapting the model on the target domain without such mechanisms, ensuring effectiveness. Extensive experiments on real-world datasets demonstrate the superiority of EMC over state-of-the-art (SOTA) baselines. A comparison of runtime and GPU memory cost between EMC and the recent baseline GCAL [31] across four benchmarks under continual drift is shown in Figure 2. Notably, EMC achieves substantial efficiency gains, requiring on average 87.4% less runtime and 92.4% less GPU memory across all datasets. The contributions of this work are as follows:

Figure 2. Runtime and GPU memory cost comparison between baseline GCAL and EMC.

  • We propose an efficient and effective framework, EMC, for graph learning under non-stationary distribution shifts at test time. To the best of our knowledge, this is the first approach to integrate

closed-form memory crystallization with state-evolving adaptation without requiring any additional model training at test time.

  • We introduce a memory-oriented distribution-matching objective with a closed-form solution for memory construction. We further model inter-domain dependencies through state-evolving memories and derive tighter generalization error bounds.

  • Extensive experiments validate the effectiveness and efficiency of EMC, showing superior performance compared to existing SOTA methods, while reducing average runtime by 87.4% and GPU memory consumption by 92.4% relative to the recent competitor.

Preliminaries

Problem Setup. We consider the task of test-time adaptation on graphs under non-stationary distribution shifts. Given a GNN model f(G(s);Θ0)→Yf(G^{(s)}; \boldsymbol{\Theta}_0) \rightarrow\mathcal{Y} that is pre-trained on one or multiple source graphs G(s)G^{(s)} drawn from the source distribution PS(G,Y)\mathbb{P}_{S}(G,Y), where Θ0\boldsymbol{\Theta}_0 denotes the parameters of the pre-trained GNN encoder and {Y}∈Y\{Y\} \in\mathcal{Y} is the label set. The target data is represented as a sequence of graphs T={Gt}t=1T\mathcal{T} = \{G^t\}_{t=1}^{T} containing TT test samples drawn from the marginalized target distribution. Each graph G(t)={A(t),X(t)}∈PT(G)G^{(t)} = \{A^{(t)}, X^{(t)}\} \in\mathbb{P}_{T}(G) corresponds to the tt-th target domain, where A(t)∈RNt×NtA^{(t)} \in\mathbb{R}^{N_t \times N_t} is the adjacency matrix with NtN_t nodes, and X(t)∈RNt×dX^{(t)} \in\mathbb{R}^{N_t \times d} is the node feature with dd-dimensional attributes. We use GtG^t to specifically denote the graph from the tt-th target domain in the arrival order, and G(t)G^{(t)} as a generic notation when the index (t)(t) may refer to any past or current domain in {1,…,T}\{1,\ldots,T\}. With the covariate shift assumption, i.e., PS(G)≠PT(G)\mathbb{P}_{S}(G) \ne\mathbb{P}_{T}(G) and PS(Y∣G)=PT(Y∣G)\mathbb{P}_{S}(Y|G) = \mathbb{P}_{T}(Y|G), we aim to continually adapt the model parameters from Θt−1\boldsymbol{\Theta}_{t-1} to Θt\boldsymbol{\Theta}_t to maintain the generalizability and adaptability2 on target samples from PT(G)\mathbb{P}_{T}(G), while mitigating the risk of catastrophic forgetting on previously encountered domains. We summarize the frequently used notations in Appendix A.

Methodology

In this section, we elaborate on the proposed efficient test-time framework EMC with its overall pipeline shown in Figure 3. To efficiently extract low-dimensional representations with reduced redundancy within each domain, we first reformulate a memory-oriented distribution-matching objective and derive a closed-form solution that crystallizes each incoming domain into a compact, semantically faithful memory. To enable continual adaptation by capturing inter-domain relationships, we then propose state-evolving memories, which yield a tighter generalization error bound.

Figure 3. The framework of EMC. (1) Multi-hop feature propagation on the input graph GtG^t. (2) A closed-form solution to the memory-oriented distribution-matching objective crystallizes the domain-specific memory G~t\widetilde{G}^t. (3) The state evolving field models the correlation across consecutive domains. (4) Tighter generalization error upper bounds guarantee effectiveness. (5) The adaptation loss updates the parameters Θt−1→Θt\boldsymbol{\Theta}_{t-1} \rightarrow\boldsymbol{\Theta}_t.

Efficient Memory Crystallization

The original input graphs exhibit covariate shifts across domains and redundancies within each sample, which are unrelated to the underlying semantic information. To retain only the representative characteristics of each domain, we crystallize a domain-specific memory as a low-rank surrogate graph that approximates the original graph in the embedding space.

Structure-aware Feature Propagation. Given an input graph G(t)={A,X}G^{(t)} = \{A, X\}, the non-parametric feature propagation module is deployed to smooth the node features at the KK-th order as H=A^KXH = \hat{A}^{K}X, where A^=D~−12A~D~−12\hat{A} = \tilde{D}^{-\frac{1}{2}}\tilde{A}\tilde{D}^{-\frac{1}{2}} is the normalized adjacency matrix with self-loops, and D~\tilde{D} is the degree matrix for A~=A+I\tilde{A} = A + I. This propagation scheme can be replaced with other alternatives, such as SGC [39] and personalized PageRank (PPR) [29]. Higher-order propagation produces increasingly smooth features that capture more global structural information.

To preserve semantic structure, we apply class-wise node partitioning, which divides the ∣Ci∣|C_i| nodes assigned to class ii into ∣Ci′∣|C'_i| non-overlapping sub-classes {S1i,…,S∣Ci′∣i}\{S^i_1, \ldots, S^i_{|C'_i|}\}. At test time, the class assignment is guided by the model’s predicted semantics, which serve as semantic anchors for grouping nodes with similar semantic content rather than as supervisory targets. Each node kk further carries a confidence score rkr_k that down-weights uncertain contributions during aggregation; a detailed discussion of this design is deferred to Appendix § 9.3. The node mapping function of this partition is defined as πi:{1,…,∣Ci∣}→{1,…,∣Ci′∣}\pi^i : \{1, \ldots, |C_i|\} \to\{1, \ldots, |C'_i|\}, and the class-wise aggregation matrix Ri∈R∣Ci′∣×∣Ci∣R^i \in\mathbb{R}^{|C'_i| \times|C_i|} is formulated as

Rj,ki={rk/τif πi(k)=j,0otherwise,(1)R^i_{j,k} = \begin{cases} r_k/\tau& \text{if } \pi^i(k) = j,\\ 0 & \text{otherwise,} \end{cases} \tag*{(1)}

where τ\tau is a temperature parameter. Aggregated embeddings for class ii are obtained as Hi′=R^iHiH'_i = \hat{R}^i H_i, where R^i\hat{R}^i is the row-normalized version of RiR^i and HiH_i collects the propagated features of nodes in class ii. The full aggregation matrix is constructed by stacking all class-wise aggregation matrices block-diagonally as P^=diag⁡(R^1,…,R^C)\hat{P} = \operatorname{diag}(\hat{R}^1, \ldots, \hat{R}^C), where CC is the total number of classes.

Memory-oriented Distribution Matching. We denote the memory crystallized from G(t)G^{(t)} as G~(t)={A′,X′}\tilde{G}^{(t)} = \{A', X'\}. To ensure that the memory faithfully represents the original graph, we reformulate a memory-oriented distribution-matching objective between the representations of the original graph and its memory.

Proposition 3.1. After multi-hop propagation, let Z=HΨ=A^KXΨZ = H\Psi= \hat{A}^{K}X\Psi and Z′=H′Ψ=A^′KX′ΨZ' = H'\Psi= \hat{A}'^{K}X'\Psi denote the representations of the original graph G(t)G^{(t)} and its memory G~(t)\tilde{G}^{(t)} respectively, where Ψ\Psi is the learnable linear weight of the GNN encoder and Φ\Phi is the distribution over its parameter configurations. To directly align the distribution of the input domain with that of its memory, the discrepancy between the propagated features should be minimized as:

min⁡G~(t)EΨ∼Φ∥P^′H′Ψ−PHΨ∥2.(2)\min_{\tilde{G}^{(t)}} \mathop{\mathbb{E}}_{\Psi\sim\Phi} \left\lVert\hat{P}'H'\Psi- P H\Psi\right\rVert^2 . \tag*{(2)}

Assuming that nodes in G~(t)\tilde{G}^{(t)} are organized in ascending order, P′P' degenerates into the identity matrix II. Then, the distribution matching objective can be upper-bounded by:

EΨ∼Φ∥H′Ψ−P^HΨ∥2≤EΨ∼Φ∥H′−P^H∥2∥Ψ∥2.(3)\mathop{\mathbb{E}}_{\Psi\sim\Phi} \left\lVert H'\Psi- \hat{P}H\Psi\right\rVert^2 \leq\mathop{\mathbb{E}}_{\Psi\sim\Phi} \left\lVert H' - \hat{P}H \right\rVert^2 \lVert\Psi\rVert^2 . \tag*{(3)}

Proof for Proposition 3.1 is provided in Appendix § 10.1. The expectation EΨ∼Φ\mathbb{E}_{\Psi\sim\Phi} is a technical device that yields a bound holding uniformly over the encoder parameter space; it is not a random projection.

Remark. The reformulated objective aligns the essential semantic information between the input graph and its crystallized memory. Since Ψ\Psi is independent of both G~(t)\tilde{G}^{(t)} and P^\hat{P}, we can minimize the upper bound by:

arg⁡min⁡G~(t),P^∥H′−P^H∥2.(4)\underset{\tilde{G}^{(t)},\hat{P}}{\arg\min} \left\lVert H' - \hat{P}H \right\rVert^2 . \tag*{(4)}

Redundancy-eliminated Memory Construction. According to Proposition 3.1, we expect a symmetric encoding procedure between the original G(t)G^{(t)} and its crystallized memory G~(t)\tilde{G}^{(t)}. Therefore, our objective is to construct A′A' and X′X' satisfying A^′K^X′=H′\hat{A}'\hat{K}X' = H'. To this end, we utilize the pre-defined graph structure and obtain X′X' in closed form. Specifically, we construct the structure via a similarity-based thresholding scheme:

Ai,j′={1if cos⁡(Hi′,Hj′)>τ,0otherwise,(5)A'_{i,j} = \begin{cases} 1 & \text{if } \cos(H'_i,H'_j) > \tau,\\ 0 & \text{otherwise,} \end{cases} \tag*{(5)}

where cos⁡(⋅,⋅)\cos(\cdot,\cdot) measures the cosine similarity and τ\tau is the hyper-parameter for graph sparsification. To ensure that the reconstructed features change smoothly between connected nodes, we introduce the Dirichlet energy constraint [18] into the feature reconstruction loss to quantify the smoothness of graph signals. The optimization objective for X′X' is then formulated as:

arg min⁡X′ ∥A^′KX′−H′∥2+αtr⁡(X′TL′X′)(6)\underset{X'}{\operatorname{arg\,min}}\ \left\lVert\hat{A}'^{K}X' - H' \right\rVert^{2} + \alpha\operatorname{tr}(X'^{\mathsf{T}}L'X') \tag*{(6)}

where L′=D′−A′L' = D' - A' is the Laplacian matrix, D′D' is the degree matrix, and α\alpha controls the smoothness strength.

Proposition 3.2. Assume that G~(t)={A′,X′}\widetilde{G}^{(t)} = \{A', X'\} is the crystallized memory of an input graph; the closed-form solution of Eq. (6) takes the form X′=(QTQ+αL′)−1QTH′X' = (Q^{\mathsf{T}}Q + \alpha L')^{-1}Q^{\mathsf{T}}H', where Q=A^′KQ = \hat{A}'^{K}.

Proof Sketch. Taking the first- and second-order partial derivatives of the objective in Eq. (6) with respect to X′X' shows that the objective is positive definite. Therefore, the closed-form solution that satisfies the first-order condition achieves the minimum. A detailed proof is provided in Appendix C.2.

The closed-form solution operates on a small Nt′×Nt′N'_t \times N'_t system over the crystallized memory rather than the full Nt×NtN_t \times N_t system on the original graph (with Nt′N'_t set to 1%1\% of NtN_t in our experiments), making memory construction lightweight and naturally scalable. Further empirical scaling analysis is provided in Appendix B.2.

Memory-Driven Adaptation with Tighter Bound

To capture state transitions and evolutionary patterns across domains, we introduce the State Evolving Field mechanism over crystallized memories with derivation of a tighter generalization error bound.

Proposition 3.3. Given any pair of sequences of samples from the target domain, T={Gt}t=1T\mathcal{T} = \{G^{t}\}_{t=1}^{T} and the corresponding crystallized memories T~={G~t}t=1T\widetilde{\mathcal{T}} = \{\widetilde{G}^{t}\}_{t=1}^{T}, following the joint distributions PG1:T\mathbb{P}_{G_{1:T}} and QG~1:T\mathbb{Q}_{\widetilde{G}_{1:T}} respectively, with each GtG^{t} and G~t\widetilde{G}^{t} following the marginal distributions PGt\mathbb{P}_{G^{t}} and QG~t\mathbb{Q}_{\widetilde{G}^{t}}. Then the following relation holds:

DKL(PG1:T∥QG~1:T)≡∑t=1TDKL(PGt∥QG~t)iffPG1:T=∏t=1TPGt, QG~1:T=∏t=1TQG~t(7)D_{\mathrm{KL}}(\mathbb{P}_{G_{1:T}} \mathbin{\|} \mathbb{Q}_{\widetilde{G}_{1:T}}) \equiv\sum_{t=1}^{T} D_{\mathrm{KL}}(\mathbb{P}_{G^{t}} \mathbin{\|} \mathbb{Q}_{\widetilde{G}^{t}})\quad\text{iff}\quad\mathbb{P}_{G_{1:T}} = \prod_{t=1}^{T}\mathbb{P}_{G^{t}},\ \mathbb{Q}_{\widetilde{G}_{1:T}} = \prod_{t=1}^{T}\mathbb{Q}_{\widetilde{G}^{t}} \tag*{(7)}

where DKLD_{\mathrm{KL}} denotes the Kullback–Leibler divergence and ≡\equiv indicates that the two expressions are identically equal.

Remark. Proposition 3.3 (proof in Appendix C.3) is a biconditional: it does not assume that domains are independent. Rather, it characterizes precisely when summing per-domain KL divergences equals the joint KL divergence, namely when and only when the domains (and their memories) are independent. Since real test-time domains are generally correlated under continual drift, this implies that aligning marginal distributions alone is insufficient. This motivates us to model inter-domain relationships explicitly through the state evolving field below.

State Evolving Field over Crystallized Memories. To model the temporal correlation across domains, we define a state evolving field over crystallized memories. At each time step tt, the memory representation Z′(t)Z'^{(t)} evolves from its predecessor Z′(t−1)Z'^{(t-1)} through a convex combination:

Z′(t)←wt−1Z′(t−1)+wtZ′(t), where wt−1+wt=1.(8)Z'^{(t)} \leftarrow w_{t-1}Z'^{(t-1)} + w_t Z'^{(t)},\ \text{where } w_{t-1} + w_t = 1. \tag*{(8)}

Here wt−1w_{t-1} and wtw_t are fixed non-negative hyperparameters satisfying the convex-combination constraint and selected by grid search; an adaptive weighting strategy is a natural extension since Theorem 3.6 below holds for any valid choice. During adaptation, f(Gt;Θt−1)=h∘gf(G^{t}; \Theta_{t-1}) = h \circ g is the composition of an encoder h(⋅)h(\cdot) and a fixed classifier g(⋅)g(\cdot), i.e., Z′(t)=h(G~t)Z'^{(t)} = h(\widetilde{G}^{t}) and Y^t=g(Z′(t))\widehat{Y}^{t} = g(Z'^{(t)}). At each step tt, the mixed memory Z′(t)=wt−1Z′(t−1)+wtZ′(t)Z'^{(t)} = w_{t-1}Z'^{(t-1)} + w_tZ'^{(t)} induces a corresponding hypothesis h^=wt−1ht−1+wtht\hat{h} = w_{t-1}h^{t-1} + w_th^t in the decision space.

Lemma 3.4 (Error Upper Bound for Domain Shift). Let P~S\widetilde{\mathbb{P}}_{S} and P~T\widetilde{\mathbb{P}}_{T} denote the induced distributions over the feature space for PS\mathbb{P}_{S} and PT\mathbb{P}_{T} respectively. The following inequality holds for the risk ϵT0(h^)\epsilon_{T}^{0}(\hat{h}) with single-step adaptation on the target domain PT\mathbb{P}_{T}:

ϵT0(h^)≤min⁡{ϵS(hS,hT),ϵT(hS,hT)}+ϵS(h^)+dH(P~S,P~T)(9)\epsilon_{T}^{0}(\hat{h}) \leq\min\{\epsilon^{S}(h^{S},h^{T}),\epsilon^{T}(h^{S},h^{T})\} + \epsilon^{S}(\hat{h}) + d_{\mathcal{H}}(\widetilde{\mathbb{P}}_{S},\widetilde{\mathbb{P}}_{T}) \tag*{(9)}

where dHd_{\mathcal{H}} is the H\mathcal{H}-divergence.

Theorem 3.5 (Error Upper Bound with Crystallized Memories). Let P~S\widetilde{P}_{S} and P~T\widetilde{P}_{T} denote the induced distributions over the feature space for PSP_{S} and PTP_{T} respectively. The risk ϵT(h^)\epsilon_{T}(\hat{h}) with crystallized memories (with mixed weight w0+w1=1w_{0}+w_{1}=1, w0≥0w_{0}\geq0, w1≥0w_{1}\geq0, and h^=w0h^S+w1h^T\hat{h}=w_{0}\hat{h}^{S}+w_{1}\hat{h}^{T}) is upper bounded by:

ϵT(h^)≤ϵT(h^,hS)+ϵT(hS,hT).(10)\epsilon^{T}(\hat{h})\leq\epsilon^{T}(\hat{h},h^{S})+\epsilon^{T}(h^{S},h^{T}). \tag*{(10)}

Theorem 3.6 (Continual Error Upper Bound with State-Evolving Memories). Let P~Gt−1\widetilde{P}_{G^{t-1}} and P~Gt\widetilde{P}_{G^{t}} denote the induced feature distributions of two consecutive target domains at steps t−1t-1 and tt. The risk ϵt(h^)\epsilon^{t}(\hat{h}) with state-evolving memories (with mixed weight wt−1+wt=1w_{t-1}+w_{t}=1, wt−1,wt≥0w_{t-1},w_{t}\geq0, and h^=wt−1h^t−1+wth^t\hat{h}=w_{t-1}\hat{h}^{t-1}+w_{t}\hat{h}^{t}) is upper bounded by:

ϵt(h^)≤ϵt(h^,ht−1)+ϵt(ht−1,ht).(11)\epsilon^{t}(\hat{h})\leq\epsilon^{t}( \hat{h},h^{t-1})+\epsilon^{t}(h^{t-1},h^{t}). \tag*{(11)}

Remark. The bounds on ϵ0T(h^)\epsilon^{T}_{0}(\hat{h}) characterize per-step generalization at each adaptation step tt, while the continual aspect across {Gt}t=1T\{G^{t}\}_{t=1}^{T} is handled by the state-evolving design (Theorem 3.6) with past memories. At each step, the improvement of Theorem 3.5 over Lemma 3.4 comes from eliminating the explicit source–target H\mathcal{H}-divergence penalty dH(P~S,P~T)d_{\mathcal{H}}(\widetilde{P}_{S},\widetilde{P}_{T}) that appears in Lemma 3.4, which yields a bound that dominates ϵ0T(h^)\epsilon^{T}_{0}(\hat{h}) by a non-negative margin of dH(P~S,P~T)≥0d_{\mathcal{H}}(\widetilde{P}_{S},\widetilde{P}_{T})\geq0 regardless of the relative ordering of ϵS(hS,hT)\epsilon^{S}(h^{S},h^{T}) and ϵT(hS,hT)\epsilon^{T}(h^{S},h^{T}). We therefore arrive at the following conclusions:

  • From Theorem 3.5, the bound on ϵT(h^)\epsilon^{T}(\hat{h}) obtained with crystallized memories admits a tighter form than the direct source-to-target bound ϵ0T(h^)\epsilon^{T}_{0}(\hat{h}).

-

  • By Theorem 3.6, when EMC traverses consecutive domains via state-evolving memories, the per-step bound likewise admits a tighter form than ϵ0T(h^)\epsilon^{T}_{0}(\hat{h}) at each step.

Detailed proofs and comparisons are in Appendix § 10.3.

Derivation of the Adaptation Loss. Given a test graph from the tt-th target domain and the sequence of memories from the previous t−1t-1 domains, T~={G~1,G~2,…,G~t−1}\widetilde{T}=\{\widetilde{G}^{1},\widetilde{G}^{2},\ldots,\widetilde{G}^{t-1}\}, the GNN model with parameters Θt−1\boldsymbol{\Theta}_{t-1} is continually refined to adapt to the new graph while preserving performance on previously seen graphs. The overall optimization objective of EMC is:

L≔H(Gt)+β⋅LAdp(G~1:t−1;Θt−1), and LAdp(G~1:t−1;Θt−1)=∑(t)=1t−1DKL(G~^(t)∥G~(t)),(12)\mathcal{L}\coloneqq H(G^{t})+\beta\cdot\mathcal{L}_{\mathrm{Adp}}(\widetilde{G}^{1:t-1};\boldsymbol{\Theta}_{t-1}),\ \text{and}\ \mathcal{L}_{\mathrm{Adp}}(\widetilde{G}^{1:t-1};\boldsymbol{\Theta}_{t-1})=\sum_{(t)=1}^{t-1}D_{\mathrm{KL}}(\widehat{\widetilde{G}}^{(t)}\|\widetilde{G}^{(t)}), \tag*{(12)}

where H(⋅)H(\cdot) denotes the Shannon entropy that measures the uncertainty within the tt-th domain, β\beta is a hyperparameter, and DKL(⋅∥⋅)D_{\mathrm{KL}}(\cdot\|\cdot) is the KL divergence between two distributions. Here G~(t)\widetilde{G}^{(t)} denotes the stored memory of the (t)(t)-th domain (frozen anchor), and G~^(t)\widehat{\widetilde{G}}^{(t)} denotes the predictive distribution induced by the current model with parameters Θt−1\boldsymbol{\Theta}_{t-1} evaluated on the same memory G~(t)\widetilde{G}^{(t)}. At each step the system first crystallizes G~t\widetilde{G}^{t} and forms the mixed representation, and only then minimizes Eq. (12) to update Θt−1→Θt\boldsymbol{\Theta}_{t-1}\rightarrow\boldsymbol{\Theta}_{t}. The full pipeline and complexity analysis are provided in Appendix § 9.

Proposition 3.7 (Stability Bound of the Adaptation Loss). Consider the adaptation step from Θt−1\boldsymbol{\Theta}_{t-1} to Θt\boldsymbol{\Theta}_{t}. For each previously encountered domain indexed by (t)∈{1,…,t−1}(t)\in\{1,\ldots,t-1\}, DKL(G~^(t)∥G~(t))D_{\mathrm{KL}}(\widehat{\widetilde{G}}^{(t)}\|\widetilde{G}^{(t)}) can be interpreted as the divergence between the predictive distributions induced by the model before and after adaptation on the same crystallized memory G~(t)\widetilde{G}^{(t)}. Moreover, assume that: (i) the predictive distribution is given by a softmax with temperature τ>0\tau>0; (ii) all predicted class probabilities are lower-bounded by γ>0\gamma>0; and (iii) the encoder h(⋅)h(\cdot) and the classifier g(⋅)g(\cdot) are Lipschitz continuous in the model parameters. Then the following upper bound holds:

DKL(G~^(t)∥G~(t))≤Lg2Lh24γτ2∥Θt−Θt−1∥22.(13)D_{\mathrm{KL}}(\widehat{\widetilde{G}}^{(t)}\|\widetilde{G}^{(t)})\leq\frac{L_{g}^{2}L_{h}^{2}}{4\gamma\tau^{2}}\lVert\boldsymbol{\Theta}_{t}-\boldsymbol{\Theta}_{t-1}\rVert_{2}^{2}. \tag*{(13)}

where LhL_{h} and LgL_{g} are the corresponding Lipschitz constants of h(⋅)h(\cdot) and g(⋅)g(\cdot).

Remark. The bound asserts that small parameter updates yield small predictive shifts on stored memories, providing a theoretical justification for the KL regularization in Eq. (12) as a means to mitigate forgetting. Assumption (iii) is mild and is satisfied by standard GNN backbones under common weight regularization. Detailed discussion together with proof is provided in Appendix § 10.5.

Experiments

In this section, we empirically evaluate the effectiveness and efficiency of the proposed EMC.3 We organize the experiments around the following research questions:

  • RQ1: How well does EMC achieve generalizability, adaptability, and forgetting mitigation efficiently with low memory and computational cost under continual drift?

  • RQ2: How does EMC scale with respect to graph size and the number of domains?

  • RQ3: What are the impacts of different components on the effectiveness and efficiency of EMC?

  • RQ4: How sensitive is EMC to its hyperparameters?

Experimental Setup

Datasets. We evaluate EMC on 4 node classification datasets, following the benchmark in GCAL [31], categorized into two types:

  • For regional shifts, the Facebook-100 [35] and Twitch-Explicit [33] datasets consist of multiple social network graphs collected from different regions.

  • For temporal shifts, OGB-Arxiv [16] is a citation network of academic papers, and Elliptic [30] is a Bitcoin transaction network, with both containing graphs spanning different time steps.

In all cases, each graph is treated as a separate domain. We pre-train a GNN model on selected source domains and then perform continual adaptation on the remaining domains. Dataset statistics and further details are in Appendix § 11.1.

Baselines. We compare EMC against 10 representative baseline methods. “Base Model” refers to the pre-trained model directly applied to target datasets without any adaptation, serving as a lower bound. The baselines are grouped into two categories: (1) One-step Test-Time Adaptation Methods [9, 36, 20, 44, 17, 53], and (2) Continual Test-Time Adaptation Methods [38, 28, 31].

Evaluation and Implementation. We report the performance matrix M∈RT×TM \in\mathbb{R}^{T \times T}, a lower triangular matrix where Mi,jM_{i,j} (for i≥ji \ge j) denotes the performance on domain jj after training on domain ii. Following [17, 44], we use ROC-AUC for the Twitch-Explicit dataset, Accuracy for Facebook-100 and OGB-Arxiv, and F1 Score for Elliptic. To summarize performance across all domains, we compute the Average Performance (AP) as AP=1T∑i=1TMT,i\mathrm{AP} = \frac{1}{T}\sum_{i=1}^{T} M_{T,i}, which reflects overall adaptation ability, and the Average Forgetting (AF) as AF=1T−1∑i=1T−1(MT,i−Mi,i)\mathrm{AF} = \frac{1}{T-1}\sum_{i=1}^{T-1}(M_{T,i}-M_{i,i}), which quantifies forgetting during sequential training. To further assess generalizability and adaptability, we follow [21] to introduce 2 complementary metrics: Target Domain Generalization (TDG) measures the model’s performance on each domain before adaptation as TDG =1T−1∑i=2TMi−1,i= \frac{1}{T-1}\sum_{i=2}^{T}M_{i-1,i}. Target Domain Adaptation (TDA) measures performance after adaptation as TDA =1T∑i=1TMi,i= \frac{1}{T}\sum_{i=1}^{T}M_{i,i}. All reported results are averaged over 5 runs with standard deviations. We perform a grid search to select the key hyperparameters of EMC. More detailed experimental settings are provided in Appendix D.3.

Overall Performance Comparison (RQ1)

Generalizability and Adaptability Analysis. To answer RQ1, we evaluate the generalizability and adaptability of EMC using the comprehensive metrics in Table 1. We compare EMC with two recent baselines representing different categories of domain adaptation methods. In addition to AP and AF, EMC consistently maintains strong generalizability and adaptability under continual drift. LEBED, not specifically designed for continual settings, shows weaker generalization. Although GCAL is tailored for continual adaptation, it incurs substantial computational overhead. Notably, on the Elliptic dataset with GCN as the backbone, EMC reduces runtime by 96.78% and GPU memory by 96.58%. On OGB-Arxiv with SAGE, it reduces runtime by 98.19% and GPU memory by 98.25%. The results confirm EMC’s superior effectiveness and efficiency for graph learning under non-stationary distribution shifts at test time, ensuring generalizability and adaptability while significantly reducing computational overhead.

DatasetMethodsBackbone: GCNBackbone: SAGE
AP (↑)AF (↑)TDG (↑)TDA (↑)Time (↓)GPU (↓)AP (↑)AF (↑)TDG (↑)TDA (↑)Time (↓)GPU (↓)
TwitchLEBED51.06±0.050.24±0.0551.87±0.0648.90±0.04114.971440.5756.37±0.030.58±0.0457.55±0.0255.08±0.04252.803652.58
TwitchGCAL55.65±0.090.42±0.1354.78±0.6053.20±0.62217.5111159.858.20±0.350.79±0.1359.65±0.3957.02±0.49295.118580.63
TwitchEMC55.95±0.150.47±0.0855.56±0.1355.83±0.1474.64854.9761.62±0.120.86±0.0462.02±0.1360.36±0.16138.022833.18
FacebookLEBED46.90±0.00-0.25±0.0047.72±0.0046.38±0.0093.593481.5346.92±0.00-2.20±0.0148.78±0.0048.39±0.0194.813718.50
FacebookGCAL52.72±0.360.72±0.1949.37±0.2848.96±0.291675.217107.8451.87±0.120.04±0.1152.34±0.1751.55±0.081356.0713633.79
FacebookEMC53.10±0.002.15±0.2753.49±0.2752.30±0.0418.843006.0853.41±0.070.63±0.2053.11±0.1052.87±0.2518.613137.31
EllipticLEBED49.44±0.19-4.86±0.2052.10±0.0653.82±0.02114.01745.3662.12±0.11-6.65±0.1569.30±0.0967.99±0.08142.571004.31
EllipticGCAL56.57±0.140.88±0.1353.08±2.5450.31±2.98707.245533.9971.35±8.57-3.40±1.1063.45±8.8261.38±9.82453.87972.59
EllipticEMC56.76±0.460.96±0.3058.73±0.4055.92±0.3122.76189.3672.28±1.921.53±1.2974.55±2.5070.22±1.4621.67208.91
ArxivLEBED19.09±0.04-0.04±0.0514.18±0.0217.44±0.02227.80839.3941.81±0.01-1.85±0.0147.00±0.0142.12±0.02229.831082.70
ArxivGCAL14.15±6.94-1.80±2.0617.90±8.5813.77±5.571362.7622342.4745.22±0.170.76±0.0542.40±7.7441.80±6.591371.7822365.84
ArxivEMC19.32±1.573.38±1.9919.39±1.4720.39±1.7124.95299.1846.07±1.700.99±0.6647.11±1.8043.52±1.2524.84391.02
DatasetMethodsBackbone: GATBackbone: GIN
AP (↑)AF (↑)TDG (↑)TDA (↑)Time (↓)GPU (↓)AP (↑)AF (↑)TDG (↑)TDA (↑)Time (↓)GPU (↓)
TwitchLEBED53.55±0.10-0.84±0.0554.87±0.0753.26±0.13164.5122461.4350.29±0.10-4.05±0.2752.73±0.1452.33±0.19131.263542.58
TwitchGCALOOMOOMOOMOOMOOMOOM54.13±0.25-2.21±0.3154.16±0.3150.00±0.00316.0510226.88
TwitchEMC60.40±0.450.68±0.1459.25±0.4856.31±0.51140.9815007.4857.89±0.270.35±0.1458.05±0.3155.33±0.27101.242775.17
FacebookLEBED47.47±0.11-0.65±0.1048.41±0.0847.39±0.05177.9713858.5751.82±0.040.14±0.0750.79±0.0250.83±0.03102.064108.80
FacebookGCALOOMOOMOOMOOMOOMOOM48.26±0.63-0.83±0.5248.58±1.3648.72±1.181376.1813614.52
FacebookEMC54.28±1.300.88±0.6752.81±1.0154.59±1.1866.078128.5252.42±1.540.26±0.3051.78±1.4351.88±1.7319.763220.61
EllipticLEBED54.53±1.62-6.87±0.7658.75±5.5360.50±2.28470.848095.2963.58±0.07-2.00±0.1067.09±0.0964.04±0.05194.111461.72
EllipticGCAL63.53±6.81-2.81±3.1551.31±7.0951.71±9.53626.612037.2042.23±8.55-5.87±10.3545.06±1.5947.03±1.63589.751011.27
EllipticEMC70.51±3.18-2.09±1.4868.16±4.7565.56±3.7827.38939.1666.81±2.36-1.13±2.6268.66±3.5264.86±4.6827.57213.36
ArxivLEBED25.10±0.06-3.40±0.0528.43±0.0625.29±0.04312.559458.8224.94±0.03-2.65±0.0428.70±0.0425.58±0.03236.621608.92
ArxivGCAL20.40±0.00-6.83±1.7220.70±0.4221.25±1.721481.9324770.1024.15±6.94-1.80±2.0627.90±8.5823.77±5.571362.7622342.47
ArxivEMC38.69±1.622.21±0.5843.43±3.1439.44±2.0826.023441.8938.78±3.05-0.98±1.2241.13±3.4739.14±2.2125.06508.92

Table 1. Performance comparison (%, mean ± standard deviation for five runs) on different backbones with comprehensive metrics, Runtime (s) and GPU Memory Usage (MiB). We compare EMC with the most recent 2 baselines from two categories of domain adaptation methods. ‘↑’ indicates higher is better, and ‘↓’ indicates lower is better. ‘OOM’ implies Out-Of-Memory. The best results are highlighted with bold and the runner-ups are underlined.

Extended Comparisons. We further compare EMC with 10 representative baselines following the GCAL setting (Table 2 and Appendix D.5), and conduct extended comparison against the very recent baselines GCAL [31] and STEM [25] on both node-level and graph-level adaptation (Appendix § 11.6). These results confirm that EMC generalizes across task granularities and adaptation protocols, attaining strong effectiveness without sacrificing memory efficiency.

Methods / DatasetsTwitch-explicitTwitch-explicitFacebook-100Facebook-100EllipticEllipticOGB-ArxivOGB-Arxiv
AP@AUC (↑)AF (↑)AP@ACC (↑)AF (↑)AP@F1 (↑)AF (↑)AP@ACC (↑)AF (↑)
Base Model53.88±0.00NA50.55±0.00NA53.97±0.00NA42.43±0.00NA
One-step Test-Time Adaptation Methods
DANN [9]51.50±0.390.19±0.5550.63±0.640.38±1.1353.84±0.56-0.95±0.5442.62±0.23-1.28±0.16
Norm [20]52.65±0.00-2.30±0.0047.62±0.000.53±0.0054.67±0.000.02±0.0040.21±0.000.11±0.00
TENT [36]52.84±0.98-1.83±1.0546.63±0.000.61±0.0046.54±0.000.55±0.0036.72±0.37-0.02±0.18
EERM [44]52.08±0.00NA49.70±0.03NA46.51±0.00NA36.26±0.00NA
GTrans [17]53.55±0.29NAOOMNA54.25±0.02NA39.69±0.04NA
LEBED [53]51.06±0.050.24±0.0546.90±0.00-0.25±0.0049.44±0.19-4.86±0.2041.81±0.01-1.85±0.01
Continual Test-Time Adaptation Methods
CoTTA [38]53.94±0.360.34±0.4150.12±0.160.59±0.1254.08±0.05-1.92±0.0640.28±0.01-1.96±0.01
EATA [28]53.56±0.10-0.72±0.0749.02±3.16-0.57±0.0350.48±0.07-0.76±0.0640.91±0.70-1.35±0.59
GCAL [31]55.65±0.090.42±0.1352.72±0.360.72±0.1956.57±0.140.88±0.1345.22±0.170.76±0.05
STEM [25]56.66±0.05-0.07±0.17NANANANA31.71±0.14-4.40±0.19
EMC (ours)55.95±0.150.47±0.0853.10±0.002.15±0.2756.76±0.460.96±0.3046.07±1.700.99±0.66

Table 2. Performance comparison (%, mean ± standard deviation for five runs) across four datasets, evaluated against baseline methods and EMC. The results of baselines are derived from the published works. ‘NA’ is short for Not Applicable, and ‘OOM’ implies Out-Of-Memory. The best results are highlighted with bold and the runner-ups are underlined.

Visualization of the Performance Matrix. We visualize the overall performance during continual adaptation using the performance matrix. As shown in Figure 4, EMC effectively mitigates forgetting under continual drift, maintaining strong performance across multiple target domains throughout the adaptation process. Detailed analysis with additional datasets is provided in Appendix § 11.§ 16.4.

Performance matrices of GCAL and EMC on Facebook-100 and OGB-Arxiv

Figure 4. Performance matrices of EMC and GCAL on different datasets.

Visualization of Crystallized Memories. To intuitively examine what the crystallized memories preserve, we provide t-SNE projections of the original and memory embeddings produced by the GNN encoder on the continuous-domain Twitch graphs in Figure 5. The two embedding sets are closely aligned in the representation space, confirming that EMC retains the semantically informative content of each domain in a much more compact form. Additional structural visualizations rendered with NetworkX are provided in Appendix § 11.§ 17.

Figure 5. T-SNE visualization of representations of the original graph and its crystallized memory.

Scaling Efficiency Analysis (RQ2)

To evaluate the efficiency of EMC, we generate synthetic datasets by varying the number of nodes and the number of domains. We plot the runtime and peak GPU memory usage in Figure 6 and Figure 7, where the red cross indicates an Out-Of-Memory (OOM) error. Additional results and detailed settings are provided in Appendix § 11.§ 19.1. When the number of nodes exceeds 40k, both GCAL and LEBED are stuck due to OOM, while EMC still operates within GPU limits even at the highest tested scale. We further benchmark the memory crystallization step alone on a single graph up to 200k nodes (see in Appendix § 9.2), where the closed-form inversion takes only 0.71s, confirming that the cost on the small Nt′×Nt′N^{\prime}_{t} \times N^{\prime}_{t} system remains negligible relative to the propagation cost on the original graph.

Figure 6. Node scaling efficiency evaluation.

Domain scaling efficiency evaluation

Figure 7. Domain scaling efficiency evaluation.

Ablation Studies (RQ3)

We conduct ablation studies to analyze the effectiveness of two architectural variants:

  • w/o DM: We remove the Domain-specific Memory crystallization in Section 3.1.

  • w/o EA: We remove the memory-driven adaptation in Section 3.2.

Results are shown in Table 3. Overall, EMC outperforms both variants, validating the indispensable contribution of each component. In addition, removing “DM” leads to a significant drop in both efficiency and effectiveness, while removing “EA” reduces runtime and GPU memory but causes considerable degradation in adaptation performance.

DatasetMethodAP(↑)TDG(↑)TDA(↑)Time(↓)GPU(↓)
Twitchw/o DM52.1253.7751.3599.431486.81
Twitchw/o EA51.5052.3151.2160.13783.14
TwitchEMC55.9555.5655.8364.64854.97
Facebookw/o DM48.7848.9648.9285.4513481.55
Facebookw/o EA51.3050.8550.3467.152962.72
FacebookEMC53.1053.4952.3018.843006.08
Ellipticw/o DM47.4449.2047.5797.60747.93
Ellipticw/o EA47.3450.5550.0020.52183.57
EllipticEMC56.7658.7355.9222.76189.36
Arxivw/o DM12.6116.4517.5830.521083.73
Arxivw/o EA20.6520.5020.5113.26390.12
ArxivEMC46.0747.1143.5224.84391.02

Table 3. Ablation study results of EMC and its variants with runtime (s) and GPU usage (MiB).

Parameter Study (RQ4)

Sensitivity Analysis of α\alpha. To analyze the sensitivity of α\alpha for EMC, we vary it from 0.3 to 5.0. The AP w.r.t. different α\alpha values is plotted in Figure 8. The results confirm that EMC is robust to reasonable choices of α\alpha, while tuning remains important for optimal performance.

Figure 8. The sensitivity of hyperparameter α\alpha.

Sensitivity Analysis of β\beta. We further evaluate the sensitivity of β\beta, which controls the importance of memory replay during adaptation. Results in Figure 9 show that the performance is sensitive to β\beta within a reasonable range. Further analysis on τ\tau and λ\lambda is provided in Appendix § 11.§ 19.2.

Figure 9. The sensitivity of hyperparameter β\beta.

Graph Continual Learning. Graph continual learning aims to enable graph models to adapt to evolving data distributions while mitigating catastrophic forgetting. Existing approaches are typically categorized into three major classes: regularization methods, parameter isolation methods, and memory replay methods. Regularization-based methods constrain weight updates to preserve important knowledge from previous tasks; for example, TWP [22] incorporates topology-aware weight preservation, and RieGrace [34] leverages gradient-based importance measures. Parameter isolation techniques, such as HPNs [48], allocate task-specific parameters to prevent interference between old and new knowledge. Memory replay methods alleviate forgetting by storing and reusing representative data, as seen in ER-GNN [54] and SSM [49]. While these methods are effective in continual learning scenarios, they generally assume access to labeled training data, limiting their applicability to real-world settings. Inspired by memory replay, our work eliminates the need for additional trainable components by reformulating the distribution matching objective and deriving a closed-form solution for crystallizing each incoming domain into a compact memory at test time. This makes our method well suited for the more realistic and challenging setting of graph learning under non-stationary distribution shifts at test time, where the input distribution drifts continually and no source data or annotations are available.

Graph Domain Adaptation. Graph domain adaptation [26, 43, 45, 6, 23, 17] aims to transfer knowledge learned from labeled data in a source domain to different but related target domains. For example, UDA-GCN [42] and AdaGCN [4] enhance adaptability by exploiting graph topology and reducing source–target discrepancies through local/global consistency or domain adversarial objectives. Continual Test-Time Adaptation (CTTA) is a more practical extension of traditional Test-Time Adaptation (TTA), which tackles the challenge of adapting models to continuously drifting target domains. Recent CTTA approaches, such as CoTTA [38], incorporate strategies like bi-level pseudo-label averaging and stochastic model resets to improve robustness. The most recent graph-specific approach, GCAL [31], trains an auxiliary VGAE to generate memory graphs for replay, but the additional generation training is expensive and scales poorly under prolonged drift. However, existing methods largely overlook the continual nature of distribution shifts at test time and the redundancy within each domain that is irrelevant to the underlying semantics. In this paper, we explicitly model inter-domain relationships under continual drift through state-evolving memories and improve both the efficiency and effectiveness of adaptation by crystallizing each domain in closed form, without requiring any auxiliary trainable component at test time.

Conclusion

In this paper, we present EMC (Efficient Memory Crystallization), a training-free test-time framework that crystallizes each incoming graph domain into a compact, semantically faithful memory through a closed-form solution, and models inter-domain dependencies via state-evolving memories with provably tighter generalization error bounds. Extensive experiments demonstrate the superiority of EMC, achieving substantial efficiency gains (87.4% less runtime and 92.4% less GPU memory on average over the recent baseline GCAL) while outperforming state-of-the-art baselines on graphs under non-stationary distribution shifts.

Acknowledgements

This work has been supported by CCSE project (CCSE-2024ZX-09), by NSFC (Grant No. U25B2070), and by the Academic Excellence Foundation of BUAA for PhD Students.

Notations

As an expansion of the notations in our work, we summarize the frequently used notations in Table 4. We adopt GtG^{t} to denote the graph from the tt-th target domain in the arrival order, and G(t)G^{(t)} as a generic notation when the index (t)(t) may refer to any past or current domain in {1,…,T}\{1,\ldots,T\}.

NotationsDescriptions
T={Gt}t=1T\mathcal{T} = \{G^{t}\}_{t=1}^{T}Sequence of TT graphs from target domains
G(t)={A(t),X(t)}G^{(t)} = \{A^{(t)}, X^{(t)}\}Graph from the tt-th target domain
A(t)∈RNt×NtA^{(t)} \in\mathbb{R}^{N_t \times N_t}Adjacency matrix of G(t)G^{(t)} with NtN_t nodes
X(t)∈RNt×dX^{(t)} \in\mathbb{R}^{N_t \times d}Node feature of G(t)G^{(t)} with dd-dim features
Θt\Theta_tModel parameters adapted after tt-th domain
A^\hat{A}Normalized adjacency matrix with self-loops
H=A^KXH = \hat{A}^{K}XEmbeddings after KK-hop propagation
H′H'Aggregated memory embeddings
G~(t)={A′,X′}\widetilde{G}^{(t)} = \{A', X'\}Crystallized memory of G(t)G^{(t)}
A′A'Sparsified memory adjacency matrix
X′X'Feature matrix of memory G~(t)\widetilde{G}^{(t)}
L′L'Laplacian matrix of A′A'
RiR^iClass-wise aggregation matrix for class ii
P^\hat{P}Aggregation matrix for crystallized memories
Ψ\PsiLearnable linear weight of the GNN encoder
Φ\PhiDistribution over parameter configurations of Ψ\Psi
Z=HΨZ = H\PsiRepresentation of the original graph
Z′=H′ΨZ' = H'\PsiRepresentation of the crystallized memory
Z′(t)Z'^{(t)}State-evolved memory representation at step tt
G~^(t)\hat{\widetilde{G}}^{(t)}Predictive distribution of the current model on G~(t)\widetilde{G}^{(t)}
ϵt(h^)\epsilon^t(\hat{h})Prediction risk on the tt-th target domain
DKL(⋅∥⋅)D_{\mathrm{KL}}(\cdot\Vert\cdot)KL-divergence between two distributions
dH(⋅,⋅)d_{\mathcal{H}}(\cdot,\cdot)H\mathcal{H}-divergence
L,LAdp\mathcal{L}, \mathcal{L}_{\mathrm{Adp}}Adaptation losses
α,β,τ\alpha, \beta, \tauHyperparameters of EMC
wt−1,wtw_{t-1}, w_tConvex-combination weights for state-evolving memory
λ\lambdaMemory size scaling factor, Nt=λ−1Nt′N_t = \lambda^{-1}N'_t

Table 4. Summary of notations and descriptions.

Algorithm

The overall optimization process of EMC is summarized in Algorithm 1. At each step tt, we first construct the memory G~(t)\widetilde{G}^{(t)} and form the state-evolved representation Z′(t)Z^{\prime(t)} (Steps 1–3), and only then minimize L\mathcal{L} to update Θt−1→Θt\Theta_{t-1} \to\Theta_t (Steps 4–5). The KL term in Eq. (12) therefore measures the predictive shift on each stored memory induced by the parameter update, serving as an anti-forgetting regularizer with the stability guarantee of Proposition 3.7.

Complexity Analysis

The pipeline of EMC consists of the following components: Structure-aware Feature Propagation, Redundancy-eliminated Memory Construction, State Evolving Field Modeling, and Parameter Update. We analyze the time complexity of each module per test-time step tt with input GtG^t.

  • Structure-aware Feature Propagation: This step performs KK-hop neighborhood smoothing over the input graph, with complexity O(K∣Et∣d)O(K|E_t|d), where ∣Et∣|E_t| is the number of edges and dd is the node feature dimension. We then use confidence-weighted KK-means clustering for partitioning each class. Let ∣Ci∣|C_i| be the number of nodes in class ii and ∣Ci∣|C^i| be the number of clusters. The time complexity for class ii is O(∣Ci∣∣Ci∣dniter)O(|C_i||C^i|dn_{\mathrm{iter}}), where nitern_{\mathrm{iter}} is the number of K-means iterations. This process is repeated for each class.

  • Redundancy-eliminated Memory Construction: Computing pairwise cosine similarity among Nt′N'_t memory nodes takes O(Nt′2d)O(N_t'^2d). Solving the regularized least-squares problem involves matrix inversion with complexity O(Nt′3+Nt′2d+(K+1)Nt′∣Et′∣+d∣Et′∣)O(N_t'^3 + N_t'^2d + (K+1)N'_t|E'_t| + d|E'_t|), where ∣Et′∣|E'_t| is the number of edges in the memory graph. The solution is efficient because Nt′≪NtN'_t \ll N_t.

  • State Evolving Field Modeling: Fusion of memories from previous and current time steps involves linear interpolation of node embeddings and has negligible cost: O(Nt′d)O(N'_td).

  • Parameter Update: The loss computation includes entropy and KL-divergence between memory predictions. For TT total adaptation steps, the cumulative cost of computing LAdp\mathcal{L}_{\mathrm{Adp}} scales as O(TNt′d)O(TN'_td) across domains. Parameter updates via gradient descent depend on the model size but are standard and efficient in practice.

The total time complexity per test graph GtG^t is dominated by class-wise partitioning and memory feature construction. However, since the memory size Nt′N'_t is only a small fraction (e.g., 1%) of the original graph size NtN_t, EMC remains highly efficient. Techniques such as approximate clustering

Algorithm 1: Test-Time Adaptation Process of EMC.
Input: Sequence of test graph samples $\{G^{(t)} = (A^{(t)}, X^{(t)})\}_{t=1}^{T}$ from $T$ domains;
      pre-trained GNN $f$ with parameters $\Theta_0$.
Output: Adapted parameters $\{\Theta_t\}_{t=1}^{T}$.
1 Initialize the model with $\Theta_0$.
2 for $t = 1$ to $T$ do
  // Step 1: Structure-aware Feature Propagation
3 Compute $H^{(t)} \leftarrow \hat{A}^{K}X^{(t)}$.
4 Compute aggregation matrix $\hat{P}^{(t)}$ via {xref}`Eq. (1)`.
5 Obtain aggregated features $H'^{(t)} \leftarrow \hat{P}^{(t)}H^{(t)}$.
  // Step 2: Redundancy-eliminated Memory Construction
6 Build sparse adjacency $A'^{(t)}$ via {xref}`Eq. (5)`.
7 Solve closed-form objective for $X'^{(t)}$ via {xref}`Eq. (6)`.
8 Construct domain-specific memory $\widetilde{G}^{(t)} = (A'^{(t)}, X'^{(t)})$.
  // Step 3: State Evolving Field
9 $Z'^{(t)} \leftarrow w_{t-1}Z'^{(t-1)} + w_tZ'^{(t)}$ via {xref}`Eq. (8)`.
  // Step 4: Adaptation Loss Computation
10 Compute $\mathcal{L} \leftarrow H(G^{(t)}) + \beta \cdot \mathcal{L}_{\mathrm{Adp}}(\widetilde{G}_{1:t-1})$ via {xref}`Eq. (12)`.
  // Step 5: Parameter Update
11 Update $\Theta_{t-1} \rightarrow \Theta_t$ via gradient descent on $\mathcal{L}$.
12 end
13 return $\{\Theta_t\}_{t=1}^{T}$

(e.g., FAISS [7]) and sparse propagation further accelerate the process, making the method suitable for real-time test-time adaptation under continual drift.

Complexity Comparison with the Baseline GCAL. Compared with our efficient closed-form memory crystallization, GCAL [31] introduces substantial additional computational overhead at each adaptation step. Specifically, for the tt-th test-time domain Gt=(At,Xt)G^t = (A^t, X^t), the extra complexity mainly comes from the following components:

  • VGAE Encoding: Encoding the input graph into latent mean and variance representations incurs a cost of O(Etd+Ntd2)O(\mathcal{E}_t d + N_t d^2), where NtN_t and Et\mathcal{E}_t are the number of nodes and edges in GtG^t, respectively, and dd is the node feature dimension.

  • VGAE Decoding: Reconstructing the synthetic graph G~t\widetilde{G}^t through sampling and edge scoring requires O(Nt2d)O(N_t^2 d) due to pairwise similarity computations.

  • Dual Forward Pass: Forwarding both GtG^t and G~t\widetilde{G}^t through the base GNN leads to O(Etd+Ntd2+Eˉtd+Nt′d2)O(\mathcal{E}_t d + N_t d^2 + \bar{\mathcal{E}}_t d + N'_t d^2), where Nt′N'_t and Eˉt\bar{\mathcal{E}}_t denote the node and edge count of the synthetic graph G~t\widetilde{G}^t.

  • Gradient Matching: Computing real gradients and second-order synthetic gradients with respect to PP model parameters has cost O(P+P2)O(P + P^2).

  • Regularization Terms: The KL divergence and reparameterization loss over latent variables add O(Ntd)O(N_t d) complexity, and the MMD loss comparing node embeddings from GtG^t and G~t\widetilde{G}^t incurs O(NtNt′d)O(N_tN'_t d).

  • Additional Inner-loop Iterations: All steps above are repeated for LL inner-loop updates, resulting in a total cost of O(L⋅(Etd+Ntd2+Nt2d+Eˉtd+Nt′2+P+P2+NtNt′d))O\left(L \cdot(\mathcal{E}_t d + N_t d^2 + N_t^2 d + \bar{\mathcal{E}}_t d + N'_t{}^2 + P + P^2 + N_tN'_t d)\right).

In each adaptation epoch, GCAL introduces the above-mentioned additional computational overhead, which is further amplified during the parameter update stage of the GNN model. This design leads to significantly higher time and memory costs during continual test-time adaptation, making GCAL less practical for long-horizon or resource-constrained scenarios.

Analysis of Scalability on Memory Construction

The closed-form construction in EMC is designed for scalability: the linear system X′=(QTQ+αL′)−1QTH′X' = (Q^{\mathsf{T}}Q + \alpha L')^{-1}Q^{\mathsf{T}}H' is solved on the small memory graph of size Nt′N'_t rather than on the full input of size NtN_t. With Nt′=0.01NtN'_t = 0.01N_t throughout our experiments, the linear system stays compact regardless of the input scale, decoupling the dominant cost of memory construction from the input size. This compact formulation is what makes the method memory-efficient (§ 4.2) and what we now show transfers to large input graphs.

Sparsity from the design. The similarity threshold τ\tau in Eq. (5) keeps only edges between node pairs whose embeddings are sufficiently close, so the memory adjacency A′\mathbf{A}' is constructed sparse by design rather than densified post hoc. As a result, Q=A^′K\mathbf{Q} = \hat{\mathbf{A}}'^{K} inherits this sparsity, and the resulting linear system remains well-conditioned and efficient to solve in practice.

Empirical scaling on a single graph. Table 5 reports runtime and GPU memory of the memory-construction step on a single Erdős–Rényi graph as the node count NtN_t grows from 1k to 200k (memory size fixed at Nt′=0.01NtN'_t = 0.01N_t). The matrix inversion remains under 1 second even at Nt=200kN_t = 200\mathrm{k}, while total processing scales near-linearly in the dominant propagation term, confirming that the closed-form solver is not a bottleneck at industrial scale.

Metric / #Node1k2k5k10k20k40k50k100k200k
Matrix Inversion Time (s)0.00770.00960.01560.02340.09740.11420.12240.32110.7121
Total Processing Time (s)0.64141.07032.814517.712154.2386184.0252271.65891158.55025580.7541
GPU Memory (MiB)11.3815.1729.7566.17181.71564.07829.683358.2912806.52

Table 5. Memory-construction scaling on a single graph up to 200k nodes (memory size Nt′=0.01NtN'_t = 0.01N_t). The matrix inversion in Eq. (6) stays under 1 second even at Nt=200kN_t = 200\mathrm{k}.

Semantic-Anchor Aggregation at Test Time

We elaborate on how class-wise node partitioning in Section 3.1 is instantiated at test time, where ground-truth labels of target-domain graphs are unavailable, and explain why the resulting memories are robust to noisy partitioning.

Test-Time Setting under Continual Drift. We consider a standard covariate shift setting, where the label space remains unchanged across domains, i.e., PS(Y)=PT(Y)\mathbb{P}_{S}(Y) = \mathbb{P}_{T}(Y) and PS(G)≠PT(G)\mathbb{P}_{S}(G) \ne\mathbb{P}_{T}(G). That is, distribution shifts at test time affect the input graph distributions, while the semantic meanings of classes are consistent with those observed during pre-training. This assumption is critical: under covariate shift the class-conditional decision boundary is preserved across domains, so systematic confident misclassification by the current model is substantially less likely than under label shift.

Semantic Anchors for Class-wise Aggregation. Class-wise partitioning at test time is guided by the model’s predicted semantics rather than ground-truth labels. Concretely, given a node vv in the incoming graph G(t)G^{(t)}, the current model with parameters Θt−1\boldsymbol{\Theta}_{t-1} produces a predictive distribution pΘt−1(y∣v)p_{\boldsymbol{\Theta}_{t-1}}(y|v), from which a soft semantic assignment is derived together with a confidence score rv=max⁡c∈YpΘt−1(y=c∣v)r_v = \max_{c \in\mathcal{Y}} p_{\boldsymbol{\Theta}_{t-1}}(y = c|v). Nodes with similar predicted semantics are grouped together, and the confidence score weights each node’s contribution to the resulting centroid through the aggregation matrix Ri\mathbf{R}^{i} in Eq. (1). Crucially, the predicted semantics serve as semantic anchors for grouping rather than as supervisory targets, so the procedure does not rely on the correctness of any individual assignment.

Design Choices that Stabilize the Aggregation. Memory crystallization in EMC relies on four complementary design choices that together keep aggregation stable under continual drift:

  • Covariate shift limits systematic errors. As stated above, the preserved class-conditional decision boundary makes systematic confident misclassification far less likely than under label shift.

  • Anchors are not supervisory targets. They are used only to partition nodes into sub-clusters for centroid aggregation. Even noisy assignments yield valid centroids through a many-to-one smoothing effect, analogous to the behavior of kk-means under individual point mislabeling [24].

  • KK-hop propagation denoises before partitioning. The features H=A^KX\mathbf{H} = \hat{\mathbf{A}}^{K}\mathbf{X} aggregate neighborhood information, smoothing out local prediction errors before memory construction.

  • Dirichlet regularization provides an independent smoothness constraint. The term α⋅tr⁡(X′TL′X′)\alpha\cdot\operatorname{tr}(\mathbf{X}'^{\mathsf{T}}\mathbf{L}'\mathbf{X}') in Eq. (6) enforces feature smoothness on the crystallized memory, further reducing any residual noise from partitioning.

Empirically, EMC consistently outperforms baselines on all four datasets (§ 4.2), including Elliptic (temporal Bitcoin transaction shifts that can be abrupt) and OGB-Arxiv (year-by-year citation shifts), confirming that the four design choices above translate into reliable partitioning under continual drift in practice.

Theoretical Justification

Reformulation of Distribution Matching

We provide a complete proof for Proposition 3.1 and retain the original analysis in the remark. We denote the memory crystallized from G(t)G^{(t)} as G~(t)={A′,X′}\widetilde{G}^{(t)} = \{A', X'\}. After multi-hop propagation, let Z=HΨ=A^KXΨZ = H\Psi= \hat{A}^{K}X\Psi and Z′=H′Ψ=A^′KX′ΨZ' = H'\Psi= \hat{A}'^{K}X'\Psi denote the representations of the original graph G(t)G^{(t)} and its memory G~(t)\widetilde{G}^{(t)}, respectively, where Ψ\Psi is the learnable linear weight of the GNN encoder and Φ\Phi is the distribution over its parameter configurations. To directly align the distribution of the input domain with that of its memory, the discrepancy between propagated features is minimized as:

min⁡G~(t),P^EΨ∼Φ∥P′H′Ψ−PHΨ∥2.(14)\min_{\widetilde{G}^{(t)},\hat{P}} \mathbb{E}_{\Psi\sim\Phi}\left\lVert P'H'\Psi-PH\Psi\right\rVert^2. \tag*{(14)}

Proposition C.1 (Restatement of Proposition 3.1). Assuming that nodes in G~(t)\widetilde{G}^{(t)} are organized in ascending order, P′P' degenerates into the identity matrix II. Let P^\hat{P} be the row-normalized version of PP. Then, the objective in Eq. (14) can be upper-bounded by:

EΨ∼Φ∥H′Ψ−P^HΨ∥2≤EΨ∼Φ∥H′−P^H∥2∥Ψ∥2.(15)\mathbb{E}_{\Psi\sim\Phi}\left\lVert H'\Psi-\hat{P}H\Psi\right\rVert^2\leq\mathbb{E}_{\Psi\sim\Phi}\left\lVert H'-\hat{P}H\right\rVert^2\left\lVert\Psi\right\rVert^2. \tag*{(15)}

Proof. We start from Eq. (14). Under the canonical ordering of nodes in G~(t)\widetilde{G}^{(t)}, we have P′=IP'=I. By the construction of the aggregation matrix in the main text, PP aggregates nodes within each class-wise subclass, and P^\hat{P} is its row-normalized version. Thus Eq. (14) reduces to

EΨ∼Φ∥H′Ψ−P^HΨ∥2.(16)\mathbb{E}_{\Psi\sim\Phi}\left\lVert H'\Psi-\hat{P}H\Psi\right\rVert^2. \tag*{(16)}

Let M≔H′−P^HM \coloneqq H'-\hat{P}H. Then

∥H′Ψ−P^HΨ∥2=∥MΨ∥2.(17)\left\lVert H'\Psi-\hat{P}H\Psi\right\rVert^2=\left\lVert M\Psi\right\rVert^2. \tag*{(17)}

By sub-multiplicativity of matrix norms, for any compatible matrices MM and Ψ\Psi,

∥MΨ∥≤∥M∥∥Ψ∥.(18)\left\lVert M\Psi\right\rVert\leq\left\lVert M\right\rVert\left\lVert\Psi\right\rVert. \tag*{(18)}

Squaring both sides yields

∥MΨ∥2≤∥M∥2∥Ψ∥2.(19)\left\lVert M\Psi\right\rVert^2\leq\left\lVert M\right\rVert^2\left\lVert\Psi\right\rVert^2. \tag*{(19)}

Taking expectation over Ψ∼Φ\Psi\sim\Phi on both sides gives

EΨ∼Φ∥MΨ∥2≤EΨ∼Φ(∥M∥2∥Ψ∥2)=∥M∥2EΨ∼Φ∥Ψ∥2,(20)\mathbb{E}_{\Psi\sim\Phi}\left\lVert M\Psi\right\rVert^2\leq\mathbb{E}_{\Psi\sim\Phi}\left(\left\lVert M\right\rVert^2\left\lVert\Psi\right\rVert^2\right)=\left\lVert M\right\rVert^2\mathbb{E}_{\Psi\sim\Phi}\left\lVert\Psi\right\rVert^2, \tag*{(20)}

where we used that M=H′−P^HM=H'-\hat{P}H is independent of Ψ\Psi. Substituting back MM and rewriting yields Eq. (15), completing the proof. □

Remark. The objective in Eq. (14) is upper-bounded by Eq. (15), where Ψ\Psi is the (random) weight matrix that transforms the KK-th order propagated features H′H' and HH. Here A^′=D~′−12A~′D~′−12\hat{A}'=\tilde{D}'^{-\frac{1}{2}}\tilde{A}'\tilde{D}'^{-\frac{1}{2}} and A^=D~−12A~D~−12\hat{A}=\tilde{D}^{-\frac{1}{2}}\tilde{A}\tilde{D}^{-\frac{1}{2}} represent the symmetric normalized adjacency matrices, where A~′\tilde{A}' and A~\tilde{A} are adjacency matrices with self-loops, and D~′\tilde{D}' and D~\tilde{D} are degree matrices for A~′\tilde{A}' and A~\tilde{A}. Since Ψ\Psi is independent of both G~(t)\widetilde{G}^{(t)} and P^\hat{P}, minimizing the upper bound reduces to the deterministic matching problem:

arg⁡min⁡G~(t),P^∥H′−P^H∥2.(21)\underset{\widetilde{G}^{(t)},\hat{P}}{\arg\min}\left\lVert H'-\hat{P}H\right\rVert^2. \tag*{(21)}

According to Proposition C.1, we expect a symmetric encoding procedure between the original G(t)G^{(t)} and the crystallized memory G~(t)\widetilde{G}^{(t)}. Therefore, our goal is to construct A′A' and X′X' satisfying A^′KX′=H′\hat{A}^{\prime K}X^\prime= H^\prime. To this end, we utilize a pre-defined graph structure and compute X′X^\prime in closed form. Specifically, we construct the structure via a similarity-based thresholding scheme:

Ai,j′={1if cos⁡(Hi′,Hj′)>τ,0otherwise,(22)A_{i,j}^\prime= \begin{cases} 1 & \text{if } \cos(H_i^\prime,H_j^\prime) > \tau,\\ 0 & \text{otherwise,} \end{cases} \tag*{(22)}

where cos⁡(⋅,⋅)\cos(\cdot,\cdot) measures the cosine similarity and τ\tau is the hyper-parameter for graph sparsification. To ensure that reconstructed features change smoothly between connected nodes, we introduce the Dirichlet energy constraint [18] into the feature reconstruction loss to quantify the smoothness of graph signals. The optimization objective for X′X^\prime is:

arg⁡min⁡X′ ∥A^′KX′−H′∥2+αtr⁡(X′TL′X′),(23)\underset{X^\prime}{\arg\min}\ \left\lVert\hat{A}^{\prime K}X^\prime-H^\prime\right\rVert^2+\alpha\operatorname{tr}(X^{\prime\mathsf{T}}L^\prime X^\prime), \tag*{(23)}

where L′=D′−A′L^\prime=D^\prime-A^\prime is the Laplacian matrix, D′D^\prime is the degree matrix, and α\alpha controls the smoothness strength.

Proof of Proposition C.2

Proposition C.2. Assume that G~(t)={A′,X′}\widetilde{G}(t)=\{A^\prime,X^\prime\} is the crystallized memory of an input graph; the closed-form solution of Eq. (23) takes the form X′=(QTQ+αL′)−1QTH′X^\prime=(Q^\mathsf{T}Q+\alpha L^\prime)^{-1}Q^\mathsf{T}H^\prime, where Q=A^′KQ=\hat{A}^{\prime K}.

Proof. Let us denote the objective in Eq. (23) as I=∥A^′KX′−H′∥2+αtr⁡(X′TL′X′)\mathcal{I}=\left\lVert\hat{A}^{\prime K}X^\prime-H^\prime\right\rVert^2+\alpha\operatorname{tr}(X^{\prime\mathsf{T}}L^\prime X^\prime). To solve the optimization problem in Eq. (23), we compute the first- and second-order derivatives of I\mathcal{I} with respect to X′X^\prime:

∂I∂X′=2QT(QX′−H′)+α(L′+L′T)X′=2(QTQ+αL′)X′−2QTH′,\frac{\partial\mathcal{I}}{\partial X^\prime}=2Q^\mathsf{T}(QX^\prime-H^\prime)+\alpha(L^\prime+L^{\prime\mathsf{T}})X^\prime=2(Q^\mathsf{T}Q+\alpha L^\prime)X^\prime-2Q^\mathsf{T}H^\prime,
∂2I∂X′2=2(QTQ+αL′).(24)\frac{\partial^2\mathcal{I}}{\partial X^{\prime2}}=2(Q^\mathsf{T}Q+\alpha L^\prime). \tag*{(24)}

According to the definition of A′A^\prime in Eq. (22), both L′L^\prime and QQ are positive semi-definite matrices. Therefore, the second-order derivative ∂2I∂X′2\frac{\partial^2\mathcal{I}}{\partial X^{\prime2}} is positive semi-definite, and the objective function I\mathcal{I} is convex. This implies that the first-order derivative ∂I∂X′\frac{\partial\mathcal{I}}{\partial X^\prime} corresponds to a convex function with a unique minimum. Setting the gradient to zero yields the closed-form solution:

X′=(QTQ+αL′)−1QTH′,(25)X^\prime=(Q^\mathsf{T}Q+\alpha L^\prime)^{-1}Q^\mathsf{T}H^\prime, \tag*{(25)}

where Q=A^′KQ=\hat{A}^{\prime K}.

Remark. The closed-form solution operates on a compact Nt′×Nt′N_t^\prime\times N_t^\prime system over the crystallized memory rather than on the full Nt×NtN_t\times N_t system over the input graph, with Nt′≪NtN_t^\prime\ll N_t. This decoupling between the construction cost and the input scale is the key reason EMC attains a much smaller memory footprint than methods that train auxiliary modules on the full input graph.

Proof of Proposition 3.3

The following result identifies the precise condition under which marginal alignment is equivalent to joint alignment, motivating the state-evolving design that follows.

Proposition C.3. Given any pair of sequences of samples from the target domain, T={Gt}t=1T\mathcal{T}=\{G^t\}_{t=1}^{T} and the corresponding crystallized memories T~={G~t}t=1T\widetilde{\mathcal{T}}=\{\widetilde{G}^t\}_{t=1}^{T}, following the joint distributions PG1:T\mathbb{P}_{G^{1:T}} and QG~1:T\mathbb{Q}_{\widetilde{G}^{1:T}} respectively, with each GtG^t and G~t\widetilde{G}^t following the marginal distributions PGt\mathbb{P}_{G^t} and QG~t\mathbb{Q}_{\widetilde{G}^t}. Then the following relation holds:

DKL(PG1:T∥QG~1:T)≡∑t=1TDKL(PGt∥QG~t)iffPG1:T=∏t=1TPGt,QG~1:T=∏t=1TQG~t,(26)D_{\mathrm{KL}}(\mathbb{P}_{G^{1:T}\parallel\mathbb{Q}_{\widetilde{G}^{1:T}}})\equiv\sum_{t=1}^{T}D_{\mathrm{KL}}(\mathbb{P}_{G^t}\parallel\mathbb{Q}_{\widetilde{G}^t})\quad\mathrm{iff}\quad\mathbb{P}_{G^{1:T}}=\prod_{t=1}^{T}\mathbb{P}_{G^t},\quad\mathbb{Q}_{\widetilde{G}^{1:T}}=\prod_{t=1}^{T}\mathbb{Q}_{\widetilde{G}^t}, \tag*{(26)}

where DKLD_{\mathrm{KL}} denotes the Kullback–Leibler divergence and ≡\equiv indicates that the two expressions are identically equal.

Proof. First, we prove sufficiency: if the snapshots are temporally independent, then the two expressions coincide. By the definition of KL divergence and its chain rule, the divergence between the joint distributions of T\mathcal{T} and T~\widetilde{\mathcal{T}} can be expanded as:

DKL(PG1:T ∥ QG~1:T)=∑G1:TPG1:Tlog⁡PG1:TQ(G~1:T)=∑G1:TPG1:Tlog⁡P(G1)Q(G~1)+∑G1:TPG1:Tlog⁡∏t=2TP(Gt∣G1:t−1)∏t=2TQ(G~t∣G~1:t−1)=∑G1P(G1)log⁡P(G1)Q(G~1)+∑t=2T∑G1:t−1P(G1:t−1)[∑GtP(Gt∣G1:t−1)log⁡P(Gt∣G1:t−1)Q(G~t∣G~1:t−1)]=DKL(PG1 ∥ QG~1)+∑t=2TDKL(PGt∣G1:t−1 ∥ QG~t∣G~1:t−1).(27)\begin{aligned} D_{\mathrm{KL}}\left(\mathbb{P}_{G^{1:T}} \,\middle\|\, \mathbb{Q}_{\widetilde{G}^{1:T}}\right) &= \sum_{G^{1:T}} \mathbb{P}_{G^{1:T}} \log\frac{\mathbb{P}_{G^{1:T}}}{\mathbb{Q}(\widetilde{G}^{1:T})} \\ &= \sum_{G^{1:T}} \mathbb{P}_{G^{1:T}} \log\frac{\mathbb{P}(G^1)}{\mathbb{Q}(\widetilde{G}^1)} + \sum_{G^{1:T}} \mathbb{P}_{G^{1:T}} \log\frac{\prod_{t=2}^{T} \mathbb{P}(G^t \mid G^{1:t-1})}{\prod_{t=2}^{T} \mathbb{Q}(\widetilde{G}^t \mid\widetilde{G}^{1:t-1})} \\ &= \sum_{G^1} \mathbb{P}(G^1) \log\frac{\mathbb{P}(G^1)}{\mathbb{Q}(\widetilde{G}^1)} + \sum_{t=2}^{T} \sum_{G^{1:t-1}} \mathbb{P}(G^{1:t-1}) \left[\sum_{G^t} \mathbb{P}(G^t \mid G^{1:t-1}) \log\frac{\mathbb{P}(G^t \mid G^{1:t-1})}{\mathbb{Q}(\widetilde{G}^t \mid\widetilde{G}^{1:t-1})}\right] \\ &= D_{\mathrm{KL}}\left(\mathbb{P}_{G^1} \,\middle\|\, \mathbb{Q}_{\widetilde{G}^1}\right) + \sum_{t=2}^{T} D_{\mathrm{KL}}\left(\mathbb{P}_{G^t \mid G^{1:t-1}} \,\middle\|\, \mathbb{Q}_{\widetilde{G}^t \mid\widetilde{G}^{1:t-1}}\right). \tag*{(27)} \end{aligned}

Under the assumption of temporal independence, i.e., PG1:T=∏t=1TPGt\mathbb{P}_{G^{1:T}} = \prod_{t=1}^{T} \mathbb{P}_{G^t} and QG~1:T=∏t=1TQG~t\mathbb{Q}_{\widetilde{G}^{1:T}} = \prod_{t=1}^{T} \mathbb{Q}_{\widetilde{G}^t}, each conditional distribution PGt∣G1:t−1\mathbb{P}_{G^t \mid G^{1:t-1}} reduces to the marginal PGt\mathbb{P}_{G^t}, and likewise for Q\mathbb{Q}. As a result, the sum of conditional KL terms collapses to ∑t=2TDKL(PGt ∥ QG~t)\sum_{t=2}^{T} D_{\mathrm{KL}}(\mathbb{P}_{G^t} \,\|\, \mathbb{Q}_{\widetilde{G}^t}). Hence the joint KL over the graph–memory divergence collapses to:

DKL(PG1:T ∥ QG~1:T)=∑t=1TDKL(PGt ∥ QG~t).(28)D_{\mathrm{KL}}\left(\mathbb{P}_{G^{1:T}} \,\middle\|\, \mathbb{Q}_{\widetilde{G}^{1:T}}\right) = \sum_{t=1}^{T} D_{\mathrm{KL}}\left(\mathbb{P}_{G^t} \,\middle\|\, \mathbb{Q}_{\widetilde{G}^t}\right). \tag*{(28)}

Conversely, if the equality between the joint KL and the sum of marginal KLs holds, then by the chain-rule expansion above, every conditional KL term DKL(PGt∣G1:t−1 ∥ QG~t∣G~1:t−1)D_{\mathrm{KL}}(\mathbb{P}_{G^t \mid G^{1:t-1}} \,\|\, \mathbb{Q}_{\widetilde{G}^t \mid\widetilde{G}^{1:t-1}}) must equal DKL(PGt ∥ QG~t)D_{\mathrm{KL}}(\mathbb{P}_{G^t} \,\|\, \mathbb{Q}_{\widetilde{G}^t}) for all tt. By the strict convexity of KL divergence, this forces PGt∣G1:t−1=PGt\mathbb{P}_{G^t \mid G^{1:t-1}} = \mathbb{P}_{G^t} and QG~t∣G~1:t−1=QG~t\mathbb{Q}_{\widetilde{G}^t \mid\widetilde{G}^{1:t-1}} = \mathbb{Q}_{\widetilde{G}^t} almost surely, i.e., temporal independence. □

Remark. Proposition C.3 is a biconditional: it characterizes precisely when summing per-domain KL divergences equals the joint KL divergence, namely when and only when the domains (and their crystallized memories) are independent. Aligning the marginal distributions of individual graphs G(t)G^{(t)} is therefore sufficient to ensure joint distribution alignment over the given sequence of test samples if and only if the memories are independent. Since real test-time domains are generally correlated under continual drift, this implies that aligning marginal distributions alone is insufficient, motivating us to model the relationships among continuously arriving test samples under covariate shift through the state evolving field over crystallized memories.

Proof of Error Upper Bounds

Definition C.4 (Classification error). The classification error of the function h^\hat{h} under domain Di\mathcal{D}_i is defined as

ϵi(h^)=EX∼Di∣h^(X)−h(X)∣.(29)\epsilon_i(\hat{h}) = \mathbb{E}_{X \sim\mathcal{D}_i}\left|\hat{h}(X) - h(X)\right|. \tag*{(29)}

For binary classification functions hh and h^\hat{h}, we have:

ϵi(h^)=ϵi(h^,h)=EX∼Di∣h^(X)−h(X)∣=PX∼Di(h^(X)≠h(X)).(30)\begin{aligned} \epsilon_i(\hat{h}) &= \epsilon_i(\hat{h}, h) = \mathbb{E}_{X \sim\mathcal{D}_i}\left|\hat{h}(X) - h(X)\right| \\ &= \mathbb{P}_{X \sim\mathcal{D}_i}\left(\hat{h}(X) \ne h(X)\right). \tag*{(30)} \end{aligned}

Definition C.5 (H\mathcal{H}-divergence). Given two induced domain feature space distributions D~s\widetilde{\mathcal{D}}_s, D~t\widetilde{\mathcal{D}}_t and a hypothesis space H\mathcal{H}, the H\mathcal{H}-divergence between D~s\widetilde{\mathcal{D}}_s and D~t\widetilde{\mathcal{D}}_t is defined as:

dH(D~s,D~t)=2sup⁡h∈H∣EX∼D~s[h(X)=1]−EX∼D~t[h(X)=1]∣.(31)d_{\mathcal{H}}(\widetilde{\mathcal{D}}_s,\widetilde{\mathcal{D}}_t) = 2 \sup_{h \in\mathcal{H}} \left|\mathbb{E}_{X \sim\widetilde{\mathcal{D}}_s}[h(X)=1] - \mathbb{E}_{X \sim\widetilde{\mathcal{D}}_t}[h(X)=1]\right|. \tag*{(31)}

Setting for the bounds. We adopt the standard domain-adaptation framework [52] as the analytical setting, whose bounds are applied to each single adaptation step, where PS\mathbb{P}_{S} refers to the source distribution from which Θ0\Theta_{0} is pre-trained and PT\mathbb{P}_{T} refers to the empirical distribution of the current target graph GtG^{t}. The bounds therefore characterize per-step generalization behavior; the continual aspect across {Gt}t=1T\{G^{t}\}_{t=1}^{T} is handled separately through the state-evolving design in Theorem 3.6 and the stability bound in Proposition 3.7, which together control how predictive behavior on past memories evolves as Θt−1→Θt\Theta_{t-1} \to\Theta_{t}.

Lemma C.6 (Error Upper Bound for Domain Shift [52]). Let P~S\widetilde{\mathbb{P}}_{S} and P~T\widetilde{\mathbb{P}}_{T} denote the induced distributions over the feature space for PS\mathbb{P}_{S} and PT\mathbb{P}_{T}. The following inequality holds for the risk ϵ0T(h^)\epsilon_{0}^{T}(\hat{h}) with single step adaptation on the target domain PT\mathbb{P}_{T}:

ϵ0T(h^)≤min⁡{ϵS(hS,hT),ϵT(hS,hT)}+ϵS(h^)+dH(P~S,P~T),(32)\epsilon_{0}^{T}(\hat{h}) \le\min\{\epsilon^{S}(h^{S},h^{T}),\epsilon^{T}(h^{S},h^{T})\}+\epsilon^{S}(\hat{h})+d_{\mathcal{H}}(\widetilde{\mathbb{P}}_{S},\widetilde{\mathbb{P}}_{T}), \tag*{(32)}

where dHd_{\mathcal{H}} is the H\mathcal{H}-divergence.

Remark. Note that this bound was first derived by [52]. The first term measures the disagreement between the source and target labeling functions, the second term is the source error, and the third term quantifies the discrepancy between the marginal feature distributions. The bound identifies three key factors for successful domain adaptation: small source risk, close marginal distributions, and consistent labeling functions across domains.

Lemma C.7. Let P~S\widetilde{\mathbb{P}}_{S} and P~T\widetilde{\mathbb{P}}_{T} denote the induced distributions over the feature space for PS\mathbb{P}_{S} and PT\mathbb{P}_{T}. Then for any hS∈H,hT∈Hh^{S} \in\mathcal{H}, h^{T} \in\mathcal{H}, we have

∣ϵS(hS,hT)−ϵT(hS,hT)∣≤dH(P~S,P~T).(33)\left|\epsilon^{S}(h^{S},h^{T})-\epsilon^{T}(h^{S},h^{T})\right| \le d_{\mathcal{H}}(\widetilde{\mathbb{P}}_{S},\widetilde{\mathbb{P}}_{T}). \tag*{(33)}

Proof. By definition, for any hS∈H,hT∈Hh^{S} \in\mathcal{H}, h^{T} \in\mathcal{H}, we have:

∣ϵS(hS,hT)−ϵT(hS,hT)∣=sup⁡h∈H∣EX∼PS[∣hS(X)−hT(X)∣]−EX∼PT[∣hS(X)−hT(X)∣]∣=sup⁡h∈H∣EX∼PS[hS(X)−hT(X)]−EX∼PT[hS(X)−hT(X)]∣.(34)\begin{aligned} \left|\epsilon^{S}(h^{S},h^{T})-\epsilon^{T}(h^{S},h^{T})\right| \\ &= \sup_{h\in\mathcal{H}}\left|\mathbb{E}_{X\sim\mathbb{P}_{S}}\left[|h^{S}(X)-h^{T}(X)|\right]-\mathbb{E}_{X\sim\mathbb{P}_{T}}\left[|h^{S}(X)-h^{T}(X)|\right]\right| \\ &= \sup_{h\in\mathcal{H}}\left|\mathbb{E}_{X\sim\mathbb{P}_{S}}\left[h^{S}(X)-h^{T}(X)\right]-\mathbb{E}_{X\sim\mathbb{P}_{T}}\left[h^{S}(X)-h^{T}(X)\right]\right|. \tag*{(34)} \end{aligned}

Since ∥⋅∥∞≤1\|\cdot\|_{\infty}\le1 for all h∈Hh\in\mathcal{H}, we have 0≤∣hS(X)−hT(X)∣≤10\le|h^{S}(X)-h^{T}(X)|\le1 for all X∈PS/PTX\in\mathbb{P}_{S}/\mathbb{P}_{T}. Define a hypothesis space H^:={sgn⁡(∣hS(X)−hT(X)∣−z)∣hS,hT∈H,0≤z≤1}\widehat{\mathcal{H}}:=\{\operatorname{sgn}(|h^{S}(X)-h^{T}(X)|-z)\mid h^{S},h^{T}\in\mathcal{H},0\le z\le1\}. Then we use Fubini’s theorem to bound:

∣EX∼PS[∣hS(X)−hT(X)∣]−EX∼PT[∣hS(X)−hT(X)∣]∣=∣∫01(Pr⁡S(∣hS−hT∣>z)−Pr⁡T(∣hS−hT∣>z)) dz∣≤∫01∣Pr⁡S(∣hS−hT∣>z)−Pr⁡T(∣hS−hT∣>z)∣ dz=sup⁡z∈[0,1]∣Pr⁡S(∣hS−hT∣>z)−Pr⁡T(∣hS−hT∣>z)∣.(35)\begin{aligned} \left|\mathbb{E}_{X\sim\mathbb{P}_{S}}\left[|h^{S}(X)-h^{T}(X)|\right]-\mathbb{E}_{X\sim\mathbb{P}_{T}}\left[|h^{S}(X)-h^{T}(X)|\right]\right| \\ &=\left|\int_{0}^{1}\left(\Pr^{S}(|h^{S}-h^{T}|>z)-\Pr^{T}(|h^{S}-h^{T}|>z)\right)\,dz\right| \\ &\le\int_{0}^{1}\left|\Pr^{S}(|h^{S}-h^{T}|>z)-\Pr^{T}(|h^{S}-h^{T}|>z)\right|\,dz \\ &=\sup_{z\in[0,1]}\left|\Pr^{S}(|h^{S}-h^{T}|>z)-\Pr^{T}(|h^{S}-h^{T}|>z)\right|. \tag*{(35)} \end{aligned}

Combining Eq. (34) and (35), and in view of the definition of H\mathcal{H}-divergence:

sup⁡hS,hT∈Hsup⁡z∈[0,1]∣Pr⁡S(∣hS−hT∣>z)−Pr⁡T(∣hS−hT∣>z)∣=2sup⁡h^∈H^∣Pr⁡S(h^(X)=1)−Pr⁡T(h^(X)=1)∣=2sup⁡h^∈H^∣Pr⁡S(h^)−Pr⁡T(h^)∣=dH^(P~S,P~T)≤dH(P~S,P~T).(36)\begin{aligned} \sup_{h^{S},h^{T}\in\mathcal{H}}\sup_{z\in[0,1]}\left|\Pr^{S}(|h^{S}-h^{T}|>z)-\Pr^{T}(|h^{S}-h^{T}|>z)\right| \\ &=2\sup_{\hat{h}\in\widehat{\mathcal{H}}}\left|\Pr^{S}(\hat{h}(X)=1)-\Pr^{T}(\hat{h}(X)=1)\right| \\ &=2\sup_{\hat{h}\in\widehat{\mathcal{H}}}\left|\Pr^{S}(\hat{h})-\Pr^{T}(\hat{h})\right| \\ &=d_{\widehat{\mathcal{H}}}(\widetilde{\mathbb{P}}_{S},\widetilde{\mathbb{P}}_{T})\le d_{\mathcal{H}}(\widetilde{\mathbb{P}}_{S},\widetilde{\mathbb{P}}_{T}). \tag*{(36)} \end{aligned}

Theorem C.8 (Error Upper Bound with Crystallized Memories). Let P~S\widetilde{P}_S and P~T\widetilde{P}_T denote the induced distributions over the feature space for PSP_S and PTP_T. The risk ϵT(h^)\epsilon^T(\hat{h}) with crystallized memories (with mixed weight w0+w1=1w_0 + w_1 = 1, w0≥0w_0 \ge0, w1≥0w_1 \ge0, and h^=w0h^S+w1h^T\hat{h} = w_0\hat{h}^S + w_1\hat{h}^T) is upper bounded by:

ϵT(h^)≤ϵT(h^,hS)+ϵT(hS,hT).(37)\epsilon^T(\hat{h}) \le\epsilon^T(\hat{h}, h^S) + \epsilon^T(h^S, h^T). \tag*{(37)}

Proof. The proof of the above theorem is as follows:

ϵT(h^)=ϵT(h^,hT)=Ex∼PT[∣h^(x)−hT(x)∣]=Ex∼PT[∣h^(x)−hS(x)+hS(x)−hT(x)∣]≤Ex∼PT[∣h^(x)−hS(x)∣]+Ex∼PT[∣hS(x)−hT(x)∣]=ϵT(h^,hS)+ϵT(hS,hT).(38)\begin{aligned} \epsilon^T(\hat{h}) &= \epsilon^T(\hat{h}, h^T) \\ &= \mathbb{E}_{x\sim P_T}[|\hat{h}(x)-h^T(x)|] \\ &= \mathbb{E}_{x\sim P_T}[|\hat{h}(x)-h^S(x)+h^S(x)-h^T(x)|] \\ &\le\mathbb{E}_{x\sim P_T}[|\hat{h}(x)-h^S(x)|] + \mathbb{E}_{x\sim P_T}[|h^S(x)-h^T(x)|] \\ &= \epsilon^T(\hat{h},h^S)+\epsilon^T(h^S,h^T). \tag*{(38)} \end{aligned}

Comparison of Error Upper Bounds. From Lemma C.6, our bound is further bounded by:

ϵT(h^)≤ϵT(h^,hS)+ϵT(hS,hT)≤ϵS(h^,hS)+dH(P~S,P~T)+ϵT(hS,hT)=ϵS(h^)+ϵT(hS,hT)+dH(P~S,P~T).(39)\begin{aligned} \epsilon^T(\hat{h}) &\le\epsilon^T(\hat{h},h^S)+\epsilon^T(h^S,h^T) \\ &\le\epsilon^S(\hat{h},h^S)+d_H(\widetilde{P}_S,\widetilde{P}_T)+\epsilon^T(h^S,h^T) \\ &= \epsilon^S(\hat{h})+\epsilon^T(h^S,h^T)+d_H(\widetilde{P}_S,\widetilde{P}_T). \tag*{(39)} \end{aligned}

We further introduce a density ratio Pr⁡T(x)Pr⁡S(x)\frac{\Pr^T(x)}{\Pr^S(x)} to represent the divergence between the source and target domains. Concretely, assume that Pr⁡T(x)/Pr⁡S(x)≤M\Pr^T(x)/\Pr^S(x) \le M for some finite constant MM on the support of PSP_S. This is a standard regularity condition in the domain-adaptation literature [52] and is automatically satisfied in our setting because PTP_T is the empirical distribution over a finite target graph GTG^T with Nt<∞N_t < \infty nodes, so the ratio is bounded by Nt⋅max⁡xPr⁡S(x)−1N_t \cdot\max_x \Pr^S(x)^{-1} on the support.

ϵT(h^)=∫∣h^(x)−hS(x)∣⋅Pr⁡T(x)dx+ϵT(hS,hT)=∫∣h^(x)−hS(x)∣⋅Pr⁡T(x)Pr⁡S(x)⋅Pr⁡S(x)dx+ϵT(hS,hT)=Ex∼PSPr⁡T(x)Pr⁡S(x)⋅∣h^(x)−hS(x)∣+ϵT(hS,hT)=Pr⁡T(x)Pr⁡S(x)ϵS(h^)+ϵT(hS,hT)=ϵS(h^)+ϵT(hS,hT),(40)\begin{aligned} \epsilon^T(\hat{h}) &= \int|\hat{h}(x)-h^S(x)|\cdot\Pr^T(x)dx+\epsilon^T(h^S,h^T) \\ &= \int|\hat{h}(x)-h^S(x)|\cdot\frac{\Pr^T(x)}{\Pr^S(x)}\cdot\Pr^S(x)dx+\epsilon^T(h^S,h^T) \\ &= \mathbb{E}_{x\sim P_S}\frac{\Pr^T(x)}{\Pr^S(x)}\cdot|\hat{h}(x)-h^S(x)|+\epsilon^T(h^S,h^T) \\ &= \frac{\Pr^T(x)}{\Pr^S(x)}\epsilon^S(\hat{h})+\epsilon^T(h^S,h^T) \\ &= \epsilon^S(\hat{h})+\epsilon^T(h^S,h^T), \tag*{(40)} \end{aligned}

where the density ratio Pr⁡T(x)Pr⁡S(x)\frac{\Pr^T(x)}{\Pr^S(x)} is generally unobservable and is commonly treated as a constant. The structural difference between Theorem C.8 and Lemma C.6 is the absence of the explicit HH-divergence penalty dH(P~S,P~T)d_H(\widetilde{P}_S,\widetilde{P}_T) in the prototype-based bound. To verify that this structural difference indeed yields a tighter bound, we examine both possible orderings of ϵS(hS,hT)\epsilon^S(h^S,h^T) and ϵT(hS,hT)\epsilon^T(h^S,h^T), since Lemma C.6 takes the minimum of these two terms.

Case 1: If ϵS(hS,hT)≤ϵT(hS,hT)\epsilon^S(h^S,h^T) \le\epsilon^T(h^S,h^T), then the direct adaptation bound from Lemma C.6 becomes:

ϵ0T(h^)≤ϵS(hS,hT)+ϵS(h^)+dH(P~S,P~T).(41)\epsilon^T_0(\hat{h}) \le\epsilon^S(h^S,h^T)+\epsilon^S(\hat{h})+d_H(\widetilde{P}_S,\widetilde{P}_T). \tag*{(41)}

Since ϵT(hS,hT)≤ϵS(hS,hT)+dH(P~S,P~T)\epsilon^T(h^S,h^T) \le\epsilon^S(h^S,h^T)+d_H(\widetilde{P}_S,\widetilde{P}_T), we obtain:

ϵT(h^)≤ϵS(h^)+ϵT(hS,hT)≤ϵS(hS,hT)+ϵS(h^)+dH(P~S,P~T)=ϵ0T(h^).(42)\begin{aligned} \epsilon^T(\hat{h}) &\le\epsilon^S(\hat{h})+\epsilon^T(h^S,h^T) \\ &\le\epsilon^S(h^S,h^T)+\epsilon^S(\hat{h})+d_H(\widetilde{P}_S,\widetilde{P}_T)=\epsilon^T_0(\hat{h}). \tag*{(42)} \end{aligned}

Case 2: If ϵS(hS,hT)≥ϵT(hS,hT)\epsilon^{S}(h^{S},h^{T}) \ge\epsilon^{T}(h^{S},h^{T}), then min⁡{⋅}=ϵT(hS,hT)\min\{\cdot\}=\epsilon^{T}(h^{S},h^{T}), and:

ϵT(h^)≤ϵS(h^)+ϵT(hS,hT)=ϵ0T(h^)−dH(P~S,P~T)≤ϵ0T(h^).(43)\epsilon^{T}(\hat{h}) \le\epsilon^{S}(\hat{h})+\epsilon^{T}(h^{S},h^{T})=\epsilon^{T}_{0}(\hat{h})-d_{\mathcal{H}}(\widetilde{P}_{S},\widetilde{P}_{T})\le\epsilon^{T}_{0}(\hat{h}). \tag*{(43)}

In both cases, the memory-based bound dominates ϵ0T(h^)\epsilon^{T}_{0}(\hat{h}) by exactly dH(P~S,P~T)≥0d_{\mathcal{H}}(\widetilde{P}_{S},\widetilde{P}_{T})\ge0. The fact that the same dominance margin holds under both orderings confirms that the improvement stems from the structural removal of dHd_{\mathcal{H}} in Theorem C.8, rather than from the choice of which term Lemma C.6 happens to minimize over.

Theorem C.9 (Continual Error Upper Bound with State-Evolving Memories). Let P~Gt−1\widetilde{P}_{G^{t-1}} and P~Gt\widetilde{P}_{G^{t}} denote the induced feature distributions of two consecutive target domains at steps t−1t-1 and tt. The risk ϵt(h^)\epsilon^{t}(\hat{h}) with state-evolving memories (with mixed weight wt−1+wt=1w_{t-1}+w_{t}=1, wt−1,wt≥0w_{t-1},w_{t}\ge0, and h^=wt−1h^t−1+wth^t\hat{h}=w_{t-1}\hat{h}^{t-1}+w_{t}\hat{h}^{t}) is upper bounded by:

ϵt(h^)≤ϵt(h,h^t−1)+ϵt(ht−1,ht).(44)\epsilon^{t}(\hat{h})\le\epsilon^{t}(h,\hat{h}^{t-1})+\epsilon^{t}(h^{t-1},h^{t}). \tag*{(44)}

Proof. By substituting TT with tt and SS with t−1t-1 in Theorem C.8, we obtain the following inequality, which holds throughout the continual adaptation process:

ϵt(h^)≤ϵt(h,h^t−1)+ϵt(ht−1,ht).(45)\epsilon^{t}(\hat{h})\le\epsilon^{t}(h,\hat{h}^{t-1})+\epsilon^{t}(h^{t-1},h^{t}). \tag*{(45)}

Comparison of Error Upper Bounds. Theorem C.9 can be regarded as a special case of Theorem C.8, where the tt-th domain serves as the initial target domain for adaptation. Therefore, the same ordering of error upper bounds holds, and the bound remains tighter than that of ϵ0T(h^)\epsilon^{T}_{0}(\hat{h}).

Remark. Lemma C.6 provides a generalization error bound for adaptation using samples from the target domain. Theorem C.8 gives the error bound when adapting a model from the source domain to the target domain with the help of crystallized memories. Theorem C.9 further refines this by providing the error bound when modeling inter-domain relations through state-evolving memories during continual adaptation. We arrive at the following conclusions:

  • From Theorem C.8, the error bound ϵT(h^)\epsilon^{T}(\hat{h}) using crystallized memories is tighter than the bound ϵ0T(h^)\epsilon^{T}_{0}(\hat{h}) for direct source-to-target adaptation, and the gap is at least dH(P~S,P~T)≥0d_{\mathcal{H}}(\widetilde{P}_{S},\widetilde{P}_{T})\ge0.

  • According to Theorem C.9, the error bound ϵt(h^)\epsilon^{t}(\hat{h}) using state-evolving memories is also tighter than ϵ0T(h^)\epsilon^{T}_{0}(\hat{h}) throughout continual adaptation.

Proof of Proposition 3.7

Proposition C.10 (Stability Bound of the Adaptation Loss). Consider the adaptation step from Θt−1\Theta_{t-1} to Θt\Theta_{t}. For each previously encountered domain indexed by (t)∈{1,…,t−1}(t)\in\{1,\ldots,t-1\}, DKL(G~^(t)∥G~(t))D_{\mathrm{KL}}(\widehat{\widetilde{G}}^{(t)}\Vert\widetilde{G}^{(t)}) can be interpreted as the divergence between the predictive distributions induced by the model before and after adaptation on the same crystallized memory G~(t)\widetilde{G}^{(t)}. Moreover, assume that: (i) the predictive distribution is given by a softmax with temperature τ>0\tau>0; (ii) all predicted class probabilities are lower-bounded by γ>0\gamma>0; and (iii) the encoder h(⋅)h(\cdot) and the classifier g(⋅)g(\cdot) are Lipschitz continuous with respect to the model parameters. Then the following upper bound holds:

DKL(G~^(t)∥G~(t))≤Lg2Lh24γτ2∥Θt−Θt−1∥22.(46)D_{\mathrm{KL}}\left(\widehat{\widetilde{G}}^{(t)}\middle\|\widetilde{G}^{(t)}\right)\le\frac{L_{g}^{2}L_{h}^{2}}{4\gamma\tau^{2}}\left\|\Theta_{t}-\Theta_{t-1}\right\|_{2}^{2}. \tag*{(46)}

where LhL_{h} and LgL_{g} are the parameter-space Lipschitz constants of h(⋅)h(\cdot) and g(⋅)g(\cdot).

Proof. We derive the stability bound step by step.

Step 1: Rewriting the KL divergence. For each (t)∈{1,…,t−1}(t)\in\{1,\ldots,t-1\}, define the predictive distributions on the crystallized memory G~(t)\widetilde{G}^{(t)} as

pt−1(t)(⋅)=Softmax⁡(g(h(G~(t);Θt−1))/τ),pt(t)(⋅)=Softmax⁡(g(h(G~(t);Θt))/τ).(47)p_{t-1}^{(t)}(\cdot)=\operatorname{Softmax}\left(g\left(h\left(\widetilde{G}^{(t)};\Theta_{t-1}\right)\right)/\tau\right),\quad p_{t}^{(t)}(\cdot)=\operatorname{Softmax}\left(g\left(h\left(\widetilde{G}^{(t)};\Theta_{t}\right)\right)/\tau\right). \tag*{(47)}

By definition, the KL divergence in Eq. (12) can be written as

DKL(G~^(t)∥G~(t))=DKL(pt−1(t)∥pt(t)).(48)D_{\mathrm{KL}}(\widehat{\widetilde{G}}^{(t)} \mathbin\Vert\widetilde{G}^{(t)}) = D_{\mathrm{KL}}\left(p_{t-1}^{(t)} \mathbin\Vert p_t^{(t)}\right). \tag*{(48)}

Step 2: Upper bounding KL divergence by probability differences. Using the inequality log⁡x≤x−1\log x \le x-1 and the assumption pt(t)(y)≥γp_t^{(t)}(y) \ge\gamma for all classes yy,

DKL(pt−1(t)∥pt(t))=∑ypt−1(t)(y)log⁡pt−1(t)(y)pt(t)(y)(49)D_{\mathrm{KL}}\left(p_{t-1}^{(t)} \mathbin\Vert p_t^{(t)}\right) = \sum_y p_{t-1}^{(t)}(y)\log\frac{p_{t-1}^{(t)}(y)}{p_t^{(t)}(y)} \tag*{(49)}
≤∑ypt−1(t)(y)(pt−1(t)(y)pt(t)(y)−1)≤1γ∥pt−1(t)−pt(t)∥22.(50)\le\sum_y p_{t-1}^{(t)}(y)\left(\frac{p_{t-1}^{(t)}(y)}{p_t^{(t)}(y)}-1\right) \le\frac{1}{\gamma}\left\|p_{t-1}^{(t)}-p_t^{(t)}\right\|_2^2. \tag*{(50)}

Step 3: Lipschitz continuity of the softmax operator. Let st−1(t)=g(h(G~(t);Θt−1))s_{t-1}^{(t)}=g(h(\widetilde{G}^{(t)};\boldsymbol{\Theta}_{t-1})) and st(t)=g(h(G~(t);Θt))s_t^{(t)}=g(h(\widetilde{G}^{(t)};\boldsymbol{\Theta}_t)) denote the corresponding logits. The softmax operator with temperature τ\tau is 1/(2τ)1/(2\tau)-Lipschitz, yielding

∥pt−1(t)−pt(t)∥2≤12τ∥st−1(t)−st(t)∥2.(51)\left\|p_{t-1}^{(t)}-p_t^{(t)}\right\|_2 \le\frac{1}{2\tau}\left\|s_{t-1}^{(t)}-s_t^{(t)}\right\|_2. \tag*{(51)}

Step 4: Lipschitz chain with respect to model parameters. By the parameter-space Lipschitz continuity of g(⋅)g(\cdot) and h(⋅)h(\cdot),

∥st−1(t)−st(t)∥2≤LgLh∥Θt−1−Θt∥2.(52)\left\|s_{t-1}^{(t)}-s_t^{(t)}\right\|_2 \le L_gL_h\left\|\boldsymbol{\Theta}_{t-1}-\boldsymbol{\Theta}_t\right\|_2. \tag*{(52)}

Step 5: Combining all bounds. Substituting the above inequalities yields

DKL(G~^(t)∥G~(t))≤Lg2Lh24γτ2∥Θt−Θt−1∥22,(53)D_{\mathrm{KL}}(\widehat{\widetilde{G}}^{(t)}\mathbin\Vert\widetilde{G}^{(t)}) \le\frac{L_g^2L_h^2}{4\gamma\tau^2}\left\|\boldsymbol{\Theta}_t-\boldsymbol{\Theta}_{t-1}\right\|_2^2, \tag*{(53)}

which completes the proof. □

Remark on the Lipschitz Assumption. Assumption (iii) is parameter-space Lipschitz continuity, namely that the network output changes smoothly as the parameters Θ\boldsymbol{\Theta} vary for a fixed input. This is fundamentally different from input-space Lipschitz continuity (which would require explicit spectral normalization). For any bounded-weight network, the parameter-space sensitivity satisfies ∥∂h/∂Θ∥≤∏ℓ=1Q∥Wℓ∥2⋅∥x∥\left\|\partial h/\partial\boldsymbol{\Theta}\right\| \le\prod_{\ell=1}^{Q}\left\|W^\ell\right\|_2\cdot\left\|x\right\|, which is finite on compact inputs and is directly bounded by weight decay through ∥Wℓ∥2≤∥Wℓ∥F\left\|W^\ell\right\|_2 \le\left\|W^\ell\right\|_F [1, 27]. Therefore, standard backbones such as GCN and GraphSAGE satisfy Assumption (iii) under the weight decay used in our experiments, without any additional spectral normalization. Importantly, the proposition does not require LhLgL_hL_g to be tight: it only asserts that small parameter updates lead to small predictive shifts on stored memories, which is sufficient to justify the KL regularization in Eq. (12) as an anti-forgetting mechanism.

Interpretation of the Two Loss Terms. Proposition C.10 provides an explicit interpretation of the adaptation loss in Eq. (12) and clarifies how the two components in the overall objective serve complementary purposes during adaptation.

  • Adaptation to the current domain. The entropy minimization term H(Gt)H(G^t) encourages confident predictions on the current test graph. By reducing predictive uncertainty on GtG^t, this term drives the model to better align with the data distribution of the newly arriving domain. This component focuses exclusively on the current domain.

  • Stability on previously encountered domains. The KL divergence term DKL(G~^(t)∥G~(t))D_{\mathrm{KL}}(\widehat{\widetilde{G}}^{(t)}\mathbin\Vert\widetilde{G}^{(t)}) does not compare different domains. Instead, for each previously stored memory G~(t)\widetilde{G}^{(t)}, it constrains the change in predictive distributions induced by updating the model from Θt−1\boldsymbol{\Theta}_{t-1} to Θt\boldsymbol{\Theta}_t. By Proposition C.10, this divergence admits an explicit quadratic upper bound with respect to the parameter update magnitude, implying that small updates lead to bounded changes in predictive behavior on past domains.

  • Mitigating catastrophic forgetting through controlled transfer. Together, the two terms balance adaptation and stability: entropy minimization promotes rapid adaptation to the current domain, while the KL regularization prevents excessive drift on previously encountered domains. The adaptation loss can thus be viewed as a mechanism that regulates cross-domain knowledge transfer during continual adaptation.

Overall, Proposition C.10 formalizes the intuition that test-time adaptation under non-stationary drift should not only fit the current domain but also preserve predictive consistency on past domains.

Additional Experiments

Dataset Description

We evaluate EMC on four benchmark node classification datasets, encompassing two distinct types of distribution shifts: regional shifts and temporal shifts. This setting follows the continual adaptation protocol in [31], where each graph is treated as an individual domain. The statistical summary of all datasets is provided in Table 6.

CategoryDatasets#Nodes#Edges#Domains
Regional ShiftsTwitch-explicit1,912 - 9,49831,299 - 153,1387
Regional ShiftsFacebook-100769 - 41,55433,312 - 2,724,45812
Temporal ShiftsElliptic1,089 - 7,8801,168 - 9,16441
Temporal ShiftsOGB-Arxiv4,427 - 39,7111,225 - 38,73511

Table 6. The statistics of datasets with distribution shifts.

Regional Shifts. Facebook-100 [35] contains 100 ego-centric Facebook friendship networks collected from U.S. universities in 2005. Each network represents a unique university and varies significantly in node count, density, and degree distribution. We select three university graphs (Amherst41, Caltech36, and Johns Hopkins55) for initial training, and perform continual adaptation on eleven other university graphs without labels, following the protocol in [44]. Twitch-Explicit [33] includes seven social graphs of Twitch users from different regions (DE, ENGB, ES, FR, PTBR, RU, TW). Each graph contains users as nodes and friendship relations as edges. The DE network is used for pretraining, and the remaining regional graphs are used for continual test-time adaptation, also without labels.

Temporal Shifts. OGB-Arxiv [16] is a citation network of Arxiv CS papers across 40 research areas. Nodes represent papers, and edges indicate citation links. We pretrain the model on papers published before 2011 and adapt it sequentially to papers published from 2011 onward, capturing the temporal evolution of scientific collaborations. Elliptic [30] consists of 49 graph snapshots of Bitcoin transaction networks. Nodes represent transactions, and edges denote payment flows. Approximately 20% of nodes are labeled as licit or illicit. To avoid extreme class imbalance, we use snapshots 7–9 for pretraining and adapt the model continually using the remaining graphs, reflecting the temporal dynamics of illicit activity detection.

Across all datasets, we follow a consistent strategy: pretrain a GNN on a small set of labeled graphs, then continually adapt to the remaining unlabeled graphs in a test-time online setting. To simplify notation in our tables and figures, we refer to Twitch-Explicit as Twitch, Facebook-100 as Facebook, and OGB-Arxiv as Arxiv.

Baseline Details

We compare EMC against ten representative baseline methods. The “Base Model” refers to the GNN pre-trained on source domains and directly applied to target domains without any adaptation, serving as a lower-bound reference. These methods are grouped into two main categories: (1) one-step test-time adaptation methods and (2) continual test-time adaptation methods. To ensure fair comparison, all non-graph-specific methods are adapted to GNN-based architectures.

  • One-step test-time adaptation methods perform adaptation using only the current domain without memory or explicit long-term modeling. DANN [9] is a classical domain adaptation approach that minimizes domain discrepancy via adversarial training using source and target data. Tent [36] @$?

minimizes the entropy of predictions on unlabeled target samples to adapt the model. BN Stats Adapt [20] updates network weights and batch normalization statistics based on the current test batch. EERM [44], designed specifically for graphs, maximizes environment risk variance to address domain shift and out-of-distribution challenges. GTRANS [17] refines both graph structures and node features using a contrastive surrogate loss to improve test-time performance.

  • Continual test-time adaptation methods aim to maintain performance under sequential distribution shifts. CoTTA [38] combines weight-averaged predictions and stochastic neuron restoration to mitigate error accumulation and catastrophic forgetting. EATA [28] improves adaptation efficiency through entropy-based updates and a Fisher-based regularizer for stability. GCAL [31] enhances cross-domain adaptation by training an auxiliary VGAE to generate memory graphs, but its reliance on a separately trained generator limits scalability in long-term scenarios. STEM [25] introduces a controller-worker architecture to dynamically generate adapter parameters for a frozen base GNN.

Experimental Setting

In this work, we are the first to investigate the generalizability and adaptability of graph models under non-stationary distribution shifts at test time, while also addressing the challenge of catastrophic forgetting.

We distinguish between two key concepts: generalizability and adaptability. Generalizability refers to the model’s inherent ability to perform well on previously seen domains, even while being adapted to new domains. This emphasizes the model’s capacity to retain knowledge throughout the continual adaptation process. In contrast, adaptability reflects how effectively a model can enhance its performance on a newly encountered domain through test-time optimization using unlabeled data. In other words, generalizability focuses on performance retention, while adaptability emphasizes performance gain under novel domain shifts. Figure 10 provides a visual comparison of these two metrics, with exact formulations introduced below.

Figure 10. An example of the performance matrix. For the current tt-th domain: TDG is computed as the mean of the green elements; TDA is the mean of the pink elements; AP is the average of the elements in the last row; AF is the average of the differences between each element in the last row (excluding the last one) and the corresponding element in the previous row.

For our experimental configuration, we use a 2-layer GCN as the backbone for three datasets, except for OGB-Arxiv where we adopt GraphSAGE [10]. For pretraining, we split the source graphs into 60% training, 20% validation, and 20% testing. The pretraining phase uses a learning rate of 1e−041\mathrm{e}{-04} and a weight decay of 5e−045\mathrm{e}{-04}. During adaptation, the learning rate is set to 1e−031\mathrm{e}{-03} with the same weight decay. Pretraining lasts for 100–200 epochs depending on the dataset, while adaptation uses 1–10 epochs per domain. All hyperparameter choices follow the protocol of GCAL [31]. The number of nodes in each crystallized memory Nt′N'_t is set to 1% of the total number of nodes in the input graph. We analyze the sensitivity of hyperparameters α\alpha and β\beta in the main paper, with extended analyses on τ\tau and the memory size factor λ\lambda in Section D.12. The convex-combination weights wt−1,wtw_{t-1}, w_t are fixed hyperparameters satisfying wt−1+wt=1w_{t-1} + w_t = 1 and selected by grid search over wt∈{0.3,0.5,0.7,0.9}w_t \in\{0.3, 0.5, 0.7, 0.9\}. All results are averaged over five independent runs, with standard deviations reported.

To measure continual adaptation performance, we construct a performance matrix M∈RT×TM \in\mathbb{R}^{T \times T}, where Mi,jM_{i,j} (for i≥ji \ge j) represents the model’s performance on domain jj after training on domain ii. Following [17, 44], we use ROC-AUC for Twitch-Explicit, Accuracy for Facebook-100 and OGB-Arxiv, and F1 Score for Elliptic. We report the following metrics derived from MM:

  • Average Performance (AP): AP =1T∑i=1TMT,i= \frac{1}{T}\sum_{i=1}^{T} M_{T,i}, reflecting the model’s overall adaptation ability after completing all domain shifts.

  • Average Forgetting (AF): AF =1T−1∑i=1T−1(MT,i−Mi,i)= \frac{1}{T-1}\sum_{i=1}^{T-1}(M_{T,i}-M_{i,i}), quantifying the degradation in performance on past domains.

  • Target Domain Generalization (TDG) [21]: TDG =1T−1∑i=2TMi−1,i= \frac{1}{T-1}\sum_{i=2}^{T} M_{i-1,i}, measuring model generalization to unseen domains before adaptation.

  • Target Domain Adaptation (TDA) [21]: TDA =1T∑i=1TMi,i= \frac{1}{T}\sum_{i=1}^{T} M_{i,i}, measuring performance on each domain after adaptation.

Configurations

We conduct the experiments with:

  • Operating System: Ubuntu 20.04 LTS.

  • CPU: Intel(R) Xeon(R) Gold 6240 CPU @ 2.60GHz, 256GB RAM.

  • GPU: Tesla V100 PCIe 32GB GPU.

  • Software: Python 3.7, Pytorch 1.8, CUDA 11.0, and Pytorch-Geometric 2.0.1.

Performance Comparison under the GCAL Setting

We provide the complete comparison summarized in § 4.2 between EMC and the 10 representative baselines under the GCAL setting in Table 2. We use GCN as the backbone on Twitch-explicit, Facebook-100, and Elliptic, and GraphSAGE on OGB-Arxiv. The baselines span both one-step test-time adaptation (DANN, Norm, Tent, EERM, GTrans, LEBED) and continual test-time adaptation (CoTTA, EATA, GCAL, STEM). For STEM, we report results reproduced from the official codebase, which only supports Twitch-explicit and OGB-Arxiv, and the remaining two datasets are therefore marked as Not Applicable.

Results show that EMC achieves the best AP on three of the four datasets (Facebook-100, Elliptic, OGB-Arxiv) and the best AF on all four. On Twitch-explicit, STEM attains a slightly higher AP but exhibits a negative AF, indicating that its gain on the latest domain comes at the cost of forgetting earlier ones. By contrast, EMC consistently maintains a positive AF across all datasets, confirming that the closed-form memory crystallization and state-evolving design jointly support adaptability without sacrificing knowledge retention.

Extended Performance Comparison across Node- and Graph-level Tasks

To further situate EMC against the very recent state-of-the-art STEM [25], we extend the comparison to four datasets covering both node-level adaptation (Twitch-explicit, OGB-Arxiv) and graph-level adaptation (Mutagenicity, FRANKENSTEIN), evaluated under two backbones (GCN and GraphSAGE). We compare EMC against the recent strong baselines GCAL [31] and STEM [25]. Results are reported in Table 7, where “Avg.” denotes the mean of TDG and TDA and serves as a balanced summary of pre- and post-adaptation behavior.

Table 7: Performance comparison (%, mean ±\pm standard deviation for five runs) across node-level (Twitch-explicit, OGB-Arxiv) and graph-level (Mutagenicity, FRANKENSTEIN) datasets under continual distribution shifts. “Avg.” is computed uniformly as the mean of TDG and TDA. “↑\uparrow” indicates higher is better and “↓\downarrow” indicates lower is better. The best results are highlighted in bold and the runner-ups are _underlined_.

DatasetMethodsAP (↑\uparrow)AF (↑\uparrow)TDG (↑\uparrow)TDA (↑\uparrow)Avg. (↑\uparrow)GPU (↓\downarrow)AP (↑\uparrow)AF (↑\uparrow)TDG (↑\uparrow)TDA (↑\uparrow)Avg. (↑\uparrow)GPU (↓\downarrow)
Backbone: GCNBackbone: SAGE
Node-level Adaptation
Twitch-explicitGCAL55.65±\pm0.090.42±\pm0.1354.78±\pm0.6053.20±\pm0.6253.9911159.8058.20±\pm0.350.79±\pm0.1359.65±\pm0.3957.02±\pm0.4958.348580.63
Twitch-explicitSTEM56.66±\pm0.05-0.07±\pm0.1757.35±\pm0.0755.87±\pm0.1556.617393.2759.49±\pm0.06-0.45±\pm0.0263.56±\pm0.0156.33±\pm0.0559.957961.84
Twitch-explicitEMC55.95±\pm0.150.47±\pm0.0855.56±\pm0.1355.83±\pm0.1455.70854.9761.62±\pm0.120.86±\pm0.0462.02±\pm0.1360.36±\pm0.1661.192833.18
OGB-ArxivGCAL14.15±\pm6.94-1.80±\pm2.0617.90±\pm8.5813.77±\pm5.5715.8322342.4745.22±\pm0.170.76±\pm0.0542.40±\pm7.7441.80±\pm6.5942.1022365.84
OGB-ArxivSTEM10.25±\pm0.01-2.79±\pm0.0112.75±\pm0.0110.56±\pm0.0111.667010.7431.71±\pm0.14-4.40±\pm0.1934.19±\pm0.2532.77±\pm0.1833.487012.99
OGB-ArxivEMC19.32±\pm1.573.38±\pm1.9919.39±\pm1.4720.39±\pm1.7119.89299.1846.07±\pm1.700.99±\pm0.6647.11±\pm1.8043.52±\pm1.2545.31391.02
Graph-level Adaptation
MutagenicityGCAL67.96±\pm0.10-1.55±\pm0.1467.59±\pm0.0669.13±\pm0.0468.363805.5065.49±\pm0.78-0.70±\pm0.5464.22±\pm0.6366.19±\pm0.3365.201221.09
MutagenicitySTEM64.48±\pm0.26-1.60±\pm0.2266.73±\pm0.1164.72±\pm0.1365.7210361.7967.58±\pm0.71-3.92±\pm0.7770.42±\pm0.5070.33±\pm0.1570.3810357.06
MutagenicityEMC68.40±\pm1.66-0.85±\pm0.6169.94±\pm0.8169.71±\pm1.2269.8285.1467.15±\pm0.25-0.66±\pm0.0766.34±\pm0.0766.68±\pm0.2166.51111.61
FRANKENSTEINGCAL59.26±\pm0.66-0.22±\pm0.2159.53±\pm0.3359.32±\pm0.5259.424950.3858.34±\pm0.700.40±\pm0.6456.87±\pm0.4657.44±\pm0.1757.162085.58
FRANKENSTEINSTEM61.61±\pm0.411.41±\pm0.2560.61±\pm0.3859.81±\pm0.2160.218322.3554.36±\pm0.33-0.96±\pm0.8653.91±\pm0.6754.15±\pm0.5954.0310461.86
FRANKENSTEINEMC61.86±\pm0.67-0.45±\pm0.1561.25±\pm0.1561.11±\pm0.7561.18201.6556.42±\pm0.10-0.43±\pm0.0853.80±\pm0.1355.38±\pm0.0554.59222.39

Table 7.

Effectiveness across node-level and graph-level tasks. EMC attains the best Avg. on five out of eight (dataset, backbone) combinations and the runner-up on the remaining three, demonstrating consistent effectiveness beyond the node-level setting that the prior literature on graph continual test-time adaptation has primarily focused on. The pattern of best results also covers both task granularities: EMC leads on three of four node-level entries and on two of four graph-level entries, indicating that the closed-form memory crystallization transfers naturally from node-level to graph-level adaptation without any task-specific modification. We further note that EMC consistently achieves the best AF in most settings, confirming that the state-evolving design effectively mitigates forgetting under continual drift, whereas STEM’s stronger adaptation on certain domains is often accompanied by a negative AF (e.g., -3.92 on Mutagenicity-GraphSAGE, -4.40 on Arxiv-GraphSAGE), reflecting a less favorable retention–adaptation trade-off.

Substantial Efficiency Advantage. The most pronounced gap appears in GPU memory consumption, where the closed-form construction in EMC removes the need for any auxiliary trainable component at test time. On node-level tasks, EMC is roughly an order of magnitude more memory-efficient than STEM and over an order of magnitude lighter than GCAL. The advantage widens on graph-level tasks, where EMC operates within a few hundred MiB while STEM exceeds ten thousand MiB on both Mutagenicity and FRANKENSTEIN, a difference of two orders of magnitude. Such a gap is structural rather than incidental: STEM and GCAL both rely on auxiliary modules whose memory cost grows with graph size, whereas the closed-form memory in EMC is solved analytically over a fraction of the input nodes (▷ § 3.1), yielding a footprint that stays compact regardless of the underlying task granularity. These results confirm that EMC delivers competitive or superior effectiveness while remaining the most memory-efficient option among recent continual test-time adaptation methods, making it well-suited for prolonged adaptation under non-stationary shifts.

Additional Performance Matrices

We extend the performance-matrix visualization in Figure 4 of the main paper to the Twitch-Explicit and Elliptic datasets in Figure 11. Across both datasets, EMC maintains consistently strong performance across the diagonal and lower-triangular entries, indicating that the model not only adapts to each newly arriving domain but also retains its competence on previously encountered ones. In contrast, GCAL exhibits visibly degraded performance on earlier domains as adaptation proceeds, particularly on Elliptic, where the temporal drift can be abrupt.

Performance matrices of EMC and GCAL on different datasets

Figure 11. (a) GCAL on Twitch-explicit (b) EMC on Twitch-explicit (c) GCAL on Elliptic (d) EMC on Elliptic. Performance matrices of EMC and GCAL on different datasets.

We further note an observation on Facebook-100 in Figure 4: the performance of EMC on the 6th target domain is slightly lower than on neighboring domains. We attribute this to a larger covariate shift between this domain and the rest of the sequence, which makes single-pass adaptation under the test-time setting more challenging. Importantly, this localized dip does not propagate: the performance on subsequent domains recovers, and the overall AP and AF on Facebook-100 in Table 1 remain ahead of all baselines, confirming that EMC is robust to occasional outlier domains under continual drift.

Robustness to Different Domain-Shift Patterns

The state evolving field is a first-order linear interpolation, which prompts a natural question: does EMC remain effective when distribution shifts arrive in a non-monotonic or cyclic pattern? We note that Theorem 3.6 holds for any convex combination satisfying wt−1+wt=1w_{t-1} + w_t = 1, so the theoretical tightness does not depend on a stronger linearity assumption. Empirically, the memory at each step is reconstructed from the current domain rather than carried forward, the state evolving field interpolates only encoded representations of adjacent domains, and entropy minimization keeps the model calibrated regardless of the order of arrival.

We further verify this with two stress tests on Twitch-Explicit with GCN backbone: (i) varying the order of the six target domains to break monotonicity, and (ii) cyclic shifts where target domains repeat. Table 8 and Table 9 show that EMC outperforms GCAL across all orderings and cyclic patterns, with much lower runtime and GPU memory.

Domain OrderMethodAPAFTDGTDATime (s)GPU (MiB)
ENGB, ES, FR, PTBR, RU, TWGCAL55.650.4254.7853.20217.5111159.8
ENGB, ES, FR, PTBR, RU, TWEMC55.950.4755.5655.8374.64854.97
RU, FR, ES, ENGB, TW, PTBRGCAL53.580.1852.6753.32217.1112225.69
RU, FR, ES, ENGB, TW, PTBREMC57.040.3655.6957.4675.92832.58
FR, PTBR, TW, ENGB, RU, ESGCAL53.370.1252.4753.93216.3510304.73
FR, PTBR, TW, ENGB, RU, ESEMC57.120.4655.6858.2073.75648.62
FR, PTBR, ES, RU, TW, ENGBGCAL53.420.0252.6354.10217.5610677.54
FR, PTBR, ES, RU, TW, ENGBEMC56.970.3055.6758.3277.85830.88

Table 8. Robustness to non-monotonic domain orderings on Twitch-Explicit.

Domain SequenceMethodAPAFTDGTDATime (s)GPU (MiB)
ENGB, ES, FR, ENGB, ES, FRGCAL53.78-0.2153.2754.62209.0910116.01
ENGB, ES, FR, ENGB, ES, FREMC54.000.0653.3954.9456.67605.80
PTBR, RU, TW, PTBR, RU, TWGCAL52.84-0.0652.0354.04223.5414332.55
PTBR, RU, TW, PTBR, RU, TWEMC53.02-0.1752.6753.9695.79828.53
RU, FR, ES, RU, FR, ESGCAL52.110.0051.2552.56218.6312559.53
RU, FR, ES, RU, FR, ESEMC52.22-0.0651.3952.8077.21774.43
ENGB, TW, PTBR, ENGB, TW, PTBRGCAL54.800.0254.2454.54214.8010802.73
ENGB, TW, PTBR, ENGB, TW, PTBREMC54.610.2053.8455.0982.64768.01
ENGB, ES, FR, PTBR, RU, TW, ENGB, ES, FR, PTBR, RU, TWGCAL52.87-0.3552.7153.27444.1520293.89
ENGB, ES, FR, PTBR, RU, TW, ENGB, ES, FR, PTBR, RU, TWEMC53.160.0552.8453.54152.72785.17

Table 9. Robustness to cyclic domain shifts on Twitch-Explicit. Domains repeat to test stability under non-monotonic drift patterns.

Memory Construction Alternatives

To further verify that EMC’s efficiency advantage stems from both eliminating auxiliary generative training and producing informative memories, we compare against two simpler training-free memory schemes that replace GCAL’s VGAE: Random subgraph sampling and Feature averaging. As shown in Table 10, both alternatives achieve comparable cost to EMC but suffer substantial performance drops, with feature averaging falling below the base model. This confirms that the closed-form crystallization in EMC produces memories that are not only cheap but also semantically faithful.

MethodAP (↑)AF (↑)TDG (↑)Time (↓)GPU (↓)
Base Model53.88NANANANA
GCAL with VGAE55.650.4254.78217.5111159.8
Random subgraph sampling51.26-1.4551.3267.81800.96
Feature averaging52.91-0.8552.1965.56783.13
EMC55.950.4755.5674.64854.97

Table 10. Comparison with alternative training-free memory construction schemes on Twitch-Explicit with GCN backbone.

Additional Visualizations of Crystallized Memories

We complement the t-SNE projection in Figure 5 of the main paper with structural visualizations of the original graphs and their crystallized memories on the continuous-domain Twitch graphs, rendered with the NetworkX library from Figure 12 to Figure 22. To keep individual figures legible, the original graph is rendered after a fixed-rate node sampling, while the crystallized memory is rendered in full. Across the visualized domains, the structural layout of each crystallized memory closely traces that of its original graph, while the t-SNE projection in the main paper shows that the two also remain aligned in the embedding space. Together, the two views support the design intuition that memory crystallization captures the semantically informative content of each domain in a compact, training-free manner.

Figure 12. Structural visualization of the original graph and its crystallized memory on continuous-domain Twitch graphs with GCN backbone.

Figure 22. Structural visualization of the original graph and its crystallized memory on continuous-domain OGB-Arxiv graphs with GCN backbone (Part II).

Additional Scaling Efficiency Analysis

To evaluate the efficiency of EMC, we construct datasets by generating Erdős–Rényi graphs with varying node and domain scales, based on the size characteristics of existing datasets. In Figure 6 and Figure 7 of the main paper, we report the runtime and peak GPU memory usage under increasing node and domain scales, where a red cross indicates an Out-Of-Memory (OOM) failure. We provide detailed experimental settings below.

Node Scaling Analysis. For the node scaling analysis, we fix the number of target domains to 10 and gradually increase the number of nodes per graph from 1k to 40k. The node feature dimension is set to 1288, consistent with OGB-Arxiv. The numerical results are reported in Table 11. This experiment analyzes how the efficiency of EMC changes as each test sample increases in size. Specifically, when the number of nodes exceeds 40k, GCAL fails due to OOM, while EMC remains within GPU memory limits even at the largest tested scale.

MethodsMetric / #Node100020005000100001500020000250003000040000
GCALRuntime (s)25.413397.77391.87918.071694.24OOMOOMOOM
GCALGPU Memory (MiB)91.11304.421754.816892.9115472.6927462.27OOMOOMOOM
EMCRuntime (s)1.752.7225.89210.52407.95593.20792.001207.472213.20
EMCGPU Memory (MiB)20.7225.0642.281.02131.6200.07278.16366.92597.48

Table 11. Node scaling efficiency evaluation with runtime (s) and GPU memory usage (MiB).

Domain Scaling Analysis. For the domain scaling analysis, we set the initial number of target domains to 10, with each graph containing 10k nodes and 128-dimensional node features (again aligned with OGB-Arxiv). We then gradually increase the number of target domains by a scaling factor. Detailed results are shown in Table 12. Compared to GCAL, which runs out of memory when the number of target domains reaches 50 or more, EMC maintains stable runtime and GPU usage across all scales.

MethodsMetric / #Domain1×2×3×4×5×6×7×8×
GCALRuntime (s)430.041056.971713.342460.46OOMOOMOOMOOM
GPU Memory (MiB)6892.9114239.8321586.7528933.67OOMOOMOOMOOM
EMCRuntime (s)215.35431.27646.81863.621079.351296.111513.471730.93
GPU Memory (MiB)81.0285.9290.8095.71104.52118.21131.90145.59

Table 12. Domain scaling efficiency evaluation with runtime (s) and GPU memory usage (MiB).

We also benchmark the memory crystallization step alone on a single graph up to 200k nodes in Appendix § 9.2, confirming that the closed-form inversion remains under one second even at this scale and is therefore not the bottleneck of the pipeline.

Storage Cost of Crystallized Memories. We additionally report the storage cost of the crystallized memories as the stream length increases in Table 13. Although the storage cost of crystallized memories grows with the number of domains, it remains small in absolute size. EMC maintains a low GPU memory footprint as the stream grows, requiring only 145.59 MB with 80 domains, while the crystallized memories occupy 39.07 MB. In comparison, GCAL exhibits substantially higher memory growth and runs out of GPU memory when the number of domains reaches 50.

#Domain1020304050607080
GCAL GPU (MiB)6892.9114239.8321586.7528933.67OOMOOMOOMOOM
EMC GPU (MiB)81.0285.9290.8095.71104.52118.21131.90145.59
Crystallized Memory (MiB)4.889.7614.6519.5324.4129.3034.1839.07

Table 13. Scaling efficiency of GPU memory consumption and crystallized memory storage.

Figure 13. Structural visualization of the original graph and its crystallized memory on continuous-domain Elliptic graphs with GCN backbone (Part I).

Figure 14. Structural visualization of the original graph and its crystallized memory on continuous-domain Elliptic graphs with GCN backbone (Part II).

Discussion on Memory Budgeting. A natural strategy is to cap the buffer at KK memories and manage it as in agent-memory mechanisms, for example keeping the most recent ones in a first-in-first-out manner, retaining those most representative by similarity, or maintaining a weighted moving average of past memories. Because crystallization is a closed-form operation on node features, the oldest memories can also be merged and re-crystallized into a single memory at negligible cost, yielding constant storage, which is not available to generative replay without retraining the generator.

Additional Results of Parameter Study

We provide additional results on hyperparameter sensitivity in Figure 23 and Figure 24 to further support our analysis.

Sensitivity of hyperparameter alpha

Figure 23. The sensitivity of hyperparameter α\alpha.

Sensitivity of hyperparameter beta

Figure 24. The sensitivity of hyperparameter β\beta.

Sensitivity Analysis of τ\tau. We investigate the impact of τ\tau, the hyperparameter for graph sparsification, by varying it from 0.5 to 1.0. As shown in Figure 25, EMC exhibits robustness to a wide range of τ\tau values, while proper tuning is still beneficial for optimal performance.

Figure 25. The sensitivity of hyperparameter τ\tau.

Analysis of Memory Size. To study the influence of the memory size on model performance, we define the relationship between the number of memory nodes Nt′N'_t and the number of original sample nodes NtN_t via a scaling factor λ\lambda, such that Nt=λ−1Nt′N_t = \lambda^{-1}N'_t. In the main paper, we set λ=0.01\lambda= 0.01. We further analyze the sensitivity of λ\lambda in Table 14. The size of the memory has a minor effect on adaptation performance: the model maintains both generalizability and adaptability regardless of the scaling factor between Nt′N'_t and NtN_t, demonstrating the robustness of EMC. Moreover, different values of λ\lambda incur only negligible variation in runtime and GPU memory cost, indicating that constructing crystallized memories introduces minimal and stable computational overhead during adaptation.

Datasetλ\lambdaAP (↑)TDG (↑)TDA (↑)Time (↓)GPU (↓)
Twitch0.0155.95±0.1555.56±0.1355.83±0.1474.64854.97
0.0554.57±0.1555.46±0.1553.90±0.1274.92854.98
0.154.57±0.1555.46±0.1553.89±0.1374.90854.97
0.254.57±0.1655.46±0.1553.90±0.1274.84854.97
0.354.56±0.1655.46±0.1553.88±0.1275.09854.11
0.554.59±0.1655.47±0.1553.88±0.1274.67854.97
Facebook0.0153.10±0.0053.49±0.2752.30±0.0418.843006.08
0.0553.10±0.0053.45±0.3552.29±0.0218.843006.08
0.153.10±0.0053.45±0.3552.30±0.0318.923006.08
0.253.10±0.0053.46±0.3352.30±0.0418.923006.08
0.353.10±0.0053.36±0.5352.30±0.0318.983006.08
0.553.10±0.0053.50±0.2452.30±0.0418.933006.08
Elliptic0.0156.76±0.4658.73±0.4055.92±0.3122.76189.36
0.0556.18±0.2558.44±0.2455.96±0.2823.38189.36
0.156.20±0.2458.48±0.1955.98±0.2723.52189.36
0.256.23±0.2458.53±0.1955.98±0.2323.19189.36
0.356.22±0.2158.56±0.2056.02±0.2123.18189.36
0.556.25±0.2456.03±0.1958.58±0.2322.98189.36
Arxiv0.0146.07±1.7047.11±1.8043.52±1.2524.84391.02
0.0546.06±1.5447.38±1.5447.38±1.5425.54391.05
0.146.00±1.5947.29±1.6247.29±1.6225.73390.98
0.246.02±1.6347.10±1.7047.10±1.7025.62391.05
0.343.91±1.6547.16±1.7343.50±1.2326.12391.05
0.543.85±1.7047.11±1.7943.48±1.2625.70391.05

Table 14. Performance comparison of EMC under different values of λ\lambda across multiple metrics, with corresponding runtime (s) and GPU memory usage (MiB). ‘↑’ indicates higher is better, and ‘↓’ indicates lower is better.

Figure 15. Structural visualization of the original graph and its crystallized memory on continuous-domain Elliptic graphs with GCN backbone (Part III).

Figure 16. Structural visualization of the original graph and its crystallized memory on continuous-domain Elliptic graphs with GCN backbone (Part IV).

Broader Impacts

Distribution shifts arise pervasively in real-world graph applications, including social networks, recommendation systems, citation analysis, and financial transaction monitoring, where the underlying data evolves continually over time. By enabling graph models to adapt under such non-stationary shifts in a training-free and memory-efficient manner, EMC contributes to deploying reliable graph learning systems at lower computational and energy cost, which we view as a positive societal outcome. We do not foresee specific negative societal impacts beyond those general to applied machine learning.

Future Directions. A broader direction suggested by our results is to distinguish task-relevant structural evolution from redundant variations under continual distribution shifts. EMC already follows this principle implicitly by crystallizing each incoming domain into a compact memory that preserves predictive information while suppressing redundant domain-specific content. Recent studies on graph OOD detection [15, 14, 13, 12] and anomaly detection [2, 3, 51] provide complementary evidence that explicitly separating essential graph structure from redundancy can improve robustness under distribution shifts. Structural-entropy-based [15, 41, 40] and redundancy-aware approaches [14] aim to preserve informative structural patterns while filtering irrelevant topology, whereas test-time calibration methods [13, 12] dynamically summarize evolving distributional factors through adaptive dictionaries. These perspectives suggest a unified future direction for continual graph adaptation: first extract the task-relevant structural information of each incoming domain, then measure distribution drift within this essential representation, and finally use the estimated drift to control memory construction and adaptation strength. Such a design could allow graph models to respond more strongly to meaningful structural changes while remaining stable against redundant or transient fluctuations. Extending this framework to open-world streams with emerging semantic classes could further connect continual domain adaptation with novel class discovery [11].

Figure 17. Structural visualization of the original graph and its crystallized memory on continuous-domain Elliptic graphs with GCN backbone (Part V).

Figure 18. Structural visualization of the original graph and its crystallized memory on continuous-domain Elliptic graphs with GCN backbone (Part VI).

Limitations. Despite its practical advantages, EMC has two main limitations:

  • Fixed hyperparameter configuration. Our current experiments use a single fixed hyperparameter configuration for each dataset. The hyperparameters are not dynamically adjusted for each incoming domain, which may limit adaptation when the characteristics of distribution shifts vary substantially over time.

  • Lack of explicit drift measurement. EMC adapts sequentially under non-stationary distribution shifts, but does not explicitly estimate the magnitude of domain drift to determine the appropriate adaptation strength. Incorporating explicit drift estimation and drift-aware adaptation is a promising direction for future work.

Figure 19. Structural visualization of the original graph and its crystallized memory on continuous-domain Elliptic graphs with GCN backbone (Part VII).

Figure 20. Structural visualization of the original graph and its crystallized memory on continuous-domain Elliptic graphs with GCN backbone (Part VIII).

Figure 21. Structural visualization of the original graph and its crystallized memory on continuous-domain OGB-Arxiv graphs with GCN backbone (Part I).

NeurIPS Paper Checklist

Claims

Question: Do the main claims made in the abstract and introduction accurately reflect the paper’s contributions and scope?

Answer: [Yes]

Justification: Abstract and introduction accurately reflect the paper’s contributions and scope.

Guidelines:

  • The answer NA means that the abstract and introduction do not include the claims made in the paper.

  • The abstract and/or introduction should clearly state the claims made, including the contributions made in the paper and important assumptions and limitations. A No or NA answer to this question will not be perceived well by the reviewers.

  • The claims made should match theoretical and experimental results, and reflect how much the results can be expected to generalize to other settings.

  • It is fine to include aspirational goals as motivation as long as it is clear that these goals are not attained by the paper.

Limitations

Question: Does the paper discuss the limitations of the work performed by the authors?

Answer: [Yes]

Justification: The limitations regarding the future research direction of the work are discussed in the conclusion section.

Guidelines:

  • The answer NA means that the paper has no limitation while the answer No means that the paper has limitations, but those are not discussed in the paper.

  • The authors are encouraged to create a separate "Limitations" section in their paper.

  • The paper should point out any strong assumptions and how robust the results are to violations of these assumptions (e.g., independence assumptions, noiseless settings, model well-specification, asymptotic approximations only holding locally). The authors should reflect on how these assumptions might be violated in practice and what the implications would be.

  • The authors should reflect on the scope of the claims made, e.g., if the approach was only tested on a few datasets or with a few runs. In general, empirical results often depend on implicit assumptions, which should be articulated.

  • The authors should reflect on the factors that influence the performance of the approach. For example, a facial recognition algorithm may perform poorly when image resolution is low or images are taken in low lighting. Or a speech-to-text system might not be used reliably to provide closed captions for online lectures because it fails to handle technical jargon.

  • The authors should discuss the computational efficiency of the proposed algorithms and how they scale with dataset size.

  • If applicable, the authors should discuss possible limitations of their approach to address problems of privacy and fairness.

  • While the authors might fear that complete honesty about limitations might be used by reviewers as grounds for rejection, a worse outcome might be that reviewers discover limitations that aren’t acknowledged in the paper. The authors should use their best judgment and recognize that individual actions in favor of transparency play an important role in developing norms that preserve the integrity of the community. Reviewers will be specifically instructed to not penalize honesty concerning limitations.

Theory assumptions and proofs

Question: For each theoretical result, does the paper provide the full set of assumptions and a complete (and correct) proof? Answer: [Yes]

Justification: The full set of assumptions and proofs is provided in the paper.

Guidelines:

  • The answer NA means that the paper does not include theoretical results.

  • All the theorems, formulas, and proofs in the paper should be numbered and cross-referenced.

  • All assumptions should be clearly stated or referenced in the statement of any theorems.

  • The proofs can either appear in the main paper or the supplemental material, but if they appear in the supplemental material, the authors are encouraged to provide a short proof sketch to provide intuition.

  • Inversely, any informal proof provided in the core of the paper should be complemented by formal proofs provided in appendix or supplemental material.

  • Theorems and Lemmas that the proof relies upon should be properly referenced.

Experimental result reproducibility

Question: Does the paper fully disclose all the information needed to reproduce the main experimental results of the paper to the extent that it affects the main claims and/or conclusions of the paper (regardless of whether the code and data are provided or not)?

Answer: [Yes]

Justification: Our paper fully discloses all the information needed to reproduce the main experimental results.

Guidelines:

  • The answer NA means that the paper does not include experiments.

  • If the paper includes experiments, a No answer to this question will not be perceived well by the reviewers: Making the paper reproducible is important, regardless of whether the code and data are provided or not.

  • If the contribution is a dataset and/or model, the authors should describe the steps taken to make their results reproducible or verifiable.

  • Depending on the contribution, reproducibility can be accomplished in various ways. For example, if the contribution is a novel architecture, describing the architecture fully might suffice, or if the contribution is a specific model and empirical evaluation, it may be necessary to either make it possible for others to replicate the model with the same dataset, or provide access to the model. In general. releasing code and data is often one good way to accomplish this, but reproducibility can also be provided via detailed instructions for how to replicate the results, access to a hosted model (e.g., in the case of a large language model), releasing of a model checkpoint, or other means that are appropriate to the research performed.

  • While NeurIPS does not require releasing code, the conference does require all submissions to provide some reasonable avenue for reproducibility, which may depend on the nature of the contribution. For example (a) If the contribution is primarily a new algorithm, the paper should make it clear how to reproduce that algorithm. (b) If the contribution is primarily a new model architecture, the paper should describe the architecture clearly and fully. (c) If the contribution is a new model (e.g., a large language model), then there should either be a way to access this model for reproducing the results or a way to reproduce the model (e.g., with an open-source dataset or instructions for how to construct the dataset). (d) We recognize that reproducibility may be tricky in some cases, in which case authors are welcome to describe the particular way they provide for reproducibility. In the case of closed-source models, it may be that access to the model is limited in some way (e.g., to registered users), but it should be possible for other researchers to have some path to reproducing or verifying the results.

Open access to data and code

Question: Does the paper provide open access to the data and code, with sufficient instructions to faithfully reproduce the main experimental results, as described in supplemental material?

Answer: [Yes]

Justification: The adopted datasets are public datasets. The code of EMC is available.

Guidelines:

  • The answer NA means that paper does not include experiments requiring code.

  • Please see the NeurIPS code and data submission guidelines (https://nips.cc/public/guides/CodeSubmissionPolicy) for more details.

  • While we encourage the release of code and data, we understand that this might not be possible, so “No” is an acceptable answer. Papers cannot be rejected simply for not including code, unless this is central to the contribution (e.g., for a new open-source benchmark).

  • The instructions should contain the exact command and environment needed to run to reproduce the results. See the NeurIPS code and data submission guidelines (https://nips.cc/public/guides/CodeSubmissionPolicy) for more details.

  • The authors should provide instructions on data access and preparation, including how to access the raw data, preprocessed data, intermediate data, and generated data, etc.

  • The authors should provide scripts to reproduce all experimental results for the new proposed method and baselines. If only a subset of experiments are reproducible, they should state which ones are omitted from the script and why.

  • At submission time, to preserve anonymity, the authors should release anonymized versions (if applicable).

  • Providing as much information as possible in supplemental material (appended to the paper) is recommended, but including URLs to data and code is permitted.

Experimental setting/details

Question: Does the paper specify all the training and test details (e.g., data splits, hyperparameters, how they were chosen, type of optimizer, etc.) necessary to understand the results?

Answer: [Yes]

Justification: Our paper specifies all the training and testing details.

Guidelines:

  • The answer NA means that the paper does not include experiments.

  • The experimental setting should be presented in the core of the paper to a level of detail that is necessary to appreciate the results and make sense of them.

  • The full details can be provided either with the code, in appendix, or as supplemental material.

Experiment statistical significance

Question: Does the paper report error bars suitably and correctly defined or other appropriate information about the statistical significance of the experiments?

Answer: [Yes]

Justification: Our paper shows average results over 5 runs with different random seeds and reports the variance for our metrics.

Guidelines:

  • The answer NA means that the paper does not include experiments.

  • The authors should answer "Yes" if the results are accompanied by error bars, confidence intervals, or statistical significance tests, at least for the experiments that support the main claims of the paper.

  • The factors of variability that the error bars are capturing should be clearly stated (for example, train/test split, initialization, random drawing of some parameter, or overall run with given experimental conditions).

  • The method for calculating the error bars should be explained (closed form formula, call to a library function, bootstrap, etc.)

  • The assumptions made should be given (e.g., Normally distributed errors).

  • It should be clear whether the error bar is the standard deviation or the standard error of the mean.

  • It is OK to report 1-sigma error bars, but one should state it. The authors should preferably report a 2-sigma error bar than state that they have a 96% CI, if the hypothesis of Normality of errors is not verified.

  • For asymmetric distributions, the authors should be careful not to show in tables or figures symmetric error bars that would yield results that are out of range (e.g. negative error rates).

  • If error bars are reported in tables or plots, The authors should explain in the text how they were calculated and reference the corresponding figures or tables in the text.

Experiments compute resources

Question: For each experiment, does the paper provide sufficient information on the computer resources (type of compute workers, memory, time of execution) needed to reproduce the experiments?

Answer: [Yes]

Justification: Our paper provides sufficient information on the computer resources.

Guidelines:

  • The answer NA means that the paper does not include experiments.

  • The paper should indicate the type of compute workers CPU or GPU, internal cluster, or cloud provider, including relevant memory and storage.

  • The paper should provide the amount of compute required for each of the individual experimental runs as well as estimate the total compute.

  • The paper should disclose whether the full research project required more compute than the experiments reported in the paper (e.g., preliminary or failed experiments that didn’t make it into the paper).

Code of ethics

Question: Does the research conducted in the paper conform, in every respect, with the NeurIPS Code of Ethics https://neurips.cc/public/EthicsGuidelines?

Answer: [Yes]

Justification: Our research complies with the NeurIPS Code of Ethics.

Guidelines:

  • The answer NA means that the authors have not reviewed the NeurIPS Code of Ethics.

  • If the authors answer No, they should explain the special circumstances that require a deviation from the Code of Ethics.

  • The authors should make sure to preserve anonymity (e.g., if there is a special consideration due to laws or regulations in their jurisdiction).

Broader impacts

Question: Does the paper discuss both potential positive societal impacts and negative societal impacts of the work performed?

Answer: [Yes]

Justification: The societal impacts of the work are discussed in Appendix § 12.

Guidelines:

  • The answer NA means that there is no societal impact of the work performed.

  • If the authors answer NA or No, they should explain why their work has no societal impact or why the paper does not address societal impact.

  • Examples of negative societal impacts include potential malicious or unintended uses (e.g., disinformation, generating fake profiles, surveillance), fairness considerations (e.g., deployment of technologies that could make decisions that unfairly impact specific groups), privacy considerations, and security considerations.

  • The conference expects that many papers will be foundational research and not tied to particular applications, let alone deployments. However, if there is a direct path to any negative applications, the authors should point it out. For example, it is legitimate to point out that an improvement in the quality of generative models could be used to generate deepfakes for disinformation. On the other hand, it is not needed to point out that a generic algorithm for optimizing neural networks could enable people to train models that generate Deepfakes faster.

  • The authors should consider possible harms that could arise when the technology is being used as intended and functioning correctly, harms that could arise when the technology is being used as intended but gives incorrect results, and harms following from (intentional or unintentional) misuse of the technology.

  • If there are negative societal impacts, the authors could also discuss possible mitigation strategies (e.g., gated release of models, providing defenses in addition to attacks, mechanisms for monitoring misuse, mechanisms to monitor how a system learns from feedback over time, improving the efficiency and accessibility of ML).

Safeguards

Question: Does the paper describe safeguards that have been put in place for responsible release of data or models that have a high risk for misuse (e.g., pretrained language models, image generators, or scraped datasets)?

Answer: [N/A]

Justification: The paper poses no such risk.

Guidelines:

  • The answer NA means that the paper poses no such risks.

  • Released models that have a high risk for misuse or dual-use should be released with necessary safeguards to allow for controlled use of the model, for example by requiring that users adhere to usage guidelines or restrictions to access the model or implementing safety filters.

  • Datasets that have been scraped from the Internet could pose safety risks. The authors should describe how they avoided releasing unsafe images.

  • We recognize that providing effective safeguards is challenging, and many papers do not require this, but we encourage authors to take this into account and make a best faith effort.

Licenses for existing assets

Question: Are the creators or original owners of assets (e.g., code, data, models), used in the paper, properly credited and are the license and terms of use explicitly mentioned and properly respected?

Answer: [Yes]

Justification: The adopted datasets and compared baselines are properly credited.

Guidelines:

  • The answer NA means that the paper does not use existing assets.

  • The authors should cite the original paper that produced the code package or dataset.

  • The authors should state which version of the asset is used and, if possible, include a URL.

  • The name of the license (e.g., CC-BY 4.0) should be included for each asset.

  • For scraped data from a particular source (e.g., website), the copyright and terms of service of that source should be provided.

  • If assets are released, the license, copyright information, and terms of use in the package should be provided. For popular datasets, paperswithcode.com/datasets has curated licenses for some datasets. Their licensing guide can help determine the license of a dataset.

  • For existing datasets that are re-packaged, both the original license and the license of the derived asset (if it has changed) should be provided.

  • If this information is not available online, the authors are encouraged to reach out to the asset’s creators.

13. New assets

Question: Are new assets introduced in the paper well documented and is the documentation provided alongside the assets?

Answer: [N/A]

Justification: Our paper does not release new assets.

Guidelines:

  • The answer NA means that the paper does not release new assets.

  • Researchers should communicate the details of the dataset/code/model as part of their submissions via structured templates. This includes details about training, license, limitations, etc.

  • The paper should discuss whether and how consent was obtained from people whose asset is used.

  • At submission time, remember to anonymize your assets (if applicable). You can either create an anonymized URL or include an anonymized zip file.

14. Crowdsourcing and research with human subjects

Question: For crowdsourcing experiments and research with human subjects, does the paper include the full text of instructions given to participants and screenshots, if applicable, as well as details about compensation (if any)?

Answer: [N/A]

Justification: Our paper does not involve crowdsourcing nor research with human subjects.

Guidelines:

  • The answer NA means that the paper does not involve crowdsourcing nor research with human subjects.

  • Including this information in the supplemental material is fine, but if the main contribution of the paper involves human subjects, then as much detail as possible should be included in the main paper.

  • According to the NeurIPS Code of Ethics, workers involved in data collection, curation, or other labor should be paid at least the minimum wage in the country of the data collector.

15. Institutional review board (IRB) approvals or equivalent for research with human subjects

Question: Does the paper describe potential risks incurred by study participants, whether such risks were disclosed to the subjects, and whether Institutional Review Board (IRB) approvals (or an equivalent approval/review based on the requirements of your country or institution) were obtained?

Answer: [N/A]

Justification: Our paper does not involve crowdsourcing nor research with human subjects.

Guidelines:

  • The answer NA means that the paper does not involve crowdsourcing nor research with human subjects.

  • Depending on the country in which research is conducted, IRB approval (or equivalent) may be required for any human subjects research. If you obtained IRB approval, you should clearly state this in the paper.

  • We recognize that the procedures for this may vary significantly between institutions and locations, and we expect authors to adhere to the NeurIPS Code of Ethics and the guidelines for their institution.

  • For initial submissions, do not include any information that would break anonymity (if applicable), such as the institution conducting the review.

16. Declaration of LLM usage

Question: Does the paper describe the usage of LLMs if it is an important, original, or non-standard component of the core methods in this research? Note that if the LLM is used only for writing, editing, or formatting purposes and does not impact the core methodology, scientific rigorousness, or originality of the research, declaration is not required.

Answer: [N/A]

Justification: The core method development in this research does not involve LLMs as any important, original, or non-standard components.

Guidelines:

  • The answer NA means that the core method development in this research does not involve LLMs as any important, original, or non-standard components.

  • Please refer to our LLM policy (https://neurips.cc/Conferences/2025/LLM) for what should or should not be described.

References

  1. [1]Peter L. Bartlett, Dylan J. Foster, and Matus J. Telgarsky. Spectrally-normalized margin bounds for neural networks. In Advances in Neural Information Processing Systems (NeurIPS), 2017.arxiv.org/abs/1706.08498
  2. [2]Jinyu Cai, Yunhe Zhang, and Jicong Fan. Self-discriminative modeling for anomalous graph detection. In Proceedings of the International Conference on Machine Learning, pages 6387–6408. PMLR, 2025.arxiv.org/abs/2310.06261
  3. [3]Jinyu Cai, Yunhe Zhang, Pengyang Wang, and See-Kiong Ng. Moegad: A mixture-of-experts framework with pseudo-anomaly generation for graph-level anomaly detection. IEEE Transactions on Pattern Analysis and Machine Intelligence, 48(4):4473–4489, 2026.DOI
  4. [4]Quanyu Dai, Xiao-Ming Wu, Jiaren Xiao, Xiao Shen, and Dan Wang. Graph transfer learning via adversarial domain adaptation with graph convolution. IEEE Transactions on Knowledge and Data Engineering, 2022.arxiv.org/abs/1909.01541
  5. [5]Jun Dan, Weiming Liu, Chunfeng Xie, Hua Yu, Shunjie Dong, and Yanchao Tan. Tfgda: Exploring topology and feature alignment in semi-supervised graph domain adaptation through robust clustering. In The Thirty-eighth Annual Conference on Neural Information Processing Systems, 2024.DOI
  6. [6]Zhengming Ding, Sheng Li, Ming Shao, and Yun Fu. Graph adaptive knowledge transfer for unsupervised domain adaptation. In Proceedings of the European Conference on Computer Vision (ECCV), pages 37–52, 2018.DOI
  7. [7]Matthijs Douze, Alexandr Guzhva, Chengqi Deng, Jeff Johnson, Gergely Szilvasy, Pierre-Emmanuel Mazaré, Maria Lomeli, Lucas Hosseini, and Hervé Jégou. The faiss library. arXiv preprint arXiv:2401.08281, 2024.arxiv.org/abs/2401.08281
  8. [8]Gintare Karolina Dziugaite, Daniel M Roy, and Zoubin Ghahramani. Training generative neural networks via maximum mean discrepancy. arXiv preprint arXiv:1505.03906, 2015.arxiv.org/abs/1505.03906
  9. [9]Yaroslav Ganin, Evgeniya Ustinova, Hana Ajakan, Pascal Germain, Hugo Larochelle, François Laviolette, Mario March, and Victor Lempitsky. Domain-adversarial training of neural networks. Journal of machine learning research, 17(59):1–35, 2016.arxiv.org/abs/1505.07818
  10. [10]Will Hamilton, Zhitao Ying, and Jure Leskovec. Inductive representation learning on large graphs. Advances in neural information processing systems, 30, 2017.arxiv.org/abs/1706.02216
  11. [11]Yue Hou, Xueyuan Chen, He Zhu, Ruomei Liu, Bowen Shi, Jiaheng Liu, Junran Wu, and Ke Xu. Nc2d: Novel class discovery for node classification. In Proceedings of the 33rd ACM International Conference on Information and Knowledge Management, pages 849–859, 2024.DOI
  12. [12]Yue Hou, Ruomei Liu, Yingke Su, Junran Wu, and Ke Xu. Graph out-of-distribution detection via test-time calibration with dual dynamic dictionaries. In Proceedings of the AAAI Conference on Artificial Intelligence, volume 40, pages 21797–21804, 2026.arxiv.org/abs/2511.13541
  13. [13]Yue Hou, Yingke Su, Junran Wu, and Ke Xu. Test-time graph ood detection via dynamic dictionary expansion and ood score calibration. In Proceedings of the 33rd ACM International Conference on Multimedia, pages 8845–8853, 2025.DOI
  14. [14]Yue Hou, He Zhu, Ruomei Liu, Yingke Su, Junran Wu, and Ke Xu. Redundancy-aware test-time graph out-of-distribution detection. Advances in Neural Information Processing Systems, 38:119899–119942, 2026.arxiv.org/abs/2510.14562
  15. [15]Yue Hou, He Zhu, Ruomei Liu, Yingke Su, Jinxiang Xia, Junran Wu, and Ke Xu. Structural entropy guided unsupervised graph out-of-distribution detection. In Proceedings of the AAAI Conference on Artificial Intelligence, volume 39, pages 17258–17266, 2025.arxiv.org/abs/2503.03241
  16. [16]Weihua Hu, Matthias Fey, Marinka Zitnik, Yuxiao Dong, Hongyu Ren, Bowen Liu, Michele Catasta, and Jure Leskovec. Open graph benchmark: Datasets for machine learning on graphs. Advances in neural information processing systems, 33:22118–22133, 2020.arxiv.org/abs/2005.00687
  17. [17]Wei Jin, Tong Zhao, Jiayuan Ding, Yozen Liu, Jiliang Tang, and Neil Shah. Empowering graph representation learning with test-time graph transformation. In The Eleventh International Conference on Learning Representations, 2022.
  18. [18]Vassilis Kalofolias. How to learn a graph from smooth signals. In Artificial intelligence and statistics, pages 920–929. PMLR, 2016.arxiv.org/abs/1601.02513
  19. [19]Thomas N. Kipf and Max Welling. Semi-supervised classification with graph convolutional networks. In ICLR, 2017.arxiv.org/abs/1609.02907
  20. [20]Yanghao Li, Naiyan Wang, Jianping Shi, Jiaying Liu, and Xiaodi Hou. Revisiting batch normalization for practical domain adaptation. arXiv preprint arXiv:1603.04779, 2016.arxiv.org/abs/1603.04779
  21. [21]Chenxi Liu, Lixu Wang, Lingjuan Lyu, Chen Sun, Xiao Wang, and Qi Zhu. Deja vu: Continual model generalization for unseen domains. In The Eleventh International Conference on Learning Representations, 2023.arxiv.org/abs/2301.10418
  22. [22]Huihui Liu, Yiding Yang, and Xinchao Wang. Overcoming catastrophic forgetting in graph neural networks. In Proceedings of the AAAI conference on artificial intelligence, volume 35, pages 8653–8661, 2021.arxiv.org/abs/2012.06002
  23. [23]Shikun Liu, Tianchun Li, Yongbin Feng, Nhan Tran, Han Zhao, Qiang Qiu, and Pan Li. Structural re-weighting improves graph domain adaptation. In International Conference on Machine Learning, pages 21778–21793. PMLR, 2023.arxiv.org/abs/2306.03221
  24. [24]Stuart P. Lloyd. Least squares quantization in PCM. IEEE Transactions on Information Theory, 28(2):129–137, 1982.DOI
  25. [25]Junyu Luo, Zixuan Ouyang, Xiao Luo, Hourun Li, Zhiping Xiao, Yifan Wang, and Ming Zhang. Space-based parameter evolving with lightweight optimization for graph adaptation to evolving shifts. In Proceedings of the ACM Web Conference 2026, pages 1529–1539, 2026.
  26. [26]Xinhong Ma, Tianzhu Zhang, and Changsheng Xu. Gcan: Graph convolutional adversarial network for unsupervised domain adaptation. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pages 8266–8276, 2019.
  27. [27]Behnam Neyshabur, Srinadh Bhojanapalli, and Nathan Srebro. A PAC-Bayesian approach to spectrally-normalized margin bounds for neural networks. In International Conference on Learning Representations (ICLR), 2018.arxiv.org/abs/1707.09564
  28. [28]Shuaicheng Niu, Jiaxiang Wu, Yifan Zhang, Yaofo Chen, Shijian Zheng, Peilin Zhao, and Mingkui Tan. Efficient test-time model adaptation without forgetting. In International conference on machine learning, pages 16888–16905. PMLR, 2022.arxiv.org/abs/2204.02610
  29. [29]Lawrence Page, Sergey Brin, Rajeev Motwani, and Terry Winograd. The pagerank citation ranking: Bringing order to the web. Technical report, Stanford InfoLab, 1999.
  30. [30]Aldo Pareja, Giacomo Domeniconi, Jie Chen, Tengfei Ma, Toyotaro Suzumura, Hiroki Kanezashi, Tim Kaler, Tao Schardl, and Charles Leiserson. Evolvegcn: Evolving graph convolutional networks for dynamic graphs. In Proceedings of the AAAI conference on artificial intelligence, volume 34, pages 5363–5370, 2020.
  31. [31]Ziyue Qiao, Qianyi Cai, Hao Dong, Jiawei Gu, Pengyang Wang, Meng Xiao, Xiao Luo, and Hui Xiong. GCAL: Adapting graph models to evolving domain shifts. In Forty-second International Conference on Machine Learning, 2025.arxiv.org/abs/2505.16860
  32. [32]Ziyue Qiao, Xiao Luo, Meng Xiao, Hao Dong, Yuanchun Zhou, and Hui Xiong. Semi-supervised domain adaptation in graph transfer learning. In Proceedings of the Thirty-Second International Joint Conference on Artificial Intelligence, pages 2279–2287, 2023.arxiv.org/abs/2309.10773
  33. [33]Benedek Rozemberczki, Carl Allen, and Rik Sarkar. Multi-scale attributed node embedding. Journal of Complex Networks, 9(2):cnab014, 2021.arxiv.org/abs/1909.13021
  34. [34]Li Sun, Junda Ye, Hao Peng, Feiyang Wang, and S Yu Philip. Self-supervised continual graph learning in adaptive riemannian spaces. In Proceedings of the AAAI Conference on Artificial Intelligence, volume 37, pages 4633–4642, 2023.
  35. [35]Amanda L Traud, Peter J Mucha, and Mason A Porter. Social structure of facebook networks. Physica A: Statistical Mechanics and its Applications, 391(16):4165–4180, 2012.
  36. [36]Dequan Wang, Evan Shelhamer, Shaoteng Liu, Bruno Olshausen, and Trevor Darrell. Tent: Fully test-time adaptation by entropy minimization. In International Conference on Learning Representations, 2021.arxiv.org/abs/2006.10726
  37. [37]Liyuan Wang, Xingxing Zhang, Hang Su, and Jun Zhu. A comprehensive survey of continual learning: theory, method and application. IEEE Transactions on Pattern Analysis and Machine Intelligence, 2024.arxiv.org/abs/2302.00487
  38. [38]Qin Wang, Olga Fink, Luc Van Gool, and Dengxin Dai. Continual test-time domain adaptation. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pages 7201–7211, 2022.arxiv.org/abs/2203.13591
  39. [39]Felix Wu, Amauri H. Souza Jr., Tianyi Zhang, Christopher Fifty, Tao Yu, and Kilian Q. Weinberger. Simplifying graph convolutional networks. In Proceedings of the 36th International Conference on Machine Learning, ICML 2019, 9-15 June 2019, Long Beach, California, USA, pages 6861–6871, 2019.arxiv.org/abs/1902.07153
  40. [40]Junran Wu, Xueyuan Chen, Bowen Shi, Shanzhe Li, and Ke Xu. Sega: Structural entropy guided anchor view for graph contrastive learning. In International Conference on Machine Learning. PMLR, 2023.
  41. [41]Junran Wu, Xueyuan Chen, Ke Xu, and Shanzhe Li. Structural entropy guided graph hierarchical pooling. In International Conference on Machine Learning, pages 24017–24030. PMLR, 2022.arxiv.org/abs/2206.13510
  42. [42]Man Wu, Shirui Pan, Chuan Zhou, Xiaojun Chang, and Xingquan Zhu. Unsupervised domain adaptive graph convolutional networks. In Proceedings of The Web Conference 2020, pages 1457–1467, 2020.
  43. [43]Man Wu, Shirui Pan, and Xingquan Zhu. Attraction and repulsion: Unsupervised domain adaptive graph contrastive learning network. IEEE Transactions on Emerging Topics in Computational Intelligence, 2022.
  44. [44]Qitian Wu, Hengrui Zhang, Junchi Yan, and David Wipf. Handling distribution shifts on graphs: An invariance perspective. International Conference on Learning Representations, 2022.
  45. [45]Jiaren Xiao, Quanyu Dai, Xiaochen Xie, Qi Dou, Ka-Wai Kwok, and James Lam. Domain adaptive graph infomax via conditional adversarial networks. IEEE Transactions on Network Science and Engineering, 2022.
  46. [46]Keyulu Xu, Weihua Hu, Jure Leskovec, and Stefanie Jegelka. How powerful are graph neural networks? In ICLR, 2019.
  47. [47]Weichen Zhang, Wanli Ouyang, Wen Li, and Dong Xu. Collaborative and adversarial network for unsupervised domain adaptation. In Proceedings of the IEEE conference on computer vision and pattern recognition, pages 3801–3809, 2018.
  48. [48]Xikun Zhang, Dongjin Song, and Dacheng Tao. Hierarchical prototype networks for continual graph representation learning. IEEE Transactions on Pattern Analysis and Machine Intelligence, 45(4):4622–4636, 2022.
  49. [49]Xikun Zhang, Dongjin Song, and Dacheng Tao. Sparsified subgraph memory for continual graph representation learning. In 2022 IEEE International Conference on Data Mining (ICDM), pages 1335–1340. IEEE, 2022.
  50. [50]Xikun Zhang, Dongjin Song, and Dacheng Tao. Ricci curvature-based graph sparsification for continual graph representation learning. IEEE Transactions on Neural Networks and Learning Systems, 2023.
  51. [51]Yunhe Zhang, Jinyu Cai, Qi Hao, Pengyang Wang, and See-Kiong Ng. Escaping the homophily trap: A threshold-free graph outlier detection framework via clustering-guided edge reweighting. In Proceedings of the International Conference on Learning Representations, 2026.
  52. [52]Han Zhao, Remi Tachet Des Combes, Kun Zhang, and Geoffrey Gordon. On learning invariant representations for domain adaptation. In International conference on machine learning, pages 7523–7532. PMLR, 2019.
  53. [53]Xin Zheng, Dongjin Song, Qingsong Wen, Bo Du, and Shirui Pan. Online GNN evaluation under test-time graph distribution shifts. In The Twelfth International Conference on Learning Representations, 2024.
  54. [54]Fan Zhou and Chengtai Cao. Overcoming catastrophic forgetting in graph neural networks with experience replay. In Proceedings of the AAAI Conference on Artificial Intelligence, volume 35, pages 4714–4722, 2021.

AI tools statement

No AI-use declaration is available for this version in Valency.

The available record does not establish whether AI systems or models contributed to this work.

How AI tools are recorded

Paper details

Cite this paper

Publication

Published
Version
Latest

Data & code

Code, data, proofs and workflows the authors linked for testing, review and reproduction. These links are part of this work’s metadata and are released under the same license as the rest of that metadata. Valency doesn’t host the files; each keeps the license set where it’s hosted.

Pick where to look, or just type