Papers
Topics
Authors
Recent
Search
2000 character limit reached

TMRB-N: Node-Adaptive Temporal Memory Buffer

Updated 5 July 2026
  • TMRB-N is a compact module that consolidates temporal priors while adaptively selecting key nodes to update and replay low-dimensional embeddings.
  • It mitigates catastrophic forgetting and memory explosion by integrating historical priors with current temporal features using GRU-like gating mechanisms.
  • Embedded in CoMemNet’s dual-branch pipeline, TMRB-N has demonstrated state-of-the-art performance improvements on large-scale traffic prediction datasets.

Node-Adaptive Temporal Memory Buffer, abbreviated TMRB-N, is a lightweight temporal memory module introduced as part of CoMemNet, a dual-branch continual learning framework for traffic prediction on continuously expanding and evolving traffic networks (Wu et al., 7 May 2026). In that setting, TMRB-N is embedded in the backbone and stores, updates, and replays low-dimensional temporal representations across time periods τ\tau, focusing only on key nodes selected adaptively. Its stated purpose is to consolidate historical temporal priors while adapting to new distributions, thereby addressing catastrophic forgetting and memory explosion. In related technical formulations, analogous node-conditioned memory buffers also appear in temporal knowledge graph reasoning, temporal network inference, event-stream reordering, and quantum repeater scheduling, although the precise semantics of “buffer,” “memory,” and “node-adaptivity” differ across domains.

1. Definition and core function

In CoMemNet, TMRB-N is defined as a Node-Adaptive Temporal Memory Replay Buffer whose role is to store, update, and replay compact temporal states rather than raw samples or graph neighborhoods (Wu et al., 7 May 2026). Alternative names used for the same mechanism include “Temporal Memory Replay Buffer” and “TMRB-N.” The module is explicitly described as node-adaptive because it selects Top-K nodes with largest temporal feature change and updates only those nodes rather than all nodes.

The buffer is designed to address two failure modes that are central to continual spatio-temporal learning. First, it mitigates catastrophic forgetting by gating current time features with historical time features H(τ1)H(\tau-1), thereby stabilizing temporal representations and preserving historical patterns. Second, it mitigates memory explosion by storing compact temporal embeddings HτRDH_\tau \in \mathbb{R}^D and small node lists VτkV_\tau^k, rather than raw historical samples or multi-hop graph neighborhoods.

The term “buffer” is therefore not used in the conventional systems sense of a large replay cache. In the CoMemNet formulation, the buffer is a compact temporal state mechanism. A common misconception is to interpret TMRB-N as ordinary experience replay over stored traffic windows. The CoMemNet description states the opposite: replay is realized through historical temporal priors and training-node selection, not through storage of full historical graph instances.

2. Mathematical formalization

TMRB-N operates over time periods τ\tau and uses daily and weekly temporal embeddings for the currently selected node subset VτsV_\tau^s. For the current period, the daily and weekly embeddings are

TτDRNτs×DD,TτWRNτs×DW,T_\tau^D \in \mathbb{R}^{N_\tau^s \times D_D}, \qquad T_\tau^W \in \mathbb{R}^{N_\tau^s \times D_W},

and the concatenated time feature matrix is

Tτ=(TτDTτW)RNτs×D,D=DD+DW.T_\tau = (T_\tau^D \parallel T_\tau^W) \in \mathbb{R}^{N_\tau^s \times D}, \qquad D = D_D + D_W.

The buffer stores a global temporal state HτRDH_\tau \in \mathbb{R}^D for each period. To compare this global state with node-wise temporal features, H(τ1)H(\tau-1) is expanded across nodes before differencing. The node-wise temporal difference is

H(τ1)H(\tau-1)0

The implementation note is important: in practice, shapes must align with the selected subset size H(τ1)H(\tau-1)1.

Node adaptivity is then implemented by sorting H(τ1)H(\tau-1)2 and selecting the Top-K nodes with the largest differences,

H(τ1)H(\tau-1)3

This set H(τ1)H(\tau-1)4 identifies the nodes most sensitive to temporal changes in period H(τ1)H(\tau-1)5.

The current-period summary over those key nodes is obtained through a learned linear projection,

H(τ1)H(\tau-1)6

where H(τ1)H(\tau-1)7 is a learned weight matrix. The resulting vector H(τ1)H(\tau-1)8 is a compact summary of the current period’s temporal features at the selected key nodes.

Historical and current temporal features are fused through GRU-like gates:

H(τ1)H(\tau-1)9

HτRDH_\tau \in \mathbb{R}^D0

HτRDH_\tau \in \mathbb{R}^D1

HτRDH_\tau \in \mathbb{R}^D2

The updated temporal state HτRDH_\tau \in \mathbb{R}^D3 is stored in the buffer and used in period HτRDH_\tau \in \mathbb{R}^D4. This design makes the replay state global in dimension yet node-adaptive in how it is updated.

