Curvature-Targeted Memory Mixing for Streaming Temporal Graphs

Graph neural networks pass messages along edges, so a node only learns about what reaches it through the graph. On graphs that change over time, such as transaction streams, reply threads, or user–item purchases, this creates two failures. A node that has not interacted recently keeps an outdated internal state. A node separated from the rest of the graph by a narrow bridge receives distant information too weakly to use. A recent fix, Temporal Graph Rewiring, adds a fixed sparse "expander" graph over all nodes and periodically lets nodes exchange their memory states across it, independently of real interactions (Temporal Graph Rewiring with Expander Graphs). An expander is a sparse graph in which every node reaches every other in a few hops. This helps a great deal on some benchmarks. The extra edges, however, are placed by an algebraic rule, without regard to where the real graph is bottlenecked. They also never change as the real graph evolves, and they mix memories everywhere, including inside dense communities where repeated averaging makes node states indistinguishable.

We propose to place the memory-mixing edges where the current interaction graph is actually bottlenecked, and to keep them out of regions that are already densely connected. Bottlenecks are found with a cheap, degree-aware measure of edge "curvature," which scores how many common neighbors an edge's endpoints share, discounted when the endpoints are high-degree hubs. The curvature is maintained incrementally from small hash-based summaries of each node's recent neighborhood, so the mixing graph can be rebuilt as the stream evolves rather than fixed in advance. The claim is simple. Given the same budget of extra edges, putting them across bottlenecks and away from dense clusters should refresh distant and dormant nodes better than uniform expander edges, without collapsing node memories toward one another.

Core Claim

In memory-based temporal graph networks, where virtual mixing edges go matters as much as whether they exist. A mixing graph that adds shortcuts across the most bottlenecked recent edges, and adds none inside dense clusters, should do two things at a fixed edge budget. It should increase how sensitive a node's memory is to distant events, and it should preserve the spread of memory states better than a static or periodically re-sampled expander. The gains should concentrate on streams with many never-before-seen interactions, where structure rather than repetition carries the signal.

The proposal draws on four lines of work in different roles. Curvature rewiring supplies the method. Over-squashing, meaning the weakening of distant signals as they pass through narrow parts of the graph, is the failure we target. Over-smoothing, meaning the collapse of node states toward a common value under repeated averaging, is the constraint we must not violate. Dynamic graphs are the setting.

Why This Is Not Already Done

The static curvature literature motivates the design. Understanding over-squashing and bottlenecks on graphs via curvature proves that strongly negative curvature, meaning endpoints that share few neighbors, bounds the message-passing Jacobian toward zero. Its rewiring algorithm, SDRF, adds 3- and 4-cycle shortcuts around such edges. Revisiting Over-smoothing and Over-squashing Using Ollivier-Ricci Curvature adds the mirror image, showing that very positively curved edges act as "echo chambers" that speed up over-smoothing. Its BORF algorithm both adds edges across bottlenecks and removes edges in dense cliques. Mitigating Over-smoothing and Over-squashing using Augmentations of Forman-Ricci Curvature makes this cheap with cycle-counting curvature and sets thresholds with a two-component mixture model. All three are one-time preprocessing on static graphs, and all would need full recomputation after every change.

Rethinking the Gold Standard: Why Discrete Curvature Fails to Fully Capture Over-squashing in GNNs? both constrains and equips us. It shows that standard curvature misses 30–40% of over-squashed edges, because hubs dilute messages even inside triangle-rich regions. It proposes a degree-weighted triangle curvature, WAF3, computed through Jaccard similarity with MinHash. The authors name the dynamic extension as open. We reuse their idea and notice something they did not exploit: MinHash sketches are mergeable and can be updated one event at a time. That makes a streaming version natural.

On the temporal side, TGR (Temporal Graph Rewiring with Expander Graphs) is the closest work. It uses a static Cayley expander and explicitly suggests Ricci-curvature rewiring as future work. Nobody has measured whether its mixing homogenizes memories. Edge Sparsification via Temporal Forman-Ricci Curvature for Dynamic Graph Learning brings curvature to temporal graphs, but it only removes edges, works on discrete snapshots, and has no degree-dilution term. Over-squashing in Spatiotemporal Graph Neural Networks shows that spatial and temporal bottlenecks multiply, which is why spatial targeting matters even when temporal fixes exist. That paper uses spectral rather than curvature rewiring, and only on fixed sensor graphs. Dynamic Triangulation-Based Graph Rewiring for Graph Neural Networks learns which triangles to add during training. Its data is static, and its candidate generation (k-NN plus Delaunay triangulation in latent space) is too heavy for streams with tens of millions of events.

