SAFE: A Neural Survival Analysis Model for Fraud Early Detection

Panpan Zheng, Shuhan Yuan, Xintao Wu

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.

Comparison of classification-based vs. survival analysis-based approaches, highlighting the consistency of the latter.

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.

The SAFE model architecture: RNNs process time-varying covariates to output hazard rates, which are then used to calculate monotonic survival probabilities.

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

Abstract

Many online platforms have deployed anti-fraud systems to detect and prevent fraudulent activities. However, there is usually a gap between the time that a user commits a fraudulent action and the time that the user is suspended by the platform. How to detect fraudsters in time is a challenging problem. Most of the existing approaches adopt classifiers to predict fraudsters given their activity sequences along time. The main drawback of classification models is that the prediction results between consecutive timestamps are often inconsistent. In this paper, we propose a survival analysis based fraud early detection model, SAFE, which maps dynamic user activities to survival probabilities that are guaranteed to be monotonically decreasing along time. SAFE adopts recurrent neural network (RNN) to handle user activity sequences and directly outputs hazard values at each timestamp, and then, survival probability derived from hazard values is deployed to achieve consistent predictions. Because we only observe the user suspended time instead of the fraudulent activity time in the training data, we revise the loss function of the regular survival model to achieve fraud early detection. Experimental results on two real world datasets demonstrate that SAFE outperforms both the survival analysis model and recurrent neural network model alone as well as state-of-theart fraud early detection approaches.
BibTeX
@inproceedings{zheng2019safe,
  author = {Panpan Zheng and Shuhan Yuan and Xintao Wu},
  title = {{SAFE: A Neural Survival Analysis Model for Fraud Early Detection}},
  booktitle = {AAAI Conference on Artificial Intelligence},
  year = {2019},
  url = {https://openreview.net/forum?id=ofJgUoJIrcI},
}
Figure