---
title: 'TF-DWGNet: Dynamic Weighted Graph Methods'
url: https://www.emergentmind.com/topics/tf-dwgnet
type: topic
---

# TF-DWGNet: Dynamic Weighted Graph Methods

TF-DWGNet is a designation that appears in the provided literature in two distinct technical senses rather than as a single standardized architecture. In traffic forecasting, it encapsulates **traffic forecasting with dynamic weighted graph networks**, where the dynamic weighted graph structure (DWGS) embedding is operationalized inside the model DWAFM to learn time-varying edge weights over a fixed physical sensor topology [2603.00997]. In multi-omics cancer subtype classification, TF-DWGNet denotes **“A Directed Weighted Graph Neural Network with Tensor Fusion”**, a supervised, modality-aware framework that constructs directed weighted graphs per omics modality from XGBoost trees and fuses modality-specific embeddings through low-rank tensor fusion [2509.16301]. A related communication-network paper explicitly states that TF-DWGNet does not appear there and that the relevant model is DWNet, not TF-DWGNet [2401.00429].

## 1. Nomenclature and domain-specific usage

In the provided corpus, the same designation is attached to substantially different objects: a traffic-forecasting paradigm centered on dynamic weighted graph embeddings, and a cancer-subtyping architecture centered on directed weighted feature graphs and tensor fusion. The overlap lies in the use of weighted graph structure as an inductive bias, but the graph semantics, learning objectives, and downstream tasks differ materially.

| Context | Meaning of TF-DWGNet | Core components |
|---|---|---|
| Traffic forecasting | traffic forecasting with dynamic weighted graph networks | DWGS embedding, spatial self-attention, frequency-domain MLPs |
| Multi-omics cancer subtype classification | A Directed Weighted Graph Neural Network with Tensor Fusion | XGBoost-derived directed weighted graphs, GEDFN, low-rank tensor fusion |
| Communication-network modeling | term absent; the paper proposes DWNet | heterogeneous path–link GNN for latency and jitter prediction |

A common source of confusion is terminological rather than methodological. The traffic paper treats TF-DWGNet as an umbrella description for a dynamic weighted graph approach instantiated by DWAFM, whereas the cancer paper uses TF-DWGNet as the formal model name. The communication-network paper removes further ambiguity by stating that the “TF-” designation is not part of DWNet [2401.00429].

## 2. Traffic forecasting formulation under TF-DWGNet

Within the traffic literature, TF-DWGNet is grounded in a sensor-network forecasting problem defined on an undirected graph
$G = (V, E, A)$, where $V = \{v_1, v_2, \ldots, v_N\}$ are $N$ observation points, $E$ encodes connectivity based on the physical road layout, and $A \in \mathbb{R}^{N \times N}$ quantifies spatial association when a physical connection exists and $0$ otherwise. Historical traffic data are represented as $X \in \mathbb{R}^{T \times N \times D}$, and the task is to predict $Y \in \mathbb{R}^{T_f \times N \times D}$ for the next $T_f$ steps through a learned mapping $F$, written as $X \xrightarrow{F} Y$. In the reported experiments, both the input length $T$ and the output horizon $T_f$ are set to $12$ steps [2603.00997].

The node semantics are explicitly physical. Nodes correspond to sensors such as loop detectors or cameras situated on road segments or intersections, and edges reflect navigable road segments. A predefined adjacency $A_p$, derived from the physical topology, is assumed to be available and is used as a structural mask. This design fixes the graph skeleton while allowing the model to vary the strength of associations over time. The paper positions this as a response to the limitation of static graphs, which can encode fixed connectivity but cannot reflect changes such as rush-hour versus off-peak association patterns [2603.00997].

In this setting, TF-DWGNet is instantiated by the dynamic weighted graph structure embedding. The core claim is that the dynamic graph should be learned from observations while preserving the physical topology. This makes the graph representation time-varying without permitting arbitrary edges outside the physical road network. The paper states that DWGS is the concrete dynamic weighted graph instantiation and that DWAFM operationalizes TF-DWGNet by integrating DWGS embedding with attention and frequency-domain MLPs [2603.00997].

## 3. Dynamic weighted graph structure and the DWAFM architecture

