{
  "video": {
    "id": "SHvwutPSeZg",
    "title": "Judge a Transaction by the Company It Keeps — Somya Rai & MD Sharique, EXL",
    "duration": 1228,
    "upload_date": null,
    "channel": "AI Engineer",
    "source": "AI Engineer",
    "event_format": ""
  },
  "analysis": {
    "video_id": "SHvwutPSeZg",
    "title": "Judge a Transaction by the Company It Keeps — Somya Rai & MD Sharique, EXL",
    "one_liner": "EXL fed embeddings from a GraphSAGE-style GNN into their existing XGBoost fraud model. At a fixed 0.5% alert rate, the true positive rate rose from 36% to 48% for card-present transactions and from 48% to 61% for online ones, with a projected $65M a year in extra fraud caught. It serves at 3.1 ms P99 because it predicts on edges and caches embeddings only for users and merchants.",
    "summary": "The speakers argue that fraud is not a property of a single transaction but of the neighbourhood it sits in. Tabular feature engineering hits a ceiling: going from 40 to 87 features moved the true positive rate only from 35.5 to 36.6, because every new feature still describes the same row and the card's own history. Their answer was a GNN whose embeddings feed the same gradient-boosted model. The talk walks through four ordered decisions: connectivity-preserving sampling, leakage control built into the graph, explainability through edge attribution, and serving in about 3 ms by predicting on the edge rather than the node.",
    "key_points": [
      "Demo: one transaction with 198 features scores 0.04 on its own. Let the model see its neighbourhood, where 3 of 4 neighbours were flagged as fraud in the last hour, and the same transaction scores 0.91.",
      "There are two problems with one name, so they built two models. Card-present fraud runs at 0.05% (1 in 2,000) and is driven by the card's own velocity. Online fraud runs at 0.6% (12x higher) and is noisier, with more of the signal in merchant and neighbour context. Analysts review only the top 0.5–1.5% of scores, so the target is precision at a fixed K, not AUC.",
      "Sampling uses a soft target fraud rate of about 10x natural (0.5% card-present, 6% online). Every selected user's full history stays in the graph. A fraud user's genuine transactions are kept as hard negatives, and fraud users are never capped. Class imbalance is handled downstream with balanced batch sampling. Average user degree at training (11.5 to almost 14) matches inference and was stable across 12 months.",
      "Leakage is ruled out by construction. Each calendar month is a separate graph. Transactions only aggregate neighbours with earlier timestamps. The fraud flag is never a feature or an edge. Scalers and vocabularies are fit on the training month only and then frozen.",
      "The model has 202 features across three node types (73 user, 109 transaction, 20 merchant). 32 of them are derived and were added in three waves: 10 entity-history features, 8 risk aggregates (such as an amount z-score against the entity's own baseline), and 14 rolling-window velocity features over 5 min, 1 h and 24 h, including a country-change rate for impossible travel.",
      "The architecture is GraphSAGE-style with a fixed, recency-biased neighbour sample, two hops and 128-dimensional embeddings. Aggregation concatenates mean, max and standard deviation, because a mean dilutes a single fraud-ring neighbour (0.92 becomes 0.32) while max keeps it intact, at no extra parameter cost. In their sweep, 128 dimensions was best: 64 slightly underfit, and 256 cost more GPU for no gain.",
      "Explainability came from subgraph attribution on 200 flagged cases per channel. Transaction-to-transaction velocity edges had mean importance 0.94 for card-present and 0.62 for online, and were the top evidence in all 200 card-present cases. Merchant edges mattered more online (0.19 vs 0.04).",
      "Serving: embeddings are precomputed offline in a sharded, layer-wise pass and cached, and recent transactions sit in a ring buffer. Caching every node would need 60 GB with a one-day lag, and TPR would drop from 48% to 44%. Predicting on the edge, with cached embeddings for users and merchants only, cuts this to 2–3 GB (about 20x smaller) and runs on CPU. Latency is 2.3 ms median and 3.1 ms P99; the GNN's two-layer forward pass takes 1.61 ms of that."
    ],
    "takeaways": [
      "If adding features to a tabular model barely moves the metric, look for signal in the relationships between rows (shared devices, velocity chains, merchants that recently went bad) before tuning further. Feed GNN embeddings into the existing model rather than replacing it.",
      "Downsample graph data gently. Keep whole user histories and connectivity, keep fraud users' genuine transactions as hard negatives, handle class imbalance with balanced batches in the trainer, and check that training-time node degree matches inference.",
      "Build leakage control into how the graph is constructed: separate graphs per time period, edges that only point backward in time, and preprocessing fit on training data and then frozen.",
      "Aggregate neighbours with mean, max and standard deviation, not mean alone, so a single dangerous neighbour isn't averaged away.",
      "For low-latency serving, predict on the edge with cached user and merchant embeddings, and pin math-library thread pools to one before the heavy libraries load. Per the speakers, that alone made the difference between 30 ms and 1 ms."
    ],
    "topics": [
      "fraud detection",
      "graph neural networks",
      "xgboost",
      "class imbalance",
      "data leakage",
      "explainability",
      "low-latency serving",
      "feature engineering"
    ],
    "tools": [
      "XGBoost",
      "GraphSAGE",
      "NVIDIA",
      "EXL"
    ],
    "quotes": [
      {
        "text": "So the signal was never in the row, it was in the edges.",
        "at": "00:51",
        "url": "https://www.youtube.com/watch?v=SHvwutPSeZg&t=51s"
      },
      {
        "text": "Therefore, fraud isn't a property of a transaction. It is a property of the neighborhood it sits in.",
        "at": "00:57",
        "url": "https://www.youtube.com/watch?v=SHvwutPSeZg&t=57s"
      },
      {
        "text": "It's not a philosophical debate, just a sweep.",
        "at": "13:38",
        "url": "https://www.youtube.com/watch?v=SHvwutPSeZg&t=818s"
      },
      {
        "text": "An accurate black box simply doesn't get used.",
        "at": "16:40",
        "url": "https://www.youtube.com/watch?v=SHvwutPSeZg&t=1000s"
      }
    ],
    "words": 3097
  },
  "summary_url": "/#SHvwutPSeZg",
  "transcript": {
    "html": "/transcripts/SHvwutPSeZg.html",
    "txt": "/transcripts/SHvwutPSeZg.txt",
    "vtt": "/transcripts/SHvwutPSeZg.vtt"
  }
}