TimeSqueeze: Dynamic Patching for Efficient Time Series Forecasting
Organizations: University of Texas at Austin, Austin, TX, USA · Capital One, USA · University of Maryland, College Park, MD, USA
Abstract
Transformer-based time series foundation models face a fundamental trade-off in choice of tokenization: point-wise embeddings preserve temporal fidelity but scale poorly with sequence length, whereas fixed-length patching improves efficiency by imposing uniform boundaries that may disrupt natural transitions and blur informative local dynamics. In order to address these limitations, we introduce TimeSqueeze, a dynamic patching mechanism that adaptively selects patch boundaries within each sequence based on local signal complexity. TimeSqueeze first applies a lightweight state-space encoder to extract full-resolution point-wise features, then performs content-aware segmentation by allocating short patches to information-dense regions and long patches to smooth or redundant segments. This variable-resolution compression preserves critical temporal structure while substantially reducing the token sequence presented to the Transformer backbone. Specifically for large-scale pretraining, TimeSqueeze attains up to 20x faster convergence and 8x higher data efficiency compared to equivalent point-token baselines. Experiments across long-horizon forecasting benchmarks show that TimeSqueeze consistently outperforms comparable architectures that use either point-wise tokenization or fixed-size patching.
Figures & tables
| Models | Metrics | TimeSqueeze | TimeSqueeze | Time-MoE | Time-MoE | Moirai | TimesFM | Moment | Chronos | ||||||||
| MSE | MAE | MSE | MAE | MSE | MAE | MSE | MAE | MSE | MAE | MSE | MAE | MSE | MAE | MSE | MAE | ||
| ETTh1 | 96 | 0.379 | 0.357 | 0.350 | |||||||||||||
| 192 | 0.410 | 0.388 | 0.384 | ||||||||||||||
| 336 | 0.420 | 0.412 | 0.411 | 0.411 | 0.428 | ||||||||||||
| 720 | 0.428 | 0.446 | 0.427 | 0.444 | |||||||||||||
| Avg. | 0.402 | 0.414 | 0.394 | 0.400 | 0.419 | ||||||||||||
| Dataset | TimeSqueeze | Time-MoE | iTransformer | TimeMixer | TimesNet | PatchTST | DLinear | CycleNet | TQNet | |||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| MSE | MAE | MSE | MAE | MSE | MAE | MSE | MAE | MSE | MAE | MSE | MAE | MSE | MAE | MSE | MAE | MSE | MAE | |
| ETTh1 | 0.398 | 0.419 | 0.379 | 0.406 | ||||||||||||||
| ETTh2 | 0.350 | 0.393 | 0.346 | 0.386 | ||||||||||||||
| ETTm1 | 0.386 | 0.345 | 0.381 | 0.377 | ||||||||||||||
| ETTm2 | 0.259 | 0.321 | 0.266 | 0.314 | ||||||||||||||
| Weather | 0.236 | 0.240 | 0.271 | 0.271 | 0.269 | |||||||||||||
Appendix figures & tables19 assets
Supplementary material from the paper’s appendix.
Appendix
| Models | ETTh1 | ETTh2 | ETTm1 | ETTm2 | Weather | Electricity | ||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| MSE | MAE | MSE | MAE | MSE | MAE | MSE | MAE | MSE | MAE | MSE | MAE | |
| Autoformer [2021] | 0.496 | 0.487 | 0.450 | 0.459 | 0.588 | 0.517 | 0.327 | 0.371 | 0.338 | 0.382 | 0.227 | 0.338 |
| FEDformer [2022] | 0.498 | 0.484 | 0.437 | 0.449 | 0.448 | 0.452 | 0.305 | 0.349 | 0.309 | 0.360 | 0.214 | 0.327 |
| DLinear [2023] | 0.461 | 0.457 | 0.563 | 0.519 | 0.404 | 0.408 | 0.354 | 0.402 | 0.265 | 0.315 | 0.225 | 0.319 |
| TimesNet [2023] | 0.495 | 0.450 | 0.414 | 0.427 | 0.400 | 0.406 | 0.291 | 0.333 | 0.251 | 0.294 | 0.193 | 0.304 |
| PatchTST [2023] | 0.516 | 0.484 | 0.391 | 0.411 | 0.406 | 0.407 | 0.290 | 0.334 | 0.265 | 0.285 | 0.216 | 0.318 |
| Energy | Finance | Healthcare | Nature | Sales | Synthetic | Transport | Web | Other | Total | |
|---|---|---|---|---|---|---|---|---|---|---|
| # Seqs. | 2,875,335 | 1,715 | 1,752 | 31,621,183 | 110,210 | 11,968,625 | 622,414 | 972,158 | 40,265 | 48,220,929 |
| # Obs. | 15.981 B | 413.696 K | 471.040 K | 279.724 B | 26.382 M | 9.222 B | 2.130 B | 1.804 B | 20.32 M | 309.09 B |
| Percent % | 5.17% | 0.0001% | 0.0001% | 90.50% | 0.008% | 2.98% | 0.69% | 0.58% | 0.006% | 100% |
| Dataset | Domain | Freq. | # Time Series | # Obs. | Source |
|---|---|---|---|---|---|
| Weatherbench (Hourly) | Nature | H | 3,984,029 | 74,630,250,518 | ( Rasp et al., 2020 ) |
| Weatherbench (Daily) | Nature | D | 301,229 | 3,223,513,345 | ( Rasp et al., 2020 ) |
| Weatherbench (Weekly) | Nature | W | 226,533 | 462,956,049 | ( Rasp et al., 2020 ) |
| Beijing Air Quality | Nature | H | 4,262 | 2,932,657 | ( Chen, 2019 ) |
| China Air Quality | Nature | H | 17,686 | 4,217,605 | ( Zheng et al., 2015 ) |
| CMIP6 | Nature | 6H | 14,327,808 | 104,592,998,400 | ( Nguyen et al., 2023 ) |
| Model / Variation | ETTh1 | ETTh2 | ETTm1 | ETTm2 | Weather | Average | ||||||
| MSE | MAE | MSE | MAE | MSE | MAE | MSE | MAE | MSE | MAE | MSE | MAE | |
| TimeSqueeze | 0.259 | 0.310 | ||||||||||
| Time-MoE | 0.272 (+5.0%) | 0.323 (+4.2%) | ||||||||||
| TimeSqueeze w/ fixed patching (size 4) | 0.340 (+31.3%) | 0.368 (+18.7%) | ||||||||||
| TimeSqueeze w/ fixed patching (size 2) | 0.340 (+31.3%) | 0.368 (+18.7%) | ||||||||||
| TimeSqueeze w/ linear patching (no SSM) | 0.353 (+36.3%) | 0.363 (+17.1%) | ||||||||||
| Method | ETTh1 (MSE/MAE) | ETTh2 (MSE/MAE) | ETTm1 (MSE/MAE) | ETTm2 (MSE/MAE) | Weather (MSE/MAE) |
|---|---|---|---|---|---|
| Dynamic patching (avg patch size 4) | 0.342 / 0.364 | 0.280 / 0.347 | 0.351 / 0.370 | 0.201 / 0.292 | 0.175 / 0.229 |
| Fixed-size patching (size 4) | 0.366 / 0.394 | 0.406 / 0.421 | 0.370 / 0.388 | 0.362 / 0.406 | 0.185 / 0.250 |
| Method | ETTh1 | ETTh2 | ETTm1 | ETTm2 | Weather | Avg. | ||||||
| MSE | MAE | MSE | MAE | MSE | MAE | MSE | MAE | MSE | MAE | MSE | MAE | |
| Dynamic patching | 0.369 | 0.396 | 0.364 | 0.400 | 0.411 | 0.415 | 0.287 | 0.363 | 0.204 | 0.265 | 0.327 | 0.368 |
| Fixed-size patching | ||||||||||||
| Point embedding | ||||||||||||
| Models | Metrics | TimeSqueeze | Time-MoE | iTransformer | TimeMixer | TimesNet | PatchTST | DLinear | CycleNet | TQNet | |||||||||
| MSE | MAE | MSE | MAE | MSE | MAE | MSE | MAE | MSE | MAE | MSE | MAE | MSE | MAE | MSE | MAE | MSE | MAE | ||
| ETTh1 | 96 | 0.354 | 0.384 | 0.345 | 0.375 | ||||||||||||||
| 192 | 0.397 | 0.412 | 0.372 | 0.396 | |||||||||||||||
| 336 | 0.418 | 0.427 | 0.389 | 0.412 | |||||||||||||||
| 720 | 0.423 | 0.454 | 0.410 | 0.443 | |||||||||||||||
| Avg. | 0.398 | 0.419 | 0.379 | 0.406 | |||||||||||||||