读见

从交易关系中识别欺诈:EXL 的图神经网络实战

原题Judge a Transaction by the Company It Keeps — Somya Rai & MD Sharique, EXL

约 12 分钟原文英文已翻译

视频由 YouTube 提供

看前速览

3 个要点

EXL 工程师解释了如何在固定告警预算下,用带时间约束的交易图提升欺诈识别,并处理采样、数据泄漏、可解释性和低延迟在线评分。

  1. 图关系带来行特征没有的信号

    交易本身的字段相同,关联商户、用户和近期欺诈信息却能改变风险判断。

  2. 在实际告警预算内评估

    比较时固定告警率,检验是否有更多真实欺诈进入分析师有限的审阅队列。

  3. 服务设计决定模型能否发挥价值

    避免时间泄漏的图构造、边归因和边级评分,同时解决审阅、延迟与存储问题。

完整摘要

Rai 和 Sharique 展示:同一笔交易的行级特征不变,一旦模型看见近期关联欺诈,风险分数就可能从 0.04 升到 0.91。由于分析师只能审阅得分最高的约 0.5% 至 1.5% 交易,他们强调固定告警率下的真正例命中率,而不是笼统的总体指标。团队在 XGBoost 基线上加入图表示,报告实体卡交易和线上交易两类组合约 27% 至 33% 的相对检测提升;年度欺诈挽回金额是预测值,并非已实现收益。工程部分介绍了在处理类别极不平衡时保留图连接的采样方法、按月隔离且考虑时间的图结构、GraphSAGE 风格的均值/最大值/标准差聚合、供分析师使用的边归因,以及缓存表示的在线服务路径。团队还说明,改用边预测而非为每笔交易保存节点表示,有助于降低存储和数据陈旧问题,同时维持毫秒级延迟。这是一份细致的一手系统报告,但转录没有提供底层数据、独立复现或全部财务假设。

章节

文字稿

查看原文

简要描述Brief Description

通过交易所关联的公司来评判一笔交易——Somya Rai 与 MD Sharique,EXLJudge a Transaction by the Company It Keeps — Somya Rai & MD Sharique, EXL

目录Table of Contents

  • Somya Rai:交易邻域中的欺诈信号
    Somya Rai: fraud signals in transaction neighborhoods
  • 为什么更多表格特征会触及上限
    Why more tabular features hit a ceiling
  • 从交易邻域中学习
    Learning from a transaction neighborhood
  • 四项工程决策
    Four engineering decisions
  • MD Sharique:在不破坏连通性的情况下进行采样
    MD Sharique: sampling without breaking connectivity
  • 月度图表和泄漏控制措施
    Monthly graphs and leakage controls
  • 实体历史与时间特征
    Entity history and temporal features
  • 采用均值、最大值和标准差的 GraphSAGE
    GraphSAGE with mean, max and standard deviation
  • 在固定告警率下比较检测效果
    Comparing detection at fixed alert rates
  • 供分析师审核的边缘归因
    Edge attribution for analyst review
  • 缓存表示与在线评分
    Cached representations and online scoring
  • 从节点预测转向边预测
    Moving from node to edge prediction

Somya Rai:交易邻域中的欺诈信号Somya Rai: fraud signals in transaction neighborhoods

大家好,我是 Sam Ray,AI 工程副总裁。这里展示的是两个分数,都是同一笔交易。左边是一笔单独的线上购物交易。我们考察消费金额、商户、MCC 代码、设备类型或交易时间等信息,完成特征工程后总共有 198 个特征,评分为 0.04,远低于我们会发出警报的任何阈值。在我们看来,这笔交易很正常。 右边是同一笔交易、同一个特征向量。这一行里的任何一点都没有变化。唯一改变的是,我们允许模型查看它所处的邻域。在过去一小时内,四笔相关交易中有三笔涉及用户、商户以及另外两笔交易,都被判定为欺诈。现在分数变成了 0.91。也就是说,信号从来不在这一行里,而是在这些关联边上。Hi, I'm Sam Ray, VP of AI engineering. What we see here are two score, same transaction both the times. On the left, a single online purchase where we look at the amount spent, who is the merchant, MCC code, device type or time of the 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 bite 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 flat fraud within the last hour. Now the score is 0.91. So the signal was never in the row, it was in the edges.

