Abstract
Credit card fraud detection is a challenging task since fraudulent actions are hidden in massive legitimate behaviors. This work aims to learn a new representation for each transaction record based on the historical transactions of users in order to capture fraudulent patterns accurately and, thus, automatically detect a fraudulent transaction. We propose a novel model by improving long short-term memory with a time-aware gate that can capture the behavioral changes caused by consecutive transactions of users. A current-historical attention module is designed to build up connections between current and historical transactional behaviors, which enables the model to capture behavioral periodicity. An interaction module is designed to learn comprehensive and rational behavioral representations. To validate the effectiveness of the learned behavioral representations, experiments are conducted on a large real-world transaction dataset provided to us by a financial company in China, as well as a public dataset. Experimental results and the visualization of the learned representations illustrate that our method delivers a clear distinction between legitimate behaviors and fraudulent ones, and achieves better fraud detection performance compared with the state-of-the-art methods.
1. Introduction
Credit card fraud represents a significant challenge in financial security, with global losses reaching tens of billions of dollars annually. Fraudsters have become increasingly adept at mimicking legitimate user behaviors, making detection a "needle in a haystack" problem. Traditional detection systems often rely on static snapshots of individual transactions or standard sequence models like LSTMs. However, these approaches frequently fail to account for irregular time intervals between transactions and the periodic nature of human behavior. This research introduces a sophisticated architecture designed to identify fraudulent activity by analyzing the temporal dynamics and behavioral "tempo" of transaction sequences.
2. Methodology: The TH-LSTM Model
The proposed TH-LSTM (Time-aware Historical-attention-based LSTM) model is designed to bridge the gap in existing sequence models by incorporating three innovative components:
- Time-aware Gate: Unlike standard LSTMs that assume uniform time steps, this gate uses the time delta ($\Delta T$) between transactions to control information flow. It adjusts the influence of historical states based on elapsed time, reflecting how human behavior evolves over varying intervals.
- Current-Historical Attention Module: This module identifies periodic patterns by calculating attention weights across a window of previous transactions. It effectively captures the "regularity" of a user's habits.
- Interaction Module: This final stage fuses current transaction features with historical context and learned behavioral representations into a comprehensive vector for classification.
3. Experimental Evaluation
3.1 Datasets
The model was validated using two significant sources:
- Real-world Financial Dataset: 5.12 million online transaction records from over 107,000 users, provided by a Chinese financial institution.
- Public Dataset: The ULB credit card fraud dataset containing 284,807 transactions from European cardholders.
3.2 Behavioral Insights
The analysis revealed a clear behavioral divide between legitimate and fraudulent users. Legitimate users exhibit strong periodicity—regular habits at specific times—whereas fraudulent activity is characterized by high intensity, often involving dense clusters of transactions in short windows to maximize gain before a card is blocked.
3.3 Key Results
TH-LSTM was benchmarked against 11 other methods, including GRUs, Bi-RNNs, and specialized architectures like A-CNN and HOBA.
- Performance: On the real-world dataset, TH-LSTM achieved an Average Precision ($P_r$) of 0.880 and an AUC of 0.944, consistently outperforming all other methods.
- Precision-Recall Balance: The model maintained a high F1-score (0.881 average), demonstrating a superior ability to catch fraud while minimizing false alarms for legitimate customers.
- Efficiency: Despite its complexity, the model's inference speed was recorded at 0.027 ms per transaction, making it suitable for real-time production environments.
4. Conclusion and Future Work
TH-LSTM demonstrates that treating time as a controller for neural memory significantly improves fraud detection. While the model excels at capturing behavioral periodicity and intensity, future work will address the "cold-start" problem for new users with limited history and explore the architecture's generalizability to other domains, such as telecom or insurance fraud. Additionally, improving the interpretability of the attention mechanisms remains a priority for assisting human investigators.
Summary updated