A Comprehensive Comparative Study of Quick Invariant Signature (QIS), Dynamic Time Warping (DTW), and Hybrid QIS + DTW for Time Series Analysis
Abstract
:1. Introduction
- We developed a novel adaptation of QIS for time series analysis, including the implementation of Toric QIS, which accounts for periodic boundary conditions in cyclic signals.
- We introduced a hybrid similarity measure that optimally balances QIS and DTW, using an empirically tuned weighting factor to enhance classification performance.
- We evaluated our approach on real-world time series datasets, including ECG5000 from the UCR archive and seismic activity records, demonstrating improved robustness and interpretability compared to the existing methods.
- We conducted a comparative analysis against DTW, FastDTW, shapelet-based learning, and MLP classifiers, providing empirical evidence of QIS’s advantages in low-data and high-variability settings.
2. Literature Review
2.1. Overview of Time Series Similarity Measures
2.1.1. Distance-Based Approaches
2.1.2. Feature-Based Approaches
2.1.3. Deep Learning-Based Methods
2.2. Quick Invariant Signature (QIS) in Time Series Analysis
2.3. Related Work on Hybrid Approaches
2.4. Research Gaps and Contributions
- Incorporates the QIS for shape-based feature extraction, capturing structural relationships in time series data.
- Utilizes DTW for sequence alignment, ensuring robustness to time shifts and distortions.
- Combines both methods into a weighted hybrid similarity measure, balancing structural and alignment-based information.
- Evaluates performance across multiple real-world datasets, including ECG and seismic signals, demonstrating its effectiveness in diverse scenarios.
3. Materials and Methods
3.1. Quick Invariant Signature (QIS) for Time Series Analysis
3.1.1. Background and Motivation
3.1.2. Extraction of the QIS from a Time Series
- Step 1: preprocessing the time series.
- Each time series was first normalized to ensure scale invariance. We applied Z-score normalization, as shown in Equation (1).
- Step 2: identifying the key active points (peaks and troughs).
- We extracted structural points by detecting local maxima and minima using a peak detection algorithm (e.g., scipy.signal.find_peaks).
- Only prominent peaks and troughs (above a defined threshold) were retained.
- Step 3: computing geometric relationships.
- For every pair of active points , we computed two structural features:
- ○
- Slope (): represents the angle between two points, capturing the relative orientation. The slope computation is shown in Equation (2).
- ○
- Length (): measures the Euclidean distance between points, reflecting their spatial separation. The Euclidean distance computation is shown in Equation (3).
- Step 4: quantizing the signature.
- GET-SGN-TT(p, q, n)
- Step 5: handling periodic time series with toric QIS.
- Many real-world time series, such as biomedical signals and seasonal data, exhibit cyclic properties.
- We introduced an adaptation of the toric QIS with the following features:
- ○
- Wraparound connections formed for the points near the boundaries of the time series.
- ○
- The first and last points (with no limit) were treated as neighbors to preserve continuity.
3.2. Dynamic Time Warping (DTW) as a Baseline
3.2.1. DTW Fundamentals
3.2.2. DTW Algorithm
- 1.
- Define a cost matrix where each entry represents the distance between points and , as shown in Equation (4).
- 2.
- Compute the cumulative cost matrix recursively as shown in Equation (5).
- 3.
- The optimal warping path is found by backtracking from .
3.3. Hybrid QIS + DTW: Integrating Structure with Alignment
3.3.1. Motivation for Hybridization
3.3.2. Computing Hybrid Similarity
3.4. Datasets Used
3.4.1. ECG5000 Dataset
3.4.2. Seismic Dataset
3.4.3. Synthetic Sinusoidal Data
3.5. Evaluation Metrics
- Classification accuracy: measures correct predictions.
- Precision and recall: measure model reliability.
- F1-score: balances precision and recall.
- Noise robustness: tests method stability under noise injection.
- Computational efficiency: measures runtime performance.
4. Results
4.1. Dynamic Time Warping (DTW) and FastDTW
4.2. Shapelet-Based and MLP Classifiers
4.3. Hybrid QIS + DTW
- For each sample in the test set, toric QIS signatures were extracted.
- For each pair of points , the DTW distance between the points was computed.
- For each pair of test samples, the QIS method was applied to compute the cosine similarity between their toric QIS signatures extracted in Step 1.
- The hybrid similarity score (HS) was computed based on the proposed Equation (6).
- For each pair of test samples, if HS > 0.85, they were marked as the same class (1); otherwise, they were detected as a different class (0).
- Finally, the predicted labels were compared against the true class labels using the evaluation metrics.
4.4. Comparative Performance on Datasets
4.4.1. Performance on the ECG5000 Dataset
4.4.2. Performance on the Seismic Dataset
4.4.3. Noise Robustness Analysis
4.4.4. Performance on Compressed Time Series
5. Discussion
5.1. Why Hybrid QIS + DTW Is Effective
- Unlike standalone DTW, which relies on point-to-point alignment, the QIS extracts shape-based features, improving generalization to similar but temporally shifted patterns. This combines structure and alignment.
- The QIS reduces sensitivity to minor distortions in the signal, making the approach more resilient to variations such as background noise in ECG data.
- Unlike MLP and other deep learning models that require large amounts of labeled data, QIS + DTW can work effectively without extensive supervised training.
- Compared to deep learning-based approaches, which require multiple layers of feature extraction and extensive training, QIS + DTW remains efficient while delivering comparable results. This allows for real-time applications.
- The method has shown promising results in biomedical signal processing (ECG classification), seismic activity detection, and synthetic signal analysis, proving its broad applicability.
5.2. Limitations
5.3. Future Work
6. Conclusions
Supplementary Materials
Author Contributions
Funding
Data Availability Statement
Conflicts of Interest
References
- de Chazal, P.; O’Dwyer, M.; Reilly, R.B. Automatic classification of heartbeats using ECG morphology and heartbeat interval features. IEEE Trans. Biomed. Eng. 2004, 51, 1196–1206. [Google Scholar] [CrossRef] [PubMed]
- Sakoe, H.; Chiba, S. Dynamic programming algorithm optimization for spoken word recognition. IEEE Trans. Acoust. Speech Signal Process. 1978, 26, 43–49. [Google Scholar] [CrossRef]
- Salvador, S.; Chan, P. Toward accurate dynamic time warping in linear time and space. Intell. Data Anal. 2007, 11, 561–580. [Google Scholar] [CrossRef]
- Wang, Z.; Yan, W.; Oates, T. Time series classification from scratch with deep neural networks: A strong baseline. In Proceedings of the 2017 International Joint Conference on Neural Networks (IJCNN), Anchorage, AK, USA, 14–19 May 2017; IEEE: Piscataway, NJ, USA; pp. 1578–1585. [Google Scholar]
- Ye, L.; Keogh, E. Time series shapelets: A new primitive for data mining. In Proceedings of the 15th ACM SIGKDD International Conference on Knowledge Discovery and Data Mining, Paris, France, 28 June 28–1 July 2009; pp. 947–956. [Google Scholar]
- Lin, J.; Keogh, E.; Lonardi, S.; Chiu, B. A symbolic representation of time series, with implications for streaming algorithms. Proc. ACM SIGMOD Workshop 2003, 2–11. [Google Scholar] [CrossRef]
- Mallat, S. A Wavelet Tour of Signal Processing; Elsevier: Amsterdam, The Netherlands, 1999. [Google Scholar]
- Shahbazkia, H.; dos Anjos, A. Quick invariant signature extraction from binary images. In Proceedings of the IEEE International Symposium on Signal Processing and Information Technology (ISSPIT), Ajman, United Arab Emirates, 14–17 December 2009; pp. 172–177. [Google Scholar]
- Hochreiter, S.; Schmidhuber, J. Long short-term memory. Neural Comput. 1997, 9, 1735–1780. [Google Scholar] [CrossRef] [PubMed]
- Vaswani, A.; Shazeer, N.; Parmar, N.; Uszkoreit, J.; Jones, L.; Gomez, A.N.; Polosukhin, I. Attention is all you need. Adv. Neural Inf. Process. Syst. 2017, 30. [Google Scholar]
- Fawaz, H.I.; Forestier, G.; Weber, J.; Idoumghar, L.; Müller, P.-A. Deep learning for time series classification: A review. Data Min. Knowl. Discov. 2018, 33, 917–963. [Google Scholar] [CrossRef]
- Fawaz, H.I.; Lucas, B.; Forestier, G.; Pelletier, N.; Schmidt, D.F.; Weber, J.; Müller, P.-A. InceptionTime: Finding AlexNet for time series classification. In Proceedings of the 2019 IEEE International Conference on Big Data (Big Data), Los Angeles, CA, USA, 9–12 December 2019; IEEE: Piscataway, NJ, USA; pp. 1–10. [Google Scholar]
- Lim, B.; Arik, S.O.; Loeff, N.; Pfister, T. Temporal fusion transformers for interpretable multi-horizon time series forecasting. Int. J. Forecast. 2020, 37, 1748–1764. [Google Scholar] [CrossRef]
- Zerveas, C.; Jayaraman, S.; Patel, D.; Wang, L.; Anandkumar, A. Transformers for time series classification. In Proceedings of the International Conference on Learning Representations (ICLR), Virtual, 3–7 May 2021. [Google Scholar]
- Akkermans, V.; Rodet, X.; Jaillet, F. Sparse approximation of sound signals using learned dictionaries and continuous relaxation. In Proceedings of the 2009 IEEE International Conference on Acoustics, Speech and Signal Processing, Taipei, Taiwan, 19–24 April 2009; IEEE: Piscataway, NJ, USA; pp. 1–4. [Google Scholar]
- Madan, P.; Singh, V.; Singh, D.P.; Diwakar, M.; Pant, B.; Kishor, A. A Hybrid Deep Learning Approach for ECG-Based Arrhythmia Classification. Bioengineering 2022, 9, 152. [Google Scholar] [CrossRef] [PubMed] [PubMed Central]
- Saeedi, S.; Giusti, A. Anomaly Detection for Industrial Inspection using Convolutional Neural Networks. In Proceedings of the 17th International Joint Conference on Computer Vision, Imaging and Computer Graphics Theory and Applications (VISAPP), Virtual, 6–8 February 2022; pp. 107–114. [Google Scholar]
Alpha (α) | Accuracy | F1-Score | Precision | Recall |
---|---|---|---|---|
0.5 | 0.86 | 0.84 | 0.82 | 0.85 |
0.55 | 0.87 | 0.85 | 0.84 | 0.86 |
0.6 | 0.89 | 0.87 | 0.86 | 0.88 |
0.65 | 0.9 | 0.89 | 0.88 | 0.9 |
0.7 | 0.92 | 0.91 | 0.9 | 0.92 |
0.75 | 0.91 | 0.9 | 0.89 | 0.91 |
0.8 | 0.9 | 0.89 | 0.88 | 0.9 |
0.85 | 0.89 | 0.87 | 0.86 | 0.88 |
0.9 | 0.88 | 0.86 | 0.85 | 0.87 |
Method | Accuracy | Precision | Recall | F1-Score |
---|---|---|---|---|
DTW | 0.86 | 0.88 | 0.83 | 0.85 |
FastDTW | 0.87 | 0.89 | 0.84 | 0.86 |
Shapelet-based classifier | 0.91 | 0.92 | 0.89 | 0.91 |
MLP classifier | 0.94 | 0.95 | 0.92 | 0.94 |
Hybrid QIS + DTW (toric QIS) | 0.93 | 0.94 | 0.91 | 0.92 |
Method | Accuracy | Precision | Recall | F1-Score |
---|---|---|---|---|
DTW | 0.83 | 0.85 | 0.8 | 0.83 |
FastDTW | 0.84 | 0.86 | 0.81 | 0.84 |
Shapelet-based classifier | 0.88 | 0.9 | 0.87 | 0.88 |
MLP classifier | 0.92 | 0.94 | 0.91 | 0.92 |
Hybrid QIS + DTW (toric QIS) | 0.9 | 0.91 | 0.89 | 0.9 |
Method | Noise level | Accuracy |
---|---|---|
DTW | 5% | 0.84 |
10% | 0.81 | |
20% | 0.75 | |
Hybrid QIS + DTW | 5% | 0.88 |
10% | 0.86 | |
20% | 0.82 |
Method | Compression Ratio | Accuracy |
---|---|---|
DTW | 0.8× | 0.85 |
0.5× | 0.78 | |
Hybrid QIS + DTW | 0.8× | 0.89 |
0.5× | 0.85 |
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content. |
© 2025 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (https://creativecommons.org/licenses/by/4.0/).
Share and Cite
Shahbazkia, H.R.; Khosravani, H.R.; Pulatov, A.; Hajimani, E.; Kiazadeh, M. A Comprehensive Comparative Study of Quick Invariant Signature (QIS), Dynamic Time Warping (DTW), and Hybrid QIS + DTW for Time Series Analysis. Mathematics 2025, 13, 999. https://doi.org/10.3390/math13060999
Shahbazkia HR, Khosravani HR, Pulatov A, Hajimani E, Kiazadeh M. A Comprehensive Comparative Study of Quick Invariant Signature (QIS), Dynamic Time Warping (DTW), and Hybrid QIS + DTW for Time Series Analysis. Mathematics. 2025; 13(6):999. https://doi.org/10.3390/math13060999
Chicago/Turabian StyleShahbazkia, Hamid Reza, Hamid Reza Khosravani, Alisher Pulatov, Elmira Hajimani, and Mahsa Kiazadeh. 2025. "A Comprehensive Comparative Study of Quick Invariant Signature (QIS), Dynamic Time Warping (DTW), and Hybrid QIS + DTW for Time Series Analysis" Mathematics 13, no. 6: 999. https://doi.org/10.3390/math13060999
APA StyleShahbazkia, H. R., Khosravani, H. R., Pulatov, A., Hajimani, E., & Kiazadeh, M. (2025). A Comprehensive Comparative Study of Quick Invariant Signature (QIS), Dynamic Time Warping (DTW), and Hybrid QIS + DTW for Time Series Analysis. Mathematics, 13(6), 999. https://doi.org/10.3390/math13060999