English

A General Metric-Space Formulation of the Time Warp Edit Distance (TWED)

Information Retrieval 2026-01-12 v1 Data Structures and Algorithms

Abstract

This short technical note presents a formal generalization of the Time Warp Edit Distance (TWED) proposed by Marteau (2009) to arbitrary metric spaces. By viewing both the observation and temporal domains as metric spaces (X,d)(X, d) and (T,Δ)(T, \Delta), we define a Generalized TWED (GTWED) that remains a true metric under mild assumptions. We provide self-contained proofs of its metric properties and show that the classical TWED is recovered as a special case when X=RdX = \mathbb{R}^d, TRT \subset \mathbb{R}, and g(x)=xg(x) = x. This note focuses on the theoretical structure of GTWED and its implications for extending elastic distances beyond time series, which enables the use of TWED-like metrics on sequences over arbitrary domains such as symbolic data, manifolds, or embeddings.

Keywords

Cite

@article{arxiv.2601.05263,
  title  = {A General Metric-Space Formulation of the Time Warp Edit Distance (TWED)},
  author = {Zhen Yi Lau},
  journal= {arXiv preprint arXiv:2601.05263},
  year   = {2026}
}

Comments

20 pages, 1 algorithm, small technical note on the generalization of the Time Warp Edit Distance (TWED) to arbitrary metric spaces