目錄

1150324 meeting

收尾工作 v3.0

實驗介紹

本次進行以下實驗,詳細實驗設定參考下節。

控制變因實驗 1實驗 2實驗 3實驗 4
迭代次數4,0004,0004,0004,000
訓練策略$SSSD^{S4 + AFRK}$$SSSD^{S4}$$SSSD^{S4 + AFRK}$$SSSD^{S4}$
時間重塑falsefalsetruetrue
併入時間步 $p$8 / 248 / 24
Input Channels3 / 13 / 124 / 2424 / 24
S4 Max Seq. Length664 / 1,992664 / 1,99283 / 8383 / 83
Missing $k$72 / 21672 / 2169 / 99 / 9

實驗命名依上表不同可區分如下:

  • 實驗 1
    • Weather2k-1var-S4+AFRK
    • MERRA2-1var-S4+AFRK
  • 實驗 2
    • Weather2k-1var-S4
    • MERRA2-1var-S4
  • 實驗 3
    • Weather2k-S4+AFRK
    • MERRA2-S4+AFRK
  • 實驗 4
    • Weather2k-S4
    • MERRA2-S4

實驗設定

本次實驗使用設定如下所示,僅輸入出通道(channels)、時間序列長度(s4 max sequence length)、缺失值(missing $k$)、是否啟用 AFRK(enable spatial training)及目錄與路徑會依實驗內容不同而有更動。以下呈現 Weather2k-S4+AFRK 設定。

model.yaml

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
wavenet:
  # WaveNet model parameters
  input_channels:  24  # Number of input channels
  output_channels: 24  # Number of output channels
  residual_layers: 28  # Number of residual layers
  residual_channels: 40  # Number of channels in residual blocks
  skip_channels: 40  # Number of channels in skip connections

  # Diffusion step embedding dimensions
  diffusion_step_embed_dim_input:  128  # Input dimension
  diffusion_step_embed_dim_hidden: 256  # Middle dimension
  diffusion_step_embed_dim_output: 256  # Output dimension

  # Structured State Spaces sequence model (S4) configurations
  s4_max_sequence_length: 83  # Maximum sequence length
  s4_state_dim: 128  # State dimension
  s4_dropout: 0.2  # Dropout rate
  s4_bidirectional: true  # Whether to use bidirectional layers
  s4_use_layer_norm: true  # Whether to use layer normalization

diffusion:
  # Diffusion model parameters
  T: 100  # Number of diffusion steps
  beta_0: 0.0001  # Initial beta value
  beta_T: 0.01  # Final beta value

AFRK:
# AutoFRK model parameters, for more details, please refer to https://pypi.org/project/autoFRK/
  method: "fast"  # autoFRK method to use (e.g., "fast")
  tps_method: "rectangular"  # autoFRK's TPS method to use (e.g., "rectangular")

training.yaml

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
# Training configuration
batch_size: 80  # Batch size
output_directory: "/home/u6025091/SSSD_CP/results/Weather2k-S4+AFRK"  # Output directory for checkpoints and logs
ckpt_iter: "max"  # Checkpoint mode (max or min)
iters_per_ckpt: 500  # Checkpoint frequency (number of epochs)
iters_per_logging: 200  # Log frequency (number of iterations)
n_iters: 4000  # Maximum number of iterations
learning_rate: 0.0005  # Learning rate

# Additional training settings
only_generate_missing: true  # Generate missing values only
use_model: 2  # Model to use for training
masking: "forecast"  # Masking strategy for missing values
missing_k: 9  # Number of missing values

# Data paths
data:
  train_path: "/home/u6025091/SSSD_CP/datasets/Weather2k/data_train_known_real.npy"  # Path to training data

# autoFRK config
enable_spatial_training: true  # Enable spatial training step
location_path: "/home/u6025091/SSSD_CP/datasets/Weather2k/stations_known_locations.npy"  # Path to known locations

inference.yaml

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
# Inference configuration
batch_size: 80  # Batch size for inference
output_directory: "/home/u6025091/SSSD_CP/results/Weather2k-S4+AFRK/inference"  # Output directory for inference results
ckpt_path: "/home/u6025091/SSSD_CP/results/Weather2k-S4+AFRK"  # Path to checkpoint for inference
trials: 1 # Replications

# Additional training settings
only_generate_missing: true  # Generate missing values only
use_model: 2  # Model to use for training
masking: "forecast"  # Masking strategy for missing values  # inference mode need to fix in the code, or using other masking strategy will be failed
missing_k: 9  # Number of missing values

