AWS Partner Network (APN) Blog
Graph-based fraud detection with Thoughtworks and Amazon SageMaker
By: Brian Blanchard, Global Vice President of Cloud Services – Thoughtworks
By: Joao Salcedo, Principal Data & AI Consultant – Thoughtworks
By: Shilpa Tyagi, Senior Partner Solutions Architect – AWS
By: Georgios Kolovos, Payments & FinTech Leader – NVIDIA
Financial institutions are turning to graph intelligence to catch coordinated fraud that many existing AI models, working on their own, are not designed to detect. The stakes are rising fast. Authorized push payment (APP) scam losses are projected to reach $7.6 billion by 2028 across six leading real-time payment markets, according to ACI Worldwide’s Scamscope report, and Thoughtworks estimates that, if current trends persist, cumulative APP scam losses could approach or surpass $500 billion to $1 trillion by 2035. Scams of all types already cost consumers an estimated $1.03 trillion worldwide in a single year, according to the Global Anti-Scam Alliance. The Nilson Report projects that cumulative global card fraud losses will reach $403.9 billion over the next decade, while false declines alone cost businesses an estimated $264 billion a year by 2027, according to Visa.
The challenge is evident: Coordinated fraud networks, including rings of synthetic identities, money mules, and shared infrastructure, can appear legitimate when examined in isolation. Machine learning models like XGBoost and Logistic Regression are fast, explainable, and effective at flagging anomalous individual transactions, but on their own they are not designed to surface these network-level patterns.
In this post, you’ll learn about a reference architecture for fraud detection that Thoughtworks, in collaboration with AWS and NVIDIA, built using Graph Neural Networks (GNNs) to surface network-level fraud patterns that many traditional models miss, without requiring institutions to abandon their existing systems. As an AWS Premier Tier Services Partner, Thoughtworks worked with AWS to deploy the NVIDIA fraud blueprint on Amazon SageMaker as an official AWS sample.
For the conceptual and strategic case for GNNs in fraud prevention, see Thoughtworks’ article GNNs: Modernizing fraud prevention in financial services. This post shows how institutions can put graph intelligence into production on Amazon SageMaker without a rip-and-replace, using a reference architecture, an open-source AWS sample, and benchmark results.
Why graphs matter for fraud detection
Many traditional fraud models treat each transaction as an independent row in a table. Graph-based approaches treat the financial system as what it actually is: a web of interconnected entities, such as users, devices, merchants, accounts, and IP addresses, each influencing the risk profile of the others.Consider a money mule network. Each individual account may pass every standard fraud check. But once those relationships are connected: shared devices, overlapping IP addresses, and coordinated transaction timing, the network reveals itself. GNNs can detect these “collective anomalies”: patterns that are hard to see at the transaction level but clear at the network level.GNNs work through a process called message passing: each node in the graph aggregates information from its neighbors, and those neighbors aggregate from their neighbors, propagating risk signals across multiple hops. The result is a rich node embedding—a numerical representation that encodes not just what an entity is, but where it sits in the network and who it’s connected to.
The Thoughtworks, AWS, and NVIDIA solution architecture
Thoughtworks, in collaboration with AWS and NVIDIA, designed a reference architecture that brings graph intelligence to financial services at scale. Institutions can adopt it without abandoning their existing systems. This reference solution is built on the NVIDIA AI Blueprint for fraud detection and uses an ensemble approach:
- Graph construction: The financial system is modeled as a graph. Amazon Neptune, a fully managed graph database from AWS, provides storage and real-time retrieval.
- GNN as a feature factory: Rather than replacing existing industry-standard gradient boosted methods (XGBoost), this architecture uses the GNN as an upstream feature factory. The GNN generates embeddings that mathematically encode relational risk. These embeddings are then concatenated with traditional tabular features and fed into the XGBoost model for the final fraud decision.
- Real-time inference pipeline: Fraud detection in real-time payments must operate under strict latency constraints—typically sub-100 milliseconds. The solution is designed to meet this requirement through subgraph sampling: the system extracts a localized subgraph, runs GNN inference using NVIDIA GPU acceleration, and returns a risk score within the required window.
- Orchestration and monitoring: The full pipeline is orchestrated on Amazon SageMaker, with model monitoring, retraining triggers, and drift detection built in.
The following diagram shows how these components fit together across training and real-time inference:
Figure 1: GNN Fraud Detection – SageMaker Pipeline & Inference Architecture
Decision flow in practice
The end-to-end inference pipeline uses a “subgraph inference” architecture to handle massive scale while meeting latency requirements:
- Data ingestion: Transaction details are streamed instantly via a message bus such as Apache Kafka.
- Context retrieval: The system queries Amazon Neptune to fetch a localized k-hop subgraph containing the immediate network neighborhood.
- GNN inference: The GNN performs message passing on this subgraph to output a dense numerical node embedding.
- Feature assembly: The system constructs the final feature vector by concatenating raw tabular features with the GNN embedding.
- XGBoost classification: The combined feature vector is fed into XGBoost to output a final probability score.
- Automated action: Based on the score, the decision engine triggers an automated response, such as to approve, decline, or step-up with multi-factor authentication.
A phased path to production
For many institutions with established fraud systems, a rip-and-replace strategy is neither feasible nor desirable. To manage risk and support a smooth transition, financial services institutions should adopt a phased implementation path:
- Phase 1 – Offline construction and shadow scoring: Build the graph offline and run GNN models in shadow mode to validate F1-score uplift without impacting live production traffic.
- Phase 2 – Hybrid embedding injection: Transition to injecting batch-generated GNN embeddings into live production systems.
- Phase 3 – Real-time graph inference: Advance to full, real-time graph querying and low-latency GNN inference at the immediate point of transaction.
Measured outcome
In Thoughtworks’ benchmark testing on the IBM TabFormer synthetic credit-card dataset (24 million transactions), the GNN-augmented ensemble (GNN embeddings + XGBoost) achieved an F1-score improvement of approximately 15% over a standalone XGBoost baseline, while simultaneously reducing false-positive alerts by roughly 20%. These gains were measured in offline benchmark testing on synthetic data, the same validation approach institutions use in Phase 1 shadow scoring. Institutions running the open-source sample can reproduce these results and calibrate thresholds against their own transaction distributions before advancing to Phase 2.
Why this matters now
With instant payments, transactions are processed within seconds and are irrevocable. Fraud detection must be right the first time, in milliseconds. At the same time, the cost of being wrong in the other direction is enormous; false declines are projected to cost businesses an estimated $264 billion a year by 2027.
GNNs can help reduce false negatives because they can surface fraud rings that traditional models may miss, and they can help reduce false positives by adding richer context to each risk signal. In Thoughtworks’ benchmark testing, this approach produced a more accurate and less disruptive fraud detection system.
Conclusion
Graph Neural Networks represent a fundamental shift in how financial institutions can approach fraud detection—moving from isolated transaction analysis to network-level intelligence. The Thoughtworks, AWS, and NVIDIA solution shows that institutions can adopt this technology incrementally, enhancing existing systems rather than replacing them. In benchmark testing, this approach delivered measurable improvements in fraud detection accuracy and a reduction in false-positive alerts.Ready to explore what graph intelligence could mean for your fraud strategy?
- Deploy the code: See the Financial Fraud Detection with NVIDIA on AWS Sample on GitHub
- Contact Thoughtworks Financial Services Practice
Full deployment and tear down steps are in the GitHub sample.
Thoughtworks – AWS Partner Spotlight
Thoughtworks is an AWS Premier Tier Services Partner with the AWS Financial Services Consulting Competency. Thoughtworks has deep expertise in financial services, data engineering, and applied AI. Thoughtworks has actively collaborated with AWS to deploy the NVIDIA fraud blueprint on Amazon SageMaker as an official AWS sample, helping institutions operationalize advanced graph intelligence.



