Unsupervised Dynamic Time Warping Clustering for Robust Functional Network Identification in fNIRS Motor Tasks
Abstract
1. Introduction
2. Method
2.1. Dataset and Experimental Paradigm
2.2. fNIRS Data Acquisition
2.3. fNIRS Signal Preprocessing
2.3.1. Signal Quality Assessment and Data Reconstruction
2.3.2. Preprocessing Pipeline
2.4. Unsupervised DTW Clustering Analysis
2.4.1. DTW Distance Matrix Calculation
2.4.2. Hierarchical Clustering
2.5. Group-Level Probability Analysis
2.6. Comparative Validation and Statistical Analysis
- (1)
- Accuracy: Defined as the percentage of channels within the anatomically expected Region of Interest (ROI) that were correctly assigned to the “Active” cluster. The ROIs were defined based on the international 10–20 system [23]: C3/Left-Motor channels (Ch 4, 6, 8, 10) for Right Hand Tapping, C4/Right-Motor channels (Ch 14, 16, 18, 20) for Left Hand Tapping, and Cz/Medial-Motor channels (Ch 1, 2, 3, 11, 12, 13) for Foot Tapping.
- (2)
- Silhouette Score: A measure of cluster cohesion and separation used to validate the quality of the clustering partition [30]. It ranges from −1 to +1, where a higher value indicates that channels are well-matched to their own cluster and poorly matched to neighboring clusters.
3. Results
3.1. Grand Average Hemodynamic Responses Confirm Signal Quality
3.2. Clustering Analysis of a Representative Subject
3.3. Group-Level Analysis of Functional Networks
3.4. Comparative Validation Against Standard Benchmarks
4. Discussion
5. Conclusions
Funding
Institutional Review Board Statement
Informed Consent Statement
Data Availability Statement
Conflicts of Interest
References
- Chen, J.; Xia, Y.; Zhou, X.; Vidal Rosas, E.; Thomas, A.; Loureiro, R.; Cooper, R.J.; Carlson, T.; Zhao, H. fNIRS-EEG BCIs for Motor Rehabilitation: A Review. Bioengineering 2023, 10, 1393. [Google Scholar] [CrossRef] [PubMed]
- AlQahtani, N.J.; Al-Naib, I.; Althobaiti, M. Recent progress on smart lower prosthetic limbs: A comprehensive review on using EEG and fNIRS devices in rehabilitation. Front. Bioeng. Biotechnol. 2024, 12, 1454262. [Google Scholar] [CrossRef]
- Ferrari, M.; Quaresima, V. A brief review on the history of human functional near-infrared spectroscopy (fNIRS) development and fields of application. Neuroimage 2012, 63, 921–935. [Google Scholar] [CrossRef]
- Boas, D.A.; Elwell, C.E.; Ferrari, M.; Taga, G. Twenty Years of Functional Near-Infrared Spectroscopy: Introduction for the Special Issue. Neuroimage 2014, 85, 1–5. [Google Scholar] [CrossRef] [PubMed]
- Althobaiti, M.; Al-Naib, I. Recent developments in instrumentation of functional near-infrared spectroscopy systems. Appl. Sci. 2020, 10, 6522. [Google Scholar] [CrossRef]
- Uchitel, J.; Vidal-Rosas, E.E.; Cooper, R.J.; Zhao, H. Wearable, integrated EEG–FNIRS technologies: A review. Sensors 2021, 21, 6106. [Google Scholar] [CrossRef]
- Naseer, N.; Hong, K.-S. fNIRS-based brain-computer interfaces: A review. Front. Hum. Neurosci. 2015, 9, 3. [Google Scholar] [CrossRef] [PubMed]
- Bansal, D.; Mahajan, R. EEG-Based Brain-Computer Interfaces: Cognitive Analysis and Control Applications; Academic Press: London, UK, 2019. [Google Scholar]
- Fatourechi, M.; Bashashati, A.; Ward, R.K.; Birch, G.E. EMG and EOG artifacts in brain computer interface systems: A survey. Clin. Neurophysiol. 2007, 118, 480–494. [Google Scholar] [CrossRef]
- Pinti, P.; Tachtsidis, I.; Hamilton, A.; Hirsch, J.; Aichelburg, C.; Gilbert, S.; Burgess, P.W. The present and future use of functional near-infrared spectroscopy (fNIRS) for cognitive neuroscience. Ann. N. Y. Acad. Sci. 2020, 1464, 5–29. [Google Scholar] [CrossRef]
- Sitaram, R.; Zhang, H.; Guan, C.; Thulasidas, M.; Hoshi, Y.; Ishikawa, A.; Shimizu, K.; Birbaumer, N. Temporal classification of multichannel near-infrared spectroscopy signals of motor imagery for developing a brain-computer interface. Neuroimage 2007, 34, 1416–1427. [Google Scholar] [CrossRef]
- Power, S.D.; Kushki, A.; Chau, T. Towards a system-paced near-infrared spectroscopy brain-computer interface: Differentiating prefrontal activity due to mental arithmetic and mental singing from the no-control state. J. Neural Eng. 2011, 8, 066004. [Google Scholar] [CrossRef] [PubMed]
- Hwang, H.-J.; Choi, H.; Kim, J.-Y.; Chang, W.-D.; Kim, D.-W.; Kim, K.; Jo, S.; Im, C.-H. Toward more intuitive brain–computer interfacing: Classification of binary covert intentions using functional near-infrared spectroscopy. J. Biomed. Opt. 2016, 21, 091303. [Google Scholar] [CrossRef] [PubMed]
- Naseer, N.; Hong, M.J.; Hong, K.S. Online binary decision decoding using functional near-infrared spectroscopy for the development of brain-computer interface. Exp. Brain Res. 2014, 232, 555–564. [Google Scholar] [CrossRef]
- Shin, J.; Kwon, J.; Im, C.H. A ternary hybrid EEG-NIRS brain-computer interface for the classification of brain activation patterns during mental arithmetic, motor imagery, and idle state. Front. Neuroinform. 2018, 12, 5. [Google Scholar] [CrossRef]
- Fazli, S.; Mehnert, J.; Steinbrink, J.; Curio, G.; Villringer, A.; Müller, K.-R.; Blankertz, B. Enhanced performance by a hybrid NIRS-EEG brain computer interface. Neuroimage 2012, 59, 519–529. [Google Scholar] [CrossRef] [PubMed]
- Cockx, H.; Oostenveld, R.; Tabor, M.; Savenco, E.; van Setten, A.; Cameron, I.; van Wezel, R. fNIRS is sensitive to leg activity in the primary motor cortex after systemic artifact correction. Neuroimage 2023, 269, 119880. [Google Scholar] [CrossRef]
- Yücel, M.A.; Lühmann, A.V.; Scholkmann, F.; Gervain, J.; Dan, I.; Ayaz, H.; Boas, D.; Cooper, R.J.; Culver, J.; Elwell, C.E.; et al. Best practices for fNIRS publications. Neurophotonics 2021, 8, 012101. [Google Scholar] [CrossRef]
- Althobaiti, M.; AlQahtani, N.J.; Tamal, M. Dynamic time warping for enhanced fNIRS-based motor assessment during lower limb kinematics. Inform. Med. Unlocked 2025, 58, 101684. [Google Scholar] [CrossRef]
- Linke, A.; Mash, L.; Fong, C.; Kinnear, M.; Kohli, J.; Wilkinson, M.; Tung, R.; Keehn, R.J.; Carper, R.; Fishman, I.; et al. Dynamic time warping outperforms Pearson correlation in detecting atypical functional connectivity in autism spectrum disorders. Neuroimage 2020, 223, 117383. [Google Scholar] [CrossRef]
- Wiafe, S.-L.; Faghiri, A.; Fu, Z.; Miller, R.; Preda, A.; Calhoun, V.D. The dynamics of dynamic time warping in fMRI data: A method to capture inter-network stretching and shrinking via warp elasticity. Imaging Neurosci. 2024, 2, imag–2–00187. [Google Scholar] [CrossRef]
- Zhu, L.; Najafizadeh, L. Dynamic time warping-based averaging framework for functional near-infrared spectroscopy brain imaging studies. J. Biomed. Opt. 2017, 22, 066011. [Google Scholar] [CrossRef]
- Bak, S.; Park, J.; Shin, J.; Jeong, J. Open-access fNIRS dataset for classification of unilateral finger- and foot-tapping. Electronics 2019, 8, 1486. [Google Scholar] [CrossRef]
- Molavi, B.; Dumont, G.A. Wavelet-based motion artifact removal for functional near-infrared spectroscopy. Physiol. Meas. 2012, 33, 259–270. [Google Scholar] [CrossRef]
- Almulla, L.; Al-Naib, I.; Ateeq, I.S.; Althobaiti, M. Observation and motor imagery balance tasks evaluation: An fNIRS feasibility study. PLoS ONE 2022, 17, e0265898. [Google Scholar] [CrossRef]
- AlQahtani, N.J.; Al-Naib, I.; Ateeq, I.S.; Althobaiti, M. Hybrid Functional Near-Infrared Spectroscopy System and Electromyography for Prosthetic Knee Control. Biosensors 2024, 14, 553. [Google Scholar] [CrossRef]
- Almulla, L.; Al-Naib, I.; Althobaiti, M. Hemodynamic responses during standing and sitting activities: A study toward fNIRS-BCI. Biomed. Phys. Eng. Express 2020, 6, 055005. [Google Scholar] [CrossRef] [PubMed]
- Niu, H.; He, Y. Resting-state functional brain connectivity: Lessons from functional near-infrared spectroscopy. Neuroscientist 2014, 20, 173–188. [Google Scholar] [CrossRef]
- Duan, L.; Zhang, Y.J.; Zhu, C.Z. Quantitative comparison of resting-state functional connectivity derived from fNIRS and fMRI: A simultaneous recording study. Neuroimage 2012, 60, 2008–2018. [Google Scholar] [CrossRef] [PubMed]
- Rousseeuw, P.J. Silhouettes: A graphical aid to the interpretation and validation of cluster analysis. J. Comput. Appl. Math. 1987, 20, 53–65. [Google Scholar] [CrossRef]
- Scholkmann, F.; Kleiser, S.; Metz, A.J.; Zimmermann, R.; Mata Pavia, J.; Wolf, U.; Wolf, M. A review on continuous wave functional near-infrared spectroscopy and imaging instrumentation and methodology. Neuroimage 2014, 85, 6–27. [Google Scholar] [CrossRef]
- Plichta, M.; Herrmann, M.; Baehne, C.; Ehlis, A.-C.; Richter, M.; Pauli, P.; Fallgatter, A. Event-related functional near-infrared spectroscopy (fNIRS): Are the measurements reliable? Neuroimage 2006, 31, 116–124. [Google Scholar] [CrossRef] [PubMed]
- Leonardi, N.; Van De Ville, D. On spurious and real fluctuations of dynamic functional connectivity during rest. NeuroImage 2015, 104, 430–436. [Google Scholar] [CrossRef] [PubMed]