Our proposal differs from TGR in placing and refreshing edges by curvature. It differs from TRicci in adding shortcuts, not only pruning, and in running on continuous-time streams. It differs from SDRF, BORF, and WAF3 in being incremental and in acting on a virtual mixing graph rather than on the message-passing graph itself.

Research Program

Streaming degree-aware curvature. We maintain a time-decayed interaction graph. Each node keeps a small bank of MinHash sketches, one per time bucket, and the sketch of its recent neighborhood is the elementwise minimum over the last $B$ buckets. Each new event updates two sketches in time proportional to the sketch size. For a recent edge $(u,v)$ with Jaccard estimate $J$ and decayed degrees $d_u, d_v$, the shared-neighbor count is recovered exactly from the identity

$$|N(u)\cap N(v)| = \frac{J\,(d_u+d_v)}{1+J},$$

where $N(\cdot)$ is the recent neighborhood. We then score the edge with a WAF3-style curvature. This score combines the triangle count with the endpoint penalty $f(d)=1/(1+d)$ from Chen et al. Low scores flag both classical bridges and the hub-dilution edges that plain curvature misses. Because the penalty was derived for GCN normalization, we also test a variant in which the exponent on the degree term is tuned on validation data.

Curvature-targeted mixing graph. Every mixing period, matching TGR's schedule, we rebuild the virtual graph under the same edge budget TGR's expander uses. Most of the budget goes to the lowest-scoring recent edges. For each such edge we connect sampled neighbors of $u$ to sampled neighbors of $v$, completing 4-cycles around the bottleneck as SDRF does. Dormant nodes keep decayed old edges, so they can still be endpoints of bottlenecks and receive shortcuts into active regions. No mixing edges are added between pairs whose score exceeds the upper component of a two-component mixture fit to the score distribution, following the Fesser–Weber thresholding. This is the over-smoothing guard. A small residual fraction of the budget stays as random long-range edges, so the graph never disconnects. The base temporal model, TGN or TNCN, is unchanged. Only the graph over which memory mixing runs is different.

Diagnostics. We track three quantities alongside task metrics. The first is the Jacobian norm of a node's memory with respect to events several hops away at the time of the event, the temporal analogue of the sensitivity in Topping et al. The second is a missed-bottleneck ratio: the fraction of node pairs with low Jacobian sensitivity that the mixing graph leaves without a nearby shortcut. This adapts Chen et al.'s MOSR to the mixing graph. The third is the Dirichlet energy of the memory matrix over the real interaction graph, which measures memory homogenization. Following Are we measuring oversmoothing in graph neural networks correctly?, we do not treat energy alone as evidence. We pair it with a linear probe that predicts held-out node behavior from memory states, so "smoothing" is judged by lost discriminability rather than raw distance.

Baselines

The naive reference point is the base memory model with no mixing at all, TGN and TNCN as run in the Temporal Graph Benchmark protocol (Temporal Graph Benchmark for Machine Learning on Temporal Graphs). We also report the benchmark's non-learning heuristics: EdgeBank for link prediction and Moving Average for node affinity. TGB reports Moving Average at NDCG@10 of 0.559 on tgbn-reddit, against 0.315 for TGN. Any method that does not close this gap on that dataset should say so plainly. On tgbl-wiki the file reports NAT at an MRR of 0.749, which we use as an external sanity anchor.

The strongest existing competitor is TGR with its static Cayley expander (Temporal Graph Rewiring with Expander Graphs). It is the only method that already performs virtual mixing over a memory bank. The file reports only relative gains: TGR "improved the MRR by 50.5% over the base TGN model and 22.2% over the TNCN model" on tgbl-review. No absolute TGR MRR was found on Lacuna, so we rerun TGR ourselves. TGR and our method share the base model, mixing period, mixing GNN layer, edge budget, and seeds, and each gets the same hyperparameter search budget. Beating TGR means a higher test MRR on tgbl-review and tgbl-coin than rerun TGR across five seeds, with non-overlapping confidence intervals, at equal or lower wall-clock cost per event.

