Temporal Source Recovery for Time-Series Source-Free Unsupervised Domain Adaptation

## Abstract

Abstract Source-Free Unsupervised Domain Adaptation (SFUDA) has gained popularity for its ability to adapt pretrained models to target domains without accessing source domains, ensuring source data privacy. While SFUDA is well-developed in visual tasks, its application to Time-Series SFUDA (TS-SFUDA) remains limited due to the challenge of transferring crucial temporal dependencies across domains. Although a few researchers begin to explore this area, they rely on specific source domain designs, which are impractical as source data owners cannot be expected to follow particular pretraining protocols. To solve this, we propose Temporal Source Recovery (TemSR), a framework that transfers temporal dependencies for effective TS-SFUDA without requiring source-specific designs. TemSR features a recovery process that leverages masking, recovery, and optimization to generate a source-like distribution with recovered source temporal dependencies. To ensure effective recovery, we further design segment-based regularization to restore local dependencies and anchor-based recovery diversity maximization to enhance the diversity of the source-like distribution. The source-like distribution is then adapted to the target domain using traditional UDA techniques. Extensive experiments across multiple TS tasks demonstrate the effectiveness of TemSR, even surpassing existing TS-SFUDA method that requires source domain designs. Code is available in https://github.com/Frank-Wang-oss/TemSR.

## 1 Introduction

With the rapid development of the Internet of Things, Time-Series (TS) data has become increasingly critical in various domains, such as healthcare (Klepl et al., ; Jin et al., ; Ott et al., ) and industrial maintenance (Wang et al., ; Chen et al., ). While deep learning models have shown promising results in these areas, their success heavily depends on extensive
high-quality labeled data. However, obtaining sufficient labels is often impractical due to high labeling costs. As a result, Unsupervised Domain Adaptation (UDA) methods (Wilson & Cook, ; Wang et al., ), which transfer knowledge from a labeled source domain to an unlabeled target domain, have gained attention as a way to reduce label reliance in TS tasks.

Although UDA techniques have proven effective, they typically require access to both source and target domains to bridge domain gaps. However, in many real-world applications, data privacy concerns prevent access to the source domain (Li et al., ), leaving only the pretrained model available for adaptation. This challenge significantly limits the applicability of existing UDA methods, as they are not designed for such restricted settings. To address this issue, researchers have recently focused on a more practical scenario, Source-Free Unsupervised Domain Adaptation (SFUDA), which adapts a pretrained model to the target domain without relying on source data, demonstrating promising results. Despite these advancements, most existing techniques were developed for visual tasks and overlook the temporal dependencies inherent in TS data (Ragab et al., ), limiting their generalizability to Time-Series Source-Free Unsupervised Domain Adaptation (TS-SFUDA).

In TS data, temporal dependencies refer to the temporal correlations among time points within a sequence. For effective adaptation, transferring these dependencies from the source to the target domain is essential to learn effective domain-invariant features for TS data (Ragab et al., ; Purushotham et al., ). However, without access to source data, directly transferring these dependencies becomes challenging. To address this, recent research (Ragab et al., ) has explored methods to preserve temporal dependencies during source pretraining and restore them during target adaptation. Although effective, these approaches require specific pretraining designs in the source domain, which are impractical for real-world applications. Thus, a robust TS-SFUDA approach must meet two key criteria: 1. Even without source data, the temporal dependencies can still be transferred across domains; 2. Additional designs during source pretraining should be avoided.

Following the criteria, we introduce Temporal Source Recovery (TemSR), a novel framework to recover and transfer source temporal dependencies for improved TS-SFUDA. TemSR contains two steps: recovery and enhancement, jointly restoring source temporal dependencies to facilitate transfer using traditional UDA techniques. In the recovery step, we apply masking, recovery, and optimization to generate a source-like distribution with recovered source temporal dependencies. Masked target TS samples are recovered by a recovery model, then optimized to follow a source-like distribution by minimizing their entropy computed using a fixed pretrained source model. With the minimized entropy on source data, the source model can produce deterministic outputs for distributions with source characteristics. By minimizing the entropy of recovered samples, this output constraint can inversely regularize these samples, forcing them to align with the source-like distribution. Meanwhile, this process forces the recovery model to recover the source temporal dependencies required to effectively fill in the masked parts using unmasked time points. However, focusing only on sample-level recovery for long-term patterns may overlook local temporal dependencies, which capture critical short-term trends and are essential for recovering source temporal dependencies. To address this, we improve the optimization as segment-based regularization, enforcing minimal entropy across segments in recovered samples to ensure effective recovery of local dependencies.

A crucial aspect of the recovery process is the masking, which introduces the diversity necessary to effectively recover a source-like distribution. However, this presents challenges: a high masking ratio may lead the recovery model to collapse into constant values for entropy minimization, like zeros, while a low masking ratio may result in insufficient diversity, hindering effective recovery of the source-like distribution. To enhance the recovery, we introduce an anchor-based recovery diversity maximization module, where recovery diversity maximization enhances diversity in recovered samples and anchors ensure this diversity aligns with the source distribution. By effectively enhancing diversity, this module facilitates the recovery of an optimal source-like distribution.

Our contributions are threefold:

- •
We design a recovery process involving masking, recovery, and optimization to generate a source-like distribution with recovered source temporal dependencies, which is further refined by segment-based regularization to improve temporal dependency recovery.
- •
We design an enhancement module to improve diversity in the source-like distribution through anchor-based recovery diversity maximization, with anchors ensuring this diversity aligns with the source distribution. By effectively enhancing diversity, this module facilitates the recovery of an optimal source-like distribution.
- •
Extensive experiments across various TS tasks indicate the effectiveness of TemSR, which even surpasses existing TS-SFUDA method that requires source pretraining designs. Additional analysis on distribution discrepancy changes between source, source-like, and target domains further verify TemSR’s ability to recover an effective source-like domain and thus reduce gaps between the source and target domains even without access to the source data.

## 2 Related Work

##### Source-Free Unsupervised Domain Adaptation

To enable effective UDA without access to source data, researchers have explored SFUDA through model- and data-based methods (Fang et al., ). Model-based approaches adapt a source pretrained model to the target domain through self-supervised techniques, such as entropy regularization (Mao et al., ; Ahmed et al., ), pseudo-label generation (Yang et al., ; Xie et al., ; Ding et al., ), and contrastive learning (Zhang et al., ; Huang et al., ). On the other hand, data-based methods aim to reconstruct the source distribution by selecting relevant data from the target domain (Du et al., ; Qiu et al., ) or using Generative Adversarial Networks (GAN) to synthesize source-like samples (Kurmi et al., ), allowing traditional UDA techniques to be applied. By effectively ‘seeing’ source distribution in a source-free setting, data-based methods can achieve more stable adaptation by transferring useful information across domains. However, most existing SFUDA algorithms are tailored for visual tasks and overlook crucial temporal dependencies in TS data, limiting their effectiveness in TS-SFUDA. For example, the performance of data-based methods hinges on the quality of generated source distributions. Without considering temporal dependencies, the generated distributions lack key temporal information, significantly hampering adaptation performance in TS tasks.

##### Time-Series Unsupervised Domain Adaptation

To reduce label reliance in TS tasks, UDA methods have been widely applied. The main challenge in TS UDA is transferring temporal dependencies across domains to learn domain-invariant temporal features (Ragab et al., ), typically achieved through metric- and adversarial-based methods. Metric-based methods extract and align temporal features with statistical measures such as Maximum Mean Discrepancy (MMD) and Deep CORAL (Liu & Xue, ; He et al., ; Cai et al., ), while adversarial-based methods use domain discriminators to learn domain-invariant temporal features (Wilson et al., ; ; Purushotham et al., ). Contrastive learning is also explored to learn robust temporal features for TS UDA (Eldele et al., ; Ozyurt et al., ). Additionally, researchers investigated spatial dependencies in TS data to improve domain-invariant feature learning (Wang et al., ; ). Despite their potential, they rely on access to source data, which may not always be feasible due to privacy concerns. This highlights the need for TS-SFUDA, where adaptation is performed without source data. While a few researchers (Ragab et al., ) have explored this area, demonstrating the effectiveness of transferring temporal dependencies in TS-SFUDA, their method required additional modules during source pretraining to preserve these dependencies. This is impractical, as source data holders cannot be expected to adhere to specific pretraining steps. To overcome this limitation, we propose TemSR, which effectively transfers temporal dependencies across domains without extra operations during source pretraining, ensuring both practicality and strong performance for TS-SFUDA.

