Continuous Temporal Domain Generalization

Zekun Cai, Guangji Bai, Renhe Jiang, Xuan Song, Liang Zhao

Abstract

In real-world applications, data distributions frequently shift over continuous and often irregular time intervals. While Domain Generalization (DG) seeks to build models robust to unseen data, Temporal Domain Generalization (TDG) specifically addresses shifts correlated with time. However, existing TDG methods often discretize time into fixed intervals, failing to capture the continuous evolution of data. This paper introduces Continuous Temporal Domain Generalization (CTDG) and proposes Koodos, a framework that utilizes Koopman operator theory to map complex, high-dimensional model dynamics into a linearized latent space. By treating model parameter evolution as a continuous trajectory governed by Neural ODEs, Koodos significantly outperforms traditional discrete-time approaches in predicting future domain states.

Introduction: The Challenge of Continuous Concept Drift

Data distributions in the real world are rarely static—a phenomenon known as concept drift. Whether it's fashion trends evolving over decades or influenza risks fluctuating seasonally, these shifts are inherently tied to the passage of time. Traditional TDG methods treat time as a sequence of discrete "buckets" (e.g., years or months). This approach falters when data is collected irregularly, such as medical records from sporadic hospital visits or social media activity triggered by unpredictable events.

The authors argue for a shift toward modeling the continuous evolution of both data and the model. Instead of jumping between discrete time points, a robust system should account for the "flow" of change, allowing for generalization to any arbitrary point in time.

Methodology: The Koodos Framework

To address the limitations of discrete modeling, the authors propose Koodos (Koopman operator-driven continuous temporal domain generalization). The framework rests on three primary pillars:

  1. Neural ODEs for Model Dynamics: Koodos treats the evolution of model parameters ($\theta$) as a continuous trajectory. Instead of predicting discrete weights, it models the derivative of the parameters with respect to time using an Ordinary Differential Equation (ODE).
  2. Koopman Operator Theory: Modeling nonlinear dynamics in high-dimensional neural network parameter spaces is computationally intensive. Koodos employs an encoder ($\phi$) to map these parameters into a "Koopman-invariant" latent space. In this space, the complex nonlinear dynamics become linear, making the model's evolution mathematically manageable and predictable.
  3. Joint Optimization with Inductive Bias: The system is trained using a multi-part loss function. This ensures accurate predictions ($L_{intri}$), effective parameter reconstruction ($L_{recon}$), and consistency with linear Koopman transitions ($L_{dyna}$ and $L_{consis}$). This structure also allows users to inject prior knowledge, such as periodicity, to stabilize long-term evolution.
The Koodos architecture maps data distributions to model parameters, which are then evolved in a linearized Koopman latent space.

Experimental Evaluation

The researchers evaluated Koodos across a diverse set of synthetic and real-world datasets characterized by temporal shifts:

  • Synthetic: Rotated 2-Moons and Rotated MNIST, where data rotates continuously over time.
  • Social Media: Twitter Influenza Risk, predicting flu intensity from irregularly timed tweets.
  • Historical Data: Yearbook portraits (1930–2013) for gender classification.
  • Environmental & Economic: Cyclone intensity (event-triggered satellite imagery) and House Prices (irregularly sampled sales data).

Key Results and Insights

Koodos consistently outperformed both standard domain generalization baselines (like IRM) and state-of-the-art temporal methods (like DRAIN and CIDA).

Performance comparison of Koodos against various baselines across classification and regression tasks.

Performance Highlights

  • Accuracy: On the Rotated 2-Moons task, Koodos achieved a remarkably low 2.8% error rate, vastly superior to other continuous methods like DeepODE (17.8%) and discrete methods like DRAIN-$\Delta t$ (46.2%).
  • Stability and Robustness: By linearizing dynamics in the Koopman space, Koodos prevents the model from diverging into chaotic states during long-term extrapolation. The eigenvalues of the Koopman operator provide a formal mechanism to guarantee model stability.
  • Theoretical Advantage: The paper proves that continuous-time ODE-based methods inherently have lower approximation errors for temporal drift compared to discrete-time methods like RNNs, as they account for the integral of changes over time.

Conclusion

Koodos represents a significant step forward in temporal domain generalization by embracing the continuous nature of time. By synchronizing "Model Flow" with "Data Flow" through Neural ODEs and Koopman theory, the framework provides a robust solution for irregular data streams. While the current approach assumes smooth concept drift, future work may explore handling discontinuous "black swan" events or scaling the framework to even larger, more heterogeneous temporal domains.

Summary updated

BibTeX
@inproceedings{cai2024continuous,
  author = {Zekun Cai and Guangji Bai and Renhe Jiang and Xuan Song and Liang Zhao},
  title = {{Continuous Temporal Domain Generalization}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2024},
  url = {https://openreview.net/forum?id=G24fOpC3JE},
}
Figure