Here's complete, ready-to-paste copy for each field. About the project (Markdown)
Inspiration
UPI and card fraud in India crossed record highs in 2025 — and yet when a transaction gets flagged, the reason is almost always a black box. We spoke to bank support reps and everyday users who'd had legitimate payments blocked, and a pattern emerged: the AI was confident, but nobody — not the user, not the agent, not even the analyst — could explain why. That gap between detection and explanation is where trust dies. ClarityAI was born from one question: what if every fraud flag came with a reason a human could actually read?
What it does
ClarityAI is a real-time fraud detection system that doesn't just say "this is suspicious" — it tells you why, in plain English, in under half a second.
- Scores each transaction on a 0–100 risk scale using an ensemble model
- Generates a natural-language explanation per flag (e.g. "3.2× this user's typical transaction size, first-time device, unusual merchant geo")
- Surfaces the top contributing features via SHAP so analysts can audit every decision
- Cuts false-positive review time by an estimated 60%, letting support teams act on flags instead of guessing
How we built it
- Data: IEEE-CIS Fraud Detection dataset + synthetic UPI-style transaction stream for demo
- Model: Gradient-boosted classifier (XGBoost) tuned for high recall, with an isolation-forest anomaly layer for novel patterns
- Explainability: SHAP values extracted per prediction, then passed through a lightweight LLM prompt that translates feature contributions into a human sentence
- Backend: FastAPI service streaming predictions over WebSockets
- Frontend: React + Tailwind dashboard showing live flags, risk scores, and "why this was flagged" reason cards
- Infra: Dockerized, deployable on any cloud
Challenges we ran into
- Explanations that sound right but are wrong: early LLM outputs confidently invented reasons the model didn't actually use. We fixed this by strictly grounding the prompt in SHAP values only — no free-form reasoning.
- Latency budget: inference + SHAP + LLM had to fit under 500ms. We pre-computed SHAP baselines and cached explanation templates for common feature patterns.
- Imbalanced data: fraud is <1% of transactions. SMOTE alone wasn't enough; we added focal loss and stratified evaluation.
- Avoiding bias: we audited feature importance to make sure the model wasn't over-relying on proxies like geography or merchant category alone.
Accomplishments that we're proud of
- Every single flag is auditable — no black boxes
- Sub-500ms end-to-end explanation latency on commodity hardware
- A demo-ready dashboard a non-technical judge can understand in 30 seconds
- A design that a small bank or fintech could realistically pilot
What we learned
- Explain ability isn't a UI layer bolted on at the end — it has to be designed into the model pipeline from day one
- The hardest part of "AI + fraud" isn't the AI; it's the trust layer around it
- Talking to real support agents taught us more in one afternoon than a week of reading papers
- A simple, honest explanation beats a sophisticated but opaque score every time
What's next for ClarityAI — Explainable Fraud Detection
- Feedback loop: let analysts mark explanations as helpful/unhelpful to fine-tune the reasoning layer
- Multi-language explanations: Hindi, Tamil, Bengali support for front line agents across India
- Bank-grade integrations: plug into existing core banking and UPI switches via standard APIs
- Regulatory mode: auto-generate audit trails aligned with RBI fraud reporting guidelines
- On-device variant: lightweight model for merchant PoS terminals to flag risk offline
Built With
- docker
- fastapi
- numpy
- openai
- pandas
- postgresql
- python
- react
- recharts
- scikit-learn
- shap
- tailwindcss
- typescript
- websockets
- xgboost
Log in or sign up for Devpost to join the conversation.