# Phase-driven Domain Generalizable Learning for Nonstationary Time Series

Payal Mohapatra  Lixu Wang  Qi Zhu

###### Abstract

Monitoring and recognizing patterns in continuous sensing data is crucial for
many practical applications. These real-world time-series data are often
_nonstationary_ , characterized by varying statistical and spectral properties
over time. This poses a significant challenge in developing learning models
that can effectively generalize across different distributions. In this work,
based on our observation that nonstationary statistics are intrinsically
linked to the phase information, we propose a time-series learning framework,
PhASER. It consists of three novel elements: 1) phase augmentation that
diversifies non-stationarity while preserving discriminatory semantics, 2)
separate feature encoding by viewing time-varying magnitude and phase as
independent modalities, and 3) feature broadcasting by incorporating phase
with a novel residual connection for inherent regularization to enhance
distribution invariant learning. Upon extensive evaluation on 5 datasets from
human activity recognition, sleep-stage classification, and gesture
recognition against 10 state-of-the-art baseline methods, we demonstrate that
PhASER consistently outperforms the best baselines by an average of 5% and up
to 13% in some cases. Moreover, PhASER’s principles can be applied broadly to
boost the generalization ability of existing time series classification
models.

Machine Learning, ICML

##  1 Introduction

Figure 1: Overview of PhASER and its four components. I. illustrates the
phase-based augmentation using a phasor representation (top left) for the
negative and positive frequency components of a signal. The augmentation
translates a signal to its $\pi/2$ phase-shifted version. II. demonstrates the
separate encoders for time-varying magnitude and phase responses with sub-
feature normalization. III. shows the phase-driven residual network with
dimensions of the intermediate feature map. IV. is the task-specific
classification head.

Time-series data play a ubiquitous and crucial role in numerous real-world
applications, such as continuous monitoring for human activity recognition (Li
et al., 2020), gesture identification (Ozdemir et al., 2020), sleep tracking
(Kemp et al., 2000), and more. The collected continuous time series often
exhibit non-stationarity, i.e., the statistical and spectral properties of the
data evolve over time. Another inherent challenge is the distribution shift
due to the underlying sensing properties or subject-specific attributes,
commonly referred to as domain shift, which directly impacts the performance
of time-series models. Thus, it is imperative to develop methods for more
generalizable pattern recognition in nonstationary time series.

Some past methods (Ragab et al., 2023a, b; He et al., 2023b) address
distribution shifts in time-series applications by accessing target domain
samples through domain adaptation algorithms. However, accessing data from
unseen distributions in advance may not be possible in practice. To overcome
this challenge, a few works (Gagnon-Audet et al., 2022; Xu et al., 2022)
applied standard domain generalization (DG) algorithms (Volpi et al., 2018;
Sagawa et al., 2019; Parascandolo et al., 2020) to temporally-changing time-
series data, but reported a significant performance gap when compared with
visual data. Recent research on DG tailored for time series has been exploring
promising directions like latent-domain characterization (Lu et al., 2023; Du
et al., 2021), augmentation strategies (Iwana & Uchida, 2021; Li et al.,
2021), preservation of non-stationarity dictionary (Liu et al., 2022b; Kim et
al., 2021c), and leveraging spectral characteristics of time series (He et
al., 2023a; Yang & Hong, 2022; Kim et al., 2021a). Although these methods have
shown success in certain cases, they still suffer from various limitations.
Latent-domain characterization is heavily reliant on their hypotheses of
latent domains, which limits its broader applicability. Augmentation
strategies (shift, jittering, masking, etc.) for time-series data have
restricted utility (Iwana & Uchida, 2021). For instance, in physiological
signal analysis, morphological alterations through augmentations are
detrimental, and time-slicing is unsuitable for periodic signals. Moreover,
advanced augmentation techniques, like spectral perturbations (time-frequency
warping, decomposition techniques, etc.) are usually heavily parametric (Wen
et al., 2020) and application-specific. Approaches based on preserving non-
stationarity are constrained by the need for encoders to maintain the same
input-output space, which is limiting, especially for classification tasks.
Although a few works (He et al., 2023a; Yang & Hong, 2022) emphasize frequency
domain representations where robustness to feature shifts is central, they
don’t consider cases where the spectral response is time-varying. Another
significant issue is that many of these studies rely on domain identity, which
in practice can be expensive and intrusive to obtain, especially in healthcare
and finance (Yan et al., 2024; Bai et al., 2022). Hence, achieving domain-
generalizable time series classification without access to unseen
distributions and domain labels of available distributions remains a
challenging yet crucial pursuit.

Our Approach and Contributions. In this work, we aim to achieve domain-
generalizable learning for time series in real-world scenarios that are
persistently time-varying or _nonstationary_. By leveraging the phase
information of time series, we propose a novel Phase-Augmented Separate
Encoding and Residual (PhASER) framework. There are three key modules in
PhASER. First, PhASER can diversify the non-stationarity of source domain data
through an intra-instance phase shift. Favorably, using Hilbert Transform (HT)
(King, 2009) to conduct a phase-shift-based augmentation overcomes the
shortcomings of existing techniques by being general and non-parametric. Next,
PhASER applies a less-explored strategy – taking time-varying magnitude and
phase responses of the frequency domain as separate inputs, to better
integrate the time-frequency information. Finally, we design an effective
broadcasting mechanism with a non-linear residual connection between the
phase-encoded embedding and the backbone representation. In this way, PhASER
can benefit from the inherent regularization (He et al., 2020; Marion et al.,
2023) to learn domain-invariant features while offsetting any degradation to
the desirable underlying representation (He et al., 2016). An overview of
PhASER is illustrated in Figure 1. The details of PhASER are presented in
Section 2, where we also theoretically substantiate our design philosophy by
demonstrating the importance of addressing non-stationarity in optimizing
classification risks of unseen distributions and the role of HT in changing
nonstationary statistics of time series. In Section 3, we conduct extensive
experiments on 5 benchmark datasets across 3 popular application scenarios and
demonstrate the superior performance of PhASER over a comprehensive set of
state-of-the-art approaches. We also validate the effectiveness of each
component in PhASER and its general applicability through systematic analysis.
Section 4 discusses additional related works beyond those mentioned in
introduction. Section 5 concludes the paper.

##  2 Approach

###  2.1 Problem Formulation

######  Definition 2.1 (Nonstationary Time Series).

Following the definition of mixed decomposition in Dama & Sinoquet (2021), we
assume a continuous time-series sample drawn from a nonstationary domain
$\mathbf{x}=\\{x_{0},...,x_{t},...\\}\sim\mathcal{D}_{\mathbf{x}}$ can be
decomposed into components with mean $\mu_{t}$ and variance $\sigma_{t}$ (both
$\mu_{t}$ and $\sigma_{t}$ are not always zero),

$\displaystyle\mathrm{Pr}_{\mathbf{x}\sim\mathcal{D}_{\mathbf{x}}}(\mathbf{x})(t)=\mu_{t}+\sigma_{t}\times
z,$ (1) $\displaystyle\forall L\geq 1,\exists
t,\left[\mu_{t}\neq\mu_{t+L}\right]\vee\left[\sigma_{t}\neq\sigma_{t+L}\right],$

where $z$ is a stationary stochastic component with a zero mean and a unit
variance.

######  Definition 2.2 (Time Series Domain Generalization).

Suppose there is a dataset
$\mathbf{S}\\!=\\!\\{(\mathbf{x}_{i},y_{i})\\}_{i=1}^{M}$ with $M$ data
samples drawn from a set of $N_{S}$ nonstationary source domains
$S\\!=\\!\\{\mathcal{S}_{i}\\}_{i=1}^{N_{S}}$. The joint distribution of
$\mathbf{S}$ is
$\mathrm{Pr}(\mathcal{X}_{\mathbf{S}},\mathcal{Y}_{\mathbf{S}})$, i.e.,
$\mathbf{x}_{i}\\!\sim\\!\mathcal{X}_{\mathbf{S}},y_{i}\\!\sim\\!\mathcal{Y}_{\mathbf{S}}$
and $\mathbf{x}_{i}\in\mathbb{R}^{V\times T}$ where $V$ is the number of time
series feature dimensions and $T$ is the sequence length.
$y_{i}\in\mathbb{R}^{1\times 1}$ is the categorical label. Note that the joint
distributions of different source domains are similar but distinct,

$\mathrm{Pr}(\mathcal{X}_{\mathcal{S}_{i}},\mathcal{Y}_{\mathcal{S}_{i}})\neq\mathrm{Pr}(\mathcal{X}_{\mathcal{S}_{j}},\mathcal{Y}_{\mathcal{S}_{j}}),1<i\neq
j\leq N_{S}.\vspace{-10pt}$ (2)

For any potential unseen target domain $\mathcal{D}_{\mathrm{U}}$, its joint
distribution remains distinct like Eq. (2). In our problem, although the
source dataset is assumed to contain multiple domains, the annotations that
specify the domain identity are unavailable. Our goal is to train a model
consisting of a feature extractor $F$ and a classifier $g$ using the given
source dataset ($F\circ
g:\mathcal{X}_{\mathbf{S}}\xrightarrow{}\mathcal{Y}_{\mathbf{S}}$), such that

$\min\mathop{{}\mathbb{E}}_{(\mathbf{x},y)\sim\mathcal{D}_{\mathrm{U}}}[\mathcal{L}(g(F(\mathbf{x})),y)],\vspace{-8pt}$
(3)

where $\mathcal{L}(\cdot)$ is a certain cost that measures the errors between
model predictions and the ground-truth labels.

Figure 2: Performance comparison between PhASER (Ours) and BCResNet with
increasingly nonstationary HHAR dataset.

Input Modality | Accuracy
---|---
Only Mag |  0.81 $\pm$ 0.03
Only Pha |  0.62 $\pm$ 0.03
Mag-Pha Concatenate |  0.73 $\pm$ 0.03
Mag-Pha Separate |  0.85 $\pm$ 0.01

Table 1: Performance comparison of various input configurations for time-
frequency information.

Motivation. We start by providing a motivation example on a human activity
recognition (HAR) application where non-stationarity is unavoidable due to
user’s behavioral changes or sensor characteristics (Bangaru et al., 2020).
The central question is: What is the impact of the non-stationarity of time
series on models’ generalization ability? We create a simple empirical study
on a dataset called HHAR (Stisen et al., 2015) and update the sequence length
to build various levels of non-stationarity, which is measured by the
Augmented Dickey-Fuller (ADF) statistics (a higher ADF value indicates greater
non-stationarity). More details of the ADF test are given in Section B of
Appendix. We adopt a popular DG model for time series classification –
BCResNet (Kim et al., 2021a), to explore the relation between the degree of
non-stationarity and the model’s generalization ability to unseen domains.
Figure 2 shows a clear decreasing trend in the accuracy of BCResNet as the
non-stationarity increases, highlighting the _importance of addressing non-
stationarity for achieving better generalization_. In contrast, our proposed
PhASER framework, as detailed below, consistently performs well despite
increasing non-stationarity.

Overview of PhASER. As shown in Figure 1, the proposed Phase-Augmented
Separate Encoding and Residual framework (PhASER) begins with an augmentation
module that utilizes the Hilbert Transform to generate out-of-phase
augmentations for time series. These augmentations not only diversify non-
stationarity but also preserve category-discriminatory semantics. Next, the
short-term Fourier Transform (STFT) is employed to obtain temporal magnitude
and phase responses. Two separate encoders then process the magnitude and
phase as distinct input modalities. Finally, PhASER establishes a novel
feature broadcasting mechanism to incorporate the phase information deeper in
the layers through residual connections. By emphasizing the phase, the PhASER
framework implicitly regularizes the representations against non-stationarity
and offsets any degradation to the desirable features. Consequently, the
classifier can learn domain-agnostic task-discriminatory representations. In
the following Sections 2.2 to 2.4, we will introduce the details of these
three novel elements in PhASER, and then discuss the theoretical insights in
Section 2.5.

###  2.2 Hilbert Transform based Phase Augmentation

Our motivating study depicted in Figure 2, demonstrates the importance of
addressing non-stationarity to enhance the generalization ability of models.
An intuitive technique is to leverage data augmentation to diversify the non-
stationarity of training data. The optimal augmentation also needs to preserve
the discriminatory properties of the original data, which is essential to
differentiate semantic categories.

Different from existing time series augmentation techniques, we choose to
introduce a phase shift in a signal while preserving the magnitude response,
thereby offering an augmented view. As it is a less-studied technique, we
intuitively justify our design choice by studying the question: Does shifting
the phase of time series spectral response change its non-stationarity? Figure
3 (a) visualizes a univariate accelerometer data sample from HHAR in the time
domain to illustrate its non-stationarity. If we segment this sample into
sequential windows and conduct Discrete Fourier Transform (DFT) to obtain its
magnitude and phase responses as plotted in Figure 3 (b) and (c), we can
observe the shift in the spectral domain corresponding to non-stationarity.
Figure 3 (d) depicts a time-series sample produced by phase-shifting its
original sample, and we can observe evident changes in the non-stationarity
statistics.

Following our observations from Figure 3, to diversify the non-stationarity
and preserve discriminatory features, we propose a simple but effective data
augmentation technique based on the Hilbert Transform (HT). Specifically, for
each time-series sample $\mathbf{x}$ in the source dataset $\mathbf{S}$, we
can assume it is a real-valued signal
$\mathbf{x}=\\{x_{0},...,x_{t},...\\}\in\mathbb{R}$ that is characterized by
the deterministic function $x_{t}=\mathbf{x}(t)$. Then,
$\mathrm{HT}(\mathbf{x}(t))=\widehat{\mathbf{x}}(t)=\int_{-\infty}^{\infty}\mathrm{x}(\tau)\frac{1}{\pi(t-\tau)}d\tau$.
HT can be easily interpreted in the frequency domain via Fourier analysis,

$\displaystyle
f_{\mathbf{x}}(\xi)=\mathcal{F}\\{\mathbf{x}(t)\\}=\int^{\infty}_{-\infty}\mathbf{x}(t)e^{i2\pi\xi
t}dt,-\infty<\xi<\infty,$
$\displaystyle\mathbf{x}(t)=\mathcal{F}^{-1}\\{f_{\mathbf{x}}(\xi)\\}=\int^{\infty}_{-\infty}f_{\mathbf{x}}(\xi)e^{i2\pi\xi
t}d\xi,-\infty<t<\infty,$

where $\mathcal{F},\mathcal{F}^{-1}$ denote the Fourier transform and inverse,
and $\xi$ is the frequency variable. To interpret $\widehat{\mathbf{x}}$ in
the frequency domain, the negative frequency spectrum of $f_{\mathbf{x}}(\xi)$
needs to multiply with the imaginary unit $i$, while the positive spectrum
needs to multiple with $-i$. Then we have,

$\mathrm{HT}(\mathbf{x}(t))=\widehat{\mathbf{x}}(t)=\mathcal{F}^{-1}\\{-i\cdot\mathrm{sgn}(\xi)f_{\mathbf{x}}(\xi)\\},$
(4)

where $\mathrm{sgn}(\cdot)$ is a sign function. Applying HT on a signal
results in a phase shift of $\pi/2$, yielding a new out-of-phase signal. After
obtaining the transformed $\widehat{\mathbf{x}}$ for all feature dimensions of
all samples, we merge the augmented dataset $\widehat{\mathbf{S}}$ and the
original $\mathbf{S}$ to form a new larger dataset
$\mathbf{S}^{\prime}=\widehat{\mathbf{S}}\cup\mathbf{S}$. For the following
design, there is no distinction among the samples in $\mathbf{S}^{\prime}$,
based on whether they belong to $\widehat{\mathbf{S}}$ or $\mathbf{S}$.

