AshishSeru/XAI-Financial-Fraud-Detection
Explainable AI (XAI) based system for detecting financial fraud using machine learning, with model interpretability, analysis, and research-backed implementation.
XAI-Driven Financial Fraud Detection System
An end-to-end Machine Learning framework for financial fraud detection that integrates
anomaly detection, ensemble learning, and Explainable AI (XAI) to achieve high
accuracy while maintaining model transparency and auditability.
This project is based on a peer-reviewed research publication and focuses on building
trustworthy, interpretable ML systems suitable for real-world financial environments.
π Problem Statement
Financial fraud detection systems face three major challenges:
- Severe class imbalance (fraud cases are rare)
- Constantly evolving fraud patterns
- Lack of explainability, making ML models difficult to trust and regulate
This project addresses these challenges by combining:
- SMOTE-based data balancing
- Anomaly detection models
- Ensemble classifiers
- Explainable AI techniques (SHAP, LIME)
π§ System Architecture
Pipeline Overview
-
Data Preprocessing
- Data cleaning and feature engineering
- Class imbalance handling using SMOTE
-
Anomaly Detection Layer
- Autoencoder-based reconstruction error
- Isolation Forest for outlier detection
-
Classification Layer
- Random Forest
- XGBoost (primary high-performing model)
-
Explainability Layer
- SHAP for global and local feature importance
- LIME for instance-level explanations
This layered architecture ensures accuracy, robustness, and interpretability.
π Key Results (Research-Backed)
| Model | Accuracy | Precision | Recall | F1-Score |
|---|---|---|---|---|
| Random Forest | 0.93 | 0.75 | 0.78 | 0.76 |
| XGBoost | 0.95 | 0.80 | 0.81 | 0.80 |
- SMOTE improved fraud recall from 0.44 β 0.76
- XGBoost delivered the best balance between precision and recall
- SHAP enabled transparent feature-level decision tracing
π Repository Structure
XAI-Financial-Fraud-Detection/
β
βββ src/ # Core ML pipeline
β βββ preprocessing.py
β βββ anomaly.py
β βββ classifier.py
β βββ explainability.py
β βββ config.py
β
βββ data/ # Transaction datasets
βββ models/ # Trained models & encoders
βββ outputs/ # Evaluation results & plots
β
βββ publications/ # Research paper & poster
βββ requirements.txt
βββ README.md
π How to Run
Install dependencies:
pip install -r requirements.txtRun the main pipeline:
python src/main.py
Launch the dashboard (if applicable):
python fraud_dashboard.py
π Research Publication
This implementation is based on the peer-reviewed paper:
βA Machine Learning Framework for Financial Fraud Detection Using Explainable Artificial Intelligence Techniquesβ
Published in International Journal of Computer Sciences and Engineering (IJCSE), 2025
π DOI: https://doi.org/10.26438/ijcse/v13i5.1725
π₯ Authors & Contributions
Ashish Seru β ML pipeline design, model development, evaluation
Archit Mehrotra β Co-developer, experimentation & validation
Tanisha Gotadke β Documentation & research synthesiss
Faculty mentors β Research supervision
This repository represents the engineering implementation of the published research.
π Tech Stack
Python
Scikit-learn
XGBoost, Random Forest
Isolation Forest
SHAP, LIME
Pandas, NumPy
Streamlit
π― Why This Project Matters
This project goes beyond a toy ML implementation and reflects real-world financial system requirements:
- Production-oriented ML design with modular, maintainable pipeline components
- Explainable AI (XAI) to support transparency and regulatory compliance
- Research-backed methodology, validated through a peer-reviewed publication
- Clear separation of ML stages (preprocessing, modeling, evaluation, explainability)
- Industry relevance, aligned with fraud detection use cases in banking and fintech systems
π¬ Contact
Ashish Seru
GitHub: https://github.com/AshishSeru
LinkedIn: https://www.linkedin.com/in/ashishseru/