Hi, I'm Swamira Rai, VP of AI Engineering. What we see here are two scores for the same transaction, both times. On the left, a single online purchase where we look at the amount spent, who is the merchant, MCC code, device type, what time of day, and with 198 features by the time we are done engineering. And it scores 0.04. Comfortably under any threshold we would alert on. As far as we are concerned, this one looks clean.
On the right, same transaction, same feature vector. Not one byte of that row is different. The only thing that we change is what model is allowed to look at, the neighborhood it sits in. Three of the four transactions—a user, a merchant, and two other transactions—were flagged fraud within the last hour. Now the score is 0.91. So the signal was never in the row. It was in the edges. Therefore, fraud isn't a property of a transaction. It is a property of the neighborhood it sits in.
Let me describe the shape of the problem. Because it is two problems wearing one name. Physical transaction at the merchant point of sale roughly has 0.05% natural fraud rate. That is 1 in 2000. These are tight, low noise signal and fraud largely resides in the card's own transaction velocity. Whereas online transactions have 0.6% fraud rate, 12 times higher. With higher volume, noisier, and far more often the signal sits in the merchant and the neighbor context. These two portfolios have a different base rate and a different signal geometry. Therefore, in practice, two models, not one.
And here is the constraint that makes this an engineering problem, not just a modeling one. The alert budget is fixed. Analysts review the top 0.5 to 1.5% of scored transactions. That's it. So the area under the curve isn't just the objective we care about. Rather, the precision at fixed K. To be worth anything, a model has to move real fraud into that slice and do it at the same latency.
So the obvious question here is why not just build a better XGBoost model? We did. Physical point of sale, we went from 40 raw attributes to 87 engineered features. After selection and leakage checks, the true positive rate moves from 35.5 to 36.6. And for online transactions, same story. Nearly 200 engineered features and we pick up about a point. So 2 to 5 times the feature surface, 1 point of TPR. Now that's not a tuning failure. That's the issue. Because every feature we engineered is just a function of the same row and the same card's own history. We are projecting the information we already had.
Tabular features answer one question: What does this transaction look like? They cannot answer the second one: Who is it connected to and what are they doing right now? Rate sharing a device, velocity chains across cards, a merchant that went bad 40 minutes ago. So this lives in edges between the rows. And a model that sees one row at a time is blind to it by design. No matter how many columns we add to it. Okay. So here's the metal model for the rest of the talk. A graph neural network does not learn a node from its own features. It learns from its neighborhood. One layer, three operations.
First, gather. We pull in each neighbor's hidden state across tight edges such as transaction to user, transaction to merchant. Aggregate. We collapse that neighbor set, which is a different size for every node, into a fixed width vector. And we do it with a permutation invariant function. Which function we picked mattered way more than we expected. And Salik is going to come back to that. Third, update. We concatenate that aggregate with the node's own state, push it through learned weights, and then we stack it twice. So every transaction knows about its neighbors and its neighbor's neighbors before the classifier ever sees it.
So do these results work out? Yes, it does. And I want to be precise about what's being compared. We did not replace XGBoost. We fed it. The GNN produces the embeddings. These embeddings go into the same gradient boosted model, and that's what gets scored. So XGBoost alone versus XGBoost plus the graph is what we are comparing. So the three numbers that we would like to highlight. First is 27 to 33% relative lift in the true positive rate over an XGBoost baseline, using the same alert rate, same evaluation window, and same features available to both models. Second, approximately $65 million projected annualized increment of fraud capture across the two card portfolios.
And third, the 3 millisecond P99 in production. So this talk is not just about the numbers. It's about how we got here. Four decisions and order matters. First, in the form of sampling. Fraud is 1 in 2000. So we cannot train at the true distribution. We have to lift the fraud rate, but this is not a tabular dataset where the rows are independent. Every negative we draw takes its edges with it. Downsample the easy way. We keep the neighbors, but lose the neighborhood that makes them worth anything. So holding a soft target fraud rate without really breaking the connectivity was the key.
Second, graph features. Building a leakage safe graph, which is harder than it sounds when your edges carry timestamps plus 32 derived features created to detect fraud. Third, explainability. An analyst won't action a number. This is a regulated work where the score has to come with evidence. Or it does not ship. And serving at 3 milliseconds, two things got us here. The aggregation method and the pivot from node level prediction to edge level. Then at the end, one iteration that we validated after launch was creating and training the model at a rolling window plus an edge time decay approach. And this moved the numbers again.
With this, I would like to hand it over to Salik to get into the nuts and bolts of how we created the graphs, how we optimized them, and what were the engineering decisions that we took in order to make this model more optimized. Hi, I am Mohamed Salik, Principal AI Architect. This is judge a transaction by the company it keeps. How a graph neural network beat XGBoost by over 30% on fraud capture and how we serve it in 3 milliseconds. I will walk through the technical build: sampling, graph construction, serving, and explainability. So let's get into it.
First decision most teams get wrong is data sampling. We hold a soft target fraud rate of 0.5% for card related merchant transactions. About 10 times the 0.05% natural fraud rate. And 6% for online transactions. Again, about 10 times the 0.6% natural fraud rate. Both far gentler than the aggressive over or under sampling a tabular pipeline would use.
Why? Because every selected user's complete transactional history stays in the graph. If you trim a genuine user's history to hit a class ratio, you break the connectivity their neighbors depend on. If a fraud user's own genuine transactions stay in too, as hard negatives, the most useful examples for the decision boundary. If capping ever triggers, only the genuine user's word budget shrinks. Fraud users are never capped. Class imbalance gets handled downstream instead with balanced batch sampling inside the trainer.
Here's the receipt: Average user degree at training time 11.5 to almost 14 for card related merchant transactions. Matches what the model sees at inference. If training time neighborhoods don't match inference time neighborhoods, the model learns the wrong thing. It's stable across all 12 months we tested at natural rates of 0.05% and 0.6%. No vintage drift to correct for.
Second decision: Leakage control. Built into the graph itself, not checked for afterward. Each calendar month is its own disjoint graph. No edge crosses the boundary. The transaction is the central node with typed edges out to its user and its merchant plus a 5 hop follows chain back to its own recent history.
To prevent leakage, a transaction only ever aggregates neighbors with an earlier timestamp. No train/val/test leakage because of the disjoint months. No label leakage—the fraud flag is the target, never a feature or an edge. And no distribution leakage—every scalar and vocabulary is fit on training month only, then frozen. Verified by construction, not by post hoc audit. One more decision before the architecture: 202 model features across three node types. 73 on the user, 109 on the transaction, 20 on the merchant. 32 of the transactional features are derived, purpose-built for fraud, added in three waves.
10 entity history features: past transaction count, days since last activity, the mean, standard deviation, and max of the last five amounts. A behavioral baseline per user and merchant. Eight risk aggregates: an amount JET score against that history, a recent versus past ratio, transactions per day. These flag deviation from the entity's own baseline, not some global threshold. And 14 true rolling window velocity and temporal features: five-minute, one-hour, and 24-hour transactional counts and amounts, distinct counterparties in the last day, seconds since the last transaction, even a country change rate for impossible travel patterns.
Why this matters: the graph tells the model who a transaction is connected to. These derived features tell it how that entity is behaving differently from its own normal. Complementary signals, not redundant ones. Under the hood, this is GraphSAGE architecture: sample, aggregate, combine, embed. Sampling: a fixed recency bias set of the length of neighbors per hop. So one enormous merchant node can't dominate every message. Aggregate: and here's a point worth pausing on. We don't just average. We concatenate three order-invariant statistics: mean, max, and standard deviation. Combine: that with the node's own vector through learned weights.
Embed: a fixed length vector. Two hops. It's inductive—we learn the aggregator weights, not a fixed vector per node. So a brand new user or merchant gets embedded on the fly. No retraining.
Why three statistics instead of one? Let me show you. Picture four neighbors of a transaction. Three look completely normal, scores around 0.1. The fourth is tied to a fraud ring, 0.92. Average those four together and you get 0.32. That ring-linked neighbor just got diluted into the crowd. Take the max instead and it comes through untouched, 0.92. That's why we don't rely on mean alone. A single dangerous neighbor among many genuine ones is exactly the pattern fraud rings create, and mean pooling is precisely the operation that would hide it. Standard deviation adds a third view: how much the neighbors disagree with itself. A uniform, boring neighborhood looks nothing like one with a live outlier in it.
And this costs us nothing extra at serving time: no additional learned parameters, still a fixed size output no matter how many neighbors a node has. One quick hyperparameter note: 128 dimensions is the sweet spot. 64 dimensions is close but slightly underfits. 256 costs more GPU and gives nothing back. Validation performance flattens past 128 and then starts to overfit. It's not a philosophical debate, just a sweep.
Now the actual numbers side by side. For card related merchant transactions, best XGBoost gets 36 percent true positive rate at a fixed 0.5 percent alert rate. GNN plus XGBoost gets 48 percent. A 33 percent relative lift. 5.6 million dollars captured at an 83 percent capture rate. For online transactions: 48 up to 61 percent. 27 percent relative lift. 35.4 million dollars captured at 71 percent. Online transactions is where most of that 65 million dollar savings lives, since it runs at 12 times the fraud rate of card related merchant transactions.
Third decision: explainability. We ran subgraph attribution across 200 flagged cases in each channel. Transaction-to-transaction velocity edges carry 0.94 mean importance in card related transactions, 0.62 in online transactions. And they are the top piece of evidence in all 200 card present cases. Merchant edges matter more in online transactions, 0.19 versus 0.04 in card present, where fraud writes the card's own velocity rather than the acceptance point. That's the difference between the model says 0.91 and the model says 0.91 because of these three linked transactions in the last 40 minutes. Why does this matter? Specifically in fraud, four reasons.
One: regulatory and model risk management. Financial institutions operate under frameworks that require documented rationale for automated decisions. Two: audit trail. When an investigation happens, we can show why a transaction was flagged. Three: false positive triage. A 0.51 score looks identical to a 0.49 score, but the explanations might be completely different. One might be driven by merchant change, the other by velocity. An analyst can tell them apart.
And four: feedback loop quality. When explanation matches what an analyst already suspects, they trust the borderline calls enough to label them correctly, improving the next round of training data. An accurate black box simply doesn't get used.
Now the real fight: serving this solution in 3 milliseconds. Offline, we run a memory-bound GPU sharded layer-wise GraphSAGE forward pass over the entire graph, batched by destination node. So it's numerically identical to a full graph forward, just bounded to a few gigabytes at a time across multiple GPUs. Every user, merchant, and recent transaction gets its per-layer representation cast in a low latency embedding store. Each user's last 5 transactions sit in a ring buffer.
Online at request time, a lightweight assembly step reconstructs the neighbor states straight from that cache. No graph build, no sampling. Recency weighted by an exponential decay that reproduces training exactly. Then the real time scoring service runs only the new transaction's own two-layer forward from those cached states plus the XGBoost head. Nothing that scales with graph size runs per request. Three small tricks make it fast in practice. We pin math library threads to 1 before the heavy libraries even load. That alone is the difference between 30 milliseconds and 1. We warm the model up at startup so the first real request isn't slow.
And today it's a single in-memory process. The same interface maps directly into a distributed cache when we need to scale out. Now there's a catch. That trick requires caching a representation for every node, including every transaction. At production scale that's 60 gigabytes, and it needs expensive high memory serving. With a one-day embedding lag in real time, true positive rate actually drops from 48 to 44%.
The fix: predict on the edge, not the node. Pre-compute embeddings for users and merchants only, never per transaction. That collapses the footprint to 2 to 3 gigabytes, about 20 times smaller, cheap enough to run on the same CPU class as the XGBoost model it sits beside. Here's the actual request path. Pre-processing, cache lookup, and the XGBoost head are all fractions of a millisecond. The GNN's own true two-layer forward is the biggest single piece at 1.61 millisecond. End-to-end 2.3 millisecond at the median, 3.1 at P99, comfortably inside our 3 to 4 millisecond SLA. If we ever need more headroom, that GNN forward is the first thing we would recompile or quantize.
Thank you. We are both happy to go deeper on sampling, graph construction, explainability, or serving. Reach out anytime. Thank you. Which function we picked mattered way more than we expected. And Shalik is going to come back to that. Third, update. We concentrate that aggregate with the node's own state, push it through learn weights, and then we stack it twice. So every transaction knows about its neighbors and its neighbor's neighbor before the classifiers ever sees it. So does these results work out? Yes, it does. And I want to be precise about what's being compared. We did not replace XGBoost. We fed it. The GNN produces the embeddings.
These embeddings goes into the same gradient boosted model, and that's what gets scored. So XGBoost alone versus XGBoost plus the graph is what we are comparing at. So the three numbers that we would like to highlight. First is 27 to 33% related lift in the true positive rate. Over a 2xGBoost baseline, using the same alert rate, same evaluation window, and same features available to both the models. Second, approximately $65 million projected analyzed increment of fraud capture across the two cart portfolios. And third, the 3 millisecond P99 in Burdash. So this talk is just not about the numbers. It's about how we got here. Four decisions and order matters.
First, in the form of sampling. Fraud is 1 in 2000. So we cannot train a lot distribution. We have to lift the fraud rate, but this is not a tabular dataset where the rows are independent. Every negative we draw takes its edges with it. Downsample the easy way. We keep the neighbors, but lose the neighborhood that makes them worth anything. So holding a soft target fraud rate without really breaking the connectivity was the key. Second, graphic features. Building a leakage safe, which is harder than it sounds when your edges carry timestamps plus 32 derived features created to detect fraud. The third, explainability. An analyst won't action a number.
This is a regulated work where the score has to come with an evidence. So, or it does not shift. And serving at 3 milliseconds, two things got us here. The aggregation method and the pivot from the node level prediction to edge level. Then at the end, one iteration that we validated after launch was creating and training the model at a rolling window plus an edge time decay approach. And this moved the numbers again. With this, I would like to hand it over to Shari to get into the nuts and bolts of how did we create the graphs? How did we optimize the same? And what were the engineering decisions that we have taken in order to make this model more optimized?
Hi, I am Mohamed Sarik, Principal AI Architect. This is judge a transaction by the company it gives. How a graph neuron network beat ExeBoost by over 30% on fraud capture and how we serve it in 3 milliseconds. I will walk through the technical build, sampling, graph construction, serving and explainability. So, let's get into it. First decision most teams get wrong is the data sampling. We hold a soft target fraud rate of 0.5% for card related merchant transactions. About 10 times the 0.05% natural fraud rate. And 6% for online transactions. Again, about 10 times the 0.6% natural fraud rate.
Both far gentle than the aggressive over or under sampling a tabular pipeline would use. Why? Because every selected user's complete transactional history stays in the graph. If you trim a genuine user's history to hit a class ratio, you break the connectivity their neighbors depend on. If a fraud user's own genuine transactions stay in too. As hard negatives, the most useful example for the decision boundary. If capping ever triggers, only the genuine user's word budget shrinks. Fraud users are never capped. Class imbalance gets handled downstream instead with balanced batch sampling inside the trainer. Here's the receipt.
Average user degree at training time 11.5 to almost 14 for card related merchant transactions. Matches what the model sees at inference. If training time neighborhood don't match inference time neighborhood, the model learns the wrong thing. It's stable across all 12 months we tested at natural rate of 0.05% and 0.6%. No vintage drift to correct for. Second decision. Leakage control. Built into the graph itself not checked for afterward. Each calendar month is its own disjoint graph. No edge over crosses the boundary. The transaction is the central node with types edges out to its user and its merchant plus a 5 hop follows chain back to its own recent history.
As once know know know know know know know know know know know know know know know know know know know know know know know know know know know know know know know know know know know know know know know know know know know know know know know know know know know know know know know know know know know know know know know know know know know know know know know know know know know know know know know know know know know know know know know know know know know know know know know know know know know know know know know know know know know know know know know know know know know know know know know know know know know know know know know know know know know know know know know know know know know know know know know know know know know know know know know know know know know know know know know know know know know know know know know know know know know know know know know know know know know know know know know know know know know know know know know know know know know know know know know know know know know know know know know know know know know know know know know know know know know
leakage a transaction only ever aggregates neighbors with an earlier timestamp no train val test leakage because of the disjoint month no label leakage the fraud flag is the target never a feature or an edge and no distribution leakage every scalar and vocabulary is fit on training month only then frozen four four four verified by construction not by post hoc audit one more decision before the architecture 202 model features across three node types 73 on the user 109 on the transaction 20 on the merchant 32 of the transactional features are derived purpose built for fraud added in three waves 10 entity history features past transaction
count days since last activity the mean standard deviation and max of the last five amounts a behavioral baseline per user and merchant eight risk aggregates an amount jet score against that history a recent versus past ratio transactions per day these flag deviation from the entity's own baseline not some global threshold and 14 true rolling window velocity and temporal features five minute one hour and 24 hour transactional counts and amounts distinct counterparties in the last day seconds since the last transaction even a country change rate for impossible travel patterns why this
matters the graph tells the model who a transaction is connected to these derived features tell it how that entity is behaving differently from its own normal complementary signals not redundant ones under the hood this is graph says architecture sample aggregate combine embed sampling a fixed recency bias set of the length of neighbors per hop so one enormous merchant node can't dominate every message aggregate and here's a detailed worth pausing on we don't just average we concatenate three order invariant statistics mean max and standard deviation combine that with the node's own vector through learned
weights embed a fixed length vector two hops it's inductive we learn that the aggregator weights not a fixed vector per node so a brand new user or merchant gets embedded on the fly no retraining why three statistics instead of one let me show you picture four neighbors of a transaction three look completely normal scores around 0.1 the fourth is tied to a the fraud ring 0.92 average those four together and you get 0.32 that ring linked neighbor just got diluted into the crowd take the max instead and it comes through untouched 0.92 that's why we don't rely on mean alone a single
dangerous neighbor among many genuine ones is exactly the pattern fraud rings create and mean pooling is precisely the operation that would hide it standard deviation adds a third view how much the neighbor disagree with itself a uniform boring neighborhood looks nothing like one with a live outlier in it and this cost us nothing extra at serving time no additional learned parameters still a fixed size output no matter how many neighbors a node has one quick hyper parameter note 128 dimension is the sweet spot 64 dimension is close but slightly under fit 256 cost more gpu and gives you nothing back validation performance flattens past 128 and then starts to over fit
it's not a philosophical debate just a sweep now the actual numbers side by side for card related merchant for the card transactions best exibus gets 36 percent true positive rate at a fixed 0.5 percent alert rate gnn plus exibus gets 48 percent a 33 percent relative lift 5.6 million dollars captured at an 83 percent capture rate for online transaction for online transaction 48 up to 61 percent 27 relative lift 35.4 million dollar captured at 71 percent online transaction is where most of that 65 million dollar savings lives since it runs at 12 times the fraud rate of card related merchant transactions
3rd decision explainability we ran sub graph attribution across 200 flag cases in each channel transaction to transaction velocity edges carry 0.94 mean importance in card related transactions 0.62 in online transactions and they are the top piece of evidence in all 200 card present cases merchant edges matter more in online transactions 0.19 versus 0.04 in card present where fraud writes the cards own velocity rather than the acceptance point that's the difference between the model says 0.91 and the model says 0.91 because of these three linked transaction in the last 40 minutes
why does this matter so much specifically in fraud four reasons one regulatory and model risk management financial institutions operate under frameworks that require documented rationale for automated decision injuries injuries injuries injuries injuries injuries injuries injuries injuries injuries injuries injuries And 4. Feedback loop quality. When explanation match what an analyst already suspects, they trust the borderline calls enough to label them correctly, improving the next round of training data. An accurate black box simply doesn't get used.
Now the real fight. Serving these solution in 3 milliseconds. Offline, we run a memory bound GPU sharded layer wise graph says forward pass over the entire graph batched by destination node. So it's numerically identical to a full graph forward. Just bounded to a few gigabyte at a time across multiple GPUs. Every user, merchant and recent transaction gets its per layer representation cast in a low latency embedding store. Each user's last 5 transactions sit in a ring buffer.
Online at request time, a lightweight assembly step reconstructs the neighbor states straight from that cache. No graph build, no sampling. Recency weighted by an exponential decay that reproduces training exactly. Then the real time scoring services runs only the new transactions own to layer forward from those cache states plus the exibus head. Nothing that scales with graph size runs per request. Three small tricks make it fast in practice. We pin math library thread holes to 1 before the heavy libraries even load. That alone is the difference between 30 milliseconds and 1. We warm the model up at startup so the first real request isn't slow.
And today it's a single in-memory process. The same interface maps directly into a distributed cache when we need to scale out. Now there's a catch. That trick requires caching a representation for every node including every transaction. At production scale that's 60 gigabyte and it needs expensive high memory serving. With a one day embedding lag in real time, true positive rate actually drops from 48 to 44%. The fix predict on the edge, not the node. Pre-compute embeddings for user and merchants only, never per transaction. That collapses the footprint to 2 to 3 gigabytes, about 20 times smaller, cheap enough to run on the same CPU class as the exibus model.
It sits beside.
Here's the actual request path. Pre-processing, cache lookup and the exibus head are all fractions of a millisecond. The GNN's own true two-layer forward is the biggest single piece at 1.61 millisecond. End-to-end 2.3 millisecond at the median 3.1 at P99 comfortably inside our 3 to 4 millisecond SLA. If we ever need more headroom, that GNN forward is the first thing we would recompile or quantize.
Thank you. We are both happy to go deeper sampling, graph construction, explainability or serving. Reach out anytime. Thank you.