Apr 7, 2026
How We Built a Real-Time AI System That Stops Fraud in 200ms
A breakdown of how we built an AI fraud detection system that makes accurate decisions in under 200ms without blocking legitimate transactions.
Author


Book a call
Table of Contents

Why Real-Time AI Fraud Detection Is Difficult to Build
The Transaction Pipeline: Seven Agents, One Decision
Every transaction travels through a sequential pipeline. Each agent builds on the output of the previous one, with total end-to-end latency under 200ms in production.

After the pipeline completes, six post-decision tasks execute in parallel without adding to user-facing latency: graph updates, trust score adjustments, shadow mode scoring, database persistence, WebSocket broadcast, and Prometheus metrics recording.
Four Sub-Agents, 30+ Features

- Device Intelligence: Scores device trust based on age, OS, and emulator detection.
- Geo-Risk Analyzer: Detects impossible travel, VPN/Tor usage, and IP reputation.
- Behavioral Baseline: Computes per-customer Z-scores. It compares each transaction against that specific customer's history, not population averages, making it resistant to account warming strategies.
- Threat Intelligence: Cross-references breach databases and dark web correlation feeds.
The Risk Scorer: 38 Models, One Calibrated Score
The Risk Scorer is where all signals converge. The system uses a four-way adaptive ensemble that blends signal sources based on the type of transaction being evaluated.
| Component | Count | Role | Default Weight |
|---|---|---|---|
| LightGBM | 9 models (one per category) | Primary ML signal | 60% |
| XGBoost | 9 models | Ensemble partner | 40% |
| Isolation Forest | 10 models | Unsupervised anomaly detection | Dynamic |
| Isotonic Calibrators | 9 models | Probability calibration | Post-processing |
| Rule Engines | 9 YAML-driven engines | Domain logic/compliance | Dynamic |
| Graph Scores | NetworkX DiGraph | Network topology risk | Dynamic |
Graph-Level Fraud Detection: Finding Mule Networks
Individual signals have limits. A hundred accounts funneling money through a single intermediary form a mule network, a pattern that only becomes visible at the network level. The Graph Anomaly Agent maintains a live NetworkX directed graph of transaction relationships. It identifies nodes with abnormally high in-degree and circular money flows that would pass undetected if evaluated in isolation.
Decision Logic and Continuous Learning
- Drift Detector: Monitors Population Stability Index (PSI) to identify distribution shifts.
- Shadow Mode: Scores live transactions with challenger models without affecting decisions, tracking performance before promotion.
- Adaptive Thresholds: Shifts thresholds when live FPR and FNR drift from targets.
Compliance Reporting: Six Regulatory Frameworks, One Report Per Transaction
Architecture Decisions That Shaped the System
Deterministic reasoning over generative explanations.
Fire-and-forget post-decision parallelism.
Layered intelligence over monolithic models.
Building Trust, One Decision at a Time
Subscribe to Our Newsletter
Subscribe to RSS
Press & Media Hub RSS FeedRelated Articles.
More from the engineering frontline.
Dive deep into our research and insights on design, development, and the impact of various trends to businesses.

Jun 26, 2026
GeekyAnts Wins AI and Digital Transformation Excellence Award at ET Now Business Conclave 2026

Jun 25, 2026
Analytics Insight Features GeekyAnts' Blueprint for Future-Ready Manufacturing

Jun 25, 2026
Automating Loan Origination Workflows: From SAR Prep to Fraud Checks

Jun 17, 2026
Google I/O 2026 Mobile Playbook: AI Studio, Android CLI, and Antigravity for App Development

Jun 17, 2026
Beyond the Chatbot: Architecting Enterprise Workflows with Managed Agents in the Gemini API

Jun 16, 2026