AI-Driven Fraud Case Summarizer

Natural-language case briefs help investigators make fast, correct calls. SHAP makes the rationale transparent.

Abstract

This work presents an end-to-end pipeline that transforms structured fraud detection outputs into human-readable case summaries using interpretable machine learning and small language models. We combine XGBoost anomaly classification with SHAP (SHapley Additive exPlanations) for local interpretability, converting quantitative feature attributions into natural language silver labels. These enriched explanations serve as training signals for a fine-tuned Flan-T5 model, which generates investigation-ready fraud narratives complete with risk assessments and actionable recommendations for fraud analysts.

Case Explorer

Filter by Risk

Loading cases...

Select a case to view details

How It Works

The pipeline consists of six primary stages:

  • Data Ingestion & Feature Engineering: Card transaction data undergoes comprehensive preprocessing, extracting temporal patterns, merchant analytics, velocity metrics, and customer behavior profiles.
  • Anomaly Detection: XGBoost classifier trained on historical fraud patterns identifies suspicious transactions with high precision, producing probability scores for each transaction.
  • Explainability via SHAP: SHAP values quantify each feature's contribution to the fraud score, providing both local (per-transaction) and global (dataset-level) interpretability.
  • Silver Labeling: SHAP outputs are systematically converted into structured natural language descriptions, creating pseudo-labels that bridge quantitative signals and linguistic explanations.
  • SLM Fine-Tuning: Flan-T5 (a small, efficient transformer) is fine-tuned on SHAP-enriched examples to generate contextual fraud case narratives that synthesize risk factors into coherent investigative summaries.
  • Output Generation: The trained model produces investigation-ready narratives, SHAP visualizations, and structured metadata for review by fraud analysts and audit systems.

Reproducibility

The complete pipeline can be reproduced by executing the following modules in sequence:

python -m src.data_preprocessing python -m src.feature_engineering python -m src.anomaly_labeling python -m src.xgb_interpret python -m src.shap_enrichment python -m src.slm_train python -m src.inference

Alternatively, run the provided shell script: run_pipeline.sh

Generated narratives and artifacts will be saved in the outputs/ directory. Source code for each stage is available in src/.

References

  • Lundberg, S. M., & Lee, S. I. (2017). A unified approach to interpreting model predictions. NeurIPS.
  • Chung, H. W., et al. (2022). Scaling Instruction-Finetuned Language Models. arXiv preprint.
  • Chen, T., & Guestrin, C. (2016). XGBoost: A scalable tree boosting system. KDD.