Paper commentary
Connecting the Dots: Multivariate Time Series Forecasting with Graph Neural Networks
MTGNN learns the graph between variables while forecasting multivariate time series
- Problem Multivariate forecasting needs dependencies between variables, but graph neural networks need a graph, and these series usually come without one. Fixed external graphs may also not suit the forecasting task.
- Method MTGNN learns a sparse, one-directional graph from node embeddings and trains it jointly with mix-hop graph convolution and dilated inception temporal layers. Instead of a fixed graph, it infers the relations from the data itself.
- Results On Traffic at horizon 3, MTGNN reaches RSE 0.4162, against 0.4487 for TPA-LSTM, the strongest baseline in that column.
Why forecasting needs learned relations between variables
Multivariate forecasting predicts several related series at once, and each variable is assumed to depend on its own history as well as on the other variables. Linear models such as VAR and Gaussian processes capture these cross-variable links, but their complexity grows quadratically with the number of variables, and they tend to overfit when that number is large.
Deep models such as LSTNet and TPA-LSTM capture nonlinear patterns, yet they do not represent pairwise links between variables explicitly, which limits how far their predictions can be interpreted.
Graph neural networks suit such dependencies because each node aggregates information from its neighbours, but they need a graph to propagate information over. Multivariate series rarely come with such a graph, so the relations have to be inferred from the data, and an externally supplied graph need not be the best one for the forecasting task.
The paper therefore asks how the graph structure and the network can be learned together in one end-to-end framework.
How the uni-directed adjacency matrix is computed
Building a graph from data usually compares every pair of nodes with a distance measure, which makes memory and time costs grow with the square of the node count. To limit this cost, the paper computes pairwise relations only among a sampled subset of nodes in each minibatch, a point taken up again in the training section. The authors also argue that a symmetric similarity is the wrong notion here, because if one node's condition drives another's, the influence runs in one direction and the learned relation should do the same.
Two projections of learnable node embeddings are formed, \\(M_1=\\tanh(\\alpha E_1\\Theta_1)\\) and \\(M_2=\\tanh(\\alpha E_2\\Theta_2)\\), where \\(\\alpha\\) controls the saturation rate. The adjacency matrix is then \\(A=\\mathrm{ReLU}(\\tanh(\\alpha(M_1M_2^{T}-M_2M_1^{T})))\\), so the antisymmetric difference makes the two directions of a node pair compete.
After the ReLU, a positive weight in one direction forces the reverse entry to zero.
For each row, only the top-k entries are kept and the rest are set to zero, which keeps the matrix sparse and reduces the cost of the following graph convolution. The number of kept neighbours is 20 for Traffic, Solar-Energy and Electricity in the single-step setting, and 8 for Exchange-Rate. When node attributes are known, both embeddings can be set to one static feature matrix, so external knowledge enters the graph learning step.
The reported setup uses node embeddings of dimension 40 and a saturation rate of 3.
Mix-hop propagation over the learned graph
A graph convolution module runs two mix-hop propagation layers, one for inflow and one for outflow, and adds their outputs to form the net inflow. Each mix-hop layer has an information propagation step that spreads node states over the learned matrix for several hops, followed by an information selection step that combines the hop-wise states with learned weights.
The retain ratio \\(\\beta\\) is set to 0.05 and the depth of propagation is set to 2 in the reported setup. The authors' motivation is over-smoothing: as graph convolution layers pile up, node states converge toward a single point, and keeping part of the root state preserves locality while still reaching a deeper neighbourhood.
The selection step is \\(H_{out}=\\sum_{k=0}^{K}H^{(k)}W^{(k)}\\), so each hop has its own weight matrix that can filter it. Setting \\(W^{(k)}=0\\) for all \\(k>0\\) keeps only the node's own state, which is the fallback when the graph carries no spatial dependency. The authors contrast this with Kapoor et al., who concatenate hop features, and with Chen et al., who weight hops by attention.
They argue that summation can express linear differences between hops with a single layer. With \\(K=2\\), \\(W^{(0)}=0\\), \\(W^{(1)}=-1\\) and \\(W^{(2)}=1\\), the output becomes \\(H^{(2)}-H^{(1)}\\), the difference between consecutive hops.
Temporal convolution with dilated inception and output path
A temporal convolution module contains two dilated inception layers: one followed by tanh acts as a filter, and the other followed by sigmoid acts as a gate on how much of the filter output passes on.
Kernel size is a trade-off, since small filters miss long patterns and large ones miss short patterns. The authors note that periods such as 7, 12, 24, 28 and 60 are poorly covered by the odd-sized kernels of image inception, so the layer uses widths 2, 3, 6 and 7. Stacking layers lets these widths combine; a period of 12, for example, can be covered by a width-7 filter followed by a width-6 filter.
Because the dilation grows exponentially, the receptive field grows exponentially with depth rather than linearly, which lets the network reach much longer sequences. The four filter outputs are truncated to the shortest common length, concatenated across channels, and each filter computes \\(z\\star f(t)=\\sum_{s} f(s)\\,z(t-d\\times s)\\) with dilation factor d.
Residual connections run from the input of each temporal module to the output of the graph module, and skip connections are added after each temporal module. Skip layers are 1 by Li convolutions that bring every skip path to length 1, and the output module uses two 1 by 1 convolutions to reach the target dimension.
Sub-graph training and the curriculum
Training on a large graph stores every node's intermediate state, and the authors note that cluster-based sub-graph training from Chiang et al. does not fit here because the graph itself is learned. Instead, each iteration randomly splits the nodes into groups and learns a sub-graph over each group, so every pair of nodes can eventually be scored together.
Splitting the nodes into s groups reduces the graph learning cost from O(N²) to (N/s)² per iteration, and a full adjacency matrix is built after training, when the node embeddings are trained.
In multi-step forecasting, the authors observed that long-horizon predictions produce much larger losses and therefore dominate the joint objective. The curriculum starts by predicting one step and raises the prediction length as iterations pass, so the model finds a good starting point before tackling the full horizon. Algorithm 1 combines the two: the number of predicted steps r increases every s iterations until T′, and the loss is computed on the first r steps of each node group.
For the single-step sampled variant, the nodes are split into three partitions with a batch size of 16.
Single-step results on four benchmarks
The single-step experiments use Traffic with 862 nodes, Solar-Energy with 137 nodes, Electricity with 321 nodes and Exchange-Rate with 8 nodes, each with an input length of 168 and an output length of 1. Each model is trained separately for horizons 3, 6, 12 and 24.
On Traffic at horizon 3, MTGNN reaches RSE 0.4162, against 0.4487 for TPA-LSTM, the strongest baseline in that column. The authors report that MTGNN lowers RSE by 7.24%, 3.88% and 4.83% at horizons 3, 12 and 24 on Traffic, and attribute the gain to traffic data matching the spatial-temporal assumption of the model.
On Solar-Energy at horizon 3, MTGNN reaches RSE 0.1778, against 0.1803 for TPA-LSTM. The sampled variant MTGNN+sampling is close to MTGNN on several entries, for example RSE 0.4170 on Traffic and 0.1875 on Solar-Energy at horizon 3.
On Exchange-Rate at horizon 3, MTGNN has RSE 0.0194 against 0.0174 for TPA-LSTM, so the baseline is lower here. The authors attribute the missing gain possibly to the smaller graph and fewer training examples of this dataset.
Multi-step results against pre-defined graph baselines
The multi-step experiments use METR-LA with 207 loop detectors and PEMS-BAY with 325 sensors, an input length of 12 and a target of the next 12 steps, scored by MAE, RMSE and MAPE.
The authors describe this as on-par performance without a pre-defined graph, whereas DCRNN, STGCN and MRA-BGCN rely on one; Graph WaveNet uses a self-adaptive matrix that the authors say needs a pre-defined graph for its best results.
What each component contributes on METR-LA
Four variants remove one part each: the graph convolution module is replaced by a linear layer, the information selection step is dropped, the inception layer keeps only a single 1 by 7 filter, or curriculum learning is turned off. Each variant was run 10 times with 50 epochs per run and scored on the validation set.
The full model reaches MAE 2.7715±0.0119 and RMSE 5.8070±0.0512, and removing the graph convolution module raises MAE to 2.8953±0.0054 and RMSE to 6.1276±0.0339. The authors explain this by graph convolution letting information flow among nodes that are otherwise isolated but interdependent.
Removing the information selection step of the mix-hop layer gives MAE 2.7975±0.0089 and RMSE 5.8549±0.0474 against the full model's 2.7715 and 5.8070. Removing the curriculum gives MAE 2.7828±0.0105 and RMSE 5.8248±0.0366, so both error measures rise without the curriculum. The single 1 by 7 filter variant has MAE 2.7772±0.0100, very close to the full model, while its RMSE is 5.8251±0.0429; the authors report the inception effect as significant in RMSE but marginal in MAE.
The authors attribute the small MAE effect partly to the single-filter variant having more parameters than the multi-width combination when the output channels are kept equal.
Comparing ways to construct the adjacency matrix
The variants are Pre-defined-A from road network distance, Global-A as a free parameter matrix with N² entries, Undirected-A, Directed-A, Dynamic-A that depends on each time step's inputs, and the proposed Uni-directed-A. These are compared on the METR-LA validation set, averaged over 10 runs.
Pre-defined-A gives MAE 2.9017±0.0078, RMSE 6.1288±0.0345 and MAPE 0.0836±0.0009, the highest errors in the table. Global-A gives MAE 2.8457 and Dynamic-A gives MAE 2.8124, both above the learned node-embedding constructions.
Uni-directed-A has the lowest mean MAE 2.7715±0.0119, RMSE 5.8070±0.0512 and MAPE 0.0778±0.0009. Undirected-A gives MAE 2.7736±0.0185 and Directed-A gives MAE 2.7758±0.0088, so the margin over them in MAE is small and the standard deviations overlap. The authors describe the gain over Undirected-A and Directed-A as marginal in MAE and MAPE, and say that the lower RMSE makes the uni-directed construction more robust.
Sensitivity to the main hyperparameters
Eight core hyperparameters are varied over ranges such as 1 to 6 layers, 4 to 128 filters, 10 to 60 neighbours, saturation rate 0.5 to 5, retain ratio 0 to 0.8, and propagation depth 1 to 6. Each setting is run 10 times with 50 epochs and scored by MAE on the validation set, with the other parameters fixed; the study is on METR-LA.
Increasing the number of layers and filters lowers MAE, which the authors read as added expressive capacity. Smaller neighbourhoods work better, which the authors attribute to nodes depending on only a few others, so a larger neighbourhood adds noise. Performance is not sensitive to the saturation rate, although a large rate can push the adjacency values towards 0 or 1.
A high retain ratio degrades performance significantly, which the authors attribute to keeping too much of the root state, so the node cannot explore its neighbourhood. The authors find that two or three propagation steps are enough, and that depth 6 gives the lowest mean MAE but with larger variation.
Limits of the evidence
The single-step gain does not extend to Exchange-Rate, which has 8 nodes and 7,588 samples in the reported table. The ablation and the graph learning comparison are run only on METR-LA validation data, and the parameter study is also on METR-LA.
On the multi-step benchmarks the results are described as on-par, not as superior, and several graph baselines sit within a few hundredths of MTGNN's MAE. MTGNN+sampling trails MTGNN on several horizons, for example 0.4170 against 0.4162 on Traffic and 0.1875 against 0.1778 on Solar-Energy at horizon 3.
The authors did not use dynamic spatial dependencies because they make the model very hard to converge while the graph is also being learned. The reported figures are averages over repeated runs, so the spread across runs is part of how close two models can be read.
Paper info
- Authors
- Zonghan Wu, Shirui Pan, Guodong Long, Jing Jiang, Xiaojun Chang, Chengqi Zhang
- Venue
- arXiv · Preprint
- First published
- 2020-5-24
- Added
- 2026-11-12
- Updated
- 2020-5-24
- Version
- v1
- arXiv
- 2005.11650
- Category
- cs.LG · stat.ML
- Original paper terms
- arXiv non-exclusive 1.0
- What we show
- Paper info and commentary
AI commentary is a separate explanation from the original paper and may contain errors. The original paper and figures follow each source's terms of use and any rights noted separately.
Quote from the paper
Zonghan Wu, Shirui Pan, Guodong Long, Jing Jiang, Xiaojun Chang, Chengqi Zhang (2020). Connecting the Dots: Multivariate Time Series Forecasting with Graph Neural Networks. arXiv:2005.11650v1. https://arxiv.org/abs/2005.11650v1
BibTeX
@misc{wu2020connecting,
title = {{Connecting the Dots: Multivariate Time Series Forecasting with Graph Neural Networks}},
author = {Zonghan Wu and Shirui Pan and Guodong Long and Jing Jiang and Xiaojun Chang and Chengqi Zhang},
year = {2020},
eprint = {2005.11650},
archivePrefix = {arXiv},
url = {https://arxiv.org/abs/2005.11650v1}
}