---
title: 'CoMemNet: Continual Traffic Forecasting'
url: https://www.emergentmind.com/topics/comemnet
type: topic
---

# CoMemNet: Continual Traffic Forecasting

Searching arXiv for the topic and closely related names to ground the article in current papers.
to=arxiv_search.search 总代理联系 ՞նչ query="CoMemNet OR CoMEM OR Chain-of-Memory CoMemNet COMNet CMMAC" max_results=10 sort_by="relevance"
to=arxiv_search.search  天天彩票网  天天中彩票有json
{"query":"CoMemNet OR CoMEM OR Chain-of-Memory CoMemNet COMNet CMMAC","max_results":10,"sort_by":"relevance"}
CoMemNet most directly denotes the framework introduced in “CoMemNet: Contrastive Sampling with Memory Replay Network for Continual Traffic Prediction” [2605.05738], a continual spatio-temporal forecasting architecture for expanding traffic networks. In that formulation, CoMemNet addresses sequential prediction on graphs whose node set and traffic patterns evolve over time, combining a dual-branch continual learning design, a Dynamic Contrastive Sampler driven by Wasserstein Distance features, and a Node-Adaptive Temporal Memory Replay Buffer. The name also overlaps with adjacent usages in recent literature: CoMEM denotes a continuous memory module for vision-language models [2505.17670], “CoMemNet” is discussed as a natural system interpretation of Chain-of-Memory for LLM agents [2601.14287], and related abbreviations such as COMNet and co-membership-based anomaly frameworks appear in other domains [2309.16959; 2203.16246]. In current arXiv usage, however, the explicit title “CoMemNet” refers to the continual traffic prediction framework [2605.05738].

## 1. Definition and scope

CoMemNet is a dual-branch continual learning framework for traffic prediction on *expanding* road networks, where both the node set and traffic patterns change over time [2605.05738]. The underlying setting is a sequence of graphs
\[
G = \{G_1, G_2, \dots, G_\tau, \dots, G_T\}, \quad G_\tau = \{V_\tau, E_\tau, A_\tau\},
\]
with
\[
G_\tau = G_{\tau-1} + \Delta G_\tau,
\]
so that new nodes and edges are added over time [2605.05738]. At the forecasting level, the model consumes historical traffic
\[
X_{(t-T_h:t)}^\tau \in \mathbb{R}^{T_h \times N_\tau \times C}
\]
and predicts future traffic
\[
Y_{(t+T_f:t)}^\tau \in \mathbb{R}^{T_f \times N_\tau \times C}
\]
for each period \(\tau\) [2605.05738].

The framework is designed for continual prediction without retraining from scratch and without storing all past data [2605.05738]. Its central claim is that static-graph spatio-temporal methods are inadequate when \(V_\tau\), \(E_\tau\), and \(A_\tau\) evolve and when traffic distributions drift over years [2605.05738]. Accordingly, CoMemNet replaces fixed-topology dependence with a graph-free, embedding-based backbone and augments it with replay- and sampling-based continual learning mechanisms [2605.05738].

A useful contextual distinction is that the traffic-prediction CoMemNet is not a generic umbrella term for all “co-memory” systems. In multimodal reasoning, CoMEM denotes a continuous memory module attached to a frozen VLM [2505.17670]. In LLM-agent memory, a hypothetical CoMemNet is described as a reusable module built around Chain-of-Memory [2601.14287]. In weakly supervised semantic segmentation, COMNet denotes a co-occurrent matching network [2309.16959]. These systems share a memory-centric vocabulary, but they solve different problems and use different inductive biases.

## 2. Problem formulation in expanding traffic networks

The motivating problem is continual traffic prediction on streaming, expanding graphs [2605.05738]. Most earlier spatio-temporal GNNs assume a fixed adjacency matrix and a bounded training window, whereas real traffic systems exhibit node expansion, edge evolution, and nonstationary traffic dynamics [2605.05738]. This makes naive incremental training vulnerable to catastrophic forgetting and full retraining computationally prohibitive [2605.05738].

CoMemNet formalizes the task as sequential learning over years, with each year treated as a period \(\tau\) [2605.05738]. Data are split temporally into train/valid/test with ratio \(6:2:2\), and the model is updated sequentially from year 1 to the final year, retaining learned parameters and compact memory rather than full raw history [2605.05738]. The adjacency matrix used for baselines is defined by Post-Mile distance as
\[
A_{\tau}[mn] = \begin{cases}
\exp\left(-\frac{d_{mn}^2}{\delta^2}\right), & m \neq n \text{ and } d_{mn} < \epsilon,\\
0, & \text{otherwise},
\end{cases}
\]
with \(\delta=100\) and \(\epsilon=1\) [2605.05738]. The paper explicitly notes that this adjacency is not used directly by the CoMemNet backbone [2605.05738].

