Abstract
Many online applications, such as online social networks or knowledge bases, are often attacked by malicious users who commit different types of actions such as vandalism on Wikipedia or fraudulent reviews on eBay. Currently, most of the fraud detection approaches require a training dataset that contains records of both benign and malicious users. However, in practice, there are often no or very few records of malicious users. In this paper, we develop one-class adversarial nets (OCAN) for fraud detection with only benign users as training data. OCAN first uses LSTM-Autoencoder to learn the representations of benign users from their sequences of online activities. It then detects malicious users by training a discriminator of a complementary GAN model that is different from the regular GAN model. Experimental results show that our OCAN outperforms the state-of-the-art one-class classification models and achieves comparable performance with the latest multi-source LSTM model that requires both benign and malicious users in the training phase.
Introduction
In the world of cybersecurity and online integrity, fraud detection is a constant cat-and-mouse game. Traditionally, building a fraud detector requires a balanced diet of data: plenty of examples of "good" behavior and plenty of examples of "bad" behavior. But in the real world, malicious data is often rare, unlabeled, or constantly changing. This creates a "data scarcity trap" where supervised models struggle to keep up with emerging threats.
Existing one-class classification (OCC) methods, like One-Class SVMs, attempt to draw a boundary around "normal" data. However, these methods often struggle with complex, sequential data—such as a user's clickstream—and frequently require manual feature engineering or arbitrary threshold tuning. To address these challenges, the OCAN framework proposes a novel approach: training a model to understand "normal" so well that it can imagine what "abnormal" looks like.
Methodology: The OCAN Framework
OCAN (One-Class Adversarial Nets) operates in two distinct phases to transform raw user activity into a robust fraud detection signal.
Phase 1: Representation Learning
Fraud is rarely a single isolated action; it is typically a sequence of behaviors. OCAN uses an LSTM-Autoencoder to ingest sequences of user activities ($x_1, x_2, ..., x_T$) and compress them into a fixed-length hidden representation ($h_T^{en}$). By training the autoencoder to reconstruct these sequences, the model learns the essential features of benign behavior without requiring any malicious labels.
Phase 2: The Complementary GAN
The core innovation of OCAN is the Complementary Generative Adversarial Network. In a standard GAN, the generator ($G$) tries to mimic real data perfectly to fool the discriminator ($D$). In OCAN, however, the generator is trained to produce "complementary" samples—data points that reside in the low-density regions of the benign feature space.
Essentially, the generator "fills in the gaps" where benign users are not found, creating a synthetic proxy for malicious behavior. The discriminator is then trained to separate real benign users from these generated complementary users. Because the generated samples occupy the space where malicious users are likely to reside, the discriminator becomes a highly effective fraud detector.
Experimental Evaluation
The researchers evaluated OCAN using the UMDWikipedia dataset, which tracks user edit history to identify vandals. The dataset included approximately 770,000 edits over 19 months. After preprocessing for sequence length (4 to 50 edits), the final dataset comprised roughly 10,500 benign users and 11,500 vandals. Features included metadata such as edit type, time intervals, and revert status.
Key Results
OCAN was tested against traditional one-class baselines (OCNN, OCGP, OCSVM) and a state-of-the-art supervised model (M-LSTM).
- Superiority in One-Class Tasks: OCAN achieved an F1-score of 0.9010, significantly outperforming OCSVM (0.7789) and other traditional methods.
- Rivaling Supervised Models: Remarkably, OCAN (trained on zero malicious samples) achieved performance comparable to the supervised M-LSTM model even when the latter was trained on 7,000 malicious samples.
- Robustness to Data Scarcity: When the supervised M-LSTM was limited to only a few hundred malicious samples, its performance dropped sharply. OCAN remained steady, proving its value in data-poor environments.
- Early Detection: OCAN demonstrated the ability to flag users as vandals after only a few actions, often before their sequence of edits was complete.
Conclusion
OCAN represents a significant step forward in fraud detection by "imagining the enemy." By generating complementary samples to train a discriminator, it bypasses the need for expensive and rare malicious labels. While OCAN is powerful, it assumes that malicious behavior is "complementary" to benign behavior. Future work may explore its effectiveness against "stealth attacks" that mimic normal behavior more closely, as well as its application in other domains like credit card fraud or social media bot detection.
Summary updated