Patch-Level Contrastive Learning for Improved Time Series Classification with Gramian Angular Field

  • Abstract
  • Literature Map
  • Similar Papers
Abstract
Translate article icon Translate Article Star icon
Take notes icon Take Notes

Time series classification (TSC) presents significant challenges in data analytics and plays an essential role in industries such as manufacturing, healthcare, and finance. Existing research has utilized sequence models, such as long short-term memory (LSTM) and transformers, to achieve high performance; however, these models fail to fully address the inherent challenges of capturing long-term dependencies in time series data. Recently, efforts have been made to overcome these limitations by processing time series data through conversion into images. One such method, the Gramian Angular Field (GAF), converts time series data into images that visually represent the relationship between time points, effectively capturing global trends that traditional sequence models often miss. However, single-modality approaches, which rely on only one representation of time series data, still face limitations in comprehensively capturing the diverse features of a time series. Additionally, existing multi-modality approaches may overlook the detailed features between time points. To address these issues, this article proposes a patch-level hybrid contrastive learning model that combines transformer with Vision Transformer (ViT). The proposed model converts a one-dimensional time series into GAF images and leverages contrastive learning to robustly learn fine-grained features. This enables the model to effectively capture both temporal relationships between time points and spatial relationships between patches, thereby enhancing its generalization capabilities. Experimental results demonstrate that the proposed model outperforms the existing methods on the UCR TSC dataset. This shows that the model can overcome the limitations of single-modality approaches by integrating the complex structural features of time series data through a multi-modality framework, ultimately leading to improved classification performance. This approach provides a new avenue for enhancing TSC and holds promise for applications across various industries.

Similar Papers
  • Conference Article
  • 10.12783/shm2023/36882
NOVEL APPROACH FOR IMAGING TIME SERIES FOR THE IMPROVEMENT OF CLASSIFICATION RESULTS “GRAYSCALE FINGERPRINT FEATURES FIELD IMAGING (G3FI)”
  • Sep 12, 2023
  • Hammoud Al Joumaa

The remarkable successes achieved by Deep Learning (DL) in computer vision drew the attention of researchers to exploit this capability to apply it for the processing of time series and multivariate data. Thus, researcher began the development of suitable methods to transform time series signals into, images to enable the use of DL techniques to improve the classification of time series data. The most state-of-art techniques are Recurrence Plot (RP), Gramian Angular Field (GAF), or Markov Transition Field (MTF). These techniques transform each time series into RGB image. In this paper, a new transformation technique of time series and multivariate data to images technique is proposed. This technique is called <Grayscale Fingerprint Features Field Imaging" (G3FI). The main differences between this technique and state-of-art techniques are: a) the resulted image is a grayscale; b) the size of the resulted image is much smaller than the size of resulted images using state-of-art techniques. These differences provide the proposed technique with several advantages over the prior art, as it (a) results in avoiding redundant information and (b) noise, and (c) leads to a significant reduction in the required computational power. For the proof of concept, a dataset "Sonar, Mines vs. Rocks" is investigated and individually transformed using RP, GAF, and MTF, and the new developed technique "G3FI". The resulted images from each transformer are individually used to train and test Convolutional Neural Networks (CNN). The proposed method leads to competitive results in comparison to RP, GAF, and MTF.

  • PDF Download Icon
  • Research Article
  • Cite Count Icon 3
  • 10.1155/2020/8885625
A Novel Long- and Short-Term Memory Network with Time Series Data Analysis Capabilities
  • Oct 13, 2020
  • Mathematical Problems in Engineering
  • Mu Qiao + 1 more

Time series data are an extremely important type of data in the real world. Time series data gradually accumulate over time. Due to the dynamic growth in time series data, they tend to have higher dimensions and large data scales. When performing cluster analysis on this type of data, there are shortcomings in using traditional feature extraction methods for processing. To improve the clustering performance on time series data, this study uses a recurrent neural network (RNN) to train the input data. First, an RNN called the long short-term memory (LSTM) network is used to extract the features of time series data. Second, pooling technology is used to reduce the dimensionality of the output features in the last layer of the LSTM network. Due to the long time series, the hidden layer in the LSTM network cannot remember the information at all times. As a result, it is difficult to obtain a compressed representation of the global information in the last layer. Therefore, it is necessary to combine the information from the previous hidden unit to supplement all of the data. By stacking all the hidden unit information and performing a pooling operation, a dimensionality reduction effect of the hidden unit information is achieved. In this way, the memory loss caused by an excessively long sequence is compensated. Finally, considering that many time series data are unbalanced data, the unbalanced K-means (UK-means) algorithm is used to cluster the features after dimensionality reduction. The experiments were conducted on multiple publicly available time series datasets. The experimental results show that LSTM-based feature extraction combined with the dimensionality reduction processing of the pooling technology and cluster processing for imbalanced data used in this study has a good effect on the processing of time series data.

  • Research Article
  • 10.3390/app15052861