3. Integration with CoMemNet’s dual-branch training pipeline

TMRB-N is not a standalone mechanism; it is integrated with CoMemNet’s Online branch, Target branch, and Dynamic Contrastive Sampler (DC Sampler) (Wu et al., 7 May 2026). The Target branch extracts historical information using Wasserstein Distance features. For node HτRDH_\tau \in \mathbb{R}^D5, the Target branch produces HτRDH_\tau \in \mathbb{R}^D6, which are normalized and discretized into histogram-like representations. The practical Wasserstein Distance used in the implementation is

HτRDH_\tau \in \mathbb{R}^D7

The DC Sampler then selects the training subset through a deterministic Top-M rule:

HτRDH_\tau \in \mathbb{R}^D8

HτRDH_\tau \in \mathbb{R}^D9

TMRB-N is applied only after this sampler has identified the informative nodes. The resulting per-period pipeline is: compute Target-branch features, discretize them, compute node-wise Wasserstein scores, form VτkV_\tau^k0, construct VτkV_\tau^k1 for those nodes, compute VτkV_\tau^k2, select VτkV_\tau^k3, aggregate VτkV_\tau^k4, update VτkV_\tau^k5, and then use the Online branch for prediction on VτkV_\tau^k6.

The training loss is a mean absolute error defined on the selected nodes:

VτkV_\tau^k7

The overall objective is therefore VτkV_\tau^k8 on VτkV_\tau^k9. A recurring misunderstanding is that CoMemNet uses an explicit contrastive loss. The specification states that no explicit contrastive, distillation, or matching losses are used; the “contrastive” component is in the sampler, not the loss.

Parameter updates follow the dual-branch pattern:

  • Online branch SGD:

τ\tau0

  • Target branch EMA:

τ\tau1

At inference time, the Online branch predicts on the full node set τ\tau2 for evaluation under MAE/RMSE/MAPE, while τ\tau3 may still be used as a temporal prior.

4. Complexity, storage model, and implementation constraints

The stated computational cost of the DC Sampler is dominated by Target-branch feature extraction and histogram construction, both at τ\tau4, followed by WD aggregation at τ\tau5 and Top-M selection at τ\tau6 or τ\tau7 with partial selection (Wu et al., 7 May 2026). For TMRB-N itself, the per-update costs are

  • τ\tau8: τ\tau9
  • Top-K selection: VτsV_\tau^s0, or VτsV_\tau^s1 with partial selection
  • VτsV_\tau^s2 aggregation: VτsV_\tau^s3
  • gate update: VτsV_\tau^s4 per vector

The buffer’s memory footprint is correspondingly small. Per period, it stores VτsV_\tau^s5 and optionally VτsV_\tau^s6 of size VτsV_\tau^s7, giving VτsV_\tau^s8 memory per period. If only the most recent VτsV_\tau^s9 is retained, the storage is TτDRNτs×DD,TτWRNτs×DW,T_\tau^D \in \mathbb{R}^{N_\tau^s \times D_D}, \qquad T_\tau^W \in \mathbb{R}^{N_\tau^s \times D_W},0. This is contrasted directly with graph replay schemes that store multi-hop neighborhoods and can incur TτDRNτs×DD,TτWRNτs×DW,T_\tau^D \in \mathbb{R}^{N_\tau^s \times D_D}, \qquad T_\tau^W \in \mathbb{R}^{N_\tau^s \times D_W},1 explosion.

The paper does not specify capacity TτDRNτs×DD,TτWRNτs×DW,T_\tau^D \in \mathbb{R}^{N_\tau^s \times D_D}, \qquad T_\tau^W \in \mathbb{R}^{N_\tau^s \times D_W},2 or eviction. The implementation guidance states that, in practice, a bounded buffer can keep recent TτDRNτs×DD,TτWRNτs×DW,T_\tau^D \in \mathbb{R}^{N_\tau^s \times D_D}, \qquad T_\tau^W \in \mathbb{R}^{N_\tau^s \times D_W},3 vectors or overwrite older entries, and a ring buffer can be used to cap memory while preserving TτDRNτs×DD,TτWRNτs×DW,T_\tau^D \in \mathbb{R}^{N_\tau^s \times D_D}, \qquad T_\tau^W \in \mathbb{R}^{N_\tau^s \times D_W},4 current usage. This means that TMRB-N is defined more by its update rule than by a fixed archival policy.