Figure 3: Illustrating example of diversification of non-stationarity by
shifting the phase of a signal. (a) Temporal non-stationarity in a time-series
data with varying mean ($\mu$) and variance ($\sigma$) within a domain. (b)
Magnitude response of the Discrete Fourier Transform (DFT) of each region.
Highlights shift in the dominant frequencies. (c) Original and shifted phase
responses for each region. (d) Corresponding time series using phase-based
augmentation.

###  2.3 Magnitude-Phase Separate Encoding

After augmenting the source domain with phase-shift using HT, next, we
identify optimal ways to encode time series for generalization. While
employing spectral transformation is a common approach, our perspective
diverges from most existing studies which typically view time and frequency
separately. Instead, we unify the time and frequency context and consider the
magnitude and phase information as distinct modalities of the original
signals.

As we address the non-stationarity of time series, we adopt STFT rather than
DFT. DFT is usually applicable to signals that are stationary and periodic
over time, and not suitable for analyzing time-varying signals. STFT is
obtained by applying DFT sequentially with a specified window through the
entire length of the time series. Specifically, for each training sample
$\mathbf{x}\in\mathbf{S}^{\prime}$ with a continuous time function
$\mathbf{x}(t)$, sampling it at a fixed rate generates a discrete time series
denoted as $\mathbf{x}[n]$ with a sequence length $N$, we have,

$f_{\mathbf{x}}[n,k]=\sum_{m=n-(W-1)}^{n}w[n-m]\mathbf{x}[m]e^{i\xi_{k}m}.\vspace{-6pt}$
(5)

The STFT of $\mathbf{x}[n]$, $f_{\mathbf{x}}[n,k]$, is a function of both
discrete time $n$ and frequency bin indices $k$ with lengths $\widetilde{N}$
and $\Xi$, respectively. $\xi_{k}$ is a digital frequency variable given by
$\xi_{k}=\frac{2\pi k}{\Xi}$ and $w[\cdot]$ is a window function. Without
losing generality, we adopt a commonly used Hanning window with window length
$W$, i.e., $w[n]=0.5(1-cos\frac{2\pi n}{W-1})$ where $0\leq n\leq W-1$. Note
that the length and shape of the window determine the time-frequency
resolution. A larger $W$ provides better frequency resolution and a smaller
$W$ gives a better temporal scale. We set $W$ to be randomly sampled powers of
2 for each time series feature dimension, i.e.,
$W_{i}=2^{p_{i}}\leq\Xi,p_{i}\sim\mathcal{U}\in\mathbb{Z}_{0}^{+},i\in[1,V]$
where $\mathcal{U}$ denotes a uniform distribution for integers. After
obtaining $f_{\mathbf{x}}[n,k]$, we can compute its magnitude and phase as,

$\displaystyle\mathrm{Mag}(\mathbf{x})$
$\displaystyle=\sqrt{\mathrm{Re}(f_{\mathbf{x}}[n,k])^{2}+\mathrm{Im}(f_{\mathbf{x}}[n,k])^{2}},$
(6) $\displaystyle\mathrm{Pha}(\mathbf{x})$ $\displaystyle=\arctan
2\left(\mathrm{Im}(f_{\mathbf{x}}[n]),\mathrm{Re}(f_{\mathbf{x}}[n,k])\right),$

where $\mathrm{Im}(\cdot)$ and $\mathrm{Re}(\cdot)$ indicate imaginary and
real parts of a complex number, and $\arctan 2(\cdot)$ is the two-argument
form of arctan. Then we take
$\mathrm{Mag}(\mathbf{x}),\mathrm{Pha}(\mathbf{x})\in\mathbb{R}^{V\times\Xi\times\widetilde{N}}$
as inputs of two separate encoders $F_{\mathrm{Mag}}$ and $F_{\mathrm{Pha}}$,
respectively. The merit of this strategy is based on the ability to fully
reconstruct a time-series signal solely using phase and magnitude response
(Hayes et al., 1980; Jacques & Feuillen, 2020). We also support this choice
with an intuitive study.

Intuition of treating phase and magnitude as separate modalities. Combining
insights from past works (He et al., 2023a; Kim et al., 2021a; Mohapatra et
al., 2023b) that have underscored the value of using spectral input for
generalizable learning, along with non-stationarity in time-series
applications, we conduct a small-scale empirical study on an HAR dataset –
WISDM (Kwapisz et al., 2011), to determine the optimal input way of time-
frequency information. Note that for the time-frequency representation, STFT
is applied to obtain the magnitude and phase responses. We experiment with
four choices of time-frequency inputs: 1) magnitude-only input, 2) phase-only
input, 3) concatenate magnitude and phase, and 4) separate encoders for
magnitude and phase, under identical evaluation settings. Table 2 in the
previous page shows that using only the phase input performs much worse than
using only magnitude, which implies that magnitude response contains more
semantic-discriminatory information. However, we can also observe that simply
concatenating both the phase and magnitude cannot boost the performance, while
separately encoding magnitude and phase followed by a late fusion is a
superior choice. This may be attributed to 1) the independent selection of
high-level features from the magnitude and phase for the task of
classification, and 2) the learning about non-stationarity from the phase.

Before fusing the extracted embeddings of $F_{\mathrm{Mag}}$ and
$F_{\mathrm{Pha}}$, we incorporate sub-feature normalization to isolate low
and high-frequency information to overcome domain-specific attributes (e.g.,
steady-state drifts arising due to domain, device or stimuli, differences)
(Phaye et al., 2019; Chang et al., 2021). Specifically, the embeddings of
$F_{\mathrm{Mag}}$ and $F_{\mathrm{Pha}}$ are divided into $B$ sub-feature
spaces. We apply normalization in each sub-feature space for each time series
variate,

$F_{\mathrm{Mag}}(\mathbf{x})\\!=\\!\left\\{F_{\mathrm{Mag}}(\mathbf{x})_{b}\\!:=\\!\frac{F_{\mathrm{Mag}}(\mathbf{x})_{b}-\overline{F_{\mathrm{Mag}}(\mathbf{x})_{b}}}{\sigma\left({F_{\mathrm{Mag}}(\mathbf{x})_{b}}\right)}\right\\}_{b=1}^{B},\vspace{-5pt}$

where $\overline{(\cdot)}$ and $\sigma(\cdot)$ denote to compute the mean and
variance of the given input. The same sub-feature normalization is also
conducted on $F_{\mathrm{Pha}}(\mathbf{x})$. Then, both
$F_{\mathrm{Mag}}(\mathbf{x})$ and $F_{\mathrm{Pha}}(\mathbf{x})$ are fused
along the variate axis by multiplying with 2D convolution kernels denoted as a
fusing encoder $F_{\mathrm{Fus}}$. The fused embeddings
$\mathbf{r}_{\mathrm{Fus}}=F_{\mathrm{Fus}}(F_{\mathrm{Mag}}(\mathbf{x}),F_{\mathrm{Pha}}(\mathbf{x}))$
are then fed into the following modules.

###  2.4 Phase-Residual Feature Broadcasting

Lastly, we outline our approach to achieve domain generalizable representation
learning via a phase-based broadcasting technique. It starts with a depthwise
feature encoder, $F_{\mathrm{Dep}}$, which transforms the fused embeddings,
$\mathbf{r}_{\mathrm{Fus}}$, into 1D feature maps,
$\mathbf{r}_{\mathrm{Dep}}$, along the temporal dimension, given as,

$\vspace{-0.5em}\mathbb{R}^{C(\mathbf{r}_{\mathrm{Fus}})\times
D(\mathbf{r}_{\mathrm{Fus}})\times
T(\mathbf{r}_{\mathrm{Fus}})}\rightarrow\mathbb{R}^{C(\mathbf{r}_{\mathrm{Fus}})\times
1\times T(\mathbf{r}_{\mathrm{Fus}})},$

where $C(\cdot)$, $D(\cdot)$, and $T(\cdot)$ represent the channel number, the
feature dimensions, and the temporal dimensions of an embedding.
$F_{\mathrm{Dep}}$ is implemented as several convolution layers followed by an
average pooling operation to unify all features at each temporal index. Once
the 1D feature map is obtained, we attach a sequence-to-sequence (the
dimension format of the feature map remains intact) temporal encoder,
$F_{\mathrm{Tem}}$, to characterize its temporal dependency and semantics. The
choice of backbone for $F_{\mathrm{Tem}}$ is not central to our design and a
suitable sequence-to-sequence encoder can be chosen. Here we leverage
convolution layers to form $F_{\mathrm{Tem}}$, and we have also tested other
architectures (please refer to Section B in Appendix for details). We adopt
this feature consolidation approach to enable specialized learning of spectral
attributes by $F_{\mathrm{Dep}}$ and global temporal dependencies using
$F_{\mathrm{Tem}}$, resulting in a more valuable overall semantic
characterization.

Note that after a series of operations, like fusing and dimension reduction,
the non-stationarity degrades gradually. To counteract such degradation, we
introduce a non-linear projection of $F_{\mathrm{Pha}}(\mathbf{x})$ as a
shortcut through $F_{\mathrm{Dep}}$ to $F_{\mathrm{Tem}}$. Building on our
previous steps of diversifying non-stationarity and preserving semantic
attributes, this residual connection ensures the learning of distribution-
shift-invariant representations through inherent regularization. To suitably
broadcast with the output dimensions of $F_{\mathrm{Tem}}$, we use a
projection head, $g_{\mathrm{Res}}$ for the transformation,

$\displaystyle\mathbb{R}^{C(F_{\mathrm{Pha}}(\mathbf{x}))\times
D(F_{\mathrm{Pha}}(\mathbf{x}))\times T(F_{\mathrm{Pha}}(\mathbf{x}))}$
$\displaystyle\rightarrow\mathbb{R}^{C(\mathbf{r}_{\mathrm{Fus}})\times
D(F_{\mathrm{Pha}}(\mathbf{x}))\times T(\mathbf{r}_{\mathrm{Fus}})}.$

After the projection, we can broadcast the output of $F_{\mathrm{Tem}}$ to
form the final representation $\mathbf{r}$ that is intended to learn
discriminatory characteristics despite non-stationarity. Overall, the
broadcasting can be expressed as

$\mathbf{r}=F_{\mathrm{Tem}}(\mathbf{r}_{\mathrm{Dep}})+g_{\mathrm{Res}}(F_{\mathrm{Pha}}(\mathrm{Pha}(\mathbf{x})))\vspace{-1em}$
(7)

After considerable efforts to preserve and enhance the discriminatory
characteristics amid input’s non-stationarity, we finally optimize for
semantic distinction. This optimization is easily achieved with CrossEntropy
Loss applied to a simple classification head, $g_{\mathrm{Cls}}$, attached to
$F_{\mathrm{Tem}}$ given as,

$\mathcal{L}_{\mathrm{CE}}=\frac{1}{N_{B}}\sum_{i=1}^{N_{B}}\mathbf{y}_{i}\log{g_{\mathrm{Cls}}(\mathbf{r})},\vspace{-5pt}$
(8)

where $N_{B}$ is the size of a batch in the mini-batch training, and
$\mathbf{y}_{i}$ is the one-hot form of the label $y_{i}$.

###  2.5 Theoretical Insights

Here we provide some theoretical insights to demonstrate that our method
design is rigorously motivated. Detailed relevant definitions and proofs of
the following theorems and lemmas are provided in Section A of Appendix.

######  Definition 2.3 ($\beta$-Divergence).

Suppose two data domains $\mathcal{D}_{1},\,\mathcal{D}_{2}$ are built on
input variable $\mathbf{x}$ and label variable $y$. Let $q>0$ be a constant,
the $\beta$-Divergence between $\mathcal{D}_{1}$ and $\mathcal{D}_{2}$ is
defined as

$\beta_{q}(\mathcal{D}_{1}\|\mathcal{D}_{2})=\left[\mathbb{E}_{(\mathbf{x},y)\sim\mathcal{D}_{2}}\left(\frac{\mathcal{D}_{1}(\mathbf{x},y)}{\mathcal{D}_{2}(\mathbf{x},y)}\right)^{q}\right]^{\frac{1}{q}}.\vspace{-5pt}$
(9)

According to the definition in Germain et al. (2016), $\beta$-Divergence can
be linked to Rényi Divergence (Van Erven & Harremos, 2014)
$\mathrm{RD}_{q}(\cdot)$ as

$\beta_{q}(\mathcal{D}_{1}\|\mathcal{D}_{2})=2^{\frac{q-1}{q}\mathrm{RD}_{q}(\mathcal{D}_{1}\|\mathcal{D}_{2})}.\vspace{-5pt}$
(10)

######  Lemma 2.4 (Bounding $\beta$-Divergence in A Convex Hull).

Let $S$ be a set of source domains, denoted as
$S=\\{\mathcal{S}_{i}\\}_{i=1}^{N_{S}}$. A convex hull $\Lambda_{S}$
considered here consists of a mixture distributions
$\Lambda_{S}=\\{\bar{\mathcal{S}}:\bar{\mathcal{S}}(\cdot)=\sum_{i=1}^{N_{S}}\pi_{i}\mathcal{S}_{i}(\cdot),\pi_{i}\in\Delta_{N_{S}-1}\\}$,
where $\Delta_{N_{S}-1}$ is the $N_{S}\\!-\\!1$-th dimensional simplex. Let
$\beta_{q}(\mathcal{S}_{i}\|\mathcal{S}_{j})\leq\epsilon$ for $\forall
i,j\in[N_{S}]$, then we have the following relation for the $\beta$-Divergence
between any pair of two domains
$\mathcal{D}^{\prime},\,\mathcal{D}^{\prime\prime}\in\Lambda_{S}$ in the
convex hull,

$\beta_{q}(\mathcal{D}^{\prime}\|\mathcal{D}^{\prime\prime})\leq\epsilon.\vspace{-5pt}$
(11)

######  Theorem 2.5 (Risk of An Unseen Time series Domain).

Let $\mathcal{H}$ be a hypothesis space built from a set of source time series
domains, denoted as $S=\\{\mathcal{S}_{i}\\}_{i=1}^{N_{S}}$ with the same
value range (i.e., the supports of these source domains are the same). Suppose
$q>0$ is a constant, for any unseen time series domain
$\mathcal{D}_{\mathrm{U}}$ from the convex hull $\Lambda_{S}$, we have its
closest element $\mathcal{D}_{\bar{\mathrm{U}}}$ in $\Lambda_{S}$, i.e.,
$\mathcal{D}_{\bar{\mathrm{U}}}=\arg\min\limits_{\pi_{1},...,\pi_{N_{S}}}\beta_{q}(\mathcal{D}_{\bar{\mathrm{U}}}\|\sum_{i=1}^{N_{S}}\pi_{i}\mathcal{S}_{i})$.
Then the risk of $\mathcal{D}_{\mathrm{U}}$ on any $\rho$ in $\mathcal{H}$ is,

$R_{\mathcal{D}_{\mathrm{U}}}[\rho]\leq\frac{1}{2}\mathrm{d}_{\mathcal{D}_{\mathrm{U}}}(\rho)+\epsilon\cdot\left[\mathrm{e}_{\mathcal{D}_{\bar{\mathrm{U}}}}(\rho)\right]^{1-\frac{1}{q}},\vspace{-5pt}$
(12)

where $\mathrm{d}_{\mathcal{D}}(\rho)$ and $\mathrm{e}_{\mathcal{D}}(\rho)$
are an expected disagreement and an expected joint error of a domain
$\mathcal{D}$, respectively. The $\epsilon$ is a value larger than the maximum
$\beta$-Divergence in $\Lambda_{S}$,

