Inspiration
In modern financial operations, predictive machine learning models present a dangerous regulatory paradox: they operate as opaque "black boxes." High-performing classifiers (Gradient Boosted Trees, Deep Neural Networks) can generate accurate risk probabilities, but they fail to explain the causal mechanisms behind adverse decisions.
In high-stakes banking, this opacity is an existential compliance liability:
- CFPB Circular 2023-03 & US ECOA Regulation B (12 CFR § 1002.9): Mandates that financial institutions disclose specific, factual principal reasons for adverse actions. Vague checklist explanations or uninterpretable scores are unlawful.
- EU GDPR Article 22 & Recital 71: Establishes the "Right to Explanation" and the legal right to contest automated profiling decisions.
- Federal Reserve / OCC SR 11-7 & SR 26-2: Enforces strict Model Risk Management (MRM), conceptual soundness, and additive mathematical invariance.
- FinCEN BSA/AML (31 CFR § 1020.320): Demands factual Suspicious Activity Report (SAR) narratives detailing the Five W's (Who, What, When, Where, Why/How).
We built FraudxAI to eliminate this friction: an institutional-grade platform that bridges high-performance machine learning with statutory banking compliance through Explainable AI (XAI), actionable algorithmic recourse, and automated legal audit drafting.
What it does
FraudxAI is an end-to-end Explainable AI and regulatory compliance suite designed for fraud analysts, risk officers, and bank examiners:
- Calibrated Tabular Risk Scoring: Evaluates card transactions across 8 transparent, business-readable parameters (e.g., transit velocity, purchase median departure, EMV chip, PIN verification) utilizing an XGBoost ensemble tuned for severe class imbalance.
- Sub-5ms Mathematical Attribution (XAI): Uses
SHAP TreeExplainerto deconstruct model predictions into exact additive local Shapley values: $$\sum_{i=1}^{M} \phi_i + E[f(x)] = f(x)$$ Isolating risk accelerators (red) from mitigating factors (green) in under 5 milliseconds. - Actionable Counterfactual Recourse ("What-If" Engine): Resolves false positives by computing the minimal, verifiable behavioral adjustments (e.g., presenting physical EMV chip and entering PIN) required to remediate a flagged transaction, dropping risk scores from 94% to ~8% in real-time.
- Resilient Multi-Provider Compliance Agent: Generates audit-ready compliance memorandums compliant with CFPB and FinCEN standards, orchestrated dynamically across AdaptionLabs, Groq Cloud LPUs, Featherless.ai, and an air-gapped deterministic offline engine with zero downtime.
- Institutional Vector PDF Export: Exports compliance memos into 300+ DPI vector-rendered PDF documents formatted for regulatory filing binders and internal audit committees.
How we built it
FraudxAI was engineered from the ground up as a production-ready, decoupled institutional platform:
- Machine Learning & Explainability Engine (Python 3.12 & FastAPI):
- Trained on the Kaggle / OpenML Credit Card Fraud Prediction Benchmark (1,000,000 empirical card transactions).
- Calibrated XGBoost Classifier (
scale_pos_weight = 56.12), achieving an ROC-AUC of 0.9445 and Fraud Recall of 86.10%. - Game-theoretic local feature attributions powered by
SHAP TreeExplainer(shap 0.51.0). - Asynchronous REST backend built on
FastAPI 0.141and validated withPydantic v2.
- Adaptive Cloud Orchestration:
- AdaptionLabs: Live cloud platform deployment (https://my-app-1ombyk.adaptionlabs.app/) serving as the primary AI inference orchestrator and prompt routing engine.
- Groq Cloud: Ultra-low-latency Language Processing Unit (LPU) execution generating compliance narratives in ~1.5 seconds.
- Featherless.ai: Serverless inference for open-weights instruction models (Qwen2.5 / Llama-3.1).
- Enterprise Risk Cockpit (Next.js 16 + React 19):
- Interactive dual-column interface built with Next.js 16 App Router and Tailwind CSS v4.
- Zero-dependency SVG Radial Risk Speedometer and custom divergent SHAP waterfall charts.
- Tailored
@media printCSS engine for publication-grade vector PDF printing.
Challenges we ran into
- Handling Severe Class Imbalance: Fraudulent transactions represented a tiny fraction of the empirical dataset. Traditional models optimized for pure accuracy suffered from high false negative rates. We calibrated XGBoost with cost-sensitive weighting (
scale_pos_weight = 56.12), boosting fraud sensitivity (recall) to 86.10% without collapsing precision. - Deterministic Additive Invariance: Meeting Federal Reserve SR 11-7 standards meant that feature attributions could not be loose approximations. We integrated Tree-SHAP to mathematically guarantee additive invariance ($|\sum \phi_i + \phi_0 - f(x)| < 10^{-4}$) in sub-5ms execution times.
- Zero-Downtime Regulatory LLMs: Financial compliance infrastructure cannot fail if an external LLM API rate-limits or suffers latency spikes. We designed an automated multi-tier fallback hierarchy that cascades from AdaptionLabs to Groq, Featherless, and finally to an infallible deterministic offline rules engine (<5ms).
Accomplishments that we're proud of
- Empirical Mathematical Rigor: Achieving a 0.9445 ROC-AUC while ensuring 100% of the underlying model decisions are mathematically explainable down to exact Shapley dollar/distance weights.
- Operationalizing "What-If" Recourse: Moving beyond static academic explanations to give end-users actionable remedies that reverse false positives in real time.
- Full Cloud & Edge Interoperability: Successfully deploying and orchestrating the platform on AdaptionLabs, paired with sub-second LPU inference and clean vector PDF generation.
What we learned
- Building for regulated industries requires designing for auditors and consumers simultaneously. It is not enough for an AI model to be accurate; it must provide legally defensible, reproducible, and verifiable justifications.
- Advanced prompt engineering anchored by exact mathematical vectors (SHAP values) drastically curtails LLM hallucination, yielding consistent, statutory-compliant regulatory disclosures.
What's next for FraudxAI
- Real-time Streaming Ingestion: Integrating Apache Kafka and Redis for sub-10ms transactional evaluation at scale.
- Autonomous Voice Verification with ElevenLabs: Dispatching automated conversational voice agents to contact cardholders within seconds of a critical risk block, executing the "What-If" remediation path over natural phone dialogue.
- Multi-Jurisdiction Expansion: Extending the statutory compliance generator to cover UK FCA, Singapore MAS, and Canadian FINTRAC frameworks.
Built With
- ai
- fastapi
- featherlessai
- finance
- groq
- kaggle
- ml
- next.js
- python
- shaptreeexplainer
- tailwindcss
- typescript
- xgboost
Log in or sign up for Devpost to join the conversation.