StreamTGN: A GPU-Efficient Serving System for Streaming Temporal Graph Neural Networks

Lingling Zhang, Pengpeng Qiao, Zhiwei Zhang, Ye Yuan, Guoren WangarXiv 2026

TL;DR

StreamTGN is the first streaming inference system for Temporal Graph Neural Networks (TGNNs) that exploits the local nature of graph updates. By maintaining persistent GPU memory and only recomputing embeddings for nodes directly affected by new edges, it slashes inference latency by up to three orders of magnitude with zero loss in accuracy.

What Problem Does This Paper Address?

Temporal Graph Neural Networks (TGNNs) excel at modeling dynamic graphs (such as financial transactions, user clicks, or social media interactions), but existing systems are heavily optimized for training, leaving inference as a massive operational bottleneck.

In production systems, training runs offline and infrequently (e.g., daily or weekly), while inference must run continuously at scale to handle thousands of queries per second.

Figure 1: Overview of TGN training and inference. Training runs offline and infrequently; inference runs continuously at scale. Even a small improvement in inference latency yields enormous savings: (10 ms −5 ms) × 108 queries/day ≈106 seconds/day.

Standard TGNN systems process streaming edges in a "full-recomputation" batch mode. This means every single new edge triggers an embedding update for all nodes ($O(|V|)$ complexity). For a million-node graph, recomputing the entire network for a single new transaction is wildly impractical for real-time applications like fraud detection or instant recommendations.

Figure 3: The distributions of processing time across the five pro- filing stages for TGN and TGAT on four datasets.

Methods

StreamTGN introduces three core techniques to enable efficient, incremental streaming inference:

  1. Persistent GPU-Resident Memory & Dirty-Flag Tracking: StreamTGN keeps graph topology, node embeddings, and memory states persistently on the GPU across batches. When a new edge arrives, a lightweight propagation mechanism marks only the nodes within $L$ hops (the affected set $\mathcal{A}$) as "dirty." Inference is strictly isolated to this dirty set, reducing per-batch complexity from $O(|V|)$ to $O(|\mathcal{A}|)$.
  2. Drift-Aware Adaptive Rebuild Scheduling: To maximize throughput, StreamTGN can use a "delta mode" approximation for embedding updates. Over time, these approximations can drift from their true values. StreamTGN tracks this divergence in real-time using a lightweight neighborhood-change estimator and adaptively triggers partial or full rebuilds only when mathematically necessary.
  3. Batched Streaming with Relaxed Ordering: Processing streaming edges strictly one-by-one underutilizes the massive parallelism of GPUs. StreamTGN groups incoming edges into small batches under a bounded-staleness model, allowing parallel execution while keeping prediction errors strictly bounded.

Datasets

The authors evaluated StreamTGN across eight diverse real-world temporal graph datasets:

  • Bitcoin: A small trust network (6K nodes).
  • MOOC & Online Education: Medium-scale interaction logs.
  • WIKI & REDDIT: Standard encyclopedia and social forum interaction datasets.
  • LastFM: Music streaming logs.
  • GDELT: A large global events dataset (16K nodes, 191M edges).
  • Wiki-Talk & Stack-Overflow: Massive interaction and Q&A forums, with Stack-Overflow scaling up to 2.58M nodes and 47.9M edges.

Key Insights and Ideas

  • The Locality "Aha" Moment: In an $L$-layer TGNN, a new edge mathematically cannot affect the embeddings of nodes further than $L$ hops away. On large, sparse graphs like Stack-Overflow, this affected set $\mathcal{A}$ accounts for less than 0.2% of the total node population.
  • Inference Dominates the Budget: While academic research heavily targets training optimizations, inference accounts for ~96% of total compute time in real-world production deployments.
  • Orthogonality: Because StreamTGN re-architects the inference execution pipeline rather than data loading or backward-pass scheduling, it is entirely orthogonal to existing training frameworks (like SWIFT or SIMPLE) and can be combined with them for end-to-end pipeline speedups.

Key Results

  • Massive Speedups: StreamTGN achieves a 4.5$\times$ to 739$\times$ speedup over the state-of-the-art TGL framework for memory-based models (TGN) and up to 4,207$\times$ for memory-less models (TGAT).
  • Favorable Scalability: The speedup scales linearly with graph size because the fraction of affected nodes shrinks as the graph grows. On the 2.6M-node Stack-Overflow dataset, global embedding refresh time dropped from 31,625 ms to just 42.79 ms per batch.
  • Lossless Accuracy: In exact mode, StreamTGN delivers mathematically identical embeddings to full recomputation, resulting in zero accuracy degradation. In delta mode, accuracy drops by less than 0.5% while offering even higher serving throughput.

Limitations and Future Work

  • Single-GPU Constraint: The current implementation targets single-GPU setups, which might hit memory capacity walls when dealing with truly gargantuan, billion-scale graphs.
  • Future Directions: The authors plan to extend StreamTGN to distributed multi-GPU environments to support larger graphs. They also propose exploring predictive dirty-set estimation—anticipating which nodes will be affected before the edges even arrive to enable proactive, preemptive embedding refreshes.

Summary updated

BibTeX
@misc{zhang2026streamtgn,
  author = {Lingling Zhang and Pengpeng Qiao and Zhiwei Zhang and Ye Yuan and Guoren Wang},
  title = {{StreamTGN: A GPU-Efficient Serving System for Streaming Temporal Graph Neural Networks}},
  year = {2026},
  eprint = {2603.21090},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2603.21090},
}
Figure