Papers
Topics
Authors
Recent
Search
2000 character limit reached

Shape-Aware Temporal Loss (SATL)

Updated 7 July 2026
  • SATL is a family of loss functions that integrate shape and temporal distortion measures to overcome the limitations of point-wise losses in forecasting.
  • The DILATE formulation of SATL employs a smooth dynamic programming approach to combine shape matching and temporal alignment for improved spike detection and timing.
  • Variants of SATL extend the concept by incorporating first-order differences, frequency-domain analysis, and perceptual feature losses to capture geometric cues in time-series data.

Shape-Aware Temporal Loss (SATL) denotes a class of objective functions for deep time-series forecasting that are designed to preserve salient temporal structure rather than relying only on point-wise discrepancies such as MSE or MAE. In the supplied literature, the term has two closely related but non-identical uses. One use refers to the DILATE objective, which combines a smooth Dynamic Time Warping (DTW)-based shape term with a differentiable temporal-distortion term for multi-step forecasting of non-stationary signals with sudden changes (Guen et al., 2019, Guen et al., 2021). A later use refers to a three-component loss that approximates the geometric cues of the Time Series Geometric Structure Index (TGSI) by combining first-order difference, frequency-domain, and perceptual feature losses in the time-series modality (Yu et al., 31 Jul 2025). Across these formulations, the common premise is that purely point-wise losses are often insufficient for sharp forecasts, timely change localization, and faithful preservation of rises, drops, peaks, plateaus, and periodic cycles.

1. Terminological scope and research trajectory

The earliest formulation in the supplied material is DILATE, introduced for training deep neural networks on non-stationary time-series forecasting tasks with multiple future steps (Guen et al., 2019). DILATE explicitly combines two terms: one for shape distortion and one for temporal distortion. The later paper "Deep Time Series Forecasting with Shape and Temporal Criteria" extends this perspective by defining shape and temporal similarities and dissimilarities via smooth relaxations of DTW and the Temporal Distortion Index (TDI), enabling differentiable loss functions and positive semi-definite kernels; in that paper, DILATE is the deterministic forecasting objective, while STRIPE++ is introduced for probabilistic forecasting with structured shape and time diversity enforced through a determinantal point process diversity loss (Guen et al., 2021).

A separate 2025 line of work reintroduces the name SATL for a different construction motivated by the non-differentiability of an image-based metric, TGSI. There, SATL is defined as a multi-component loss operating directly on the time-series modality and is intended to bridge a geometric-structure evaluation criterion into end-to-end training (Yu et al., 31 Jul 2025).

This suggests that SATL is not a single canonical formula across the literature. Rather, the label is attached to a family of objectives that share a common ambition: to couple numerical fidelity with explicit modeling of structural or temporal characteristics that are poorly captured by plain LpL_p-type losses.

2. DILATE as a shape-and-time SATL

In the DILATE formulation, the forecast y^\hat y and target yy are compared through a pairwise cost matrix Δ\Delta and a set of admissible warping paths A\mathcal A. The shape term is a smooth relaxation of DTW:

Lshape(y^,y)=DTWγ(y^,y)=γlogAAk,kexp ⁣(A,Δ(y^,y)/γ),L_{\mathrm{shape}}(\hat y,y) = DTW_\gamma(\hat y,y) = -\gamma \log \sum_{A\in\mathcal A_{k,k}} \exp\!\bigl(-\langle A,\Delta(\hat y,y)\rangle/\gamma\bigr),

with smoothing parameter γ>0\gamma>0. The supplied descriptions state that Δ\Delta may be instantiated from squared-Euclidean pointwise costs such as y^iyj22\| \hat y_i-y_j\|_2^2, and that as γ0\gamma\to 0, y^\hat y0 (Guen et al., 2021).

The temporal term is a differentiable analogue of TDI. Let y^\hat y1 denote the soft alignment induced by the Gibbs distribution over warping paths. Then the temporal distortion loss is

y^\hat y2

where y^\hat y3 is a nonnegative off-diagonal penalty, with examples including y^\hat y4 and y^\hat y5 (Guen et al., 2021).

The combined objective is

y^\hat y6

or equivalently,

y^\hat y7

with y^\hat y8. The supplied descriptions state that y^\hat y9 recovers pure soft-DTW, while yy0 uses only the TDI term and is not generally recommended alone (Guen et al., 2019, Guen et al., 2021).

Within this construction, the shape term encourages global shape matching under elastic alignment, and the temporal term penalizes delay or advance of aligned features. The stated motivation is that MSE cannot distinguish a shifted spike from a correctly timed spike, whereas the combined objective encourages forecasts that are both sharp and timely (Guen et al., 2021).

