Source-linked AI summary
Domain Adaptation for Time Series Under Feature and Label Shifts
Huan He, Owen Queen, Teddy Koker, Consuelo Cuevas, Theodoros Tsiligkaridis, Marinka Zitnik
TL;DR
Time-series domain adaptation must address shifts in both temporal and frequency features, as well as changes in label distributions that can introduce target-only classes. Raincoat combines time-frequency representations with alignment and correction, and experiments report improvements in both closed-set and universal adaptation across five datasets.
Problem
Time-series adaptation must handle shifts in temporal and frequency features and differing source-target label distributions, including classes unique to the target domain.
Source: §1 · p. 2Method
Raincoat encodes time and frequency features, aligns source and target representations with Sinkhorn divergence, and corrects misalignments to detect unknown target classes.
Source: §1 · p. 2Results
Across five datasets, Raincoat improves up to 6.7% in closed-set domain adaptation and 16.33% in universal domain adaptation.
Source: §7 · p. 9Takeaways & Limitations
The experiments support Raincoat as an approach to time-series adaptation under feature and label shifts in both closed-set and universal settings.
Source: §7 · p. 9Unknown-sample detection assumes that movement between target representations before and after correction has a bimodal distribution when unknown labels are present.
Source: §5.5 · p. 6
Abstract
from arXiv · showhide
Unsupervised domain adaptation (UDA) enables the transfer of models trained on source domains to unlabeled target domains. However, transferring complex time series models presents challenges due to the dynamic temporal structure variations across domains. This leads to feature shifts in the time and frequency representations. Additionally, the label distributions of tasks in the source and target domains can differ significantly, posing difficulties in addressing label shifts and recognizing labels unique to the target domain. Effectively transferring complex time series models remains a formidable problem. We present Raincoat, the first model for both closed-set and universal domain adaptation on complex time series. Raincoat addresses feature and label shifts by considering both temporal and frequency features, aligning them across domains, and correcting for misalignments to facilitate the detection of private labels. Additionally, Raincoat improves transferability by identifying label shifts in target domains. Our experiments with 5 datasets and 13 state-of-the-art UDA methods demonstrate that Raincoat can improve transfer learning performance by up to 16.33% and can handle both closed-set and universal domain adaptation.
1. Introduction
Raincoat targets time-series adaptation challenges from shifts in temporal and frequency features and from differences in source and target labels. It combines time-frequency representations, domain alignment, and correction to support closed-set and universal adaptation.
1. Introduction
- Time-series domain shifts can affect temporal or frequency features, while label shifts can create target classes absent from the source.Prior time-series DA methods do not explicitly model frequency features, and universal DA had not been explored for time series.Source: §1 · p. 2
- Raincoat uses time- and frequency-based encoders, aligns source and target features with Sinkhorn divergence, and corrects misalignments to detect unknown target classes.The align-then-correct procedure aligns domains, retrains the encoder on target data, and uses movement between aligned and corrected representations to identify unknown classes.Source: §1 · p. 2
- The work presents Raincoat as the first time-series domain adaptation method for both closed-set and universal settings, addressing feature and label shifts.Closed-set adaptation aligns source and target domains; universal adaptation uses correction to prioritize target-specific features for private-class detection.Source: Figure 1 · p. 1, §1 · p. 2
- Raincoat outperforms strong baselines by up to 9.0% for closed-set DA and 16.33% for universal DA across five time-series datasets.The evaluated datasets cover human activity recognition, mechanical fault detection, and electroencephalogram prediction.Source: §1 · p. 2
2. Related Work
Prior domain adaptation work spans adversarial training, statistical divergence, and self-supervision, while time-series methods have largely focused on temporal features. Universal DA addresses label overlap uncertainty, but existing approaches use varied criteria to identify private target classes.
2. Related Work
- General DA methods use adversarial training, statistical divergence, or self-supervision; Raincoat combines statistical divergence and self-supervision.Statistical divergence methods minimize discrepancy in latent feature space, while self-supervision uses target-computable auxiliary tasks.Source: §2 · p. 2
- Existing time-series DA methods include adversarial, divergence-based, and self-supervised approaches, but align time features without explicitly modeling frequency shifts or label gaps.Raincoat instead considers frequency-feature shifts alongside feature and label shifts.Source: §2 · p. 3
- Universal DA separates target samples into shared and private labels, with prior methods using uncertainty, clustering, contrastive learning, or optimal transport to identify them.Many methods require tuned thresholds, and some rely on a shared encoder despite source-target domain shifts.Source: §2 · p. 3
3. Problem Setup and Formulation
The setup defines labeled source and unlabeled target time-series domains, allowing shifts in features and labels. It formulates closed-set adaptation with shared label sets and universal adaptation that also identifies private target classes.
3. Problem Setup and Formulation
- A time-series sample x_i contains readings from d sensors over T time points, and the stated setup considers regular time series.The text notes that irregular series can be handled with techniques such as Raindrop.Source: §3 · p. 3
- The source dataset has labeled samples, whereas the target dataset is unlabeled during training; their label sets may share zero or more classes.Shared labels are the intersection of the source and target label sets; private labels occur in one domain but not the other.Source: §3 · pp. 3–4
- Feature shift means source and target input marginals differ while label conditionals remain constant; label shift means their label marginals differ.Time-series feature shifts can arise from sensor setup or sample length and may affect time or frequency spectra.Source: §3 · p. 4
- Closed-set time-series adaptation assumes identical source and target label sets and trains on labeled source data to minimize classification risk on the unlabeled target domain.This formulation requires C_s = C_t.Source: §3 · p. 4
- Universal time-series adaptation minimizes classification risk on shared target classes while identifying samples from target-private classes as unknown.The setup motivates relaxing the identical-label-set assumption because private classes may occur in either domain.Source: §3 · p. 4
4. Preliminaries
The preliminaries describe transforming time-series channels between time and frequency representations with a discrete Fourier transform. They specify the frequency indices and the real- and imaginary-component quantities used to extract amplitude and phase.
4. Preliminaries
- For a series with d channels and T time points, the discrete Fourier transform is applied channel-wise with length T, followed by an inverse transform.The passage introduces these transforms as the procedure for moving the sample to frequency space and back.Source: §4 · p. 4
- The transform uses T sample points, with n indexing the current point and m indexing frequencies from 0 to T − 1.Source: §4 · p. 4
- Amplitude and phase are extracted from the frequency representation using its real and imaginary components, with atan2 used for phase.The text identifies Re and Im as the real and imaginary parts of a complex value.Source: §4 · p. 4
5. RAINCOAT Approach
RAINCOAT is an unsupervised method for closed-set and universal time-series domain adaptation, combining time- and frequency-based representations with alignment, correction, and target-private-sample detection. Its approach addresses frequency shifts that prior time-series methods do not explicitly model.
5.1. Overview
- RAINCOAT combines time-frequency encoding, source-target alignment, target-feature correction, and movement-based detection of unknown target samples.The method is presented for both closed-set and universal domain adaptation.Source: §5.1 · p. 4, §5.4 · p. 6, §5.5 · p. 6
5.2. Time-Frequency Feature Encoder
- RAINCOAT concatenates time features with Fourier features represented by amplitude and phase, addressing shifts in both representations.The frequency features are smoothed before the Fourier transform, convolved, then converted to amplitude and phase.Source: §5.2 · pp. 4–5
- Smoothing before the discrete Fourier transform is used to reduce frequency leakage, while amplitude and phase retain low- and high-level frequency semantics.The DFT assumes periodic inputs; violating that assumption can produce perturbed, noisy frequency features.Source: §5.2 · p. 5
5.3. Domain Alignment of Time-Frequency Features
- RAINCOAT aligns source and target features with Sinkhorn divergence, which compares distributions with disjoint supports; the authors identify vanishing gradients or similar artifacts as a theoretical weakness of MMD.The passage describes Sinkhorn divergence as an entropy-regularized optimal transport distance.Source: §5.3 · p. 6
5.4. Correction Step in RAINCOAT
- The correction step retrains the encoder and decoder on target reconstruction, aiming to keep common-sample features near their original labels while unknown-sample features diverge.This is motivated by preserving target-discriminative features under the cluster assumption.Source: §5.4 · p. 6
5.5. Inference: Detect Target Private Samples
- RAINCOAT measures each target sample’s change in distance to its assigned prototype before and after correction, then uses a bimodality test and classwise clustering to reject unknowns.When bimodality is detected, the larger of two cluster centroids is used as the rejection threshold.Source: §5.5 · p. 6
5.6. Overview of RAINCOAT Models
- The training overview separates alignment, target reconstruction correction, and inference; alignment combines domain-alignment, reconstruction, and classification losses.The overview uses a labeled source dataset and both source and target data for encoder and decoder training.Source: §5.6 · pp. 6–7
6. Experiments
Experiments evaluate RAINCOAT on five time-series datasets for closed-set and universal domain adaptation. It outperforms strong baselines in both settings, with ablations examining its encoder and alignment components.
6.1. Experimental Setup
- Closed-set evaluation compares eight general or time-series DA methods plus source-only training; universal DA compares four methods able to reject unknown samples.Evaluation reports target-test accuracy and macro-F1; universal DA also uses H-score, the harmonic mean of common- and private-class accuracy.Source: §6.1 · p. 7
- The five benchmarks cover human activity recognition, mechanical fault detection, and EEG prediction, with domain pairs defined by participant, device, or individual IDs.Closed-set evaluation uses ten source-to-target pairs per dataset, except Boiler, which uses six configurations.Source: §6.1 · p. 7
6.2. Results
- In closed-set domain adaptation, RAINCOAT improves average accuracy by 6.77% and Macro-F1 by 9.00% over the strongest baseline across five datasets.Accuracy gains were 8.65% on HAR, 5.48% on HHAR, 5.8% on WISDM, 2.81% on Sleep-EDF, and 10.43% on Boiler.Source: §6.2 · p. 8, Figure 4 · p. 8
- RAINCOAT improves H-score by 16.33% over the strongest baseline across datasets in universal DA.The reported comparison concerns settings with feature and label shifts.Source: §6.2 · p. 8, Table 1 · p. 8
- On WISDM, the frequency encoder alone improves accuracy by 9.44% for closed-set DA and 2.33% for UniDA.Adding the correction step does not reduce closed-set performance; Sinkhorn divergence improves accuracy by 1.02% for closed-set DA and 1.11% for UniDA.Source: §6.2 · p. 9, Table 2 · p. 9
- With the time-frequency encoder, Sinkhorn divergence yields the highest accuracy among the tested combinations on HAR, and all tested methods improve with the encoder.The comparison tests CoDATS, DeepCoral, AdvSKM, and CLUDA on closed-set DA.Source: §6.2 · p. 9, Table 3 · p. 9
7. Conclusion
RAINCOAT addresses feature and label shifts in time series domain adaptation by combining temporal and frequency features, aligning domains, correcting misalignments, and detecting label shifts. Across five datasets, it improves performance by up to 6.7% on closed-set adaptation and 16.33% on universal adaptation.
7. Conclusion
- RAINCOAT combines time- and frequency-space features, aligns them across domains, corrects misalignments, and detects label shifts.The approach addresses both feature and label shifts.Source: §7 · p. 9
- Across five datasets, RAINCOAT improves performance by up to 6.7% on closed-set domain adaptation and 16.33% on universal domain adaptation.Source: §7 · p. 9
A. Further Information on Domain Alignment of Time-Frequency Feature
This section motivates Sinkhorn divergence for aligning time-frequency features when source and target distributions may be far apart. It contrasts its gradients with alternative discrepancy measures and explains the role of entropic regularization.
A. Further Information on Domain Alignment of Time-Frequency Feature
- Because frequency amplitudes can be arbitrarily large, source and target amplitude distributions may have disjoint support under significant shifts.The section motivates a distance measure that can compare arbitrary distributions.Source: A. Further Information on Domain… · p. 15
- Sinkhorn divergence entropically regularizes Wasserstein distance, interpolating between optimal transport at η = 0 and MMD as η → ∞.Increasing η smooths the coupling; as η approaches zero, it becomes sparser and approaches the optimal transport solution.Source: A. Further Information on Domain… · p. 15
- MMD can have vanishing gradients when source and target supports are disjoint, while Sinkhorn’s absolute-distance cost keeps gradients strong across closeness levels.Source: A. Further Information on Domain… · pp. 15–16
- Under substantial location shifts, JSD and KL struggle to provide meaningful gradients, while Wasserstein changes linearly but remains unbounded.KL mitigates MSE’s rapid increase but is also unbounded.Source: Figure 5 · p. 16
- Sinkhorn has stronger gradients than the alternative approaches compared across distribution shifts.The comparison is reported in Figure 5.Source: A. Further Information on Domain… · p. 16
B. Details on Neural Networks RAINCOAT Algorithm
RAINCOAT encodes both temporal and frequency characteristics, then reconstructs signals from their separate latent features. Its representations combine frequency amplitude and phase with time features, alongside a prototypical classifier.
B. Details on Neural Networks RAINCOAT Algorithm
- The encoder smooths input with a cosine or Hann window before applying DFT, reducing frequency leakage from signals composed of many oscillations.FFT can make DFT computation more efficient for long signals, and one-sided storage of real-signal frequencies halves memory requirements.Source: B. Details on Neural Networks RAINCOAT… · pp. 16–17
- RAINCOAT convolves low-frequency Fourier modes to smooth high-frequency details and preserve signal low-rank structure, while a time-feature encoder captures time-space features.The time encoder uses a CNN in this work.Source: B. Details on Neural Networks RAINCOAT… · p. 17
- The frequency representation extracts amplitude and phase in polar coordinates, which the paper describes as tending to be more domain-invariant.Source: B. Details on Neural Networks RAINCOAT… · p. 17
- Frequency features are concatenated with time features; manifold alignment and self-attention are left for future investigation.Source: B. Details on Neural Networks RAINCOAT… · p. 17
- Unlike the described Fourier neural operator, RAINCOAT shares only the frequency-convolution component and also uses a time-feature encoder.Source: B. Details on Neural Networks RAINCOAT… · p. 17
- The decoder separately reconstructs time and frequency features, using deconvolution for time features and inverse DFT for frequency features, then combines them and trains with L1 loss.Source: B. Details on Neural Networks RAINCOAT… · p. 17
- A prototypical classifier compares normalized features with estimated class prototypes and assigns the label of the closest prototype.Source: B. Details on Neural Networks RAINCOAT… · p. 17
C.1. Dataset Details
The experiments span five datasets and use a consistent CNN encoder for fair method comparisons. t-SNE plots show activity clusters across source and target domains, while closed-set results report RAINCOAT outperforming baselines on accuracy and Macro-F1 across datasets.
C.1. Dataset Details
- The five datasets are WISDM, Boiler, HAR, HHAR, and Sleep-EDF, covering activity classification, boiler fault detection, and sleep-stage classification.Source: §C.1 · p. 18
C.2. Experimental Details
- All methods use a 1D-CNN time-feature encoder for fair comparison; learning rates are tuned per method on source validation data, with Sinkhorn regularization fixed at 1 × 10−3.Source: §C.2 · p. 20
C.3. t-SNE Visualizations of Learned Representations for Closed-Set DA
- HAR t-SNE plots encode activity labels by color and source versus target samples by square versus star markers; the reported target clusters are generally tighter and better separated.Source: Figure 6 · p. 22, Figure 7 · p. 22, §C.3 · p. 22
C.4. Full Results of Closed-Set DA
- RAINCOAT consistently outperforms baseline methods across all datasets on both accuracy and Macro-F1 in the closed-set experiments.The results are presented in separate accuracy and Macro-F1 tables.Source: §C.4 · p. 22
C.5. Full Results of UniDA
RAINCOAT consistently outperforms the baselines across the three UniDA settings considered. The section reports both accuracy and H-scores, noting that accuracy alone does not capture detection of unknown target samples.
- UniDA results are reported using accuracy and H-scores, with Tables 12 and 13 covering those metrics, respectively.Source: §C.5 · p. 22
- Accuracy alone is not appropriate for UniDA because it may not reflect detection of unknown target samples and can mislead under class imbalance.Source: §C.5 · p. 22
- RAINCOAT consistently outperforms baseline methods across all three UniDA settings considered in this work.The settings are WISDM→WISDM, WISDM→HHAR, and HHAR→WISDM.Source: §C.5 · p. 23
C.6. Ablation Studies
The ablations examine loss-weight selection and performance with varying amounts of labeled source data. The additional discussion describes feature and label shifts, including settings with target-private classes.
C.6. Ablation Studies
- The loss combines three terms with normalized weights, selected by grid search on an independent source-target transfer scenario and then tested across scenarios.The weights sum to 1, and the experiments report average target-domain accuracy for HAR closed-set DA.Source: §C.6 · p. 24
- Table 14 reports the impact of weight balancing and the average prediction accuracy attained for target domains.Source: §C.6 · p. 25, Table 14 · p. 27
- RAINCOAT outperforms baselines across 30%, 50%, 70%, and 100% labeled-source-data settings, remaining competitive with limited source labels.The comparison evaluates target-domain prediction accuracy and F1 on HAR.Source: §C.6 · p. 25, Table 15 · p. 27
D. Additional Discussion
- Closed-set DA assumes a known class set, whereas UniDA addresses target adaptation when private labels may exist in either domain.The discussion presents UniDA as a setting involving both feature and label shifts.Source: D. Additional Discussion · p. 26
- Driving-behavior labels may differ between drivers, while readmission labels may use different time windows across hospitals; both examples illustrate label shift.The discussion connects these shifts to reduced performance and the need for domain adaptation.Source: D. Additional Discussion · p. 27
D.1. The Use of Frequency Features
RAINCOAT jointly models time and frequency features, with design choices for cases where either representation is less informative. The discussion also describes video and source-free extensions.
D.1. The Use of Frequency Features
- RAINCOAT can prioritize time features when frequency features are less informative, while also addressing shifts driven more by frequency changes.The paper notes frequency features may offer limited value for non-periodic or non-stationary patterns and suggests transformers as a future direction.Source: §D.1 · pp. 27–28
D.2. Extension to Video Domain Adaptation
- On UCF-HMDB, the video evaluation covers 3,209 videos across 12 classes and reports accuracy comparisons with other approaches.The paper says it used TA3N source code and directly quoted performance reported in that work; future work proposes efficient feature extraction.Source: §D.2 · p. 28, Table 16 · p. 28
D.3. Extension to Source-Free Domain Adaptation
- The source-free extension modifies pretraining to learn compact, separated source clusters, then adapts the pretrained model using RAINCOAT’s two-stage procedure.The proposed pretraining uses intra-class compactness and inter-class separability; target samples are then used for adaptation.Source: §D.3 · p. 29
- For source-free deployment, target-private samples can be detected from feature movement before and after correction when that movement has a bimodal structure.The proposed detection trains a 2-mean cluster while retaining common samples’ original assigned labels.Source: §D.3 · p. 29
Related papers
This paper cites
- Unsupervised Domain Adaptation by Backpropagation2014
- Fourier Neural Operator for Parametric Partial Differential Equations2020
- Shortcut Learning in Deep Neural Networks2020
- CyCADA: Cycle-Consistent Adversarial Domain Adaptation2017
- FEDformer: Frequency Enhanced Decomposed Transformer for Long-term Series Forecasting2022
- Taking A Closer Look at Domain Shift: Category-level Adversaries for Semantics Consistent Domain Adaptation2018