# Data paths
data:
  test_path: "/home/u6025091/SSSD_CP/datasets/Weather2k/data_train_known_real.npy"  # Path to test data

# autoFRK config
enable_spatial_inference: true  # Enable spatial prediction step
enable_spatial_normalization: true  # Enable spatial normalization before and after autoFRK
known_location_path: "/home/u6025091/SSSD_CP/datasets/Weather2k/stations_known_locations.npy"  # Path to known locations
unknown_location_path: "/home/u6025091/SSSD_CP/datasets/Weather2k/stations_unknown_locations.npy"  # Path to unknown locations

下節呈現各實驗結果。

實驗 1

Weather2k-1var-S4+AFRK

推論階段 AFRK 之 MRTS 基底數:382

MetricALL Locs & All TimeKnown Locs & All TimeUnknown Locs & All TimeALL Locs & FutureKnown Locs & FutureUnknown Locs & FutureALL Locs & PastKnown Locs & PastUnknown Locs & Past
MSPE1.777260e+001.095429e+004.497294e+001.156576e+011.119772e+011.303397e+017.158574e-016.739534e-083.571630e+00
RMSPE1.333139e+001.046627e+002.120682e+003.400846e+003.346299e+003.610259e+008.460835e-012.596061e-041.889876e+00
MSPE%2.567112e+091.180695e+098.097949e+091.469806e+101.206933e+102.518488e+101.251707e+093.655102e+016.245149e+09
RMSPE%5.066667e+043.436125e+048.998861e+041.212356e+051.098605e+051.586975e+053.537948e+046.045744e+007.902626e+04
MAPE4.787724e-012.541741e-011.374764e+002.625371e+002.596339e+002.741186e+002.460088e-012.044081e-041.226597e+00
MAPE%1.159137e+085.582894e+073.556099e+086.475901e+085.704523e+089.553162e+085.826201e+072.641063e+042.905815e+08

MERRA2-1var-S4+AFRK

推論階段 AFRK 之 MRTS 基底數:279

MetricALL Locs & All TimeKnown Locs & All TimeUnknown Locs & All TimeALL Locs & FutureKnown Locs & FutureUnknown Locs & FutureALL Locs & PastKnown Locs & PastUnknown Locs & Past
MSPE1.4572801.2187342.41146511.64095411.74396711.2289060.3530270.0774441.455357
RMSPE1.2071791.1039631.5528893.4118843.4269473.3509560.5941600.2782881.206382
MSPE%0.0052380.0043780.0086810.0418440.0422000.0404210.0012690.0002760.005239
RMSPE%0.0723750.0661630.0931700.2045590.2054260.2010500.0356210.0166230.072381
MAPE0.5736890.4731140.9759912.6764052.6988732.5865320.3456840.2317660.801355
MAPE%0.0020580.0016970.0034980.0096380.0097180.0093170.0012360.0008280.002867

實驗 2

Weather2k-1var-S4

推論階段 AFRK 之 MRTS 基底數:382

MetricALL Locs & All TimeKnown Locs & All TimeUnknown Locs & All TimeALL Locs & FutureKnown Locs & FutureUnknown Locs & FutureALL Locs & PastKnown Locs & PastUnknown Locs & Past
MSPE1.788776e+001.101298e+004.531336e+001.166086e+011.123812e+011.334732e+017.183094e-012.125255e-033.575386e+00
RMSPE1.337451e+001.049428e+002.128694e+003.414800e+003.352330e+003.653398e+008.475313e-014.610048e-021.890869e+00
MSPE%2.545541e+091.154597e+098.094442e+091.446088e+101.180201e+102.506792e+101.253516e+095.794382e+046.253943e+09
RMSPE%5.045336e+043.397936e+048.996911e+041.202534e+051.086371e+051.583285e+053.540503e+042.407152e+027.908188e+04
MAPE5.045567e-012.856643e-011.377785e+002.617143e+002.582874e+002.753856e+002.754810e-013.656930e-021.228573e+00
MAPE%1.171785e+085.736193e+073.558051e+086.518128e+085.763690e+089.527813e+085.920611e+071.084051e+062.910727e+08

MERRA2-1var-S4

推論階段 AFRK 之 MRTS 基底數:279

