Inspiration

Fraudulent transactions pose a massive financial risk to banks and businesses worldwide. With the rise of digital payments, fraud detection systems must evolve to provide real-time analysis and explainability. We wanted to build a solution that not only flags suspicious transactions but also provides an understandable explanation for bankers using AI.

What it does

Our fraud detection system analyzes transactions and determines whether they are fraudulent or not using machine learning. It generates a fraud score and explains the reasoning behind each flagged transaction using SHAP values. We integrated Google's Gemini AI to convert complex fraud analytics into simple explanations for non-technical users.

How we built it

  • Backend: We trained an XGBoost model using a Kaggle fraud dataset and saved it using joblib. Flask was used to serve predictions.
  • Frontend: Built with React, we designed an interactive UI to input transaction details and visualize fraud predictions.
  • Feature Engineering: Applied transformations to match the model’s expectations, including One-Hot Encoding and scaling.
  • Explainability: Used SHAP values to interpret fraud predictions and integrated Gemini AI to generate natural language explanations.
  • Deployment: The model and API were tested locally with Flask, and the UI was designed for seamless interaction.

Challenges we ran into

  • Model integration issues: Our fraud detection model initially did not accept correctly transformed inputs.
  • Feature mismatches: The number of features required by the model didn't match frontend inputs, causing errors.
  • Gemini AI API issues: Encountered authentication problems when integrating Gemini AI for fraud explanations.
  • Time constraints: With limited time, debugging and fine-tuning the system proved to be challenging.

Accomplishments that we're proud of

  • Successfully integrated an ML model into a functional fraud detection system.
  • Implemented SHAP values to explain fraud decisions in an interpretable way.
  • Integrated Gemini AI to make fraud analysis understandable to non-technical users.
  • Built a polished, interactive UI that makes fraud detection accessible.

What we learned

  • The importance of feature engineering and input transformations when working with ML models.
  • How to integrate an AI-powered explainability feature into a fraud detection system.
  • Debugging API issues and handling data inconsistencies between backend and frontend.
  • Effective collaboration under time pressure in a hackathon setting.

What's next for Fraud Detection System

  • Deployment: Hosting the model and API on a cloud server for real-world testing.
  • Improved ML Model: Experimenting with deep learning techniques for higher accuracy.
  • Live Monitoring: Implementing real-time fraud detection on streaming transaction data.
  • Custom User Feedback: Allowing users to provide feedback on fraud predictions to improve the

Built With

Share this project:

Updates