S3Former: Sequential, Structural, and Statistical Fusion for Continuous-Time Dynamic Graphs

Ziyan Li, Xiangyu Hu, Tianqing Zhu, Wanlun Ma, Ke QinNeurIPS 2026

TL;DR

Predicting the next connection in an evolving network—like who emails whom or which user clicks an item—often relies on flattening interaction histories into 1D sequences, accidentally erasing the local web of connections between neighbors. S3Former fixes this by fusing three distinct signals—temporal sequences, an explicit local subgraph around the candidate pair, and online historical statistics—using smart, adaptive gates that know when to ignore noisy data. Across nine standard dynamic graph benchmarks, it takes the top overall spot in link prediction.

What Problem Does This Paper Address?

Real-world networks—social interactions, financial transactions, flight routes—don't evolve in neat, synchronized snapshots. They happen continuously and irregularly over time, forming Continuous-Time Dynamic Graphs (CTDGs). A core task here is dynamic link prediction: given every interaction strictly before time $t$, will nodes $u$ and $v$ interact at time $t$?

Recently, sequence-based models (like Transformers) have excelled at this by taking a node's past interactions, lining them up chronologically, and feeding them into an attention mechanism.

Here’s the catch: when you flatten a graph neighborhood into a 1D sequence, you obscure its geometry. You keep the when, but lose the explicit how-things-connect. If $u$ and $v$'s past neighbors also interacted heavily with each other—forming bridges or triangles—a serialized list struggles to see that explicit local topology. Meanwhile, simple statistical heuristics (like "how often have $u$ and $v$ interacted before?") are powerful, yet naive ways of combining them with structural and sequential features fail when a node's history is sparse or noisy.

Methods

S3Former (Sequential, Structural, and Statistical Former) evaluates a candidate link $(u, v, t)$ using strictly causal past events ($\mathcal{G}_{<t}$) across three parallel branches, coordinated by a two-stage fusion mechanism:

Figure 1: Overall pipeline of S3Former. Sequential, structural, and statistical encoders produce complementary causal representations, which are coordinated by NodeCCF and PairCCF before the final link prediction head.
  1. Sequential Branch (Standard + Multi-timescale): Partitions a node's 1-hop interaction history into patches for a Transformer (long-term backbone), while running a causal convolution over the most recent interactions (short-term correction).
  2. Structural Branch (Novel Shared Pair Subgraph): Rather than just counting overlapping neighbors, S3Former builds an explicit mini-graph around $u$ and $v$ using their recent anchors and common neighbors, pulling in all historical edges among them prior to $t$. A lightweight, edge-aware GraphSAGE module passes messages along these real historical edges to capture local topology.
  3. Statistical Branch (Online Causal Memory): Computes lightweight, leakage-free descriptors on the fly—such as node activity, recency, pairwise interaction frequency, and neighborhood overlap—updating them only after making a prediction at time $t$.
  4. Hierarchical Context-Aware Fusion (NodeCCF & PairCCF): Instead of blindly concatenating everything, S3Former uses learned gates to weigh reliability:
  5. NodeCCF looks at subgraph quality metrics (like size and edge density) to gate the structural representation at the node level—dialing it down if the local subgraph is sparse.
  6. PairCCF acts as a "retreatable" correction mechanism. It takes the combined endpoint representations and applies a residual adjustment based on pair-level statistical memory. If pair history is uninformative, a scalar "retreat gate" ($\gamma_{uv}$) shrinks toward zero, falling back safely to the node-level predictor.

Datasets

No new datasets are introduced; the authors evaluate across established public benchmarks:

  • Nine Main Interaction-Rich CTDGs (from DyGLib and EdgeBank suites): Wikipedia, Reddit, MOOC, LastFM, Enron, Social Evo., UCI, Flights, and Contact.
  • Four Ranking-Based Benchmarks (from TGB-v2): tgbl-wiki-v2, tgbl-review-v2, tgbl-coin-v2, and tgbl-flight-v2.
  • Boundary-Condition Diagnostics (analyzed in the appendix): CanParl, USLegis, UNTrade, and UNVote (recurrence-heavy institutional datasets).