Multivariate Time Series Anomaly Detection Using Working Memory Connections in Bi-Directional Long Short-Term Memory Autoencoder Network
  • Mar 6, 2025
  • Applied Sciences
  • Xianghua Ding + 3 more

“Normal” events are characterized as data patterns or behaviors that align with expected operational conditions, while “anomalies” are defined as deviations from these patterns, potentially signaling faults, errors, or unexpected system behaviors. The timely and accurate detection of anomalies plays a critical role in domains such as industrial manufacturing, financial transactions, and other related domains. In the context of Industry 4.0, the proliferation of sensors has resulted in a massive influx of time series data, making the anomaly detection of such multivariate time series data a popular research area. Long Short-Term Memory (LSTM) has been extensively recognized as an effective framework for modeling and processing time series data. Previous studies have combined Bi-directional Long Short-Term Memory (Bi-LSTM) architecture with Autoencoder (AE) for multivariate time series anomaly detection. However, due to the inherent limitations of LSTM, Bi-LSTM-AE still cannot overcome these drawbacks. Our study replaces the LSTM units within the Bi-LSTM-AE architecture of existing research with Working Memory Connections for LSTM units and demonstrates that this architecture performs better in the field of multivariate time series anomaly detection compared to using standard LSTM units. The model we proposed not only outperforms the baseline models but also demonstrates greater robustness across various scenarios.

  • Conference Article
  • Cite Count Icon 1
  • 10.1109/cbms.2012.6266294
Symbolic representation and clustering of bio-medical time-series data using non-parametric segmentation and cluster ensemble
  • Jun 1, 2012
  • Hyokyeong Lee + 1 more

Representation of time series data is a fundamental problem that impacts data analysis in many problems of medicine and life sciences. Due to the inherent high dimensionality of time-series data, dimensionality reduction constitutes one of the important requirements for a successful representation. Piecewise aggregate approximation (PAA) of time series is a widely used approach in this context. In PAA, the time-series is represented as a set of points where each point is defined as the average of the original data points that it represents. Though highly promising, PAA requires estimating the number of segments required for the representation a priori. In this paper we propose a data driven method for optimally and non-parametrically segmenting a time-series. Instead of depending on a single estimation of the segments, we employ multiple methods and combine the results using an ensemble approach. This allows the proposed approach to be robust for different types of data. With difficult biomedical time series data sets, experimental results show that our method estimated the optimal segments correctly and achieved the highest accuracy in a number of unsupervised time-series classification tasks.

  • Research Article
  • 10.3390/axioms14070528
Fusion of Recurrence Plots and Gramian Angular Fields with Bayesian Optimization for Enhanced Time-Series Classification
  • Jul 10, 2025
  • Axioms
  • Maria Mariani + 2 more

Time-series classification remains a critical task across various domains, demanding models that effectively capture both local recurrence structures and global temporal dependencies. We introduce a novel framework that transforms time series into image representations by fusing recurrence plots (RPs) with both Gramian Angular Summation Fields (GASFs) and Gramian Angular Difference Fields (GADFs). This fusion enriches the structural encoding of temporal dynamics. To ensure optimal performance, Bayesian Optimization is employed to automatically select the ideal image resolution, eliminating the need for manual tuning. Unlike prior methods that rely on individual transformations, our approach concatenates RP, GASF, and GADF into a unified representation and generalizes to multivariate data by stacking transformation channels across sensor dimensions. Experiments on seven univariate datasets show that our method significantly outperforms traditional classifiers such as one-nearest neighbor with Dynamic Time Warping, Shapelet Transform, and RP-based convolutional neural networks. For multivariate tasks, the proposed fusion model achieves macro F1 scores of 91.55% on the UCI Human Activity Recognition dataset and 98.95% on the UCI Room Occupancy Estimation dataset, outperforming standard deep learning baselines. These results demonstrate the robustness and generalizability of our framework, establishing a new benchmark for image-based time-series classification through principled fusion and adaptive optimization.

  • Conference Article
  • 10.1109/ijcnn52387.2021.9533788
Adaptive Dila-DenseNet for Image based Time Series Classification in IoT
  • Jul 18, 2021
  • Qiao Jiang + 5 more