3. Differentiability, dynamic programming, and hyperparameters

Both DILATE components are differentiable with respect to the prediction because they are built from smooth operations, notably log-sum-exp and matrix multiplications. For the shape term, the gradient can be written as a sum over soft-alignment weights multiplied by derivatives of the pointwise cost matrix. For squared-Euclidean costs, the supplied exposition gives yy1; for the temporal term, differentiation proceeds through yy2, which follows from the Hessian of soft-DTW and can be implemented by back-propagation through the dynamic-programming routine (Guen et al., 2021).

The forward and backward passes are computed by dynamic programming in yy3 time and memory for length-yy4 sequences, or yy5 for general lengths yy6. The forward recurrence uses a numerically stabilized log-sum-exp form, and the backward pass yields the soft alignment yy7. One supplied implementation strategy is to write a custom autograd.Function that caches the forward matrix and implements both yy8 and the Hessian-vector products needed for the temporal term; the supplied material reports that this custom backward is approximately yy9 faster than naive autograd for Δ\Delta0 (Guen et al., 2019).

The principal hyperparameters are the smoothing temperature Δ\Delta1, the shape-time tradeoff Δ\Delta2, and the choice of temporal penalty matrix Δ\Delta3. The supplied descriptions give Δ\Delta4 as a typical or suggested default, note that smaller Δ\Delta5 is closer to exact DTW but may make training harder or produce vanishing and exploding gradients, and identify Δ\Delta6 as a typical grid, with Δ\Delta7 a good starting point for non-stationary data with sharp steps. Reported task-specific settings include Δ\Delta8 for synthetic data and ECG5000, and Δ\Delta9 for traffic occupancy (Guen et al., 2019, Guen et al., 2021).

These implementation details matter because the appeal of DILATE-style SATL is inseparable from its trainability. The formulation is more expressive than point-wise losses, but it also introduces dynamic-programming cost, temperature sensitivity, and endpoint degeneracies when A\mathcal A0 approaches A\mathcal A1 or A\mathcal A2.

4. TGSI-bridging SATL in the time-series modality

The 2025 SATL is motivated by TGSI, an evaluation metric that transforms a time series into an image and measures geometric alignment through luminance and covariance terms. TGSI is defined after a non-differentiable image conversion in which each time step lights up a vertical column of pixels around the normalized value with Gaussian-like falloff over A\mathcal A3 pixels; because this mapping discretizes and expands the series, the supplied material states that A\mathcal A4, so TGSI cannot be used directly as a training loss (Yu et al., 31 Jul 2025).

To bridge this gap, the 2025 SATL operates entirely in the time-series modality and combines three terms. The first-order difference loss is

A\mathcal A5

where A\mathcal A6. This term measures structural consistency through local slopes (Yu et al., 31 Jul 2025).

The frequency-domain term uses the discrete Fourier transform along the time axis. Let A\mathcal A7 denote the dominant frequencies, defined as the top-A\mathcal A8 magnitudes of A\mathcal A9, and let the complement act as a noise band. The loss is decomposed into a dominant-frequency matching term and a non-dominant suppression term:

Lshape(y^,y)=DTWγ(y^,y)=γlogAAk,kexp ⁣(A,Δ(y^,y)/γ),L_{\mathrm{shape}}(\hat y,y) = DTW_\gamma(\hat y,y) = -\gamma \log \sum_{A\in\mathcal A_{k,k}} \exp\!\bigl(-\langle A,\Delta(\hat y,y)\rangle/\gamma\bigr),0

and then normalized as

Lshape(y^,y)=DTWγ(y^,y)=γlogAAk,kexp ⁣(A,Δ(y^,y)/γ),L_{\mathrm{shape}}(\hat y,y) = DTW_\gamma(\hat y,y) = -\gamma \log \sum_{A\in\mathcal A_{k,k}} \exp\!\bigl(-\langle A,\Delta(\hat y,y)\rangle/\gamma\bigr),1

The supplied explanation states that Lshape(y^,y)=DTWγ(y^,y)=γlogAAk,kexp ⁣(A,Δ(y^,y)/γ),L_{\mathrm{shape}}(\hat y,y) = DTW_\gamma(\hat y,y) = -\gamma \log \sum_{A\in\mathcal A_{k,k}} \exp\!\bigl(-\langle A,\Delta(\hat y,y)\rangle/\gamma\bigr),2 reproduces major periodic components and Lshape(y^,y)=DTWγ(y^,y)=γlogAAk,kexp ⁣(A,Δ(y^,y)/γ),L_{\mathrm{shape}}(\hat y,y) = DTW_\gamma(\hat y,y) = -\gamma \log \sum_{A\in\mathcal A_{k,k}} \exp\!\bigl(-\langle A,\Delta(\hat y,y)\rangle/\gamma\bigr),3 suppresses spurious oscillations (Yu et al., 31 Jul 2025).

