Inspiration
Financial fraud costs the global economy over $5 trillion annually, yet most detection systems rely on static, rule-based models that treat each transaction in isolation. We were inspired by a simple but powerful observation: fraud isn't a single event — it's a pattern that evolves over time across a network of actors. A fraudster rarely strikes once; they probe, adapt, and exploit relationships between accounts, merchants, and devices. We wanted to build something that thinks the same way — a model that sees the graph and the clock simultaneously.
What it does
FraudTGN is a fraud detection system powered by a Temporal Graph Neural Network (TGN). Instead of analyzing transactions one-by-one, it models the entire transaction ecosystem as a dynamic graph — where nodes represent accounts and merchants, and edges represent transactions with timestamps. By learning from the structure and timing of these relationships, the model detects fraud patterns that traditional row-by-row classifiers completely miss.
How we built it
- Model: TGN architecture with a memory module and graph attention aggregator, built using PyTorch Geometric Temporal
- Data: Trained on the IEEE-CIS Fraud Detection / Elliptic Bitcoin dataset
- Research foundation: Implemented core ideas directly from the paper Temporal Graph Networks for Deep Learning on Dynamic Graphs (https://arxiv.org/pdf/2006.10637) — translating academic research into working code
- Compute: Trained on Google Colab, leveraging available GPUs and TPUs to work around local hardware limits
Challenges we ran into
- CSV to graph: Raw transaction data comes as flat tables — converting that into proper graph structures (defining meaningful nodes and edges) was the first and hardest design decision
- Compute constraints: Limited to free-tier Google Colab; had to work carefully with batch sizes and epochs to avoid timeouts and memory limits
- Dimension mismatches: Getting the data correctly shaped and aligned with the model's expected input format required significant debugging — mismatches in feature dimensions caused repeated failures before finally landing on a working pipeline
Accomplishments that we're proud of
- Built a fraud detection model completely solo in under 48 hours, from ideation to a working result
- Successfully translated a research paper into a real implementation — bridging the gap between theory and code
- Developed hands-on understanding of graph-structured data and how to train models on it
- Laid a solid foundation — the model's accuracy can be improved further with parameter tuning, feature engineering, and more training epochs, but the core works
- Sharpened research skills — learned how to read papers critically and extract what's actually useful for building
What we learned
- Temporal graphs are a fundamentally better fit for fraud detection than tabular models — the relational structure carries signal no feature engineering alone can capture
- Graph construction decisions (what's a node? what's an edge?) matter more than hyperparameters
- When you're stuck, solutions usually already exist — it's about knowing how to look for them and viewing problems from multiple angles
- Research papers aren't just academic — they're blueprints if you know how to read them
What's next for FraudTGN
- Federated learning — let multiple banks train on shared graph structure without exposing raw transaction data
- Heterogeneous graphs — incorporate device fingerprints, IP addresses, and merchant categories as distinct node types for richer signal - Regulatory compliance — auto-generate Suspicious Activity Report (SAR) drafts from model outputs
- Open-source release — publish the pipeline and model weights for the community to build on
- Fintech partnership — pilot the system on a live transaction stream
Log in or sign up for Devpost to join the conversation.