Paper · 2023-12-31 · cs.LG
MSGNet: Learning Multi-Scale Inter-Series Correlations for Multivariate Time Series Forecasting
MSGNet forecasts multivariate series. It finds the k strongest periods with an FFT, reshapes the series per period, learns a separate adaptive graph and Mixhop convolution per scale, applies self-attention within each period, and sums the scales by amplitude softmax. Author-reported: average rank 1.813 in the main table, against 2.750 for TimesNet.
Time series forecastingGraph neural networkGraph structure learningSelf-attentiontime-seriesmultivariate-forecastinggraph-neural-networkperiodicity
arXivPDFCodeMarkdown16 min read
AI-compiled by claude-haiku-5-5 on 2026-11-01, not yet reviewed by a human. Every claim cites its source; check it when a detail matters.
In plain words
Many measurements arrive as several time series at once, such as flights per airport, or power use per household. Each series rises and falls on its own, and series also move together. How strongly two series move together can depend on the time scale being looked at. Many forecasting models treat each series alone, or assume one fixed pattern of which series relate to which.
MSGNet first looks for the rhythms in the data, such as a daily or a half-day cycle. For each rhythm it asks a separate question: which series move together at this speed? Each rhythm gets its own learned map of relationships between series, and the network mixes information along those links. Within each rhythm it also looks at how a series changes from one cycle to the next. The results from the different rhythms are then combined, with the strongest rhythms counting most.
The authors test on eight real datasets, one of them flight counts from the COVID-19 period, and report that the model does better than six comparison methods on average. These are the authors' own numbers, and they come from their own experiment setup.
TL;DR
- MSGNet predicts several series at once. It picks the k strongest periods of the input with an FFT and handles each period as one scale §4.2 eq. 3.
- Each scale gets its own learned adjacency matrix and a Mixhop graph convolution, followed by self-attention within the period, and the scales are summed with softmax weights from their amplitudes §4.3 §4.4 eq. 9.
- Author-reported: best average rank on the 8 datasets (1.813 against 2.750 for TimesNet), and the best average MSE on 5 datasets tab. 1 §5.4.
- The official code differs from the paper in several places that change the computation: the scale graph convolutions are chained, the within-period attention is causally masked, and the scales are re-estimated in every block. See Paper vs code before implementing.
Problem
- A multivariate forecast has to use both the series' own history and how series relate to each other §1 §3.
- Existing deep models were said to capture intra-series patterns well but to learn inter-series relations poorly. Graph models were said to use one fixed relation for all times §1 §2.2 app. §2.
- The paper argues that inter-series correlations differ between time scales, so one graph is not enough §1 §3 fig. 1.
- The Flight data cover the COVID-19 period. The authors use it as an out-of-distribution test of robustness §5.1 §5.7.
- Assumptions: input window L = 96 and horizons T in {96, 192, 336, 720} §5.3 tab. 4. Training uses MSE §5.3 tab. 5.
Method
Numbering note: the paper's body sections print without numbers
(secnumdepth is 0). The § numbers here count them in order: 1 Introduction;
2 Related Works (2.1, 2.2); 3 Problem Formulation; 4 Methodology (4.1 Input
embedding and residual connection, 4.2 Scale identification, 4.3 Multi-scale
adaptive graph convolution, 4.4 Multi-head attention and scale aggregation,
4.5 Output layer); 5 Experiments (5.1 Datasets, 5.2 Baselines, 5.3 Experimental
setups, 5.4 Results and analysis, 5.5 Visualization of learned inter-series
correlation, 5.6 Ablation analysis, 5.7 Generalization capabilities); 6
Conclusion. The appendix numbers its sections in the paper itself, so
app. §3.2 is unambiguous.
Each of the k ScaleGraph blocks does four things in order §4:
- Scale identification. The FFT of the embedded input gives an amplitude per frequency. The paper averages these over the model dimension, takes the top k frequencies f_i, and sets the period s_i = L / f_i §4.2 eq. 3.
- Reshape. The series is zero-padded and reshaped into a grid of shape (d_model, s_i, f_i) for each scale §4.2 eq. 4.
- Adaptive graph convolution. A linear map W^i takes the d_model channels to N variables §4.3 eq. 5. The adjacency is A^i = softmax(ReLU(E1 E2^T)), with two trainable N x h matrices §4.3 eq. 6. Mixhop convolution over the powers of A^i is concatenated and passed through an MLP back to (d_model, s_i, f_i) §4.3 eq. 7.
- Within-scale attention and aggregation. Multi-head self-attention runs over the s_i positions of each scale §4.4 eq. 8. The k results are reshaped back to length L and summed with softmax weights over the amplitudes of the k frequencies §4.4 eq. 9.
The network is a stack of these blocks with residual links §4.1 eq. 2. The input is embedded with a 1-D convolution of kernel 3 plus a positional term and a time-stamp term §4.1 eq. 1. The output layer maps the d_model channels to N variables and then the L time steps to T steps §4.5 eq. 10. The input is normalised before embedding §4.1. The paper does not describe the de-normalisation step; the code has one (see Paper vs code).
Equations as printed in the paper:
\mathbf{X}_{emb} = \alpha\,\mathrm{Conv1D}(\hat{\mathbf{X}}) + \mathbf{PE} + \sum_{p=1}^{P} \mathbf{SE}_p eq. 1
\mathbf{X}^{l} = \mathrm{ScaleGraphBlock}(\mathbf{X}^{l-1}) + \mathbf{X}^{l-1} eq. 2
\mathbf{F} = \mathrm{Avg}(\mathrm{Amp}(\mathrm{FFT}(\mathbf{X}_{emb}))),\quad f_1,\dots,f_k = \mathrm{argTopk}(\mathbf{F}),\quad s_i = L / f_i eq. 3
\mathcal{X}^i = \mathrm{Reshape}_{s_i, f_i}(\mathrm{Padding}(\mathbf{X}_{in})) eq. 4
\mathcal{H}^i = \mathbf{W}^i \mathcal{X}^i eq. 5
\mathbf{A}^i = \mathrm{SoftMax}(\mathrm{ReLU}(\mathbf{E}^i_1 (\mathbf{E}^i_2)^T)) eq. 6
\mathcal{H}^i_{out} = \sigma\Big(\big\Vert_{j \in \mathcal{P}} (\mathbf{A}^i)^j \mathcal{H}^i\Big) eq. 7
\hat{\mathcal{X}}^i_{out} = \mathrm{MHA}_s(\hat{\mathcal{X}}^i) eq. 8
\hat{a}_1,\dots,\hat{a}_k = \mathrm{SoftMax}(\mathbf{F}_{f_1},\dots,\mathbf{F}_{f_k}),\quad \hat{\mathbf{X}}_{out} = \sum_{i=1}^{k} \hat{a}_i \hat{\mathbf{X}}^i_{out} eq. 9
\hat{\mathbf{X}}_{t:t+T} = \mathbf{W}_s \hat{\mathbf{X}}_{out} \mathbf{W}_t + \mathbf{b} eq. 10
The appendix gives a mixture-of-experts reading of the scale aggregation app. §1.2, and a two-hop-delta argument for why graph convolution is needed app. §2. Both are analysis, not extra steps.
# MSGNet forward pass, as the paper describes it [§4] [eq. 1]-[eq. 10]
# Input: x_enc (B, L, N), L = 96 past steps of N variables
# Output: forecast (B, T, N)
def msgnet_forward(x_enc):
# Normalise the input (details not stated in the paper) [§4.1]
x_norm = normalise(x_enc) # (B, L, N)
# Embed the variables and add time terms [§4.1] [eq. 1]
x = embed(x_norm) # (B, L, d_model)
# Stack the ScaleGraph blocks with residual links [§4.1] [eq. 2]
for layer in range(num_blocks):
x = scale_graph_block(x) + x # (B, L, d_model)
# Map channels to N variables, then steps to T [§4.5] [eq. 10]
out = linear_over_channels(x) # (B, L, N)
out = linear_over_time(out) # (B, T, N)
return out
def scale_graph_block(x):
# Pick the k strongest periods of the input [§4.2] [eq. 3]
periods, amps = top_k_periods(x, k) # (k,), (k,)
# Softmax over the k amplitudes gives the scale weights [§4.4] [eq. 9]
weights = softmax(amps) # (k,)
outputs = []
for i in range(k):
# Reshape into a grid with period periods[i] [§4.2] [eq. 4]
grid = reshape_with_padding(x, periods[i]) # (d_model, s_i, f_i)
# Project d_model channels to N variables [§4.3] [eq. 5]
nodes = W[i] @ grid # (N, s_i, f_i)
# Learn the adjacency for this scale [§4.3] [eq. 6]
adj = softmax(relu(E1[i] @ E2[i].T)) # (N, N)
# Mix neighbour information over adjacency powers [§4.3] [eq. 7]
mixed = concat_powers(adj, nodes, P) # (len(P) * N, s_i, f_i)
# Map back to d_model channels with an MLP [§4.3]
grid = mlp(mixed) # (d_model, s_i, f_i)
# Self-attention over the s_i positions of each period [§4.4] [eq. 8]
grid = attention_over_scale(grid) # (d_model, s_i, f_i)
# Undo the reshape and keep the first L steps [§4.4]
outputs.append(unreshape(grid, L)) # (B, L, d_model)
# Sum the scales, weighted by amplitude softmax [§4.4] [eq. 9]
return sum(weights[i] * outputs[i] for i in range(k))Hyperparameters
Values are as printed in the paper. Where the code sets a value the paper does not state, the code value is shown and marked.
| Name | Value | Where | Notes |
|---|---|---|---|
| Input length L | 96 | §5.3 tab. 4 | Code's label_len default is 48 run_longExp.py, but Model.forward ignores the decoder input MSGNet.py |
| Horizons T | {96, 192, 336, 720} | §5.3 tab. 4 | |
| Loss | MSE | §5.3 tab. 5 tab. 6 | exp_main.py |
| Optimizer | Adam | tab. 5 tab. 6 | exp_main.py |
| Learning rate | 1e-4 | §5.3 tab. 5 tab. 6 | Code halves the rate every epoch tools.py exp_main.py. The paper states no schedule |
| Batch size | 32 | §5.3 tab. 5 tab. 6 | |
| Epochs | 10 | §5.3 tab. 5 tab. 6 | Early termination is used where applicable §5.3. Patience not stated; code default 3 run_longExp.py |
| Scales k | {3, 5} | tab. 5 tab. 6 | Scripts use 3 or 5 ETTh1.sh Flight.sh |
| Node embedding dim (E) | {10, 30, 100} | tab. 5 tab. 6 | The appendix text says {10, 100} app. §3.2. Code: 100 for Flight and Electricity Flight.sh electricity.sh, 30 for Exchange exchange.sh, default 10 elsewhere run_longExp.py |
| d_model | {16, 64, 1024} for Flight, Weather, Electricity, Exchange; {16, 32} for ETT | tab. 5 tab. 6 | Code: 16 for Flight Flight.sh, 1024 for Electricity electricity.sh |
| ScaleGraph blocks | 2 for Flight, Weather, Electricity, Exchange; {1, 2} for ETT | tab. 5 tab. 6 | Code --e_layers; scripts use 1, 2 or 3 Flight.sh |
| Mixhop order | 2 | tab. 5 tab. 6 app. §3.2 | Code default gcn_depth 2 run_longExp.py |
| Attention heads | 8 | tab. 5 tab. 6 | Code default run_longExp.py |
| Feed-forward width d_ff | not stated | Code default 2048 run_longExp.py; scripts set 32 to 512 Flight.sh | |
| Dropout | not stated | Code default 0.05 run_longExp.py | |
| Mixhop retention alpha | not stated | Code default 0.3 run_longExp.py | |
| Conv / skip channels | not stated | Code: 32 for Flight, 16 for Electricity conv; skip 32 Flight.sh electricity.sh | |
| Input split | Flight, Weather, Electricity, Exchange: 7:1:2; ETT: 6:2:2 | §5.3 | Code: Dataset_Custom 70/10/20 data_loader.py; ETT hourly 60/20/20 data_loader.py |
| Flight 4:4:2 split | used in §5.7 only | §5.7 tab. 3 | Code class exists data_loader.py but no script selects it data_factory.py |
| Normalisation | "normalise" with training statistics | §4.1 §5.3 | Code: StandardScaler fit on training rows data_loader.py and instance normalisation in the model MSGNet.py |
| Early-stopping patience | not stated | §5.3 | Code default 3 run_longExp.py |
| Random seed | not stated | Code fixes seed 2021 run_longExp.py | |
| Runs per setting | not stated | Code default 2 run_longExp.py; Flight, Weather, Electricity and Exchange scripts set 1 | |
| Hardware | NVIDIA GeForce RTX 3090 24 GB | §5.3 | |
| Time-stamp embedding | learned table, vocabulary 60 minutes | §4.1 | Code uses a linear map on time features instead Embed.py |
| Balance factor alpha (eq. 1) | not stated | §4.1 eq. 1 | Code has no such scalar Embed.py |
Results
Author-reported. Setup: 8 datasets, input length 96, horizons {96, 192, 336, 720}, MSE training loss, RTX 3090 §5.3 tab. 4. Baselines: Informer, Autoformer, MTGNN, DLinear, NLinear, TimesNet §5.2. The paper states that MSGNet is best on average MSE on 5 datasets and second-best on 2, and that it has the best average rank across all datasets §5.4 tab. 1.
Main results, MSE and MAE, against TimesNet, the second-ranked model tab. 1. The table lists all six baselines; this card includes only TimesNet.
| Dataset | Horizon | MSGNet MSE | MSGNet MAE | TimesNet MSE | TimesNet MAE |
|---|---|---|---|---|---|
| Flight | 96 | 0.183 | 0.301 | 0.237 | 0.350 |
| Flight | 192 | 0.189 | 0.306 | 0.224 | 0.337 |
| Flight | 336 | 0.206 | 0.320 | 0.289 | 0.394 |
| Flight | 720 | 0.253 | 0.358 | 0.310 | 0.408 |
| Weather | 96 | 0.163 | 0.212 | 0.172 | 0.220 |
| Weather | 192 | 0.212 | 0.254 | 0.219 | 0.261 |
| Weather | 336 | 0.272 | 0.299 | 0.280 | 0.306 |
| Weather | 720 | 0.350 | 0.348 | 0.365 | 0.359 |
| ETTm1 | 96 | 0.319 | 0.366 | 0.338 | 0.375 |
| ETTm1 | 192 | 0.376 | 0.397 | 0.374 | 0.387 |
| ETTm1 | 336 | 0.417 | 0.422 | 0.410 | 0.411 |
| ETTm1 | 720 | 0.481 | 0.458 | 0.478 | 0.450 |
| ETTm2 | 96 | 0.177 | 0.262 | 0.187 | 0.267 |
| ETTm2 | 192 | 0.247 | 0.307 | 0.249 | 0.309 |
| ETTm2 | 336 | 0.312 | 0.346 | 0.321 | 0.351 |
| ETTm2 | 720 | 0.414 | 0.403 | 0.408 | 0.403 |
| ETTh1 | 96 | 0.390 | 0.411 | 0.384 | 0.402 |
| ETTh1 | 192 | 0.442 | 0.442 | 0.436 | 0.429 |
| ETTh1 | 336 | 0.480 | 0.468 | 0.491 | 0.469 |
| ETTh1 | 720 | 0.494 | 0.488 | 0.521 | 0.500 |
| ETTh2 | 96 | 0.328 | 0.371 | 0.340 | 0.374 |
| ETTh2 | 192 | 0.402 | 0.414 | 0.402 | 0.414 |
| ETTh2 | 336 | 0.435 | 0.443 | 0.452 | 0.452 |
| ETTh2 | 720 | 0.417 | 0.441 | 0.462 | 0.468 |
| Electricity | 96 | 0.165 | 0.274 | 0.168 | 0.272 |
| Electricity | 192 | 0.184 | 0.292 | 0.184 | 0.289 |
| Electricity | 336 | 0.195 | 0.302 | 0.198 | 0.300 |
| Electricity | 720 | 0.231 | 0.332 | 0.220 | 0.320 |
| Exchange | 96 | 0.102 | 0.230 | 0.107 | 0.234 |
| Exchange | 192 | 0.195 | 0.317 | 0.226 | 0.344 |
| Exchange | 336 | 0.359 | 0.436 | 0.367 | 0.448 |
| Exchange | 720 | 0.940 | 0.738 | 0.964 | 0.746 |
Average rank across all datasets, MSGNet 1.813, TimesNet 2.750, NLinear 2.813, DLinear 3.563, Autoformer 4.750, MTGNN 5.313, Informer 7.000 tab. 1.
On Flight, the paper reports the average over horizons reduced from 0.265 to 0.208 MSE (21.5%) and from 0.372 to 0.321 MAE (13.7%) against TimesNet §5.4.
Ablation on Flight, Weather and ETTm2, averaged over horizons 96 and 336 tab. 2:
| Variant | Flight MSE | Flight MAE | Weather MSE | Weather MAE | ETTm2 MSE | ETTm2 MAE |
|---|---|---|---|---|---|---|
| MSGNet | 0.195 | 0.311 | 0.218 | 0.255 | 0.245 | 0.304 |
| w/o-AdapG (no graph learning) | 0.302 | 0.401 | 0.232 | 0.270 | 0.253 | 0.313 |
| w/o-MG (one shared graph) | 0.213 | 0.331 | 0.226 | 0.261 | 0.250 | 0.307 |
| w/o-A (no self-attention) | 0.198 | 0.314 | 0.224 | 0.259 | 0.247 | 0.306 |
| w/o-Mix (plain convolution) | 0.202 | 0.318 | 0.224 | 0.260 | 0.247 | 0.304 |
| TimesNet | 0.263 | 0.372 | 0.226 | 0.263 | 0.254 | 0.309 |
Generalization, Flight under two partitions tab. 3. MSE and MAE are averaged over horizons. "Decrease" is the relative error increase when the training set is limited to before the pandemic:
| Model | 7:1:2 MSE | 7:1:2 MAE | 4:4:2 MSE | 4:4:2 MAE | Decrease MSE (%) | Decrease MAE (%) |
|---|---|---|---|---|---|---|
| MSGNet | 0.208 | 0.321 | 0.252 | 0.366 | 21.29 | 13.80 |
| TimesNet | 0.265 | 0.372 | 0.335 | 0.426 | 26.47 | 14.32 |
| DLinear | 0.233 | 0.345 | 0.332 | 0.448 | 42.29 | 29.87 |
| NLinear | 0.285 | 0.388 | 0.365 | 0.447 | 28.19 | 15.17 |
| MTGNN | 0.280 | 0.378 | 0.407 | 0.501 | 45.74 | 32.52 |
| Autoformer | 0.238 | 0.344 | 0.307 | 0.424 | 29.17 | 23.09 |
Efficiency on Electricity, batch size 32 tab. 7. Memory is in GB, time per epoch in seconds, and the MSE rank among the four models in the table:
| Model | Horizon | GPU memory (GB) | Time per epoch (s) | MSE rank |
|---|---|---|---|---|
| MSGNet | 96 | 13.04 | 320.38 | 1 |
| MSGNet | 192 | 13.05 | 316.46 | 1 |
| MSGNet | 336 | 16.95 | 471.37 | 1 |
| MSGNet | 720 | 16.98 | 482.97 | 2 |
| TimesNet | 96 | 8.81 | 748.79 | 2 |
| TimesNet | 192 | 10.07 | 821.39 | 2 |
| TimesNet | 336 | 14.48 | 2019.38 | 2 |
| TimesNet | 720 | 20.22 | 3520.99 | 1 |
| DLinear | 96 | 2.41 | 4.42 | 3 |
| DLinear | 192 | 2.45 | 5.80 | 3 |
| DLinear | 336 | 2.49 | 9.28 | 3 |
| DLinear | 720 | 2.62 | 23.57 | 3 |
| Autoformer | 96 | 4.27 | 54.66 | 4 |
| Autoformer | 192 | 5.25 | 66.89 | 4 |
| Autoformer | 336 | 6.29 | 88.19 | 4 |
| Autoformer | 720 | 9.76 | 143.17 | 4 |
Other results are described in words only. The learned scales on Flight are said to correspond to patterns of one day, half a day and a morning fig. 8 app. §4. The paper reports that MSGNet improves on ETT with longer review windows fig. 10 app. §5. Flight prediction plots are in fig. 3 and fig. 11.
Paper vs code
Official code: https://github.com/YoZhibo/MSGNet, commit
953b8330a2ca469dab4955e804b46a61eb08a9c2 (default branch, shallow clone). The
paper does not link it. The repository's README cites this paper
README.md README.md README.md, and the
GitHub profile of the owner account (YoZhibo) shows the first author's name
and Sichuan University as the company field. I attribute the repository to the
authors on that basis; the paper's own affiliation was not checked. The commit read here is the default branch at clone time, which
may differ from the code used for the paper's numbers.
The repository has no LICENSE file, so no code is quoted and every reference is
by path and line. The code was read but not run: Flight.csv and the other
datasets are not in the repository Flight.sh.
Discrepancies that change the computation:
- Scale graph convolutions are chained. Paper: each scale's graph
convolution starts from the same input, X_in §4.2 §4.3 eq. 4. Code:
the loop reassigns
xafter each graph convolution, so scale i works on the output of scale i-1 MSGNet.py. - Residual base. Paper: X^l = block(X^{l-1}) + X^{l-1} §4.1 eq. 2. Code: the residual adds the tensor left after all k graph convolutions, not the block input MSGNet.py. A LayerNorm is also applied after every block MSGNet.py. The paper has none, and the same LayerNorm module is reused for all blocks.
- Scale identification happens in every block. Paper: the scales are chosen once, from X_emb §4.2 eq. 3. Code: each block runs the FFT on its own input MSGNet.py.
- Scale selection. Paper: amplitudes averaged over the model dimension §4.2. Code: averaged over the batch and the model dimension, and the DC bin is set to zero before the top-k MSGNet.py. The softmax weights are per sample MSGNet.py MSGNet.py.
- Within-scale attention is a full transformer layer. Paper: multi-head self-attention only §4.4 eq. 8. Code: attention, residual, LayerNorm, a two-layer 1x1 convolution feed-forward with GELU, and a second LayerNorm MSGBlock.py, followed by a GELU before aggregation MSGNet.py.
- Within-scale attention is causally masked. The paper states no mask.
FullAttentiondefaults tomask_flag=Trueand builds an upper-triangular mask when none is passed MSGBlock.py. The block calls it with no mask MSGBlock.py MSGNet.py. - Node projection. Paper: a dense W^i of shape N x d_model §4.3 eq. 5. Code: a 2-D convolution whose kernel spans d_model - N + 1 channels, so the same weights are shared along the channel axis MSGBlock.py. This needs d_model >= N.
- Mixhop. Paper: the powers (A^i)^j for j in a set P, concatenated §4.3 eq. 7. Code: a propagation h_k = alpha x + (1 - alpha) A h_{k-1} with alpha = 0.3 by default, after adding a self-loop and row-normalising A, then the concatenation of x and the h_k MSGBlock.py MSGBlock.py. The set P is not stated in the paper.
- Graph block residual. The graph block ends with its own residual and LayerNorm MSGBlock.py. The paper does not mention either.
- Adjacency. Matches eq. 6, with a softmax over the rows [code: layers/MSGBlock.py#L145]. Each scale has its own node vectors [code: layers/MSGBlock.py#L133-L134].
- Embedding. Paper: alpha-scaled convolution, a positional term, and a sum of learned time-stamp embeddings with a vocabulary of 60 minutes §4.1 eq. 1. Code: a kernel-3 circular convolution without bias Embed.py, a fixed sinusoidal positional term Embed.py, and a linear map on time features Embed.py. The sum is in Embed.py. No alpha is applied.
- Normalisation. Paper: input normalised §4.1. Code: instance normalisation with mean and standard deviation over time, reversed on the output MSGNet.py MSGNet.py.
- Output. Matches eq. 10 in form MSGNet.py. The
predict_linearlayer is defined and never used MSGNet.py. - Dropout.
gcn_dropoutis parsed with default 0.3 run_longExp.py but no code path reads it. The Mixhop module stores a dropout value and never applies it MSGBlock.py MSGBlock.py. - Hyperparameters. The paper's text gives E as {10, 100}, its table as {10, 30, 100} app. §3.2 tab. 5. The scripts use 30 for Exchange exchange.sh and 100 for Flight and Electricity. Read the table as the search range and the scripts as the values used.
- Learning rate. Paper: 1e-4 §5.3. Code: halved every epoch tools.py exp_main.py.
- Metrics on the standardised scale. The test function computes MSE and MAE on the model output with no inverse transform exp_main.py. The paper does not say which scale its numbers use. The data are standardised with training statistics data_loader.py.
- Model selection. The test loader is evaluated every epoch [code: exp/exp_main.py#L186]. The paper does not say how its reported checkpoint was chosen.
- Consistent with the paper: Adam exp_main.py, MSE loss exp_main.py, learning rate 1e-4 run_longExp.py, batch size 32 run_longExp.py, 10 epochs run_longExp.py, eight heads by default run_longExp.py, Mixhop depth 2 run_longExp.py, and sequence length 96 run_longExp.py.
Pitfalls
- Causal mask. The within-period attention is causal in the code and the paper says nothing. Decide explicitly. An unmasked version will not match the reported numbers if the code produced them MSGBlock.py.
- Chained scales. Implementing the scales in parallel, as the equations read, gives a different model from the released one MSGNet.py.
- Flight data is not in the repository. The Flight dataset comes from
OpenSky data for seven European airports, but the preprocessing that turns
it into
Flight.csvis not described in the repository §5.1 app. §3.1 Flight.sh. Results on Flight cannot be reproduced from the repository alone. - Split labels in the dataset table. Table 4 lists sizes as train / test / valid, but the numbers follow train / valid / test at 70:10:20 for Flight, Weather, Electricity and Exchange tab. 4 [code: data_provider/data_loader.py#L154-L158].
- Efficiency claim. The paper says MSGNet is more efficient than TimesNet app. §6. Table 7 shows lower time per epoch at every horizon, but higher GPU memory than TimesNet at 96, 192 and 336 tab. 7.
- Figure references. The appendix text refers to "Figure 1 and 2 of Appendix" for the flight data. In the compiled order these are fig. 5 and fig. 6. The caption of fig. 12 says ETTm2 while the file is named for ETTh2.
- Ablation averaging. The ablation table averages horizons 96 and 336 only tab. 2. The text says multi-head attention gives "marginal" gains, and w/o-A is only slightly worse than full MSGNet on Flight §5.6 tab. 2.
- Generalization claim. Table 3 has two partitions and one Flight dataset. MSGNet has the smallest relative increase in MSE and MAE, but the margin over TimesNet is small (21.29% against 26.47% in MSE) tab. 3.
- Longer review windows. On Flight with a 336-step horizon, the text says MSGNet is slightly worse than the linear model at long windows, but better than the other models app. §5 fig. 9. The ETT result with longer windows is the one the paper points to for the scale transformation app. §5 fig. 10.
- Costs the abstract hides. Memory grows with horizon: 13.04 GB at 96 and 16.98 GB at 720 on Electricity, against 8.81 and 20.22 GB for TimesNet tab. 7. Time per epoch at horizon 96 is 320 s for MSGNet, 749 s for TimesNet and 4.4 s for DLinear tab. 7.
- Unstated values. Dropout, alpha, the Mixhop power set P, the feed-forward width, the number of runs and the seed are not stated in the paper. The code defaults are listed in Hyperparameters and should not be read as the paper's values.
Lineage
- Builds on: Mixhop graph convolution §4.3 [/papers/1905.00067]; the FFT-based period detection of TimesNet §4.2 (TimesNet has no card in this wiki); the uniform input embedding of Informer §4.1 (no card); multi-head attention from the Transformer §4.4 (no card); a normalisation method the paper cites with bibliography key liu2022non §4.1 (no card).
- Compared against: Informer, Autoformer, MTGNN, DLinear, NLinear and TimesNet §5.2 tab. 1. None has a card in this wiki, so nothing from them is used.
- Superseded by: not in this wiki.
Source and license
Adapted from “MSGNet: Learning Multi-Scale Inter-Series Correlations for Multivariate Time Series Forecasting” by Wanlin Cai, Yuxuan Liang, Xianggen Liu, Jianshuai Feng, Yuankai Wu (arXiv:2401.00423), used under CC BY 4.0. Changes: condensed and restructured for implementation, with tables, equations and algorithms taken from the paper and its code, each cited to its source. Not affiliated with or endorsed by the authors. Code citations refer to https://github.com/YoZhibo/MSGNet at commit 953b8330a2ca (none (no LICENSE file in repository)). Any quoted code is shown under that license.