因此,欺诈并不是交易本身的属性,而是交易所处邻域的属性。让我来描述一下这个问题的形态,因为这是两个问题共用一个名字。商户销售点的线下交易,天然欺诈率大约为 0.05%,也就是每 2,000 笔中有 1 笔。这类交易信号集中、噪声低,欺诈主要体现在卡片自身的交易频率上。相比之下,线上交易的欺诈率为 0.6%,高出 12 倍;交易量更大、噪声更多,而且更多信号存在于商户及其邻域环境中。这两个交易组合的基础欺诈率不同,信号结构也不同。因此在实际应用中,需要的是两个模型,而不是一个。还有一个约束,让这成为一个工程问题,而不只是建模问题:告警预算是固定的。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 a merchant point of sale roughly has 0.05% natural fraud rate. That is one in 2,000. These are tight low noise signal and fraud largely resigns the card's own transaction velocity. Whereas online transactions have 0.6% of the fraud 12 times higher with higher volume noisier and far more of it of 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 as an engineering problem not and not just the modeling one. The alert budget is fixed.

分析师只会审核评分最高的 0.5% 到 1.5% 的交易,仅此而已。因此,我们关注的目标不只是曲线下面积,还包括固定 K 值下的精确率。模型要真正发挥价值,就必须把真实欺诈交易排进这一小部分,同时保持相同的延迟。Analysts review the top 0.5 to 1.5% of the score transaction. That's it. So the area under the curve isn't just the objective we care about, rather the precision at a fixed K. To be worth anything, a model has to move a real fraud into that slice and do it at the same latency.

为什么更多表格特征会遇到瓶颈Why more tabular features hit a ceiling

所以显而易见的问题是:为什么不直接构建一个更好的 HD Boost 模型?我们先处理了线下销售点数据,将 40 个原始属性扩展为 87 个工程特征。经过特征筛选和数据泄漏检查后,正例率从 35.5 提升到了 36.6。在线交易数据也是一样的情况。我们构造了近 200 个工程特征,结果只提升了大约一个百分点。也就是说,特征覆盖面扩大了两到五倍,DPR 却只提高了一个百分点。这不是调参失败,对吧?这是性能上限,因为我们构造的每个特征都只是基于同一行数据和安全卡自身的历史记录计算出来的。我们只是在投影已有的信息。表格特征只能回答一个问题:这笔交易看起来是什么样的?它们无法回答第二个问题:这笔交易与谁有关联,他们此刻在做什么?So the obvious question here is why not just build a better HD boost model. We did physical point of sale. We went from the 40 raw attributes to 87 engineered features. After selection and the leakage checks, the two positive rates moves from 35.5 to 36.6. And for the online transaction, same story. Nearly 200 engineered features and we pick up about a point. So you know two to five times the feature surface one point of DPR. Now that's not a tuning failure, right? That's ceiling because every feature we engineered is just a function of the same row and the safe card's own history. We are projecting the information we already had. Tableau features answers 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?

范围共享跨购物车的设备速度链。一个商户去了,而那件事在40分钟前出了问题。这存在于行与行之间的边中,而一个一次只看一行的模型是……Range sharing a device velocity chains across cart. A merchant went that went bad 40 minutes ago. This lives in edges between the rows and a model that sees one row at a time is

从交易邻域中学习Learning from a transaction neighborhood

它在设计上就无法感知这一点,无论我们给它增加多少列都一样。好,下面是接下来这部分内容的核心思路:图神经网络并不是从节点自身的特征中学习,而是从它的邻域中学习。一层包含三个操作。第一步,收集。我们沿着边(例如“交易—用户”和“交易—商户”)引入每个邻居的隐藏状态。第二步,聚合。我们把邻居集合——你知道,每个节点的邻居数量都不一样——压缩成一个固定宽度的向量,并通过一个置换不变函数来完成。我们选用哪种函数,比预想的要重要得多,后面还会再谈到这一点。第三步,更新。我们将聚合结果与节点自身的状态结合起来,输入经过学习的变换,然后将这一层堆叠两次。这样,在分类器看到每个交易节点之前,它就已经包含了关于邻居及邻居的邻居的信息。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 feature. It learns from its its neighborhood. One layer, three operations. First, gather. We pull in each neighbor's hidden states across the tie edges such as transaction to user, transaction to merchant aggregate. We collapse that neighbor set which is you know a different size for every node one into a fixed width vector and we do it with a permutation in function. Which function we picked mattered way more than we expected and charik is going to come back to that. Third update. We concentrate that aggregate with the node's own state, push it through learns and then we stack it twice. So every transaction knows about its neighbors and its neighbors neighbor before the classifiers ever sees it.