## 3 Methodology

Figure: Figure 1: Overall TemSR. An encoder pretrained on the source domain is transferred to the target domain for adaptation, using source-like and target branches. In the source-like branch, masked target samples are recovered. With the fixed source encoder, their entropy is computed via a Segment-based Source-like Entropy loss $\mathcal{L}_{SSE}$ and minimized for optimization to generate a source-like distribution with restored temporal dependencies. Meanwhile, an Anchor-based Recovery Diversity Maximization loss $\mathcal{L}_{ARDM}$ enhances the diversity of the generated distribution for effective recovery. Finally, source-like and target distributions are aligned with an alignment loss $\mathcal{L}_{Align}$, enabling effective transfer of temporal dependencies for TS-SFUDA.
Refer to caption: x1.png

### 3.1 Problem Definition

Given a labeled source domain $\mathbb{D}_{S}=\{\textbf{\em X}_{S}^{i},{y}_{S}^{i}\}_{i=1}^{n_{S}}$ with $n_{S}$ samples and an unlabeled target domain $\mathbb{D}_{T}=\{\textbf{\em X}_{T}^{i}\}_{i=1}^{n_{T}}$ with $n_{T}$ samples, $\textbf{\em X}_{S}$ and $\textbf{\em X}_{T}$ represent TS data with $N$ channels and $L$ time points, and ${y}_{S}$ denotes source labels. We aim to train an encoder $\mathcal{F}_{\theta}$ and a classifier $\mathcal{G}_{\phi}$ on the source domain and then transfer this pretrained encoder to the target domain without access to the source data. Given the importance of temporal dependencies in TS data, effectively transferring these dependencies across domains is crucial for enhancing performance in TS-SFUDA.

### 3.2 Overall Framework

We present TemSR in Fig. 1, which recovers source temporal dependencies via a generated source-like distribution and transfers them to the target domain for TS-SFUDA. An encoder is pretrained on the source domain and then adapted to the target domain without source data, using both the source-like and target branches. In the source-like branch, target samples are masked and recovered. Using the fixed source encoder, we derive entropy for the recovered samples through segment-based regularization, computing the segment-based source-like entropy loss, which is then minimized for optimization to generate a source-like distribution with restored temporal dependencies. To enhance the diversity of the generated distribution, we introduce an anchor-based recovery diversity maximization loss for better recovery. Finally, the source-like and target distributions are aligned by an alignment loss, effectively transferring temporal dependencies across domains for TS-SFUDA. Further details are provided in following sections, with pesudo-code available in Appendix A.8.

### 3.3 Recovery

The recovery process begins with an initialized distribution. Masking introduces diversity into the initialized samples, which are then recovered and optimized to generate a source-like distribution with source temporal dependencies. For more effective temporal recovery, the optimization is further refined as segment-based regularization.

##### Initialization

A critical step in generating an effective source-like distribution is proper initialization, for which we identify two key requirements:

1. The initialized distribution should be close to the source distribution; otherwise, obtaining an optimal source-like distribution is difficult.

2. The time points of the initialized samples must be continuous, as random time points would hinder the recovery of source temporal dependencies.

Existing generative methods, such as GANs, fail to meet these requirements, making it difficult to generate an effective source-like distribution with restored temporal dependencies. To solve this, initializing the source distribution using the target distribution offers an effective solution. As UDA typically operates on different but related domains, the target distribution is not significantly different from the source distribution, as shown in Fig. 2. By optimizing a distribution initialized with the target domain, we not only simplify the generation of a source-like distribution but also preserve the continuity of time points in the samples.

Figure: Figure 2: (a) The source and target distributions are distinct but related. (b) Source-like distribution, when initialized from the target distribution, can more easily be optimized to resemble source distribution.
Refer to caption: x2.png

##### Masking and Recovery

With the initialized distribution, we introduce diversity to allow optimization toward the source distribution. Masking is an effective approach, as it not only introduces diversity but also aids in recovering temporal dependencies. By masking portions of TS data, a recovery model is forced to reconstruct masked portions with available information from unmasked parts. To effectively recover the masked data, the model needs to understand how time points are connected and how patterns evolve. This process encourages the model to capture the underlying structure and temporal dependencies in TS data, allowing it to restore these dependencies during recovery. As shown in Fig. 1, portions of the TS sequences are masked, determined by a masking ratio $p_{m}$ (See sensitivity analysis in Appendix A.7). Given a target sample $\textbf{\em X}^{i}_{T}$, masking generates its masked form $\bar{\textbf{\em X}}^{i}_{T}$= $M(\textbf{\em X}^{i}_{T})$, which is recovered by a recovery model $\mathcal{R}_{\zeta}$ as a source-like sample $\textbf{\em X}^{i}_{Sl}=\mathcal{R}_{\zeta}(M(\textbf{\em X}^{i}_{T}))$. These recovered samples are then optimized to align with the source domain.

##### Optimization

To align the recovered samples with the source domain, we propose leveraging the pretrained source model with entropy minimization as guidance. Entropy minimization is widely used in model adaptation, as models with minimized entropy can produce deterministic outputs, and this ideal output constraint can be inversely employed to guide adaptation (Li et al., ; Liang et al., ). Inspired by this, we introduce entropy minimization to optimize the recovered samples. With the minimized entropy on source data, the source model can produce deterministic outputs for distributions with source characteristics. By minimizing the entropy computed by the same fixed model for recovered samples, this constraint can inversely regularize the samples, forcing them to align with the source distribution. Here, the recovery model is forced to capture source temporal dependencies, as only by understanding these dependencies can the model effectively reconstruct masked parts, minimize entropy, and ensure recovered samples align with the source distribution.

While the recovery process can generate source-like distributions with recovered temporal dependencies, it primarily focuses on sample-level recovery for long-term patterns, overlooking local temporal dependencies. These local dependencies offer short-term context, enabling the model to infer with local information that may not be apparent in broader trends. This highlights the importance of recovering local dependencies to restore natural temporal patterns and enhance overall temporal recovery. Thus, we improve the optimization process as segment-based regularization, optimizing segments that capture local dependencies to have minimized entropy, aligning them with source distributions. Three types of segments are extracted from the recovered sample $\textbf{\em X}^{i}_{Sl}$ with an extraction proportion $p_{s}$, capturing local information from different regions (See examples in Appendix A.6):

1. Early Segment $\textbf{\em X}^{i}_{Sl,E}$: Extracts the first $p_{s}$ proportion of the sequence, capturing local information at the early stage of the recovered sample $\textbf{\em X}^{i}_{Sl}$.

2. Late Segment $\textbf{\em X}^{i}_{Sl,L}$: Extracts the last $p_{s}$ proportion capturing local information at the later stage.

3. Segment with Recovered Parts $\textbf{\em X}^{i}_{Sl,R}$: Extracts all recovered portions to ensure they have minimized entropy and align with the source-like distribution.

These segments effectively capture local temporal dependencies. Along with the complete recovered sample $\textbf{\em X}^{i}_{Sl}$ for sample-level recovery, denoted as $\textbf{\em X}^{i}_{Sl,C}$ for consistency, we minimize their entropy:

