Source-linked AI summary

Financial Fraud Detection Using Explainable AI and Stacking Ensemble Methods

Fahad Almalki, Mehedi Masud

arXiv:2505.10050v1cs.LGcs.AI

TL;DR

The paper addresses the tension between fraud-detection accuracy and interpretable decisions. It combines stacking with XAI techniques and reports strong metrics, including precision and recall of 0.99 and AUC-ROC of 0.99.

  • Problem

    Fraud-detection models can prioritize accuracy over transparency, while institutions need understandable explanations to address trust and regulatory concerns.

    Source: §1 · p. 2
  • Method

    The paper combines a stacking ensemble with XAI, using SHAP for feature selection and explanation tools including LIME and Permutation Importance.

    Source: §3.6 · p. 14, §5 · p. 25
  • Results

    Precision and recall reached 0.99, with an equally high F1-score and AUC-ROC of 0.99; the framework outperformed many conventional and advanced models.

    Source: §5 · p. 25
  • Takeaways & Limitations

    The study concludes that high accuracy and interpretability can be combined in a fraud-detection framework described as trustworthy in practice.

    Source: §5 · p. 26

    Stacking models are harder to understand, take longer to train, and risk overfitting, especially when many layers are used.

    Source: §2.2 · p. 5

Abstract

from arXiv · show

Traditional machine learning models often prioritize predictive accuracy, often at the expense of model transparency and interpretability. The lack of transparency makes it difficult for organizations to comply with regulatory requirements and gain stakeholders trust. In this research, we propose a fraud detection framework that combines a stacking ensemble of well-known gradient boosting models: XGBoost, LightGBM, and CatBoost. In addition, explainable artificial intelligence (XAI) techniques are used to enhance the transparency and interpretability of the model's decisions. We used SHAP (SHapley Additive Explanations) for feature selection to identify the most important features. Further efforts were made to explain the model's predictions using Local Interpretable Model-Agnostic Explanation (LIME), Partial Dependence Plots (PDP), and Permutation Feature Importance (PFI). The IEEE-CIS Fraud Detection dataset, which includes more than 590,000 real transaction records, was used to evaluate the proposed model. The model achieved a high performance with an accuracy of 99% and an AUC-ROC score of 0.99, outperforming several recent related approaches. These results indicate that combining high prediction accuracy with transparent interpretability is possible and could lead to a more ethical and trustworthy solution in financial fraud detection.

1 Introduction

Fraud detection needs models that combine predictive performance with explanations stakeholders and regulators can understand. The paper proposes a stacked ensemble paired with XAI techniques to address this need.

1 Introduction

  • Black-box decisions raise trust and ethical concerns, while financial institutions face regulatory pressure to provide clear reasons for automated decisions [3].The introduction also notes that only 22% of businesses used AI for fraud prevention in 2023.Source: §1 · p. 2
  • Prior work identifies a tension between predictive performance and interpretability, and describes SHAP and LIME as tools for explaining feature influence,.A prior stacked ensemble combining Random Forest, AdaBoost, and GBDT reportedly detected fraud more effectively than any individual model.Source: §1 · pp. 2–3
  • This study proposes a stacking ensemble combined with XAI tools as a practical fraud-detection approach intended to pair high performance with interpretability.Source: §1 · p. 3

2 Literature Review

The literature review surveys AI fraud detection, stacking ensembles, and explainable AI, highlighting their reported approaches and remaining challenges.

2.1 Fraud Detection in Financial Transactions with AI Techniques

  • Fraud-detection studies span ensembles, adaptive and unsupervised methods, and deep learning, with reported results varying across datasets and methods –.Examples include AdaBoost majority voting with over 99% accuracy, a hybrid model with 95.8% accuracy, and CatBoost with deep learning reaching AUC up to 0.97 in certain experiments.Source: §2.1 · pp. 3–4

2.2 Stacking Ensemble Methods in Fraud Detection

  • Prior fraud-detection stacking studies combine diverse base learners and meta-learners, sometimes adding imbalance handling or sampling strategies –.Reported examples include sensitivity of 1.00 and specificity of 0.997, and an AUC of 1.00 with an F1-score of 0.92.Source: §2.2 · pp. 4–5
  • Stacking can be effective but is harder to interpret, slower to train, and prone to overfitting, particularly with many layers; proper balancing and XAI are cited as helpful practices.Source: §2.2 · p. 5

