We propose a novel computational framework for analyzing electroencephalography (EEG) time series using methods from stringology, the study of efficient algorithms for string processing, to systematically identify and characterize recurrent temporal patterns in neural signals. The primary aim is to introduce quantitative measures to understand neural signal dynamics, with the present findings serving as a proof-of-concept. The framework adapts order-preserving matching (OPM) and Cartesian tree matching (CTM) to detect temporal motifs that preserve relative ordering and hierarchical structure while remaining invariant to amplitude scaling. This approach provides a temporally precise representation of EEG dynamics that complements traditional spectral and global complexity analyses. To evaluate its utility, we applied the framework to multichannel EEG recordings from individuals with attention-deficit/hyperactivity disorder (ADHD) and matched controls using a publicly available dataset. Highly recurrent, group-specific motifs were extracted and quantified using both OPM and CTM. The ADHD group exhibited significantly higher motif frequencies, suggesting increased repetitiveness in neural activity. OPM analysis revealed shorter motif lengths and greater gradient instability in ADHD, reflected in larger mean and maximal inter-sample amplitude changes. CTM analysis further demonstrated reduced hierarchical complexity in ADHD, characterized by shallower tree structures and fewer hierarchical levels despite comparable motif lengths. These findings suggest that ADHD-related EEG alterations involve systematic differences in the structure, stability, and hierarchical organization of recurrent temporal patterns. The proposed stringology-based motif framework provides a complementary computational tool with potential applications for objective biomarker development in neurodevelopmental disorders.
Figures & tables
Brain Region
Electrodes
Channels
Frontal
Fp1, Fp2, F3, F4, F7, F8, Fz
1, 2, 3, 4, 11, 12, 17
Central
C3, C4, Cz
5, 6, 18
Temporal
T7, T8
13, 14
Parietal
P3, P4, P7, P8, Pz
7, 8, 15, 16, 19
Occipital
O1, O2
9, 10
Reference
A1, A2
—
Table 1: EEG electrode groups and corresponding channel numbers. This configuration provided comprehensive coverage of frontal, central, temporal, parietal, and occipital brain regions.
Figure 1: The Cartesian trees of (7,2,16,4,8) and (10,5,17,9,18) are identical, illustrating a Cartesian Tree Matching (CTM) instance. In both cases, the tree nodes are labeled by the positions of the corresponding values in the string, starting from position 0 . More generally, any string of length 5 in which the minimum value occurs at position 1 and the second minimum occurs at position 3 will produce the same Cartesian tree structure, regardless of the order relations between the values at positions 0 , 2 , and 4 .
Channel
Len 6
Len 6
Len 7
Len 7
1
101
3
70
22
2
46
8
62
15
3
50
6
63
20
4
52
10
51
21
5
53
3
41
32
6
35
6
59
21
Table 2: OPM motif counts per channel, per length, and per group. (Orange - ADHD, Blue - Control)
Channel
Len 9
Len 9
Len 10
Len 10
1
17
4
85
9
2
10
2
62
19
3
13
2
56
13
4
9
3
76
15
5
15
1
71
27
6
8
6
57
16
Table 3: CTM motif counts per channel, per length, and per group. (Orange - ADHD, Blue - Control)
Figure 2: Median frequency of discovered OPM motifs across all EEG channels.
Figure 3: Median frequency of discovered CTM motifs across all EEG channels.
Figure 4: Detailed comparison of the mean of all discovered OPM motifs of length 7 in electrode fz (channel 17) (a.u.).
Figure 5: The ranks derived from the mean OPM motifs of length 7 in midline frontal electrode Fz (channel 17) for both groups.
Figure 6: Detailed comparison of the mean of all discovered CTM motifs of length 9 in electrode fz (channel 17) (a.u.).
Figure 7: Left: The Cartesian tree of the mean of CTM motifs of length 9 in the control group. Right: The Cartesian tree of the mean of CTM motifs of length 9 in the ADHD group. In both trees, each node includes the position of the value.
Figure 8: Median max jump magnitude of all significant discovered OPM motifs. No significant group differences were observed in channels 2-4, 6-8, and 10-11 (a.u.).
Figure 9: Median mean jump of all significant discovered OPM motifs. No significant group differences were observed in channels 2-3, 6-8, and 10-11 (a.u.).
Figure 10: Median standard deviation of jump magnitude for all significant discovered OPM motifs. No significant group differences were observed in channels 2-4, 6-7, 9-11, and 19 (a.u.).
Figure 11: Median normalized jump magnitude of all significant discovered OPM motifs. No significant group differences were observed in channels 2-3, 6-8, and 10-11 (a.u.).
Figure 12: The median value of the rank turning points count of all significant discovered OPM motifs. The rank turning points count is significant across all channels.
Figure 13: The median value of the rank diff max of all significant discovered OPM motifs. The median value of the rank diff max is significant only in channel 1.
Figure 14: Median mean jump in all significant CTM motifs. There are no significant motif mean jumps for channels 1-13, and 17-19 (a.u.).
Figure 15: Median max jump value in all significant CTM motifs. There are no significant motif max jumps for channels 1-8, 11-13, and 18-19 (a.u.).
Figure 16: The median of tree max depth in all significant CTM motifs. There are no significant motif tree max depths for channels 1-4, 6-9, 11, 13, and 18-19.
Figure 17: The median of tree leaves in all significant CTM motifs. There are no significant motif tree leaves for channels 1-4, 6-9, 11, 13, and 18-19.
Figure 18: The median of tree branches in all significant CTM motifs. There are no significant motif tree branches for channels 1-4, 6-9, 11, 13, and 18-19.
Figure 19: The median of tree balance in all significant CTM motifs. There are no significant motif tree balances for channels 1-2, 4, 6-9, 11, 13, and 18-19.
Recent studies have reported clearly identifiable dynamical changes in the high-frequency range of EEG signals recorded during specific stimuli, such as visual or auditory inputs, or in cases of brain disorders like epileptic seizures. In this study, we utilized Dynamic Mode Decomposition (DMD) to extract consistent and persistent dynamical changes in the high-frequency band from the signals of neurologically relevant EEG channels. High-frequency DMD modes were employed as features, composing a feature table. Through post-processing, a random distribution test was performed, revealing that approximately 70% of the samples exhibited consistent high-frequency dynamics within the signal of a specific channel. Furthermore, classification experiments confirmed that the PCA components of the feature table that passed the test formed a consistent pattern that distinguished the alcohol-dependent group from the control group.
Jacob Kang, Jong-Hyeon Seo
Fischell Department of Bioengineering, University of Maryland, College Park, MD, United States · School of Basic Sciences, Hanbat National University, Daejeon, Republic of Korea
Cross-subject EEG stress detection remains challenging because discriminative stress-related patterns are both subject-dependent and frequency-specific. Conventional Riemannian methods model spatial covariance mainly in the time domain, overlooking neural oscillations that are critical for high-level cognitive state decoding, while standard temporal tokenization often fragments inter-slice temporal coherence. To address these limitations, we propose \method{}, an Intra-Inter Riemannian Manifold Attention Network for EEG-based stress detection. \method{} constructs spatial covariance matrices independently at each frequency point and maps them to the SPD tangent space, preserving channel-wise geometry together with frequency-specific discriminative cues. It further introduces frequency cluster aggregation to select informative spectral components and reduce redundancy by forming compact, data-driven frequency clusters aligned with EEG rhythms. Finally, an intra-inter slice attention module adaptively integrates local slice-level spectral dynamics and global temporal context across EEG sequences. Experiments on three datasets show that \method{} consistently outperforms five state-of-the-art baselines, achieving up to 82.78% balanced accuracy while remaining efficient with only 1.60M parameters and 31.95M FLOPs.
Cheng He, Kunyu Peng, Shangen Han +3
Laboratory of Neural Computing and Intelligent Perception, College of Information Engineering, Capital Normal University, Beijing, China · Karlsruhe Institute of Technology, Germany · School of Psychology, Capital Normal University, Beijing, China
Motivated behaviour relies on the brain's capacity to evaluate effort and reward. Dysregulation within these processes contributes to a spectrum of conditions, from hyperactivity in attention-deficit/hyperactivity disorder (ADHD) to diminished goal-directed behaviour in apathy. This thesis investigates the neural mechanisms underlying ADHD using electroencephalography (EEG) and examines individual differences in effort and reward sensitivity using neuroimaging, applying machine learning approaches through three main studies. In Study 1, task-based and resting-state EEG were employed with machine learning models to classify adult individuals with ADHD and healthy controls. Machine learning classifiers trained on task-based EEG during a stop signal task outperformed those trained on resting-state EEG, with the strongest predictive features arising from gamma-band spectral power over fronto-central and parietal regions. In Study 2, diffusion MRI and whole-brain permutation-based analyses identified associations between white matter integrity and computationally modelled parameters reflecting effort and reward sensitivity, with SMA-connected tracts emerging as a central hub. In Study 3, grey matter volumes from structural T1-weighted MRI were used to examine correlates of effort sensitivity, reward sensitivity, and subclinical apathy, with machine learning confirming robust decoding of reward sensitivity and apathy levels. Across studies, fronto-parietal circuits emerged as central to effort valuation and reward processing. These findings may serve as neural biomarkers for improving diagnostic accuracy in ADHD and motivational impairments, and for guiding personalised neurotechnological interventions.