Skip to content
项目

jiyuanwang-afk/Explainable-AI-in-Financial-Fraud-and-Anomaly-Detection

在 GitHub 查看

关于

本仓库研究用于金融欺诈检测和异常分析的可解释深度学习模型。它集成图神经网络(GNN)、自编码器和基于 SHAP 的可解释性方法,用于识别和解读交易数据中的欺诈行为。

商业与金融

这些数字如何统计

实测星标增长

24小时
-1
7天
-1
15天
0
1个月
正在收集历史

各周期内的星标净变化,周期相互重叠,并非每日新增。缺失的测量保持空白。星标代表关注度,不代表软件质量。

README.md

原文

Explainable AI in Financial Fraud and Anomaly Detection

This repository implements a hybrid, explainable fraud/anomaly detection pipeline that combines:

  • Graph Neural Networks (GNNs) over a transaction graph
  • Tabular Gradient Boosting (baseline) for calibrated probabilities
  • Autoencoder for unsupervised anomaly scoring
  • Post‑hoc explainability via SHAP, Permutation Importance, and GNNExplainer-like node/edge importance
  • Drift tracking (population stability index, PSI) and threshold optimization (F1/PR-AUC maximizing)

It includes a configurable training CLI, reproducible experiments, and a lightweight unit test suite.

Quickstart

pip install -r requirements.txt
python -m src.experiments.main --config configs/default_config.json
# visualize
python -m src.experiments.evaluate --artifacts results/run_000

Project Structure

explainable-ai-fraud-detection/
├── README.md
├── requirements.txt
├── configs/
│   └── default_config.json
├── data/
│   └── transactions.csv                # sample synthetic data
├── src/
│   ├── data/
│   │   ├── build_graph.py
│   │   └── tabular_features.py
│   ├── models/
│   │   ├── gnn_model.py
│   │   ├── autoencoder.py
│   │   └── tabular_baseline.py
│   ├── explainability/
│   │   ├── shap_explainer.py
│   │   └── gnn_explainer_like.py
│   ├── experiments/
│   │   ├── main.py
│   │   └── evaluate.py
│   ├── utils.py
│   └── metrics.py
├── docs/
│   └── project_report.md
├── results/
│   └── (artifacts saved here)
└── tests/
    └── test_shapes.py

Reproducible Runs

  • All hyperparameters and seeds are in configs/default_config.json.
  • Artifacts (metrics, confusion matrix, feature importances, explainability plots) are saved under results/run_xxx.

Notes

  • torch-geometric installation depends on your local CUDA/CPU stack. See https://pytorch-geometric.readthedocs.io for wheels.
  • If torch-geometric is unavailable, you can run tabular + autoencoder only by setting "use_gnn": false in the config.

探索相关项目

加载中…