Papers
Topics
Authors
Recent
Search
2000 character limit reached

Times2D Framework: FSDH Derivative Heatmaps

Updated 18 January 2026
  • Times2D Framework is a forecasting model that uses the FSDH module to extract first and second derivatives from multivariate time series and convert them into 2D heatmaps.
  • FSDH computes normalized first and second derivatives to highlight sharp transitions and turning points, addressing nonstationary fluctuations.
  • Integrated with a periodic decomposition block, FSDH enhances forecast accuracy by fusing edge-like features with global periodic patterns.

First and Second Derivative Heatmaps (FSDH) are a structured approach for extracting and representing sharp local transitions and turning points in multivariate time series data by leveraging pointwise discrete temporal derivatives. Developed as a core module within the Times2D forecasting framework, FSDH translates 1D sequential data into a 2D tensor format, enabling the use of 2D convolutional architectures for robust feature extraction. This representation addresses the limitations of strictly periodic or spectral decomposition by providing complementary edge-like and inflection-point information crucial for forecasting under nonstationary and highly fluctuating conditions (Nematirad et al., 31 Mar 2025).

1. Mathematical Construction

Given a batch tensor X1DRB×S×NX_{1D}\in\mathbb{R}^{B\times S\times N}, where BB is the batch size, SS the length of the time series, and NN the feature dimension (channels), the FSDH module computes the following:

  • First Derivative:

D1(t)=X1D(t+1)X1D(t),D1(0)=0,t=0,,S2D_1(t) = X_{1D}(t+1) - X_{1D}(t),\quad D_1(0) = \mathbf{0}, \quad t=0,\ldots, S-2

yielding D1RB×S×ND_1 \in \mathbb{R}^{B \times S \times N}.

  • Second Derivative:

D2(t)=D1(t+1)D1(t),D2(0)=0,t=0,,S2D_2(t) = D_1(t+1) - D_1(t),\quad D_2(0) = \mathbf{0}, \quad t=0,\ldots, S-2

resulting in D2RB×S×ND_2 \in \mathbb{R}^{B \times S \times N}.

Normalization is performed along the time axis to ensure scale-robustness, either by absolute maximum scaling: D~i(t)=Di(t)maxtDi(t)+ε\widetilde D_i(t) = \frac{D_i(t)}{\max_{t'}|D_i(t')| + \varepsilon} or by z-score normalization: D~i(t)=Di(t)μiσi,μi=1StDi(t),σi2=1St(Di(t)μi)2\widetilde D_i(t) = \frac{D_i(t) - \mu_i}{\sigma_i},\quad \mu_i = \frac{1}{S}\sum_{t}D_i(t),\quad \sigma_i^2 = \frac{1}{S}\sum_{t}(D_i(t) - \mu_i)^2

2. Heatmap Tensorization and Convolutional Encoding

The normalized derivatives are stacked along a new "derivative" axis to form the 2D heatmap tensor: H2D(t,d)={D~1(t)d=1 D~2(t)d=2H_{2D}(t,d) = \begin{cases} \widetilde D_1(t) & d=1\ \widetilde D_2(t) & d=2 \end{cases} which results in H2DRB×2×S×NH_{2D}\in\mathbb{R}^{B \times 2 \times S \times N}.

This tensor serves as input to a shallow 2D convolutional network: H^2D=Conv2D(H2D),H^2DRB×C×S×N\widehat H_{2D} = \mathrm{Conv2D}(H_{2D}),\quad \widehat H_{2D}\in\mathbb{R}^{B\times C'\times S\times N} where typical parameters are a kernel of size 3×33\times 3, stride 1, padding 1, 2–3 layers, with ReLU activation and BatchNorm after each convolution. The output is then aggregated (e.g., weighted sum or linear projection) and resized via a head module to [B,P,N][B, P, N] for downstream forecasting.

3. Interpretative Role in Time Series Forecasting

The FSDH representation enables explicit modeling of sharp local dynamics:

  • The first derivative D1D_1 highlights regions of acute increases or decreases in the series, corresponding to edges or sudden events.
  • The second derivative D2D_2 identifies turning points and inflection regions, as sign changes in D2D_2 correlate with local maxima and minima.

Combined, these two maps encode local information about non-stationarity and irregular fluctuations. This is critical for reliably forecasting series with abrupt regime shifts, spikes, or drops, supplementing global periodic summaries.

4. Integration Within the Times2D Framework

The FSDH module is integrated into Times2D alongside the Periodic Decomposition Block (PDB). Both modules independently produce [B,P,N][B, P, N] outputs:

  • FSDH: X^1DFSDH\widehat X_{1D}^{\rm FSDH}
  • PDB: X^1DPDB\widehat X_{1D}^{\rm PDB}

These are fused within the Aggregation Forecasting Block (AFB) via elementwise summation: X^1D=X^1DPDB+X^1DFSDH\widehat X_{1D} = \widehat X_{1D}^{\rm PDB} + \widehat X_{1D}^{\rm FSDH} Alternatively, learnable scalar gating factors α(0,1)\alpha \in (0,1) may reweight the modules: X^1D=αX^1DPDB+(1α)X^1DFSDH\widehat X_{1D} = \alpha\,\widehat X_{1D}^{\rm PDB} + (1-\alpha)\,\widehat X_{1D}^{\rm FSDH} This architecture supports modular, interpretable, and effective fusion of multiscale periodic structure and local temporal change information (Nematirad et al., 31 Mar 2025).

5. Implementation Details and Hyperparameterization

The FSDH configurations validated in experimental studies include:

Parameter Typical Value(s) Notes
Input size (SS) 96 – 1440 Series segment length
Convolutional Layers 2 or 3 Conv\toReLU\toBatchNorm, 3×3 kernels
Channels (per layer) 32 → 64 → 32 First layer: 2 input, last layer: CC' output
Head 1×1 conv or linear projection For mapping C×S×NS×NC'\times S\times N \to S\times N
Loss MSE or MAE on X^1D\widehat X_{1D} Joint optimization across Times2D modules

Both convolutional and head parameters, as well as any gating scalars, are trained end-to-end with the rest of the Times2D architecture.

6. Significance and Empirical Performance

FSDH provides a lightweight yet effective 2D "image" of time series derivatives, enabling convolutional architectures to efficiently extract edge-like (first derivative) and corner-like (second derivative) features. Empirical results within the Times2D model demonstrate that, when FSDH is fused with spectral features from the PDB, the combined representation achieves state-of-the-art results in both short-term and long-term multivariate time series forecasting across large-scale benchmarks. This suggests that explicitly capturing local nonstationary transitions, in addition to periodic structure, is crucial for high-fidelity predictive modeling in complex temporal domains (Nematirad et al., 31 Mar 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 Times2D Framework.