The key hyperparameters tied to TMRB-N are explicit. The default Top-K is TτDRNτs×DD,TτWRNτs×DW,T_\tau^D \in \mathbb{R}^{N_\tau^s \times D_D}, \qquad T_\tau^W \in \mathbb{R}^{N_\tau^s \times D_W},5. The DC Sampler ratio TτDRNτs×DD,TτWRNτs×DW,T_\tau^D \in \mathbb{R}^{N_\tau^s \times D_D}, \qquad T_\tau^W \in \mathbb{R}^{N_\tau^s \times D_W},6 is dataset-specific: PEMS D3(S) TτDRNτs×DD,TτWRNτs×DW,T_\tau^D \in \mathbb{R}^{N_\tau^s \times D_D}, \qquad T_\tau^W \in \mathbb{R}^{N_\tau^s \times D_W},7; PEMS D4(L) TτDRNτs×DD,TτWRNτs×DW,T_\tau^D \in \mathbb{R}^{N_\tau^s \times D_D}, \qquad T_\tau^W \in \mathbb{R}^{N_\tau^s \times D_W},8; PEMS D8(M) TτDRNτs×DD,TτWRNτs×DW,T_\tau^D \in \mathbb{R}^{N_\tau^s \times D_D}, \qquad T_\tau^W \in \mathbb{R}^{N_\tau^s \times D_W},9. The Target branch uses EMA momentum Tτ=(TτDTτW)RNτs×D,D=DD+DW.T_\tau = (T_\tau^D \parallel T_\tau^W) \in \mathbb{R}^{N_\tau^s \times D}, \qquad D = D_D + D_W.0. Optimization uses AdamW, lr=0.01 with decay 0.5, batch size 128, early stopping patience 10. Practical constraints include shape alignment through Tτ=(TτDTτW)RNτs×D,D=DD+DW.T_\tau = (T_\tau^D \parallel T_\tau^W) \in \mathbb{R}^{N_\tau^s \times D}, \qquad D = D_D + D_W.1, efficient partial top-k/top-m selection, and consistent construction of daily and weekly time embeddings.

These design choices indicate that TMRB-N is deliberately engineered as a lightweight replay primitive rather than a memory-intensive archival subsystem.

5. Empirical evidence and comparative rationale

The empirical contribution of TMRB-N in CoMemNet is isolated through ablation experiments on three large-scale traffic datasets (Wu et al., 7 May 2026). The reported 12-step mean results are as follows.

Dataset w/o TMRB-N CoMemNet
PEMSD3(S) MAE 14.94, RMSE 25.38, MAPE 19.76 MAE 13.57, RMSE 22.94, MAPE 18.80
PEMSD4(L) MAE 23.76, RMSE 39.59, MAPE 17.29 MAE 22.00, RMSE 37.38, MAPE 15.86
PEMSD8(M) MAE 18.36, RMSE 30.61, MAPE 20.06 MAE 17.03, RMSE 28.41, MAPE 17.82

The reported relative improvements are Tτ=(TτDTτW)RNτs×D,D=DD+DW.T_\tau = (T_\tau^D \parallel T_\tau^W) \in \mathbb{R}^{N_\tau^s \times D}, \qquad D = D_D + D_W.2 MAE, Tτ=(TτDTτW)RNτs×D,D=DD+DW.T_\tau = (T_\tau^D \parallel T_\tau^W) \in \mathbb{R}^{N_\tau^s \times D}, \qquad D = D_D + D_W.3 RMSE, Tτ=(TτDTτW)RNτs×D,D=DD+DW.T_\tau = (T_\tau^D \parallel T_\tau^W) \in \mathbb{R}^{N_\tau^s \times D}, \qquad D = D_D + D_W.4 MAPE on PEMSD3(S); Tτ=(TτDTτW)RNτs×D,D=DD+DW.T_\tau = (T_\tau^D \parallel T_\tau^W) \in \mathbb{R}^{N_\tau^s \times D}, \qquad D = D_D + D_W.5 MAE, Tτ=(TτDTτW)RNτs×D,D=DD+DW.T_\tau = (T_\tau^D \parallel T_\tau^W) \in \mathbb{R}^{N_\tau^s \times D}, \qquad D = D_D + D_W.6 RMSE, Tτ=(TτDTτW)RNτs×D,D=DD+DW.T_\tau = (T_\tau^D \parallel T_\tau^W) \in \mathbb{R}^{N_\tau^s \times D}, \qquad D = D_D + D_W.7 MAPE on PEMSD4(L); and Tτ=(TτDTτW)RNτs×D,D=DD+DW.T_\tau = (T_\tau^D \parallel T_\tau^W) \in \mathbb{R}^{N_\tau^s \times D}, \qquad D = D_D + D_W.8 MAE, Tτ=(TτDTτW)RNτs×D,D=DD+DW.T_\tau = (T_\tau^D \parallel T_\tau^W) \in \mathbb{R}^{N_\tau^s \times D}, \qquad D = D_D + D_W.9 RMSE, HτRDH_\tau \in \mathbb{R}^D0 MAPE on PEMSD8(M). Additional component ablations report that w/o Select—that is, random key-node choice—degrades performance relative to feature-difference-based selection, and w/o Update—removing the gating update—also degrades performance. The sensitivity study in Fig. 5 identifies HτRDH_\tau \in \mathbb{R}^D1 as yielding minimum or near-minimum MAE across all datasets, with stable performance across HτRDH_\tau \in \mathbb{R}^D2.