This formulation situates CoMemNet closer to identity- and embedding-based spatio-temporal forecasting than to conventional STGNNs. A plausible implication is that the method treats topology change primarily as a source of distribution shift in node representations rather than as an object of explicit message passing. That interpretation is consistent with the paper’s emphasis on node features, time embeddings, Wasserstein-distance-based drift estimation, and replay over compact temporal summaries [2605.05738].

## 3. Dual-branch architecture and objective

CoMemNet consists of three main parts: a backbone, an Online branch, and a Target branch [2605.05738]. The backbone includes the DC Sampler, a Node Memory Bank with TMRB-N, and an MLP-based Encoder plus a \(1\times 1\) Conv Projector [2605.05738]. The Online branch is the fast learner updated by gradient descent on the current period, while the Target branch is a momentum-updated copy that provides stable historical features [2605.05738].

The supervised objective is MAE on the dynamically selected node subset:
\[
L(\hat{Y}_{\tau}, Y_{\tau}, \Theta) = \frac{1}{T_f \times N_{\tau}^{s} \times C} \sum_{t=1}^{T_f} \sum_{n=1}^{V_{\tau}^{s}} \sum_{c=1}^{C} \left| \hat{Y}_{\tau}(t, n, c) - Y_{\tau}(t, n, c) \right|.
\]
The paper explicitly notes that despite the term “contrastive” in the name, CoMemNet does not use an InfoNCE-style contrastive loss; “contrastive” refers to contrastive sampling based on inter-period feature change [2605.05738].

The Online branch parameters \(\theta_o\) are updated as
\[
\theta_o \leftarrow \theta_o - \alpha \nabla_{\theta_o} L(\hat{Y}_{\tau}, Y_{\tau}, \theta_o),
\]
while the Target branch parameters \(\theta_t\) follow an EMA update
\[
\theta_t \leftarrow \beta \cdot \theta_t + (1 - \beta) \cdot \theta_o,
\]
with \(\beta \in [0,1]\) [2605.05738]. This dual-timescale design separates fast adaptation from stable historical representation.

The backbone itself is intentionally lightweight and graph-free [2605.05738]. Spatio-temporal context is injected through spatial identity, temporal identity, and temporal memory rather than explicit graph convolution [2605.05738]. The encoder is described as an \(L\)-layer MLP producing node-level features \(F_\tau \in \mathbb{R}^{N_\tau^s \times C_F}\), followed by a linear \(1\times 1\) convolutional projector [2605.05738]. This suggests a deliberate trade-off: weaker explicit structural inductive bias in exchange for robustness under topology drift and lower replay cost.

## 4. Dynamic Contrastive Sampler

The Dynamic Contrastive Sampler is the mechanism that selects informative nodes for training in each period [2605.05738]. It operates on Target-branch embeddings from consecutive periods,
\[
F_{(\tau-1)} \in \mathbb{R}^{N_{\tau-1} \times C_F}, \qquad
F_{\tau} \in \mathbb{R}^{N_{\tau} \times C_F},
\]
and uses Wasserstein Distance features to quantify node-level distribution shift [2605.05738].

For each node \(j\) present in both periods, current-period features are normalized as
\[
p_\tau(j) = \frac{F_\tau(j) - \min(F_\tau)}{\max(F_\tau) - \min(F_\tau)},
\quad p_\tau(j) \in [0,1].
\]
These normalized features are discretized into \(n\) bins, yielding
\[
h_\tau^i(j) = \sum_{c=1}^{C_F} 1\big(b_{(i-1)} < p_\tau(j) < b_i\big),
\]
and similarly for \(h_{(\tau-1)}^i(j)\) [2605.05738]. The paper then defines a Wasserstein-style discrepancy
\[
W(\tau-1, \tau)
= \sum_{j \in V_{(\tau-1)}} \sum_{i=1}^{n} c_i \left| h_{(\tau-1)}^i(j) - h_\tau^i(j) \right|,
\]
with the operational interpretation of a per-node score
\[
W_j(\tau-1,\tau) = \sum_{i=1}^{n} c_i \left| h_{(\tau-1)}^i(j) - h_\tau^i(j) \right|
\]
for sampling purposes [2605.05738].

