Regularization-free Diffeomorphic Temporal Alignment Nets

Ron Shapira Weber, Oren Freifeld

This paper introduces a significant refinement to how we align time-series data using deep learning. By rethinking the loss function, the authors eliminate the most tedious part of the process: hyperparameter tuning for regularization.

TL;DR

The authors propose a "regularization-free" version of Diffeomorphic Temporal Alignment Nets (DTAN) by introducing a novel Inverse Consistency Averaging Error (ICAE) loss. This approach removes the need for expensive, dataset-specific hyperparameter searches while achieving state-of-the-art alignment and classification results across 128 UCR datasets, including those with variable-length signals.

The Problem: Temporal Misalignment

In time-series analysis, signals are often nonlinearly misaligned. Imagine recording several heartbeats (ECG); even if they come from the same person, one might be slightly faster or slower than the other. If you simply average them, the resulting "mean" signal becomes blurry and loses its characteristic peaks.

To fix this, we use Temporal Alignment, which "warps" the time axis of signals to align their features. The Diffeomorphic Temporal Alignment Net (DTAN) is a deep learning solution that predicts these warps. However, DTANs traditionally require a regularization term to prevent the model from predicting trivial warps (like squashing the entire signal into a single point).

The catch is that the optimal strength of this regularization varies wildly between datasets. Researchers previously had to run thousands of experiments to find the right settings for every new type of data, making the method impractical for general use.

The Solution: Inverse Consistency Averaging Error (ICAE)

The core innovation of this paper is the ICAE loss, which leverages a key property of diffeomorphisms: they are differentiable, order-preserving, and invertible.

Conceptual diagram of the ICAE loss, showing forward and inverse warping between individual signals and the latent mean.
  1. Standard DTAN: Warps signals forward to a latent mean ($\mu$) and minimizes the variance. Without regularization, the model can "cheat" by warping everything into a flat line to achieve zero variance.
  2. ICAE (The New Way): Instead of just looking at the forward warp, ICAE takes the estimated mean signal ($\mu$) and warps it backward using the inverse of the predicted warp ($T^{-\theta}$) to try and reconstruct the original signal ($u_i$).

Because the model must be able to "unwarp" the mean back into the original signal, it is naturally discouraged from predicting unrealistic or "pinched" warps. The loss function itself acts as an implicit regularizer, making explicit penalty terms (and their pesky hyperparameters) unnecessary.

Architecture & Extensions

  • Localization Net: The authors use InceptionTime as the backbone to predict warping parameters, which is more robust than the Temporal Convolutional Networks (TCNs) used in previous versions.
  • Triplet Loss: They introduce a centroid-based triplet loss variant of ICAE to improve the separation between different classes in the latent space.
  • Variable Length: By incorporating Global Average Pooling (GAP) and a specialized averaging scheme, this is the first DTAN variant that can handle batches of signals with different lengths.

Key Results

The authors evaluated their method on the UCR Time Series Classification Archive across 128 datasets, including 11 variable-length datasets previously incompatible with DTAN.

Comparison of alignment methods on time-series data. DTAN-ICAE achieves a sharp, accurate mean without the need for manual regularization tuning.
  • Accuracy: The ICAE-triplet method achieved the highest median and best Nearest Centroid Classification (NCC) accuracy compared to all contemporary methods (like Euclidean averaging, DBA, and SoftDTW).
  • One Size Fits All: Unlike previous SOTA methods that required searching through 96 different hyperparameter configurations per dataset, the proposed method uses a single configuration for all 128 datasets and still outperforms them.
  • Speed & Memory: During inference, DTAN is 10x to 10,000x faster than optimization-based methods like DBA or SoftDTW. While those methods must re-run an optimization for every new sample, DTAN simply performs a single forward pass. Furthermore, on the largest datasets, traditional methods ran out of memory, whereas DTAN handled them easily.

Limitations and Future Work

  • Small Training Sets: On very small datasets, optimization-based methods (like DTW) might be faster to run because training a neural network requires a certain amount of data to generalize well.
  • Multivariate Data: While the paper provides a proof-of-concept for multivariate signals, a more exhaustive study on complex, multi-channel relationships is left for future research.

Code is available at github.com/BGU-CS-VIL/RF-DTAN.

Summary updated

BibTeX
@inproceedings{weber2023regularization,
  author = {Ron Shapira Weber and Oren Freifeld},
  title = {{Regularization-free Diffeomorphic Temporal Alignment Nets}},
  booktitle = {International Conference on Machine Learning},
  year = {2023},
  url = {https://openreview.net/forum?id=7IbLWa0anE},
}
Figure