Abstract
Detecting fraudulent transactions in real-time is a critical challenge for fintech platforms. While standard sequence models capture the order of events, they often ignore the continuous time intervals between actions, which are highly informative of user intent. This paper presents a novel fraud detection framework developed by researchers at Ant Financial. The system combines static user profiles with dynamic behavior sequences through a specialized time-attention mechanism. Evaluated on large-scale real-world data from Alipay, the proposed model significantly outperforms traditional baselines in Recall at Top Percent (RATP), effectively catching more fraud while minimizing legitimate user friction.
Introduction
Fraud detection in online payments is a "needle in a haystack" problem characterized by massive data volumes and extreme class imbalance. Traditional systems rely on static features or manually engineered behavioral features. However, the "rhythm" of user behavior—the irregular time intervals between actions—is a vital signal often missed by standard Recurrent Neural Networks (RNNs). For instance, three purchases in a minute represent a different risk profile than three purchases in a month. This paper addresses this gap by explicitly modeling continuous time intervals using an attention-based approach, identifying specific historical moments most indicative of risk.
Methodology
The proposed framework employs a hybrid architecture to process heterogeneous data sources, including demographic profiles, click behavior, and transaction history.
Static and Dynamic Feature Integration
- Static Feature Representation: Demographic data is processed using Gradient Boosting Decision Trees (GBDT). The leaf node indices are extracted as "tree embeddings" to be fed into the neural network.
- Dynamic Behavior Modeling: The system tracks sequences of app interactions (click behavior) and transaction history.
- Time Attention Layer: This core innovation discretizes raw time intervals ($\Delta t$) into an embedding space. Unlike standard attention, this layer calculates weights by combining RNN hidden states with these time embeddings, allowing the model to weight actions based on their temporal context.
- Unified Framework: Static and dynamic embeddings are processed through Batch Normalization and concatenated into a final Multi-Layer Perceptron (MLP) to generate a fraud score.
Experimental Setup
The model was evaluated using five months of real-world transaction data from Alipay, involving millions of sequences. To simulate real-world temporal shifts, the first three months were used for training, the fourth for validation, and the final month for testing. The test set reflects the actual online environment, where fraud is extremely rare (e.g., 135 fraud cases vs. 1.3 million non-fraud cases).
Results and Discussion
The primary evaluation metric is Recall@Top% (RATP), which measures the proportion of fraud detected when only a tiny fraction (e.g., 0.05%) of the most suspicious transactions are flagged. This metric is crucial for industry applications where minimizing user friction is paramount.
The Bi-LSTM + Time Attention model achieved a [email protected]% of 0.864, a significant improvement over the GBDT baseline of 0.807. As shown in the performance analysis, the time-attention models not only reach higher peak performance but also converge faster during training compared to standard RNN variants like LSTM or GRU.
Key insights include:
- Time as a Signal: Fraudulent behavior often exhibits "burstiness" or mechanical regularity that differs from human patterns, making time regularity highly informative.
- Attention over Gating: Using time to weight the importance of steps via attention provides a more effective representation for fraud than using time to gate information flow within RNN cells.
Conclusion
The time-attention based framework offers a robust solution for real-time fraud detection by leveraging the temporal dynamics of user behavior. While the model relies on historical data and introduces some computational overhead, its superior performance in high-precision regions makes it highly suitable for large-scale fintech ecosystems. Future work will focus on addressing cold-start scenarios for new users and optimizing the system for even lower latency in production environments.
Summary updated