---
title: Time Series Geometric Structure Index
url: https://www.emergentmind.com/topics/time-series-geometric-structure-index-tgsi
type: topic
---

# Time Series Geometric Structure Index

Searching arXiv for the cited TGSI paper and closely related work to ground the article in current literature.
arXiv search query: "2507.23253 Towards Measuring and Modeling Geometric Structures in Time Series Forecasting via Image Modality"
The Time Series Geometric Structure Index (TGSI) is a metric for quantifying geometric or structural similarity between time series by transforming each series into a grayscale image and then computing an SSIM-inspired similarity score on the resulting two-dimensional representations. It was introduced to address a specific limitation of point-wise forecasting metrics: Mean Squared Error (MSE) and Mean Absolute Error (MAE) compare values at each time step, but they do not evaluate how those values connect to form temporal shapes. TGSI is therefore intended as a complement to numerical accuracy measures, with the explicit goal of capturing temporal geometry through image modality [2507.23253].

## 1. Motivation and problem formulation

The central motivation for TGSI is that conventional forecasting evaluation is largely point-wise. Metrics such as MSE or MAE quantify local deviations, but they ignore whether a forecast preserves periodicity, trend morphology, or other geometric aspects of temporal evolution. The underlying claim is not that point-wise errors are uninformative, but that they are incomplete when structural fidelity is important [2507.23253].

A canonical illustration is the toy example in which \(y\) is a noisy periodic series, \(x_1\) is \(y\) shifted vertically with different noise, and \(x_2\) is the zero series. Both pairs \((y,x_1)\) and \((y,x_2)\) have identical MSE, approximately \(0.79\), even though \(x_1\) clearly shares more of \(y\)'s periodic shape. TGSI was proposed precisely to separate these cases by evaluating the geometry of the curve traced by the series rather than only the value discrepancy at aligned time indices [2507.23253].

The same motivation is used to distinguish TGSI from Dynamic Time Warping and related \(L_p\)-based losses. In the formulation accompanying TGSI, such methods still operate in one dimension and therefore cannot fully capture two-dimensional geometric patterns. The proposed remedy is to embed a univariate time series into an image, with time on the horizontal axis and amplitude on the vertical axis, and then assess structural similarity in that image domain [2507.23253].

## 2. Formal definition

After transforming two series \(x\) and \(y\) into grayscale images \(x_{\mathrm{img}}, y_{\mathrm{img}} \in [0,L]^{H \times W}\), TGSI is defined in direct analogy to the Structural Similarity Index (SSIM), but with the contrast term omitted. The required image statistics are the means \(\mu_x,\mu_y\), standard deviations \(\sigma_x,\sigma_y\), and covariance \(\sigma_{xy}\) of the two images [2507.23253].

The constants are
\[
C_1 = (K_1L)^2,\qquad K_1=0.01,
\]
and
\[
C_2 = \frac{(K_2L)^2}{2},\qquad K_2=0.03.
\]

The luminance component is
\[
l(x,y) = \frac{2\mu_x\mu_y + C_1}{\mu_x^2 + \mu_y^2 + C_1},
\]
and the covariance component is
\[
s(x,y) = \frac{\sigma_{xy} + C_2}{\sigma_x\sigma_y + C_2}.
\]

TGSI is then
\[
\mathrm{TGSI}(x,y)=l(x,y)\times s(x,y)\in(-1,1].
\]

Higher TGSI indicates greater geometric or structural similarity of the underlying time-series shapes. The omission of the contrast term is deliberate: in the accompanying analysis, vertical variance is fixed by the decay kernel used in the image construction, so a separate contrast measure is treated as redundant [2507.23253].

## 3. Time-series-to-image mapping

The time-series-to-image mapping is the defining design choice behind TGSI. Each sequence is first normalized independently to \([0,1]\):
\[
\tilde{v}(t)=\frac{v(t)-v_{\min}}{v_{\max}-v_{\min}},\qquad t=1\ldots T.
\]
This normalization ensures consistent mapping across sequences [2507.23253].

The image canvas has width \(W=T\), so that each time step occupies one column, and a fixed height \(H\), with \(H=200\) given as an example. Pixel values lie in \([0,L]\), usually with \(L=255\). For each time index \(t\), the method activates the pixel at row \(y=\lfloor \tilde{v}(t)\cdot H\rfloor\) and column \(t\) with intensity \(L\). This creates a one-pixel-wide ridge corresponding to the sampled time series [2507.23253].

A vertical expansion, or thickening, is then applied. Around each activated pixel, the representation extends by \(\pm d\) rows using a one-dimensional vertical decay kernel. If
\[
\Delta y = \left|\mathrm{row}-\lfloor \tilde{v}(t)H\rfloor\right| \le d,
\]
the intensity is
\[
L\cdot \left(1-\frac{\Delta y}{d}\right).
\]
The resulting image is described as a “probability-like” two-dimensional map whose bright ridge traces the original series. Optional uniform down-sampling can be applied before computing covariances to compensate for the effects of vertical thickening [2507.23253].

This construction is essential to the metric’s interpretation. TGSI does not compare sequences directly in value space; it compares geometric traces in image space after a controlled rasterization and smoothing procedure [2507.23253].

## 4. Parameters and theoretical behavior

The principal design parameters are image height \(H\), vertical half-width \(d\), and pixel dynamic range \(L\). In the reported experiments, \(H=200\) and \(

Source: https://www.emergentmind.com/topics/time-series-geometric-structure-index-tgsi