$\epsilon\geq\max\limits_{i,j\in[N_{S}],i\neq
j,t\in[0,+\infty)}2^{\frac{q-1}{q}\mathrm{RD}_{q}(\mathcal{S}_{i}(t)\|\mathcal{S}_{j}(t))},\vspace{-5pt}$
(13)
$\displaystyle\text{where}\,\,\mathrm{RD}_{q}(\mathcal{S}_{i}(t)\|\mathcal{S}_{j}(t))=$
$\displaystyle\frac{q(\mu_{j,t}-\mu_{i,t})^{2}}{2(1-q)\sigma_{i,t}^{2}+2\sigma_{j,t}^{2}}$
(14)
$\displaystyle+\frac{\ln{\frac{\sqrt{(1-q)\sigma_{i,t}^{2}+\sigma_{j,t}^{2}}}{\sigma_{i,t}^{1-q}\sigma_{j,t}^{q}}}}{1-q}.$

Insights. Theorem 2.5 indicates the optimization directions for reducing the
generalization risk of an unseen target domain. According to Eq. (12), the
risk is bounded by two terms. However, our efforts can be focused solely on
the second term. The first term $\mathrm{d}_{\mathcal{D}_{\mathrm{U}}}(\rho)$
is the expected disagreement of $\mathcal{D}_{\mathrm{U}}$ and we are unable
to conduct any approximation without access to the data from
$\mathcal{D}_{\mathrm{U}}$. Regarding the second term, the coefficient
$\epsilon$ can be viewed as the maximum $\beta$-Divergence of source domains,
and thus we should design a method to minimize the $\beta$-Divergence.
Moreover, according to Eq. (14), the nonstationary statistics of time series
are arguments of the $\beta$-Divergence, which validates the importance of
addressing non-stationarity if we want to minimize the domain discrepancy.
Besides, $\mathrm{e}_{\mathcal{D}_{\bar{\mathrm{U}}}}(\rho)$ tells us that the
empirical risks of source domains also need to be minimized. Such insights are
well reflected in PhASER.

######  Theorem 2.6 (Non-stationarity Change of Hilbert Transform).

Suppose there are $M_{\mathcal{D}}$ samples (observations) available for a
nonstationary time-series domain $\mathcal{D}_{\mathbf{x}}$, and each sample
$\mathbf{x}_{i}=\\{x_{i,0},...,x_{i,t},...\\}$ is characterized by its
deterministic function, i.e., $\mathbf{x}_{i}(t)=x_{i,t}=\mathrm{x}_{i}(t)$,
$i\in[1,M_{\mathcal{D}}]$. If we apply Hilbert Transformation
$\mathrm{HT}(\mathbf{x}(t))=\widehat{\mathbf{x}}(t)=\int_{-\infty}^{\infty}\mathrm{x}(\tau)\frac{1}{\pi(t-\tau)}d\tau$
to augment these time-series samples, the nonstationary statistics of
augmented samples are different from the original ones,

$\mathrm{Pr}_{\mathbf{x}\sim\widehat{\mathcal{D}}_{\mathbf{x}}}(\mathbf{x})(t)\neq\mathrm{Pr}_{\mathbf{x}\sim\mathcal{D}_{\mathbf{x}}}(\mathbf{x})(t).\vspace{-5pt}$
(15)

Insights. This theorem illustrates that Hilbert Transformation does change the
nonstationary statistics of time series, providing theoretical support for
proving our phase augmentation can diversify the non-stationarity of time
series.

##  3 Experiments

Table 2: Classification accuracy of Target 1$\sim$4 scenarios for cross-person
generalization in Human Activity Recognition on WISDM, HHAR, and UCIHAR
datasets. The best and second-best results are bolded and underlined,
respectively.

Dataset | WISDM | HHAR | UCIHAR | HAR
---|---|---|---|---
Target | 1 | 2 | 3 | 4 | Avg. | 1 | 2 | 3 | 4 | Avg. | 1 | 2 | 3 | 4 | Avg. | Avg.
ERM | 0.57 | 0.50 | 0.51 | 0.55 | 0.53 | 0.49 | 0.46 | 0.45 | 0.47 | 0.47 | 0.72 | 0.64 | 0.70 | 0.72 | 0.70 | 0.57
GroupDRO | 0.71 | 0.67 | 0.60 | 0.67 | 0.66 | 0.60 | 0.53 | 0.59 | 0.64 | 0.59 |  0.91 |  0.84 | 0.89 | 0.85 | 0.87 | 0.71
DANN | 0.71 | 0.65 | 0.65 | 0.70 | 0.68 | 0.66 | 0.71 | 0.67 | 0.69 | 0.68 | 0.84 | 0.79 | 0.81 | 0.86 | 0.83 | 0.73
RSC | 0.69 | 0.71 | 0.64 | 0.61 | 0.66 | 0.52 | 0.49 | 0.44 | 0.47 | 0.48 | 0.82 | 0.73 | 0.74 | 0.81 | 0.78 | 0.64
ANDMask | 0.74 | 0.73 | 0.69 | 0.69 | 0.71 | 0.63 | 0.64 | 0.66 | 0.69 | 0.66 | 0.86 | 0.80 | 0.76 | 0.78 | 0.80 | 0.72
BCResNet |  0.83 | 0.79 | 0.75 | 0.78 | 0.79 | 0.66 | 0.70 | 0.75 | 0.68 | 0.70 | 0.81 | 0.77 | 0.78 | 0.83 | 0.80 | 0.76
NSTrans | 0.43 | 0.40 | 0.37 | 0.37 | 0.40 | 0.21 | 0.22 | 0.27 | 0.28 | 0.24 | 0.35 | 0.35 | 0.51 | 0.47 | 0.42 | 0.35
MAPU | 0.75 | 0.69 | 0.79 | 0.79 | 0.75 | 0.73 | 0.72 | 0.81 |  0.78 | 0.76 | 0.85 | 0.80 | 0.85 | 0.82 | 0.83 | 0.78
Diversify | 0.82 |  0.82 |  0.84 |  0.81 |  0.82 |  0.82 |  0.76 |  0.82 | 0.68 |  0.77 | 0.89 |  0.84 |  0.93 |  0.90 |  0.89 |  0.83
Ours+RevIN* | 0.86 | 0.85 | 0.84 | 0.84 | 0.85 | 0.82 | 0.82 | 0.92 | 0.85 | 0.85 | 0.96 | 0.90 | 0.93 | 0.97 | 0.94 | 0.88
Ours | 0.86 | 0.85 | 0.85 | 0.82 | 0.85 | 0.83 | 0.83 | 0.94 | 0.88 | 0.87 | 0.96 | 0.91 | 0.95 | 0.97 | 0.95 | 0.89

We extensively evaluate the proposed PhASER framework against 10 state-of-the-
art approaches on 5 datasets across three time-series applications. Our
evaluation metric is per-segment accuracy. More implementation-specific
details are given in Section D of Appendix. Our source codes are provided in
the supplementary materials.

Datasets. We carry out experiments on three commonly used time-series
applications – Human Activity Recognition (HAR), Sleep-Stage Classification
(SSC), and Gesture Recognition (GR). For HAR, we use three benchmark datasets:
1) WISDM (Kwapisz et al., 2011) collected from 36 different users with 3
univariate dimensions, 2) UCIHAR (Bulbul et al., 2018) collected from 30
people with 9 variates, and 3) HHAR (Stisen et al., 2015) collected from 9
users with 3 feature dimensions. All HAR datasets consist of 6 distinct
activities and their sequence length is 128. SSC (Goldberger et al., 2000) is
built on continuously recorded single channel EEG from 20 healthy individuals
segmented to a sequence length of 3000. As for GR (Lobov et al., 2018), we
utilize 8-channel EMG signals to classify 6 different gestures with a sequence
length of 200 and follow preprocessing steps similar to Lu et al. (2022b). And
we follow the setup of ADATime (Ragab et al., 2023a) for HAR and SSC. More
data-specific details are provided in Table 8 of Appendix.

Experimental Setup. Each dataset is partitioned into four diverse non-
overlapping cross-domain scenarios, similar to Lu et al. (2023) and their
detailed specification is provided in Section 8 of Appendix. 20% of the
training data is kept aside as a validation set. The mean of three trials for
each experiment is reported in the main text, and complete statistics are
given in Section E of Appendix. Detailed experiment settings and
hyperparameter choices are provided in Section D of Appendix.

Comparison Baselines. We conduct a comprehensive analysis with state-of-the-
art approaches including standard domain generalization algorithms – ERM, DANN
(Ganin et al., 2016), GroupDRO (Sagawa et al., 2019), RSC (Huang et al., 2020)
and ANDMask (Parascandolo et al., 2020) implemented based on DomainBed
benchmarking suite (Gulrajani & Lopez-Paz, 2020); audio domain generalization,
BCResNet (Kim et al., 2021b); time-series representation learning, MAPU (Ragab
et al., 2023b); and time-series domain generalizable learning, Diversify (Lu
et al., 2022b). We also adapt a short-term time series forecasting model,
Nonstationary Transformer (NSTrans) (Liu et al., 2022b), as a baseline along
with another network-agnostic statistical technique, RevIN (Kim et al., 2021c)
denoted as (Ours+RevIN*). We follow the default setups of these works and only
conduct reasonable modifications for customizing them in our settings. More
details are provided in Section D.2 of Appendix.

Table 3:  Classification accuracy with Source 0$\sim$8 person for one-person-
to-another generalization on HHAR dataset, with best and second-best results
highlighted.

Source | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | Avg.
---|---|---|---|---|---|---|---|---|---|---
ERM | 0.27 | 0.40 | 0.41 | 0.44 | 0.42 | 0.44 | 0.45 | 0.44 | 0.48 | 0.42
GroupDRO | 0.33 | 0.53 | 0.38 | 0.48 | 0.47 | 0.51 | 0.47 | 0.48 | 0.49 | 0.46
DANN | 0.32 | 0.44 |  0.42 | 0.45 | 0.42 | 0.48 | 0.49 | 0.45 | 0.51 | 0.44
RSC | 0.27 | 0.45 | 0.38 | 0.45 | 0.40 | 0.47 | 0.50 | 0.44 | 0.53 | 0.43
ANDMask | 0.34 | 0.50 | 0.37 | 0.43 | 0.46 | 0.51 | 0.46 | 0.47 | 0.52 | 0.45
BCResNet | 0.28 | 0.48 | 0.32 | 0.47 | 0.42 | 0.52 | 0.44 | 0.45 | 0.49 | 0.43
NSTrans | 0.20 | 0.22 | 0.17 | 0.20 | 0.21 | 0.22 | 0.26 | 0.17 | 0.20 | 0.21
MAPU | 0.39 | 0.57 | 0.35 | 0.52 | 0.49 | 0.54 | 0.49 | 0.50 | 0.52 | 0.49
Diversify |  0.42 |  0.62 | 0.32 |  0.62 |  0.56 |  0.61 |  0.53 |  0.52 |  0.61 |  0.53
Ours | 0.53 | 0.70 | 0.63 | 0.66 | 0.64 | 0.67 | 0.65 | 0.67 | 0.62 | 0.64

###  3.1 Effectiveness of PhASER across Applications

Human Activity Recognition. We view each person as a single domain and
evaluate the generalization ability of PhASER framework under two settings, 1)
cross-person generalization, where $N_{S}$ ($N_{S}>1$) source domains are used
for training and the model is evaluated on unseen target domains, and 2) a
more challenging scenario of one-person-to-another, where model is trained on
one person ($N_{S}=1$) and evaluated on another person. For the cross-person
setting, we observe from Table 2 that the state-of-the-art domain
generalization methods which are popular in vision-based domains do not
perform equally well on time-series classification. This observation is
consistent with previous works (Gagnon-Audet et al., 2022; Lu et al., 2022b)
investigating out-of-domain generalization for time series. PhASER achieves
the best out-of-domain generalization performance across all cases, in
particular, substantially outperforms the best baseline (Diversify) on WISDM,
HHAR, and UCIHAR by 3%, 13%, and 6% respectively. For the more challenging
one-person-to-another setting, we choose to test on HHAR dataset given its
high non-stationarity among the three datasets (refer to Table 8 in Appendix
for ADF stat). Table 3 reports the average accuracy when a model is trained on
one person and evaluated on the remaining 8 people. PhASER performs the best
in such a setting as well, outperforming the next best approach, Diversify, by
almost 20%. These results strongly support the generalization performance of
PhASER.

Sleep-Stage Classification. Next, we evaluate PhASER to classify five
different sleep stages using EEG recordings in an attempt to conduct cross-
person generalization. Past methods (Ragab et al., 2023a; He et al., 2023b)
generally report the lowest performance in their respective settings for SSC
tasks indicating its inherent complexity. The results in Table 4 (left) show
that PhASER provides the best performance in all cases and achieves an average
classification accuracy of 0.82 without accessing the domain labels or any
target samples. It outperforms the best baseline (BCResNet) by 2% and the
time-series domain generalization baseline (Diversify) by almost 11%. The best
performance of our method in this case highlights the value even in spectral
representation of physiologcal time-series data.

Table 4: Classification accuracy for Target 1$\sim$4 scenarios for cross-
person generalization in generalization Sleep-Stage Classification and Gesture
Recognition using EEG and EMG, with best and second-best results highlighted.

Application | Sleep-Stage Classification | Gesture Recognition
---|---|---
Target | 1 | 2 | 3 | 4 | Avg. | 1 | 2 | 3 | 4 | Avg.
ERM | 0.50 | 0.46 | 0.49 | 0.45 | 0.47 | 0.45 | 0.58 | 0.57 | 0.54 | 0.54
GroupDRO | 0.57 | 0.56 | 0.55 | 0.59 | 0.57 | 0.53 | 0.36 | 0.59 | 0.45 | 0.48
DANN | 0.64 | 0.63 | 0.69 | 0.63 | 0.65 | 0.60 | 0.66 | 0.65 | 0.64 | 0.64
RSC | 0.50 | 0.48 | 0.52 | 0.46 | 0.49 | 0.50 | 0.66 | 0.64 | 0.56 | 0.59
ANDMask | 0.55 | 0.50 | 0.54 | 0.57 | 0.54 | 0.41 | 0.54 | 0.45 | 0.39 | 0.45
BCResNet |  0.79 |  0.82 |  0.79 |  0.81 |  0.80 | 0.62 | 0.67 | 0.65 | 0.61 | 0.64
NSTrans | 0.43 | 0.37 | 0.42 | 0.35 | 0.39 | 0.31 | 0.34 | 0.34 | 0.32 | 0.33
MAPU | 0.69 | 0.68 | 0.65 | 0.69 | 0.68 | 0.64 | 0.69 | 0.71 | 0.68 | 0.68
Diversify | 0.73 | 0.76 | 0.68 | 0.77 | 0.73 |  0.68 |  0.80 |  0.75 | 0.76 |  0.75
Ours | 0.85 | 0.80 | 0.79 | 0.83 | 0.82 | 0.70 | 0.82 | 0.77 |  0.75 | 0.76

Gesture Recognition. In GR, the used bio-electronic signals are heavily
influenced by user behavior and sensor time-varying properties, which
correspond to natural nonstationarity. We follow Lu et al. (2023) to use 6
common classes when conducting our evaluations in a cross-person setting. The
results in Table 4 (right) show that PhASER offers the best performance in all
cases except one.

###  3.2 Ablation Study

We use two cases, HAR using WISDM and GR, to study the impact of each of our
proposed design components as shown in Table 5. The first row indicates the
performance of the complete PhASER framework and the following rows present
the performance of different versions of PhASER with certain components
detached or modified (details of how we detach or modify PhASER are provided
in Section D of Appendix). From this table, we can observe that when the phase
augmentation is not carried out (row 2), the performance significantly drops
(by 11.6% on WISDM, and 5.8% on GR). Recall from our motivation study (refer
to Table 2) that providing only magnitude as the input was the second best
option compared to separate encoding. The results in rows 5 and 6 further
support this observation, highlighting the importance of incorporating phase
information for learning generalizable representations. Overall, we can
observe that when ablating the phase-based residual and separate encoding
structure (rows 3-7) the average performance drops by 10.6% and 13.7%,
respectively. This study demonstrates the value of all the components in
PhASER.

