WhoBuilt

Learned Execution Graphs for Anomaly Detection & Drift in APIs

Jul 23, 2026· 20 min· 1.2K views·Watch on YouTube

Speaker

Ritvik Pandya, who leads the payments team at JPMorgan Chase, explains learned execution graphs for detecting API anomalies and drift at AI Engineer.

Map request execution as a graph

Pandya distinguishes short-lived execution graphs from persistent or property graphs. He represents request processing as a directed acyclic graph, from the edge and gateway through authentication, orchestration, and downstream services, with context passed between steps. Retries and loops can be represented as separate entities for tracking.

Compare requests with tailored baselines

A first tier checks whether an end-to-end request matches its baseline; deeper analysis follows when it does not. Pandya describes detecting structural changes, such as added or removed steps, and measuring deviations while accounting for differences among clients. He uses a slower foreign exchange rate service as an example of how a graph can help locate a delay.

Separate incidents from drift

Pandya contrasts a one-time delay, such as a traffic accident, with drift: a gradual change in the normal pattern that may call for a new baseline. He describes structural drift, capacity-related slowdown, and covariate drift, such as a growing share of international requests. Teams can use separate baselines or graphs for different request groups.

Connect detection to controlled action

OpenTelemetry data can feed root cause analysis, drift classification, and decisions about corrective action. Pandya recommends assessing the risk of automation, then rolling a solution out to 5% or 10% of machines, monitoring it, and expanding to all nodes if it works. He describes asynchronous telemetry with a quick hot path and a slower reconciliation path.

Tune detection for real systems

Delayed telemetry can make a missing node look like a structural change, so the system needs clear thresholds and tail-based tracking of request starts and ends. New endpoints need their own baselines, and detection methods such as MMD or KL can help identify changes. Pandya says a single time window reduced time to discovery in his examples, while client-specific labels and explainable results can reduce noise and support decisions.

Takeaways

  • Model each request path as a graph so teams can locate which service is causing a delay.
  • Set baselines by client, endpoint, and request type to avoid noisy comparisons.
  • Distinguish one-off anomalies from sustained drift before changing a baseline.
  • Account for delayed telemetry before interpreting a missing node as a structural change.
  • Test automated fixes on a small share of machines, monitor the result, then expand.

Mentioned in this talk

Search inside this talk

What was claimed 3

Related talks