PatchMixer: A Patch-Mixing Architecture for Long-Term Time Series Forecasting

Zeying Gong, Yujin Tang, Junwei Liang · Submission to ICLR 2024 · Rejected

TL;DR

PatchMixer challenges the dominance of Transformer architectures in long-term time series forecasting by replacing self-attention with lightweight depthwise separable convolutions over temporal patches. By combining a single-scale "patch-mixing" backbone with dual forecasting heads (linear and nonlinear), PatchMixer outperforms current state-of-the-art models like PatchTST while delivering up to $3\times$ faster inference and $2\times$ faster training.

What Problem Does This Paper Address?

In recent years, Transformer architectures have dominated long-term time series forecasting (LTSF). However, standard self-attention is naturally permutation-invariant—it treats tokens as an unordered set unless artificial positional encodings are added, which often fails to preserve critical temporal order. While recent models like PatchTST achieved state-of-the-art performance by slicing sequences into subseries patches, an open question remained: Does PatchTST's success stem from the Transformer backbone itself, or simply from the patch-based input representation?

Existing CNN alternatives often resort to complex multi-scale or multi-branch structures (e.g., Inception blocks or binary trees) to capture both local patterns and long-range dependencies, adding computational overhead. PatchMixer investigates whether a simple, single-scale CNN using depthwise separable convolutions can match or beat Transformer-level accuracy with significantly greater computational efficiency.

Methods

PatchMixer processes multivariate time series under a channel-independent setup (each variable is modeled as an independent univariate series):

  1. Patch Embedding without Positional Encodings: The input sequence of length $L$ is partitioned via a sliding window into $N$ overlapping patches of length $P=16$ with stride $S=8$. Unlike Transformers, convolutions are inherently permutation-variant, completely eliminating the need for temporal feature or position embeddings.
  2. PatchMixer Layer (Depthwise Separable Convolution):
  3. Depthwise 1D Convolution: Operates along the intra-patch dimension ($K=8$) independently across patch channels to capture local, periodic patterns within patches.
  4. Pointwise 1D Convolution ($1 \times 1$): Mixes features across patch locations (inter-patch) to capture long-range temporal correlations. This layer can also adjust the output patch channels to perform patch aggregation or disaggregation.
  5. Dual Forecasting Heads: Inspired by decomposition paradigms, PatchMixer splits prediction into two specialized heads:
  6. Linear Flatten Head: A linear residual skip connection spanning the convolution block to capture macro-level linear trends.
  7. MLP Flatten Head: A two-layer MLP with GELU activations applied to the convolutional output to model fine-grained nonlinear fluctuations.
  8. Their outputs are summed to yield the final forecast.
  9. Balanced Loss & Normalization: Employs Reversible Instance Normalization (RevIN) and trains using an equal combination of Mean Squared Error (MSE) and Mean Absolute Error (MAE) loss ($1:1$ ratio), balancing trend estimation and outlier sensitivity.
Input Series -> Instance Norm -> Patch Embedding (VE)
      |                                  |
      |                        [Depthwise Conv (Intra-patch)]
      |                                  |
      |                        [Pointwise Conv (Inter-patch)]
      |                                  |
      +-----> (Linear Flatten Head)      |
      |               |                  v
      |               |          (MLP Flatten Head)
      |               \                 /
      |                +--- (Sum) <----+
      v                      |
Denormalization <------------+--------> Output Forecast

Datasets

The authors evaluate PatchMixer on seven standard long-term forecasting benchmarks:

  • Large-scale: Traffic (862 sensors, freeway occupancy) and Electricity (321 customers, hourly consumption).
  • Medium-scale: Weather (21 meteorological indicators), ETTm1, and ETTm2 (Electricity Transformer Temperature, 15-minute intervals).
  • Small-scale: ETTh1 and ETTh2 (1-hour intervals).

Note: No new datasets were introduced; all benchmarks and train/validation/test splits follow standard splits established in prior LTSF literature.

Key Insights and Ideas

  • Patches, not attention, are the secret sauce: Replacing self-attention with single-scale depthwise separable convolutions yields better accuracy, confirming that the subseries patch representation—rather than self-attention—drives recent LTSF breakthroughs.
  • Convolutions respect temporal order naturally: Because CNNs preserve spatial/temporal structure, they avoid the information degradation introduced by permutation-invariant self-attention and hand-crafted positional encodings.
  • Dual heads outperform unified projection: Disentangling linear baseline trends (via a direct linear projection) from local nonlinear residuals (via an MLP on top of conv features) consistently beats single-head predictors.
  • Robust scaling with look-back length: Unlike earlier Transformer baselines that overfit on longer histories, PatchMixer's performance continuously improves as look-back windows grow from 96 to 720 time steps.

Key Results

  • Forecasting Accuracy: Across seven benchmarks, PatchMixer achieves:
  • $3.9\%$ relative MSE reduction and $3.0\%$ MAE reduction compared to the prior state-of-the-art Transformer (PatchTST).
  • $11.6\%$ MSE reduction compared to the best linear baseline (DLinear).
  • $21.2\%$ MSE reduction and $12.5\%$ MAE reduction compared to the best CNN baseline (TimesNet).
  • Efficiency and Scalability:
  • $3\times$ faster inference and $2\times$ faster training compared to PatchTST on an NVIDIA RTX 4090.
  • Requires only 66.32M MACs for look-back $L=336 \to T=720$, compared to 293.63M MACs for PatchTST's attention encoder.
  • Runtime remains virtually flat as historical look-back lengths increase, whereas PatchTST scales quadratically.

Limitations and Future Work

  • External Covariates: PatchMixer operates under channel independence and patch tokenization, making it difficult to directly integrate point-wise exogenous variables (e.g., calendar events, holidays, temperature forecasts).
  • Patch Dimension Granularity: The reliance on localized sliding windows biases the network toward intra-window dynamics; modeling extremely sparse, irregular, or non-stationary macroeconomic trends remains an open research direction.

Summary updated

BibTeX
@misc{gong2023patchmixer,
  author = {Zeying Gong and Yujin Tang and Junwei Liang},
  title = {{PatchMixer: A Patch-Mixing Architecture for Long-Term Time Series Forecasting}},
  year = {2023},
  eprint = {2310.00655},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2310.00655},
}
Figure