Applying Transformers for Anomaly Detection in Bus Trajectories - Cruz, Michael; Barbosa, Luciano (Anais da Brazilian Conference on Intelligent Systems (BRACIS), 2024)
Trajectory anomaly detection is essential in understanding traffic behavior, especially when external factors such as congestion, accidents, and poor weather conditions occur. Most of the previous approaches for this task highly rely on handcrafted features and physical trajectory characteristics, which can be costly to calculate in a large volume of data. In this paper, we propose a novel trajectory anomaly detection approach that relies on language modeling to learn well-formed GPS bus trajectories and, based on it, identifies anomalous trajectories and pinpoints their abnormal points (sub-trajectory anomaly detection). Our solution uses a deep generative encoder-decoder Transformer that learns relationships between the sequential points in the trajectories based on the self-attention mechanism. It does not require manual feature extraction and can be easily adapted to any type of trajectory (e.g., cars, people, and vessels). We have performed an extensive experimental evaluation that shows: (1) our approach is effective for both trajectory and sub-trajectory anomaly detection; and (2) it outperforms the baselines in most evaluation scenarios.