Adversarial Spectral Kernel Matching for Unsupervised Time Series Domain Adaptation

Qiao Liu, Hui Xue

Introduction

Unsupervised Domain Adaptation (UDA) is a critical technique for deploying machine learning models in real-world scenarios where data distributions shift. In time series analysis, this often involves transferring knowledge from a labeled "source" domain (e.g., a specific user or device) to an unlabeled "target" domain. Most existing UDA methods attempt to align these domains by minimizing a discrepancy metric, such as Maximum Mean Discrepancy (MMD).

However, time series data presents unique challenges: it is often non-stationary and non-monotonic. Standard kernels used in MMD, such as Gaussian or Linear kernels, typically only capture low-order statistics like the mean. This leads to a "rough-grained" matching that fails to account for the complex temporal patterns inherent in sensor data.

The Injective Embedding Problem

A core theoretical issue identified by the authors is the "injective embedding" problem. When using simple statistics, two distinct distributions in the distribution space may map to the same point in the measure space. If the mapping is not injective, the metric will report a discrepancy of zero ($M=0$) even when the distributions $p$ and $q$ are fundamentally different.

The injective embedding problem: (b) illustrates how simple one-order statistics fail to distinguish distributions, while (c) shows how appropriate statistics enable better discrimination.

As shown in the figure above, using appropriate statistics is essential to ensure that the measure space accurately reflects the differences between distributions. To solve this, the authors propose moving beyond local similarity (like Gaussian kernels) toward spectral kernels that can capture energy-frequency-time distributions.

The AdvSKM Framework

The authors introduce Adversarial Spectral Kernel Matching (AdvSKM), a framework that makes the kernel itself a trainable component of the model. AdvSKM consists of two primary innovations:

  1. Hybrid Spectral Kernel Network: This deep network replaces fixed mathematical kernels. It combines Spectral Kernels (using cosine activations for long-term periodicity) and Arc-cosine Kernels (mimicking ReLU units for local information). This hierarchical structure allows the model to represent complex, non-local distributions.
  2. Adversarial Kernel Training: The framework employs a min-max game similar to a GAN. The backbone network (generator) seeks to minimize domain discrepancy to create domain-invariant features, while the hybrid kernel (discriminator) is optimized to maximize the discrepancy, searching for the most discriminatory statistics between the domains.
The AdvSKM architecture, featuring shared backbone networks and an adversarial domain matching process to align source and target distributions.

Experimental Evaluation

AdvSKM was evaluated on four multivariate time-series sensor datasets: HAR, HHAR, WS AR, and uWave. In these experiments, domains were defined by different participants or hardware devices.

The results demonstrate that AdvSKM consistently outperforms state-of-the-art methods like DDC, DAN, and CoDATS. Notably, on the WS AR dataset, AdvSKM achieved an average accuracy of 89.58%, a significant improvement over CoDATS' 74.8%. In several tasks within the uWave and HAR datasets, the model achieved perfect 100% accuracy, indicating near-perfect domain alignment. Visual analysis via t-SNE further confirmed that AdvSKM produces cleaner category clusters and superior overlap between source and target domains compared to other high-order metric methods.

Conclusion

AdvSKM represents a significant step forward for time series domain adaptation by making the discrepancy metric differentiable and adversarial. By replacing shallow, fixed kernels with a trainable hybrid spectral network, the model can capture the intricate, non-stationary traits of time series data that standard methods miss. While future work may look into computational overhead and hyperparameter tuning for the adversarial iterations, AdvSKM sets a new benchmark for robust, fine-grained domain alignment.

Summary updated

Abstract

Unsupervised domain adaptation (UDA) has been received increasing attention since it does not require labels in target domain. Most existing UDA methods learn domain-invariant features by minimizing discrepancy distance computed by a certain metric between domains. However, these discrepancy-based methods cannot be robustly applied to unsupervised time series domain adaptation (UTSDA). That is because discrepancy metrics in these methods contain only low-order and local statistics, which have limited expression for time series distributions and therefore result in failure of domain matching. Actually, the real-world time series are always non-local distributions, i.e., with non-stationary and non-monotonic statistics. In this paper, we propose an Adversarial Spectral Kernel Matching (AdvSKM) method, where a hybrid spectral kernel network is specifically designed as inner kernel to reform the Maximum Mean Discrepancy (MMD) metric for UTSDA. The hybrid spectral kernel network can precisely characterize non-stationary and non-monotonic statistics in time series distributions. Embedding hybrid spectral kernel network to MMD not only guarantees precise discrepancy metric but also benefits domain matching. Besides, the differentiable architecture of the spectral kernel network enables adversarial kernel learning, which brings more discriminatory expression for discrepancy matching. The results of extensive experiments on several real-world UTSDA tasks verify the effectiveness of our proposed method.
BibTeX
@inproceedings{liu2021adversarial,
  author = {Qiao Liu and Hui Xue},
  title = {{Adversarial Spectral Kernel Matching for Unsupervised Time Series Domain Adaptation}},
  booktitle = {International Joint Conference on Artificial Intelligence},
  year = {2021},
  doi = {10.24963/ijcai.2021/378},
}
Figure