Table of Contents
Fetching ...

Shifting the Paradigm: A Diffeomorphism Between Time Series Data Manifolds for Achieving Shift-Invariancy in Deep Learning

Berken Utku Demirel, Christian Holz

TL;DR

This work tackles the lack of shift invariance in time-series deep learning by introducing a differentiable bijective transformation that maps shifted variants of a sample to a single point on a high-dimensional data manifold. Grounded in Fourier-domain phase alignment, the method defines a diffeomorphism \mathcal{T}(\mathbf{x}, \phi) guided by a small network that predicts a phase angle, and it is trained with a cross-entropy loss plus a variance-based regularizer to enforce invariance. The authors provide theoretical guarantees of bijectivity and shift-invariance, and validate the approach on nine datasets spanning six tasks, showing consistent gains in accuracy and dramatically higher shift-consistency than state-of-the-art baselines. The results demonstrate that shift-invariance can be achieved without restricting model topology or shift ranges, making the technique broadly applicable to real-world time-series problems such as HR monitoring, activity recognition, sleep staging, and respiratory analysis.

Abstract

Deep learning models lack shift invariance, making them sensitive to input shifts that cause changes in output. While recent techniques seek to address this for images, our findings show that these approaches fail to provide shift-invariance in time series, where the data generation mechanism is more challenging due to the interaction of low and high frequencies. Worse, they also decrease performance across several tasks. In this paper, we propose a novel differentiable bijective function that maps samples from their high-dimensional data manifold to another manifold of the same dimension, without any dimensional reduction. Our approach guarantees that samples -- when subjected to random shifts -- are mapped to a unique point in the manifold while preserving all task-relevant information without loss. We theoretically and empirically demonstrate that the proposed transformation guarantees shift-invariance in deep learning models without imposing any limits to the shift. Our experiments on six time series tasks with state-of-the-art methods show that our approach consistently improves the performance while enabling models to achieve complete shift-invariance without modifying or imposing restrictions on the model's topology. The source code is available on \href{https://github.com/eth-siplab/Shifting-the-Paradigm}{GitHub}.

Shifting the Paradigm: A Diffeomorphism Between Time Series Data Manifolds for Achieving Shift-Invariancy in Deep Learning

TL;DR

This work tackles the lack of shift invariance in time-series deep learning by introducing a differentiable bijective transformation that maps shifted variants of a sample to a single point on a high-dimensional data manifold. Grounded in Fourier-domain phase alignment, the method defines a diffeomorphism \mathcal{T}(\mathbf{x}, \phi) guided by a small network that predicts a phase angle, and it is trained with a cross-entropy loss plus a variance-based regularizer to enforce invariance. The authors provide theoretical guarantees of bijectivity and shift-invariance, and validate the approach on nine datasets spanning six tasks, showing consistent gains in accuracy and dramatically higher shift-consistency than state-of-the-art baselines. The results demonstrate that shift-invariance can be achieved without restricting model topology or shift ranges, making the technique broadly applicable to real-world time-series problems such as HR monitoring, activity recognition, sleep staging, and respiratory analysis.

Abstract

Deep learning models lack shift invariance, making them sensitive to input shifts that cause changes in output. While recent techniques seek to address this for images, our findings show that these approaches fail to provide shift-invariance in time series, where the data generation mechanism is more challenging due to the interaction of low and high frequencies. Worse, they also decrease performance across several tasks. In this paper, we propose a novel differentiable bijective function that maps samples from their high-dimensional data manifold to another manifold of the same dimension, without any dimensional reduction. Our approach guarantees that samples -- when subjected to random shifts -- are mapped to a unique point in the manifold while preserving all task-relevant information without loss. We theoretically and empirically demonstrate that the proposed transformation guarantees shift-invariance in deep learning models without imposing any limits to the shift. Our experiments on six time series tasks with state-of-the-art methods show that our approach consistently improves the performance while enabling models to achieve complete shift-invariance without modifying or imposing restrictions on the model's topology. The source code is available on \href{https://github.com/eth-siplab/Shifting-the-Paradigm}{GitHub}.

Paper Structure

This paper contains 67 sections, 7 theorems, 41 equations, 6 figures, 34 tables, 1 algorithm.

Key Result

Proposition 2.1

Shift operation in time domain defines an Abelian Group of phase angles in the frequency domain for each harmonic with frequency $\omega_k$.

Figures (6)

  • Figure 1: (a) The magnitude response of the ideal low-pass filter and binomial filter that is employed in zhang2019shiftinvar for preventing aliasing. (b) Time domain representations of the ideal and binomial filters with interpolation for smoother waveforms. (c) An 8-second signal for blood volume changes and its $t^{\prime}$ shifted version, obtained through photoplethysmogram--—a widely utilized signal for heart rate monitoring apple_study. (d) The heart rate prediction of a trained ResNet with binomial filters to prevent aliasing. Different amounts of shifts $(t^{\prime} \in [-4,4])$ change the trained model output drastically from 140 to 60 beats per minute (bpm). (e) A 10-second electrocardiogram (ECG) signal from a patient with atrial fibrillation (AFIB). (f) The model misclassifies the abnormal AFIB pattern as a healthy sinus rhythm (SR), with shifts causing a complete change in output probability.
  • Figure 2: (a) Frequency domain representation of a harmonic at frequency $\omega_0$ with different phase angles in unit circle. (b) Time domain representation of a signal $\mathrm{x}(t)$ and its shifted version $\mathrm{x}(t-t^{\prime})$. The phase angle of the harmonic can cover all (i.e., surjective $\mathcal{T}(\mathbf{x}, \phi)$) potential shifts. Moreover, shifts in the time domain correspond to unique (i.e., injective $\mathcal{T}(\mathbf{x}, \phi)$) angle rotations in the frequency domain for the sinusoidal with periodicity $\mathrm{T}_0$. Therefore, the proposed transformation function $\mathcal{T}(\mathbf{x}, \phi)$ is bijective.
  • Figure 3: (a) An input signal in the time domain and complex plane representation of its decomposed sinusoidal of frequency $\omega_0 = \frac{2\pi}{T_0}$ with the phase angle $\phi_0$. (b) Guiding the diffeomorphism to map samples between manifolds. (c) The obtained waveform with a phase shift applied to all frequencies linearly, calculated by the angle difference, as in Equation \ref{['eq:phase_shift2']}, without altering the waveform. (d) The loss functions for optimizing networks with the cross-entropy and the variance of possible manifolds.
  • Figure 4: (a) Comparison of pairwise Euclidian distances of randomly shifted embeddings with and without applying our method. (b) t-SNE visualizations of embeddings without our method show some shifted samples clustering with opposite class embeddings. (c) With our transformation, all shifted variants of the same signal cluster correctly within their true class label.
  • Figure 5: Input waveforms to the classifier in the third epoch (a) without applying our transformation function. (b) with our guidance network ($f_{\theta_G}$). Another experiment with a different seed. Input waveforms (c) without applying our transformation function. (d) with our guidance network ($f_{\theta_G}$).
  • ...and 1 more figures

Theorems & Definitions (13)

  • Proposition 2.1: Time shift as a Group Operation
  • proof
  • Theorem 2.2: Covering the Entire Time Space Injectively
  • Theorem 2.3: Guarantees for Shift-Invariancy
  • proof
  • Lemma A.1: Circular Shift
  • proof
  • Proposition A.2: Time shift as a Group Operation
  • proof
  • Theorem A.3: Covering the Entire Time Space Injectively
  • ...and 3 more