那么,这些结果是否有效?是的,确实有效。我想准确说明一下我们比较的内容。我们没有替换 XGBoost,而是把它喂入了数据。GNN 生成嵌入向量,再把这些嵌入向量的分数输入同一个梯度提升模型,由它进行评分。因此,我们比较的是单独使用 XGBoost,与使用 XGBoost 加上 GNN。 首先,我们想重点介绍三个数字:在相同的警报率、相同的评估时间窗口,以及两个模型都能使用相同特征的条件下,相对于双腿基线,真正例率提升了约 27% 到 30%(相对提升约 33%)。其次,在两个银行卡业务组合中,预计每年可额外拦截约 6,500 万美元的欺诈交易。第三,P99 延迟为 3 毫秒。 所以,这场演讲讲的不只是这些数字,更是我们如何走到这一步的。So does these results work up? Yes, it does. And I want to be precise about what's being compared. We did not replace XG post. We fed it. The genet produces the embeddings. these embedding scores into the same gradient boosted model and that's what can score. So XG boost alone versus XG boost plus the curve is what we are comparing at. So the three numbers that we would like to highlight first is 27 to 30% 33% related lift in the true positive rate over a two leg baseline using the same alert rate same evaluation window and same features available to both the models. Second, approximately $65 million projected annualized incremental fraud capture across the two cardboard or third the 3 millisecond P99 in barash. So this talk is just not about the numbers, it's about how we got here

四项工程决策Four engineering decisions

四项决策,顺序很重要。首先,也是最重要的一项,欺诈样本比例是 1/2,000,因此我们不能直接用原始分布训练。我们必须提高欺诈样本率,但这并不是一个行与行相互独立的表格数据集。每删掉一个负样本,它关联的边也会随之消失。用简单的方式进行下采样,虽然能保留标签,却会丢失那些让标签有价值的邻域信息。因此,关键在于维持一个适中的目标欺诈率,同时尽量不破坏图的连通性。其次,是在避免数据泄漏的前提下构建图特征。这说起来容易,做起来难,因为边带有时间戳,还有 32 个为检测欺诈而创建的衍生特征。第三,可解释性:分析师不会根据一个数字采取行动。这是一项受监管的工作,评分必须附带证据,否则就无法上线。服务响应时间则是 3 毫秒。four decisions and order matters. First and the foremost sampling fraud is 1 in 2,000. So we cannot train a raw distribution. We have to lift the thought rate but this is not a tablet data set where the rows are independent. Every negative we drop takes its edges with it. Down sample the easy way we keep the labels 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, graphing features building at leakage state which is harder than it sounds when your edges carry time stamps plus 32 derived features created to detect fraud. The third explanability 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 ship and serving at 3 milliseconds.

有两件事让我们走到了今天:聚合方法,以及从节点级预测转向边级预测。最后,发布后我们验证过的一次迭代,是在滚动窗口上创建并训练模型,再加上 edge himed DK 方法;这又让指标发生了变化。接下来,我想把时间交给沙希,让他深入讲讲我们是如何创建图的,以及我们是如何……Two thing 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 training the model at a rolling window plus an edge himed DK approach and this move the numbers again with this I would like to hand it over to Shahi to get into the nuts and bolts of how did we create the graphs how did

MD Sharique:在不破坏连通性的情况下进行采样MD Sharique: sampling without breaking connectivity

我们也进行了同样的优化,那么为了让这个模型更加优化,我们采取了哪些工程决策?we optimize the same and what were the engineering decisions that we have taken in order to make this model more optimized.

