Composite Gramian Angular Field for Time-Series Classification
Pero Bogunović, Saša Mladenović, Andrina GranićGramian Angular Field (GAF) encodings transform time series into two-dimensional images suitable for convolutional neural network (CNN) classification. Existing applications typically use either the Gramian Angular Summation Field (GASF) or the Gramian Angular Difference Field (GADF) independently, although these two encodings capture complementary pairwise angular relationships. This paper proposes the Composite Gramian Angular Field (CGAF), a single-image time-series representation obtained by a weighted algebraic combination of the summation and difference GAF components. The weights are optimised using coarse grid search followed by Gaussian-process Bayesian refinement, with all candidate evaluation restricted to training-only inner validation partitions. The selected weights are frozen before held-out test evaluation. CGAF produces a single encoded output image (approximately 0.08 MB, compared with approximately 0.16 MB for retaining separate GASF and GADF images) and encodes at 5.9±0.3 ms per sample. We evaluate CGAF in three domain-specific settings—EEG cognitive engagement, PTB-DB heartbeat classification, and FordA automotive fault detection—and on a selected subset of 20 datasets from the UCR Time Series Classification Archive. The method is compared with GASF, GADF, recurrence plots, spectrogram-based encodings, and non-image time-series baselines including SVM, ResNet-1D, InceptionTime, and ROCKET. On the evaluated datasets, CGAF consistently improves over the individual GASF and GADF encodings. It achieves macro-F1 =0.867±0.027 on the EEG pilot study, heartbeat-segment-level macro-F1 =0.941±0.018 on PTB-DB, and test accuracy =91.2% on FordA. Because patient identifiers are unavailable for PTB-DB, that result does not establish patient-level generalisation. On the selected UCR subset, CGAF outperforms both GASF and GADF on all 20 datasets. It achieves the best overall accuracy among all evaluated methods on 14 of 20 datasets, whereas ROCKET achieves the best overall accuracy on the remaining six datasets. The results suggest that algebraic integration of summation-based and difference-based angular dependencies can improve image-based time-series classification without modifying the CNN backbone or adding gradient-trained parameters. The EEG results should be interpreted as pilot evidence, whereas broader generalisation requires evaluation on the full UCR/UEA archive, additional biomedical cohorts, and further backbone architectures.