As a critical problem in time series data mining, time series classification (TSC) has always been a challenging task for high-dimensional and high-frequency time sequences in internet of things (IoT), Recently, convolutional neural networks (CNNs) have exhibited great superiority on TSC tasks in deep learning models, but not effective in capturing the long-term temporal dependency of time series. In this paper, we transform time series into GM-images by Gramian Angular Field (GAF) and Markov Transition Field (MTF), which can well preserve the temporal dependency and transition statistics of raw time series, respectively. We further propose an efficient Adaptive Dila-DenseNet (ADDN) to extract various and discernable patterns from GM-images for TSC. In ADDN, we devise an adaptive feature aggregation method for combining static and dynamic information flexibly from GAF and MTF representations. Moreover, inspired by the dilated residual networks, we design the Dila-Dense block in ADDN to preserve local spatial information for GM-images. The significant decrease of GM-images resolution in common deep learning models may lead to performance degradation. Nevertheless, our Dila-Dense block can address this resolution issue without decreasing the receptive field. Experiments evaluated on 24 benchmark datasets demonstrate that our approach shows greater efficiency and efficacy over the compared deep learning baselines, in IoT.

  • Research Article
  • 10.1371/journal.pone.0323689
Time-series visual representations for sleep stages classification.
  • May 21, 2025
  • PloS one
  • Rebeca Padovani Ederli + 4 more

Polysomnography is the standard method for sleep stage classification; however, it is costly and requires controlled environments, which can disrupt natural sleep patterns. Smartwatches offer a practical, non-invasive, and cost-effective alternative for sleep monitoring. Equipped with multiple sensors, smartwatches allow continuous data collection in home environments, making them valuable for promoting health and improving sleep habits. Traditional methods for sleep stage classification using smartwatch data often rely on raw data or extracted features combined with artificial intelligence techniques. Transforming time series into visual representations enables the application of two-dimensional convolutional neural networks, which excel in classification tasks. Despite their success in other domains, these methods are underexplored for sleep stage classification. To address this, we evaluated visual representations of time series data collected from accelerometer and heart rate sensors in smartwatches. Techniques such as Gramian Angular Field, Recurrence Plots, Markov Transition Field, and spectrograms were implemented. Additionally, image patching and ensemble methods were applied to enhance classification performance. The results demonstrated that Gramian Angular Field, combined with patching and ensembles, achieved superior performance, exceeding 82% balanced accuracy for two-stage classification and 62% for three-stage classification. A comparison with traditional approaches, conducted under identical conditions, showed that the proposed method outperformed others, offering improvements of up to 8 percentage points in two-stage classification and 9 percentage points in three-stage classification. These findings show that visual representations effectively capture key sleep patterns, enhancing classification accuracy and enabling more reliable health monitoring and earlier interventions. This study highlights that visual representations not only surpass traditional methods but also emerge as a competitive and effective approach for sleep stage classification based on smartwatch data, paving the way for future research.

  • Research Article
  • Cite Count Icon 2
  • 10.3390/s24196402
Extraction of Features for Time Series Classification Using Noise Injection
  • Oct 2, 2024
  • Sensors
  • Gyu Il Kim + 1 more

Time series data often display complex, time-varying patterns, which pose significant challenges for effective classification due to data variability, noise, and imbalance. Traditional time series classification techniques frequently fall short in addressing these issues, leading to reduced generalization performance. Therefore, there is a need for innovative methodologies to enhance data diversity and quality. In this paper, we introduce a method for the extraction of features for time series classification using noise injection to address these challenges. By employing noise injection techniques for data augmentation, we enhance the diversity of the training data. Utilizing digital signal processing (DSP), we extract key frequency features from time series data through sampling, quantization, and Fourier transformation. This process enhances the quality of the training data, thereby maximizing the model’s generalization performance. We demonstrate the superiority of our proposed method by comparing it with existing time series classification models. Additionally, we validate the effectiveness of our approach through various experimental results, confirming that data augmentation and DSP techniques are potent tools in time series data classification. Ultimately, this research presents a robust methodology for time series data analysis and classification, with potential applications across a broad spectrum of data analysis problems.

  • Book Chapter
  • 10.1007/978-981-19-6052-9_57
A Granule-Based Time Series Forecasting (TSF) Model for Underwater Combat with Missing Data
  • Jan 1, 2022
  • Jing Yang + 4 more