DWGS learns a time-varying, data-driven weighted adjacency by applying self-attention to the original data at each time step. For every time $t$,
$$
Q_g^{(t)} = X^{(t)} W^q,\qquad K_g^{(t)} = X^{(t)} W^k,
$$
with $W^q, W^k \in \mathbb{R}^{D \times d_f}$ and $X^{(t)} \in \mathbb{R}^{N \times D}$, yielding $Q_g^{(t)}, K_g^{(t)} \in \mathbb{R}^{N \times d_f}$. The attention logits are
$$
L^{(t)} = Q_g^{(t)} (K_g^{(t)})^\top / \sqrt{d_f} \in \mathbb{R}^{N \times N}.
$$
Topology-aware masking is then imposed: for non-connected entries, $L^{(t)}_{i,j} = -\infty$ if $(A_p)_{i,j} = 0$, and otherwise the value is unchanged. After row-wise softmax,
$$
A_a^{(t)} = \mathrm{Softmax}(L^{(t)}) \in \mathbb{R}^{N \times N},
$$
which is asymmetric and row-stochastic. Symmetrization produces the valid undirected dynamic weighted adjacency
$$
A_g^{(t)} = \big(A_a^{(t)} + (A_a^{(t)})^\top \big)/2 \in \mathbb{R}^{N \times N},
$$
and the DWGS embedding is
$$
E_g^{(t)} = A_g^{(t)} B,\qquad B \in \mathbb{R}^{N \times d_f},
$$
so that $E_g \in \mathbb{R}^{T \times N \times d_f}$ after aggregation over time [2603.00997].

The embedding layer fuses four sources of information. The feature embedding is $E_f = FC(X) \in \mathbb{R}^{T \times N \times d_f}$. Temporal periodicity is encoded through two learnable tables, $W_d \in \mathbb{R}^{N_d \times d_f}$ and $W_w \in \mathbb{R}^{N_w \times d_f}$, which yield $E_{td}$ and $E_{tw}$ and are concatenated as
$$
E_t = \mathrm{Concat}[(E_{td}, E_{tw}), \mathrm{dim} = -1] \in \mathbb{R}^{T \times N \times 2d_f}.
$$
A learnable spatial-temporal adaptive embedding $E_a \in \mathbb{R}^{T \times N \times d_f}$ is introduced “to capture the hidden spatial relationships,” and is concatenated with $E_g$ to form
$$
E_s = \mathrm{Concat}[(E_g, E_a), \mathrm{dim} = -1] \in \mathbb{R}^{T \times N \times 2d_f}.
$$
The final hidden representation is
$$
Z = \mathrm{Concat}[(E_f, E_s, E_t), \mathrm{dim} = -1] \in \mathbb{R}^{T \times N \times d_h},
$$
with $d_h = 5d_f$ [2603.00997].

Spatial modeling is performed by compressing $Z$ to node-level features via two 1D-CNNs,
$$
Z_r = \mathrm{Conv1d}(\mathrm{ReLU}(\mathrm{Conv1d}(Z))) \in \mathbb{R}^{N \times d_h},
$$
followed by spatial self-attention:
$$
Q = W_q Z_r,\qquad K = W_k Z_r,\qquad V = W_v Z_r,
$$
$$
Z_s = \mathrm{Softmax}\!\left(QK^\top / \sqrt{d_h/2}\right)V \in \mathbb{R}^{N \times d_h}.
$$
The tuned scaling factor is $\sqrt{d_h/2}$ rather than $\sqrt{d_h}$, and the paper states that this is empirically better. Up-sampling through two further 1D-CNNs gives
$$
Z_e = \mathrm{Conv1d}(\mathrm{ReLU}(\mathrm{Conv1d}(Z_s))) \in \mathbb{R}^{T \times N \times d_h},
$$
and residual normalization yields
$$
Z_t = \mathrm{LayerNorm}(Z_e + Z) \in \mathbb{R}^{T \times N \times d_h}.
$$
DWGS influences this attention stage indirectly by changing $Z$ through $E_g$ and $E_s$ [2603.00997].

