Table of Contents
Fetching ...

CausalTAD: Causal Implicit Generative Model for Debiased Online Trajectory Anomaly Detection

Wenbin Li, Di Yao, Chang Gong, Xiaokai Chu, Quanliang Jing, Xiaolei Zhou, Yuxuan Zhang, Yunxia Fan, Jingping Bi

TL;DR

This work addresses online trajectory anomaly detection under distribution shifts caused by road-network preference, proposing a causal implicit generative model, CausalTAD. By applying do-calculus to estimate $P(\bm{T}|do(\bm{C}))$, the method debiases trajectory likelihoods with two VAEs: TG-VAE for the trajectory–SD pair likelihood and RP-VAE for per-road scaling factors. The approach delivers improved performance on both in-distribution and especially out-of-distribution SD pairs, while maintaining online efficiency with $\mathcal{O}(1)$ updates per new road segment and precomputed scaling terms. This enables robust, real-time anomaly detection in ride-hailing contexts and demonstrates the value of causal modeling for out-of-distribution generalization in trajectory data.

Abstract

Trajectory anomaly detection, aiming to estimate the anomaly risk of trajectories given the Source-Destination (SD) pairs, has become a critical problem for many real-world applications. Existing solutions directly train a generative model for observed trajectories and calculate the conditional generative probability $P({T}|{C})$ as the anomaly risk, where ${T}$ and ${C}$ represent the trajectory and SD pair respectively. However, we argue that the observed trajectories are confounded by road network preference which is a common cause of both SD distribution and trajectories. Existing methods ignore this issue limiting their generalization ability on out-of-distribution trajectories. In this paper, we define the debiased trajectory anomaly detection problem and propose a causal implicit generative model, namely CausalTAD, to solve it. CausalTAD adopts do-calculus to eliminate the confounding bias of road network preference and estimates $P({T}|do({C}))$ as the anomaly criterion. Extensive experiments show that CausalTAD can not only achieve superior performance on trained trajectories but also generally improve the performance of out-of-distribution data, with improvements of $2.1\% \sim 5.7\%$ and $10.6\% \sim 32.7\%$ respectively.

CausalTAD: Causal Implicit Generative Model for Debiased Online Trajectory Anomaly Detection

TL;DR

This work addresses online trajectory anomaly detection under distribution shifts caused by road-network preference, proposing a causal implicit generative model, CausalTAD. By applying do-calculus to estimate , the method debiases trajectory likelihoods with two VAEs: TG-VAE for the trajectory–SD pair likelihood and RP-VAE for per-road scaling factors. The approach delivers improved performance on both in-distribution and especially out-of-distribution SD pairs, while maintaining online efficiency with updates per new road segment and precomputed scaling terms. This enables robust, real-time anomaly detection in ride-hailing contexts and demonstrates the value of causal modeling for out-of-distribution generalization in trajectory data.

Abstract

Trajectory anomaly detection, aiming to estimate the anomaly risk of trajectories given the Source-Destination (SD) pairs, has become a critical problem for many real-world applications. Existing solutions directly train a generative model for observed trajectories and calculate the conditional generative probability as the anomaly risk, where and represent the trajectory and SD pair respectively. However, we argue that the observed trajectories are confounded by road network preference which is a common cause of both SD distribution and trajectories. Existing methods ignore this issue limiting their generalization ability on out-of-distribution trajectories. In this paper, we define the debiased trajectory anomaly detection problem and propose a causal implicit generative model, namely CausalTAD, to solve it. CausalTAD adopts do-calculus to eliminate the confounding bias of road network preference and estimates as the anomaly criterion. Extensive experiments show that CausalTAD can not only achieve superior performance on trained trajectories but also generally improve the performance of out-of-distribution data, with improvements of and respectively.

Paper Structure

This paper contains 38 sections, 22 equations, 8 figures, 3 tables.

Figures (8)

  • Figure 1: (a) The causal graph of trajectory generation. $\bm{E}$ is the common cause of $\bm{C}$ and $\bm{T}$, which introduces the confounding bias. (b) An example to illustrate the road preference bias.
  • Figure 2: (a) An example of the causal graph. (b) The causal graph after an intervention.
  • Figure 3: Overview of the CausalTAD. Upper-left: TG-VAE models the patterns of trajectories for each SD pair and estimates the likelihood for the tuple $(\bm{T}, \bm{C})$. Lower-left: RP-VAE factorizes the debiasing scaling factor to each road segment and estimates it via variational inference. Right: The debiased anomaly score can be calculated according to the likelihood estimated by TG-VAE and the scaling factor estimated by RP-VAE.
  • Figure 4: The anomaly scores of a normal trajectory with an unseen SD pair estimated by (a) VSAE and (b) CausalTAD.
  • Figure 5: Performance under different ratios of distribution shift. (a) The ROC-AUC on Detour dataset of Xi'an. (b) The PR-AUC on Detour dataset of Xi'an.
  • ...and 3 more figures