The observed data for underwater combat unit are time series data but with high uncertainty. In this paper, we develop a time series forecasting model with granular input space. Missing values are efficiently formed into granular space under the specificity and coverage criteria, and the time series matrix is fed to a model with 4-layer Long Short Term Memory (LSTM) and self-attention. We explore an efficient way of combining granular input space and LSTM-based structure. Both the criteria of forming granular input space and time series data representation are pre-defined. To avoid forgetting the previous information, self-attention mechanism is used for granular samples at the same time. We use data from a computer simulation case as well as public data sets to test our model, and experiments demonstrate that our granular data matrix with self-attention can boost the performance for movement forecasting with high accuracy. Granular input matrix is proved effective when we augment our granular LSTM-based structure.KeywordsGranular spaceMissing valuesSelf-attentionLSTMTime series forecasting

  • Research Article
  • Cite Count Icon 3
  • 10.1109/tpds.2014.2323056
Novel $\varepsilon$ -Approximation to Data Streams in Sensor Networks
  • Jun 1, 2015
  • IEEE Transactions on Parallel and Distributed Systems
  • Jianzhong Li + 2 more

We are gradually moving into a realm where sensors, processors, memory and wireless transceivers would be seamlessly integrated together in the physical world and form a wireless sensor network. Such networks pose new challenges in data processing and transmission due to the characteristic of limited communication bandwidth and other resource constraints of sensor networks. To reduce the cost of storage, transmission and processing of time series data generated by sensor nodes, the need for more compact representations of time series data is compelling. Although a large number of data compression algorithms have been proposed to reduce data volume, their offline characteristic or super-linear time complexity prevents them from being applied directly on time series data generated by sensor nodes. Motivated by these observations, we propose an optimal online algorithm GDPLA for constructing a disconnected piecewise linear approximation of a time series which guarantees that the vertical distance between each real data point and the corresponding fit line is less than or equal to $\varepsilon$ . GDPLA not only generates the minimum number of segments to approximate a time series with precision guarantee, but also only requires linear time $O(n)$ bounded by a constant coefficient $6$ , where unit $1$ denotes the time complexity of comparing the slopes of two lines. The low cost characteristic of our method makes it a proper choice for resource-constrained WSNs. Extensive experiments on two real data sets have been conducted to demonstrate the superior compression performance of our method.

  • Conference Article
  • Cite Count Icon 2
  • 10.1117/12.2574383
A study of the robustness of the long short-term memory classifier to cloudy time series of multispectral images
  • Sep 21, 2020
  • Iwona Podsiadlo + 1 more

Sentinel-2 and Landsat satellites provide huge amount of optical images with high spatial and temporal resolution. These dense Time Series (TS) of multispectral data are used for a wide range of applications enabling multi-temporal monitoring of physical phenomena. Nevertheless, one of the main challenges in their usage is related to missing information caused by cloud occlusions. In the literature, many cloud restoration approaches have been proposed. However, to properly recover missing information, sophisticated and usually computationally intensive techniques should be used. In this work, we consider the deep Long Short Term Memory (LSTM) classifier which is very promising for classification of dense time series of images, and investigate its robustness to the cloud presence without any cloud restoration. Indeed, this classifier has proven to be able to handle the presence of clouds. However, no work which extensively analyzes the robustness of LSTM to clouds can be found in the literature. In this study, we aim to quantitatively asses the capability of the network of handling different amount of cloud coverage under different lengths of the TS. In greater detail, we analyze the effect of the cloud coverage on the classification maps produced by the LSTM by considering: (i) simulated cloud values, (ii) detected clouds represented by zeros values, and (iii) restored images by simple linear temporal gap filling (i.e., average of the spectral values acquired in the previous and following cloud-free images in the TS). The obtained results demonstrate that the capability of the LSTM to handle the cloud cover depends on: (i) the length of the TS, (ii) the position of the cloudy images in the TS, and (iii) the cloud representation values. For example, when clouds are restored with very simple and fast linear temporal gap filling, the map agreement between the cloud-free and the cloudy map is 96% even when the 40% of images in the TS are covered with clouds, regardless of their position.

  • Research Article
  • Cite Count Icon 9
  • 10.1016/j.advengsoft.2024.103795
A two-step approach for damage identification in bridge structure using convolutional Long Short-Term Memory with augmented time-series data
  • Oct 19, 2024
  • Advances in Engineering Software
  • Lan Nguyen-Ngoc + 6 more

A two-step approach for damage identification in bridge structure using convolutional Long Short-Term Memory with augmented time-series data

  • Conference Article
  • Cite Count Icon 2
  • 10.1109/codit.2019.8820629
MACD-Histogram-based Fully Convolutional Neural Networks for Classifying Time Series
  • Apr 1, 2019
  • Shuichi Hashida + 1 more

