Abstract
We consider the sequential anomaly detection problem in the one-class setting when only the anomalous sequences are available and propose an adversarial sequential detector by solving a minimax problem to find an optimal detector against the worst-case sequences from a generator. The generator captures the dependence in sequential events using the marked point process model. The detector sequentially evaluates the likelihood of a test sequence and compares it with a time-varying threshold, also learned from data through the minimax problem. We demonstrate our proposed method's good performance using numerical experiments on simulations and proprietary large-scale credit card fraud datasets. The proposed method can generally apply to detecting anomalous sequences.
Introduction: The Challenge of One-Class Sequential Data
Most anomaly detection algorithms assume the availability of a large pool of "normal" data to learn from. However, in critical fields like financial fraud or cybersecurity, "normal" data is often protected by strict privacy laws or is simply too massive to label effectively. Consequently, researchers frequently only have access to confirmed cases of the anomalies themselves.
Furthermore, events like credit card transactions are inherently sequential and dependent—one transaction influences the likelihood and nature of the next. Existing methods often treat sequences as a whole (offline) or assume events are independent (i.i.d.). This paper bridges this gap by creating an online detector that can flag a sequence as anomalous as soon as enough evidence accumulates, even without having seen "normal" examples during training.
Methods: An Adversarial Approach to Point Processes
The core of the proposed framework is an adversarial approach inspired by Imitation Learning and Generative Adversarial Networks (GANs).
- The Minimax Game: The authors formulate a minimax problem where a Generator produces "counterfeit" sequences that mimic anomalies, while a Detector tries to distinguish real anomalies from these counterfeits. This forces the detector to identify the precise "border region" of the anomaly distribution.
- Marked Hawkes Process with Deep Fourier Kernels: To model the timing and "marks" (e.g., transaction amount, location) of events, the authors use a Hawkes process. To overcome the computational burden of multi-dimensional integration, they employ Bochner’s Theorem to represent the triggering function as a Deep Fourier Kernel. This allows for a closed-form expression of the integral, making the model efficient for real-time use.
- Stochastic LSTM Generator: The generator utilizes an RNN structure with stochastic neurons, allowing it to explore the event space effectively and find "worst-case" sequences to challenge the detector.
- Time-Varying Threshold: Instead of a fixed threshold, the model learns a threshold that evolves as the sequence lengthens, providing tighter control over false alarms as the log-likelihood naturally drifts.
Datasets and Experimental Setup
The model was evaluated on four distinct datasets to test its robustness:
- Singleton & Composite Synthetic: Sequences simulated from basic and complex Hawkes processes.
- Real Credit Card Fraud: A proprietary dataset from a major US department store containing 1,121 fraudulent transaction sequences, including geolocation, time, and amount.
- Robbery Data: 911 call-for-service data from Atlanta (2015–2017), treating specific crime chains as anomalous sequences.
Key Results and Insights
- Superior Accuracy: The proposed Adversarial Imitation Learning (AIL) method consistently achieved higher $F_1$ scores than One-class SVM, Local Outlier Factor (LOF), and other recent IRL-based detectors.
- Early Detection: In the credit card and robbery datasets, the model accurately flagged anomalies significantly earlier in the sequence—often before the 10th event. This lead time is critical for preventing financial loss.
- Robustness to Complexity: On composite synthetic data where anomalies originated from multiple distributions, the AIL method maintained high performance while vanilla Hawkes-based models saw dramatic drops in accuracy.
Conclusion and Future Work
By learning the "detection radius" through the minimization of Maximum Mean Discrepancy (MMD), the model finds the tightest possible envelope around anomalous behavior. While the adversarial training of the generator can be computationally expensive, the use of Fourier kernels ensures the detector remains fast enough for online applications. Future work may involve adapting the generator architecture for specific mark types, such as text or images, and exploring ways to incorporate small amounts of "normal" data when available.
Summary updated