$$ $\mathcal{L}_{SegEnt}=\sum_{k\in\{C,E,L,R\}}-\sum_{i}\mathcal{G}_{\phi}( \mathcal{F}_{\theta}(\textbf{\em X}^{i}_{Sl,k}))\log\mathcal{G}_{\phi}( \mathcal{F}_{\theta}(\textbf{\em X}^{i}_{Sl,k})).$ (1) $$

Besides minimizing the entropy of these segments, ensuring similar entropy across segments is also crucial. Large differences in entropy between segments may indicate disruptions in the flow of temporal information, suggesting the model has failed to capture smooth dependencies in recovered TS sequences. To address this, the recovered samples are designed to retain consistent entropy values across these segments, as shown in Eq. (3.3). By enforcing similar entropy across different segments, TemSR maintains a uniform level of temporal structure.

$$ $\displaystyle\mathcal{L}_{SegSim}=\sum_{(k,s)\in\{C,E,L,R\}}$ $\displaystyle\left(\sum_{i}\mathcal{G}_{\phi}(\mathcal{F}_{\theta}(\textbf{\em X }^{i}_{Sl,k}))\log\mathcal{G}_{\phi}(\mathcal{F}_{\theta}(\textbf{\em X}^{i}_{ Sl,k}))\right.$ $\displaystyle\left.-\sum_{i}\mathcal{G}_{\phi}(\mathcal{F}_{\theta}(\textbf{ \em X}^{i}_{Sl,s}))\log\mathcal{G}_{\phi}(\mathcal{F}_{\theta}(\textbf{\em X}^ {i}_{Sl,s}))\right).$ (2) $$

By combining the two losses, we define the segment-based source-like entropy loss as $\mathcal{L}_{Seg}=\mathcal{L}_{SegEnt}+\mathcal{L}_{SimEnt}$. By minimizing $\mathcal{L}_{Seg}$, we effectively generate a source-like distribution with recovered source temporal dependencies.

### 3.4 Enhancement

To optimize the initial distribution as a source-like distribution, masking introduces the essential diversity required for effective recovery. However, masking also presents challenges. A large masking ratio can introduce sufficient diversity, increasing the chances of finding an optimal solution. However, it risks model collapse, where the recovery model shortcuts the learning process by filling masked parts with constant values, minimizing entropy without capturing the true underlying structure, as proof in Appendix A.1. On the other hand, using a small masking ratio avoids this collapse but fails to provide enough diversity for the model to learn an optimal source-like distribution.

##### Anchor-based Recovery Diversity Maximization

To effectively enhance diversity for optimal recovery, we introduce the anchor-based recovery diversity maximization module. This module encourages recovery diversity by maximizing the distance between recovered samples and their original samples. By pushing the recovered samples to diverge from their original forms, the samples are forced to enhance diversity (see proof in Appendix A.2), allowing to explore a broader range of features that are crucial for capturing the complexity of the source distribution. However, without proper constraints, this recovery diversity maximization may cause the recovered samples to deviate in unintended directions, as shown in Fig. 3 (a), leading to distributions that are not aligned with the source domain and hurting performance. To prevent this, we further introduce anchors to guide the process and ensure that the diversity remain consistent with the source distribution. Anchors act as reference points as shown in Fig. 3 (b), balancing diversity with fidelity to the source domain.

Figure: Figure 3: (a) Recovery diversity maximization may cause the recovered samples to deviate in unintended directions without proper constraints. (b) Anchors act as reference points, balancing diversity with fidelity to the source domain.
Refer to caption: x3.png

##### Anchor Generation with Anchor Bank

To effectively guide optimization toward the source distribution, generating high-quality anchors is crucial, as poor anchors can mislead the model and degrade performance. For optimal guidance, these anchors must closely align with the source distribution. Thus, we propose selecting recovered samples with the lowest entropy, as they are more likely to reflect the source distribution and serve as ideal guides for the recovery process. While a simple approach is to select low-entropy samples from each batch, this may miss optimal candidates due to batch randomness. To address this, we implement an anchor bank, inspired by Wu et al. (), to store all recovered samples with their entropy: $\mathbb{A}=\{\textbf{\em X}_{Sl}^{i},H(\textbf{\em X}_{Sl}^{i})\}_{i=1}^{n_{T}}$, where $H(\textbf{\em X}_{Sl}^{i})$ is the entropy computed by the source model. To ensure its quality, the anchor bank is continuously updated during adaptation, as shown in Fig. 1. From the anchor bank, we extract the top $k$ samples with the lowest entropy, denoted by $\mathbb{A}_{k}=\{\textbf{\em X}_{A}^{j}\}_{j}^{k}$, and compute a representative anchor by averaging these samples: $\bar{\textbf{\em X}}_{A}=\sum_{j}^{k}\textbf{\em X}_{A}^{j}/k$. The value of $k$ is set by an anchor ratio, allowing adjustment based on dataset sizes. Further analysis of the anchor ratio is provided in Appendix A.7.

##### Objectives

We have two key objectives: 1. Recovery Diversity Maximization: Maximize the distances between the recovered samples and their original samples; 2. Anchor Guidance: Minimize the distances between the recovered samples and the anchor sample. However, directly pushing all recovered samples toward the anchor risks collapse, where diversity is lost as all samples converge to a single point. To prevent this, we introduce an additional objective that maximizes the distances between any two recovered samples, ensuring variations among them. To achieve these objectives, the InfoNCE loss for contrastive learning is adopted (Eldele et al., ), which pulls the recovered samples toward the anchor while pushing them apart from each other and their original forms. Particularly, given recovered source-like samples $\textbf{\em X}_{Sl}^{i}$, original target samples $\textbf{\em X}_{T}^{i}$, and the anchor $\bar{\textbf{\em X}}_{A}$, the anchor-based recovery diversity maximization loss is defined as Eq. (3), where $B$ is batch size, $\mathcal{S}(\textbf{\em i},\textbf{\em j})=\exp\left(m(\textbf{\em i},\textbf{
\em j})/\tau\right)$, with $m(\textbf{\em i},\textbf{\em j})=\mathcal{F}_{\theta}(\textbf{\em i})(\mathcal
{F}_{\theta}(\textbf{\em j}))^{T}$ measuring the difference of samples.

$$ $\mathcal{L}_{ARDM}=-\frac{1}{B}\sum_{i=1}^{B}\log\frac{\mathcal{S}(\textbf{\em X }_{Sl}^{i},\bar{\textbf{\em X}}_{A})}{\mathcal{S}(\textbf{\em X}_{Sl}^{i},\bar {\textbf{\em X}}_{A})+\mathcal{S}(\textbf{\em X}_{Sl}^{i},\textbf{\em X}_{T}^{ i})+\sum_{k\neq i}\mathcal{S}(\textbf{\em X}_{Sl}^{i},\textbf{\em X}_{Sl}^{k})}.$ (3) $$

### 3.5 Adaptation

Once the source-like distribution with source temporal dependencies is generated, we transfer this information to the target domain for adaptation. With the source temporal dependencies already recovered, traditional UDA techniques, such as metric-based or adversarial-based methods, can be effectively utilized for this transfer. For adaptation, we fine-tune the target encoder $\bar{\mathcal{F}}_{\bar{\theta}}$, initialized from the pretrained source encoder $\mathcal{F}_{\theta}$, to adapt to the target domain. To further preserve target domain information, we incorporate target entropy minimization following Liang et al. (), i.e., $\mathcal{L}_{TrgEnt}=-\sum_{i}\mathcal{G}_{\phi}(\bar{\mathcal{F}}_{\bar{
\theta}}(\textbf{\em X}^{i}_{T}))\log\mathcal{G}_{\phi}(\bar{\mathcal{F}}_{
\bar{\theta}}(\textbf{\em X}^{i}_{T}))$. The final loss function is shown in Eq. (4), including the alignment loss $\mathcal{L}_{Align}$ computed by Deep CORAL (Sun et al., ; Wang et al., ).