With the widespread use of sensor devices, time series data have become ubiquitous. Therefore, many academic researchers and industrial practitioners have been conducting the development of analysis methods for time series. In particular, time series classification is one of the common tasks for time series analysis. Time series classification predicts the class label of a time series not having its class label. In the era of Internet of things (IoT), developing new models for classifying time series is a well-known grand challenge because time series classification is the most difficult problem in time series analysis and it covers many different application domains in IoT. This paper focuses on time series classifiers that employ deep learning techniques for univariate time series classification. Fully convolutional neural network (FCN) and hybrid models based on FCN are the most successful deep neural networks. In this paper, a new FCN-based model using the moving average convergence divergence (MACD) histogram is proposed. The MACD histogram can capture local features of the time series. In this study, our new model uses the MACD histogram, where the input of our proposed model is the MACD histogram. Moreover, to enhance the representation of an input layer representation, multi-channel input for the FCN model is proposed. In the multi-channel input, both values of a time series and the MACD histogram of the time series are input to the FCN model. Experiments were conducted using an actual time series benchmark datasets, which is the UCR Time Series Classification Archive with 85 different types of time series datasets. The experimental results show that the classification performance of the proposed model outperforms not only FCN but also FCN-LSTM.

  • Research Article
  • Cite Count Icon 12
  • 10.1186/s12874-024-02448-3
Effects of missing data imputation methods on univariate blood pressure time series data analysis and forecasting with ARIMA and LSTM
  • Dec 26, 2024
  • BMC Medical Research Methodology
  • Nicholas Niako + 3 more

BackgroundMissing observations within the univariate time series are common in real-life and cause analytical problems in the flow of the analysis. Imputation of missing values is an inevitable step in every incomplete univariate time series. Most of the existing studies focus on comparing the distributions of imputed data. There is a gap of knowledge on how different imputation methods for univariate time series affect the forecasting performance of time series models. We evaluated the prediction performance of autoregressive integrated moving average (ARIMA) and long short-term memory (LSTM) network models on imputed time series data using ten different imputation techniques.MethodsMissing values were generated under missing completely at random (MCAR) mechanism at 10%, 15%, 25%, and 35% rates of missingness using complete data of 24-h ambulatory diastolic blood pressure readings. The performance of the mean, Kalman filtering, linear, spline, and Stineman interpolations, exponentially weighted moving average (EWMA), simple moving average (SMA), k-nearest neighborhood (KNN), and last-observation-carried-forward (LOCF) imputation techniques on the time series structure and the prediction performance of the LSTM and ARIMA models were compared on imputed and original data.ResultsAll imputation techniques either increased or decreased the data autocorrelation and with this affected the forecasting performance of the ARIMA and LSTM algorithms. The best imputation technique did not guarantee better predictions obtained on the imputed data. The mean imputation, LOCF, KNN, Stineman, and cubic spline interpolations methods performed better for a small rate of missingness. Interpolation with EWMA and Kalman filtering yielded consistent performances across all scenarios of missingness. Disregarding the imputation methods, the LSTM resulted with a slightly better predictive accuracy among the best performing ARIMA and LSTM models; otherwise, the results varied. In our small sample, ARIMA tended to perform better on data with higher autocorrelation.ConclusionsWe recommend to the researchers that they consider Kalman smoothing techniques, interpolation techniques (linear, spline, and Stineman), moving average techniques (SMA and EWMA) for imputing univariate time series data as they perform well on both data distribution and forecasting with ARIMA and LSTM models. The LSTM slightly outperforms ARIMA models, however, for small samples, ARIMA is simpler and faster to execute.

  • Research Article
  • 10.7232/jkiie.2021.47.5.421
WaDGAN-AD를 이용한 전력 소비 패턴의 비지도 학습 기반 이상 탐지
  • Oct 15, 2021
  • Journal of the Korean Institute of Industrial Engineers
  • Hyeyeon Kim + 2 more

Anomaly detection in time series is essential because it can detect outlying patterns such as a breakdown in machines and fraudulent customers. Among many anomaly detection domains, detecting abnormal patterns in energy consumption is used to detect technical breakdown in factories, general buildings, or energy theft in households. To overcome the limitations of previous studies, this paper suggests WaDGAN-AD, which combines generative adversarial network (GAN) and Long Short-Term Memory (LSTM) and applies two structural improvements. WaDGAN-AD has stacked discriminator LSTM layers to more precisely learn feature representations of time series data. Also, it has different numbers of hidden units in each hidden layer of LSTM to consider multiple cycles appearing in a single time-series data. Experimental results based on synthetic datasets and real datasets show that WaDGAN-AD can better detect abnormal energy consumption than benchmark methods.

Save Icon
Up Arrow
Open/Close
  • Ask R Discovery Star icon
  • Chat PDF Star icon

AI summaries and top papers from 250M+ research sources.