主持人:大家好,我是 Mohammed Sarik,首席 AI 架构师。本次主题是“判断一笔交易,要看它与谁为伍”。我将介绍图神经网络如何将欺诈识别率提升 30% 以上,以及我们如何在 3 毫秒内完成推理服务。我会依次讲解技术构建、采样、图构建、服务和可解释性。我们开始吧。 首先,大多数团队最容易做错的决策是数据采样。对于银行卡相关的商户交易,我们将欺诈率的软目标设为 0.5%,约为 0.05% 自然欺诈率的 10 倍;对于线上交易,则设为 6%,同样约为 0.6% 自然欺诈率的 10 倍。这两种做法都比表格数据流水线中采用的激进过采样或欠采样温和得多。为什么?因为每个被选中用户的完整交易历史都会保留在图中。如果为了达到类别比例而删减真实用户的交易历史,就会破坏其邻居所依赖的连接关系。Host: Hi I am Mohammed Sarik principal AI architect. This is judge a transaction by the company it gives. How a graph neural network bid exib boost 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 explanability. So let's get into it. First decision most teams get wrong is the data sampling. We hold a soft target fraud rate of.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.

而欺诈用户自身的真实交易也会保留下来,作为硬负样本——这是划定决策边界最有用的例子。如果触发上限,只有真实用户的节点预算会缩减。类别不平衡则在后续通过训练器内部的均衡批次采样来处理。以下是实测结果:训练时的平均用户度数为 11.5 到近 14,与模型在推理时看到的、与银行卡相关的商户交易邻域相匹配。如果训练时的邻域与推理时不一致,模型就会学到错误的东西。在我们测试的全部 12 个月中,即使自然发生率为 0.05% 和 0.6%,结果也保持稳定。无需校正窗口漂移。And a fraud user's own genuine transactions stay in two. As hard negatives, the most useful example for the decision boundary. If capping ever triggers, only the genuine users 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 and a half 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 windage drift to correct for

月度图表与泄漏控制措施Monthly graphs and leakage controls

第二项决策是将泄漏控制内置于图本身,而不是事后再进行检查。每个日历月都是一个独立的图,边不会跨越月份边界。交易是中心节点,通过不同类型的边连接到其用户和商户。此外,还有一条五跳的 follows 链,回溯到该交易自身近期的历史记录。由于不同月份之间永不相连,因此信息无法从一个数据集划分泄漏到另一个划分中。这种构造自然带来四项属性:没有未来信息泄漏,交易只会聚合时间戳早于自身的邻居;没有训练集、验证集和测试集之间的泄漏,因为月份彼此独立;没有标签泄漏,欺诈标记是目标,而绝不会作为特征或边;也没有分布泄漏,每个标量和词汇表都只在训练月份上拟合,随后冻结。四项全部满足,构造本身即可保证。second decision leakage control built into the graph itself not checked for afterward. Each calendar month is its own disjoint graph. No edge overcrosses the boundary. The transaction is the central node with types out to its user and its merchant. Plus a five hop follows chain back to its own recent history. Because months never connect, there's no path for information to leak from one split into another. Four properties fall out of that construction. No future leakage. A transaction only ever aggregates neighbors with an earlier time stamp. No train val test leakage because of the disjointed 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 for four verified by construction

实体历史记录和时间特征Entity history and temporal features

而不是事后审计。在讨论架构之前,还有一个决定。模型在三种节点类型上共有 202 个特征:用户节点有 73 个,交易节点有 109 个,商户节点有 20 个。其中 32 个交易特征是派生特征。我们分三轮添加了专为欺诈检测设计的特征。第一轮是 10 个实体历史特征:历史交易次数、距上次活动的天数、最近五笔交易金额的均值、标准差和最大值,以及针对每个用户和商户建立的行为基线。第二轮是 8 个风险聚合特征,包括基于该历史记录计算的金额 z 分数、近期与过去的比率,以及每日交易次数。这些特征标记的是偏离实体自身基线的情况,而不是偏离某个全局阈值。第三轮是 14 个真正的滚动窗口速度和时间特征,包括 5 分钟、1 小时和 24 小时内的交易次数与金额、过去一天内不同交易对手的数量、距上次交易的秒数,甚至还有用于识别不可能旅行模式的国家变更率。not by post hawk 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. 5 minute, 1 hour, and 24hour 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 complimentary signals not

使用均值、最大值和标准差的 GraphSAGEGraphSAGE with mean, max and standard deviation