Table 5: Ablation analysis of PhASER on WISDM (a HAR dataset) and Gesture
Recognition application. The inclusion of a component is denoted as ✓ and
exclusion as ✗ (modification).

| Phase | Separate | $F_{\mathrm{Pha}}$ | Accuracy
---|---|---|---|---
| Augmentation | Encoders | Residual | WISDM | GR
1 | ✓ | ✓ | ✓ | 0.86 | 0.69
2 | ✗ | ✓ | ✓ | 0.81 | 0.61
3 | ✓ | ✓ |  ✗($F_{\mathrm{Mag}}$ Res.) | 0.82 | 0.55
4 | ✓ | ✓ |  ✗($F_{\mathrm{Fus}}$ Res.) | 0.84 | 0.60
5 | ✓ | ✓ | ✗ | 0.82 | 0.65
6 | ✓ | ✗(Mag Only) | ✗ | 0.73 | 0.59
7 | ✓ | ✗(Mag Only) |  ✗($F_{\mathrm{Mag}}$ Res.) | 0.83 | 0.66

Figure 4: Illustration of significant improvement in average cross-person
generalization performance of Nonstationary Transformer (NSTrans) from in (a)
WISDM dataset from 0.40 to 0.83 and (b) HHAR dataset from 0.25 to 0.78, with
our phase-driven approach.

###  3.3 General Applicability of PhASER

In addition to seamlessly incorporating plug-and-play modules like RevIN
(Tables 2 and Tables 13, 14 in Appendix), we further demonstrate the general
applicability and flexibility of PhASER by integrating the proposed three
design elements into the NSTrans model: phase-based augmentation for
diversifying non-stationarity, separate magnitude-phase feature encoding, and
incorporation of the phase with a residual connection. The significant
performance improvements on WISDM and HHAR (shown in Figure 4) demonstrate the
general effectiveness of these proposed designs and the flexibility of PhASER
with different backbone models. More details can be found in Section D.5 of
Appendix.

##  4 Additional Related Works

Nonstationary Time-Series Analysis. In real-world scenarios, time series data
are often nonstationary, posing significant challenges for forecasting and
classification tasks (Esling & Agon, 2012; Ismail Fawaz et al., 2019; Dama &
Sinoquet, 2021; Wang et al., 2024). Solutions spanning from Bayesian models
(Liang, 2005; Chen & Sun, 2021) and normalization techniques (Liu et al.,
2023; Chang et al., 2021; Passalis et al., 2019) to recurrent neural networks
(Tang et al., 2021; Du et al., 2021) and transformers (Liu et al., 2022c; Wang
et al., 2022a) along with a few theoretical works for forecasting (Dama &
Sinoquet, 2021) exist; there is a notable scarcity in theoretical works that
analyze the challenges introduced by non-stationarity for time series
classification. Although some studies (Zhao et al., 2020; Tonekaboni et al.,
2020; Eldele et al., 2023) empirically validate the gains obtained by
addressing non-stationarity, our work is the first to rigorously prove the
crucial impact of non-stationarity on the time-series out-of-distribution
classification.

Domain Generalizable Learning. While domain generalizable learning methods are
well-established in visual data (Wang et al., 2022b), extending such
capabilities to time-series data poses unique challenges. Traditional
approaches like data augmentation (Wang et al., 2021b; Liu et al., 2022a; Wang
et al., 2021a) and domain discrepancy minimization (Zhang & Chen, 2023; Li et
al., 2018; Xu et al., 2021b) face limitations due to the less flexible nature
of time-series augmentation and the broader concept of domains in this context
(Wen et al., 2021; Wilson et al., 2020). Despite difficulties in domain
discrepancy minimization for time series, some studies explore domain-
invariant representation learning (Lu et al., 2023; Wang et al., 2023) and
learnable data transformation (Qin et al., 2023; Mohapatra et al., 2023a,
2022). Different from these works, we emphasize the non-stationarity of time
series and theoretically characterize it in the domain discrepancy. Some works
in the visual domain have evidenced the role of phase in reducing domain
discrepancy (Kim et al., 2023; Xu et al., 2021a) but they require
sophisticated sampling strategy and domain labels. A handful of works (Lu et
al., 2022a) in time-series applications hint at the role of phase for domain-
invariant learning. Traditionally, signal-processing methods dictate
sufficiency in phase-only information to reconstruct a signal (Masuyama et
al., 2023; Jacques & Feuillen, 2020, 2021) under certain assumptions. Inspired
by these, we propose a novel phase-driven framework including an augmentation
module that can reasonably diversify the training data distribution and a
representation learning mechanism that can deal with non-stationarity to
minimize the domain discrepancy.

##  5 Conclusion

We address the generalization problem for nonstationary time-series
classification using a phase-driven approach without accessing domain labels
of source domains or samples from unseen distributions. Our approach consists
of phase-based phase augmentation, treating time-varying magnitude and phase
as separate modalities and incorporating a novel phase-derived residual
connection in the network. We support our design choices with rigorous
theoretical and empirical evidence. Our method demonstrates significant
improvement across 10 benchmarks on 5 real-world datasets, and our principles
can be generally adapted to other works.

## Impact Statement

PhASER, with its advanced approach to time-series domain-generalizable
learning, offers significant societal benefits to various fields and domains,
such as healthcare, financial, and manufacturing domains, by enabling more
precise and dependable data analysis. While PhASER itself does not directly
cause negative social impacts, its application within these critical areas
necessitates a thoughtful examination of ethical concerns. In healthcare,
PhASER can revolutionize patient monitoring and treatment, leading to improved
experience and outcomes. In finance, it can enhance the stability and
efficiency of financial markets. In manufacturing, we believe PhASER may help
optimize production processes, reduce waste, and improve safety. However, the
implementation of PhASER in such vital areas brings to the forefront ethical
considerations like data privacy, bias prevention, and the careful management
of automation reliance. Addressing these issues is important to leverage
PhASER’s benefits across these domains while ensuring ethical integrity and
maintaining public trust in these areas.