Given a ratio hyperparameter \(\rho\), the number of replayed historical nodes is
\[
M = N_\tau \times \rho.
\]
The selected node subset is
\[
V_\tau^s
= \big(\text{Top-M}\{ W_j(\tau-1, \tau) \mid j \in V_{(\tau-1)} \}\big)
\cup (V_\tau \setminus V_{(\tau-1)}),
\]
that is, all new nodes plus the historical nodes with largest Wasserstein distance [2605.05738]. This focuses optimization on nodes with the greatest distributional change and on newly introduced nodes, thereby mitigating catastrophic forgetting while reducing per-period training cost [2605.05738].

The paper’s terminology can be misleading if read through the lens of metric learning. The “contrastive” component is not pairwise representation learning with positive and negative pairs, but contrastive node selection based on temporal discrepancy [2605.05738]. This distinction is central to understanding the method’s contribution.

## 5. Node-Adaptive Temporal Memory Replay Buffer

The Node-Adaptive Temporal Memory Buffer, TMRB-N, is CoMemNet’s replay mechanism for temporal information [2605.05738]. Rather than storing full time series or full-graph neighborhoods, it stores a compact temporal memory vector \(H_\tau \in \mathbb{R}^{D}\) for each period [2605.05738]. The module is designed to adapt to varying node set sizes and to emphasize nodes whose temporal embeddings change most [2605.05738].

For selected nodes \(V_\tau^s\), the model constructs daily embeddings \(T_\tau^D \in \mathbb{R}^{N_\tau^s \times D^D}\) and weekly embeddings \(T_\tau^W \in \mathbb{R}^{N_\tau^s \times D^W}\), then concatenates them into
\[
T_\tau = [T_\tau^D \parallel T_\tau^W] \in \mathbb{R}^{N_\tau^s \times D},
\quad D = D^D + D^W
\]
[2605.05738]. Given previous-period memory \(H_{(\tau-1)} \in \mathbb{R}^{D}\), the difference signal is
\[
\Delta H(\tau-1, \tau) = \left|T_\tau - \text{expand}(H_{(\tau-1)}, N_\tau)\right|.
\]
The key nodes are selected by
\[
V_\tau^k = \text{Top-K}(\Delta H(\tau-1, \tau), K),
\]
and their weighted average temporal representation is
\[
H_\tau^a = \frac{1}{K} \sum_{i \in V_\tau^k} T_\tau(i)\, W,
\]
where \(W\) is a learnable weight matrix [2605.05738].

Temporal fusion is then performed by a GRU-like update:
\[
\begin{gathered}
r_t = \sigma\big(W_r \cdot (H_{(\tau-1)} \parallel H_\tau^a)\big), \\
z_t = \sigma\big(W_z \cdot (H_{(\tau-1)} \parallel H_\tau^a)\big), \\
h_t = \tanh\big(W_t \cdot (H_\tau^a \parallel (H_{(\tau-1)} \cdot r_t))\big), \\
H_\tau = z_t \cdot h_t + (1 - z_t) \cdot H_\tau^a.
\end{gathered}
\]
The resulting \(H_\tau\) is stored for the next period [2605.05738].

This design is explicitly motivated as a response to memory explosion [2605.05738]. A plausible implication is that TMRB-N should scale more gracefully than replay schemes that preserve full node histories, though it also implies a strong compression bottleneck. The ablations reported in the paper show that removing TMRB-N, replacing key-node selection with random selection, or disabling temporal update all worsens MAE/RMSE/MAPE [2605.05738].

## 6. Empirical evaluation and continual-learning behavior

CoMemNet is evaluated on three multi-year PeMS-based datasets: PEMSD3(S), PEMSD4(L), and PEMSD8(M) [2605.05738]. These datasets were derived from PeMS 30-second sensor data aggregated to 5-minute intervals, with prediction of the next 60 minutes from the previous 60 minutes [2605.05738]. The node counts expand over time: PEMSD3(S) from 655 to 871, PEMSD4(L) from 1118 to 2406, and PEMSD8(M) from 216 to 320 [2605.05738].

The paper reports state-of-the-art performance across all three datasets [2605.05738]. On 12-step annual-average forecasting, CoMemNet achieves 13.57 MAE, 22.94 RMSE, and 18.80% MAPE on PEMSD3(S); 22.00 MAE, 37.38 RMSE, and 15.86% MAPE on PEMSD4(L); and 17.03 MAE, 28.41 RMSE, and 17.82% MAPE on PEMSD8(M) [2605.05738]. It is compared against retrained, static, and expansible backbones as well as continual-learning baselines including TrafficStream, STKEC, PECPM, TFMoE, and EAC [2605.05738].

A salient result is node efficiency. The DC Sampler drastically reduces training-node counts while preserving or improving accuracy [2605.05738]. On PEMSD3(S) in 2017, CoMemNet trains on 192 of 871 nodes; on PEMSD4(L) in 2015, on 1089 of 2406 nodes; and on PEMSD8(M) in 2018, on 92 of 320 nodes [2605.05738]. Training time per epoch is also substantially reduced relative to heavier continual baselines [2605.05738].