$$ $\min\mathcal{L}=\lambda_{Seg}\mathcal{L}_{Seg}+\lambda_{ARDM}\mathcal{L}_{ARDM }+\mathcal{L}_{Align}+\mathcal{L}_{TrgEnt}.$ (4) $$

Notably, the source-like distribution may have poor quality during initial epochs, and adaptation at this stage could cause negative transfer. To solve this, we divide the adaptation process into source-like optimization and transfer phases. First, the source-like distribution is optimized over several epochs to enhance its quality. This enhanced source-like distribution is then used to transfer dependencies to the target encoder during the transfer phase for effective domain adaptation.

## 4 Experiments

### 4.1 Datasets and Settings

##### Datasets

To comprehensively evaluate TemSR, we selected three crucial TS tasks: Human Activity Recognition (HAR) on the UCI-HAR dataset (Anguita et al., ), Sleep Stage Classification (SSC) on the Sleep-EDF dataset (Goldberger et al., ), and Machine Fault Diagnosis (MFD) (Lessmeier et al., ). Each task is assessed through five cross-domain scenarios by following Ragab et al. (). Detailed descriptions and preprocessing are provided in Appendix A.3.

##### Unified Training Scheme

To ensure fair comparisons with SOTAs, we utilized a consistent three-layer CNN backbone and adhered to identical training configurations as previous work (Ragab et al., ). To address potential data imbalances and provide comprehensive evaluations, we used the Macro F1-score (MF1) as the primary metric. The mean and standard deviation of MF1 are reported across three runs for each cross-domain scenario. Full details are available in Appendix A.4.

### 4.2 Comparisons with State-of-the-Arts

Table: Table 1: Detailed results of the five HAR cross-domain scenarios in terms of MF1 score (%).

Table: Table 2: Detailed results of the five SSC cross-domain scenarios in terms of MF1 score (%).

Table: Table 3: Detailed results of the five MFD cross-domain scenarios in terms of MF1 score (%).

For comparisons, we evaluated both conventional UDA methods and SFUDA techniques by following Ragab et al. (); Yang et al. (; ). Conventional UDA methods include HoMM (Chen et al., ), MMDA (Rahman et al., ), DANN (Ganin et al., ), CDAN (Long et al., ), and CoDATS (Wilson et al., ), while SFUDA methods include SHOT (Liang et al., ), NRC (Yang et al., ), AaD (Yang et al., ), BAIT (Yang et al., ), and MAPU (Ragab et al., ). These baselines are introduced in Appendix A.5. Additionally, we report results for source (SRC)-only and target (TRG)-only models to provide the lower and upper bounds of adaptation. For clarity, lower/upper bounds are denoted by ✝, conventional UDA methods by ✗, and SFUDA methods by ✓. We adopted all baseline results, except BAIT, from Ragab et al. (), where each method used the same backbone as ours for fairness. BAIT, a visual-based method for generating source-like distributions, was implemented with the same backbone and its publicly available code. Among the SFUDA methods, only MAPU is designed for TS tasks, considering temporal dependencies, though it requires additional pretraining designs in source domain.

The comparisons for the HAR, SSC, and MFD datasets can be found in Tables 1, 2, and 3, respectively. From the results, we observe that the methods considering temporal dependencies, including MAPU and our approach, generally outperform others in most cross-domain scenarios. Regarding average performance, MAPU and our method achieve the second-best and best results, respectively, demonstrating the importance of capturing temporal dependencies in TS-SFUDA. Specifically, when compared to the best methods that do not consider temporal dependencies (i.e., CDAN, MMDA, and CoDATS on the respective datasets), our approach yields significant improvements of 4.14%, 1.93%, and 8.17% on the three datasets. Even compared with MAPU, our method still improves by 1.36%, 0.67%, and 0.89%. While the improvements are not significant—as MAPU also considers temporal dependencies—it is important to note that MAPU requires additional source pretraining designs, making it less practical. In contrast, our approach adapts entirely in the target domain without any source pretraining operations. Moreover, TemSR effectively recovers the source distribution during adaptation, facilitating a more efficient transfer of temporal dependencies and thereby achieving improved and robust performance. These results underscore that without relying on source pretraining designs, TemSR can still transfer temporal dependencies to achieve SOTA performance in TS-SFUDA, even surpassing the existing method that depends on such designs.

### 4.3 Ablation Study

Table: Table 4: Ablation study for HAR, SSC, and MFD (%).

To validate the effectiveness of each module, such as $\mathcal{L}_{Seg}$ and $\mathcal{L}_{ARDM}$, for recovering a source-like distribution, we conducted an ablation study. Four variants have been designed for this study. The first variant, ‘Src-like only’, uses the source-like branch directly for target prediction. The source-like branch is designed to generate source distributions with recovered temporal dependencies, so we test whether leveraging it for prediction, rather than adaptation, is a feasible approach. The second variant, ‘w/o $\mathcal{L}_{Seg}$’, removes segment-based regularization, replacing it with a sample-level entropy minimization for source-like samples. This variant aims to evaluate the necessity of recovering local temporal dependencies for improved temporal recovery. The third variant, ‘w/o $\mathcal{L}_{ARDM}$’, removes the anchor-based recovery diversity maximization loss, aiming to evaluate whether the diversity facilitated by this module is necessary for optimal performance. The fourth variant, ‘w/o Anchor Bank’, removes the anchor bank and instead generates anchors within each batch, testing whether an anchor bank is essential for producing the high-quality anchor.

The results shown in Table 4 present the average performance of all cross-domain cases, with the detailed results available in Appendix A.7. Four key observations emerged from this study. First, the variant ‘Src-like only’ shows notably poor performance. While the recovered samples successfully align with a source-like distribution, the masking process distorts their original samples, causing them to lose sample-specific information. As a result, directly using these recovered samples for prediction significantly weakens performance, demonstrating that it is more effective to use the source-like distribution for transferring knowledge to the target encoder. Second, the performance of the variant ‘w/o $\mathcal{L}_{Seg}$’ drops by 1.07%, 0.64%, and 0.74% across the three datasets, indicating the critical role of recovering local temporal dependencies for improved source temporal recovery and the adaptation performance. Third, the performance decreases by 2.13%, 0.95%, and 2.85% across the datasets when the anchor-based recovery diversity maximization module is removed, indicating that without this module, the recovered samples lacked the diversity necessary to optimize as an optimal source-like distribution, impairing the recovery process and thus the adaptation performance. Finally, the removal of the anchor bank also leads to performance drops, particularly in the SSC dataset, i.e., by 1.4%, indicating that generating anchors from each batch results in lower-quality anchors, undermining adaptation effectiveness. In summary, the ablation study highlights the importance of each module in generating a robust source-like distribution for effective TS-SFUDA.

### 4.4 Sensitivity Analysis

We conducted sensitivity analysis for TemSR, focusing on key hyperparameters: $\lambda_{Seg}$, $\lambda_{ARDM}$, and extraction proportion $p_{s}$. For hyperparameters controlling the effects of the losses $\mathcal{L}_{Seg}$ and $\mathcal{L}_{ARDM}$, we adopted a wide range—[1e-3, 1e-2, 1e-1, 1, 10, 50, 100]—to assess TemSR’s sensitivity to these large variations, with larger values indicating greater impacts. For the extraction proportion which determines the amount of local information in each segment, we tested the values within [7/8, 6/8, 5/8, 4/8, 3/8, 2/8]. A value of 1 represents segments containing only global information, while smaller values indicate that more local information is involved in entropy minimization.

Figure: Figure 4: Analysis for $\lambda_{Seg}$.
Refer to caption: x4.png

##### Effect of λ S ⁢ e ⁢ g subscript 𝜆 𝑆 𝑒 𝑔 \lambda_{Seg} italic_λ start_POSTSUBSCRIPT italic_S italic_e italic_g end_POSTSUBSCRIPT and λ A ⁢ R ⁢ D ⁢ M subscript 𝜆 𝐴 𝑅 𝐷 𝑀 \lambda_{ARDM} italic_λ start_POSTSUBSCRIPT italic_A italic_R italic_D italic_M end_POSTSUBSCRIPT