## References

  * Bai et al. (2022) Bai, G., Ling, C., and Zhao, L.  Temporal domain generalization with drift-aware dynamic neural networks.  _arXiv preprint arXiv:2205.10664_ , 2022.
  * Bangaru et al. (2020) Bangaru, S. S., Wang, C., and Aghazadeh, F.  Data quality and reliability assessment of wearable emg and imu sensor for construction activity recognition.  _Sensors_ , 20(18):5264, 2020.
  * Bulbul et al. (2018) Bulbul, E., Cetin, A., and Dogru, I. A.  Human activity recognition using smartphones.  In _2018 2nd international symposium on multidisciplinary studies and innovative technologies (ismsit)_ , pp. 1–6. IEEE, 2018.
  * Chang et al. (2021) Chang, S., Park, H., Cho, J., Park, H., Yun, S., and Hwang, K.  Subspectral normalization for neural audio data processing.  In _ICASSP 2021-2021 IEEE International Conference on Acoustics, Speech and Signal Processing (ICASSP)_ , pp. 850–854. IEEE, 2021.
  * Chen & Sun (2021) Chen, X. and Sun, L.  Bayesian temporal factorization for multidimensional time series prediction.  _IEEE Transactions on Pattern Analysis and Machine Intelligence_ , 44(9):4659–4673, 2021.
  * Dama & Sinoquet (2021) Dama, F. and Sinoquet, C.  Time series analysis and modeling to forecast: A survey.  _arXiv preprint arXiv:2104.00164_ , 2021.
  * Du et al. (2021) Du, Y., Wang, J., Feng, W., Pan, S., Qin, T., Xu, R., and Wang, C.  Adarnn: Adaptive learning and forecasting of time series.  In _Proceedings of the 30th ACM international conference on information & knowledge management_, pp. 402–411, 2021.
  * Eldele et al. (2023) Eldele, E., Ragab, M., Chen, Z., Wu, M., Kwoh, C.-K., Li, X., and Guan, C.  Self-supervised contrastive representation learning for semi-supervised time-series classification.  _IEEE Transactions on Pattern Analysis and Machine Intelligence_ , 2023.
  * Elfwing et al. (2018) Elfwing, S., Uchibe, E., and Doya, K.  Sigmoid-weighted linear units for neural network function approximation in reinforcement learning.  _Neural networks_ , 107:3–11, 2018.
  * Esling & Agon (2012) Esling, P. and Agon, C.  Time-series data mining.  _ACM Computing Surveys (CSUR)_ , 45(1):1–34, 2012\.
  * Gagnon-Audet et al. (2022) Gagnon-Audet, J.-C., Ahuja, K., Darvishi-Bayazi, M.-J., Mousavi, P., Dumas, G., and Rish, I.  Woods: Benchmarks for out-of-distribution generalization in time series.  _arXiv preprint arXiv:2203.09978_ , 2022.
  * Ganin et al. (2016) Ganin, Y., Ustinova, E., Ajakan, H., Germain, P., Larochelle, H., Laviolette, F., March, M., and Lempitsky, V.  Domain-adversarial training of neural networks.  _Journal of machine learning research_ , 17(59):1–35, 2016.
  * Germain et al. (2016) Germain, P., Habrard, A., Laviolette, F., and Morvant, E.  A new pac-bayesian perspective on domain adaptation.  In _International conference on machine learning_ , pp. 859–868. PMLR, 2016.
  * Goldberger et al. (2000) Goldberger, A. L., Amaral, L. A., Glass, L., Hausdorff, J. M., Ivanov, P. C., Mark, R. G., Mietus, J. E., Moody, G. B., Peng, C.-K., and Stanley, H. E.  Physiobank, physiotoolkit, and physionet: components of a new research resource for complex physiologic signals.  _circulation_ , 101(23):e215–e220, 2000.
  * Gulrajani & Lopez-Paz (2020) Gulrajani, I. and Lopez-Paz, D.  In search of lost domain generalization.  _arXiv preprint arXiv:2007.01434_ , 2020.
  * Hayes et al. (1980) Hayes, M., Lim, J., and Oppenheim, A.  Signal reconstruction from phase or magnitude.  _IEEE Transactions on Acoustics, Speech, and Signal Processing_ , 28(6):672–680, 1980.
  * He et al. (2020) He, F., Liu, T., and Tao, D.  Why resnet works? residuals generalize.  _IEEE transactions on neural networks and learning systems_ , 31(12):5349–5362, 2020.
  * He et al. (2023a) He, H., Queen, O., Koker, T., Cuevas, C., Tsiligkaridis, T., and Zitnik, M.  Domain adaptation for time series under feature and label shifts.  _arXiv preprint arXiv:2302.03133_ , 2023a.
  * He et al. (2023b) He, H., Queen, O., Koker, T., Cuevas, C., Tsiligkaridis, T., and Zitnik, M.  Domain adaptation for time series under feature and label shifts.  _arXiv preprint arXiv:2302.03133_ , 2023b.
  * He et al. (2016) He, K., Zhang, X., Ren, S., and Sun, J.  Deep residual learning for image recognition.  In _Proceedings of the IEEE conference on computer vision and pattern recognition_ , pp. 770–778, 2016.
  * Huang (2014) Huang, N. E.  _Hilbert-Huang transform and its applications_ , volume 16.  World Scientific, 2014.
  * Huang et al. (2020) Huang, Z., Wang, H., Xing, E. P., and Huang, D.  Self-challenging improves cross-domain generalization.  In _Computer Vision–ECCV 2020: 16th European Conference, Glasgow, UK, August 23–28, 2020, Proceedings, Part II 16_ , pp. 124–140. Springer, 2020.
  * Ismail Fawaz et al. (2019) Ismail Fawaz, H., Forestier, G., Weber, J., Idoumghar, L., and Muller, P.-A.  Deep learning for time series classification: a review.  _Data mining and knowledge discovery_ , 33(4):917–963, 2019.
  * Iwana & Uchida (2021) Iwana, B. K. and Uchida, S.  An empirical survey of data augmentation for time series classification with neural networks.  _Plos one_ , 16(7):e0254841, 2021.
  * Jacques & Feuillen (2020) Jacques, L. and Feuillen, T.  Keep the phase! signal recovery in phase-only compressive sensing.  _arXiv preprint arXiv:2011.06499_ , 2020.
  * Jacques & Feuillen (2021) Jacques, L. and Feuillen, T.  The importance of phase in complex compressive sensing.  _IEEE Transactions on Information Theory_ , 67(6):4150–4161, 2021.
  * Kazemi et al. (2019) Kazemi, S. M., Goel, R., Eghbali, S., Ramanan, J., Sahota, J., Thakur, S., Wu, S., Smyth, C., Poupart, P., and Brubaker, M.  Time2vec: Learning a vector representation of time.  _arXiv preprint arXiv:1907.05321_ , 2019.
  * Kemp et al. (2000) Kemp, B., Zwinderman, A. H., Tuk, B., Kamphuisen, H. A., and Oberye, J. J.  Analysis of a sleep-dependent neuronal feedback loop: the slow-wave microcontinuity of the eeg.  _IEEE Transactions on Biomedical Engineering_ , 47(9):1185–1194, 2000.
  * Kim et al. (2021a) Kim, B., Chang, S., Lee, J., and Sung, D.  Broadcasted residual learning for efficient keyword spotting.  _arXiv preprint arXiv:2106.04140_ , 2021a.
  * Kim et al. (2021b) Kim, B., Yang, S., Kim, J., and Chang, S.  Domain generalization on efficient acoustic scene classification using residual normalization.  _arXiv preprint arXiv:2111.06531_ , 2021b.
  * Kim et al. (2023) Kim, M., Li, D., and Hospedales, T.  Domain generalisation via domain adaptation: An adversarial fourier amplitude approach.  _arXiv preprint arXiv:2302.12047_ , 2023.
  * Kim et al. (2021c) Kim, T., Kim, J., Tae, Y., Park, C., Choi, J.-H., and Choo, J.  Reversible instance normalization for accurate time-series forecasting against distribution shift.  In _International Conference on Learning Representations_ , 2021c.
  * King (2009) King, F. W.  _Hilbert Transforms: Volume 2_ , volume 2.  Cambridge University Press, 2009.
  * Kingma et al. (2020) Kingma, D. P., Ba, J. A., and Adam, J.  A method for stochastic optimization. arxiv 2014.  _arXiv preprint arXiv:1412.6980_ , 106, 2020.
  * Kwapisz et al. (2011) Kwapisz, J. R., Weiss, G. M., and Moore, S. A.  Activity recognition using cell phone accelerometers.  _ACM SigKDD Explorations Newsletter_ , 12(2):74–82, 2011.
  * Lang & Lang (1985) Lang, S. and Lang, S.  The plancherel formula.  _SL 2 (R)_ , pp. 163–177, 1985.
  * Li et al. (2018) Li, H., Pan, S. J., Wang, S., and Kot, A. C.  Domain generalization with adversarial feature learning.  In _Proceedings of the IEEE conference on computer vision and pattern recognition_ , pp. 5400–5409, 2018.
  * Li et al. (2020) Li, J., Sun, A., Han, J., and Li, C.  A survey on deep learning for named entity recognition.  _IEEE Transactions on Knowledge and Data Engineering_ , 34(1):50–70, 2020.
  * Li et al. (2021) Li, P., Li, D., Li, W., Gong, S., Fu, Y., and Hospedales, T. M.  A simple feature augmentation for domain generalization.  In _Proceedings of the IEEE/CVF International Conference on Computer Vision_ , pp. 8886–8895, 2021.
  * Liang (2005) Liang, F.  Bayesian neural networks for nonlinear time series forecasting.  _Statistics and computing_ , 15:13–29, 2005.
  * Liu et al. (2022a) Liu, C., Wang, L., Lyu, L., Sun, C., Wang, X., and Zhu, Q.  Deja vu: Continual model generalization for unseen domains.  In _The Eleventh International Conference on Learning Representations_ , 2022a.
  * Liu et al. (2022b) Liu, Y., Wu, H., Wang, J., and Long, M.  Non-stationary transformers: Rethinking the stationarity in time series forecasting.  _arXiv preprint arXiv:2205.14415_ , 2022b.
  * Liu et al. (2022c) Liu, Y., Wu, H., Wang, J., and Long, M.  Non-stationary transformers: Exploring the stationarity in time series forecasting.  _Advances in Neural Information Processing Systems_ , 35:9881–9893, 2022c.
  * Liu et al. (2023) Liu, Z., Cheng, M., Li, Z., Huang, Z., Liu, Q., Xie, Y., and Chen, E.  Adaptive normalization for non-stationary time series forecasting: A temporal slice perspective.  In _Thirty-seventh Conference on Neural Information Processing Systems_ , 2023.
  * Lobov et al. (2018) Lobov, S., Krilova, N., Kastalskiy, I., Kazantsev, V., and Makarov, V. A.  Latent factors limiting the performance of semg-interfaces.  _Sensors_ , 18(4):1122, 2018.
  * Lu et al. (2022a) Lu, W., Wang, J., Li, H., Chen, Y., and Xie, X.  Domain-invariant feature exploration for domain generalization.  _arXiv preprint arXiv:2207.12020_ , 2022a.
  * Lu et al. (2022b) Lu, W., Wang, J., Sun, X., Chen, Y., and Xie, X.  Out-of-distribution representation learning for time series classification.  In _The Eleventh International Conference on Learning Representations_ , 2022b.
  * Lu et al. (2023) Lu, W., Wang, J., Sun, X., Chen, Y., and Xie, X.  Out-of-distribution representation learning for time series classification.  In _The Eleventh International Conference on Learning Representations_ , 2023.  URL https://openreview.net/forum?id=gUZWOE42l6Q.
  * Marion et al. (2023) Marion, P., Wu, Y.-H., Sander, M. E., and Biau, G.  Implicit regularization of deep residual networks towards neural odes.  _arXiv preprint arXiv:2309.01213_ , 2023.
  * Masuyama et al. (2023) Masuyama, Y., Ueno, N., and Ono, N.  Signal reconstruction from mel-spectrogram based on bi-level consistency of full-band magnitude and phase.  In _2023 IEEE Workshop on Applications of Signal Processing to Audio and Acoustics (WASPAA)_ , pp. 1–5. IEEE, 2023.
  * Mohapatra et al. (2022) Mohapatra, P., Pandey, A., Islam, B., and Zhu, Q.  Speech disfluency detection with contextual representation and data distillation.  In _Proceedings of the 1st ACM International Workshop on Intelligent Acoustic Systems and Applications_ , pp. 19–24, 2022.
  * Mohapatra et al. (2023a) Mohapatra, P., Islam, B., Islam, M. T., Jiao, R., and Zhu, Q.  Efficient stuttering event detection using siamese networks.  In _ICASSP 2023-2023 IEEE International Conference on Acoustics, Speech and Signal Processing (ICASSP)_ , pp. 1–5. IEEE, 2023a.
  * Mohapatra et al. (2023b) Mohapatra, P., Pandey, A., Keten, S., Chen, W., and Zhu, Q.  Person identification with wearable sensing using missing feature encoding and multi-stage modality fusion.  In _ICASSP 2023-2023 IEEE International Conference on Acoustics, Speech and Signal Processing (ICASSP)_ , pp. 1–2. IEEE, 2023b.
  * Mohapatra et al. (2023c) Mohapatra, P., Pandey, A., Sui, Y., and Zhu, Q.  Effect of attention and self-supervised speech embeddings on non-semantic speech tasks.  In _Proceedings of the 31st ACM International Conference on Multimedia_ , pp. 9511–9515, 2023c.
  * Ozdemir et al. (2020) Ozdemir, M. A., Kisa, D. H., Guren, O., Onan, A., and Akan, A.  Emg based hand gesture recognition using deep learning.  In _2020 Medical Technologies Congress (TIPTEKNO)_ , pp. 1–4. IEEE, 2020.
  * Parascandolo et al. (2020) Parascandolo, G., Neitz, A., Orvieto, A., Gresele, L., and Schölkopf, B.  Learning explanations that are hard to vary.  _arXiv preprint arXiv:2009.00329_ , 2020.
  * Passalis et al. (2019) Passalis, N., Tefas, A., Kanniainen, J., Gabbouj, M., and Iosifidis, A.  Deep adaptive input normalization for time series forecasting.  _IEEE transactions on neural networks and learning systems_ , 31(9):3760–3765, 2019.
  * Phaye et al. (2019) Phaye, S. S. R., Benetos, E., and Wang, Y.  Subspectralnet–using sub-spectrogram based convolutional neural networks for acoustic scene classification.  In _ICASSP 2019-2019 IEEE International Conference on Acoustics, Speech and Signal Processing (ICASSP)_ , pp. 825–829. IEEE, 2019.
  * Qin et al. (2023) Qin, X., Wang, J., Ma, S., Lu, W., Zhu, Y., Xie, X., and Chen, Y.  Generalizable low-resource activity recognition with diverse and discriminative representation learning.  _KDD_ , 2023.
  * Ragab et al. (2023a) Ragab, M., Eldele, E., Tan, W. L., Foo, C.-S., Chen, Z., Wu, M., Kwoh, C.-K., and Li, X.  Adatime: A benchmarking suite for domain adaptation on time series data.  _ACM Transactions on Knowledge Discovery from Data_ , 17(8):1–18, 2023a.
  * Ragab et al. (2023b) Ragab, M., Eldele, E., Wu, M., Foo, C.-S., Li, X., and Chen, Z.  Source-free domain adaptation with temporal imputation for time series data.  In _Proceedings of the 29th ACM SIGKDD Conference on Knowledge Discovery and Data Mining_ , pp. 1989–1998, 2023b.
  * Sagawa et al. (2019) Sagawa, S., Koh, P. W., Hashimoto, T. B., and Liang, P.  Distributionally robust neural networks for group shifts: On the importance of regularization for worst-case generalization.  _arXiv preprint arXiv:1911.08731_ , 2019.
  * Said & Dickey (1984) Said, S. E. and Dickey, D. A.  Testing for unit roots in autoregressive-moving average models of unknown order.  _Biometrika_ , 71(3):599–607, 1984.
  * Stisen et al. (2015) Stisen, A., Blunck, H., Bhattacharya, S., Prentow, T. S., Kjærgaard, M. B., Dey, A., Sonne, T., and Jensen, M. M.  Smart devices are different: Assessing and mitigatingmobile sensing heterogeneities for activity recognition.  In _Proceedings of the 13th ACM conference on embedded networked sensor systems_ , pp. 127–140, 2015.
  * Tang et al. (2023) Tang, X.-s., Hao, K., and Wei, H.  A bio-inspired positional embedding network for transformer-based models.  _Neural Networks_ , 166:204–214, 2023.
  * Tang et al. (2021) Tang, Y., Yu, F., Pedrycz, W., Yang, X., Wang, J., and Liu, S.  Building trend fuzzy granulation-based lstm recurrent neural network for long-term time-series forecasting.  _IEEE transactions on fuzzy systems_ , 30(6):1599–1613, 2021.
  * Tonekaboni et al. (2020) Tonekaboni, S., Eytan, D., and Goldenberg, A.  Unsupervised representation learning for time series with temporal neighborhood coding.  In _International Conference on Learning Representations_ , 2020.
  * Van Erven & Harremos (2014) Van Erven, T. and Harremos, P.  Rényi divergence and kullback-leibler divergence.  _IEEE Transactions on Information Theory_ , 60(7):3797–3820, 2014.
  * Vaswani et al. (2017) Vaswani, A., Shazeer, N., Parmar, N., Uszkoreit, J., Jones, L., Gomez, A. N., Kaiser, Ł., and Polosukhin, I.  Attention is all you need.  _Advances in neural information processing systems_ , 30, 2017.
  * Virtanen et al. (2020) Virtanen, P., Gommers, R., Oliphant, T. E., Haberland, M., Reddy, T., Cournapeau, D., Burovski, E., Peterson, P., Weckesser, W., Bright, J., van der Walt, S. J., Brett, M., Wilson, J., Millman, K. J., Mayorov, N., Nelson, A. R. J., Jones, E., Kern, R., Larson, E., Carey, C. J., Polat, İ., Feng, Y., Moore, E. W., VanderPlas, J., Laxalde, D., Perktold, J., Cimrman, R., Henriksen, I., Quintero, E. A., Harris, C. R., Archibald, A. M., Ribeiro, A. H., Pedregosa, F., van Mulbregt, P., and SciPy 1.0 Contributors.  SciPy 1.0: Fundamental Algorithms for Scientific Computing in Python.  _Nature Methods_ , 17:261–272, 2020.  doi: 10.1038/s41592-019-0686-2.
  * Volpi et al. (2018) Volpi, R., Namkoong, H., Sener, O., Duchi, J. C., Murino, V., and Savarese, S.  Generalizing to unseen domains via adversarial data augmentation.  _Advances in neural information processing systems_ , 31, 2018.
  * Wang et al. (2022a) Wang, H., Wang, T., Li, S., Zheng, J., Guan, S., and Chen, W.  Adaptive long-short pattern transformer for stock investment selection.  In _Proceedings of the Thirty-First International Joint Conference on Artificial Intelligence_ , pp. 3970–3977, 2022a.
  * Wang et al. (2022b) Wang, J., Lan, C., Liu, C., Ouyang, Y., Qin, T., Lu, W., Chen, Y., Zeng, W., and Yu, P.  Generalizing to unseen domains: A survey on domain generalization.  _IEEE Transactions on Knowledge and Data Engineering_ , 2022b.
  * Wang et al. (2023) Wang, J., Chen, L., and Al Faruque, M. A.  Domino: Domain-invariant hyperdimensional classification for multi-sensor time series data.  In _2023 IEEE/ACM International Conference on Computer Aided Design (ICCAD)_ , pp. 1–9. IEEE, 2023.
  * Wang et al. (2021a) Wang, L., Xu, S., Xu, R., Wang, X., and Zhu, Q.  Non-transferable learning: A new approach for model ownership verification and applicability authorization.  In _International Conference on Learning Representations_ , 2021a.
  * Wang et al. (2024) Wang, L., Xu, S., Du, X., and Zhu, Q.  Dacr: Distribution-augmented contrastive reconstruction for time-series anomaly detection.  _arXiv preprint arXiv:2401.11271_ , 2024.
  * Wang et al. (2021b) Wang, Z., Luo, Y., Qiu, R., Huang, Z., and Baktashmotlagh, M.  Learning to diversify for single domain generalization.  In _Proceedings of the IEEE/CVF International Conference on Computer Vision_ , pp. 834–843, 2021b.
  * Wen et al. (2020) Wen, Q., Sun, L., Yang, F., Song, X., Gao, J., Wang, X., and Xu, H.  Time series data augmentation for deep learning: A survey.  _arXiv preprint arXiv:2002.12478_ , 2020.
  * Wen et al. (2021) Wen, Q., Sun, L., Yang, F., Song, X., Gao, J., Wang, X., and Xu, H.  Time series data augmentation for deep learning: A survey.  In _Proceedings of the Thirtieth International Joint Conference on Artificial Intelligence_. International Joint Conferences on Artificial Intelligence Organization, 2021.
  * Wilson et al. (2020) Wilson, G., Doppa, J. R., and Cook, D. J.  Multi-source deep domain adaptation with weak supervision for time-series sensor data.  In _Proceedings of the 26th ACM SIGKDD international conference on knowledge discovery & data mining_, pp. 1768–1778, 2020.
  * Xu et al. (2021a) Xu, Q., Zhang, R., Zhang, Y., Wang, Y., and Tian, Q.  A fourier-based framework for domain generalization.  In _Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition_ , pp. 14383–14392, 2021a.
  * Xu et al. (2021b) Xu, S., Wang, L., Wang, Y., and Zhu, Q.  Weak adaptation learning: Addressing cross-domain data insufficiency with weak annotator.  In _Proceedings of the IEEE/CVF International Conference on Computer Vision_ , pp. 8917–8926, 2021b.
  * Xu et al. (2022) Xu, X., Zhang, H., Sefidgar, Y., Ren, Y., Liu, X., Seo, W., Brown, J., Kuehn, K., Merrill, M., Nurius, P., et al.  Globem dataset: Multi-year datasets for longitudinal human behavior modeling generalization.  _Advances in Neural Information Processing Systems_ , 35:24655–24692, 2022.
  * Yan et al. (2024) Yan, S., Liu, C., Yu, Z., Ju, L., Mahapatra, D., Betz-Stablein, B., Mar, V., Janda, M., Soyer, P., and Ge, Z.  Prompt-driven latent domain generalization for medical image classification.  _arXiv preprint arXiv:2401.03002_ , 2024.
  * Yang & Hong (2022) Yang, L. and Hong, S.  Unsupervised time-series representation learning with iterative bilinear temporal-spectral fusion.  In _International Conference on Machine Learning_ , pp. 25038–25054. PMLR, 2022.
  * Zhang & Chen (2023) Zhang, X. and Chen, Y.-C.  Adaptive domain generalization via online disagreement minimization.  _IEEE Transactions on Image Processing_ , 2023.
  * Zhao et al. (2020) Zhao, H., Zheng, Q., Ma, K., Li, H., and Zheng, Y.  Deep representation-based domain adaptation for nonstationary eeg classification.  _IEEE Transactions on Neural Networks and Learning Systems_ , 32(2):535–545, 2020.

## Appendix

This Appendix includes additional details for the paper _“Phase-driven Domain
Generalizable Learning for Nonstationary Time Series”_ , including the
reproducibility statement, theoretical proofs (Section A), detailed dataset
introduction (Section C), more details of PhASER (Section B), and
implementation details (Section D) and detailed results (Section E) of main
experiments.

## Reproducibility Statement

All source codes to reproduce experiment results (with instructions for
running the code) have been provided in the Supplementary Materials. We use
public datasets and provide implementation details in the following sections.

##  Appendix A Theoretical Proofs

###### Lemma 2.4.

Let a set $S$ of source domains $S=\\{\mathcal{S}_{i}\\}_{i=1}^{N_{S}}$. A
convex hull $\Lambda_{S}$ is considered here that consists of mixture
distributions
$\Lambda_{S}=\\{\bar{\mathcal{S}}:\bar{\mathcal{S}}(\cdot)=\sum_{i=1}^{N_{S}}\pi_{i}\mathcal{S}_{i}(\cdot),\pi_{i}\in\Delta_{N_{S}-1}\\}$,
where $\Delta_{N_{S}-1}$ is the $N_{S}\\!-\\!1$-th dimensional simplex. Let
$\beta_{q}(\mathcal{S}_{i}\|\mathcal{S}_{j})\leq\epsilon$ for $\forall
i,j\in[N_{S}]$, we have the following relation for the $\beta$-Divergence
between any pair of two domains
$\mathcal{D}^{\prime},\,\mathcal{D}^{\prime\prime}\in\Lambda_{S}$ in the
convex hull,

$\displaystyle\beta_{q}(\mathcal{D}^{\prime}\|\mathcal{D}^{\prime\prime})\leq\epsilon.$
(16)

