Zing Forum

Reading

FraudX Analyst: A Credit Card Fraud Detection Mobile App Integrating Machine Learning, SHAP Explainability, and RAG Chatbot

An end-to-end fraud detection system that integrates three machine learning models, SHAP feature importance visualization, Google Gemini AI explanations, and a RAG chatbot based on Pinecone vector database, presented as a Flutter mobile app.

信用卡欺诈检测机器学习SHAP可解释性FlutterXGBoostLightGBMRAGGoogle GeminiPineconeFastAPI
Published 2026-06-07 22:15Recent activity 2026-06-07 22:23Estimated read 6 min
FraudX Analyst: A Credit Card Fraud Detection Mobile App Integrating Machine Learning, SHAP Explainability, and RAG Chatbot
1

Section 01

FraudX Analyst: Overview of Credit Card Fraud Detection Mobile App

FraudX Analyst is a Flutter-based mobile app for credit card fraud detection, integrating triple machine learning models (XGBoost, LightGBM, Autoencoder), SHAP explainability, and a RAG chatbot (Google Gemini + Pinecone). Key features include auto-selection of optimal models via F1 score, SHAP feature importance visualization, 16-step interactive tutorial, and smart model upgrade. It is a graduation project from the University of Sarawak Malaysia (UNIMAS), aiming to provide a transparent and user-friendly fraud detection experience.

2

Section 02

Project Background & Dataset Information

Author & Source: Avinaash A/L Loganathan, GitHub repo fraudX-analyst, published in June 2026 as a UNIMAS graduation project.

Dataset: Based on Kaggle's credit card fraud dataset (284,807 transactions, 0.17% fraud rate, 28 PCA features + time/amount, 2013 European cardholder data).

3

Section 03

Core Technologies & Implementation Methods

Core Technologies:

  • ML Models: XGBoost (excellent fraud detection), LightGBM (fast training), Autoencoder (unsupervised anomaly detection; auto-select best via F1 score).
  • SHAP Explainability: Tree/KernelExplainer generates visualizations (red bars: fraud-pushing features, green bars: normal-pushing features) with feature explanations (e.g., V14 = historical fraud correlation).
  • RAG Chatbot: Google Gemini 2.5 Flash + Pinecone (2048D embeddings) with 6-message context, answering fraud detection queries.
  • Tech Stack: Frontend (Flutter 3.29), Backend (FastAPI), DB (Supabase), Deployment (Docker/Render), Hyperopt (Optuna).
4

Section 04

Model Performance & Evidence

Model Performance Metrics:

Model Accuracy Precision Recall F1 Score AUC-ROC
XGBoost 99.95% 87.14% 82.43% 84.72% 0.9787
LightGBM 99.95% 88.24% 81.08% 84.51% 0.9722
Autoencoder 99.81% 44.30% 47.30% 45.75% 0.9490

Analysis: XGBoost/LightGBM balance precision/recall well; Autoencoder suits unsupervised scenarios.

5

Section 05

Key Functional Modules

Key Modules:

  1. Real-time Stats: Displays safe/fraud counts, model accuracy, AUC-ROC; allows viewing recent transactions.
  2. Simulation: Loads test data, validates input, selects models (auto/manual), shows SHAP + AI explanations.
  3. Training: Built-in dataset, custom CSV upload, Optuna tuning (10 trials/model), smart upgrade (only if new F1 > existing), PDF report export.
  4. Model Comparison: Side-by-side bar charts for metrics, best model badge, PDF report.
  5. Chatbot: Explains simulation results and fraud detection knowledge.
  6. 16-step Tutorial: Interactive, visual hints, one-time display.
6

Section 06

Deployment & Local Usage Guide

Deployment: Backend deployed on Render: Online URL, API Docs (note: free tier sleeps after 15min inactivity, 30s wakeup).

Local Usage:

  • Backend: Create venv → install reqs → copy .env → upload knowledge → run uvicorn app.main:app --reload.
  • Frontend: flutter pub get → update API URL → flutter run or build APK.
7

Section 07

Project Value & Insights

Project Value:

  • Demonstrates a complete AI app pipeline (development → deployment).
  • Highlights explainable AI (SHAP) to build user trust.
  • Shows multi-model strategy and RAG chatbot for enhanced usability.
  • UX design (16-step tutorial) lowers entry barrier.

Insights: Provides a reference for developers building AI-driven mobile apps, emphasizing practical integration of ML, explainability, and generative AI.