Patch Attention Wisely: Understanding Patch Length in Attention-Based Forecasting
Organizations: Department of Economics, Econometrics and Finance University of Groningen · Department of Statistics and Data Science Washington University in St. Louis · School of Economics University of Bristol
Abstract
Attention-based time series forecasters commonly group consecutive observations into patches. Patch length is known to have a substantial impact on forecasting performance, yet its selection remains largely empirical. We develop a theoretical framework that explains why patch length matters for forecasting accuracy and provides a principled basis for its selection. For linear state-space models, we derive an exact factorization of the forecasting coefficient matrix that separates forecast dynamics from filtering dynamics. We show that dominance of a single forecast component at long horizons does not generally imply a rank-one representation. This explains why longer horizons alone need not reduce representational complexity. We combine the factorization with estimation bounds to develop a patch-selection criterion that balances representation and estimation errors under temporal dependence. Our analysis establishes conditions under which balanced patching is justified and clarifies how predictive structure, head count, training sample size, and long-run dependence enter the selection criterion.
Figures & tables
| 64 | 5 | |||
|---|---|---|---|---|
| 64 | 25 | |||
| 64 | 200 | |||
| 144 | 5 | |||
| 144 | 25 | |||
| 144 | 200 |
Appendix figures & tables11 assets
Supplementary material from the paper’s appendix.
Appendix
| Force | Quantity represented in the theory | Typical pressure on |
|---|---|---|
| Predictive approximation | or its multi-horizon aggregate | Depends on the coefficient reshape under a rank constraint. Patching alone is lossless. No monotone direction is proved. |
| Statistical complexity | , with when | Toward a balanced factorization near only when approximation and the dependence proxy vary little. |
| Serial dependence | Patch-dependent score concentration and restricted curvature | Smaller magnifies complexity control. The direction is not universally larger because can change with tokenization. |
| Token mixing | for dense all-token mixing, and for fixed-width linear attention | Larger patches reduce mixing. The scale belongs only to the dense quadratic proxy. |
| Multiple horizons | Weighted-average or worst-case approximation over | One shared patch only if horizon-specific curves share a near-minimizer. Otherwise multiresolution or horizon-specific tokens. |
| 64 | 5 | |||
|---|---|---|---|---|
| 64 | 25 | |||
| 64 | 200 | |||
| 144 | 5 | |||
| 144 | 25 | |||
| 144 | 200 |
| Design | Signal | Approx. bound | Max over | Trained, | Trained, | ||
|---|---|---|---|---|---|---|---|
| Dense | 64 | 1 | 0.830 | ||||
| Dense | 64 | 12 | 0.206 | ||||
| Dense | 144 | 1 | 0.830 | ||||
| Dense | 144 | 12 | 0.206 | ||||
| Near-aligned | 64 | 1 | 0.856 | ||||
| Near-aligned | 64 | 12 | 0.277 |
| Weights | Heads | Lower mean | Favors more heads | Favors fewer heads |
|---|---|---|---|---|
| 1 to 2 | 12/12 | 12/12 | 0/12 | |
| 2 to 3 | 12/12 | 12/12 | 0/12 | |
| 3 to 4 | 0/12 | 0/12 | 10/12 | |
| 1 to 2 | 12/12 | 12/12 | 0/12 | |
| 2 to 3 | 9/12 | 9/12 | 1/12 | |
| 3 to 4 | 0/12 | 0/12 | 10/12 |
| Baseline | Changed | Changed | Changed and | |
|---|---|---|---|---|
| 1 | 1.04 (0.94) | 0.96 (0.83) | 1.06 (0.94) | 1.33 (0.64) |
| 2 | 1.08 (0.93) | 1.00 (0.99) | 1.15 (0.94) | 1.06 (0.87) |
| 4 | 1.13 (0.90) | 1.14 (0.94) | 0.98 (0.96) | 1.36 (0.75) |
| 8 | 1.43 (0.89) | 1.41 (0.76) | 1.32 (0.85) | 0.13 ( 0.74) |
| 12 | 1.33 (0.84) | 1.66 (0.94) | 1.55 (0.78) | 0.13 ( 0.73) |
| 16 | 1.58 (0.85) | 1.60 (0.92) | 1.41 (0.34) | 0.14 ( 0.66) |
Time Series Forecasting
Time series forecasting predicts future values from ordered observations using statistical, neural, and probabilistic models to support decisions under uncertainty.
See all 905 papers