Table of Contents
Fetching ...

Towards Robust Trajectory Embedding for Similarity Computation: When Triangle Inequality Violations in Distance Metrics Matter

Jianing Si, Haitao Yuan, Nan Jiang, Minxiao Chen, Xiao Ma, Shangguang Wang

TL;DR

This work tackles the challenge that Euclidean trajectory embeddings and their distance measures can violate triangle inequality, impairing similarity computations. It introduces the LH-plugin, a model-agnostic framework that maps Euclidean trajectory embeddings into hyperbolic space to use the Lorentz distance $d_{Lo}$, complemented by a Cosh projection and a Dynamic Fusion Distance that adaptively blends $d_{Lo}$ with Euclidean distance $d_{Eu}$. The authors prove the non-diminishment property of the Lorentz distance under the Cosh projection and demonstrate substantial accuracy gains, efficiency, and robustness across multiple real-world datasets and embedding models. The framework offers a practical, plug-and-play enhancement for trajectory similarity learning with strong empirical support and scalable performance.

Abstract

Trajectory similarity is a cornerstone of trajectory data management and analysis. Traditional similarity functions often suffer from high computational complexity and a reliance on specific distance metrics, prompting a shift towards deep representation learning in Euclidean space. However, existing Euclidean-based trajectory embeddings often face challenges due to the triangle inequality constraints that do not universally hold for trajectory data. To address this issue, this paper introduces a novel approach by incorporating non-Euclidean geometry, specifically hyperbolic space, into trajectory representation learning. We present the first-ever integration of hyperbolic space to resolve the inherent limitations of the triangle inequality in Euclidean embeddings. In particular, we achieve it by designing a Lorentz distance measure, which is proven to overcome triangle inequality constraints. Additionally, we design a model-agnostic framework LH-plugin to seamlessly integrate hyperbolic embeddings into existing representation learning pipelines. This includes a novel projection method optimized with the Cosh function to prevent the diminishment of distances, supported by a theoretical foundation. Furthermore, we propose a dynamic fusion distance that intelligently adapts to variations in triangle inequality constraints across different trajectory pairs, blending Lorentzian and Euclidean distances for more robust similarity calculations. Comprehensive experimental evaluations demonstrate that our approach effectively enhances the accuracy of trajectory similarity measures in state-of-the-art models across multiple real-world datasets. The LH-plugin not only addresses the triangle inequality issues but also significantly refines the precision of trajectory similarity computations, marking a substantial advancement in the field of trajectory representation learning.

Towards Robust Trajectory Embedding for Similarity Computation: When Triangle Inequality Violations in Distance Metrics Matter

TL;DR

This work tackles the challenge that Euclidean trajectory embeddings and their distance measures can violate triangle inequality, impairing similarity computations. It introduces the LH-plugin, a model-agnostic framework that maps Euclidean trajectory embeddings into hyperbolic space to use the Lorentz distance , complemented by a Cosh projection and a Dynamic Fusion Distance that adaptively blends with Euclidean distance . The authors prove the non-diminishment property of the Lorentz distance under the Cosh projection and demonstrate substantial accuracy gains, efficiency, and robustness across multiple real-world datasets and embedding models. The framework offers a practical, plug-and-play enhancement for trajectory similarity learning with strong empirical support and scalable performance.

Abstract

Trajectory similarity is a cornerstone of trajectory data management and analysis. Traditional similarity functions often suffer from high computational complexity and a reliance on specific distance metrics, prompting a shift towards deep representation learning in Euclidean space. However, existing Euclidean-based trajectory embeddings often face challenges due to the triangle inequality constraints that do not universally hold for trajectory data. To address this issue, this paper introduces a novel approach by incorporating non-Euclidean geometry, specifically hyperbolic space, into trajectory representation learning. We present the first-ever integration of hyperbolic space to resolve the inherent limitations of the triangle inequality in Euclidean embeddings. In particular, we achieve it by designing a Lorentz distance measure, which is proven to overcome triangle inequality constraints. Additionally, we design a model-agnostic framework LH-plugin to seamlessly integrate hyperbolic embeddings into existing representation learning pipelines. This includes a novel projection method optimized with the Cosh function to prevent the diminishment of distances, supported by a theoretical foundation. Furthermore, we propose a dynamic fusion distance that intelligently adapts to variations in triangle inequality constraints across different trajectory pairs, blending Lorentzian and Euclidean distances for more robust similarity calculations. Comprehensive experimental evaluations demonstrate that our approach effectively enhances the accuracy of trajectory similarity measures in state-of-the-art models across multiple real-world datasets. The LH-plugin not only addresses the triangle inequality issues but also significantly refines the precision of trajectory similarity computations, marking a substantial advancement in the field of trajectory representation learning.

Paper Structure

This paper contains 25 sections, 6 theorems, 35 equations, 8 figures, 6 tables.

Key Result

Lemma 4

$\forall\mathbf{a},\mathbf{b}\in \mathcal{H}(\beta)$, $\mathbf{d}_{Lo}(\mathbf{a},\mathbf{b})\geq 0$, and $\mathbf{d}_{Lo}(\mathbf{a},\mathbf{b})=0$ only when $\mathbf{a}=\mathbf{b}$.

Figures (8)

  • Figure 1: Embedding Accuracy v.s. Triangle Inequality Violation
  • Figure 2: An Example of Triangle Inequality Contradiction
  • Figure 3: The Framework Overview of LH-plugin
  • Figure 4: The comparison between Vanilla Hyperbolic Projection and Cosh Hyperbolic Projection
  • Figure 5: RVS Distribution Comparison: Capabilities of Unconstraint from the Triangle Inequality
  • ...and 3 more figures

Theorems & Definitions (13)

  • Example 1
  • Definition 2: Hyperbolic Space
  • Definition 3: Lorentz Distance
  • Lemma 4
  • Lemma 5
  • Theorem 6
  • Theorem 7
  • Theorem 8
  • Theorem 9
  • Definition 10: Ratio of Violation
  • ...and 3 more