The third component is a perceptual feature loss. It is constructed in two stages. First, a time-series image autoencoder is trained after converting each Lshape(y^,y)=DTWγ(y^,y)=γlogAAk,kexp ⁣(A,Δ(y^,y)/γ),L_{\mathrm{shape}}(\hat y,y) = DTW_\gamma(\hat y,y) = -\gamma \log \sum_{A\in\mathcal A_{k,k}} \exp\!\bigl(-\langle A,\Delta(\hat y,y)\rangle/\gamma\bigr),4 series into an image Lshape(y^,y)=DTWγ(y^,y)=γlogAAk,kexp ⁣(A,Δ(y^,y)/γ),L_{\mathrm{shape}}(\hat y,y) = DTW_\gamma(\hat y,y) = -\gamma \log \sum_{A\in\mathcal A_{k,k}} \exp\!\bigl(-\langle A,\Delta(\hat y,y)\rangle/\gamma\bigr),5 by a vertical-expansion procedure with height Lshape(y^,y)=DTWγ(y^,y)=γlogAAk,kexp ⁣(A,Δ(y^,y)/γ),L_{\mathrm{shape}}(\hat y,y) = DTW_\gamma(\hat y,y) = -\gamma \log \sum_{A\in\mathcal A_{k,k}} \exp\!\bigl(-\langle A,\Delta(\hat y,y)\rangle/\gamma\bigr),6, width Lshape(y^,y)=DTWγ(y^,y)=γlogAAk,kexp ⁣(A,Δ(y^,y)/γ),L_{\mathrm{shape}}(\hat y,y) = DTW_\gamma(\hat y,y) = -\gamma \log \sum_{A\in\mathcal A_{k,k}} \exp\!\bigl(-\langle A,\Delta(\hat y,y)\rangle/\gamma\bigr),7, and expansion half-width Lshape(y^,y)=DTWγ(y^,y)=γlogAAk,kexp ⁣(A,Δ(y^,y)/γ),L_{\mathrm{shape}}(\hat y,y) = DTW_\gamma(\hat y,y) = -\gamma \log \sum_{A\in\mathcal A_{k,k}} \exp\!\bigl(-\langle A,\Delta(\hat y,y)\rangle/\gamma\bigr),8. The encoder is a 4-layer convolutional network and the decoder is FC plus transposed-CNN, trained by Lshape(y^,y)=DTWγ(y^,y)=γlogAAk,kexp ⁣(A,Δ(y^,y)/γ),L_{\mathrm{shape}}(\hat y,y) = DTW_\gamma(\hat y,y) = -\gamma \log \sum_{A\in\mathcal A_{k,k}} \exp\!\bigl(-\langle A,\Delta(\hat y,y)\rangle/\gamma\bigr),9. Second, a temporal feature extractor γ>0\gamma>00, consisting of Transformer blocks and a 2-layer MLP, is trained to match the frozen image encoder by minimizing γ>0\gamma>01. The forecasting loss then uses

γ>0\gamma>02

The total SATL is

γ>0\gamma>03

with reported robust settings γ>0\gamma>04, γ>0\gamma>05, γ>0\gamma>06. The supplied implementation notes that one often adds a vanilla MSE term, yielding

γ>0\gamma>07

Pretraining of the perceptual modules is reported as 30 epochs for the autoencoder and 10 epochs for the temporal feature extractor, with learning rate γ>0\gamma>08 using Adam and batch size γ>0\gamma>09. The added training-time cost is reported as approximately Δ\Delta0 on an RTX4090, while inference incurs no additional cost because the perceptual modules are used only during training (Yu et al., 31 Jul 2025).

5. Reported empirical behavior

The DILATE papers report experiments on synthetic step functions, ECG5000 waveform forecasting, and traffic occupancy forecasting, using both a fully connected MLP and a Seq2Seq-GRU, and comparing against MSE, soft-DTW, LSTNet, and TT-RNN. The supplied summary states that DILATE dramatically improves DTW and TDI relative to MSE while matching or slightly trading off MSE, and that it matches soft-DTW on shape while substantially improving temporal alignment and MSE. For the synthetic Δ\Delta1 task under a Seq2Seq model, the reported MSE values are Δ\Delta2 for the MSE-loss model, Δ\Delta3 for the soft-DTW-loss model, and Δ\Delta4 for DILATE; the broader conclusion given in the supplied text is that DILATE is advantageous on shape and time metrics rather than pure MSE (Guen et al., 2019).

