Introduction
Traditional anomaly detection in sequential data, such as GPS trajectories or vehicle paths, typically focuses on identifying statistical outliers or unusual geometric patterns. However, these methods often fail to capture the underlying "intent" of an agent. A detour might appear statistically normal in terms of road usage but can be highly "irrational" given the agent's known destination or typical objectives. This paper proposes an end-to-end framework that shifts the focus from modeling motion to modeling motive using Inverse Reinforcement Learning (IRL).
Problem Statement
The authors identify three primary hurdles in sequential anomaly detection:
- Label Scarcity: High-quality labeled anomaly data is rare in real-world applications.
- Intentionality: Static outlier detection cannot explain why a sequence of actions is abnormal.
- Uncertainty Quantification: Standard deep learning models often provide overconfident point estimates, which can lead to high false-alarm rates in safety-critical systems.
Methodology: Bayesian Inverse Reinforcement Learning
The core of the proposed approach is to treat the observed agent as a reinforcement learning agent. By applying Inverse Reinforcement Learning (IRL), the system learns a reward function $r(s, a)$ that represents "normal" behavior. Actions that fail to maximize this learned reward are flagged as anomalies.
Efficient Uncertainty Estimation
To address model uncertainty without the prohibitive cost of training multiple independent models, the authors utilize a Bootstrap Network. This architecture features a shared backbone with $K$ distinct output heads. Each head is trained on a different bootstrap sample of the data, allowing the model to estimate both a mean reward (the normality score) and the variance (representing model uncertainty).
The system calculates a normality score $n(s, a)$ based on the predicted reward. A refined version, IRL-ADU, incorporates the variance; it only triggers an anomaly alert when the predicted reward is low and the model's confidence in that prediction is high. This "uncertainty filter" significantly reduces false positives on out-of-distribution data that the model simply hasn't encountered before.
Experimental Evaluation
The framework was tested on two large-scale GPS datasets:
- GeoLife GPS Dataset: Over 17,000 trajectories from 182 users. Anomalies were simulated by injecting "alien" trajectories from different users.
- Taxi Service Trajectory (TST) Dataset: Over 1 million taxi trips in Porto. "Long trips" (> 50 mins) were used as anomalies, carefully cropped to match normal trip lengths to prevent the model from relying solely on duration.
Results and Discussion
The proposed IRL-ADU method demonstrated superior performance over traditional baselines like One-Class SVM and deep autoencoders (LSTM-AE). On the GeoLife dataset, IRL-ADU achieved an $F_1$ score of 0.495, a substantial improvement over the 0.312 achieved by the best baseline.
Qualitative Analysis
The model's ability to detect "irrational" behavior is best seen in its handling of partial anomalies. As shown in the figure below, the system successfully identifies detours as anomalies because they are suboptimal paths toward the destination, even if the roads themselves are frequently traveled.
The Bayesian approach provided a notable precision boost, increasing from 0.314 (non-Bayesian IRL-AD) to 0.353 (Bayesian IRL-ADU) on GeoLife, and from 0.924 to 0.936 on the TST dataset.
Conclusion
By modeling the underlying reward function of an agent, this framework provides a more robust and interpretable method for sequential anomaly detection. The integration of a bootstrap-based uncertainty estimate allows the system to filter out false alarms, making it a viable candidate for real-time monitoring in security and transportation contexts. Future work may explore multi-agent environments and more complex state-space representations.
Summary updated