Skip to content

About

a comparative study on the performance of various methods used for Financial Fraud detection including XGBOOST, Decision tress, stacked Ensemble and More.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

2 Commits

Folders and files

Repository files navigation

Fraud Detection - Advanced SOTA Architecture

An advanced state-of-the-art fraud detection system that significantly outperforms traditional baselines by combining Graph Neural Networks (features), Deep Learning (TabNet), and GPU-accelerated Gradient Boosting into a robust meta-ensemble.

Status: Achieved 0.997+ PR-AUC, representing a 14%+ improvement over the original paper methodology.


Architecture

The system utilizes a multi-stage architecture that processes 6.3M+ transactions through specialized engines before making a final prediction.

graph TD
    A[Transaction Data] --> B[Feature Engine]
    A --> C[Graph Engine]
    A --> D[Filter Engine]
    
    B --> E[Feature Matrix]
    C --> E
    D --> E
    
    E --> F[LightGBM - GPU]
    E --> G[XGBoost - GPU]
    E --> H[TabNet - Deep Learning]
    E --> I[Isolation Forest - Unsupervised]
    
    F --> J[Meta-Learner]
    G --> J
    H --> J
    I --> J
    
    J[Logistic Regression] --> K[Final Fraud Prediction]
Loading

Key Components

  1. Graph Engine (NetworkX)
    • Computes PageRank, Degree Centrality, and interaction ratios.
    • Identifies "fraud rings" and mule accounts based on network topology.
  2. Deep Learning (TabNet)
    • Uses attention mechanisms to learn feature importance automatically.
    • Provides diversity against tree-based models.
  3. GPU Acceleration (CUDA)
    • LightGBM and XGBoost trained on GPU for 7-8x speedup.
  4. Robust Stacking Ensemble
    • Combines Supervised (LGBM, XGB, TabNet) and Unsupervised (Isolation Forest) models.
    • Meta-learner (Logistic Regression) optimizes the final probability.

Results & Performance

Rank Model PR-AUC Precision Recall Improvement
1 SOTA Ensemble 0.997+ 99%+ 99%+ +14.1%
2 Stacking V1 0.9973 100% 69% +14.1%
3 LightGBM (GPU) 0.9970 99%+ 99%+ +14.0%
4 Improved RF 0.9961 100% 29.5% +13.9%
5 Baseline RF 0.8743 6.3% 99.3% -

SOTA Comparison


Documentation & Reference

Detailed architecture and implementation details can be found in the docs/ directory:


Quick Start

1. Requirements

  • Python 3.9+
  • CUDA-capable GPU (Recommended for TabNet/XGBoost)
  • RAM: 16GB+ (32GB+ recommended for full graph features)

2. Setup

# 1. Setup environment
.\setup_environment.ps1

# 2. Download PaySim dataset from Kaggle
kaggle datasets download -d ntnu-testimon/paysim1 -p data/

# 3. Extract dataset
Expand-Archive data/paysim1.zip -DestinationPath data/

# 4. Start Jupyter
jupyter notebook notebooks/

3. Running the SOTA Model

Open notebooks/07_advanced_sota.ipynb to run the full pipeline including graph feature extraction and ensemble training.


Project Structure

fraud-detection/
├── configs/              # Model configurations (YAML)
├── docs/                 # Detailed architecture documentation
├── notebooks/            # Jupyter notebooks (01-07)
│   ├── 06_stacking_ensemble.ipynb  # Stacking implementation
│   └── 07_advanced_sota.ipynb      # Final SOTA implementation
├── src/                  # Source code modules
│   ├── models/           # TabNet, LGBM, XGBoost wrappers
│   ├── feature_engineering.py  # Graph & statistical features
│   └── sampling.py       # SMOTE-ENN handling
├── results/              # Figures and metrics
└── data/                 # Dataset (gitignored)

License

MIT License

About

a comparative study on the performance of various methods used for Financial Fraud detection including XGBOOST, Decision tress, stacked Ensemble and More.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages