Papers
Topics
Authors
Recent
Search
2000 character limit reached

CT-PatchTST: Channel-Time Transformer

Updated 10 March 2026
  • The paper demonstrates that CT-PatchTST reduces MSE by approximately 7.6% over PatchTST for long-horizon renewable energy forecasting.
  • CT-PatchTST is a deep learning model that integrates channel and time attention to effectively capture both interdependencies and temporal patterns in multivariate data.
  • Empirical evaluations on Danish wind and solar datasets show improved forecast accuracy and robustness across varying patch configurations and forecast horizons.

The Channel-Time Patch Time-Series Transformer (CT-PatchTST) is a deep learning architecture specifically designed for long-term forecasting of multivariate renewable energy generation time series. It extends the Patch Time-Series Transformer (PatchTST) by introducing an inter-channel self-attention mechanism prior to the standard patch-wise temporal Transformer, enabling effective modeling of both channel interdependencies and temporal patterns. The method is evaluated on large-scale Danish offshore wind, onshore wind, and solar generation datasets, exhibiting superior predictive performance and robustness across a range of settings and ablation studies (Huo et al., 15 Jan 2025).

1. Multivariate Time Series Representation and Patch Extraction

CT-PatchTST processes a multivariate time series

X=[x1,x2,…,xL]∈RL×M\mathbf{X} = [\mathbf{x}_1, \mathbf{x}_2, \dots, \mathbf{x}_L] \in \mathbb{R}^{L \times M}

where LL is the look-back window and MM is the number of channels (here: offshore wind, onshore wind, solar power). The forecasting target is the next TT-length sequence {xL+1,…,xL+T}\{\mathbf{x}_{L+1}, \dots, \mathbf{x}_{L+T}\}.

Each input channel c=1,…,Mc=1,\dots, M is segmented into NN overlapping patches, each of length PP and stride S=P2S=\frac{P}{2}:

xpatch(c,i)=[xc, t+(i−1)S,…,xc, t+(i−1)S+P−1]∈RP,i=1,…,N,N=⌊L−PS⌋+1.x_{\mathrm{patch}}^{(c, i)} = \bigl[x_{c,\,t + (i{-}1)S}, \dots, x_{c,\,t + (i{-}1)S + P - 1}\bigr] \in \mathbb{R}^P, \quad i=1,\dots,N, \quad N = \Bigl\lfloor\frac{L - P}{S}\Bigr\rfloor + 1.

After reversible instance normalization (RevIN), this yields a three-dimensional tensor LL0.

Each LL1 is linearly embedded:

LL2

stacked as LL3.

2. Channel-Time Dual Self-Attention Transformer Encoder

The CT-PatchTST encoder introduces two consecutive Transformer-style self-attention mechanisms: channel attention and time attention, each followed by a pointwise feed-forward network (FFN) with residual connections and layer normalization.

a) Channel Attention (Inter-Channel)

For a fixed patch index LL4, the model attends over channels:

LL5

Each attention head LL6 computes: \begin{align*} Q_{h}{\mathrm{ch},i} &= \mathbf{Z}{:,i,:} W_{h}{Q,\mathrm{ch}}, \ K_{h}{\mathrm{ch},i} &= \mathbf{Z}{:,i,:} W_{h}{K,\mathrm{ch}}, \ V_{h}{\mathrm{ch},i} &= \mathbf{Z}{:,i,:} W_{h}{V,\mathrm{ch}}, \ \text{Attention}h{\mathrm{ch},i} &= \operatorname{Softmax}!\Bigl(\tfrac{Q{h}{\mathrm{ch},i}(K_{h}{\mathrm{ch},i}){T}}{\sqrt{d_k}}\Bigr) V_{h}{\mathrm{ch},i} \in \mathbb{R}{M \times d_k}. \end{align*} Multi-head channel attention is concatenated and projected, yielding LL7 for each LL8.

b) Time Attention (Intra-Channel)

For each channel LL9, time attention attends over the patch dimension:

MM0