Proof. Suppose two unseen domains $\mathcal{D}^{\prime}$ and
$\mathcal{D}_{\prime\prime}$ on the convex hull $\Lambda_{S}$ of $N_{S}$
source domains with support $\Omega$. More specifically, let these two domains
be $\mathcal{D}^{\prime}=\sum_{k=1}^{N_{S}}\pi_{k}\mathcal{S}_{k}(\cdot)$ and
$\mathcal{D}^{\prime\prime}=\sum_{l=1}^{N_{S}}\pi_{l}\mathcal{S}_{l}(\cdot)$,
then the $\beta$-Divergence between $\mathcal{D}^{\prime}$ and
$\mathcal{D}^{\prime\prime}$ is

$\displaystyle\beta_{q}(\mathcal{D}^{\prime}\|\mathcal{D}^{\prime\prime})=2^{\frac{q-1}{q}\mathrm{RD}_{q}(\mathcal{D}^{\prime}\|\mathcal{D}^{\prime\prime})}.$
(17)

Let us consider the part of Rényi Divergence as follows,

$\displaystyle\mathrm{RD}_{q}(\mathcal{D}^{\prime}\|\mathcal{D}^{\prime\prime})$
$\displaystyle=\frac{1}{q-1}\ln{\int_{\Omega}\left[\mathcal{D}^{\prime}(x)\right]^{q}\left[\mathcal{D}^{\prime\prime}(x)\right]^{1-q}dx}$
(18)
$\displaystyle=\frac{1}{q-1}\ln{\int_{\Omega}\left[\sum_{k=1}^{N_{S}}\pi_{k}\mathcal{S}_{k}(x)\right]^{q}\left[\sum_{l=1}^{N_{S}}\pi_{l}\mathcal{S}_{l}(x)\right]^{1-q}dx}$
$\displaystyle=\frac{1}{q-1}\ln{\int_{\Omega}\left[\sum_{k=1}^{N_{S}}\sum_{l=1}^{N_{S}}\pi_{k}\pi_{l}\mathcal{S}_{k}(x)\right]^{q}\left[\sum_{k=1}^{N_{S}}\sum_{l=1}^{N_{S}}\pi_{k}\pi_{l}\mathcal{S}_{l}(x)\right]^{1-q}dx}$
$\displaystyle=\frac{1}{q-1}\ln{\sum_{k=1}^{N_{S}}\sum_{l=1}^{N_{S}}\pi_{k}\pi_{l}\int_{\Omega}\left[\mathcal{S}_{k}(x)\right]^{q}\left[\mathcal{S}_{l}(x)\right]^{1-q}dx}$
$\displaystyle\leq\frac{1}{q-1}\ln{\sum_{k=1}^{N_{S}}\sum_{l=1}^{N_{S}}\pi_{k}\pi_{l}\max\limits_{k,l\in[N_{S}]}\int_{\Omega}\left[\mathcal{S}_{k}(x)\right]^{q}\left[\mathcal{S}_{l}(x)\right]^{1-q}dx}$
$\displaystyle=\frac{1}{q-1}\ln{\max\limits_{k,l\in[N_{S}]}\int_{\Omega}\left[\mathcal{S}_{k}(x)\right]^{q}\left[\mathcal{S}_{l}(x)\right]^{1-q}dx}.$

According to the given assumption that
$\beta_{q}(\mathcal{S}_{i}\|\mathcal{S}_{j})\leq\epsilon$ for $\forall
i,j\in[N_{S}]$, we have,

$\displaystyle\mathrm{RD}_{q}(\mathcal{D}^{\prime}\|\mathcal{D}^{\prime\prime})\leq\frac{1}{q-1}\ln{\max\limits_{k,l\in[N_{S}]}\int_{\Omega}\left[\mathcal{S}_{k}(x)\right]^{q}\left[\mathcal{S}_{l}(x)\right]^{1-q}dx}=\max\limits_{k,l\in[N_{S}]}\mathrm{RD}_{q}(\mathcal{S}_{k}\|\mathcal{S}_{l})\leq\frac{q}{q-1}\log_{2}\epsilon.$
(19)

Thus
$\beta_{q}(\mathcal{D}^{\prime}\|\mathcal{D}^{\prime\prime})\leq\epsilon$. ∎

###### Theorem 2.5.

Let $\mathcal{H}$ be a hypothesis space built from a set of source time-series
domains $S=\\{\mathcal{S}_{i}\\}_{i=1}^{N_{S}}$ with the same value range
(i.e., the supports of these source domains are the same). Suppose $q>0$ is a
constant, for any unseen time-series domain $\mathcal{D}_{\mathrm{U}}$ from
the convex hull $\Lambda_{S}$, we have its closest element
$\mathcal{D}_{\bar{\mathrm{U}}}$ in $\Lambda_{S}$, i.e.,
$\mathcal{D}_{\bar{\mathrm{U}}}=\arg\min\limits_{\pi_{1},...,\pi_{N_{S}}}\beta_{q}(\mathcal{D}_{\bar{\mathrm{U}}}\|\sum_{i=1}^{N_{S}}\pi_{i}\mathcal{S}_{i})$.
Then the risk of $\mathcal{D}_{\mathrm{U}}$ on any $\rho$ in $\mathcal{H}$ is,

$\displaystyle
R_{\mathcal{D}_{\mathrm{U}}}[\rho]\leq\frac{1}{2}\mathrm{d}_{\mathcal{D}_{\mathrm{U}}}(\rho)+\epsilon\cdot\left[\mathrm{e}_{\mathcal{D}_{\bar{\mathrm{U}}}}(\rho)\right]^{1-\frac{1}{q}},$
(20)

where $\mathrm{d}_{\mathcal{D}}(\rho)$ and $\mathrm{e}_{\mathcal{D}}(\rho)$
are an expected disagreement and an expected joint error of a domain
$\mathcal{D}$, respectively, and they are defined as follows,

$\displaystyle\mathrm{d}_{\mathcal{D}}(\rho)$
$\displaystyle=\mathbb{E}_{\mathbf{x}\sim\mathcal{D}_{\mathbf{x}}}\mathbb{E}_{h\sim\rho}\mathbb{E}_{h^{\prime}\sim\rho}\mathrm{I}[h(\mathbf{x})\neq
h^{\prime}(\mathbf{x})],$ (21) $\displaystyle\mathrm{e}_{\mathcal{D}}(\rho)$
$\displaystyle=\mathbb{E}_{(\mathbf{x},y)\sim\mathcal{D}}\mathbb{E}_{h\sim\rho}\mathbb{E}_{h^{\prime}\sim\rho}\mathrm{I}[h(\mathbf{x})\neq
y]\mathrm{I}[h^{\prime}(\mathbf{x})\neq y],$ (22)

where $\mathrm{I}[\cdot]$ is an indicator function with
$\mathrm{I}[\mathrm{True}]=1$ and $\mathrm{I}[\mathrm{False}]=0$. The
$\epsilon$ in Eq. (12) is a value larger than the maximum $\beta$-Divergence
in $\Lambda_{S}$,

$\displaystyle\epsilon$ $\displaystyle\geq\max\limits_{i,j\in[N_{S}],i\neq
j,t\in[0,+\infty)}2^{\frac{q-1}{q}\mathrm{RD}_{q}(\mathcal{S}_{i}(t)\|\mathcal{S}_{j}(t))},$
(23)

where

$\displaystyle\mathrm{RD}_{q}(\mathcal{S}_{i}(t)\|\mathcal{S}_{j}(t))=\frac{q(\mu_{j,t}-\mu_{i,t})^{2}}{2(1-q)\sigma_{i,t}^{2}+2\sigma_{j,t}^{2}}+\frac{\ln{\frac{\sqrt{(1-q)\sigma_{i,t}^{2}+\sigma_{j,t}^{2}}}{\sigma_{i,t}^{1-q}\sigma_{j,t}^{q}}}}{1-q}$
(24)

Proof. According to Theorem 3 of Germain et al. (2016), if $\mathcal{H}$ is a
hypothesis space, and $\mathcal{S},\mathcal{T}$ respectively are the source
and target domains. For all $\rho$ in $\mathcal{H}$,

$\displaystyle
R_{\mathcal{T}}[\rho]\leq\frac{1}{2}\mathrm{d}_{\mathcal{T}}(\rho)+\beta_{q}(\mathcal{T}\|\mathcal{S})\cdot\left[\mathrm{e}_{\mathcal{S}}(\rho)\right]^{1-\frac{1}{q}}+\eta_{\mathcal{T}\setminus\mathcal{S}},$
(25)

where $\eta_{\mathcal{T}\setminus\mathcal{S}}$ denotes the distribution of
$(\mathbf{x},y)\sim\mathcal{T}$ conditional to
$(\mathbf{x},y)\in\mathrm{SUPP}(\mathcal{S})$. But because it is hardly
conceivable to estimate the joint error
$\mathrm{e}_{\mathcal{T}\setminus\mathcal{S}}(\rho)$ without making extra
assumptions, Germain et al. (2016) defines the worst risk for this unknown
area,

$\displaystyle\eta_{\mathcal{T}\setminus\mathcal{S}}=\mathrm{Pr}_{(\mathbf{x},y)\sim\mathcal{T}}\left[(\mathbf{x},y)\notin\mathrm{SUPP}(\mathcal{S})\right]\sup_{h\in\mathcal{H}}R_{\mathcal{T}\setminus\mathcal{S}}[h].$
(26)

In Theorem 2.5, all domains from the convex hull $\Lambda_{S}$ have the same
value range, in other words, their supports are continuous and fully
overlapped. In this case,
$\mathrm{Pr}_{(\mathbf{x},y)\sim\mathcal{T}}\left[(\mathbf{x},y)\notin\mathrm{SUPP}(\mathcal{S})\right]=0$,
i.e., $\eta_{\mathcal{T}\setminus\mathcal{S}}=0$.

With Eq. (25), if the target domain $\mathcal{T}$ is assumed as an unseen
domain $\mathcal{D}_{\mathrm{U}}$ from the convex hull $\Lambda_{S}$, and we
select its closest element
$\mathcal{D}_{\bar{\mathrm{U}}}=\arg\min\limits_{\pi_{1},...,\pi_{N_{S}}}\beta_{q}(\mathcal{D}_{\bar{\mathrm{U}}}\|\sum_{i=1}^{N_{S}}\pi_{i}\mathcal{S}_{i})$
and regard it as the source domain, we can derive Eq. (25) into

$\displaystyle
R_{\mathcal{D}_{\mathrm{U}}}[\rho]\leq\frac{1}{2}\mathrm{d}_{\mathcal{D}_{\mathrm{U}}}(\rho)+\beta_{q}(\mathcal{D}_{\mathrm{U}}\|\mathcal{D}_{\bar{\mathrm{U}}})\cdot\left[\mathrm{e}_{\mathcal{D}_{\bar{\mathrm{U}}}}(\rho)\right]^{1-\frac{1}{q}}+0.$
(27)

Then according to Lemma 2.4, as both $\mathcal{D}_{\mathrm{U}}$ and
$\mathcal{D}_{\bar{\mathrm{U}}}$ are from the convex hull $\Lambda_{S}$,
$\beta_{q}(\mathcal{D}_{\mathrm{U}}\|\mathcal{D}_{\bar{\mathrm{U}}})\leq\epsilon$.
As for acquiring Eq. (14), we only need to substitute the time series domains
in the form of random variable distributions into the Rényi Divergence.

∎

###### Theorem 2.6.

Suppose there are $M_{\mathcal{D}}$ samples (observations) available for a
non-stationary time-series domain $\mathcal{D}_{\mathbf{x}}$, and each sample
$\mathbf{x}_{i}=\\{x_{i,0},...,x_{i,t},...\\}$ is characterized by its
deterministic function, i.e.,
$\mathbf{x}_{i}(t)=x_{i,t}=\mathrm{x}_{i}(t),i\in[1,M_{\mathcal{D}}]$. If we
apply Hilbert Transformation
$\mathrm{HT}(\mathbf{x}(t))=\widehat{\mathbf{x}}(t)=\int_{-\infty}^{\infty}\mathrm{x}(\tau)\frac{1}{\pi(t-\tau)}d\tau$
to augment these time-series samples, the non-stationary statistics of
augmented samples are different from the original ones,

$\displaystyle\mathrm{Pr}_{\mathbf{x}\sim\widehat{\mathcal{D}}_{\mathbf{x}}}(\mathbf{x})(t)\neq\mathrm{Pr}_{\mathbf{x}\sim\mathcal{D}_{\mathbf{x}}}(\mathbf{x})(t).$
(28)

Proof. According to Definition 2.1, the statistics of the non-stationary time-
series domain consist of non-stationary mean and variance. To prove Theorem
2.6, we only need to prove that the mean of the time-series domain changes
after applying Hilbert Transformation (HT). HT can only be conducted on
deterministic signals, thus we use the empirical statistics of
$M_{\mathcal{D}}$ samples to approximate the real statistics,

$\displaystyle\mathbb{E}_{\mathbf{x}\sim\widehat{\mathcal{D}}_{\mathbf{x}}}(\mathbf{x})(t)=\sum_{i=1}^{M_{\mathcal{D}}}\widehat{\mathbf{x}_{i}}(t)=\widehat{\mu}_{t},\quad\mathbb{E}_{\mathbf{x}\sim\mathcal{D}_{\mathbf{x}}}(\mathbf{x})(t)=\sum_{i=1}^{M_{\mathcal{D}}}\mathbf{x}_{i}(t)=\mu_{t}.$
(29)

According to the standard definition of HT (King, 2009) and the linear
property of integral operation, we have

$\displaystyle\mathbb{E}_{\mathbf{x}\sim\widehat{\mathcal{D}}_{\mathbf{x}}}(\mathbf{x})(t)=\sum_{i=1}^{M_{\mathcal{D}}}\widehat{\mathbf{x}_{i}}(t)=\sum_{i=1}^{M_{\mathcal{D}}}\int_{-\infty}^{\infty}\mathrm{x}_{i}(\tau)\frac{1}{\pi(t-\tau)}d\tau=\int_{-\infty}^{\infty}\sum_{i=1}^{M_{\mathcal{D}}}\left[\mathrm{x}_{i}(\tau)\frac{1}{\pi(t-\tau)}d\tau\right]=\frac{1}{\pi}\int_{-\infty}^{\infty}\frac{\mu_{\tau}}{t-\tau}d\tau.$
(30)

To interpret Eq. (30), we can assume there is a new signal
$\mathbf{s}=\\{\mu_{0},...,\mu_{t},...\\}$ with the deterministic function
$\mu_{t}=\mathrm{u}(t)$, and we next apply proof by contradiction for the
following proof. Suppose the non-stationary statistics of the original and HT-
transformed samples are identical, i.e.,
$\mathbb{E}_{\mathbf{x}\sim\widehat{\mathcal{D}}_{\mathbf{x}}}(\mathbf{x})(t)=\mathbb{E}_{\mathbf{x}\sim\mathcal{D}_{\mathbf{x}}}(\mathbf{x})(t)$,
we can derive the following formula,

$\displaystyle\frac{1}{\pi}\int_{-\infty}^{\infty}\frac{\mathrm{u}(\tau)}{t-\tau}d\tau=\mathrm{u}(t),$
(31)

which indicates that the HT-transformed $\widehat{\mathbf{s}}$ is identical to
the original $\mathbf{s}$. HT has a property called Orthogonality (King,
2009): if $\mathbf{x}(t)$ is a real-valued energy signal, then $\mathbf{x}(t)$
and its HT-transformed signal $\widehat{\mathbf{x}}(t)$ are orthogonal, i.e.,

$\displaystyle\int_{-\infty}^{\infty}\mathbf{x}(t)\widehat{\mathbf{x}}(t)dt=0.$
(32)