MetricALL Locs & All TimeKnown Locs & All TimeUnknown Locs & All TimeALL Locs & FutureKnown Locs & FutureUnknown Locs & FutureALL Locs & PastKnown Locs & PastUnknown Locs & Past
MSPE1.3228701.0674552.34452710.76346210.79801410.6252530.2991910.0123341.446617
RMSPE1.1501611.0331771.5311853.2807723.2860333.2596400.5469830.1110601.202754
MSPE%0.0047610.0038390.0084490.0387270.0388310.0383130.0010780.0000440.005210
RMSPE%0.0689980.0619580.0919170.1967920.1970560.1957370.0328280.0066680.072183
MAPE0.4631670.3375460.9656512.5873522.6030292.5246400.2328340.0918910.796604
MAPE%0.0016640.0012150.0034620.0093200.0093760.0091000.0008340.0003300.002851

實驗 3

Weather2k-S4+AFRK

推論階段 AFRK 之 MRTS 基底數:

MERRA2-S4+AFRK

推論階段 AFRK 之 MRTS 基底數:279

MetricALL Locs & All TimeKnown Locs & All TimeUnknown Locs & All TimeALL Locs & FutureKnown Locs & FutureUnknown Locs & FutureALL Locs & PastKnown Locs & PastUnknown Locs & Past
MSPE1.1402290.8823942.1715689.0796619.0118219.3510190.2793260.0008901.393073
RMSPE1.0678150.9393581.4736243.0132483.0019703.0579440.5285130.0298291.180285
MSPE%0.0041140.0031810.0078430.0327770.0324920.0339180.0010060.0000030.005015
RMSPE%0.0641380.0564050.0885590.1810450.1802560.1841670.0317110.0017850.070819
MAPE0.3892240.2557790.9230022.4098162.4157832.3859480.1701230.0215620.764369
MAPE%0.0013990.0009220.0033100.0086920.0087110.0086160.0006090.0000770.002735

實驗 4

Weather2k-S4

推論階段 AFRK 之 MRTS 基底數:382

MetricALL Locs & All TimeKnown Locs & All TimeUnknown Locs & All TimeALL Locs & FutureKnown Locs & FutureUnknown Locs & FutureALL Locs & PastKnown Locs & PastUnknown Locs & Past
MSPE2.146923e+001.491940e+004.759850e+001.541907e+011.524032e+011.613216e+017.077740e-011.150945e-033.526709e+00
RMSPE1.465238e+001.221450e+002.181708e+003.926713e+003.903886e+004.016486e+008.412931e-013.392558e-021.877953e+00
MSPE%2.674239e+091.261257e+098.311057e+091.581830e+101.288685e+102.751273e+101.248980e+096.501120e+056.228948e+09
RMSPE%5.171305e+043.551417e+049.116500e+041.257708e+051.135203e+051.658696e+053.534091e+048.062952e+027.892368e+04
MAPE5.300836e-013.167455e-011.381154e+003.002617e+002.997532e+003.022904e+002.619775e-012.605781e-021.203133e+00
MAPE%1.218048e+086.210712e+073.599568e+086.871984e+086.082632e+081.002095e+096.049701e+072.885384e+062.903274e+08

MERRA2-S4

推論階段 AFRK 之 MRTS 基底數:279

MetricALL Locs & All TimeKnown Locs & All TimeUnknown Locs & All TimeALL Locs & FutureKnown Locs & FutureUnknown Locs & FutureALL Locs & PastKnown Locs & PastUnknown Locs & Past
MSPE1.0721510.8110332.1166238.3142748.2051278.7508630.2868610.0092641.397248
RMSPE1.0354470.9005741.4548622.8834482.8644592.9581860.5355940.0962511.182052
MSPE%0.0038740.0029300.0076490.0300750.0296440.0317980.0010330.0000330.005031
RMSPE%0.0622390.0541280.0874600.1734220.1721760.1783200.0321340.0057490.070927
MAPE0.4221520.2967200.9238772.3545072.3540062.3565110.2126190.0736410.768531
MAPE%0.0015180.0010690.0033140.0085010.0084970.0085190.0007610.0002630.002750

參考資料

  • Zhu X, Xiong Y, Wu M, et al. Weather2K: A Multivariate Spatio-Temporal Benchmark Dataset for Meteorological Forecasting Based on Real-Time Observation Data from Ground Weather Stations[C]//International Conference on Artificial Intelligence and Statistics. PMLR, 2023: 2704-2722.
  • Juan Lopez Alcaraz 、 Nils Strodthoff(2022)。Diffusion-based time series imputation and forecasting with structured state space models。Transactions on Machine Learning Research。參考自 https://openreview.net/forum?id=hHiIbk7ApW
  • SSSD(2022)。GitHub。參考自 https://github.com/AI4HealthUOL/SSSD