The 2025 SATL is evaluated on eight standard long-range forecasting benchmarks—ETTh1, ETTh2, ETTm1, ETTm2, Weather, Exchange, Electricity, and ILI—using TimeMixer, PatchTST, TimesNet, and Autoformer as backbones. The supplied report states that SATL-trained models uniformly improve both MSE and TGSI. On ETTh2 with TimeMixer, the reported comparison is MSE Δ\Delta5 and TGSI Δ\Delta6. Averaged over all settings, the reported gains are MSE Δ\Delta7 and TGSI Δ\Delta8 (Yu et al., 31 Jul 2025).

An ablation study on ETTh1 with a PatchTST backbone and horizon Δ\Delta9 is reported as follows (Yu et al., 31 Jul 2025):

Configuration MSE TGSI
All SATL comps + MSE 0.469 0.5944
y^iyj22\| \hat y_i-y_j\|_2^20MSE-term (only SATL) 0.515 0.5695
y^iyj22\| \hat y_i-y_j\|_2^21Perceptual 0.478 0.5880
y^iyj22\| \hat y_i-y_j\|_2^22Freq. 0.557 0.5338
y^iyj22\| \hat y_i-y_j\|_2^23Diff. 0.506 0.5790
Pure MSE baseline 0.470 0.5906

These results are accompanied by the claim that removing any component degrades performance, especially the frequency or the MSE term for long horizons. A plausible implication is that the three SATL components in the 2025 formulation play materially different roles: local slope preservation, dominant periodic structure recovery, and feature-space approximation of geometric similarity.

6. Relation to other shape-aware objectives and recurrent points of confusion

The supplied literature makes clear that not all shape-aware forecasting losses encode the same invariances. TILDE-Q defines shape-awareness through three explicitly transformation-invariant components: amplitude shifting y^iyj22\| \hat y_i-y_j\|_2^24, phase shifting y^iyj22\| \hat y_i-y_j\|_2^25, and uniform amplitude scaling. Its loss combines a softmax-based amplitude-shift term, a Fourier-magnitude phase term, and a normalized-autocorrelation amplitude term, with the stated goal that two signals differing only by constant vertical or temporal shift should be treated as very similar (Lee et al., 2022).

This differs materially from DILATE-style SATL. DILATE does not make phase shifts cost-free; rather, it introduces y^iyj22\| \hat y_i-y_j\|_2^26 specifically to penalize off-diagonal matches in the alignment path, so temporal displacement is treated as error even when the global shape is preserved (Guen et al., 2021). The 2025 SATL differs again: it does not use DTW at all, but instead approximates image-based geometric structure with first-order differences, spectral matching, and an aligned perceptual feature space (Yu et al., 31 Jul 2025).

The comparative evidence in the supplied material reflects these differences. TILDE-Q reports consistent average reductions of y^iyj22\| \hat y_i-y_j\|_2^27 in MSE and y^iyj22\| \hat y_i-y_j\|_2^28 in MAE across eight modern architectures and seven real datasets when replacing MSE, and reports that on synthetic abrupt-change data it outperforms both MSE and DILATE in MSE, DTW, TDI, and LCSS metrics. The same source states that qualitative plots show DILATE can be misled by DTW’s noise-sensitivity, whereas TILDE-Q’s combined invariances yield visually crisper forecasts (Lee et al., 2022).

Several practical limitations also recur. DILATE-style SATL has y^iyj22\| \hat y_i-y_j\|_2^29 dynamic-programming cost, requires care with numerical stability, and can exhibit degenerate behavior when γ0\gamma\to 00 is pushed toward the endpoints; too large a γ0\gamma\to 01 makes the shape term nearly γ0\gamma\to 02-like, while too small a γ0\gamma\to 03 risks underflow or overflow (Guen et al., 2019). The 2025 SATL avoids DTW but introduces pretraining stages, a handcrafted vertical-expansion image mapping, and about γ0\gamma\to 04 additional training time; its own discussion identifies extension to multivariate cross-variable structure and anomaly-detection settings as future directions (Yu et al., 31 Jul 2025).

Taken together, these formulations indicate that SATL is best understood as a design family for forecasting losses that privilege structural fidelity. This suggests that the decisive question is not whether a method is “shape-aware” in the abstract, but which distortions it is intended to ignore, which it is intended to penalize, and which representation—warping path, Fourier spectrum, autocorrelation profile, or learned perceptual embedding—it uses to encode temporal structure.

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 Shape-Aware Temporal Loss (SATL).