Temporal modeling is shifted to the frequency domain. The model applies FFT along the temporal dimension,
$$
Z_f = \mathcal{F}(Z_t),
$$
with real and imaginary parts $Z_f^r$ and $Z_f^i$, and then uses two parameter-independent MLPs with cross-combination:
$$
\tilde{Z}_f = \mathrm{MLP}^{(r)}(Z_f^r) - \mathrm{MLP}^{(i)}(Z_f^i)
+ j\big[\mathrm{MLP}^{(i)}(Z_f^r) + \mathrm{MLP}^{(r)}(Z_f^i)\big].
$$
Each MLP follows
$$
\mathrm{MLP}(Z_f^{r(i)}) = FC_2\big(\mathrm{Dropout}(\mathrm{GELU}(FC_1(Z_f^{r(i)})))\big).
$$
Inverse FFT returns the representation to the time domain:
$$
\tilde{Z}_t = \mathcal{F}^{-1}(\tilde{Z}_f) \in \mathbb{R}^{T \times N \times d_h}.
$$
The prediction head maps the final spatiotemporal output to $\hat{Y} \in \mathbb{R}^{T_f \times N}$ with a fully connected layer, and training uses the MAE objective
$$
L_{\mathrm{MAE}} = \frac{1}{T_f N} \sum_{t=1}^{T_f}\sum_{i=1}^{N} |\hat{Y}_{t,i} - Y_{t,i}|.
$$
Implementation uses BasicTS, Adam with initial learning rate $0.001$, batch size $64$, $80$ epochs, and a train/val/test split of $6{:}2{:}2$ [2603.00997].

## 4. Empirical behavior of DWAFM as a traffic TF-DWGNet

The traffic instantiation of TF-DWGNet is evaluated on five real-world datasets: three highway traffic flow datasets, PEMS03, PEMS04, and PEMS08, and two speed datasets, PEMSD7(L) and PEMSD7(M). Metrics are MAE, RMSE, and MAPE(%), and the baselines are HI, STGCN, GWNet, StemGNN, STNorm, STID, DGCRN, MegaCRN, STWave, STAEformer, and DFDGCN [2603.00997].

The reported quantitative results are specific. On PEMS08, DWAFM achieves **MAE = 13.57, RMSE = 22.94, MAPE = 8.92**, outperforming all listed baselines on all three metrics. On PEMS04, it achieves **MAE = 18.14, RMSE = 29.72, MAPE = 12.37**, and is best on MAE and RMSE while competitive on MAPE. On PEMS03, it achieves **RMSE = 23.96**, which is reported as the best, with competitive MAE and MAPE. On PEMSD7(M), it achieves **MAE = 2.59, RMSE = 5.24, MAPE = 6.40**, best across all metrics. On PEMSD7(L), it achieves **MAE = 2.79, RMSE = 5.70, MAPE = 7.09**, best or second-best depending on the metric [2603.00997].

The ablation studies on PEMS08 and PEMSD7(M) attribute these results to several components rather than to a single module. Removing the dynamic adjacency $A_g$ or the DWGS embedding $E_g$ degrades performance. Removing the spatial embedding $E_s$, the temporal embedding $E_t$, FFT, or the entire spatial or temporal layers further hurts performance. The paper states that DWGS and FFT are both crucial. It also reports that the proposed frequency-domain MLPs outperform CNN and Attention alternatives across MAE, RMSE, and MAPE on PEMS08 and PEMSD7(M), while matching CNN runtime and exceeding self-attention efficiency [2603.00997].

The visualization results connect the dynamic adjacency to observed traffic behavior. Learned $A_g$ correlates with actual flow similarity over time: when two sensors’ flows diverge and later realign, their inferred correlation strength decreases and then recovers accordingly. Forecast plots show that DWAFM better tracks rising trends, abrupt speed drops, and stable intervals than strong baselines such as STAEformer, STWave, and MegaCRN. The practical insights section further identifies non-stationary traffic regimes, heterogeneous correlations, and incident-driven disruptions as cases where DWGS is especially useful, while also documenting failure modes: an overly restrictive $A_p$ can suppress useful associations, MAPE is unstable for near-zero ground truth, the attention scaling factor and embedding dimension $d_f$ are sensitive, and sudden sensor anomalies or noise may transiently distort dynamic weights [2603.00997].

## 5. TF-DWGNet for multi-omics cancer subtype classification

In the multi-omics literature, TF-DWGNet is a supervised, modality-aware graph neural architecture for multiclass cancer subtype classification. The inputs are $n$ patients measured across $M$ omics layers, with the paper considering $M = 3$ modalities: DNA methylation, mRNA, and miRNA. For modality $m$, the feature matrix is $X_m \in \mathbb{R}^{n \times p_m}$ and the labels are $Y \in \{1,\ldots,C\}^n$. The motivation is that the data are high-dimensional and heterogeneous, and that the predictive structure includes both intra-modality dependencies and inter-modality interactions [2509.16301].