The ablation results identify both DC Sampler and TMRB-N as essential [2605.05738]. Removing new-node inclusion or historical replay degrades performance; a static variant performs worst; and a retrained version is strongest but more expensive [2605.05738]. Hyperparameter studies show that increasing \(\rho\) generally improves MAE with diminishing returns and that \(K=12\) yields the best and most stable results across datasets [2605.05738].

## 7. Related usages of the name and conceptual neighbors

The name “CoMemNet” has a broader conceptual neighborhood in recent arXiv literature, but these systems should not be conflated.

In vision-language modeling, CoMEM is a continuous memory module that encodes each retrieved image-text item into \(V_t \in \mathbb{R}^{8 \times d}\) and prepends the resulting dense memory vectors to a frozen VLM’s input embeddings [2505.17670]. It uses the same VLM as encoder and decoder, adds a Q-Former compression head, trains only 1.2% of parameters, and evaluates on eight multimodal reasoning benchmarks [2505.17670]. This work describes CoMEM as a continuous memory network for VLMs, but its problem setting is multimodal retrieval-conditioned reasoning rather than continual forecasting [2505.17670].

In LLM-agent memory, “Chain-of-Memory” proposes lightweight construction plus sophisticated utilization of external memory [2601.14287]. The paper explicitly remarks that its design is highly relevant to a system like a “CoMemNet,” describing a hypothetical reusable memory module built around `write(turn)` and `read(query)` semantics [2601.14287]. The core mechanism organizes top-\(K\) retrieved nodes into chains with gating score
\[
S_{\text{gate}(m)} = \cos(\mathbf{m}, \mathbf{q}) \cdot \cos(\mathbf{m}, \mathbf{C}),
\]
and adaptive truncation
\[
s_t^{*} < \beta \cdot s_{t-1}
\]
to prune irrelevant steps [2601.14287]. Here “CoMemNet” is an interpretive extension rather than the paper’s formal title.

In weakly supervised semantic segmentation, COMNet stands for Co-Occurrent Matching Network [2309.16959]. It improves CAMs through inter-matching across paired images with common classes and intra-matching within an image, achieving 67.1/67.6 val/test mIoU with ResNet-50 and 67.8/68.1 with ResNet-101 on PASCAL VOC 2012 [2309.16959]. Although the details note that COMNet is sometimes loosely referred to as “CoMemNet,” the official name is COMNet [2309.16959].

In network anomaly detection, CMMAC constructs a co-membership bipartite graph and ranks communities by aggregated membership probabilities inferred via link prediction [2203.16246]. This is conceptually a co-membership network model, but not a system formally named CoMemNet [2203.16246].

Taken together, these papers indicate that “CoMemNet” functions both as a specific model name in traffic prediction and as a broader memory-network descriptor in adjacent areas. This suggests a convergent design tendency across fields: compact external state, selective replay or retrieval, and dynamic conditioning of the current computation by compressed historical information.

## 8. Limitations and prospective directions

The traffic-prediction CoMemNet has several explicit limitations. First, the “contrastive” component is only implicit; there is no explicit contrastive loss, which may differ from expectations associated with contrastive representation learning [2605.05738]. Second, performance depends on hyperparameters such as \(\rho\) and \(K\), and tuning may be required for new domains [2605.05738]. Third, the MLP-based graph-free backbone may underutilize explicit spatial connectivity when reliable graph structure is available [2605.05738]. Fourth, the continual segmentation into yearly periods is fixed by the experimental setup and may not transfer optimally to other streaming regimes [2605.05738].

The paper suggests combining the DC Sampler and TMRB-N with stronger spatial backbones, extending discrepancy measures beyond Wasserstein distance, automating hyperparameter selection, and applying the framework to other spatio-temporal streams such as cellular traffic or IoT networks [2605.05738]. A plausible implication is that CoMemNet’s main transferable contribution lies less in its specific MLP forecaster than in its separation of three concerns: fast online adaptation, slow historical representation via EMA, and replay constrained to dynamically selected high-shift entities.

Across the related literature, analogous future directions appear in different forms. CoMEM points toward larger memory banks, hierarchical retrieval, and cross-model sharing of continuous memory [2505.17670]. Chain-of-Memory points toward learned gating, RL-based stopping, and multimodal extension [2601.14287]. These parallels suggest that selective memory utilization, rather than indiscriminate accumulation of context or replay, is becoming a recurring systems principle.

Source: https://www.emergentmind.com/topics/comemnet