with each head MM1 computing \begin{align*} Q_{h}{\mathrm{t},c} &= \mathbf{Z}{\mathrm{ch}}{c,:,:} W{h}{Q,\mathrm{t}}, \ K_{h}{\mathrm{t},c} &= \mathbf{Z}{\mathrm{ch}}{c,:,:} W{h}{K,\mathrm{t}}, \ V_{h}{\mathrm{t},c} &= \mathbf{Z}{\mathrm{ch}}{c,:,:} W{h}{V,\mathrm{t}}, \ \text{Attention}{h}{\mathrm{t},c} &= \operatorname{Softmax}!\Bigl(\tfrac{Q{h}{\mathrm{t},c} (K_{h}{\mathrm{t},c})T}{\sqrt{d_k}}\Bigr)V_{h}{\mathrm{t},c}\in\mathbb{R}{N\times d_k}. \end{align*} Concatenation and projection yield MM2. Stacked Channel-Time encoder blocks produce the final tensor MM3.

3. Output Head and Loss Formulation

The output head aggregates encoded representations for each channel, typically by flattening:

MM4

and then linearly projecting to MM5-step forecasts:

MM6

Stacking the predictions across channels gives MM7.

Model training minimizes mean squared error (MSE):

MM8

Mean absolute error (MAE) is also used for evaluation:

MM9

4. Empirical Evaluation Settings

The model is evaluated on Danish renewable energy datasets (2014–2019, approximately 500,000 hourly samples), spanning three channels: OffshoreWindPower, OnshoreWindPower, and SolarPowerProd.

Key experimental parameters are as follows:

Parameter Value(s)
Look-back window TT0 336 (and 512 in variant)
Forecast horizon TT1 96, 192, 336, 720
Patch length TT2 16
Stride TT3 8
Encoder depth 4
Channel-attention heads 1
Time-attention heads 16
Model dimension TT4 256
Feed-forward dimension 512
Batch size 128
Learning rate TT5
Optimization Adam, 50 epochs

Performance is benchmarked against PatchTST and a GRU-based Seq2Seq model. For forecasting window TT6 and TT7:

Model MSE MAE
Seq2Seq (GRU) 0.0187 0.0561
PatchTST 0.0066 0.0540
CT-PatchTST 0.0061 0.0504
CT-PatchTST-512 0.0060 0.0515

Relative to PatchTST, CT-PatchTST reduces MSE by approximately 7.6% at TT8 and consistently outperforms all baselines across the examined forecast horizons.

5. Ablation Studies and Model Robustness

Ablation studies investigate the impact of patch length TT9, forecast horizon {xL+1,…,xL+T}\{\mathbf{x}_{L+1}, \dots, \mathbf{x}_{L+T}\}0, and other hyperparameters. For all tested {xL+1,…,xL+T}\{\mathbf{x}_{L+1}, \dots, \mathbf{x}_{L+T}\}1, CT-PatchTST consistently outperforms PatchTST, demonstrating stability across patching granularities. With {xL+1,…,xL+T}\{\mathbf{x}_{L+1}, \dots, \mathbf{x}_{L+T}\}2 varying from 96 up to 720, CT-PatchTST maintains superior forecasting accuracy, indicating robustness for long-range predictions.

Visualization of learned channel-attention weights reveals that CT-PatchTST discovers and employs cross-channel dependencies (such as correlations between offshore and onshore wind time series) prior to temporal processing, supporting its observed gains over channel-independent approaches.

6. Significance and Implications for Renewable Energy Forecasting

CT-PatchTST addresses the primary limitation of standard PatchTST—the oversight of inter-channel dependencies in multivariate settings—by integrating a lightweight channel-wise self-attention block before temporal modeling. This dual attention approach enables the architecture to leverage both cross-variable context and long-term temporal structure, thereby improving the predictability of renewable energy systems. The demonstrated gains in MSE and MAE suggest benefits for operational decision-making and integration of renewable sources into energy grids. A plausible implication is that similar channel-time dual attention strategies could be effective for other multivariate time series applications exhibiting nontrivial channel dependencies.

7. Context Within the Literature

By extending patch-based time-series Transformers to incorporate explicit inter-channel modeling, CT-PatchTST builds upon both attention mechanisms and multi-horizon forecasting research. It maintains channel-independent advantages, such as increased data granularity, while resolving a key weakness through a principled dual-attention design. The model’s success in large-scale real-world renewable generation scenarios highlights its practical relevance and points towards further applications in environmental and resource forecasting tasks (Huo et al., 15 Jan 2025).

Definition Search Book Streamline Icon: https://streamlinehq.com
References (1)

Topic to Video (Beta)

No one has generated a video about this topic yet.

Whiteboard

No one has generated a whiteboard explanation for this topic yet.

Follow Topic

Get notified by email when new papers are published related to Channel-Time PatchTST (CT-PatchTST).