The larger comparative rationale is also explicit. Relative to experience replay, TMRB-N avoids storing raw samples or ego-subgraphs and therefore avoids memory explosion on expanding graphs. Relative to reservoir sampling, it is node-adaptive through HτRDH_\tau \in \mathbb{R}^D3 rather than task-agnostic. Relative to rehearsal with distillation, it avoids auxiliary losses and historical-data matching, because replay is realized through temporal gating with HτRDH_\tau \in \mathbb{R}^D4. Relative to pattern bank approaches (e.g., PECPM), it stores a global temporal prior vector HτRDH_\tau \in \mathbb{R}^D5 and relies on the DC Sampler to focus on volatile nodes.

The same experiments also report that CoMemNet achieves state-of-the-art performance across all three large-scale real-world datasets, and that it trains 15–30% of nodes in later years, which is presented as an efficiency result tied to the sampler-buffer combination. A plausible implication is that TMRB-N’s main contribution is not merely better state retention, but better selective retention: the buffer is effective because it is coupled to a mechanism that reduces both the number of updated nodes and the dimensionality of stored history.

Outside CoMemNet, closely related memory mechanisms have been connected to TMRB-N in several domains. In AdaTKG, a temporal knowledge graph reasoning model, the per-entity memory is presented as exactly such a buffer: each entity HτRDH_\tau \in \mathbb{R}^D6 maintains a memory vector updated causally as

HτRDH_\tau \in \mathbb{R}^D7

with a single shared scalar HτRDH_\tau \in \mathbb{R}^D8, and the memory is fused with static inductive representations through a learned gate (Lee et al., 8 May 2026). The model emphasizes that the memory is state, not per-entity trainable parameters, and therefore supports unseen entities. In that mapping, node adaptivity already appears even with shared HτRDH_\tau \in \mathbb{R}^D9, because each node’s state evolves according to its own interaction history. The same guide also proposes more explicit node-adaptive variants, such as time-varying context-conditioned H(τ1)H(\tau-1)0, while warning that per-node learned H(τ1)H(\tau-1)1 breaks strict inductivity.

A different line of work on temporal networks with node-specific memory associates node-level persistence with heterogeneous transition probabilities, relaxation times, and structural breaks (Clemente et al., 2023). The supplied formulation describes a per-node adaptive buffer whose effective length is tied to inferred relaxation time, for example through

H(τ1)H(\tau-1)2

This suggests a statistical interpretation of TMRB-N in which node-adaptivity is driven by estimated persistence timescales rather than neural feature drift. The same source explicitly notes, however, that the actual paper text was unavailable and that the provided framework was constructed to match the model family; accordingly, this interpretation should be read as a rigorously aligned formulation rather than as a direct quotation of the paper.

In time-sensitive event processing, dynamic buffer sizing yields a non-neural but operationally analogous notion of node-adaptive temporal buffering. For multiple distributed sources, a per-node dynamic time-out H(τ1)H(\tau-1)3 can be computed from observed transmission times, with the recommended BSTTDA rule

H(τ1)H(\tau-1)4

and evaluated through notCompensatedEventsPercentage and overfittingBufferTimePercentage (Weiss et al., 2020). Here, node-adaptivity means source-specific reorder windows rather than latent replay states, but the structural analogy is clear: compact temporal statistics are updated online to trade off correctness and memory or latency.

In quantum repeater architectures, memory buffer times can also be optimized hierarchically and per node or per link. The provided blueprint grounded in that literature defines node/link-specific buffer choices H(τ1)H(\tau-1)5 or H(τ1)H(\tau-1)6 to maximize the rate of distillable entanglement under dephasing and synchronization constraints (Santra et al., 2018). In that setting, the “memory buffer” is literal quantum storage time, not a learned representation, yet the same design principle recurs: buffer duration should be adapted to local temporal and reliability conditions rather than fixed globally.

Taken together, these formulations suggest that TMRB-N has both a narrow and a broad meaning. In the narrow sense, it is the specific node-adaptive temporal replay module in CoMemNet. In the broader sense, it denotes a family of mechanisms that maintain node-conditioned temporal state, update that state causally or periodically, and use adaptive selection or scheduling to preserve useful history without incurring uncontrolled storage growth.

Topic to Video (Beta)

No one has generated a video about this topic yet.

Whiteboard

No one has generated a whiteboard explanation for this topic yet.

Follow Topic

Get notified by email when new papers are published related to Node-Adaptive Temporal Memory Buffer (TMRB-N).