Fig. 5 and 5 present the analysis for $\lambda_{Seg}$ and $\lambda_{ARDM}$, respectively. The results show that the performance of TemSR improves as $\lambda_{Seg}$ and $\lambda_{ARDM}$ increase, indicating that greater weights on these losses enhance performance, further highlighting their effectiveness. However, performance drops sharply when these values become too large, e.g., 50 or 100. For instance, with $\lambda_{Seg}=10\rightarrow 100$, the performance on HAR decreases significantly, i.e., from around 91% to 85%. A similar trend is observed with $\lambda_{ARDM}$. These drops occur because, at higher values, the individual loss term dominates the adaptation process, overshadowing the contributions of other losses and thus negatively impacting adaptation. Meanwhile, excessive values also lead to instability, especially at 100. Based on these findings, the optimal range for both $\lambda_{Seg}$ and $\lambda_{ARDM}$ is between 1 and 10, offering a broad range to easily facilitate optimal performance for TemSR.

##### Effect of Extraction Proportion

Figure: Figure 6: Analysis for extraction proportion.
Refer to caption: x6.png

Fig. 6 presents the analysis of extraction proportions. From the figure, we observe that reducing the extraction proportion, e.g., from 7/8 to 6/8, can improve performance. This is because a lower proportion allows more local information to be included for entropy minimization, aligning the local distribution in recovered samples with the source distribution and thus achieving better source temporal recovery. However, with too small values, e.g., 2/8, each segment loses too much useful information from the recovered sample, making it hard to capture meaningful local dependencies. This leads the recovery model to misinterpret entropy minimization and produce ineffective source-like distributions, ultimately negatively impacting adaptation performance. Thus, an extraction proportion of 6/8 or 5/8 would be better for the optimization of the local distribution.

### 4.5 Distribution Discrepancy Changes

Figure: Figure 7: Distribution discrepancies changes (Source domain used only for computing discrepancy without directly involved in adaptation).
Refer to caption: x7.png

The core objective of TemSR is to recover a source-like domain and then perform domain adaptation. This requires ensuring that the recovered source-like distribution closely resembles the source distribution and that the domain discrepancy between the source-like and target domains is minimized. By achieving so, this process can effectively reduce the gap between the source and target domains. To present this intuitively, we visualized the evolution of distribution discrepancies between source (SRC)-like, source (SRC), and target (TRG) domains, during the adaptation stage. The visualization is shown in Fig. 7, where discrepancies are quantified using the KL divergence, a standard metric for comparing distributions (Zhang et al., ). Notably, in this visualization, the source distribution is used only for calculating discrepancies and is not directly involved in the adaptation process.

From the figure, we observe that the discrepancy between the source and source-like domains decreases steadily during the adaptation stage, indicating that the recovered source-like distribution increasingly resembles the source distribution. Meanwhile, during the initial epochs without alignment, we also notice an increase in the domain gap between the target and source-like domains. After these early stages and the alignment begins, the domain gap between the target and source-like domains gradually diminishes. By the end of adaptation, the overall domain discrepancy between the source and target domains is effectively reduced, demonstrating the capability of TemSR to align the two domains without requiring direct access to the source data.

## 5 Conclusion

To transfer temporal dependencies across domains for effective TS-SFUDA without relying on specific source pretraining designs, we propose the Temporal Source Recovery (TemSR) framework. TemSR aims to recover and transfer source temporal dependencies by generating a source-like time-series distribution. The framework features a recovery process that employs masking, recovery, and optimization to create a source-like distribution with recovered temporal dependencies. For effective recovery, we further improve the optimization as segment-based regularization to restore local temporal dependencies and design an anchor-based recovery diversity maximization loss to enhance diversity in the source-like distribution.
The recovered source-like distribution is then adapted to the target domain using traditional UDA techniques. Additional analysis of distribution discrepancy changes between source, source-like, and target domains confirms TemSR’s ability to recover and align the source-like domain, ultimately reducing gaps between the source and target domains. Extensive experiments further demonstrate the effectiveness of TemSR, achieving SOTA performance and even surpassing the existing TS-SFUDA method that relies on source-specific designs.

## Appendix A Appendix

### A.1 Trivial Solutions with Large Masking ratio

###### Theorem 1

With a high masking ratio, the recovery model is prone to collapsing to a constant value for the source-like domain, thus impairing the performance of domain adaptation.

Proof:

###### Theorem 1

##### Given Conditions

- •
$\textbf{\em X}_{T}^{i}$ is a time-series sample from the target domain;
- •
$M(\textbf{\em X}_{T}^{i})$ is the masking operation applied to $\textbf{\em X}_{T}^{i}$, with a masking ratio $p_{m}$, where $p_{m}$ represents the proportion of the input that is masked.;
- •
$\mathcal{R}_{\zeta}$ is the recovery model, parameterized by $\zeta$, which recovers a source-like sample $\textbf{\em X}_{Sl}^{i}=\mathcal{R}_{\zeta}(M(\textbf{\em X}_{T}^{i}))$ from the masked input;
- •
$\mathcal{F}_{\theta}$ is the fixed pretrained encoder for the source-like branch, aiming to extract features $\mathbf{z}$ from the recovered sample $\textbf{\em X}_{Sl}^{i}$;
- •
$p(\mathbf{z})$ denotes the probability distribution of the feature representations.

The entropy of the feature distribution is given by the following, and the training objective is minimizing this entropy,

$$ $H(p(\mathbf{z}))=-\int p(\mathbf{z})\log p(\mathbf{z})\,d\mathbf{z}.$ (5) $$

##### Feature Collapse in High Masking Ratio

As the masking ratio $p_{m}$ increases toward 1, the masked sample $M(\textbf{\em X}_{T}^{i})$ contains minimal information about the original target data $\textbf{\em X}_{T}^{i}$. Consequently, the recovery model $\mathcal{R}_{\zeta}$ faces increasing difficulty in reconstructing meaningful samples. To achieve the training objectives in Eq. (5) for entropy minimization, the model may try to find a degenerate solution where the recovered sample $\textbf{\em X}_{Sl}^{i}=\mathcal{R}_{\zeta}(M(\textbf{\em X}_{T}^{i}))$ becomes constant across the masked region, as doing so can easily minimize entropy to zero.

Specifically, for a high masking ratio, $\textbf{\em X}_{Sl}^{i}$ is approximated by a constant value $c$, i.e.

$$ $\textbf{\em X}_{Sl}^{i}\approx c\quad\text{with }p_{m}\approx 1.$ (6) $$

Passing this constant through the encoder results in constant feature representations:

$$ $\mathbf{z}=\mathcal{F}_{\theta}(\textbf{\em X}_{Sl}^{i})\approx\mathcal{F}_{ \theta}(c)=z_{0}.$ (7) $$

In this case, the distribution of $\mathbf{z}$ collapses to a Dirac delta function centered at $z_{0}$:

$$ $p(\mathbf{z})=\delta(\mathbf{z}-z_{0}).$ (8) $$

By substituting Eq. (8) into the entropy (5) and using the property $\delta(\mathbf{x})\log\delta(\mathbf{x})=0$ for a delta function $p(\mathbf{z})=\delta(\mathbf{z}-z_{0})$, we derive the entropy of the collapsed features:

$$ $H(p(\mathbf{z}))=-\int\delta(\mathbf{z}-z_{0})\log\delta(\mathbf{z}-z_{0})\,d \mathbf{z}=0.$ (9) $$

This implies that the entropy $H(p(\mathbf{z}))$ reaches its minimum value of zero, which satisfies the optimization objective but results in feature collapse. The model converges to a trivial solution where no meaningful variability in the recovered source-like sample exists.