Two ablations isolate the key ingredient. The first is a dynamic random expander that re-samples random edges at each mixing period with the same budget. It separates "refreshing the graph" from "placing edges by curvature." The second removes the high-curvature guard, keeping only bottleneck shortcuts. It shows whether the over-smoothing guard matters. A third variant replaces our degree-aware score with plain triangle-count curvature, to test whether Chen et al.'s dilution term carries weight in streams where hubs emerge. On the static side, as a check that our incremental curvature reproduces known behavior, we run the snapshot version on Peptides-func. There BORF reports 50.2 mAP against 46.1 un-rewired (Revisiting Over-smoothing and Over-squashing Using Ollivier-Ricci Curvature).

Why not just…?

Why not just re-sample TGR's expander periodically? This is the most serious threat. If TGR's benefit comes only from short paths between arbitrary node pairs, refreshing a random expander would match us at lower cost. The dynamic random expander ablation is designed to settle this. Our prediction is that curvature placement wins mainly on dormant nodes behind bottlenecks and on the missed-bottleneck ratio. If the random expander matches us on MRR and on those diagnostics, curvature targeting adds nothing for memory mixing, and we would report that as the finding.

Why not just connect nodes with similar memory states (a k-nearest-neighbor mixing graph)? It is simple and task-aware, but it links nodes that are already alike. Nguyen et al. identify exactly this kind of densely self-similar structure as the condition that speeds up over-smoothing, and it does nothing for nodes whose information is cut off. We include it under the same budget. We expect it to show the fastest Dirichlet-energy decline and the weakest gains on high-surprise data. If it instead matches our method, that would suggest feature similarity already captures what matters here, and the curvature machinery is unnecessary.

Why not just use a graph transformer over the stream? All-to-all attention removes bottlenecks by construction, and on static long-range tasks it helps: SAN reaches 0.6439 test AP on Peptides-func against 0.5930 for GCN (Long Range Graph Benchmark). On streams like tgbl-comment (over 30 million timestamps), however, attention over the full node bank at every mixing step is quadratic in the number of nodes and impractical. Our sketch updates cost a constant per event. We report a linear-attention mixing layer in the style of GPS (Rampásek et al.) on the smaller TGB datasets as a cost–accuracy reference.

Why not just add random edges or apply DropEdge? RADE: Random Add-Drop Edge as a Regularizer reports that stochastic edge perturbation fails to improve over-squashing. In TRicci's experiments, a non-curvature pruning baseline kept 89.4% of ROC-AUC against 97.7% for curvature-guided pruning (Edge Sparsification via Temporal Forman-Ricci Curvature for Dynamic Graph Learning). The dynamic random expander already covers random addition at matched budget.

Proposed Experiments

The main experiments use TGB link prediction on tgbl-wiki, tgbl-review, tgbl-coin, and tgbl-comment, measured by MRR under the official negative-sampling protocol. Node affinity on tgbn-trade and tgbn-reddit is measured by NDCG@10. Each dataset is run with TGN and TNCN as base models. We expect the largest gains on tgbl-review, whose high surprise index means test pairs are rarely seen before. We expect little or no gain on tgbl-wiki, where repetition dominates. This dataset-level pattern is itself a prediction: uniform gains everywhere would point to generic regularization rather than bottleneck repair.

A controlled synthetic stream tests the mechanism directly. Two communities joined by a few bridge edges exchange events, the bridge moves partway through the stream, and a label at one side depends on events at the other. Here we can compute the true Jacobian sensitivity. We can check whether our mixing graph follows the moved bridge while the static expander does not, and whether memory diversity inside each community survives.

The decisive checks are the following. At matched edge budget, does curvature placement beat the re-sampled random expander on MRR for tgbl-review and on the Jacobian sensitivity of dormant nodes? Does removing the high-curvature guard lower Dirichlet energy and probe accuracy without improving MRR, which would confirm that the guard is doing real work against over-smoothing? Does the degree-aware score shrink the missed-bottleneck ratio relative to plain triangle curvature on the crypto streams, where hubs appear suddenly? Finally, does incremental curvature maintenance keep per-event overhead within a small constant factor of TGR?

A negative answer on the first check would mean that TGR's static algebraic placement is already adequate for memory mixing. That would be a useful and publishable correction to the expectation, voiced by TGR's own authors, that curvature should help.