FraudNet·AI — Devpost Writeup


Inspiration

Financial fraud happens in networks, not isolated transactions. A single transfer may look normal, but circular flows or rapid dispersals across many accounts reveal clear fraud patterns.

Most systems analyze transactions row-by-row, missing these structural signals. FraudNet·AI detects graph patterns in real time and uses AI to explain them instantly to investigators.


What it does

FraudNet·AI streams banking transactions into a live 3D graph via WebSocket while five algorithms analyze the network continuously:

  • Cycle detection — finds circular laundering loops
  • Louvain communities — detects isolated mule clusters
  • Weighted PageRank — flags accounts receiving abnormal inflows
  • Temporal burst analysis — catches rapid inbound transfer spikes
  • Fan-out detection — identifies structuring/smurfing patterns

Accounts receive a 0–100 risk score, propagated across neighbors so risk spreads through connected nodes.

When fraud is detected, IBM watsonx.ai calls Granite 3 8B Instruct to generate an AI fraud intelligence report with classification, evidence, regulatory flags, and recommended actions.

Transactions are stored in IBM Db2, with automatic SQLite fallback.


How we built it

Graph EngineNetworkX performs structural analysis including cycle detection, Louvain clustering, custom PageRank, and temporal pattern checks.

BackendFastAPI streams transactions and alerts via WebSocket. The /analyze endpoint sends subgraph summaries to watsonx.ai and returns Granite’s structured analysis.

Frontend — Built with Next.js, React, and TypeScript. A 3D visualization using Three.js renders up to 300 nodes with live risk color transitions.

Deployment — Backend on Railway, frontend on Vercel.


Challenges we ran into

Cycle detection performance
Cycle detection on large graphs was slow. Filtering to recent high-value edges kept detection under 200ms.

IBM Db2 connectivity
SSL configuration and DSN formatting were tricky from a Railway environment. We solved this with programmatic DSN generation and SQLite fallback.

WebGL performance
Streaming edges every 50ms slowed rendering. We capped nodes, limited edge buffers, and debounced updates.

Visual clarity
Fraud events needed to stand out. We slowed fraud transaction replay so risk colors and alerts appear progressively.


Accomplishments that we're proud of

Granite’s reports reference actual transaction data, producing analysis that resembles real investigator reports.

Risk scoring includes neighbor propagation, allowing suspicion to spread through connected accounts.

We integrated the full IBM stack (Db2 + watsonx.ai + Granite) with graceful fallbacks so the system never fails during demos.

The 3D graph visualization makes fraud clusters instantly recognizable.


What we learned

Graph analysis reveals fraud patterns that traditional row-level detection misses.

Reliable structured output from Granite required low temperature prompts and strict JSON formatting.

IBM Db2 Python connections require the Security=SSL DSN flag, which is poorly documented but essential.

Louvain community detection works best after converting graphs to undirected networks and carefully tuning thresholds.


What's next for FraudNet·AI

  • Integrate real transaction streams using Apache Kafka
  • Implement incremental detection on affected subgraphs
  • Fine-tune Granite on labeled AML case data
  • Add investigator case management and SAR workflows
  • Enable cross-bank fraud intelligence sharing

Built With

  • 3d-force-graph-(webgl)
  • faker
  • fastapi
  • ibm-cloud-(ca-tor)
  • ibm-db2
  • ibm-granite-3-8b-instruct
  • ibm-watsonx.ai
  • networkx
  • next.js-16
  • python
  • python-louvain
  • railway
  • sqlite
  • tailwind-css
  • typescript
  • uvicorn
  • vercel
  • websocket
Share this project:

Updates