To prove the property of Orthogonality, we need to use Plancherel’s Formula,

######  Theorem A.1 (Plancherel’s Formula (Lang & Lang, 1985)).

Suppose that $u,v\in L^{1}(\mathbb{R})\cap L^{2}(\mathbb{R})$, then

$\displaystyle\int_{-\infty}^{\infty}u(t)\overline{v(t)}dt=\frac{1}{2\pi}\int_{-\infty}^{\infty}\mathcal{F}u(\omega)\overline{\mathcal{F}v(\omega)}d\omega,$
(33)

where $L^{1}(\cdot),L^{2}(\cdot)$ denote the $L^{p}$ spaces with $p=1,p=2$
respectively, $\mathbb{R}$ represents the real-valued space, and $\mathcal{F}$
denotes the Plancherel transformation.

With Plancherel’s Formula, we can prove the property of Orthogonality as
follows,

$\displaystyle\int_{-\infty}^{\infty}\mathbf{x}(t)\widehat{\mathbf{x}}(t)dt$
$\displaystyle=\frac{1}{2\pi}\int_{-\infty}^{\infty}\mathcal{F}(\omega)(-i\,\mathrm{sgn}(\omega)\mathcal{F}(\omega))^{*}d\omega$
(34)
$\displaystyle=\frac{i}{2\pi}\int_{-\infty}^{\infty}\mathrm{sgn}(\omega)\mathcal{F}(\omega)\mathcal{F}^{*}(\omega)d\omega$
$\displaystyle=\frac{i}{2\pi}\int_{-\infty}^{\infty}\mathrm{sgn}(\omega)|\mathcal{F}(\omega)|^{2}d\omega$
$\displaystyle=0,$

where $\mathrm{sgn}(\cdot)$ is a sign function. After proving the
Orthogonality, we can use it with the condition of Eq. (31), i.e.,

$\displaystyle\int_{-\infty}^{\infty}\mathrm{u}(t)\widehat{\mathrm{u}}(t)dt=\int_{-\infty}^{\infty}\mathrm{u}^{2}(t)dt=0.$
(35)

Eq. (35) holds true only if $\forall t\in[0,+\infty),\mathrm{u}(t)=0$, which
is contradict to our initial assumption that $\mu_{t}=\mathrm{u}(t)$ is not
always zero in Definition 2.1. As a result, the assumption of
$\widehat{\mu}_{t}=\mu_{t}$ is false. ∎

##  Appendix B Additional Details on PhASER

Augmented Dickey Fuller (ADF) Test. This is a statistical tool to assess the
non-stationarity of a given time-series signal. This test operates under a
null hypothesis $\mathbb{H}_{0}$ where the signal has a unit-root. The
existence of unit-root is a guarantee that the signal is non-stationary (Said
& Dickey, 1984). To reject $\mathbb{H}_{0}$, the statistic value of the ADF
test should be less than the critical values associated with a significance
level of $0.05$ (denoted by $p$, the probability of observing such a test
statistic under the null hypothesis). Throughout the paper, for multivariate
time series, the average ADF statistics across all variates are reported.
Besides, since this is a statistical tool to evaluate non-stationarity for
each instance of time-series data, we provide an average of this number across
a dataset to give the reader a view of the degree of non-stationarity.

Phase Augmentation In this work, we are particularly interested in learning
representations robust to temporal distribution shifts. Incorporating a phase
shift in a signal is a less-studied augmentation technique. One of the main
challenges is that real-world signals are not composed of a single frequency
component and accurately estimating and controlling the shifting of the phase
while retaining the magnitude spectrum of a signal is difficult. To solve
this, we leverage the analytic transformation of a signal using the Hilbert
Transform. The key advantages of this technique are maintaining global
temporal dependencies and magnitude spectrum, no exploration of design
parameters and being extendible to non-stationary and periodic time series.

Lets walk through a simple example for a signal, $\mathbf{x}(t)=2cos(w_{0}t)$
which can be written in the polar coordinates as
$\mathbf{x}(t)=e^{iw_{0}t}+e^{-iw_{0}t}$. Applying the HT conditions from
Equation 4, $\mathrm{HT}(\mathbf{x}(t))=2sin(w_{0}t)$. Essentially, HT shifts
the signal by $\pi/2$ radians. We conduct this instance-level augmentation for
each variate of the time series input. The aim is to diversify the phase
representation. We use the scipy (Virtanen et al., 2020) library to implement
this augmentation.

STFT specifications :  Non-stationary signals contain time-varying spectral
properties. We use STFT to capture these magnitude and phase responses in both
time and frequency domains. There are three main arguments to compute STFT -
length of each segment (characterized by the window size and the ratio for
overlap), the number of frequency bins, and the sampling rate. We use the
scipy library to implement this operation and use a $k<1$ as a multiplier to
the length of the window $W$ to give the segment length as $k\times W$ with no
overlap between segments. The complete list of STFT specifications is given in
Table 6. We also demonstrate a sensitivity analysis concerning the number of
frequency bins and the segment length in Figure 5.

Figure 5: Illustration of the sensitivity of performance to the design choices of STFT by varying a) the number of frequency bins with a fixed segment length of 4 and b) by varying the segment lengths with a 1024 frequency bins. Table 6: Arguments for STFT computation Dataset | Sampling Rate | Sequence Length | STFT segment length | Number of frequency bins
---|---|---|---|---
WISDM | 20 Hz | 128 | 4 | 1024
HHAR | 100 Hz | 128 | 4 | 1024
UCIHAR | 50 Hz | 128 | 4 | 1024
SSC | 100 Hz | 3000 | 16 | 1024
GR | 200 Hz | 200 | 4 | 1024

Note: It is tempting to use an empirical mode transformation and then apply a
Hilbert-Huang transformation to obtain an instantaneous phase and amplitude
response in the case of non-stationary signals. It absolves us from a finite
time-frequency resolution for the STFT spectra. However, our initial results
indicate a high dependence on the choice of the number of intrinsic mode
functions (Huang, 2014) for signal decomposition. Hence, for a generalizable
approach, we choose STFT as the tool for the time-frequency spectrum.

Backbones for Temporal Encoder The choice of temporal encoder,
$F_{\mathrm{Tem}}$, is not central to our design. Table 7 demonstrates the
performance of PhASER under the identical settings for four cross-person
settings using WISDM datasets using different backbones for
$F_{\mathrm{Tem}}$. For the convolution-based self-attention (second row in
Table 7) we use three encoders to compute query ($W_{q}$), key ($W_{k}$), and
value($V)$ matrices for $\mathbf{r}_{\mathrm{Dep}}$ following the guidelines
from Vaswani et al. (2017). Then we compute self-attention as,
$A=softmax\Biggl{(}\frac{QK^{T}}{\sqrt{d_{k}}}\Biggl{)}V$, where $d_{k}$ is
the temporal dimension of $\mathbf{r}_{\mathrm{Dep}}$. Subsequently, we use
$\hat{\mathbf{r}}_{\mathrm{Dep}}=\mathbf{r}_{\mathrm{Dep}}+A$, as the input to
$F_{\mathrm{Tem}}$. For more details on the convolution and transformer
backbones refer to Section D.3.

Table 7: Results for 4 different cross-person settings for WISDM dataset. Backbones for $F_{\mathrm{Tem}}$ | 1 | 2 | 3 | 4
---|---|---|---|---
2D Convolution based | 0.86 | 0.85 | 0.86 | 0.84
2D Convolution based with self-attention | 0.88 | 0.83 | 0.84 | 0.81
Transformer | 0.87 | 0.84 | 0.87 | 0.84

##  Appendix C Dataset Details

Past works (Gagnon-Audet et al., 2022; Ragab et al., 2023a) have shown that
the datasets used in our work suffer from a distribution shift across users
and also within the same user temporally. This makes them suitable for
evaluating the efficacy of our framework. In this section, we provide more
details on the datasets. Table 8 summarizes the average ADF statistics of the
datasets along with their variates and their number of classes and domains.

Table 8: Summary of the dataset attributes. Higher value of ADF stat indicates greater non-stationarity within a signal. Category | Dataset |  | Representative ADF-Statistic
---
(mean across all variates)
Variates | Domains | Classes
Human Activity recognition | UCIHAR | -2.58 | 9 | 31 | 6
Human Activity recognition | HHAR | -1.74 | 3 | 9 | 6
Human Activity recognition | WISDM | -0.78 | 3 | 36 | 6
Gesture Recognition | EMG | -33.14 | 8 | 36 | 6
Sleep Stage Classification | EEG | -3.7 | 1 | 20 | 5

WISDM (Kwapisz et al., 2011): It originally consists of 51 subjects performing
18 activities but we follow the ADATime (Ragab et al., 2023a) suite to utilize
36 subjects comprising of 6 activity classes given as walking, climbing
upstairs, climbing downstairs, sitting, standing, and lying down. The dataset
consists of 3-axis accelerometer measurements sampled at 20 Hz to predict the
activity of each participant for a segment of 128-time steps. According to
Ragab et al. (2023a), this is the most challenging dataset suffering from the
highest degree of class imbalance.

HHAR (Stisen et al., 2015): To remain consistent with the existing AdaTime
benchmark we leverage the Samsung Galaxy recordings of this dataset from 9
participants from a 3-axis accelerometer sampled at 100 Hz. The 6 activity
classes, in this case, are - biking, sitting, standing, walking, climbing up
the stairs, and climbing down the stairs.

UCIHAR (Bulbul et al., 2018): This dataset is collected from 30 participants
using 9-axis inertial motion unit using a waist-mounted cellular device
sampled at 50 Hz. The six activity classes are the same as WISDM dataset.

SSC (Goldberger et al., 2000): This is a single channel EEG dataset collected
from 20 subjects to classify five sleep stages - wake, non-rapid eye movement
stages - N1, N2, N3, and rapid-eye-movement.

GR (Lobov et al., 2018): For surface-EMG based gesture recognition we follow
Lu et al. (2023)’s preprocessing and use an 8-channel data recorded from 36
participants for six types of gestures sampled at 200 Hz.

##  Appendix D Implementation Details

All experiments are performed on an Ubuntu OS server equipped with NVIDIA
TITAN RTX GPU cards using PyTorch framework. Every experiment is carried out
with 3 different seeds (2711, 2712, 2713). During model training, we use Adam
optimizer (Kingma et al., 2020) with a learning rate from 1e-5 to 1e-3 and
maximum number of epochs is set to 150 based on the suitability of each
setting. We tune these optimization-related hyperparameters for each setting
and save the best model checkpoint based on early exit based on the minimum
value of the loss function achieved on the validation set.

###  D.1 Dataset Configuration

There is no established baseline for domain generalization for time-series
where the domain labels and target samples are inaccessible. We leverage past
works of Ragab et al. (2023a); Lu et al. (2023) for preprocessing steps. For
each dataset we use a cross-person setting in four scenarios. The details of
the target domains chosen in each scenario are given in Table 9, the rest are
used as source domains. Note for GR we use the same splits as Lu et al.
(2023). Our method is not influenced by domain labels as we do not require
them for our optimization.

Table 9: Target domain splits for 4 scenarios of each dataset. | Target
---
Domains
Scenario 1 | Scenario 2 | Scenario 3 | Scenario 4
WISDM | 0-9 | 10-17 | 18-27 | 28-35
HHAR | 0,1 | 2,3 | 4,5 | 6-8
UCIHAR | 0-7 | 8-15 | 16-23 | 24-29
GR | 0-8 | 9-17 | 18-26 | 27-35
SSC | 0-5 | 5-9 | 10-14 | 15-20

###  D.2 Baseline Methods

General Domain Generalization Methods. For all the standard domain
generalization baselines we use conv2D layers for feature transformation of
multivariate time series. It is worth mentioning that DANN is actually a
domain adaptation study, which requires access to certain unlabeled target
domain data. For cross-person generalization, the source domain consists of
data from multiple people, in which we divide the source domain data into two
parts with equal size and view one of them as the target domain to leverage
DANN for domain-invariant training. As for one-person-to-another cases, we
randomly sample a small number of unlabeled instances from each target person
and merge them into the target set that is needed for running DANN.

BCResNet. This is a competitive benchmark for several audio-scene recognition
challenges and demonstrates many useful techniques for domain generalization.
BCResNet originally required mel-frequency-cepstral-coefficients but it is not
suitable for time-series, hence, we use standard STFT of the multivariate-time
series as input in this case.

Non-Stationary Transformer. This is a forecasting baseline that particularly
addresses non-stationarity in short-term time sequences, Non-stationary
transformer (NSTrans) (Liu et al., 2022b). To adapt it to our setting we use
the encoder part of NSTrans followed by a classification head composed of
fully connected layers. We simply average the encoder’s output from all time
steps and feed it to this classifier head.

Ours+RevIN. Further, we demonstrate that statistical techniques like
Reversible Instance Normalization (RevIN) (Kim et al., 2021c) may be used as a
plug-and-play module with our framework. One limitation of using RevIN is that
the input and output dimensions of this module must have the same dimensions
to de-normalize the instance in the feature space. This may limit the
usability of the module, however, we find that applying this module around the
fusion encoder specifying the same number of input and output channels in the
2D convolution layer is suitable. We do not observe any significant benefit of
incorporating this module from the experiments, however, if an application can
specifically benefit from such RevIN, PhASER framework can support it.

Diversify. The goal of this design is to characterize the latent domains and
use a proxy-training schema to assign pseudo-domain labels to the samples to
learn generalizable representations. It is an end-to-end version of the
adaptive RNN (Du et al., 2021) method which also proposes to identify sub-
domains within a domain for generalization. It is interesting to note that for
time-series generalizable representation viewing the non-stationarity or
intra-domain shifts is crucial. Both diversify and PhASER address this problem
from completely different approaches and demonstrate improvement over other
standard methods or even domain adaptation methods that have the advantage of
accessing samples from unseen distributions. While diversify aims to
characterize latent distributions and uses a parametric setting, PhASER forces
the model to learn domain-invariant features by anchoring the design to the
phase which is intricately tied to non-stationarity. It also highlights that
time-series domain generalization is a unique problem (compared to the more
popular visual domain) and dedicated frameworks need to be designed in this
case.

MAPU. MAPU is the state-of-the-art source-free domain adaptation study for
time series, thus, in fact, it does not apply to the time-series domain
generalizable learning problem. However, we still view it as an effective
approach that can address distribution shifts and achieve domain-invariant
learning. In our implementation, in addition to the source domain data, we
still provide MAPU with the unlabeled target domain data for both cross-person
generalization and one-person-to-another cases. The training procedure is
identical to the default MAPU design, which is to pre-train the model on
labeled source domain data and then conduct the training on unlabeled target
domain data.

