Abstract
Online platforms face a significant challenge in detecting fraudulent activities promptly. A notable gap often exists between the initiation of fraudulent behavior and the eventual suspension of the user. Traditional classification-based approaches frequently produce inconsistent predictions over time, where a user's status might fluctuate between "normal" and "fraudulent." This paper introduces SAFE (Survival Analysis based Fraud Early detection), a novel model that integrates Recurrent Neural Networks (RNNs) with survival analysis. SAFE maps dynamic user activities to survival probabilities that are mathematically guaranteed to be monotonically decreasing, ensuring consistent risk assessment. By revising the standard survival loss function, SAFE is specifically optimized for early detection. Evaluations on Twitter and Wikipedia datasets demonstrate that SAFE significantly outperforms state-of-the-art classification and survival models in both accuracy and lead time.
The Problem: Inconsistency and Detection Gaps
Most existing anti-fraud systems rely on classifiers that analyze activity sequences. However, these models often treat timestamps independently, leading to "flip-flopping" predictions. A user might be flagged as a fraudster at one moment and cleared the next, complicating the decision-making process for moderators. Furthermore, training data typically only contains the "suspension time" (the late response) rather than the "start-of-fraud time," making it difficult for standard models to bridge the gap for true early detection.
The SAFE Framework
To address these issues, SAFE treats fraud detection as a "time-to-event" problem. The model architecture combines the temporal modeling capabilities of RNNs with the rigorous framework of survival analysis.
1. RNN for Hazard Rates
SAFE utilizes Gated Recurrent Units (GRUs) to process sequences of user features (e.g., tweet frequency, edit patterns). Instead of a binary label, the RNN outputs a hazard rate ($\lambda_t$) at each timestamp, representing the instantaneous risk of the "event" (suspension) occurring.
2. Monotonic Survival Probability
These hazard rates are transformed into a survival probability ($S_t$). By definition, the survival function ensures that the probability of being "innocent" is monotonically decreasing over time. This eliminates the ad-hoc nature of RNN-based classifiers and provides a stable indicator for moderators.
3. Early Detection Loss
Standard survival models aim to predict the exact time of an event. SAFE introduces a core innovation by modifying the loss function to intentionally increase the hazard rates of fraudsters before they are actually suspended. This "pushes" the model to identify suspicious patterns as early as possible.
Experimental Results
The model was evaluated on two real-world datasets: Twitter (51,608 users) and Wiki (1,759 users). SAFE consistently outperformed baselines like SVM, Cox Proportional Hazards (CPH), and Multi-source LSTM (M-LSTM):
- Early Accuracy: On the Twitter dataset, SAFE achieved an accuracy of ~71.8% within the first five timestamps, compared to ~57.5% for M-LSTM.
- Lead Time: SAFE was able to detect fraudsters in certain groups up to 9 timestamps ahead of their actual suspension.
- Detection Rate: For users suspended at the 12th timestamp, SAFE correctly flagged 92% of them early, while the leading classification baseline only caught 54%.
Conclusion
By framing fraud detection through the lens of survival analysis, SAFE provides a theoretically grounded and practically effective solution to the problem of inconsistent and delayed detection. The integration of RNNs allows the model to learn complex temporal patterns without assuming a fixed statistical distribution, making it highly adaptable to various online platforms.
Summary updated