Key Insights and Ideas

  • Explicit edges beat overlap counts: Isolating the structural channel shows that simply adding Common Neighbor/Jaccard overlap scores to a sequential-statistical backbone yields tiny gains (e.g., 85.72% $\rightarrow$ 87.60% AP on MOOC). Adding actual historical edges with edge-aware message passing jumps performance to 93.03% AP. The web of connections between context nodes matters.
  • Different graphs lean on different crutches: Ablations reveal that Wikipedia and Reddit thrive on local structural topology, whereas user-item or repeat-heavy graphs lean heavily on statistical memory.
  • Knowing when not to fuse is crucial: Replacing S3Former's gated fusion with flat concatenation noticeably drops accuracy (especially on MOOC and LastFM). Giving PairCCF a "retreat gate" prevents noisy pair statistics from corrupting good node embeddings.
Table 2: Component ablation for S3Former on representative datasets. We report transductive AP (%).

Key Results

  • Main Benchmarks: Across the 9 DyGLib datasets, S3Former achieves the best average rank (1.22 to 1.33) across all four standard settings: Transductive AP/AUC and Inductive (unseen nodes) AP/AUC, outperforming 13 baselines including DyGFormer, SALoM, and TPNet. For example, on Enron Transductive AP, it hits 97.49% (vs. 94.08% for second-best SALoM).
  • Harder Negative Sampling: Standard random negative sampling can be gamed by memorizing recurring pairs. Under stricter historical negative sampling (sampling negatives from past real links), scores drop across the board, yet S3Former still leads DyGFormer and SALoM across all tested datasets (e.g., 85.73% vs. 83.25% AP on Wikipedia).
  • TGB-v2 Leaderboard Context: On large-scale ranking evaluations, S3Former posts the highest displayed Test MRR on tgbl-flight-v2 (0.8923 vs. TPNet's 0.884), while remaining competitive—though not dominant—on Wiki, Review, and Coin.

Limitations and Future Work

The authors are commendably transparent about where S3Former hits its limits:

  • No universal SOTA on TGB-v2: While strong on Flight-v2, S3Former trails TPNet on Wiki-v2 (0.7489 vs. 0.827 MRR) and Coin-v2, and trails GraphMixer on Review-v2.
  • Mixed computational efficiency: Constructing and encoding subgraphs isn't free. Compared to local TPNet runs on an RTX 4090, S3Former has similar per-epoch speed on Wiki, is faster on Review, and is slower on Coin.
  • Saturation under random negatives: Margins shrink considerably under historical negative sampling on datasets like LastFM, reinforcing the authors' note that random-negative benchmarks must be interpreted carefully. (Explicit future work directions are not discussed in the main paper.)

Summary updated

Abstract

Continuous-time dynamic graphs model evolving systems with irregularly timed interactions, where predicting future links requires reasoning over temporal evolution, local topology, and historical relation patterns. Existing memory- and sequence-based methods capture temporal dependencies effectively, but organizing historical interactions as node memories or serialized neighbor sequences can weaken the explicit connectivity among candidate-centered historical context nodes. We propose S3Former, a temporal graph framework that jointly models sequential dynamics, shared pair-centered structure, and online statistical memory. For each candidate interaction, S3Former encodes long- and short-term historical sequences, constructs a history-induced shared pair subgraph around the two endpoints, and computes node- and pair-level statistics from past events only. A two-level context-aware fusion mechanism further combines these signals: NodeCCF learns reliable endpoint representations, while PairCCF performs candidate-specific relation correction using explicit pair memory. Experiments on 9 dynamic graph benchmarks show that S3Former achieves the strongest average rank across the four standard transductive and inductive AP/AUC evaluation settings. Ablation studies confirm the effectiveness of shared pair-subgraph modeling, online statistical memory, and hierarchical fusion.
BibTeX
@inproceedings{li2026s,
  author = {Ziyan Li and Xiangyu Hu and Tianqing Zhu and Wanlun Ma and Ke Qin},
  title = {{S3Former: Sequential, Structural, and Statistical Fusion for Continuous-Time Dynamic Graphs}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2026},
  url = {https://openreview.net/forum?id=56lSllQiF5},
}
Figure