A Robust Hybrid Temporal Deep Learning Framework with Attention Mechanism for Online Payment Fraud Detection
Keywords:
Online payment fraud, deep learning, TCNN, LSTM, attention mechanism, class imbalance.Abstract
With increasing use of digital payment systems there has been a rise in frequency and complexity of fraudulent financial transactions. As a result there is a need for more precise and robust mechanisms of detecting this. In this study a hybrid deep learning approach is proposed using a temporal convolutional neural network, long short-term memory network and attention mechanism to detect fraud in online payments. The proposed model combines one-dimensional convolution for localized feature extraction, LSTM-based dependency modelling, and attention-based weighting to emphasize transaction representations that contribute most strongly to fraud classification. The dataset was preprocessed through selection of fraud-relevant transaction types, one-hot encoding of categorical variables, standardization of numerical attributes, and missing-value inspection. Class-weighted learning was employed to reduce the bias caused by the highly imbalanced distribution of legitimate and fraudulent transactions. The model was implemented using Python, TensorFlow, and Keras and evaluated using accuracy, precision, recall, F1-score, confusion matrix, and receiver operating characteristic analysis. Experimental results yielded an evaluation accuracy of 94.20% and an ROC-AUC of 0.9989. The model correctly identified 1,638 of 1,643 fraudulent transactions, achieving a fraud recall of 99.70% and a false-negative rate of 0.30%. However, fraud precision was limited to 4.85% because of a comparatively high number of false-positive predictions. These findings demonstrate strong fraud-detection sensitivity while highlighting the need for classification-threshold calibration and false-positive reduction before practical deployment.





