Paper deep dive
Adaptive Spectral-Koopman Dynamics Modeling for Temporal Domain Generalization
Tengxue Zhang, Yu Ke, Yang Shu, Chenchen Sun, Yisheng An, Chenjuan Guo, Bin Yang
Intelligence
Status: not_run | Model: - | Prompt: - | Confidence: 0%
Entities (0)
Relation Signals (0)
No relation signals yet.
Cypher Suggestions (0)
No Cypher suggestions yet.
Abstract
Abstract:Temporal Domain Generalization (TDG) has emerged to address real-world streaming data with distribution shifts over time. However, existing methods are either prone to overfitting to domain-specific noise in the data space or become overly complex and less interpretable in the parameter space. To bridge these gaps, we propose \textbf{AdaSpecK}, a spectral-Koopman framework with adaptive context extraction for TDG. To mitigate noise fitting to irregularly sampled domains, we introduce spectral-regularized Koopman dynamics modeling, which applies spectral-aware filtering in the latent space to extract denoised low-frequency trajectories and learn a Koopman operator to model the system dynamics in a linearized space. To model complex historical environments under non-stationarity, we design a context-informed heterogeneous pattern extraction mechanism. Specifically, we employ a target-conditioned attention module to attend to distinct past windows, producing a dynamic, target-specific historical summary. By constructing an environmental signature from the current evolutionary pattern, our model adaptively perceives which aspects of the past context are most informative for future prediction via a learned router. Extensive experiments on eight diverse classification and regression benchmarks demonstrate that AdaSpecK achieves state-of-the-art performance. The code and datasets are available at \href{}{this https URL}.
Tags
Links
- Source: https://arxiv.org/abs/2610.02822v1
- Canonical: https://arxiv.org/abs/2610.02822v1
Trouble viewing inline? Open PDF directly →
Full Text
59,645 characters extracted from source content.
Expand or collapse full text
Adaptive Spectral-Koopman Dynamics Modeling for Temporal Domain Generalization Tengxue Zhang Affiliation: East China Normal University Yu Ke Affiliation: East China Normal University Yang Shu Affiliation: East China Normal University Chenchen Sun Affiliation: Chang’an University Yisheng An Affiliation: Chang’an University Chenjuan Guo Affiliation: East China Normal University Bin Yang Affiliation: East China Normal University Abstract Temporal Domain Generalization (TDG) has emerged to address real-world streaming data with distribution shifts over time. However, existing methods are either prone to overfitting to domain-specific noise in the data space or become overly complex and less interpretable in the parameter space. To bridge these gaps, we propose AdaSpecK, a spectral-Koopman framework with adaptive context extraction for TDG. To mitigate noise fitting to irregularly sampled domains, we introduce spectral-regularized Koopman dynamics modeling, which applies spectral-aware filtering in the latent space to extract denoised low-frequency trajectories and learn a Koopman operator to model the system dynamics in a linearized space. To model complex historical environments under non-stationarity, we design a context-informed heterogeneous pattern extraction mechanism. Specifically, we employ a target-conditioned attention module to attend to distinct past windows, producing a dynamic, target-specific historical summary. By constructing an environmental signature from the current evolutionary pattern, our model adaptively perceives which aspects of the past context are most informative for future prediction via a learned router. Extensive experiments on eight diverse classification and regression benchmarks demonstrate that AdaSpecK achieves state-of-the-art performance. The code and datasets are available at https://anonymous.4open.science/r/Ada-Spec-K. 1 Introduction Conventional machine learning typically assumes that training and test data are independently and identically distributed (IID), which expects a model to generalize across training and test sets. However, this assumption is rarely satisfied in real-world applications where data often arrive as continuous streams and their underlying distributions shift dynamically over time (Han et al., 2024). For instance, in financial markets, trading behaviors evolve as economic conditions change; in social media, linguistic trends and topics shift rapidly over time. This phenomenon, known as concept drift (Lu et al., 2019; Wang et al., 2025), leads models trained on past data to degrade when deployed in distributionally shifted environments (Gama et al., 2014). This has motivated the emergence of Temporal Domain Generalization (TDG), which aims to leverage evolving historical data to build models capable of generalizing to near-future domains (Cai et al., 2024). Existing approaches to TDG can be broadly categorized into data-centric and model-centric paradigms. Data-centric methods operate on the premise that temporal robustness can be achieved at the data or feature level. They employ strategies such as data augmentation (Liu et al., 2018) or generative modeling to simulate potential future distributions (Zeng et al., 2024), or leverage representation learning (Gong et al., 2019) to extract domain-invariant features and disentangle domain-shared features from domain-specific ones. In contrast, model-centric approaches focus on adapting to evolving domains by dynamically predicting or extrapolating model parameters. These methods utilize techniques such as gradient interpolation (Nasery et al., 2021) or probabilistic frameworks to characterize latent evolutionary dynamics within the parameter space (Cai et al., 2024; Yu et al., 2025). Despite these advances, several critical challenges remain unresolved, as shown in Figure 1: Figure 1: In TDG, training domains are often time-irregularly sampled; directly learning in the data space tends to overfit domain-specific noise, impairing generalization. Predicting future OOD domains requires modeling dynamic temporal patterns across evolving historical environments. Challenge 1: Time-irregularly distributed training domains lead to noise fitting when modeling domain characteristics. Unlike conventional forecasting tasks with regularly sampled data, TDG often involves observations at irregular timestamps. This results in training domains that are sparsely and unevenly distributed across a continuous timeline. Directly learning a predictive model in the data space risks overfitting to domain-specific patterns or noise, hindering reliable generalization to future out-of-distribution (OOD) domains (Lu et al., 2019; Wang et al., 2025). Although some methods instead model temporal evolution in the parameter space, this introduces its own difficulties: the parameter space is inherently more abstract and higher-dimensional, and its performance is tightly coupled to the architecture and design choices of the predictive model itself. Furthermore, the dynamics governing how parameters evolve across irregular time steps are typically highly nonlinear and lack clear structural priors, making it unstable and prone to error. Challenge 2: Data non-stationarity complicates the extraction of dynamic temporal patterns across historical environments. Temporal non-stationarity, manifested as shifting data distributions and evolving feature semantics, undermines the assumption of stable statistical regularities over time (Wang et al., 2023b). As a result, periodicity, seasonality, or recurring temporal structure that are readily captured under stationarity often become obfuscated or highly volatile. This renders traditional temporal modeling techniques often fail to generalize in real-world TDG scenarios (Gama et al., 2014). Moreover, future target domains may prioritize distinct contextual cues drawn from historical environments. For instance, some domains may place greater emphasis on long-term trends and macro-level patterns, while others may be highly sensitive to recent, short-term dynamics. Therefore, a robust TDG model should not only adapt to the continuous evolution of temporal patterns but also possess the flexibility to generalize across heterogeneous domain structures. To address these challenges, we introduce AdaSpecK, a spectral-Koopman framework with adaptive context extraction for temporal domain generalization. To mitigate noise fitting to irregularly sampled training domains, we introduce spectral-regularized Koopman dynamics modeling. It applies spectral-aware filtering in the latent space to extract denoised low-frequency trajectories. By focusing on robust, slowly evolving signals, the model enhances resilience to irregular domain shifts and improves generalization to OOD scenarios. It then leverages a Koopman-style transition to model future time evolution and optimizes a Koopman operator that captures system dynamics in a linearized space. To address the difficulty of extracting historical information under non-stationarity, we design a context-informed heterogeneous pattern extraction mechanism. Specifically, we employ a target-conditioned attention module, which enables each future step to attend to distinct subsets of the historical windows. This effectively produces a dynamic, target-specific historical summary of past observations that adapts to the anticipated characteristics of the future domain. Furthermore, by constructing an environmental signature from the current evolutionary pattern, our model adaptively perceives which aspects of the past context are most informative for future prediction via a lightweight, learnable router. Overall, our main contributions are summarized as follows: • We introduce spectral-regularized Koopman dynamics modeling, which applies spectral-aware filtering in a latent space to extract denoised low-frequency trajectories and learn a Koopman operator to model the system dynamics. • We propose a context-informed heterogeneous pattern extraction mechanism that leverages target-conditioned attention to exploit the most relevant past for each prediction step, enabling the model to selectively integrate historical contexts through adaptive expert routing. • Extensive experiments on eight diverse benchmarks that span five classification and three regression tasks show that AdaSpecK achieves state-of-the-art performance. 2 Related Works Temporal Domain Generalization. Domain Generalization (DG) aims to learn from multiple source domains and generalize to unseen target domains (Muandet et al., 2013; Motiian et al., 2017; Li et al., 2017; Balaji et al., 2018; Dou et al., 2019; Yu et al., 2022; Gulrajani and Lopez-Paz, 2021). DG methods can be classified into three strategies (Wang et al., 2023a): data manipulation (Liu et al., 2018; Qiao et al., 2020), representation learning (Gong et al., 2019; Li et al., 2018b), and learning strategies such as meta-learning (Cai et al., 2023; Li et al., 2018a) and ensembles (Mancini et al., 2018). Temporal Domain Generalization (TDG) extends DG to time-evolving environments, where domain distributions shift over time. Early efforts primarily adopt data-driven strategies. S-MLDG (Li et al., 2020) frames TDG as a sequential meta-learning problem, while TKNets (Zeng et al., 2024) capture temporal dynamics by minimizing the divergence between predicted and actual future domain distributions for classification. Other methods focus on adapting model parameters to evolving domains. Gradient Interpolation (Nasery et al., 2021) extrapolates model updates by supervising the first-order Taylor expansion of the learned function. LSSAE (Qin et al., 2022) introduces a probabilistic latent space to uncover structural regularities in predictive models, and DRAIN (Bai et al., 2023a) uses a recurrent architecture to generate time-adaptive parameters. More recently, TDG has been formalized as a continuous-time setting (Cai et al., 2024), with emerging work exploring frequency-domain analysis of parameter trajectories (Yu et al., 2025) to better characterize temporal concept drift (Gama et al., 2014). Despite this progress, existing methods remain limited: those operating in the data space are often prone to overfitting to domain-specific noise, while those in the parameter space tend to become overly complex and less interpretable. Moreover, none explicitly model dynamic historical environments under non-stationary conditions, overlooking how past contextual information should be adaptively leveraged for future prediction. Continuous Dynamics and Frequency Learning. Continuous Dynamical Systems (CDS) model temporal evolution via differential equations, offering a natural framework for systems that evolve without discrete time steps. Neural extensions such as Neural ODEs (Chen et al., 2018b) and Latent ODEs (Rubanova et al., 2019) enable flexible, continuous-time representations in deep learning. In parallel, frequency-based learning methods analyze non-stationary temporal patterns by transforming signals into the spectral domain (Wu et al., 2021; Wu et al., 2023), uncovering periodic structures and multi-scale trends that remain obscured in raw time-domain data. For instance, prior works (Zhou et al., 2022; Ye et al., 2024; Yi et al., 2024) leverage spectral decomposition to explicitly disentangle temporal signals into low-frequency structures and high-frequency residuals or noise, and model these components separately to enhance both robustness and predictive performance. Despite their strengths, CDS-based approaches often overlook distribution shifts and structured contextual information, while spectral methods typically lack explicit dynamic modeling. These limitations motivate our core insight: integrating evolving dynamics with frequency-aware representations offers a promising pathway toward improved temporal generalization. 3 Problem Definition Temporal Domain Generalization (TDG) considers settings in which data distributions evolve over time, with the goal of generalizing to unseen future domains. During training, we are given a sequence of observed domains D(t1),D(t2),…,D(tT)\D(t_1),D(t_2),…,D(t_T)\, collected at arbitrary timestamps T=t1,t2,…,tTT=\t_1,t_2,…,t_T\, where ti∈ℝ+t_i ^+ and t1<t2<…<tTt_1<t_2<…<t_T. Each domain at timestamp t consists of NtN_t input-label pairs, t=(t(i),yt(i))i=1NtD_t=\(x_t^(i),y_t^(i))\_i=1^N_t, where (t(i),yt(i))∈t×t(x_t^(i),y_t^(i)) _t×Y_t and tX_t and tY_t denote the input and label spaces at timestamp t. We assume that each domain is sampled from a time-dependent distribution Pt(X,Y)P_t(X,Y), and that the observed sequence undergoes distribution drift over time. The objective is to leverage the observed domains to learn a predictive model f(⋅,θ)f(·;θ) that generalizes effectively to future, unseen OOD target domains associated with timestamps t′>tTt >t_T. 4 Methodology We present AdaSpecK, a spectral-Koopman framework with adaptive context extraction for TDG (Figure 2). First, it employs spectral-regularized Koopman dynamics modeling to mitigate domain-specific noise fitting. By applying spectral-aware filtering in a latent space, it extracts denoised, low-frequency trajectories and learns a compact Koopman operator to model future evolution in a robust, linearized space. Second, it incorporates a context-informed heterogeneous pattern extraction mechanism to model complex historical environments under non-stationary. By employing a target-conditioned attention, the model generates dynamic, task-specific historical summaries that attend to distinct subsets of the historical windows. Furthermore, a learned router utilizes environmental signatures to adaptively select the most informative historical information for future prediction. Figure 2: The overview of AdaSpecK. 4.1 Spectral-Regularized Koopman Dynamics Modeling Spectral-Aware Filtering in Latent Space. Direct data-space modeling in TDG often amplifies domain-specific artifacts and noise due to sparse and irregular observation timestamps. To better capture domain structure, we first map the raw observations into a shared latent space. For each domain t=(t(i),yt(i))i=1NtD_t=\(x_t^(i),y_t^(i))\_i=1^N_t observed at timestamp t, we encode all samples within this domain using a shared feature encoder fψ:t→ℝdf_ψ:X_t ^d and aggregate them into a domain-level representation that captures coherent domain structure while remaining robust to sample-level variability: ht=Aggregate(fψ(t(i))i=1Nt),t=1,…,Tc,h_t=Aggregate (\f_ψ(x_t^(i))\_i=1^N_t ), t=1,…,T_c, (1) where Aggregate(⋅)Aggregate(·) denotes domain-level pooling and TcT_c is the number of historical timestamps, yielding a latent trajectory 1:Tc=[h1,h2,…,hTc]⊤∈ℝTc×dh_1:T_c=[h_1,h_2,…,h_T_c] ^T_c× d. While the latent space provides a compact representation, the trajectory remains vulnerable to transient fluctuations that may cause the model to overfit to short-term temporal irregularities. Inspired by frequency-domain insights that system-level temporal trends predominantly reside in low-frequency components (Zhou et al., 2022; Ye et al., 2024), we transfer 1:Tch_1:T_c to frequency domain via a Discrete Fourier Transform (DFT): ~=ℱ(1:Tc)∈ℂTc×d, h=F(h_1:T_c) ^T_c× d, (2) where ℱ(⋅)F(·) denotes the DFT operator applied across the temporal dimension. To disentangle low- and high-frequency components, we introduce a spectral ratio β to control the proportion of preserved frequency modes. Let k=⌊βTc⌋k= β T_c denote the number of preserved frequency bins. We construct a binary mask ∈0,1TcM∈\0,1\^T_c that selects the k lowest-magnitude frequencies: [i]=1,if i∈β,0,otherwise,M[i]= cases1,&if i _β,\\ 0,&otherwise, cases (3) where βK_β is the index set corresponding to the k frequencies with the smallest magnitudes. The filtered spectrum is then obtained by applying this mask via the Hadamard product ⊙ : ~low=⊙~,~high=(−)⊙~, h_low=M h, h_high=(1-M) h, (4) Finally, applying the inverse DFT to the low-frequency spectrum yields the denoised trajectory: 1:Tc,low=ℱ−1(~low)∈ℝTc×d.h_1:T_c,low=F^-1( h_low) ^T_c× d. (5) By discarding high-frequency components that are often associated with sampling noise or domain-specific perturbations, we obtain a smooth, globally coherent representation that better reflects the intrinsic temporal dynamics of the system. This spectrally filtered latent trajectory enables subsequent structured dynamics modeling to focus on robust, slowly-evolving signals, thereby enhancing resilience to irregular domain shifts and improving generalization to future OOD domains. Dynamics Modeling via Koopman Operator. Conventional temporal dynamics models, such as recurrent neural networks or models based on ordinary differential equation (ODE), often struggle with highly nonlinear systems or suffer from numerical instability during long-horizon rollouts (Cai et al., 2024). Koopman theory offers a powerful alternative by asserting that nonlinear dynamics can be represented as a linear system in a sufficiently high-dimensional function space (Koopman, 1931; Brunton et al., 2022). Building on this insight, we encode the denoised trajectory 1:Tc,lowh_1:T_c,low into the Koopman space via a learnable encoder ϕφ, leverage a Koopman-style transition to model their future time evolution, and decode back to the latent space via a decoder ϕ−1φ^-1: zt,low=ϕ(ht,low),z^t+1,low=envzt,low,h^t+1,low=ϕ−1(z^t+1,low),z_t,low=φ(h_t,low), z_t+1,low=K_envz_t,low, h_t+1,low=φ^-1( z_t+1,low), (6) where envK_env is a trainable Koopman operator that captures the intrinsic system dynamics in the Koopman space. To ensure the Koopman operator accurately captures the underlying dynamics and maintains long-term stability, we employ a multi-faceted loss function composed of three complementary terms. First, we adopt the Koopman transition loss to enforce local fidelity of the dynamics in the Koopman space by penalizing one-step prediction errors: ℒkoop=∑t=1Tc−1‖zt+1,low−z^t+1,low‖22,L_koop= _t=1^T_c-1 \|z_t+1,low- z_t+1,low \|_2^2, (7) To guarantee that the Koopman-evolved states remain grounded in the original feature manifold, we supervise the decoded rollout in the hidden space against the ground-truth hidden states: ℒrec=∑t=1Tc−1‖ht+1,low−h^t+1,low‖22,L_rec= _t=1^T_c-1 \|h_t+1,low- h_t+1,low \|_2^2, (8) To mitigate error accumulation over extended horizons, we introduce a consistency constraint that aligns the ground-truth trajectories with the dynamic evolution in the latent space: ℒconsis=∑i=1Tc∑j=1i‖hi,low−hi,lowj→i‖2,L_consis= _i=1^T_c _j=1^i \|h_i,low-h_i,low^j→ i \|_2, (9) where hi,lowj→ih_i,low^j→ i denotes the latent state at step i propagated from the j-th anchor. This encourages the model to learn a coherent and path-independent dynamical trajectory, thereby improving robustness to temporal shifts and cumulative drift. Overall, the three losses play different but complementary roles, encouraging the latent dynamics to be both locally accurate and globally stable. 4.2 Context-Informed Heterogeneous Pattern Extraction Target-Conditioned Historical Summary. Data in TDG tasks often exhibit non-stationarity, as the underlying patterns evolve over time. This temporal drift complicates the modeling of dynamic temporal dependencies across shifting historical contexts and renders static, global representations inadequate for accurate long-term forecasting. To effectively capture diverse temporal dynamics and obtain robust historical patterns, we first aggregate domain-level representations 1:Tch_1:T_c from past domains into a unified contextual embedding EctxE_ctx: Ectx=gctx(concat[h1,h2,…,hTc]),E_ctx=g_ctx (concat[h_1,h_2,…,h_T_c] ), (10) where gctxg_ctx is a lightweight multilayer perceptron (MLP). Crucially, instead of relying on a fixed summary of the entire history, we introduce a target-conditioned attention mechanism. For each future prediction step τ∈1,…,Hτ∈\1,…,H\, we construct a dynamic query that encapsulates its anticipated state and its absolute timestep: Eτ,q=concat[z^τ,pτ],E_τ,q=concat [ z_τ,\,p_τ ], (11) where z^τ z_τ is obtained via rollout using the Koopman operator envK_env, and pτp_τ is a positional embedding that provides explicit temporal grounding. We then compute cross-attention between this query Eτ,qE_τ,q and the historical contextual embedding EctxE_ctx: Ehistory=softmax(Eτ,qWQ(EctxWK)T/dk)EctxWVE_history=softmax (E_τ,qW_Q (E_ctxW_K )^T/ d_k )E_ctxW_V (12) where WQ∈ℝd×dW_Q ^d× d, WK∈ℝd×dW_K ^d× d, WV∈ℝd×dW_V ^d× d are trainable projection matrices, and dkd_k denotes the key dimension used for scaling. This mechanism enables the model to selectively attend to semantically and temporally relevant segments of the historical context conditioned on each future step, rather than relying on a uniform historical abstraction. Consequently, the resulting representation EhistoryE_history serves as a dynamic, target-specific historical summary, which better captures temporal evolution patterns and provides more precise contextual support for subsequent prediction. Adaptive Perception via Environmental Signature. Although the historical summary provides a dynamic view of relevant past contexts, future target domains may still emphasize distinct contextual cues from historical environments. For example, some target domains may be primarily dominated by pronounced weekly cycles, whereas others may be more sensitive to recent transient events or seasonal variations. This discrepancy indicates that a universal historical encoding is insufficient for capturing heterogeneous temporal pattern extraction. Instead, the model should be able to adaptively reinterpret historical information according to the temporal characteristics of the emerging target environment. To facilitate such adaptive perception, we first construct a compact environmental signature from the predicted future trajectory. Specifically, for each future step τ∈1,…,Hτ∈\1,…,H\, we derive its low-frequency representation τ,lowh_τ,low following Eqs.(1)-(5). While temporal distributional shifts typically do not alter the physical mechanism of the system, they do break stable statistical regularity over time. As a result, periodicity, seasonality, and other temporal structures that are readily captured under stationarity may become obscured or highly volatile. To identify relatively stable structural cues under such shifts, we extract two key features from the low-frequency components: amplitude τ=Amp(τ,low)a_τ=Amp(h_τ,low), which reflects the strength of each periodic mode, and phase ϕτ=Phase(τ,low) φ_τ=Phase(h_τ,low), which encodes temporal alignment and structural sequencing. To ensure differentiability and avoid angular discontinuities, phase is represented via sine and cosine projections. The resulting environmental signature at time τ is defined as: Eτ,sig=[τ,sin(ϕτ),cos(ϕτ)].E_τ,sig= [a_τ,\, ( φ_τ),\, ( φ_τ) ]. (13) The environmental signature is then fed to an MLP-based router network grouteg_route: =groute(Eτ,sig), w=g_route (E_τ,sig ), (14) where ∈ℝK w ^K denotes Softmax-normalized expert weights. The target-conditioned historical summary EhistoryE_history is then routed via K experts and aggregated into a adaptive pattern representation: Epattern=∑k=1Kkgexpert,k(Ehistory),E_pattern= _k=1^K w_kg_expert,k(E_history), (15) To encourage experts to learn distinct and non-redundant temporal patterns, we introduce a semantic orthogonality loss ℒsemL_sem. This loss encourages the routing weight matrix WgateW_gate to maintain diverse semantic directions, preventing expert collapse where all experts converge to the same mean pattern: W=Wgate,K=normalize(W),G=KK⊤,ℒsem=MSE(G,I),W=W_gate, K=normalize(W), G=K , _sem=MSE(G,I), (16) where WgateW_gate is the final-layer weight matrix of the router and I is the identity matrix. The prediction head then fuses features of target sample EtargetE_target with EpatternE_pattern to yield the final prediction: y^=ghead([Etarget,Epattern]). y=g_head([E_target,E_pattern]). (17) Finally, the model is optimized using a composite objective comprising the task-specific loss ℒtaskL_task with multiple regularization terms: ℒtotal=ℒtask+λK(ℒkoop+ℒrec)+λSℒsem+λCℒconsis.L_total=L_task+ _K (L_koop+L_rec )+ _SL_sem+ _CL_consis. (18) where ℒtask=∑i=1Nℓ(yi,yi^)L_task= _i=1^N (y_i, y_i), using cross-entropy for classification and mean absolute error (MAE) for regression, and λK _K, λS _S, λC _C are hyperparameters controlling the relative contributions. 5 Experiments 5.1 Experiment Settings Datasets. Following Koodos (Cai et al., 2024) and FreKoo (Yu et al., 2025), we evaluate AdaSpecK on eight datasets spanning both classification and regression tasks. The five classification datasets include Rotated MNIST (Rot-MNIST) (Deng, 2012), Twitter Influenza Risk (Twitter) (Zhao et al., 2017; Bai et al., 2023b), and YearBook (Yao et al., 2022), Online News Popularity (ONP) (Fernandes et al., 2015), and Shuttle (UCI Machine Learning Repository, 2025); the three regression datasets consist of Tropical Cyclone Intensity (Cyclone) (Chen et al., 2018a), House Prices (House) (Cock, 2011), and ApplianceEnergy (Appliance) (Candanedo et al., 2017). These datasets capture diverse forms of temporal domain shift and real-world non-stationarity, providing a comprehensive benchmark for evaluation. More details of the datasets are provided in Appendix A.1. Table 1: Performance comparison on eight TDG datasets. Classification results are reported as error rates (%) except for Twitter (AUC); regression results report MAE. ’N/A’ denotes unsupported tasks. The best and second-best results are in bold and underlined. ↑ : higher is better, ↓ : lower is better. Model Classification Regression Rot-MNIST ↓ Twitter ↑ Yearbook ↓ ONP ↓ Shuttle ↓ Cyclone ↓ House ↓ Appliance ↓ Offline 6.6 ± 0.2 0.54 ± 0.09 8.6 ± 1.0 33.8 ± 0.6 0.77 ± 0.10 18.7 ± 1.4 19.9 ± 0.1 10.2 ± 1.1 LastDomain 74.2 ± 0.9 0.54 ± 0.12 11.3 ± 1.3 36.0 ± 0.2 0.91 ± 0.18 22.3 ± 0.7 20.6 ± 0.7 9.1 ± 0.7 IncFinetune 57.1 ± 1.4 0.52 ± 0.01 11.0 ± 0.8 34.0 ± 0.3 0.83 ± 0.07 19.9 ± 0.7 20.6 ± 0.2 8.9 ± 0.5 IRM 8.6 ± 0.4 0.53 ± 0.11 8.3 ± 0.5 45.1 ± 0.1 0.88 ± 0.08 18.0 ± 0.8 19.8 ± 0.2 5.5 ± 0.1 V-REx 8.6 ± 0.3 0.58 ± 0.05 8.9 ± 0.5 33.8 ± 0.1 1.90 ± 0.21 17.7 ± 0.5 20.2 ± 0.1 4.5 ± 0.1 CIDA 8.3 ± 0.7 0.63 ± 0.03 8.4 ± 0.8 34.7 ± 0.6 7.71 ± 0.12 17.0 ± 0.4 10.2 ± 1.0 8.7 ± 0.2 TKNets 37.7 ± 2.0 0.57 ± 0.04 8.4 ± 0.3 33.7 ± 0.2 0.94 ± 0.28 N/A N/A N/A DRAIN 59.1 ± 2.3 0.57 ± 0.04 10.5 ± 1.0 38.3 ± 1.2 0.26 ± 0.05 23.6 ± 0.5 9.8 ± 0.1 6.4 ± 0.4 DRAIN-Δt t 57.2 ± 1.8 0.59 ± 0.02 11.0 ± 1.2 38.5 ± 1.1 0.25 ± 0.05 26.2 ± 4.6 9.9 ± 0.1 6.5 ± 0.4 DeepODE 48.6 ± 3.2 0.64 ± 0.02 8.8 ± 2.2 33.6 ± 0.2 2.88 ± 0.71 18.5 ± 3.3 10.7 ± 0.4 4.5 ± 0.1 Koodos 4.8 ± 0.3 0.69 ± 0.02 5.9 ± 0.7 33.5 ± 0.4 0.24 ± 0.04 16.1 ± 1.8 9.0 ± 0.4 4.8 ± 0.3 Frekoo 4.7 ± 0.2 0.71 ± 0.02 13.3 ± 0.8 34.2 ± 0.3 0.20 ± 0.02 19.5 ± 0.2 9.0 ± 0.1 5.4 ± 1.1 AdaSpecK 4.5 ± 0.2 0.74 ± 0.02 4.5 ± 0.5 33.3 ± 0.2 0.18 ± 0.02 9.3 ± 0.8 8.9 ± 0.3 4.3 ± 0.1 Baselines. We compare our method against baselines from three representative categories: (1) Time-agnostic methods, including Offline (Cai et al., 2024; Yu et al., 2025), LastDomain (Cai et al., 2024; Yu et al., 2025), IncFinetune (Cai et al., 2024; Yu et al., 2025), IRM (Arjovsky et al., 2019), and V-REx (Krueger et al., 2021); (2) Discrete temporal domain adaptation/generalization methods, including CIDA (Wang et al., 2020), TKNets (Zeng et al., 2024), DRAIN, and DRAIN-Δt t (Bai et al., 2023a); and (3) Continuous temporal domain generalization methods, including DeepODE (Chen et al., 2018b; Rubanova et al., 2019), Koodos (Cai et al., 2024) and Frekoo (Yu et al., 2025). For any baseline that does not support a particular dataset, we report its result as N/A in Table 1. Implementation details. AdaSpecK is implemented in PyTorch and trained on an NVIDIA GeForce RTX 3090 GPU. We use the Adam optimizer with cosine annealing (learning rate of 5×10−45× 10^-4, weight decay of 0.0050.005). We set the feature dimension d=32d=32, the low-frequency ratio β=0.40β=0.40. The expert count K is set to 4 for Twitter, House, ONP, and Appliance, and 8 for Rotated MNIST, YearBook, Cyclone, and Shuttle. Additional details are provided in the Appendix A.3. Metrics. For classification tasks, we report the error rate (%), which measures the proportion of incorrectly predicted labels. Due to severe label imbalance in the Twitter dataset, we instead use the Area Under the Curve (AUC) of the Receiver Operating Characteristic (ROC) curve. For regression tasks, performance is measured by Mean Absolute Error (MAE). All models are trained on training domains and then evaluated on unseen test domains to assess their generalization capability across temporal shifts. To ensure statistical reliability, each method is run five times with different random seeds, and we report the mean and standard deviation of the evaluation metrics across these runs. (a) Sensitivity of λK _K (b) Sensitivity of λS _S (c) Sensitivity of λC _C Figure 3: Sensitivity analysis of loss weight λK _K, λS _S, λC _C. 5.2 Experimental Results Main Results. Table 1 shows that AdaSpecK achieves the best performance across all eight benchmarks, highlighting its superior capability in handling non-stationary temporal shifts. Time-agnostic baselines (e.g., Offline, LastDomain, and IncFinetune) suffer significant performance degradation on long-horizon datasets, confirming that naive reuse of historical data is inadequate under evolving temporal drift. Compared to state-of-the-art continuous TDG baselines (e.g., Koodos and Frekoo), AdaSpecK demonstrates consistent superiority. Notably, our method achieves the most substantial gains on Twitter, YearBook, Cyclone, and Appliance, where the datasets are characterized by multi-step future evolution. This resilience suggests that our learned latent dynamics provide a more stable and robust representation of temporal evolution than approaches relying solely on short-range interpolation or adjacent-domain transitions, avoiding overfitting to domain-specific artifacts or local noise. Moreover, AdaSpecK explicitly models evolving historical contexts through a context-informed, heterogeneous pattern extraction mechanism, adaptively determining how past information should be leveraged for future prediction. In summary, the proposed spectral-Koopman framework with adaptive context extraction not only improves average predictive accuracy but also enhances robustness and stability under persistent temporal distribution shifts. Table 2: Ablation study of AdaSpecK. The best and second-best results are in bold and underlined. Variants Classification Regression Rot-MNIST ↓ Twitter ↑ YearBook ↓ Cyclone ↓ House ↓ w/o Koop. 4.8 0.67 4.8 10.8 9.1 w/o Spec. 4.9 0.63 4.8 10.6 9.0 w/o EhistoryE_history 4.8 0.70 4.9 10.5 9.2 w/o Eτ,sigE_τ,sig 4.7 0.68 5.3 9.6 8.9 w/o ℒkoopL_koop 5.1 0.69 6.2 9.9 9.0 w/o ℒrecL_rec 4.9 0.69 5.2 10.9 9.0 w/o ℒsemL_sem 5.0 0.65 5.3 10.5 9.1 w/o ℒconsisL_consis 8.4 0.66 5.4 10.5 9.0 AdaSpecK 4.5 ± 0.2 0.74 ± 0.02 4.5 ± 0.5 9.3 ± 0.8 8.9 ± 0.3 Ablation Study. Table 2 validates the necessity of each proposed component. Regarding architecture, modeling dynamics directly in latent space without Koopman (w/o Koop.) degrades performance, confirming its role in enabling effective learning by mapping dynamics into a robust, linearized subspace. Removing spectral-aware filtering (w/o Spec.) also harms results, highlighting the importance of frequency separation for isolating slowly-varying structures critical to temporal extrapolation. Ablating dynamic target-conditioned historical summary (w/o EhistoryE_history) or environmental signatures in the context router (w/o Eτ,sigE_τ,sig) both lead to suboptimal results, underscoring the value of adaptive historical modeling and environment-aware routing. Loss ablations further demonstrate the importance of each objective, with the full loss integration yielding the best results. 5.3 Further Analysis Figure 4: Visualization of decision boundaries on YearBook. Blue and red dots represent different data classes. Rows: our method vs. baselines; columns: different test domains over time. Sensitivity Analysis. We examine the impact of loss weights λK _K, λS _S, λC _C on diverse datasets (Cyclone, House, Appliance). As shown in Figure 3, a consistent pattern is that moderate coefficients lead to the best or near-best performance, whereas overly large coefficients slightly degrade accuracy, especially on Cyclone. This confirms that the auxiliary objectives serve as effective structural regularizers, with optimal results achieved under balanced weighting. Decision Boundary Visualization. Figure 4 compares the decision regions of AdaSpecK, Koodos, and DeepODE on the YearBook test domains. Visually, AdaSpecK produces smoother boundaries that better reflect the underlying class separation while adapting to domain-specific shifts. In contrast, Koodos shows locally distorted or biased toward one cluster, and DeepODE fails to track evolving class geometry. The per-domain error annotations further show that AdaSpecK maintains consistent performance across target domains. Together, these findings demonstrate that AdaSpecK’s integration of spectral-regularized Koopman dynamics modeling and target-conditioned context extraction effectively captures temporally evolving decision structures. (a) Impact of Spectral Ratio (b) MNIST & YearBook (c) Cyclone & House Figure 5: (a) Impact of the spectral ratio β; (b, c) Choice of the number of experts. Impact of Spectral ratio. Figure 5(a) illustrates the effect of the spectral cutoff ratio β. We observe that performance is suboptimal with an excessively small β, while a moderate ratio yields peak performance. However, further increasing β leads to a noticeable decline in accuracy. This trend aligns with the design principles of spectral decomposition: the low-frequency branch must preserve denoised slowly-varying temporal structures conducive to Koopman dynamic modeling, while preventing the inclusion of high-frequency noise that could impair model stability. Choice of Expert Numbers. We study the impact of expert number K∈[2,4,6,8,10]K∈[2,4,6,8,10] (Figure 5(b) and 5(c)). A small K fails to adequately capture the diversity of heterogeneous historical patterns, while a large K increases computational cost and complexity, potentially leading to overfitting and degraded results. Overall, K in the range of 4-8 offers the best balance and is ideal for practical use. 6 Conclusion This paper proposes AdaSpecK, a spectral-Koopman framework with adaptive context extraction for temporal domain generalization. To mitigate noise fitting to irregular sampling, we introduce spectral-regularized Koopman dynamics modeling. It applies spectral-aware filtering in a latent space to extract denoised low-frequency trajectories and learns a compact Koopman operator to model system dynamics in a robust, linearized space. To handle non-stationarity in historical contexts, we design a context-informed heterogeneous pattern extraction mechanism. A target-conditioned attention module enables each future timestep to attend to distinct subsets of the historical windows, while an environmental signature derived from the current evolutionary pattern guides a learned router to adaptively identify the most predictive past context. Extensive experiments across eight classification and regression benchmarks show that AdaSpecK achieves SOTA performance. AI use statement In this work, we used generative AI tools to improve the clarity, grammar, and overall quality of the writing. We have not used generative AI tools for generating the core ideas, formulating the research questions, and developing the methodology. We have reviewed and edited all AI-assisted work. In particular, we examined the correctness, logical coherence, and contextual appropriateness of any AI-generated text to ensure that it accurately reflected our intended meaning and met academic standards. We take responsibility for the final content of this work, including text, claims or artifacts produced with the aid of generative AI. Ethics statement This work is conducted entirely on publicly available benchmark datasets, as detailed in the paper, and does not involve the release of any personal or sensitive information. No human subjects are involved in this research, ensuring that our work complies with ethical standards in research integrity. Reproducibility statement All experiments in this work are conducted on publicly available benchmark datasets, and the reported performance of AdaSpecK is fully reproducible. Details of model architecture, training procedures, and evaluation protocols are provided in the main text and appendix. To further facilitate reproducibility, we release the code and datasets at https://anonymous.4open.science/r/Ada-Spec-K. References Arjovsky et al. (2019) M. Arjovsky, L. Bottou, I. Gulrajani, and D. Lopez-Paz Invariant risk minimization. CoRR abs/1907.02893. Cited by: §A.2, §5.1. Bai et al. (2023a) G. Bai, C. Ling, and L. Zhao Temporal domain generalization with drift-aware dynamic neural networks. In ICLR, Cited by: §A.2, §2, §5.1. Bai et al. (2023b) G. Bai, J. Torres, J. Wang, L. Zhao, C. L. Abad, and C. Vaca Sign-regularized multi-task learning. In Proceedings of the 2023 SIAM International Conference on Data Mining, SDM, p. 793–801. Cited by: §5.1. Balaji et al. (2018) Y. Balaji, S. Sankaranarayanan, and R. Chellappa MetaReg: towards domain generalization using meta-regularization. In NeurIPS, p. 1006–1016. Cited by: §2. Brunton et al. (2022) S. L. Brunton, M. Budisic, E. Kaiser, and J. N. Kutz Modern koopman theory for dynamical systems. SIAM Rev. 64 (2), p. 229–340. Cited by: §4.1. Cai et al. (2024) Z. Cai, G. Bai, R. Jiang, X. Song, and L. Zhao Continuous temporal domain generalization. In NeurIPS, Cited by: 1st item, 2nd item, 4th item, 5th item, 7th item, §A.1, §A.2, §1, §1, §2, §4.1, §5.1, §5.1. Cai et al. (2023) Z. Cai, R. Jiang, X. Yang, Z. Wang, D. Guo, H. H. Kobayashi, X. Song, and R. Shibasaki MemDA: forecasting urban time series with memory-based drift adaptation. In CIKM, p. 193–202. Cited by: §2. Candanedo et al. (2017) L. M. Candanedo, V. Feldheim, and D. Deramaix Data driven prediction models of energy use of appliances in a low-energy house. Energy and Buildings 140, p. 81–97. External Links: Document Cited by: 8th item, §5.1. Chen et al. (2018a) B. Chen, B. Chen, and H. Lin Rotation-blended cnns on a new open dataset for tropical cyclone image-to-intensity regression. In SIGKDD, p. 90–99. Cited by: §5.1. Chen et al. (2018b) T. Q. Chen, Y. Rubanova, J. Bettencourt, and D. Duvenaud Neural ordinary differential equations. In NeurIPS 2018, p. 6572–6583. Cited by: §A.2, §2, §5.1. Cock (2011) D. D. Cock Ames, iowa: alternative to the boston housing data as an end of semester regression project. Journal of Statistics Education 19 (3). External Links: Document Cited by: 5th item, §5.1. Deng (2012) L. Deng The MNIST database of handwritten digit images for machine learning research [best of the web]. IEEE Signal Process. Mag. 29 (6), p. 141–142. Cited by: 1st item, §5.1. Dou et al. (2019) Q. Dou, D. C. de Castro, K. Kamnitsas, and B. Glocker Domain generalization via model-agnostic learning of semantic features. In NeurIPS, p. 6447–6458. Cited by: §2. Fernandes et al. (2015) K. Fernandes, P. Vinagre, and P. Cortez A proactive intelligent decision support system for predicting the popularity of online news. In Progress in Artificial Intelligence, Lecture Notes in Computer Science, Vol. 9273, p. 535–546. External Links: Document Cited by: 6th item, §5.1. Gama et al. (2014) J. Gama, I. Zliobaite, A. Bifet, M. Pechenizkiy, and A. Bouchachia A survey on concept drift adaptation. ACM Comput. Surv. 46 (4), p. 44:1–44:37. Cited by: §1, §1, §2. Gong et al. (2019) R. Gong, W. Li, Y. Chen, and L. V. Gool DLOW: domain flow for adaptation and generalization. In CVPR, p. 2477–2486. Cited by: §1, §2. Gulrajani and Lopez-Paz (2021) I. Gulrajani and D. Lopez-Paz In search of lost domain generalization. In ICLR, Cited by: §2. Han et al. (2024) E. Han, C. Huang, and K. Wang Model assessment and selection under temporal distribution shift. In ICML, Proceedings of Machine Learning Research, p. 17374–17392. Cited by: §1. Koopman (1931) B. O. Koopman Hamiltonian systems and transformation in hilbert space. Proceedings of the National Academy of Sciences 17 (5), p. 315–318. External Links: Document Cited by: §4.1. Krueger et al. (2021) D. Krueger, E. Caballero, J. Jacobsen, A. Zhang, J. Binas, D. Zhang, R. L. Priol, and A. C. Courville Out-of-distribution generalization via risk extrapolation (REx). In ICML, p. 5815–5826. Cited by: §A.2, §5.1. Li et al. (2017) D. Li, Y. Yang, Y. Song, and T. M. Hospedales Deeper, broader and artier domain generalization. In ICCV, p. 5543–5551. Cited by: §2. Li et al. (2018a) D. Li, Y. Yang, Y. Song, and T. M. Hospedales Learning to generalize: meta-learning for domain generalization. In AAAI, p. 3490–3497. Cited by: §2. Li et al. (2020) D. Li, Y. Yang, Y. Song, and T. M. Hospedales Sequential learning for domain generalization. In ECCV 2020 Workshops, A. Bartoli and A. Fusiello (Eds.), Lecture Notes in Computer Science, p. 603–619. Cited by: §2. Li et al. (2018b) W. Li, Z. Xu, D. Xu, D. Dai, and L. V. Gool Domain generalization and adaptation using low rank exemplar svms. IEEE transactions on pattern analysis and machine intelligence 40 (5), p. 1114–1127. Cited by: §2. Liu et al. (2018) A. H. Liu, Y. Liu, Y. Yeh, and Y. F. Wang A unified feature disentangler for multi-domain image translation and manipulation. In NeurIPS, p. 2595–2604. Cited by: §1, §2. Lu et al. (2019) J. Lu, A. Liu, F. Dong, F. Gu, J. Gama, and G. Zhang Learning under concept drift: A review. IEEE transactions on knowledge and data engineering 31 (12), p. 2346–2363. Cited by: §1, §1. Mancini et al. (2018) M. Mancini, S. R. Bulò, B. Caputo, and E. Ricci Best sources forward: domain generalization through source-specific nets. In ICIP, p. 1353–1357. Cited by: §2. Motiian et al. (2017) S. Motiian, M. Piccirilli, D. A. Adjeroh, and G. Doretto Unified deep supervised domain adaptation and generalization. In ICCV, p. 5716–5726. Cited by: §2. Muandet et al. (2013) K. Muandet, D. Balduzzi, and B. Schölkopf Domain generalization via invariant feature representation. In ICML, p. 10–18. Cited by: §2. Nasery et al. (2021) A. Nasery, S. Thakur, V. Piratla, A. De, and S. Sarawagi Training for the future: A simple gradient interpolation loss to generalize along time. In NeurIPS, p. 19198–19209. Cited by: §1, §2. Qiao et al. (2020) F. Qiao, L. Zhao, and X. Peng Learning to learn single domain generalization. In CVPR, p. 12553–12562. Cited by: §2. Qin et al. (2022) T. Qin, S. Wang, and H. Li Generalizing to evolving domains with latent structure-aware sequential autoencoder. In ICML, Proceedings of Machine Learning Research, p. 18062–18082. Cited by: §2. Rubanova et al. (2019) Y. Rubanova, R. T. Q. Chen, and D. Duvenaud Latent odes for irregularly-sampled time series. CoRR abs/1907.03907. External Links: Link, 1907.03907 Cited by: §A.2, §2, §5.1. UCI Machine Learning Repository (2025) UCI Machine Learning Repository Statlog (shuttle) [dataset]. Note: Accessed: 2026-05-02 External Links: Document, Link Cited by: 7th item, §5.1. Wang et al. (2020) H. Wang, H. He, and D. Katabi Continuously indexed domain adaptation. In ICML, Vol. 119, p. 9898–9907. Cited by: §A.2, §5.1. Wang et al. (2023a) J. Wang, C. Lan, C. Liu, Y. Ouyang, T. Qin, W. Lu, Y. Chen, W. Zeng, and P. S. Yu Generalizing to unseen domains: A survey on domain generalization. IEEE transactions on knowledge and data engineering 35 (8), p. 8052–8072. Cited by: §2. Wang et al. (2025) J. Wang, Z. Ren, R. Zhan, and Z. Zhou Distributionally robust policy learning under concept drifts. In ICML, PMLR. Cited by: §1, §1. Wang et al. (2023b) R. Wang, Y. Dong, S. Ö. Arik, and R. Yu Koopman neural operator forecaster for time-series with temporal distributional shifts. In ICLR, Cited by: §1. Wu et al. (2023) H. Wu, T. Hu, Y. Liu, H. Zhou, J. Wang, and M. Long TimesNet: temporal 2d-variation modeling for general time series analysis. In ICLR, Cited by: §2. Wu et al. (2021) H. Wu, J. Xu, J. Wang, and M. Long Autoformer: decomposition transformers with auto-correlation for long-term series forecasting. In NeurIPS, p. 22419–22430. Cited by: §2. Yao et al. (2022) H. Yao, C. Choi, B. Cao, Y. Lee, P. W. Koh, and C. Finn Wild-time: a benchmark of in-the-wild distribution shift over time. In NeurIPS, Vol. 35, p. 10309–10324. Cited by: 3rd item, §5.1. Ye et al. (2024) W. Ye, S. Deng, Q. Zou, and N. Gui Frequency adaptive normalization for non-stationary time series forecasting. In NeurIPS, Cited by: §2, §4.1. Yi et al. (2024) K. Yi, J. Fei, Q. Zhang, H. He, S. Hao, D. Lian, and W. Fan FilterNet: harnessing frequency filters for time series forecasting. In NeurIPS, Cited by: §2. Yu et al. (2022) D. Yu, G. Bai, Y. Li, and L. Zhao Deep spatial domain generalization. In ICDM, X. Zhu, S. Ranka, M. T. Thai, T. Washio, and X. Wu (Eds.), p. 1293–1298. Cited by: §2. Yu et al. (2025) E. Yu, J. Lu, X. Yang, G. Zhang, and Z. Fang Learning robust spectral dynamics for temporal domain generalization. arXiv preprint arXiv:2505.12585. Cited by: 1st item, 2nd item, 4th item, 5th item, 7th item, §A.1, §A.2, §1, §2, §5.1, §5.1. Zeng et al. (2024) Q. Zeng, W. Wang, F. Zhou, G. Xu, R. Pu, C. Shui, C. Gagné, S. Yang, C. X. Ling, and B. Wang Generalizing across temporal domains with koopman operators. AAAI 38 (15), p. 16651–16659. Cited by: §A.2, §1, §2, §5.1. Zhao et al. (2017) L. Zhao, Q. Sun, J. Ye, F. Chen, C. Lu, and N. Ramakrishnan Feature constrained multi-task learning models for spatiotemporal event forecasting. IEEE Transactions on Knowledge and Data Engineering 29 (5), p. 1059–1072. Cited by: §5.1. Zhou et al. (2022) T. Zhou, Z. Ma, Q. Wen, X. Wang, L. Sun, and R. Jin FEDformer: frequency enhanced decomposed transformer for long-term series forecasting. In ICML, p. 27268–27286. Cited by: §2, §4.1. Appendix A Appendix A.1 Datasets Following Koodos (Cai et al., 2024) and FreKoo (Yu et al., 2025), and focusing on the datasets that are both discussed in the two reference papers and implemented in the new codebase, we evaluate AdaSpecK on eight benchmarks covering classification and regression under different temporal drift patterns. Their main characteristics are summarized as follows: • Rotated MNIST (Rot-MNIST). This is a synthetic image classification benchmark built from MNIST digits (Deng, 2012), where concept drift is created by gradually rotating the images across domains as in the temporal benchmark protocols of Koodos (Cai et al., 2024) and FreKoo (Yu et al., 2025). The domains are temporally ordered, and the prediction target always lies in later unseen domains. Its main difficulty comes from a steadily increasing geometric transformation rather than label noise. • Twitter. This dataset uses tweet streams to estimate influenza activity. The domains correspond to temporally separated collection windows during multiple flu seasons, so the drift is driven by changes in tweet volume, seasonal disease activity, and evolving user behavior (Cai et al., 2024; Yu et al., 2025). Compared with synthetic rotation datasets, it reflects a real-world temporally evolving classification problem with stronger non-stationarity. • YearBook. This is a gender classification benchmark built from frontal yearbook portraits collected over many decades, following the YearBook temporal-shift benchmark in Wild-Time (Yao et al., 2022). Each domain corresponds to one sampled year in chronological order. The drift arises from long-term changes in clothing, hairstyle, imaging quality, and broader social norms, making it a representative visual benchmark with slow but persistent temporal shift. • Cyclone. This regression dataset predicts tropical cyclone intensity from satellite imagery. Each domain is associated with temporally ordered cyclone observations, and the shift is induced by seasonal and regional variations in storm appearance and wind intensity (Cai et al., 2024; Yu et al., 2025). It is therefore a visually complex forecasting benchmark with substantial temporal variation. • House. This regression benchmark predicts house prices from tabular features collected over multiple years. The domains are organized chronologically, and the underlying drift mainly reflects changing market conditions and temporal economic variation, making it a real-world nonstationary tabular dataset (Cock, 2011; Cai et al., 2024; Yu et al., 2025). • Online News Popularity (ONP). This classification dataset contains news articles from Mashable with 58 heterogeneous features, and the task is to predict article popularity (Fernandes et al., 2015). The data are split into time-ordered domains over roughly two years, with the first five domains used for training and the last one for testing in the TDG protocol. Its drift is relatively mild compared with the other benchmarks, but it still captures gradual changes in how content attracts social attention over time. • Shuttle. This dataset is a temporally ordered multi-class classification benchmark derived from flight-status data and is known for its strong class imbalance (UCI Machine Learning Repository, 2025; Cai et al., 2024; Yu et al., 2025). The domains are formed chronologically, with earlier periods used for training and the latest period used for testing. The challenge comes from real-world distribution changes in operational patterns over time rather than from manually constructed perturbations. • ApplianceEnergy (Appliance). This regression benchmark predicts appliance energy consumption from indoor sensor readings in a low-energy building (Candanedo et al., 2017). The data are recorded at 10-minute intervals over several months and then partitioned into chronological domains. The drift is associated with changing usage behavior and environmental conditions across time, which makes it a practical benchmark for periodic and real-world temporal variation. A.2 Baseline We compare AdaSpecK with several families of baselines that reflect different ways of handling temporal drift. Offline, LastDomain, and IncFinetune follow the standard non-temporal or sequential training baselines used in recent TDG studies (Cai et al., 2024; Yu et al., 2025), where Offline trains a single model on the union of all source domains and ignores temporal order entirely, LastDomain uses only the most recent observed source domain to test whether short-range recency alone is sufficient, and IncFinetune updates the predictor sequentially from earlier to later domains as a practical continual-training baseline. IRM and V-REx are invariant-learning methods that aim to suppress domain-specific shortcuts by favoring predictors whose risks are stable across source domains (Arjovsky et al., 2019; Krueger et al., 2021), although they do not explicitly model domain evolution over time. CIDA incorporates temporal or domain information as a continuous conditioning variable and aligns representations across domains (Wang et al., 2020), while TKNets models transitions between temporally ordered domains through a dedicated temporal transfer mechanism (Zeng et al., 2024). DRAIN and DRAIN-Δt t forecast future predictors by learning parameter dynamics from the observed domain sequence, with the latter additionally incorporating time-gap information for non-uniform intervals (Bai et al., 2023a). DeepODE models temporal evolution in a latent dynamical system defined by neural ordinary differential equations (Chen et al., 2018b; Rubanova et al., 2019), and Koodos introduces Koopman-space parameter evolution with structured dynamic constraints (Cai et al., 2024). We also report FreKoo as a strong recent temporal generalization reference that combines spectral decomposition and Koopman modeling to separate low-frequency temporal structure from high-frequency variations (Yu et al., 2025). Together, these methods cover time-agnostic training, invariant learning, temporal alignment, parameter-forecasting approaches, and frequency-aware temporal dynamics. A.3 Implementation Details All results were averaged over 5 independent runs and we report the mean and standard deviation. We implement AdaSpecK in PyTorch and conduct all experiments on a 64-bit machine with an NVIDIA GeForce RTX 3090 GPU. Consistent with the summary in the main text, we use Adam with cosine learning-rate annealing, set the environment embedding dimension to 32, fix the low-frequency ratio to 0.40, use RK4 with step size 0.2, adopt a learning rate of 0.0005 and weight decay of 0.005 across datasets, and use 4 experts for Twitter and the relatively simpler tabular benchmarks (House, ONP, and Appliance) and 8 experts for Rotated MNIST, YearBook, Cyclone, and Shuttle. The remaining dataset-specific architectural and dimensional settings are as follows: 1. Rotated MNIST. We use 35 training domains, temporal segments of length 20, and a 15-step target horizon. The shared backbone is a 3-layer CNN with channel widths [32,32,64][32,32,64], where each convolution is followed by ReLU and max pooling, and a dropout layer is applied after flattening. We train for 200 epochs with batch size 1. The latent dimension is 64, the hidden dimension is 256, the number of experts is 8, the spectral bin number is 5, and the Koopman rollout length is 15. 2. Twitter. We use 35 training domains, segment length 20, and a 15-step target horizon. The backbone first embeds the categorical state feature with a 10-dimensional embedding and then applies a 3-layer MLP with hidden widths 256256 and 128128 to produce a 64-dimensional representation. We train for 200 epochs with batch size 1. The latent dimension is 64, the hidden dimension is 128, the number of experts is 4, the spectral bin number is 4, and the Koopman rollout length is 10. 3. YearBook. We use 28 training domains, segment length 20, and a 12-step target horizon. The backbone is a 3-stage CNN with batch normalization and channel widths [64,128,256][64,128,256], followed by a linear projection to 1024 dimensions and dropout. We train for 170 epochs with batch size 1. The latent dimension is 128, the hidden dimension is 256, the number of experts is 8, the spectral bin number is 5, and the Koopman rollout length is 15. 4. Cyclone. We use 50 training domains, segment length 20, and a 22-step target horizon. The backbone is a 4-layer CNN with channel widths [32,32,64,64][32,32,64,64], where each block uses ReLU and max pooling, followed by flattening and dropout. We train for 100 epochs with batch size 1. The latent dimension is 128, the hidden dimension is 384, the number of experts is 8, the spectral bin number is 6, and the Koopman rollout length is 15. 5. House. We use 28 training domains, segment length 20, and a 12-step target horizon. For this tabular dataset, the backbone is the identity mapping and the predictor operates directly on the 50-dimensional input features. We train for 100 epochs with batch size 1. The latent dimension is 64, the hidden dimension is 256, the number of experts is 4, the spectral bin number is 5, and the Koopman rollout length is 6. 6. ONP. We use 5 training domains, temporal segments of length 4, and a 1-step target horizon. The model uses the raw 58-dimensional tabular features as input without an additional backbone. We train for 700 epochs with batch size 2. The latent dimension is 64, the hidden dimension is 256, the number of experts is 4, the spectral bin number is 5, and the Koopman rollout length is 3. 7. Shuttle. We use 7 training domains, temporal segments of length 4, and a 1-step target horizon. The model takes the 9-dimensional tabular features directly as input. We train for 350 epochs with batch size 2. The latent dimension is 64, the hidden dimension is 256, the number of experts is 8, the spectral bin number is 5, and the Koopman rollout length is 5. 8. Appliance. We use 8 training domains, temporal segments of length 4, and a 1-step target horizon. The model directly uses the 37-dimensional tabular features. We train for 500 epochs with batch size 2. The latent dimension is 64, the hidden dimension is 256, the number of experts is 4, the spectral bin number is 5, and the Koopman rollout length is 3.