2.3 Explainable AI (XAI) and Real-Time Scalability

  • XAI research covers tools such as SHAP and LIME, privacy-aware federated learning, and guidance for selecting explanations, but XAI does not eliminate model bias or other issues –.The review also points to real-time transparency and scalability as concerns.Source: §2.3 · p. 5

3 Methodology

The methodology describes a fraud-detection workflow that combines data preparation, SHAP-based feature selection, stacking, optimization, evaluation, and interpretation. It uses the IEEE-CIS transaction and identity data.

3 Methodology

  • The proposed workflow moves from preprocessing and SHAP feature selection through stacking and Optuna tuning to evaluation and XAI-based interpretation.Source: §3 · pp. 6–7, Figure 1 · p. 6

3.1 Data Collection

  • The IEEE-CIS dataset contains nearly 590,000 transactions with transaction and associated identity data, summarized in Tables 1 and 2.Source: §3.1 · p. 7, Table 2 · p. 8, Table 1
  • Transaction and identity records are joined on TransactionID, which is then dropped because the study says it has no predictive information.Transaction fields include payment, card, address, email, and engineered V-features; identity fields include device and network attributes.Source: §3.1 · pp. 7–8

3.2 Exploratory Data Analysis (EDA)

The exploratory analysis compares feature distributions across fraud and legitimate transactions and motivates SHAP-based feature analysis for a large, complex dataset.

3.2 Exploratory Data Analysis (EDA)

  • Below $1,000, most fraudulent transactions fall in the relatively small-amount range, within a highly right-skewed transaction-amount distribution.Source: §3.2 · p. 9, Figure 2 · p. 9
  • Card1 values cluster distinctly for non-fraud transactions, while fraudulent transaction values are more dispersed.Source: §3.2 · pp. 9–10, Figure 3 · p. 9
  • Addr1 has notable peaks among non-fraud cases, while fraud cases are more evenly distributed across address values.Source: §3.2 · p. 10, Figure 4 · p. 10
  • Because many features are obfuscated and the dataset has hundreds of features, the study uses SHAP-based importance analysis instead of relying on manual EDA alone.Source: §3.2 · p. 10

3.3 Data Preprocessing

Preprocessing removes redundant identifiers, imputes missing values, and label-encodes categorical features. SMOTE addresses class imbalance in training data, while evaluation uses an unseen test split that retains the original imbalance.

3.3 Data Preprocessing

  • TransactionID was dropped as redundant after merging transaction and identity tables, and categorical features were label-encoded for model input.Source: §3.3 · pp. 10–11
  • Missing categorical values were imputed with the most frequent category, while numerical values were imputed with each feature’s median.The authors state that median imputation mitigates outlier impacts.Source: §3.3 · pp. 10–11
  • SMOTE balances the training classes from a dataset with about 3.5% fraudulent and 96.5% legitimate transactions; the 80/20 test split retains the original imbalance.The test data are unseen during training.Source: §3.3 · p. 11, Figure 5 · p. 11, Figure 6 · p. 12

3.4 Feature Selection

SHAP-based feature selection reduces the modeling input to the 30 most important features, and Optuna tunes the XGBoost model before it is retrained.

3.4 Feature Selection

  • The top 30 features by mean absolute SHAP value were selected after training an XGBoost classifier on all features.The SHAP summary plot orders features by importance and shows the distribution of their SHAP values.Source: §3.4 · pp. 12–13, Figure 7 · p. 13

3.5 Hyperparameter Optimization

  • Optuna ran 20 trials to tune XGBoost hyperparameters, after which the model was retrained with the identified optimal settings.Source: §3.5 · p. 14
  • Tuned XGBoost settings included the number of trees, maximum tree depth, and learning rate.Source: §3.5 · p. 14
  • The tuning also covered the training-sample fraction per tree, feature fraction per tree, and positive-class balancing weight.Source: §3.5 · p. 14

3.6 Model Development: Stacking Ensemble

The stacking ensemble combines three gradient-boosting base learners, with an XGBoost meta-learner using their predictions to produce the final fraud decision.

3.6 Model Development: Stacking Ensemble

  • The ensemble uses XGBoost, LightGBM, and CatBoost as base learners rather than relying on a single classifier.The paper describes them as gradient-boosting models.Source: §3.6 · p. 14
  • Each base model was trained using the top 30 features and generated predictions for each instance.Source: §3.6 · p. 14
  • A simple XGBoost meta-learner takes the three base-model predictions as inputs and outputs the final fraud/non-fraud decision.The authors state that this layered design can capture relationships or complementarities individual models might overlook.Source: §3.6 · p. 15

3.7 Cross-Validation