Table 10: Complete set of results from three trials on each baseline for WISDM cross-person generalization setting. Baselines | Scenario 1 | Scenario 2 | Scenario 3 | Scenario 4
---|---|---|---|---
| Mean | Std | Mean | Std | Mean | Std | Mean | Std
ERM | 0.57 | 0.02 | 0.50 | 0.02 | 0.51 | 0.02 | 0.55 | 0.02
GroupDRO | 0.71 | 0.06 | 0.67 | 0.06 | 0.60 | 0.07 | 0.67 | 0.04
DANN | 0.71 | 0.02 | 0.65 | 0.01 | 0.65 | 0.06 | 0.70 | 0.03
RSC | 0.69 | 0.05 | 0.71 | 0.07 | 0.64 | 0.10 | 0.61 | 0.11
ANDMask | 0.74 | 0.01 | 0.73 | 0.03 | 0.69 | 0.06 | 0.69 | 0.03
BCResNet | 0.83 | 0.00 | 0.79 | 0.04 | 0.75 | 0.04 | 0.78 | 0.04
NSTrans | 0.43 | 0.02 | 0.40 | 0.01 | 0.37 | 0.02 | 0.37 | 0.03
MAPU | 0.75 | 0.02 | 0.69 | 0.04 | 0.79 | 0.06 | 0.79 | 0.03
Diversify | 0.82 | 0.01 | 0.82 | 0.01 | 0.84 | 0.01 | 0.81 | 0.01
Ours + RevIN* | 0.86 | 0.01 | 0.85 | 0.01 | 0.84 | 0 | 0.84 | 0.03
Ours | 0.86 | 0.01 | 0.85 | 0.01 | 0.85 | 0.01 | 0.82 | 0.02
Table 11: Complete set of results from three trials on each baseline for HHAR cross-person generalization setting. Baselines | Scenario 1 | Scenario 2 | Scenario 3 | Scenario 4
---|---|---|---|---
| Mean | Std | Mean | Std | Mean | Std | Mean | Std
ERM | 0.49 | 0.05 | 0.46 | 0.01 | 0.45 | 0.02 | 0.47 | 0.03
GroupDRO | 0.60 | 0.01 | 0.53 | 0.02 | 0.59 | 0.02 | 0.64 | 0.03
DANN | 0.66 | 0.01 | 0.71 | 0.01 | 0.67 | 0.09 | 0.69 | 0.03
RSC | 0.52 | 0.05 | 0.49 | 0.04 | 0.44 | 0.03 | 0.47 | 0.03
ANDMask | 0.63 | 0.02 | 0.64 | 0.06 | 0.66 | 0.11 | 0.69 | 0.05
BCResNet | 0.66 | 0.05 | 0.70 | 0.06 | 0.75 | 0.04 | 0.68 | 0.04
NSTrans | 0.21 | 0.02 | 0.22 | 0.03 | 0.27 | 0.04 | 0.28 | 0.02
MAPU | 0.73 | 0.02 | 0.72 | 0.03 | 0.81 | 0.01 | 0.78 | 0.03
Diversify | 0.82 | 0.01 | 0.76 | 0.01 | 0.82 | 0.01 | 0.68 | 0.01
Ours + RevIN* | 0.82 | 0.05 | 0.82 | 0.02 | 0.92 | 0.04 | 0.85 | 0.03
Ours | 0.83 | 0.02 | 0.83 | 0.02 | 0.94 | 0.03 | 0.88 | 0.02
Table 12: Complete set of results from three trials on each baseline for UCIHAR cross-person generalization setting. Baselines | Scenario 1 | Scenario 2 | Scenario 3 | Scenario 4
---|---|---|---|---
| Mean | Std | Mean | Std | Mean | Std | Mean | Std
ERM | 0.72 | 0.09 | 0.64 | 0.05 | 0.70 | 0.01 | 0.72 | 0.03
GroupDRO | 0.91 | 0.02 | 0.84 | 0.01 | 0.89 | 0.04 | 0.85 | 0.07
DANN | 0.84 | 0.02 | 0.79 | 0.01 | 0.81 | 0.02 | 0.86 | 0.03
RSC | 0.82 | 0.13 | 0.73 | 0.07 | 0.74 | 0.03 | 0.81 | 0.06
ANDMask | 0.86 | 0.08 | 0.80 | 0.06 | 0.76 | 0.13 | 0.78 | 0.09
BCResNet | 0.81 | 0.02 | 0.77 | 0.02 | 0.78 | 0.02 | 0.83 | 0.02
NSTrans | 0.35 | 0.02 | 0.35 | 0.01 | 0.51 | 0.02 | 0.47 | 0.01
MAPU | 0.85 | 0.03 | 0.80 | 0.01 | 0.85 | 0.02 | 0.82 | 0.03
Diversify | 0.89 | 0.03 | 0.84 | 0.04 | 0.93 | 0.02 | 0.90 | 0.02
Ours + RevIN* | 0.96 | 0.01 | 0.90 | 0.01 | 0.93 | 0.03 | 0.97 | 0.01
Ours | 0.96 | 0.01 | 0.91 | 0.01 | 0.95 | 0 | 0.97 | 0.01

###  D.3 Implementation Details of PhASER

The magnitude and phase encoders, $F_{\mathrm{Mag}}$ and $F_{\mathrm{Pha}}$
are implemented using 2D convolution layers with the number of input channels
equal to the variates, $V$, and the out channels as $2c$ with $(5\times 5)$
kernels. $c$ is a hyperparameter used to conveniently control the size of the
overall network. For all HAR and GR models we adopt $c$ as 1 and for SSC $c$
is 4. For more specific details please refer to our code. The sub-spectral
feature normalization uses a group number of 3 and follows Equation 2.3 for
operation. This is inspired by Chang et. al (Chang et al., 2021) subspectral
normalization for audio applications with a frequency spectrum input. The key
idea is to conduct sub-band normalization (across a fixed set of frequency
bins along time and examples for each channel). We find merit in using this
technique for domain generalizable applications, as it can help overcome the
low-frequency drifts arising due to device differences (for eg. DC drifts in
various sensors). One implementation-specific modification we carried out to
ensure a generalizable framework is that if the number of sub-bands is not
divisible by the total number of features then we choose to apply the
remainder bands with batch-normalization. The output from the respective
encoders is then fused along the channel/variate axis by multiplying with 2D
convolution kernels to provide a new feature map which is the input to our
phase-driven residual network. The $F_{\mathrm{Fus}}$ similarly is implemented
using 2D convolution layers with the number of input channels as $4c$ and
output channels to be $2c$.

Subsequently for the depth-wise encoder, $F_{\mathrm{Dep}}$, we use 2D
convolution layers with batch normalization and SiLU (Elfwing et al., 2018)
activation function. This style of architecture is closely adapted from the
basic building blocks in BCResNet (Kim et al., 2021a). After average pooling
the $F_{\mathrm{Tem}}$ can assume any backbone as per the requirements of the
application. As demonstrated previously in Section B, the choice of backbone
is not central to our design here. We find that some applications(like WISDM
and GR) benefit from attention-based temporal encoding more than others. For
the attention-based version of $F_{\mathrm{Tem}}$ we used a multi-headed
attention based on a transformer encoder (Vaswani et al., 2017). Regarding
positional encoding, we used a simple sinusoid-based encoding and added it to
the sequence representation $\mathbf{r}_{\mathrm{Dep}}$. However, arriving at
the best positional encoding for numerical time-series data is an active area
of research (Kazemi et al., 2019; Tang et al., 2023; Mohapatra et al., 2023c)
given its uniqueness compared to typical natural language inputs and further
optimizations can be carried out. For the the convolution-based
$F_{\mathrm{Tem}}$ we simply use a kernel of size $(1\times 3)$ in a 2D
convolution layer to conduct temporal convolutions.

For the classification head, $g_{\mathrm{Cls}}$, we apply 2D convolution
layers to have the number of output channels equal to the number of classes in
an application, followed by softmax operation. Interestingly, if the choice of
$F_{\mathrm{Tem}}$ remains convolutional the entire network can be implemented
in a purely convolutional form allowing applicability to real-time problems.
The model sizes across the different datasets range from 40k-100k trainable
parameters (based on the number of variates, temporal encoding etc.) which is
modest and can be further tuned for resource-constrained applications by
adjusting the $c$ parameter.

Table 13: Complete set of results from three trials on each baseline for SSC cross-person generalization setting. Baselines | Scenario 1 | Scenario 2 | Scenario 3 | Scenario 4
---|---|---|---|---
| Mean | Std | Mean | Std | Mean | Std | Mean | Std
ERM | 0.50 | 0.05 | 0.46 | 0.04 | 0.49 | 0.02 | 0.45 | 0.03
GroupDRO | 0.57 | 0.07 | 0.56 | 0.03 | 0.55 | 0.05 | 0.59 | 0.06
DANN | 0.64 | 0.02 | 0.63 | 0.02 | 0.69 | 0.03 | 0.63 | 0.04
RSC | 0.50 | 0.09 | 0.48 | 0.02 | 0.52 | 0.07 | 0.46 | 0.01
ANDMask | 0.55 | 0.10 | 0.50 | 0.09 | 0.54 | 0.07 | 0.57 | 0.08
BCResNet | 0.79 | 0 | 0.82 | 0.01 | 0.79 | 0.01 | 0.81 | 0
NSTrans | 0.43 | 0.02 | 0.37 | 0.04 | 0.42 | 0.06 | 0.35 | 0.03
MAPU | 0.69 | 0.01 | 0.68 | 0.01 | 0.65 | 0.03 | 0.69 | 0.02
Diversify | 0.73 | 0.03 | 0.76 | 0.02 | 0.68 | 0.05 | 0.77 | 0.02
Ours + RevIN* | 0.82 | 0.01 | 0.79 | 0.02 | 0.78 | 0.01 | 0.81 | 0.01
Ours | 0.85 | 0.01 | 0.80 | 0.01 | 0.79 | 0.01 | 0.83 | 0.01
Table 14: Complete set of results from three trials on each baseline for GR cross-person generalization setting. Baselines | Scenario 1 | Scenario 2 | Scenario 3 | Scenario 4
---|---|---|---|---
| Mean | Std | Mean | Std | Mean | Std | Mean | Std
ERM | 0.45 | 0.02 | 0.58 | 0.03 | 0.57 | 0.03 | 0.54 | 0.04
GroupDRO | 0.53 | 0.08 | 0.36 | 0.11 | 0.59 | 0.05 | 0.45 | 0.13
DANN | 0.60 | 0.01 | 0.66 | 0.04 | 0.65 | 0.02 | 0.64 | 0.03
RSC | 0.50 | 0.10 | 0.66 | 0.05 | 0.64 | 0.03 | 0.56 | 0.03
ANDMask | 0.41 | 0.13 | 0.54 | 0.20 | 0.45 | 0.15 | 0.39 | 0.12
BCResNet | 0.62 | 0.06 | 0.67 | 0.09 | 0.65 | 0.05 | 0.61 | 0.07
NSTrans | 0.31 | 0.01 | 0.34 | 0.01 | 0.34 | 0.01 | 0.32 | 0.02
MAPU | 0.64 | 0.02 | 0.69 | 0.03 | 0.71 | 0.01 | 0.68 | 0.04
Diversify | 0.69 | 0.01 | 0.80 | 0.01 | 0.76 | 0.02 | 0.76 | 0.01
Ours + RevIN* | 0.68 | 0.03 | 0.81 | 0.04 | 0.77 | 0.03 | 0.76 | 0.02
Ours | 0.70 | 0.02 | 0.82 | 0.02 | 0.77 | 0.04 | 0.75 | 0.01
Table 15: Complete set of results from three trials on each baseline for HHAR
one-person-to-another setting.

Baselines | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8
---|---|---|---|---|---|---|---|---|---
| Mean | Std | Mean | Std | Mean | Std | Mean | Std | Mean | Std | Mean | Std | Mean | Std | Mean | Std | Mean | Std
ERM | 0.27 | 0.01 | 0.40 | 0.05 | 0.41 | 0.05 | 0.44 | 0.05 | 0.42 | 0.08 | 0.44 | 0.01 | 0.45 | 0.04 | 0.44 | 0.04 | 0.48 | 0.02
GroupDRO | 0.33 | 0.02 | 0.53 | 0.02 | 0.38 | 0.05 | 0.48 | 0.04 | 0.47 | 0.04 | 0.51 | 0.08 | 0.47 | 0.03 | 0.48 | 0.02 | 0.49 | 0.05
DANN | 0.32 | 0.03 | 0.44 | 0.05 | 0.42 | 0.03 | 0.45 | 0.06 | 0.42 | 0.03 | 0.48 | 0.04 | 0.49 | 0.02 | 0.45 | 0.05 | 0.51 | 0.01
RSC | 0.27 | 0.03 | 0.45 | 0.06 | 0.38 | 0.05 | 0.45 | 0.09 | 0.40 | 0.08 | 0.47 | 0.02 | 0.50 | 0.06 | 0.44 | 0.08 | 0.53 | 0.01
ANDMask | 0.34 | 0.06 | 0.50 | 0.03 | 0.37 | 0.04 | 0.43 | 0.05 | 0.46 | 0.04 | 0.51 | 0.07 | 0.46 | 0.03 | 0.47 | 0.02 | 0.52 | 0.03
BCResNet | 0.28 | 0.03 | 0.48 | 0.08 | 0.32 | 0.04 | 0.47 | 0.03 | 0.42 | 0.06 | 0.52 | 0.05 | 0.44 | 0.02 | 0.45 | 0.02 | 0.49 | 0.06
NSTrans | 0.20 | 0.01 | 0.22 | 0.02 | 0.17 | 0.02 | 0.20 | 0.01 | 0.21 | 0.01 | 0.22 | 0.01 | 0.26 | 0.07 | 0.17 | 0.05 | 0.20 | 0.01
MAPU | 0.39 | 0.05 | 0.57 | 0.05 | 0.35 | 0.06 | 0.52 | 0.03 | 0.49 | 0.04 | 0.54 | 0.02 | 0.49 | 0.01 | 0.50 | 0.06 | 0.52 | 0.04
Diversify | 0.42 | 0.04 | 0.62 | 0.04 | 0.32 | 0.09 | 0.62 | 0.01 | 0.56 | 0.03 | 0.61 | 0.01 | 0.53 | 0.04 | 0.52 | 0.10 | 0.61 | 0.05
Ours + RevIN* | 0.48 | 0.02 | 0.66 | 0.08 | 0.57 | 0.05 | 0.65 | 0.03 | 0.61 | 0.04 | 0.64 | 0.05 | 0.65 | 0.06 | 0.64 | 0.01 | 0.63 | 0.03
Ours | 0.53 | 0.04 | 0.70 | 0.03 | 0.63 | 0.01 | 0.66 | 0.03 | 0.64 | 0.06 | 0.67 | 0.01 | 0.65 | 0.03 | 0.67 | 0.04 | 0.62 | 0.02

###  D.4 Ablation Details of PhASER

For row 1 in Table 5, the modification to PhASER is straightforward by simply
omitted the Hilbert transformation during data preprocessing. When the
separate encoders are not used (rows 6 and 7 in Table 5), we only use
$F_{\mathrm{Mag}}$ and connect the output of the sub-feature normalization
block directly to the $F_{\mathrm{Dep}}$. When the residual is removed
entirely (rows 5 and 6 in Table 5), we cannot broadcast the 1D input to 2D
anymore so we take the mean across all the temporal indices of
$F_{\mathrm{Tem}}(\mathbf{r}_{\mathrm{Dep}})$ and flatten it to input to fully
connected layers. Based on the dataset we choose a few fully connected layers
truncating to the number of classes finally.

###  D.5 Phase-driven NSTrans

Non-stationary transformer, NSTrans (Liu et al., 2022c), applies a
destationarizing attention around the transformer block. Since it is typically
used for forecasting tasks, it comprises of encoder and a decoder module. For
adapting this model to classification we update the design to conduct
normalization and denormalization around the encoder block. We use this
modified version of NSTrans as the $F_{\mathrm{Tem}}$ module in PhASER and
observe significant improvement in performance as shown in Figure 4.

##  Appendix E Supplementary of Main Results

We conduct all experiments with three random seeds (2711, 2712, 2713), and
present the error range in this section. Tables 10, 11 and 12 represent the
mean and standard deviation corresponding to the main paper’s Table 2 for the
WISDM, HHAR and UCIHAR datasets respectively. Tables 13 and 14 are the
complete representations of all the runs corresponding to Table 4 in the main
paper for sleep stage classification and gesture recognition respectively.
Table 15 corresponds to the Table 3 in the main paper for the complete
performance statistics for one person to another generalization using HHAR
dataset.