底层存在冗余项。这就是 GraphSAGE 架构:采样、聚合、组合、嵌入——每一跳都采样一组固定的、带有近期性偏置的邻居。这样一来,单个规模庞大的商户节点就无法主导每条消息。聚合。这里有个细节值得停下来仔细看看。我们不只是求平均,而是拼接三种与顺序无关的统计量:均值、最大值和标准差。再通过学习到的权重,将它们与节点自身的向量组合起来,为每一跳生成固定长度的向量。这种方法具有归纳性。我们学习的是聚合器的权重,而不是为每个节点学习一个固定向量。因此,一个全新的用户或商户也能即时获得嵌入,无需重新训练。为什么要用三种统计量,而不是一种?我来演示一下。想象一笔交易有四个邻居,其中三个看起来完全正常,分数在 0.1 左右。第四个则与一个欺诈团伙有关。redundant ones under the hood. This is graph says architecture sample aggregate combine embed sampling a fixed recency bias set 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 nodes own vector through learn weights. Embed a fixed length vector to hops. It's inductive. We learned that the aggregator waits 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。把这四个值取平均,结果是 0.32。那个与欺诈团伙有关联的邻居就这样被稀释在群体中。取最大值则能让它原样显现出来:0.92。这就是为什么我们不能只依赖均值。多个真实邻居中夹杂着一个危险邻居,正是欺诈团伙会制造的模式;而均值池化恰恰会把它掩盖掉。标准差则提供了第三种视角:邻居之间有多大差异。一个均匀而平淡的邻域,与包含一个活跃离群点的邻域截然不同。而且,这不会增加任何推理时的开销。没有额外的学习参数。无论一个节点有多少邻居,输出大小始终固定。简单说一下超参数:128 维是最佳选择。64 维也很接近,但略微欠拟合;256 维会消耗更多 GPU 资源,却没有任何回报。验证性能在超过 128 维后趋于平缓,随后开始……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. The 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 hyperparameter 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

在固定警报率下比较检测效果Comparing detection at fixed alert rates

overfeit 这不是一场哲学辩论,只是一次全面比较。现在来看看并排对比的实际数据。对于与银行卡相关的商户交易,表现最佳的 Exib Boost 在固定 0.5% 的警报率下,真阳性率为 36%。GNN 加 Exiboost 则达到 48%。相对提升 33%,以 83% 的捕获率捕获了 5600 万美元中的 5.6 6 百万美元。对于在线交易,真阳性率从 48% 提升至 61%。相对提升 27%,以 71% 的捕获率捕获了 3540 万美元。大部分 6500 万美元的节省来自在线交易,因为它运行着。。。overfeit It's not a philosophical debate, just a sweep. Now the actual numbers side by side. For card related merchant transactions, best Exib Boost gets 36% true positive rate at a fixed 0.5% alert rate. GNN plus Exiboost gets 48%. A 33% relative lift, $5.6 6 million captured at an 83% capture rate. For online transactions, 48% up to 61%. 27% relative lift, $35.4 million captured at 71%. Online transaction is where most of that $65 million savings lives since it runs

供分析师审核的边缘归因Edge attribution for analyst review

其欺诈率是银行卡相关商户交易的 12 倍。第三,决策可解释性。我们对每个渠道的 200 个标记案例进行了子图归因分析。在银行卡相关交易中,交易间速度边的平均重要性为 0.94;在线交易中为 0.62,而且在全部 200 个面对面刷卡案例中,它们都是最主要的证据。商户边在在线交易中更重要,重要性为 0.19;而在面对面刷卡交易中只有 0.04,因为欺诈行为会体现为银行卡自身的交易速度,而不是受理点的情况。这就是“模型给出 91 分”与“模型之所以给出 91 分,是因为过去 40 分钟内这三笔交易彼此关联”之间的区别。为什么这一点在欺诈检测中尤为重要?有四个原因。第一,监管与模型风险管理。金融机构必须遵循相关框架,对自动化决策的依据进行记录。at 12 times the fraud rate of card related merchant transactions. Third decision explanability. We ran subgraph attribution across 200 flag cases in each channel. Transaction totaction 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 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 91 and the model says 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 rational for automated decision.

