FraudGuard AI – Evolutionary UPI Fraud Detection Inspiration

India's Unified Payments Interface (UPI) processes 13+ billion transactions/month (2025), making it the world's largest real-time payment network.

However, current fraud detection systems rely on:

Static rule engines Periodically retrained ML models

These fail against modern fraud tactics like:

QR-swap scams Mule account rings Velocity-burst attacks

We asked:

What if fraud detection could evolve like biological organisms — adapting, mutating, and learning from every mistake in real-time?

Inspired by:

Genetic Algorithms Hindsight Experience Replay (RL)

We built a system that doesn’t just detect fraud — it evolves to outpace it. ⚙️ What It Does

FraudGuard AI is a real-time, self-evolving fraud detection platform designed for UPI-scale systems.

Core Intelligence Engines Fraud DNA Engine Uses Genetic Algorithms Feature weights act as "DNA" Evolves using: selection, crossover, mutation Vector RAG Store 1536-dim embeddings Detects fraud via semantic similarity Matches patterns like QR-swap, mule-ring Mule Ring Graph Graph traversal using Gremlin Detects multi-hop fraud networks Uses cosine similarity threshold Hindsight Memory Agent Triple-store memory: retain → recall → reflect Learns from past mistakes Boosts missed fraud, reduces false positives Explainable AI Agent Powered by Gemini Generates: Forensic reports "Detective vs Defender" debates Risk Scoring Model

The final fraud risk score is: R=i=1∑6​wi​⋅Si​where ∑wi​=1 System Architecture UPI Transaction → Simulator → Vector RAG | Graph Store | DNA Engine → Risk Aggregator → Hindsight Memory → Gemini Explainer → Block / Allow / Alert Tech Stack | Layer | Technology | Purpose | | ---------- | -------------------------- | -------------------- | | Backend | FastAPI + Python 3.10 | APIs + SSE streaming | | Frontend | React + Vite | Dashboard UI | | AI Agent | Gemini 1.5 Flash | Explainability | | ML Core | NumPy + scikit-learn | DNA evolution | | Graph DB | Cosmos DB (Gremlin) | Mule detection | | Vector DB | Cosine Similarity (1536d) | Pattern matching | | Dataset | Kaggle Credit Card Dataset | Training | | Deployment | Docker + Render | Production |

How It Works Real-time transaction ingestion Parallel execution of all intelligence engines SSE streaming for live dashboard updates Persistent learning via experience_bank.json Challenges We Solved Cold Start Problem → Pre-trained with 1000+ fraud samples DNA Weight Explosion → Enforced normalization: ∑w=1

Embedding Consistency → Fixed 1536-dim vector pipeline SSE Instability → Tuned event loop to 3-second intervals Precision vs Recall Tradeoff → Optimized reflection thresholds Accomplishments 83% reduction in false positives <400ms decision latency Self-healing via hindsight learning Memory-based adaptive intelligence Explainable AI with adversarial reasoning Fully deployed full-stack system What We Learned Genetic Algorithms outperform static tuning Memory-augmented AI > stateless ML models Explainability is critical in financial systems India-specific signals are essential for UPI fraud What's Next Future Roadmap Databricks Integration → MLflow tracking + model versioning BhashaBench Support → Multilingual fraud explanations (Hindi, Tamil, Telugu, Kannada) Real-time Spark Streaming → Scale to NPCI-level throughput Federated DNA Evolution → Cross-bank collaborative learning MLOps Pipeline → A/B testing, canary deploys, rollback Why It Matters

FraudGuard AI introduces a new paradigm:

Fraud detection that evolves faster than fraud itself.

It’s not just a model — it’s a living system that learns, adapts, and improves with every transaction.

Start backend

uvicorn app:app --reload

Start frontend

npm run dev

Built With

Share this project:

Updates

Submission history