##### Conclusion

Given the high masking ratio, the recovery model $\mathcal{R}_{\zeta}$ is unable to generate a valid reconstruction of the source-like sample. Instead, it defaults to generating a constant value to minimize the entropy, resulting in collapsed features that carry no useful information. This trivial solution, characterized by $p(\mathbf{z})=\delta(\mathbf{z}-z_{0})$, leads to zero entropy, but the recovered sample fails to capture the temporal dependencies required for successful domain adaptation. In contrast, a lower masking ratio provides the recovery model with sufficient context, allowing for more meaningful reconstructions. When paired with our designed anchor-based recovery diversity maximization module, this results in diverse, temporally coherent recovered samples. Thus, a lower masking ratio, in conjunction with diversity-enhancing techniques, is critical to ensuring effective recovery and adaptation.

### A.2 Improved Diversity with Recovery Diversity Maximization

###### Theorem 2

Maximizing the distance between original samples $\textbf{\em X}_{T}^{i}$ and recovered samples $\textbf{\em X}_{Sl}^{i}$ enhances the diversity of the recovered samples.

Proof:

###### Theorem 2

##### Given Conditions

- •
$\textbf{\em X}_{T}^{i}$ is a time-series sample from the target domain.
- •
$\textbf{\em X}_{Sl}^{i}$ is the corresponding recovered sample, generated by the recovery model $\mathcal{R}_{\zeta}$, i.e., $\textbf{\em X}_{Sl}^{i}=\mathcal{R}_{\zeta}(M(\textbf{\em X}_{T}^{i}))$, where $M(\textbf{\em X}_{T}^{i})$ is the masked version of $\textbf{\em X}_{T}^{i}$.
- •
$p(\textbf{\em X}_{T}^{i},\textbf{\em X}_{Sl}^{i})$ denotes the joint probability distribution of the original samples $\textbf{\em X}_{T}^{i}$ and recovered samples $\textbf{\em X}_{Sl}^{i}$.
- •
$d(\textbf{\em X}_{T}^{i},\textbf{\em X}_{Sl}^{i})$ is the distance between the original and recovered samples.

##### Conditional Entropy and Diversity

The conditional entropy $H(\textbf{\em X}_{Sl}^{i}|\textbf{\em X}_{T}^{i})$ measures the uncertainty in the recovered samples $\textbf{\em X}_{Sl}^{i}$, given the original samples $\textbf{\em X}_{T}^{i}$. As $\textbf{\em X}_{Sl}^{i}=\mathcal{R}_{\zeta}(M(\textbf{\em X}_{T}^{i}))$, higher conditional entropy implies greater uncertainty of $\textbf{\em X}_{Sl}^{i}$ generated from $\textbf{\em X}_{T}^{i}$, suggesting a wider range of possible outcomes for the recovered samples from their original samples. Therefore, increasing the conditional entropy directly corresponds to enhancing the diversity of the recovered samples.

##### Conditional Entropy Equation

The conditional entropy $H(\textbf{\em X}_{Sl}^{i}|\textbf{\em X}_{T}^{i})$ quantifies the uncertainty in $\textbf{\em X}_{Sl}^{i}$, given $\textbf{\em X}_{T}^{i}$, and is defined as:

$$ $H(\textbf{\em X}_{Sl}^{i}|\textbf{\em X}_{T}^{i})=-\sum_{\textbf{\em X}_{T}^{i }}\sum_{\textbf{\em X}_{Sl}^{i}}p(\textbf{\em X}_{T}^{i},\textbf{\em X}_{Sl}^{ i})\log p(\textbf{\em X}_{Sl}^{i}|\textbf{\em X}_{T}^{i}).$ (10) $$

This equation measures how much uncertainty remains in $\textbf{\em X}_{Sl}^{i}$ after observing $\textbf{\em X}_{T}^{i}$. Higher values of $H(\textbf{\em X}_{Sl}^{i}|\textbf{\em X}_{T}^{i})$ indicate greater diversity in the recovered samples.

##### Probability Decay with Distance

We now show that the joint probability $p(\textbf{\em X}_{T}^{i},\textbf{\em X}_{Sl}^{i})$ is inversely related to the distance $d(\textbf{\em X}_{T}^{i},\textbf{\em X}_{Sl}^{i})$. Intuitively, nearby events have higher probabilities, while distant events have lower probabilities.

For example, in a Gaussian distribution, the probability density decays as the distance between $\textbf{\em X}_{T}^{i}$ and $\textbf{\em X}_{Sl}^{i}$ increases. Specifically:

$$ $p(\textbf{\em X}_{T}^{i},\textbf{\em X}_{Sl}^{i})\propto\exp\left(-\frac{d( \textbf{\em X}_{T}^{i},\textbf{\em X}_{Sl}^{i})^{2}}{2\sigma^{2}}\right).$ (11) $$

Here, $d(\textbf{\em X}_{T}^{i},\textbf{\em X}_{Sl}^{i})$ is the distance between the original and recovered samples, and $\sigma^{2}$ is the variance. As $d(\textbf{\em X}_{T}^{i},\textbf{\em X}_{Sl}^{i})$ increases, the probability $p(\textbf{\em X}_{T}^{i},\textbf{\em X}_{Sl}^{i})$ decays exponentially.

Since the joint probability $p(\textbf{\em X}_{T}^{i},\textbf{\em X}_{Sl}^{i})$ decreases as $d(\textbf{\em X}_{T}^{i},\textbf{\em X}_{Sl}^{i})$ increases, the conditional entropy $H(\textbf{\em X}_{Sl}^{i}|\textbf{\em X}_{T}^{i})$ from Eq. (10) also increases, indicating the uncertainty in $\textbf{\em X}_{Sl}^{i}$, given $\textbf{\em X}_{T}^{i}$, increases.

##### Conclusion

Maximizing the distance $d(\textbf{\em X}_{T}^{i},\textbf{\em X}_{Sl}^{i})$ decreases the joint probability $p(\textbf{\em X}_{T}^{i},\textbf{\em X}_{Sl}^{i})$, thus increasing the uncertainty and, therefore, the conditional entropy $H(\textbf{\em X}_{Sl}^{i}|\textbf{\em X}_{T}^{i})$. As higher conditional entropy corresponds to greater diversity in the recovered samples, we conclude that maximizing the distance between the original and recovered samples enhances the diversity of the recovered distribution.

### A.3 Dataset Details and Processings

#### A.3.1 UCI-HAR Dataset

The UCI-HAR dataset is tailored for human activity recognition tasks, comprising sensor data collected from 30 distinct users, each representing a separate domain. Each participant performs six activities: walking, walking upstairs, walking downstairs, standing, sitting, and lying down. The data is recorded using three types of sensors—accelerometers, gyroscopes, and body sensors—each capturing data on three axes. Thus, there are totally nine channels per sample, with each channel containing 128 data points. Following prior research (Ragab et al., ), we employed a window size of 128 for sample extraction and applied min-max normalization for data preprocessing.

#### A.3.2 Sleep-EDF Dataset

The Sleep-EDF dataset is designed for sleep stage classification. It includes recordings from six channels monitoring various physiological signals, such as EEG (Epz-Cz, Pz-Oz), EOG, and EMG. Based on prior research (Ragab et al., ) and due to the high information content in the Epz-Cz channel, we utilized only this channel in our experiments. The dataset comprises recordings from 20 subjects, each is treated as a domain because different persons have various personal habits. Each subject can be classified into five sleep stages: wake, light sleep stage 1 (N1), light sleep stage 2 (N2), deep sleep stage 3 (N3), and rapid eye movement (REM) (Goldberger et al., ). Notably, each sample in the dataset corresponds to a 30-second window of physiological data, recorded at a sampling rate of 100 Hz, resulting in 3000 timestamps per sample.

#### A.3.3 MFD dataset

