When a time-series model trained on one population, sensor, or machine is deployed on another, accuracy drops. The usual fix is adversarial domain adaptation: a second network, the domain discriminator, tries to tell source features from target features, and the feature encoder is trained to fool it. For sequences, this leaves an unasked question. How many consecutive time steps must the discriminator see before the two domains become distinguishable? If it sees one step at a time, it can only align snapshots. The encoder can then match snapshots perfectly while the target's dynamics stay different, for example motions with the same postures but different acceleration, or sleep recordings with the same stage frequencies but different stage sequences. If the discriminator sees the whole sequence, it can in principle catch any difference. In practice it must learn a very hard classification problem from small batches, inside an unstable two-player game.
This note proposes treating the window length, which is the Markov order of the alignment, as the central quantity. The core fact is simple. Suppose the learned features evolve as a stationary process in which each step depends only on the previous $k$ steps (a $k$-th order Markov process). Then matching the distribution of every window of $k+1$ consecutive features across domains already matches the distribution of entire trajectories. The program has two parts. First, we build a cheap probe that estimates the smallest order at which a given domain shift still lives in the features. Second, we run adversarial alignment with discriminators whose view is limited to exactly that order. We expect this to recover most of what full-sequence discriminators gain, with less variance across random seeds. The experiments also report a sanity check the field has skipped: whether gains survive comparison to a classifier that simply repeats the previous label.
Core Claim
Let $z_{1:T}$ be the encoder's feature trajectory and $w_t^{(k)} = (z_{t-k}, \dots, z_t)$ the window of $k+1$ consecutive features. Write $P_s$ and $P_t$ for the source and target distributions of the feature trajectories. If both are stationary $k$-th order Markov processes, then
$$P_s\big(w^{(k)}\big) = P_t\big(w^{(k)}\big) \;\Longrightarrow\; P_s(z_{1:T}) = P_t(z_{1:T}) \text{ for all } T.$$
The reason is that the $(k+1)$-window distribution fixes two things: the distribution of the first $k$ steps (its marginal) and the transition kernel $P(z_t \mid z_{t-k:t-1})$ (its conditional). Together these determine the law of the whole trajectory.
This turns the choice of discriminator into a choice of order. A pointwise discriminator ($k=0$), as used by DANN-style methods and by VRADA, is sufficient only if the shift is entirely in the snapshot distribution. A full-sequence discriminator, as in SLARDA, is sufficient for any order. It pays for that generality with a harder estimation problem and no control over which cues it learns first. Our claim is that the right order is usually small but greater than one. It can be estimated from data, and a discriminator restricted to that order is the better-conditioned adversary.
Where This Sits
The first direction supplies the motivation. Several papers show that one-step transitions miss real structure. Transition Forests need multi-lag comparisons to separate actions that share postures. The Lie-algebra kinematic prior notes that velocity-level, first-order models cannot represent acceleration. Hanuschkin et al. find bird-song syntax needs memory beyond the immediate transition. These works justify suspecting that domain shifts, too, can hide at orders above one. The same direction also constrains the design. Explicit high-order transition tensors blow up exponentially, and the reduced-rank VAR transfer work stays at lag 1, leaving lag $d \ge 2$ open. So we never model the transition law explicitly. We only ask a small discriminator to tell windows apart.
The second direction supplies the method and the closest competitors. VRADA puts a gradient-reversal discriminator on a recurrent latent with a first-order prior. It is the clearest instance of order-0 or order-1 alignment. SLARDA uses a Transformer discriminator over the whole feature sequence plus a Mean Teacher for class alignment. It covers all orders implicitly but, as its authors leave open, never says which order it actually aligns. CPDA rejects adversarial training. It aligns class-conditional path distributions with a signature-plus-spectral kernel, at $O(B^2)$ cost in batch size $B$. EDEN enforces coherence only between adjacent segments, which is again first order. HoMM matches high-order moments across feature dimensions, not across time. It also shows estimation degrades beyond order 4, which warns us that very long windows will be noisy too.
What none of these do is measure the order at which a shift lives, or tie the adversary's view to that order. That is the gap this proposal fills.
Research Program
The order probe. We freeze an encoder: source-only, after DANN, or after any adaptation method. For each $k \in \{0, 1, 2, 4, 8, 16\}$ we train a fresh small domain classifier on windows $w^{(k)}$ and record its held-out domain AUC, $A_k$. The increment $A_k - A_{k-1}$ measures how much domain information is carried by dependence at lag $k$ beyond what shorter windows reveal. The estimated shift order $\hat k$ is the smallest $k$ beyond which increments fall within seed-to-seed noise.
Two controls separate temporal structure from mere window size. In the first, windows have their time order shuffled, so the input content is the same but the ordering is destroyed. In the second, windows are assembled from features taken from different sequences. The probe is a diagnostic in its own right. Applied to published-style DANN, VRADA-style, and SLARDA encoders, it tells us what each method leaves unaligned.
Order-restricted adversarial alignment. The encoder feeds a task classifier and a causal dilated convolutional discriminator $D_k$, whose receptive field is exactly $k+1$ steps. It is trained through a gradient reversal layer:
$$\min_{G,C}\max_{D_k}\; \mathcal{L}_{\text{task}}\big(C(G(x_s)), y_s\big) \;-\; \lambda\, \mathcal{L}_{\text{dom}}\big(D_k(w^{(k)}),\, d\big)$$
Here $G$ is the encoder, $C$ the classifier, $d$ the domain label, and $\lambda$ the reversal weight.
We set $k = \hat k$ from a probe run on the source-only encoder, then re-run the probe after alignment to check that the residual shift has moved to higher order or vanished. If the residual shift has moved up, we raise $k$ once.
Class conditioning follows CDAN: the discriminator receives the window together with the classifier's soft predictions over the same window, so it sees short label sequences. This addresses the class-collapse failure of marginal alignment without importing SLARDA's Mean Teacher. A variant with Mean Teacher added is run separately so the two contributions can be told apart.
Evaluation that accounts for persistence. Sleep staging and continuous activity streams have strongly autocorrelated labels. The streaming-evaluation study shows a classifier that repeats the previous label reaches 85.3% accuracy on Elec2 and beats adaptive learners at 76–79%. On time-ordered target streams we therefore report Kappa-Temporal ($\kappa_{per}$), which measures gain over persistence, alongside accuracy and macro-F1.
Proposed Experiments
Synthetic planted-order shifts. We first generate source and target processes with identical marginals and identical lag-1 joint distributions that differ only at lag $m \in \{2, 4, 8\}$. One construction uses linear autoregressive processes whose autocovariances agree up to lag $m-1$; another uses switching dynamics in the style of DSARF with matched occupancy but different dwell structure. Each process is rendered through a fixed nonlinear sensor map, and labels depend on the dynamics. Ground truth is known, so we can check three things: whether the probe recovers $m$, whether order-0 and order-1 alignment leave target accuracy near source-only, and whether order-$m$ alignment closes the gap.
Real benchmarks. We use the benchmarks the competing papers report on. These are HHAR and uWave (CPDA), Opportunity and Paderborn bearing (SLARDA), and Sleep-EDF (SLARDA, CPDA, RAINCOAT). All use the same source–target scenario splits as the original papers, with the SLARDA codebase mohamedr002/SLARDA as the shared data pipeline and backbone.
Baselines
The naive reference points are a source-only encoder with no adaptation and, on time-ordered targets, the persistence classifier that outputs the previous true label. The persistence classifier sets the floor that $\kappa_{per}$ is measured against. Any method with high accuracy but $\kappa_{per}$ near zero has learned label autocorrelation, not transferable dynamics.
DANN with temporal pooling is the standard static adversarial method. It is the order-0 point of our sweep. Running it on our backbone with the same reversal schedule makes it the cleanest ablation of the order knob.
VRADA represents first-order recurrent adversarial alignment. We reimplement it on the same inputs, since its reported results are on MIMIC-III and CHLA data we do not use: roughly 4% AUC over DANN and R-DANN on Adult-AHRF, and 1.5–2% over R-DANN on ICD9. It is the strongest test of whether order 1 already suffices.
SLARDA is the strongest adversarial competitor because its full-sequence discriminator can, in principle, align any order. We run it from its public code with the same backbone, data, epochs, and a hyperparameter search budget matched to ours, over at least five seeds. The file gives only relative figures for it: a 2.62% improvement over the best baseline on Opportunity and an average 17.34% improvement on Paderborn, with hard scenarios rising from about 50% to over 84%. No absolute per-dataset accuracy for SLARDA was found on Lacuna, so we compare against our own matched runs.
CPDA is the strongest non-adversarial competitor. It reports 81.82% accuracy on HHAR and 97.30% on uWave. Those are the numbers to beat on those datasets, and we also rerun CPDA under our protocol to report its variance and wall-clock cost.
The key ablations hold everything fixed except the discriminator. The first compares order $\hat k$ with orders 0, 1, $2\hat k$, and full sequence. The second uses shuffled-order windows of length $\hat k+1$, which isolates temporal order from window content. The third removes class conditioning.
Beating the competitors means three things. On average across scenarios, accuracy and $\kappa_{per}$ must be at least equal to SLARDA's, with lower seed-to-seed standard deviation. The method must stay within CPDA's reported HHAR and uWave figures while scaling linearly in batch size. And the shuffled-window ablation must perform clearly worse than the ordered one.
Why not just…?
Why not just use SLARDA's full-sequence discriminator, which already sees every order? This is the real threat. If the full-sequence discriminator matches order-$\hat k$ alignment in both mean and variance, our method contributes a diagnostic rather than a better method, and we will say so. The argument for restriction is about estimation, not expressiveness. A discriminator over long windows has many more ways to separate domains from a small batch. Some of those ways are spurious, and HoMM's finding that moment estimates degrade past order 4 is the same phenomenon in a static setting. The window-order sweep is decisive here. If performance is flat or rising out to full length on real data, the threat holds. If it peaks near $\hat k$ and degrades or grows noisier beyond, restriction is justified. The synthetic tasks show which regime each dataset falls in.
Why not just use CPDA's signature kernel and avoid adversarial training entirely? CPDA is stable and comes with a risk bound. Path signatures truncated at a given depth also capture ordered interactions without any minimax game. Its costs are the $O(B^2)$ kernel computation and dependence on initial pseudo-labels, which its authors note fails on low signal-to-noise targets such as Finger Movements. Our comparison reports accuracy, $\kappa_{per}$, and wall-clock time at growing batch sizes and sequence lengths. If CPDA wins on accuracy at practical batch sizes, the remaining case for our method is the probe and the cost. Applying the probe to CPDA's encoder would still say which order CPDA's kernel actually aligns.
Why not just smooth predictions with a first-order label model, or lean on persistence? On sleep staging, much apparent accuracy may come from label continuity rather than adapted features. Post-hoc smoothing of target predictions with source label-transition probabilities is a cheap rival. We include it as a post-processing step applied equally to every method. We report $\kappa_{per}$ precisely so that gains that vanish once persistence is accounted for are exposed, ours included.
Why not just align frequency spectra? RAINCOAT and EDEN show frequency views help with periodic signals. But EDEN needed quality-aware fusion because non-periodic classes are poorly served by spectra, and spectra discard temporal direction. The planted-order synthetic shifts are designed with matched power spectra at the relevant scales, so a frequency-only aligner should fail there by construction. On real data we include an FFT-feature discriminator as an additional order-0 baseline.
Decisive Checks
The proposal stands or falls on four observations. First, on synthetic data the probe must recover the planted order, and only alignment at or above that order closes the gap. Second, on at least three of the five real benchmarks, the probe must find residual domain information above order 1 after VRADA-style alignment. If shifts are always order 0 or 1, the premise fails. Third, order-$\hat k$ alignment must match SLARDA's mean accuracy with smaller variance, and must beat the shuffled-window ablation. Fourth, all reported gains must persist in $\kappa_{per}$ on the time-ordered Sleep-EDF and Opportunity targets. If the second check fails, the result is still useful: it would mean first-order alignment is enough for these benchmarks, and the field's move to full-sequence discriminators is unnecessary for them.
References
- Variational Recurrent Adversarial Deep Domain Adaptation
- Self-supervised Autoregressive Domain Adaptation for Time Series Data
- Transition Forests: Learning Discriminative Temporal Transitions for Action Recognition and Detection
- Lie Algebra-Based Kinematic Prior for 3D Human Pose Tracking
- A reafferent and feed-forward model of song syntax generation in the Bengalese finch
- Transfer Learning for High-dimensional Reduced Rank Time Series Models
- CPDA: Class-Conditional Path Distribution Alignment for Unsupervised Time-Series Domain Adaptation
- Breakthrough Sensor-Limited Single View: Towards Implicit Temporal Dynamics for Time Series Domain Adaptation
- HoMM: Higher-Order Moment Matching for Unsupervised Domain Adaptation
- Evaluation methods and decision theory for classification of streaming data with temporal dependence
- Deep Switching Auto-Regressive Factorization: Application to Time Series Forecasting