A hybrid CNN-LSTM-transformer model for window-based anomalous transaction detection in financial data

Some of the challenges of financial transaction anomaly detection include the fact that fraud is rare, adaptive and costly to operate. In this study, we propose the novel stacked convolutional neural network-long short-term memory-Transformer (CNN-LSTM-Transformer) model to detect anomalous transactions in a window-based approach and empirically analyze it with the public Credit Card Fraud Detection Dataset 2023. The dataset contains 568,630 anonymized records with 28 principal component analysis (PCA)-transformed features and transaction amount. To provide a conservative assessment, controlled imbalance experiments were conducted at transaction-level fraud prevalence of 10%, 5%, 3%, and 1%. Fraud-if-any labeling was adopted for window-level classification because majority voting suppresses rare fraud events in low-prevalence settings. Under the 1% transaction-level fraud setting with window size 16, and averaged over 10 random seeds, the CNN-LSTM-Transformer achieved 97.07% accuracy, 94.42% precision, 85.70% recall, 89.84% F1-score, 95.32% area under the receiver operating characteristic curve (ROC-AUC), and 90.05% area under the precision-recall curve (PR-AUC). Fair baseline comparisons were conducted by training Logistic Regression, Random Forest, and XGBoost on the same flattened window representation. The CNN-LSTM-Transformer performed on par with XGBoost, with no statistically significant difference in F1-score after multiple-comparison adjustment, while both clearly outperformed Logistic Regression and Random Forest; XGBoost retained a small advantage in PR-AUC and precision, and the CNN-LSTM-Transformer achieved slightly higher recall. The results indicate that gradient-boosted trees remain highly effective on PCA-transformed tabular fraud benchmarks, whereas the neural architecture should be interpreted as a window-based representation-learning approach rather than as proof of deployment-ready chronological behaviour modelling.

Authors

Institutions

Publication Details

Journal
Scientific Reports
Published
2026-08-18
DOI
https://doi.org/10.1038/s41598-026-66165-1
Primary Topic
Imbalanced Data Classification Techniques
Type
article
Field-Weighted Citation Impact
0.00
Controls
|||
ALL TIME
JAN
FEB
MAR
APR
MAY
JUN
JUL
AUG
SEP
OCT
article

A hybrid CNN-LSTM-transformer model for window-based anomalous transaction detection in financial data

Hui Li, Zhongyi Sun, Wenming Cheng, Ruina Zhu
Scientific Reports
Imbalanced Data Classification Techniques
article

A hybrid CNN-LSTM-transformer model for window-based anomalous transaction detection in financial data

Hui Li, Zhongyi Sun, Wenming Cheng, Ruina Zhu
article en

Abstract

Some of the challenges of financial transaction anomaly detection include the fact that fraud is rare, adaptive and costly to operate. In this study, we propose the novel stacked convolutional neural network-long short-term memory-Transformer (CNN-LSTM-Transformer) model to detect anomalous transactions in a window-based approach and empirically analyze it with the public Credit Card Fraud Detection Dataset 2023. The dataset contains 568,630 anonymized records with 28 principal component analysis (PCA)-transformed features and transaction amount. To provide a conservative assessment, controlled imbalance experiments were conducted at transaction-level fraud prevalence of 10%, 5%, 3%, and 1%. Fraud-if-any labeling was adopted for window-level classification because majority voting suppresses rare fraud events in low-prevalence settings. Under the 1% transaction-level fraud setting with window size 16, and averaged over 10 random seeds, the CNN-LSTM-Transformer achieved 97.07% accuracy, 94.42% precision, 85.70% recall, 89.84% F1-score, 95.32% area under the receiver operating characteristic curve (ROC-AUC), and 90.05% area under the precision-recall curve (PR-AUC). Fair baseline comparisons were conducted by training Logistic Regression, Random Forest, and XGBoost on the same flattened window representation. The CNN-LSTM-Transformer performed on par with XGBoost, with no statistically significant difference in F1-score after multiple-comparison adjustment, while both clearly outperformed Logistic Regression and Random Forest; XGBoost retained a small advantage in PR-AUC and precision, and the CNN-LSTM-Transformer achieved slightly higher recall. The results indicate that gradient-boosted trees remain highly effective on PCA-transformed tabular fraud benchmarks, whereas the neural architecture should be interpreted as a window-based representation-learning approach rather than as proof of deployment-ready chronological behaviour modelling.

Scientific Reports
Hubei University of Automotive Technology (CN), Henan University of Economic and Law (CN)
Peace, Justice and strong institutions
Openalex Percentile: Top 7%
Imbalanced Data Classification Techniques
AI Navigator

Ask Laika to Summarize, Analyze, and Connect papers live on the map.

Summarize Papers & Methodologies

Extract key findings, datasets, and comparative methods across publications.

Benchmark Rankings & Visual Analytics

Rank top research institutions, authors, funders, topics, and journals by Field-Weighted Citation Impact (FWCI) and paper volume with instant charts.

Connect Distant Disciplines

Bridge topological clusters on the map to find hidden collaborative intersections.