| Channel | Hemisphere | RHT Active Prob (%) | LHT Active Prob (%) | FT Active Prob (%) |
|---|---|---|---|---|
| Ch01 | Left | 53.3 | 40.0 | 83.3 |
| Ch02 | Left | 36.7 | 40.0 | 80.0 |
| Ch03 | Left | 60.0 | 43.3 | 76.7 |
| Ch04 | Left | 73.3 | 56.7 | 70.0 |
| Ch05 | Left | 60.0 | 43.3 | 53.3 |
| Ch06 | Left | 53.3 | 40.0 | 23.3 |
| Ch07 | Left | 83.3 | 63.3 | 53.3 |
| Ch08 | Left | 80.0 | 70.0 | 63.3 |
| Ch09 | Left | 70.0 | 50.0 | 43.3 |
| Ch10 | Left | 73.3 | 63.3 | 56.7 |
| Ch11 | Right | 56.7 | 56.7 | 70.0 |
| Ch12 | Right | 50.0 | 63.3 | 63.3 |
| Ch13 | Right | 46.7 | 56.7 | 66.7 |
| Ch14 | Right | 50.0 | 66.7 | 56.7 |
| Ch15 | Right | 23.3 | 50.0 | 33.3 |
| Ch16 | Right | 43.3 | 70.0 | 43.3 |
| Ch17 | Right | 63.3 | 76.7 | 46.7 |
| Ch18 | Right | 70.0 | 70.0 | 43.3 |
| Ch19 | Right | 66.7 | 76.7 | 43.3 |
| Ch20 | Right | 73.3 | 70.0 | 43.3 |
| Metric | Pearson (Benchmark) | DTW (Proposed) | p-Value |
|---|---|---|---|
| Accuracy (%) | 48.06 ± 16.59 | 53.17 ± 18.07 | 0.049 |
| Silhouette Score | 0.195 ± 0.065 | 0.128 ± 0.049 | 0.000 |
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. |
© 2026 by the author. 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.
Share and Cite
Althobaiti, M. Unsupervised Dynamic Time Warping Clustering for Robust Functional Network Identification in fNIRS Motor Tasks. Sensors 2026, 26, 1848. https://doi.org/10.3390/s26061848
Althobaiti M. Unsupervised Dynamic Time Warping Clustering for Robust Functional Network Identification in fNIRS Motor Tasks. Sensors. 2026; 26(6):1848. https://doi.org/10.3390/s26061848
Chicago/Turabian StyleAlthobaiti, Murad. 2026. "Unsupervised Dynamic Time Warping Clustering for Robust Functional Network Identification in fNIRS Motor Tasks" Sensors 26, no. 6: 1848. https://doi.org/10.3390/s26061848
APA StyleAlthobaiti, M. (2026). Unsupervised Dynamic Time Warping Clustering for Robust Functional Network Identification in fNIRS Motor Tasks. Sensors, 26(6), 1848. https://doi.org/10.3390/s26061848