The MFD dataset, collected by Paderborn University, is used for machine fault diagnosis, where vibration signals are leveraged to identify different types of incipient faults. Data was collected under four distinct working conditions, each treated as a separate domain. Each sample consists of a single univariate channel containing 5120 data points.

### A.4 Model Details

In our study, we adopted the encoder architecture presented in previous works (Ragab et al., ; ), which is a 1-dimensional Convolutional Neural Network (CNN) comprising three layers with filter sizes of 64, 128, and 128, respectively. Each convolutional layer is followed by a Rectified Linear Unit (ReLU) activation function and batch normalization.

In the adaptation stage, we apply masking to generate masked samples, adopting a masking ratio of 1/8 across all datasets. To recover the masked samples, we designed a recovery model $\mathcal{R}_{\zeta}$, consisting of two layers of Long Short-Term Memory (LSTM) networks. The hidden dimension is set to 64 for the HAR and SSC tasks, and 128 for the MFD task, due to the longer time sequences in the latter. To generate anchor samples, we used an anchor ratio of 0.3 for all datasets, meaning the 30% of samples with the lowest entropy in the anchor bank are selected as anchor samples. For the temperature factor Eq. (3) related to anchor-based recovery diversity maximization, we set it to 0.05 for the MFD and EEG datasets, and 0.01 for the HAR dataset.

### A.5 Baseline Details

We incorporate both conventional UDA approaches and source-free UDA (SFUDA) techniques, following prior work (Yang et al., ; Ragab et al., ). Below is a summary of each baseline.

##### Conventional UDA methods

- •
Higher-order Moment Matching (HoMM) (Chen et al., ). HoMM aligns high-order statistical moments between domains to achieve comprehensive domain alignment.
- •
Minimum Discrepancy Estimation for Deep Domain Adaptation (MMDA) (Rahman et al., ): MMDA combines MMD, correlation alignment, and entropy minimization for a robust adaptation approach across domains.
- •
Domain-Adversarial Training of Neural Networks (DANN) (Ganin et al., ): DANN utilizes adversarial learning to push the encoder in generating domain-invariant features which a domain discriminator cannot tell.
- •
Conditional Domain Adversarial Network (CDAN) (Long et al., ): CDAN leverages class-wise information with adversarial alignment for effective domain adaptation.
- •
Convolutional deep adaptation for time series (CoDATS) (Wilson et al., ): CoDATS uses adversarial learning to enhance adaptation performance, specifically targeting time-series data with limited supervision.

##### Source-free UDA methods

- •
Source Hypothesis Transfer (SHOT) (Liang et al., ): SHOT maximizes mutual information loss and employs self-supervised pseudo-labeling to extract target features aligned with the source hypothesis, enabling adaptation without requiring source data labels.
- •
Exploiting the intrinsic neighborhood structure (NRC) (Yang et al., ): NRC explores the underlying neighborhood structure in target data by forming distinct clusters and ensuring label consistency within them, addressing the challenge of unlabeled target domains.
- •
Attracting and dispersing (AaD) (Yang et al., ): AaD promotes consistent predictions within neighboring feature spaces, exploiting the intrinsic structure of unlabeled target data to improve adaptation.
- •
BAIT (Yang et al., ): BAIT uses a bait classifier to identify misclassified target features and subsequently updates the feature extractor to guide these difficult features toward the correct side of the decision boundary.
- •
Mask and impute (MAPU) (Ragab et al., ): MAPU captures temporal dependencies in TS data by designing a temporal imputer in source pretraining stage, and then restoring the temporal dependencies in target adaptation stage for temporal dependency transfer.

### A.6 Intuitive Examples for Segment

Fig. 8 provides intuitive examples for generating segments from an recovered sample. Here, to intuitively illustrate masking parts and the extraction proportion of 4/6, the complete recovered sample is split into six portions. Fig. 8 (a) shows the complete version, with portions B, C, D, and E masked and recovered. Fig. 8 (b) demonstrates the extraction for the ‘Early’ segment, where portions A, B, C, and D are selected, capturing the information at the early stage of the sequence. Fig. 8 (c) shows the extraction for the ‘Late’ segment, selecting portions C, D, E, and F. Fig. 8 (d) shows the ‘Recovered Parts’ segment, where the portions containing recovered parts, including B, C, D, and E, have been extracted.

Figure: Figure 8: (a) The complete recovered sample. (b) (c) (d) Extracted segment for ‘Early’, ‘Late’, and ‘Recovered Parts’ containing four portions from different regions of the recovered sample.
Refer to caption: x8.png

### A.7 Additional Results

Due to space limitations in the main paper, we here provide the analysis for the anchor ratio, the masking ratio, and the detailed results of the ablation study. The masking ratio, which introduces diversity to the initial distribution for optimization as a source-like distribution, was tested with values of [1/8, 2/8, 3/8, 4/8, 5/8, 6/8] following Ragab et al. (), with larger values indicating more information removed in the sample. The anchor ratio, which determines the top-$k$ samples used to generate the representative anchor, was evaluated using [0.1, 0.3, 0.5, 0.7, 0.9], with larger values indicating more samples selected for generating the anchor sample. For example, 0.1 represents the top 10% of samples with lowest entropy values being selected for anchor generation.

##### Effect of Anchor Ratio

Figure: Figure 9: Analysis for Anchor Ratio.
Refer to caption: x9.png

Fig. 9 examines the sensitivity of TemSR to different anchor ratios, where smaller anchor ratios tend to yield better results. This is because samples with the lowest entropy values are more likely to produce high-quality anchors with greater confidence. In contrast, larger anchor ratios may include samples with lower confidence, leading to less accurate anchors and, consequently, poorer guidance during the adaptation process. Based on these results, anchor ratios of 0.1 or 0.3 are recommended for generating effective anchors to enhance performance.

##### Effect of Masking Ratio

Figure: Figure 10: Analysis for Masking Ratio.
Refer to caption: x10.png

Fig. 10 shows the impact of various masking ratios, suggesting that smaller masking ratios lead to better performance. As discussed earlier, while higher masking ratios introduce more diversity to the source-like distribution, they can cause the model to collapse by exploiting shortcuts, e.g., recovering the masked regions as constant values. Although smaller masking ratios may limit diversity, our proposed recovery diversity maximization loss compensates for this by balancing the need for diversity with fidelity to the source domain. Thus, smaller masking ratios, e.g., 1/8 or 2/8, are recommended for achieving optimal results.

##### Detailed Results for Ablation Study

The detailed results of the ablation study can be found in Tables 5, 6, and 7 for HAR, SSC, and MFD, respectively, further highlighting the importance of each module in generating a robust recovered source-like distribution for effective TS-SFUDA.

Table: Table 5: Detailed ablation study of the five HAR cross-domain scenarios regarding MF1 score (%).

Table: Table 6: Detailed ablation study of the five SSC cross-domain scenarios regarding MF1 score (%).

Table: Table 7: Detailed ablation study of the five MFD cross-domain scenarios regarding MF1 score (%).

### A.8 Pseudocode of Overall Adaptation Process

The pseudo-code can be found in Algorithm 1, showing the training process of TemSR.

Figure: Algorithm 1 Overall Adaptation Process

## Peer Reviews

confidence: 3
contribution: 2
initial_rating: 6
presentation: 3
questions: In Section 4.5, could the authors explain why minimizing the domain discrepancy between the source-like and target domains is required for domain adaptation? This point does not appear to be discussed in previous sections.
soundness: 2
strengths: 1. The overall idea of source distribution recovery is reasonable.
2. The method section is detailed and clearly presented.
summary: This paper addresses the time-series source-free domain adaptation problem. It proposes a source recovery method that recovers target data to a source-like distribution and introduces anchor-based recovery diversity maximization to enhance the diversity of the source-like distribution.
weaknesses: 1. The ablation study could be more comprehensive, as there are additional specific designs with intuitive explanations mentioned in the method section beyond the three variants in Table 4, such as the consistent segment entropy loss and different components in the ARDM loss.
2. The two key requirements stated at the beginning of Section 3.3 are intuitive. More explanation or support from the literature would be beneficial.

