bioRxiv Science⌕ Search

bioRxiv · 10.64898/2026.10.31.763367

SafeLens: A Statistically Controlled Nonlinear Machine Learning Framework for Characterizing Hidden Dynamics in Event-Locked Neural Activity

Abstract

Machine learning has advanced rapidly over the past decade, yet event-locked neural activity is still analyzed predominantly with traditional statistics and linear models. While traditional linear methods provide computationally tractable statistical control for pre-selected features or trial-averaged waveforms, they miss subtle nonlinear and trial-varying neural dynamics. Nonlinear models can capture these complex patterns, but their feature reliance is opaque and notoriously difficult to threshold statistically. We introduce SafeLens (Searchlight Analysis of Fluctuation Events, Leveraging Extensive Null Sampling) to combine the power of nonlinear machine learning with the rigorous false-positive control of traditional statistical inference. At each position of a sliding window, a random forest learns to discriminate event-locked activity from interleaved resting-state neural activity using multiscale temporal derivatives. Randomized feature ablation inverts slope polarity in held-out trials to map the random forest models' reliance on specific rising versus falling excursions across the time-frequency space. SafeLens then establishes an empirical null by running the same pipeline on separate resting-state recordings, training forests to discriminate rest from rest. This empirical null translates each channel's complex nonlinear resting dynamics into a model-matched noise floor on the map's linear reliance scale, allowing a single threshold to control the family-wise error rate against the channel's own background structure rather than a summary statistic of its baseline. When we injected simulated cortico-cortical evoked potentials (CCEPs) into resting intracranial EEG recordings, SafeLens recovered ~2.5 times as many polarity-resolved deflections as trial-average thresholding and the closest data-driven method, maintaining its advantage under trial-to-trial variability while yielding ~5-11 times fewer false components, ~2-5 times lower mean boundary error, and superior single-trial latency tracking as a timing prior. In eight patients, CCEPs remained detectable above chance until 1,040 ms after stimulation, compared with 570 and 455 ms for those benchmarks. Together, these findings establish SafeLens as a novel solution for enabling nonlinear models to uncover subtle, trial-varying neural dynamics under strict statistical control.

Explore related subjects

Keep this discovery

Explore connections, maps & timelines

BibTeXRIS

Minasi, C. B., Hassan, U., Cline, C. C., Keller, C. J.. 2026-11-04. SafeLens: A Statistically Controlled Nonlinear Machine Learning Framework for Characterizing Hidden Dynamics in Event-Locked Neural Activity. https://doi.org/10.64898/2026.10.31.763367

Cite the original work for its findings. Save a collection to share your selection of sources.

KEEP EXPLORING

Related preprints

Epidermal Langerhans Cells Act as Neuroimmune Regulators of Pain and Itch

Neuroimmune interactions in the skin coordinate immune defense and somatosensory perception, yet how immune cells shape sensory signaling remains poorly defined. Here, we show that Langerhans cells (LCs), epidermal antigen-presenting cells, function as local immune-derived amplifiers of cutaneous sensory signaling. Anatomical and transcriptomic analyses reveal preferential LC association with non-peptidergic sensory neurons. LC activation increases neuronal and behavioral responses to thermal, mechanical, and pruritic stimuli without directly exciting sensory neurons, whereas LC inhibition or ablation selectively reduces pruritogen-evoked itch. We identified semaphorin 7A as a candidate LC-expressed mediator. Semaphorin 7A sensitized cultured sensory neurons to chloroquine and histamine, and neutralizing semaphorin 7A abolished the increase in chloroquine-evoked scratching produced by LC activation. Its receptor PlexinC1 was expressed by most MrgprA3 pruriceptors and blocking PlexinC1 reduced semaphorin 7A-evoked neuronal responses. Together, these findings identify epidermal LCs as local immune-derived amplifiers that regulate the responsiveness of cutaneous sensory circuits and identify semaphorin 7A as a mediator of LC-induced itch potentiation.

neuroscience↗

Feasible closed-loop stimulation for neural latent dynamics control

Modern neuroscience benefits from powerful computational and experimental methods for studying neural populations, including latent dynamics models that predict behavior with few dimensions. But despite their explanatory utility, latent factors are seldom targeted explicitly with experimental perturbations, leaving causal relationships to behavior and inferred dynamical landscapes untested. A promising solution is closed-loop, multi-channel optogenetic control, which, when paired with model predictions, could steer neural trajectories in real time--a feat impossible for traditional, hand-designed stimulation. However, because closed-loop latent control has not been demonstrated in vivo, the hardware and software requirements remain unclear--particularly the necessary stimulation dimensionality and how limited resources such as implant volume and bandwidth should be allocated between stimulation and recording capabilities. Preliminary experiments would thus help guide ongoing technological development. As large-scale exploration of these design spaces in vivo is prohibitively expensive, we conducted a high-throughput simulation survey using biophysically grounded spiking neural networks. We found that low-dimensional actuation is sufficient: in the reference configuration, ~20% of the stimulation channels achieved ~85% of peak control performance, far fewer than the number of neurons. Furthermore, allocating channels roughly equally between stimulation and recording optimized behavioral control, whereas pairing many electrodes with a single light source--the prevailing practice in experimental labs--performed poorly. Even without heavily optimizing modeling or control, we obtained >60% tracking error reduction and >90% evoked behavior accuracy on average for optimal channel counts. These results held across extensive parameter variations, suggesting that closed-loop latent control is feasible with accessible channel counts and establishing design principles for future tool development and in vivo experiments.

neuroscience↗

Identification of Kinome Biomarkers and Therapeutic Rescue in cGMP-Linked Retinal Degeneration

Inherited retinal degenerations, such as Retinitis Pigmentosa (RP) and Leber's congenital amaurosis (LCA), are major causes of progressive and irreversible vision loss. The large number of genes associated with these disorders makes their clinical and molecular characterization difficult, while systemic biomarkers for disease progression or treatment response remain limited. These challenges were addressed by targeting cGMP-associated mechanisms shared by RP and LCA and integrating systemic biomarker profiling with retinal outcomes. Kinase activity analysis (kinome analysis) in peripheral blood mononuclear cells distinguished healthy and diseased states and captured therapy-associated signatures in rd10 mice treated with LP-CN03, a liposomal formulation of the cGMP analog CN03. This first systemic analysis in a therapeutically responsive animal model highlights kinome analysis as a potential translational readout. Given shared cGMP signaling in RP and AIPL1-associated LCA, LP-CN03's therapeutic potential was further evaluated in a new CRISPR-Cas9-generated Aipl1-/- mouse model. Treatment with LP-CN03 preserved retinal structure and function, as shown by electroretinography, longitudinal optical coherence tomography, fundus imaging, optomotor testing, and photoreceptor-specific gene expression. Together, these findings provide independent in vivo evidence for the neuroprotective effect of LP-CN03 in both cGMP-related RP and LCA, also highlighting the translational value of kinome profiling.

neuroscience↗