Table of Contents
Fetching ...

CroTad: A Contrastive Reinforcement Learning Framework for Online Trajectory Anomaly Detection

Rui Xue, Dan He, Fengmei Jin, Chen Zhang, Xiaofang Zhou

TL;DR

CroTad presents a threshold-free, self-supervised framework for online sub-trajectory anomaly detection in ITS by marrying contrastive sequence representations with a biased-reward deep Q-network detector. The core innovations include a hierarchical graph-based trajectory representation, STSC and IIC contrastive pre-training, sub-trajectory reconstruction, and an online RL detector capable of fine-grain, real-time anomaly scoring. Empirical results on Porto and Translink demonstrate superior point-level detection and robust denoising, with strong interpretability via clustering visuals and route-aware embeddings. The approach reduces reliance on labeled data and manually tuned thresholds, improving adaptability to diverse routing patterns and noisy, irregularly sampled trajectory data.

Abstract

Detecting trajectory anomalies is a vital task in modern Intelligent Transportation Systems (ITS), enabling the identification of unsafe, inefficient, or irregular travel behaviours. While deep learning has emerged as the dominant approach, several key challenges remain unresolved. First, sub-trajectory anomaly detection, capable of pinpointing the precise segments where anomalies occur, remains underexplored compared to whole-trajectory analysis. Second, many existing methods depend on carefully tuned thresholds, limiting their adaptability in real-world applications. Moreover, the irregular sampling of trajectory data and the presence of noise in training sets further degrade model performance, making it difficult to learn reliable representations of normal routes. To address these challenges, we propose a contrastive reinforcement learning framework for online trajectory anomaly detection, CroTad. Our method is threshold-free and robust to noisy, irregularly sampled data. By incorporating contrastive learning, CroTad learns to extract diverse normal travel patterns for different itineraries and effectively distinguish anomalous behaviours at both sub-trajectory and point levels. The detection module leverages deep reinforcement learning to perform online, real-time anomaly scoring, enabling timely and fine-grained identification of abnormal segments. Extensive experiments on two real-world datasets demonstrate the effectiveness and robustness of our framework across various evaluation scenarios.

CroTad: A Contrastive Reinforcement Learning Framework for Online Trajectory Anomaly Detection

TL;DR

CroTad presents a threshold-free, self-supervised framework for online sub-trajectory anomaly detection in ITS by marrying contrastive sequence representations with a biased-reward deep Q-network detector. The core innovations include a hierarchical graph-based trajectory representation, STSC and IIC contrastive pre-training, sub-trajectory reconstruction, and an online RL detector capable of fine-grain, real-time anomaly scoring. Empirical results on Porto and Translink demonstrate superior point-level detection and robust denoising, with strong interpretability via clustering visuals and route-aware embeddings. The approach reduces reliance on labeled data and manually tuned thresholds, improving adaptability to diverse routing patterns and noisy, irregularly sampled trajectory data.

Abstract

Detecting trajectory anomalies is a vital task in modern Intelligent Transportation Systems (ITS), enabling the identification of unsafe, inefficient, or irregular travel behaviours. While deep learning has emerged as the dominant approach, several key challenges remain unresolved. First, sub-trajectory anomaly detection, capable of pinpointing the precise segments where anomalies occur, remains underexplored compared to whole-trajectory analysis. Second, many existing methods depend on carefully tuned thresholds, limiting their adaptability in real-world applications. Moreover, the irregular sampling of trajectory data and the presence of noise in training sets further degrade model performance, making it difficult to learn reliable representations of normal routes. To address these challenges, we propose a contrastive reinforcement learning framework for online trajectory anomaly detection, CroTad. Our method is threshold-free and robust to noisy, irregularly sampled data. By incorporating contrastive learning, CroTad learns to extract diverse normal travel patterns for different itineraries and effectively distinguish anomalous behaviours at both sub-trajectory and point levels. The detection module leverages deep reinforcement learning to perform online, real-time anomaly scoring, enabling timely and fine-grained identification of abnormal segments. Extensive experiments on two real-world datasets demonstrate the effectiveness and robustness of our framework across various evaluation scenarios.

Paper Structure

This paper contains 42 sections, 21 equations, 4 figures, 4 tables.

Figures (4)

  • Figure 1: Overall framework of CroTad.
  • Figure 2: Window analysis on Porto dataset at point level.
  • Figure 3: Sub-trajectory anomaly detection showcases on Translink. Black lines are reference routes, blue lines denote normal sub-trajectories, and red dashed lines are anomalous sub-trajectories.
  • Figure 4: Showcases of clustering results and extracted routes of different OD pairs on Translink and Porto by CroTad.

Theorems & Definitions (2)

  • definition thmcounterdefinition: Trajectory
  • definition thmcounterdefinition: H3-index Cell