The model is assessed with stratified five-fold cross-validation, with SMOTE applied only to each training fold and validation folds retaining the original class distribution. Evaluation also includes several classification metrics and validation-based threshold selection.

3.7 Cross-Validation

  • Five-fold stratified cross-validation preserved the class ratio in each fold, applying SMOTE to the 80% training portion and validating on the remaining 20% with its original distribution.Performance, primarily AUC, was averaged across folds to assess stability.Source: §3.7 · p. 15

3.8 Evaluation Metrics

  • Evaluation metrics included precision, recall, F1-score, AUC-ROC, and the confusion matrix.Source: §3.8 · p. 15
  • The classification threshold was selected to maximize F1-score on validation data.Source: §3.8 · p. 15

3.9 Explainable Artificial Intelligence (XAI)

The section applies SHAP, LIME, partial dependence plots, and permutation importance to select features and interpret the stacking ensemble’s predictions.

3.9 Explainable Artificial Intelligence (XAI)

  • SHAP identifies the 30 features contributing most to model output and supports feature selection.Source: §3.9 · p. 16
  • LIME locally approximates the model with an interpretable model to explain which features influence an individual prediction.Source: §3.9 · p. 16
  • Partial dependence plots show how predicted fraud probability changes when one feature varies while others are held constant.Source: §3.9 · p. 16
  • Permutation importance shuffles feature values and measures the resulting decrease in model performance to indicate feature importance.Source: §3.9 · p. 16

4 Results

The results report strong test-set classification, consistent cross-validation AUC, threshold tuning, and feature-level explanations for the stacking model.

4.1 Model Evaluation Metrics

  • The model achieved 99% overall accuracy, with fraud-class precision 1.00 and recall 0.98; non-fraud precision was 0.99 and recall 1.00.Source: §4.1 · pp. 16–17

4.2 Cross-Validation Results

  • Five-fold ROC-AUC scores ranged from 0.9979 to 0.9981, with all five scores approximately 0.998.Source: §4.2 · p. 17

4.3 Confusion Matrix

  • The test confusion matrix records 113,453 true negatives, 481 false positives, 1,825 false negatives, and 112,192 true positives; recall was 100% for non-fraud and 98% for fraud.Source: Figure 9 · p. 17, §4.3 · p. 18

4.4 Curve and Precision-Recall Curve

4.5 Threshold Optimization

  • The F1-maximizing probability threshold was about 0.44, below the default 0.5 cutoff, trading a small increase in false positives for improved fraud recall.Source: §4.5 · p. 20

4.6.1 LIME

  • For one transaction, LIME showed C14 and V12 pushing toward non-fraud, yielding a 98% predicted probability for the non-fraud class.Source: §4.6.1 · p. 21

4.6.2 Permutation Feature Importance

  • C14 had the longest permutation-importance bar, and its importance aligned with earlier SHAP findings on C14 and some V-features.Source: §4.6.2 · pp. 21–22

4.7 Comparative Analysis

  • The ensemble outperformed logistic regression and decision tree baselines, reporting 0.99 accuracy and 0.9983 AUC; its recent-study comparison reports 99% accuracy and 0.99 AUC.Source: §4.7 · pp. 23–24, Table 3 · p. 24, Table 4

5 Discussion and Conclusion

The discussion reports strong fraud-detection metrics and argues that stacking with explanation tools can pair accuracy with transparency. It also identifies real-time deployment, adaptation, privacy, fairness, and robustness as future research areas.

5 Discussion and Conclusion

  • The study combines stacking with SHAP and LIME to address the interpretability gap alongside accurate fraud detection.Source: §5 · p. 25
  • 0.99 precision, 0.99 recall, an equally high F1-score, and 0.99 AUC-ROC accompany higher performance than traditional and data-balancing models.The study uses a large-scale, highly imbalanced dataset.Source: §5 · p. 25
  • SHAP supports feature selection, while LIME explains individual predictions within the high-performing fraud-detection framework.Source: §5 · p. 25
  • The framework integrates XGBoost, LightGBM, and CatBoost with SHAP, LIME, and Permutation Importance to address transparency and data imbalance.The authors report outperforming many conventional and advanced models.Source: §5 · p. 25
  • Future research may examine explanation speed for real-time alerts, continual learning for evolving fraud, privacy-preserving evaluation, fairness, and adversarial robustness.Source: §5 · p. 26
  • The study concludes that combining machine learning with XAI can yield fraud models that are highly accurate, interpretable, and trustworthy in practice.Source: §5 · p. 26
Loading 2505.10050v1…