For decades, one of the most tedious tasks in neuroscience has resisted automation: dividing hours of electroencephalogram recordings into meaningful functional stages. Sleep technicians still annotate whole-night recordings by hand, and researchers studying meditation or anesthesia often rely on expert visual inspection to decide when a brain shifts from one state to another. Now a team of Russian and German researchers has proposed a strikingly different way to let the data speak for itself, borrowing mathematical tools from a field that studies the shape of information itself. In a study published in Medical & Biological Engineering & Computing, Aleksandr Abramov of HSE University and colleagues describe an algorithm that segments EEG recordings into functional stages without any labels at all, using topological data analysis, a branch of mathematics increasingly fashionable for its ability to reveal hidden structure in messy, high-dimensional data.
The work builds on an earlier technique known as the state-detecting algorithm, or SDA, which was previously shown to detect functional states in the EEG of practitioners of Guhyasamaja Tantra meditation, an advanced Tibetan Buddhist practice. SDA is data-driven: rather than being trained on labeled examples, it searches a recording for natural boundaries between segments whose statistical properties differ. In its original form, however, SDA relied on spectral features, essentially a description of how the brain’s electrical oscillations are distributed across frequency bands. Spectral features are the workhorses of EEG analysis, but they discard information about how signals from different electrodes relate to one another in space and time. The new study asks whether a richer, geometric description of the data could do the job better, or at least differently.
The answer comes from topological data analysis, commonly abbreviated TDA. The central idea of TDA is to characterize datasets by their shape: how points cluster together, form loops, cavities, or other structures that persist across scales. In practical terms, the researchers transformed segments of EEG into geometric objects using a classical trick from dynamical systems theory called Takens embedding, which reconstructs the phase space of a system from a single time series. They then computed dissimilarity matrices between these embedded segments using Pearson correlation, and from those matrices extracted so-called persistence-based features, which quantify how long topological structures survive as a scale parameter is varied. The result is a comprehensive topological description of an EEG recording containing tens of thousands of candidate features, far too many to use directly.
To tame this explosion of features, the team introduced the quick state-detecting algorithm, or QSDA, a feature selection framework that filters the topological features according to how useful they are for SDA’s stage-detection performance. Rather than selecting features by their statistical properties alone, QSDA keeps those that actually help the algorithm draw clean boundaries between functional states. This coupling of feature engineering to downstream performance is what makes the approach practical: the tens of thousands of raw topological descriptors are distilled into a compact set that the state-detecting machinery can process efficiently. The researchers have released their source code publicly on GitHub under the project name TopoEEG, and they state that raw data will be made available upon request, a level of openness that should accelerate independent evaluation.
The critical test was whether the topological features could reveal genuine functional stages in real brain recordings. The team applied the pipeline to two very different domains: EEG recorded during Guhyasamaja Tantra meditation, and whole-night polysomnographic sleep recordings, the gold-standard setup for sleep research. In both settings, the algorithm produced well-separated stage boundaries across most recordings, suggesting that the spatial and temporal structure captured by topology carries real information about the brain’s functional state. That the same unsupervised procedure works on such different phenomena, from meditative absorption to the cycling stages of sleep, is the study’s most intriguing result, hinting that topological features may capture something general about how brain dynamics reorganize between states.
Robustness checks added further credibility. The researchers observed encouraging performance on noisy data, an important property for clinical and real-world applications where recordings are rarely pristine. Conversely, when they shuffled the epochs, deliberately destroying the temporal order that carries state information, the detected boundaries became substantially weaker. This contrast is exactly what one would hope to see: a method that finds strong boundaries in ordered data but fails on scrambled data is presumably responding to genuine structure rather than to artifacts of the pipeline. The authors are careful, however, to scope their claims to the settings examined, noting that a broader assessment across additional EEG paradigms remains necessary.
Why should topology be sensitive to brain states at all? The authors themselves frame this as an open question, motivating further investigation into the possible physiological interpretation of the topological features. One plausible intuition is that different functional states correspond to different geometries of neural activity: the way oscillatory patterns across the scalp fold into high-dimensional space may differ between deep sleep, light sleep, wakefulness, and meditative states, even when conventional spectral summaries look similar. Persistent homology, the mathematical machinery underlying the features, is designed to detect precisely such geometric organization while remaining robust to small perturbations, which would explain the method’s tolerance of noise. Similar topological approaches have recently been applied to EEG in other contexts, including classification tasks in ADHD research and general EEG processing pipelines, indicating a growing interest in the field.
The practical implications could be significant. Automated, unsupervised segmentation of EEG would relieve specialists of hours of manual annotation, and because the method requires no labels, it could be applied to novel paradigms where expert ground truth does not yet exist, from unusual meditative practices to altered states induced by anesthesia or psychoactive substances. In sleep research, where scoring is traditionally performed in thirty-second epochs according to standardized rules, an unsupervised method that finds its own boundaries offers a complementary perspective, potentially revealing transitions that rigid epoch-based scoring smooths over. For brain-computer interfaces, which depend on detecting changes in mental state in real time, a fast feature selection framework such as QSDA could help keep computational costs manageable.
Still, the study is an early step rather than a finished clinical tool. The authors explicitly position their work as a promising feature engineering approach for SDA, and they caution that the findings motivate, rather than settle, questions about interpretation and generalization. The two domains tested, meditation and sleep, share the advantage of well-documented state structure, but many EEG applications involve subtler or more continuous state changes. Comparisons against spectral features across a wider range of paradigms, larger cohorts, and clinical populations will be needed to determine when topology complements conventional methods and when it outperforms them, as the authors suggest it may in some settings.
What makes the study resonate beyond its immediate technical contribution is the broader message: the spatial structure of EEG, not just its frequency content, contains informative patterns that modern mathematics can extract without any supervision. As topological data analysis matures, with efficient algorithms for computing persistence barcodes and established statistical frameworks for persistence landscapes, its migration into biomedicine appears set to continue. If the hidden geometry of brain signals proves as informative as this study suggests, the humble EEG, nearly a century old as a technology, may still have new stories to tell about the shifting states of the human mind, and machines may soon be the first to hear them.
Subject of Research: Unsupervised detection of functional brain states in EEG recordings using topological data analysis
Article Title: Unsupervised functional stage detection from EEG using topological data analysis
Article References: Abramov, A., Mikhaylets, E., Chernyshev, V., Kaplan, A., & Ratnikov, F. (2026). Unsupervised functional stage detection from EEG using topological data analysis. Medical & Biological Engineering & Computing. https://doi.org/10.1007/s11517-026-03683-0
Image Credits: AI Generated
DOI: 10.1007/s11517-026-03683-0
Keywords: EEG, topological data analysis, persistent homology, unsupervised learning, sleep staging, meditation, state-detecting algorithm, feature selection, Takens embedding, brain states, polysomnography, neuroinformatics
Cite Scienmag News
Cassandra Pierce. (October 7, 2026). Topology Meets the Brain: New Algorithm Detects Mental States in EEG Without Labels. Scienmag. https://scienmag.com/topology-meets-the-brain-new-algorithm-detects-mental-states-in-eeg-without-labels/
Cassandra Pierce. "Topology Meets the Brain: New Algorithm Detects Mental States in EEG Without Labels." Scienmag, 7 October 2026, https://scienmag.com/topology-meets-the-brain-new-algorithm-detects-mental-states-in-eeg-without-labels/. Accessed 7 October 2026.
Cassandra Pierce. "Topology Meets the Brain: New Algorithm Detects Mental States in EEG Without Labels." Scienmag. October 7, 2026. https://scienmag.com/topology-meets-the-brain-new-algorithm-detects-mental-states-in-eeg-without-labels/