The model constructs a directed weighted graph for each modality using a supervised, tree-based scheme grounded in XGBoost. Each XGBoost tree is viewed as a directed graph in which the order of features along a root-to-leaf path induces a precedence relation: if feature $i$ is used before feature $j$ on a splitting path, an edge $i \rightarrow j$ is created. Aggregating over the ensemble yields counts $c_{ij}^m$ of how often feature $i$ precedes $j$, and the raw adjacency is
$$
A_{ij}^{(m)} = c_{ij}^m,\qquad A_{ij}^{(m)} \ge 0,\qquad A_{ij}^{(m)} \ne A_{ji}^{(m)} \text{ in general}.
$$
Self-loops are added through $\tilde{A}^{(m)} = A^{(m)} + I$, with degree matrix $\tilde{D}^{(m)}_{ii} = \sum_j \tilde{A}^{(m)}_{ij}$, followed by symmetric degree normalization
$$
S^{(m)} = (\tilde{D}^{(m)})^{-1/2}\tilde{A}^{(m)}(\tilde{D}^{(m)})^{-1/2}.
$$
The paper states that this balances the influence of highly connected nodes while preserving directionality in the edge weights [2509.16301].

The supervision signal enters graph construction through XGBoost’s regularized gain criterion. For a candidate split with left/right gradient sums $G_L, G_R$, Hessian sums $H_L, H_R$, and parent $G, H$, the gain is
$$
\mathrm{Gain} = \frac{1}{2}\left[\frac{G_L^2}{H_L+\lambda} + \frac{G_R^2}{H_R+\lambda} - \frac{G^2}{H+\lambda}\right] - \gamma,
$$
where $\lambda$ and $\gamma$ are regularization parameters. Features that consistently yield large gains are selected earlier and more frequently, so edge direction and edge weight reflect label-informed, task-specific dependencies rather than generic correlations [2509.16301].

Each modality is then encoded with a Graph-Embedded Deep Feedforward Network. For modality $m$, the first hidden layer is
$$
H_m^{(1)} = \mathrm{ReLU}\big(X_m (W_m \odot S^{(m)}) + b_m\big),
$$
where $W_m \in \mathbb{R}^{p_m^* \times p_m^*}$ and $b_m \in \mathbb{R}^{p_m^*}$. This gate forces the input-to-hidden connections to respect the directed weighted graph, and the experiments use one hidden layer per modality encoder, producing unimodal embeddings $Z_m = H_m^{(1)} \in \mathbb{R}^{n \times p_m^*}$. Training minimizes categorical cross-entropy with L2 regularization over all trainable parameters from the three GEDFN branches and the downstream classifier, optimized with Adam. The paper also reports dropout, batch normalization, early stopping, and residual connections in the classifier for generalization and stability [2509.16301].

## 6. Tensor fusion, interpretability, and empirical performance in cancer subtyping

TF-DWGNet’s second defining component is tensor fusion with low-rank decomposition. For a sample $s$, with modality embeddings $z^{(m)} \in \mathbb{R}^{p_m^*}$, each embedding is augmented by a bias term,
$$
\tilde{z}^{(m)} = \begin{bmatrix}1 & z^{(m)}\end{bmatrix} \in \mathbb{R}^{p_m^*+1}.
$$
The full fusion tensor is the third-order outer product
$$
\mathcal{T}_s = \tilde{z}^{(1)} \otimes \tilde{z}^{(2)} \otimes \tilde{z}^{(3)},
$$
which enumerates unimodal, bimodal, and trimodal interactions. Rather than materializing $\mathcal{T}_s$, TF-DWGNet uses Canonical Polyadic decomposition with rank $R$. With projection matrices $P_1, P_2, P_3$ and nonnegative weight vector $\lambda \in \mathbb{R}^R$, the fused representation is
$$
h_s = (P_1\tilde{z}^{(1)}) \odot (P_2\tilde{z}^{(2)}) \odot (P_3\tilde{z}^{(3)}) \in \mathbb{R}^R,
$$
$$
f_s = \mathrm{diag}(\lambda)\, h_s \in \mathbb{R}^R,
$$
followed by logits $o_s = W_o f_s + b_o$ and softmax. The stated computational benefit is a reduction from cubic to linear complexity in dimensions and rank [2509.16301].