这并非可有可无。第二,分析师的信任度和调查速度:无法解释的高分要么被草率盖章通过,要么被忽略。边级证据能将从头重新评估案件,转变为验证三笔关联交易。第三,模型调试:归因模式能让我们在生产环境中的性能明显下降之前,发现模型何时依赖虚假或逐渐衰减的信号。第四,反馈闭环质量。当解释与分析师原本的怀疑相符时,他们就会足够信任那些处于临界点的判断,并正确标注,从而改进下一轮的This isn't optional. Two, analyst trust and investigation speed and unexplained high score gets rubber stamped or ignored. Edge level evidence turns recomputee the case from scratch into verified three linked transactions. Three, model debugging attribution patterns show us when the model leans on a speurious or decaying signal before performance visibly drops in production. And four, 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

缓存表示与在线评分Cached representations and online scoring

训练数据。一个准确的黑盒模型如果无法实际使用,也就毫无意义。真正的难题,是在 3 毫秒内为这些方案提供服务。 离线阶段,在显存受限的 GPU 上,将图分片,并按层执行图级前向传播:按目标节点分批处理整个图,因此数值结果与在完整图上执行前向传播完全相同,同时每次只需在多张 GPU 上处理几 GB 的数据。每位用户、商户和近期交易的各层表示都会缓存到低延迟嵌入存储中。在线请求时,每位用户最近五笔交易保存在环形缓冲区中。轻量级的组装步骤会直接从这些缓存中重建邻居状态。无需重新构建图,也无需采样。通过指数衰减对近期程度进行加权,从而精确复现训练过程。随后,实时评分服务只需基于这些缓存状态,对新交易执行其自身的两层前向传播,再加上外生特征头。training data. An accurate black box simply doesn't get used. Now the real fight serving these solution in 3 milliseconds. offline van memory bound GPU sarded layer wise graph says forward pass over the entire graph bashed 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 five transaction sit in a ring buffer online at request time. A lightweight assembly step reconstructs the neighbor states straight from that cast. No grab build, no sampling. Recense weighted by an exponential decay that reproduces training exactly. Then the realtime scoring services runs only the new transactions own two layer forward from those cache states plus the exeost head.

每个请求都不会执行任何随图规模增长的操作。三个小技巧让它在实践中变得很快。我们在加载大型库之前,就将数学库的线程池大小设为 1。仅此一项,就能把耗时从 30 毫秒降到 1 毫秒。我们会在启动时预热模型,这样第一个实际请求就不会变慢。而且目前它只是一个单进程的内存实现。Nothing that scales with graph size runs per request. Three small tricks make it fast in practice. We pin math library thread pulls to one before the heavy libraries even load. That alone is the difference between 30 milliseconds and one. We warm the model up at startup so the first real request isn't slow. And today it's a single in-memory process.

从节点预测转向边预测Moving from node to edge prediction

当需要横向扩展时,同一接口可以直接映射到分布式缓存。但这里有个问题:这种方法要求在生产规模下,为每个节点缓存一个表示,包括每笔交易。这样需要 60 GBTE 的存储,还需要昂贵的高内存在线服务,并且实时场景中的嵌入会滞后一天。真正例率实际上会从 48% 降至 44%。解决办法是在边缘侧而非节点侧进行预测。只需预先计算用户和商家的嵌入,绝不针对每笔交易单独计算。这样就能将占用量缩减至 2 到 3 GB,大约小了 20 倍,成本也足够低,可以与其配套的 XGBoost 模型运行在同一档次的 CPU 上。NVIDIA 也独立推荐了相同的方法,并预计其表现可与节点模型相当。下面是实际的请求处理路径:预处理、缓存查找和 XGBoost 预测头所需的时间都不到一毫秒。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 GBTE 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. premputee embeddings for user and merchants only, never per transaction. That collapses the footprint to two to three gigabytes, about 20 times smaller, cheap enough to run on the same CPU class as the Exib Boost model it sits beside. Nvidia independently recommended the same approach and expects it to perform on par with the node model. Here's the actual request path. pre-processing, cast lookup, and the exubost head are all fractions of a millisecond.

GNN 自身真正的两层前向计算是占比最大的一项,为 1.61 毫秒。端到端延迟中位数为 2.3 毫秒,P99 为 3.1 毫秒,轻松满足我们 3 到 4 毫秒的 SLA。如果我们需要更大的余量,首先会重新编译或对 GNN 前向计算进行 contise。感谢观看。我们很乐意进一步探讨采样、图构建、可解释性或服务部署。欢迎随时联系。谢谢。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 contise. Thank you for watching. We are both happy to go deeper sampling, graph construction, explanability or serving. Reach out anytime. Thank you.