I-SEA: Importance Sampling and Expected Alignment-Based Deep Distance Metric Learning for Time Series Analysis and Embedding

Sirisha Rambhatla, Zhengping Che, Yan Liu

Abstract

Comparing multivariate time-series data is a fundamental challenge due to varying sequence speeds and irregular sampling. Traditional methods like Dynamic Time Warping (DTW) often fail to satisfy the triangle inequality, leading to unstable embeddings. We present I-SEA (Importance Sampling and Expected Alignment), a deep learning framework that learns a valid distance metric by transforming time-series into a structured latent space. By treating alignment as a rare-event simulation problem, I-SEA employs importance sampling to efficiently estimate expected alignment distances. Our results on complex healthcare datasets demonstrate that I-SEA significantly outperforms existing methods in classification accuracy and clustering stability.

Introduction

Time-series analysis, particularly in domains like healthcare or finance, requires robust distance metrics to compare sequences that evolve at different rates. While Dynamic Time Warping (DTW) is a standard approach, its lack of metric properties—specifically the triangle inequality—warps the underlying data geometry. This makes it difficult for downstream machine learning models to learn consistent representations. While "Expected Alignment" (averaging over all possible alignment paths) provides a valid metric, it is computationally exhaustive because high-quality alignments are rare events in a combinatorial space.

The I-SEA Framework

The I-SEA architecture addresses these challenges through a two-stage process: deep metric learning and importance-sampled distance computation.

The I-SEA framework pipeline: from raw time-series to structured embeddings via neural networks and importance sampling.

Deep Metric Learning

A neural network (NN) is trained to transform raw, high-dimensional time-series into a latent space. The training objective utilizes a large-margin triplet loss, which explicitly optimizes the network to minimize the distance between similar samples ("Bring Closer") while maximizing the distance to dissimilar ones ("Push Away").

Importance Sampling for Expected Alignment

The core innovation of I-SEA is its use of Importance Sampling (IS) paired with Non-parametric Density Estimation (KDE) to calculate distances in the transformed space. Instead of a naive average of all alignment paths, I-SEA adaptively identifies and weights the most favorable alignments.

Comparison of (a) uniform sampling and (b) importance sampling on the probability density function (PDF) of alignment paths.

By focusing on these "rare" high-similarity paths, the framework reduces the variance of the distance estimate. This approach ensures the distance remains a mathematically valid metric, showing near-zero violations of the triangle inequality in empirical tests compared to methods like Soft-DTW.

Experimental Evaluation

The model was evaluated on two challenging real-world healthcare datasets:

  • UCI EEG Dataset: 600 brain activity traces (64 variables) for alcoholic vs. non-alcoholic classification.
  • PhysioNet Dataset: ICU patient data (37 variables) with approximately 73% missing entries and irregular sampling.

Key Results

  • Superior Accuracy: In K-Nearest Neighbor (K-NN) classification tasks, I-SEA consistently outperformed baselines such as Soft-DTW, Global Alignment Kernels (GAK), and MDTW.
  • Stability: Performance variance was significantly lower than competing methods, as evidenced by tighter distributions in performance metrics across samples.
  • Clustering Quality: Visualizations using Multidimensional Scaling (MDS) revealed that I-SEA produces well-separated, dense clusters, avoiding the "bleeding" between classes or linear artifacts common in traditional alignment methods.

Conclusion and Future Work

I-SEA bridges the gap between statistical rare-event simulation and deep metric learning for time-series. While the current implementation offers a robust and accurate metric, future work will focus on reducing the $O(T^3)$ computational complexity for longer sequences and integrating more advanced missing-data imputation strategies directly into the neural architecture.

Summary updated

BibTeX
@inproceedings{rambhatla2022i,
  author = {Sirisha Rambhatla and Zhengping Che and Yan Liu},
  title = {{I-SEA: Importance Sampling and Expected Alignment-Based Deep Distance Metric Learning for Time Series Analysis and Embedding}},
  booktitle = {AAAI Conference on Artificial Intelligence},
  year = {2022},
  doi = {10.1609/aaai.v36i7.20776},
}
Figure