Interpretability is embedded in the architecture at both feature and modality levels. For feature $j$ in modality $m$, the importance score is
$$
IF_j^{(m)} =
\sum_{u=1}^{p_m^*} \left|W_{ju}^{(m)} \cdot I(\tilde{A}_{ju}^{(m)} > 0)\right|
+
\sum_{u=1}^{p_m^*} \left|W_{uj}^{(m)} \cdot I(\tilde{A}_{uj}^{(m)} > 0)\right|,
$$
where the indicator excludes self-loops. Modality importance is the normalized sum of feature scores,
$$
RIO_m =
\frac{\sum_{j=1}^{p_m^*} IF_j^{(m)}}
{\sum_{k=1}^{3}\sum_{j=1}^{p_k^*} IF_j^{(k)}},
\qquad RIO_m \in [0,1],\qquad \sum_{m=1}^3 RIO_m = 1.
$$
On BRCA, the top-ranked genes include **FAM134B** and **FOXC1**, which the paper describes as consistent with the literature [2509.16301].

Evaluation is performed on three TCGA cohorts with 20 stratified splits (60/20/20 train/val/test) and fixed seeds. The cohorts are BRCA with $n = 875$, $C = 5$; UCEC with $n = 430$, $C = 3$; and KIPAN with $n = 707$, $C = 3$. Directed weighted graphs are constructed per modality using XGBoost with 100 trees. For BRCA, selected features were **878:825:494** for methylation:mRNA:miRNA, with **4,300:3,658:4,176** edges and edge-to-node ratios **4.90:4.43:8.45**. UCEC and KIPAN had ratios between approximately **2.3** and **2.9** [2509.16301].

The reported predictive performance is consistently stronger than the baselines RF, XGBoost, DFN, GCN, and GEDFN. On BRCA, TF-DWGNet achieves **Accuracy 0.821 ± 0.023**, **F1-weighted 0.826 ± 0.022**, and **F1-macro 0.785 ± 0.033**, with most Welch’s $t$-test comparisons satisfying $p \le 0.001$. On UCEC, it achieves **Accuracy 0.869 ± 0.038**, **F1-weighted 0.858 ± 0.034**, and **F1-macro 0.598 ± 0.056**, with many differences statistically significant at $p \le 0.05$. On KIPAN, it achieves **Accuracy 0.964 ± 0.017**, **F1-weighted 0.964 ± 0.017**, and **F1-macro 0.956 ± 0.024**; the paper notes that the task is relatively separable, so significance is limited in some comparisons. Implementation uses TensorFlow with Adam, learning rate $1\times10^{-4}$, batch size $64$, up to $1{,}000$ epochs, dropout $0.5$, L2 regularization $\lambda = 0.01$, batch normalization, early stopping with patience $10$ and min-delta $0.001$, and tensor fusion rank $R = 48$; experiments ran on the Falcon supercomputer with 4 CPUs and 20 GB RAM per job [2509.16301].

The limitations are also explicit. The graph construction depends on label quality and splitting criteria; symmetric degree normalization may partially attenuate asymmetry in propagation; scaling to more modalities requires careful rank selection; the current study assumes complete multi-omics; and future work is suggested in missing-modality handling, domain shift, self-supervised pretraining, contrastive alignment, dynamic graph learning, causal inference for directionality, and uncertainty quantification [2509.16301].

## 7. Distinctions from related graph-network terminology

The provided literature supports a narrow but important clarification: TF-DWGNet should not be conflated with DWNet. The communication-network paper “Deeper and Wider Networks for Performance Metrics Prediction in Communication Networks” states that the term TF-DWGNet does not appear there, and that the proposed model is DWNet, a heterogeneous graph neural network for predicting end-to-end latency and jitter in Digital Twin Networks [2401.00429].

This distinction matters because the underlying graph objects differ fundamentally. In the traffic setting, nodes are physical sensors and the model learns time-varying edge weights over a masked road topology. In the cancer setting, nodes are selected omics features and edge direction is inferred from label-informed XGBoost splitting paths. In DWNet, by contrast, the graph is a heterogeneous path–link structure with typed nodes, sequence-aware link-to-path aggregation, neighbor-path averaging, and GRU-based closed-loop updates. The DWNet paper additionally notes that if “TF-” were intended to denote temporal fusion, transformer fusion, or transfer learning, that would be outside its scope [2401.00429].

A plausible implication is that TF-DWGNet functions in the present literature as a domain-specific label rather than a single canonical model family. What links the usages is an emphasis on learning or exploiting weighted graph structure for prediction; what separates them are the graph construction procedures, supervision pathways, and target tasks.

Source: https://www.emergentmind.com/topics/tf-dwgnet