---

confidence: 4
contribution: 2
initial_rating: 3
presentation: 3
questions: 1. Figure 2 is not very informative. It is inadequate to use two ellipses to represent complex temporal and spatial divergence across TS data. Moreover, what does “target distribution” mean here? Are you trying to explain why using masked target data? 
2. Regarding the recovery component, is a reconstruction loss included? Or using a pretrained reconstruction model as backbone? If not, is it better to initialize the recovery model by a reconstruction model pretrained on the target unsupervised data? 
3. Regarding the segment regularization line 248-250, low entropy difference between segments does not indicate the smooth dependencies among segments. The authors may need to present ablation studies on this term (Eq. (2)) to show its effectiveness. Moreover, what does {C,E,L,R} mean? As in Eq. (2), (k, s) belongs to {C,E,L,R}, is it trying to minimize the entropy difference between arbitrary segment pairs? 
4. Can you elaborate more on the test flow? Are you using the pretrained source classifier for final prediction?
5. Regarding the experiments parts: (1) more complex video benchmark datasets are encouraged to be tested; (2) why using the same CNN backbone? For different tasks, different backbones should be used. For instance, for action recognition tasks, there are more advanced backbones, e.g., I3D, videomae; (3) Model details should be presented in the main contents. Please elaborate more on the recovery model as it is the main contribution. Are you using LSTM or Bi-LSTM? Why not considering Transformer structure? (4) The results are not very convincing to show the performance superiority of TemSR as TemSR is the winner in 2 of 5, 1 of 5, and 3 of 5 tasks in the three datasets. (5) Sensitivity analysis shows that the optimal hyper-parameter value varies across tasks. It is not convincing to conclude the best value range is 1 to 10 by only using 3 datasets. The hyper-parameter generalization ability of the proposed TemSR is also an issue when facing new tasks or datasets. Moreover, what is “EEG” in figures 4,5,6?

[ref1] Contrast and mix: Temporal contrastive video domain adaptation with background mixing

[ref2] Unsupervised video domain adaptation for action recognition: A disentanglement perspective
soundness: 2
strengths: 1. The paper proposes to deal with a practical and meaningful adaptation scenario, that is source-free unsupervised domain adaptation.
2. The paper presents a temporal source recovery (TemSR) framework for source-free unsupervised domain adaptation.
3. The paper conduct experiments on three practical datasets, and demonstrate the effectiveness of the proposed TemSR  compared with given baselines.
summary: In this paper, the authors present a temporal source recovery (TemSR) framework for source-free unsupervised domain adaptation. Specifically, a source-like distribution is generated with the source temporal dependencies recovered. A segment-based regularization and an anchor-based recovery diversity maximization are developed to enhance the source recovery. Experiments on three datasets are done to verify the proposed TemSR.
weaknesses: 1. One of my major concerns of the work is on the technical novelty. Using mask and then recovery has been shown the adaptation and transfer capability in generation tasks, e.g., masked autoencoder and videoMAE. The application of such an idea to source-free UDA setting makes the technical significance limited although it may not be explicitly done before.
2. The paper misses some important video-based UDA related works. Video is a popular time-series data, and there are quite a lot of video-based UDA research. The reviewer suggests the authors to discuss them in related work section. 
3. For time-series data as stated in the setting with N channels and L time points, existing UDA works usually handle both the spatial and temporal divergence, e.g., [ref1,2]. However, the paper seems to overlook the spatial divergence and only focus on the temporal one.
4. The experimental studies are not very convincing. The author may refer to my detailed comments on the below questions.

---

confidence: 5
contribution: 3
initial_rating: 5
presentation: 3
questions: Methodologies:
1. In Section 3.3 on Recovery-initialization, could you further explain which parts are initialized in Figure.1 framework? Furthermore, could you provide further clarification on why initializing with the target distribution satisfies the first requirement:  "The initialized distribution should be close to the source distribution; otherwise, obtaining an effective source-like distribution is difficult". If possible, could you add an ablation study by initializing randomly? Could you further explain why GAN does not meet the two requirement?
2. Targeting to the "masking", as there is no "dimension related" information provided, could you give more details on the masking strategy? Will the masked parts be replaced with 0 or some noise? Or, you apply a similar masking strategy as MAE (Masked Autoencoders Are Scalable Vision Learners)?

Experiments:
1. In Section 4.1 (Datasets and Settings), you state that you followed the "identical training configurations as Ragab et al. (2023b)," referring to the paper titled "Source-Free Domain Adaptation with Temporal Imputation for Time Series Data. (MAPU)" However, after reviewing both the cited paper and the appendix of your work, I noticed that the datasets were split into training and testing sets only, with no mention of a validation set. If the best model is selected based on the test dataset, this could lead to biased evaluations, which raises concerns about the fairness of the evaluation process. In addition, For reproducibility, could you please include a table in the appendix listing key hyperparameters (e.g. learning rates, batch sizes, number of epochs) for all models, including baselines, to ensure fair comparison which could be easier for reading?
2. In the L_seg, four masking positions are utilized under the assumption that they can effectively capture local dependencies. Could you conduct some ablation study experiments to demonstrate that all four types of masking positions are significant, or how does each position affects the overall performance?
3. Could you add a computational complexity analysis with the proposed model and the baseline models?
soundness: 2
strengths: 1. The proposed task ensures source data privacy by performing domain adaptation without needing the source data.
2. The paper is logically structured, with a smooth connection between the motivation and the proposed method. Mathematical proofs are provided.
3. The introduction of the anchor-based recovery diversity maximization helps generate more diverse and realistic source-like distributions, improving adaptation performance.
4. 3 Benchmark datasets have been applied for evaluations.
summary: The paper a noval framework, TemSR, for Time-Series Source-Free Unsupervised Domain Adaptation (TS-SFUDA), designed to recover and transfer temporal dependencies without access to source data. TemSR employs a masking, recovery, and optimization process to generate a source-like distribution with restored temporal dependencies. To improve the recovery process, segment-based regularization is introduced to capture local dependencies and maximize anchor-based recovery diversity to ensure diversity in the recovered distribution. Extensive experiments across various time-series tasks demonstrate the effectiveness of TemSR, surpassing existing methods that rely on source-specific pretraining designs while maintaining source data privacy.
weaknesses: 1. The notation in Figure 1 is inconsistent with the notation in the text. Specifically, is the **L_sse** in Figure 1 the same as **L_seg** mentioned in line 259?
2. The non-source-free baseline models used are outdated, with CoDATS being published four years ago. It would be beneficial to include more recent baseline models from 2023, such as CLUDA ("Contrastive Learning in Unsupervised Domain Adaptation for Semantic Segmentation", Neurips 2023) and RainCoat ("Domain Adaptation for Time Series Under Feature and Label Shifts", ICML 2023).
3. Although using three benchmark datasets is sufficient, most previous MTS-UDA tasks typically select 7-10 source-target pairs (as the source-pair combination for HAR and SSC datasets can be hundreds) and report the average and standard deviation for comparisons, which provides a more balanced and fair evaluation. Moreover, the standard deviation across all pairs can demonstrate the model's robustness by highlighting its performance consistency across different cases. Having only five pairs per dataset is insufficient for a fair comparison.

Meta-review: The paper introduces a method for source distribution recovery with a detailed methodological presentation and clearly defined variants. The idea of source distribution recovery is well-motivated, and the method section is clearly and comprehensively presented. The ablation study lacks thoroughness, as key designs mentioned in the method section, such as the consistent segment entropy loss, are not evaluated.

One reviewer accepted the paper, while two recommended rejection. After reviewing both the paper and the rebuttal, the AC decided that the paper should be rejected.

Decision: Reject