Methods of treating neurological and psychiatric disorders with neuromodulation using machine learning
Machine learning models are used to classify and optimize neuromodulation parameters for personalized and adaptive neuromodulation, addressing the challenge of dynamic parameter adjustment in neuromodulation therapies to improve sleep quality and reduce undesired clinical states.
Patent Information
- Application Number
- PCT/US2026/027181
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2025-05-12
- Filing Date
- 2026-05-07
- Publication Date
- 2026-11-19
AI Technical Summary
Current neuromodulation technologies face challenges in dynamically adjusting stimulation parameters to respond to individual neural physiology, particularly for optimizing sleep structure and addressing sleep dysfunction in neurological and psychiatric disorders, due to the complexity of determining optimal parameters and the combinatorial difficulty of manual optimization.
Employing machine learning models, including unsupervised and supervised algorithms, for classifying neurophysiology data and optimizing neuromodulatory parameters using Bayesian optimization to promote desired clinical states and avoid undesired states, with methods for real-time and cumulative adjustments.
Enhances the ability to personalize and optimize neuromodulation therapies by improving sleep quality and reducing undesired clinical states, such as sleep dysfunction, through adaptive parameter adjustments based on individual neural activity patterns.
Smart Images

Figure US2026027181_19112026_PF_FP_ABST
Abstract
Description
METHODS OF TREATING NEUROLOGICAL AND PSYCHIATRIC DISORDERS WITH NEUROMODULATION USING MACHINE LEARNING FOR CLASSIFICATION OF SYMPTOMS AND CLINICAL STATES AND BAYESIAN OPTIMIZATION OF STIMULATION PARAMETERSCROSS-REFERENCE TO RELATED APPLICATIONS
[0001] This application claims benefit under 35 U. S. C. § 119(e) of provisional application 63 / 804,425, filed May 12, 2025, and provisional application 64 / 016,979, filed March 25, 2026, which applications are hereby incorporated by reference in their entireties.STATEMENT REGARDING FEDERALLY SPONSORED RESEARCH OR DEVELOPMENT
[0002] This invention was made with government support under R01 NS131405, awarded by the National Institutes of Health. The government has certain rights in the invention.BACKGROUND OF THE INVENTION
[0003] Clinical neuromodulation encompasses therapeutic interventions which alter neural firing patterns and network activity to ameliorate pathophysiology and recover healthier clinical states. However, these clinical states are usually dynamic and therefore, it is often desired or necessary to adjust the neuromodulatory parameters in response to physiological dynamics, e.g., changes in neural activity due to circadian rhythm or medication cycles. Emerging neurostimulation devices combine intracranial sensing and multi-site stimulation. Adaptive neuromodulation allows for realtime stimulation parameter adjustment in response to brain physiology through programmed control policies, and offers a means to provide personalized stimulation policies for optimally recovering clinical states based upon an individual’s personalized neural physiology. However, adaptive policies require inferring clinical state from the underlying neural activity and currently determining clinically important physiological states from neural activity is a burdensome and data intensive task. Additionally, identifying optimal neuromodulatory parameters in response to personal neurophysiology adds significant complexity to programming neuromodulatory devices, often beyond the capabilities of trained clinicians. Searching over the large available parameter spaces for optimal neuromodulatory policies is a combinatorially difficult optimization problem and no longer feasible when conducted manually.
[0004] Sleep dysfunction is a unifying feature across many neurological and psychiatric disorders (Bassetti, C. L. et al. Eur. J. Neurol. 22, 1337-1354 (2015)). In people with Parkinson’s disease (PD), non-motor symptoms significantly decrease quality of life with up to 90% reporting significant sleep dysfunction across both rapid eye movement (REM) and non REM (NREM) stages (Videnovic, A. &Golombek, D. Exp. Neurol. 243, 45-56 (2013), Barone, P. et al. Mov. Disord. 24, 1641-1649 (2009), Diederich, et al. Sleep Med. 6, 313-318 (2005), Martinez-Martin et al. Mov. Disord. 26, 399-406 (2011)). In healthy individuals, NREM sleep is associated with an increase in cortical brain activity in low frequencies (0.5 - 4 Hz), named slow waves, which are believed to serve multiple functions related to metabolism, cognition and synaptic homeostasis (Leger, D. et al. Sleep Med. Rev. 41, 113-132 (2018)). In PD, reductions in slow waves are associated with faster disease progression (Schreiner, S. J. et al. Annals of Neurology vol. 85 765-770 (2019)). Conventional, high frequency Deep Brain Stimulation (DBS) delivered to the Subthalamic Nucleus (STN) has been shown to partially improve sleep structure and NREM slow wave activity (1-4 Hz) in PD (Baumann-Vogel, H. et al. Sleep 40 (5), (2017), Arnulf, I. et al. Neurology 55, 1732-1734 (2000), Monaca, C. et al. J. Neurol. 251, 214-218 (2004), Iranzo, A. et al. J. Neurol. Neurosurg. Psychiatry 72, 661-664 (2002)). However, the variability of DBS on sleep overall, the impact of DBS on the globus pallidus interna (GPi) overnight, the mechanism by which DBS improves NREM sleep, and why REM sleep disturbances appear refractory to DBS is not well understood (Zuzuarregui, J. R. P. & Ostrem, J. L. J. Parkinsons. Dis. 10, 393-404 (2020), Tolleson et al. Neuromodulation 19, 724-730 (2016)).SUMMARY OF THE INVENTION
[0005] Devices, systems, software, and methods are provided for optimization of adaptive neuromodulation for treating neurological disorders and psychiatric disorders. In particular, methods of using personalized supervised and unsupervised machine learning models for classification of features in neurophysiology data are provided. In addition, methods of using Bayesian optimization of stimulation parameters to promote desired clinical states and avoid undesired clinical states are provided.
[0006] In one aspect, a computer-implemented method for adjusting parameter settings of a neurostimulator for treatment of a neurological disorder or a psychiatric disorder in a subject is provided, the computer performing steps comprising: (a) receiving training neurophysiology data and test neurophysiology data for the subject; (b) using an unsupervised machine learning algorithm to cluster features of the training neurophysiology data; (c) assigning a clinical state label to each feature cluster to generate labeled training neurophysiology data; (d) training a supervised model using the labeled training neurophysiology data to predict the clinical state of the subject from the test neurophysiology data; and (e) adjusting the parameter settings of the neurostimulator to a predefined set of neuromodulatory parameters based on the clinical state predicted for the subject from the test neurophysiology data.
[0007] In certain embodiments, training the supervised model comprises training a linear discriminant analysis (LDA) model to define a linear boundary for distinguishing between two feature clusters.
[0008] In certain embodiments, the computer-implemented further comprises using the supervised model to classify the clinical state of the subject as a desired clinical state or an undesired clinical state; generating an objective function for adjusting the parameter settings of the neurostimulator to maximize time spent by the subject in the desired clinical state or minimize time spent by the subject in the undesired clinical state; and iteratively optimizing the parameter settings of the neurostimulator using an optimization algorithm with the objective function as input, wherein optimized parameter settings are generated by maximizing an objective function value to maximize the time spent by the subject in the desired clinical state or minimizing the objective function value to minimize the time spent by the subject in the undesired clinical state. In some embodiments, iteratively optimizing the parameter settings comprises optimizing the parameter settings for each brain hemisphere of the subject. In some embodiments, the computer-implemented method further comprises displaying the optimized parameter settings. In some embodiments, iteratively optimizing the parameter settings comprises optimizing stimulation amplitude and stimulation frequency. In some embodiments, iteratively optimizing the parameter settings of the neurostimulator comprises performing Bayesian optimization with a Gaussian process regression model of the objective function, a multi-armed bandit algorithm, a contextual bandit algorithm, model-based reinforcement learning, model-free reinforcement learning, or an evolutionary optimization method.
[0009] In certain embodiments, iteratively optimizing the parameter settings comprises within- session optimization performed during a single recording session, wherein the objective function is evaluated and the parameter settings are updated one or more times within the recording session.
[0010] In certain embodiments, the recording session is a sleep session, and wherein the parameter settings are updated at intervals of 1 second to 4 hours during the sleep session, including any interval within this range such as 1 second, 5 seconds, 10 seconds, 30 seconds, 1 minute, 2 minutes, 5 minutes, 10 minutes, 15 minutes, 20 minutes, 30 minutes, 45 minutes, 1 hour, 1.5 hours, 2 hours, 2.5 hours, 3 hours, 3.5 hours, or 4 hours.
[0011] In certain embodiments, iteratively optimizing the parameter settings comprises across- session optimization performed over a plurality of recording sessions, wherein the objective function is evaluated at the conclusion of each recording session and the parameter settings are updated between recording sessions.
[0012] In certain embodiments, the plurality of recording sessions comprises a plurality of nights of sleep spanning a period of at least one week.
[0013] In certain embodiments, iteratively optimizing the parameter settings comprises both within- session optimization and across-session optimization, wherein within-session optimization adapts the parameter settings in real-time during each recording session, and wherein across-session optimization updates a prior distribution, hyperparameters, or baseline of the Gaussian process regression model based on cumulative observations across recording sessions.
[0014] In certain embodiments, iteratively optimizing the parameter settings comprises within- session optimization using a first objective function based on instantaneous biomarker values, and across-session optimization using a second objective function based on session-level summary statistics or z-scored biomarker values relative to a baseline characteristic session.
[0015] In certain embodiments, training the supervised model further comprises incorporating a state estimation algorithm to track the clinical state over time, wherein the state estimation algorithm is selected from the group consisting of: Kalman filtering, extended Kalman filtering, unscented Kalman filtering, particle filtering, and ensemble Kalman filtering.
[0016] In certain embodiments, the computer-implemented method further comprises using a switching linear dynamical system (SLDS) to model transitions between clinical states, wherein each clinical state is associated with distinct linear dynamics of the neurophysiology data.
[0017] In certain embodiments, the computer-implemented method further comprises using a gaussian process latent variable model (GP-LVM) to learn a low-dimensional representation of the neurophysiology data, wherein the clinical states correspond to regions in the latent space.
[0018] In certain embodiments, the computer-implemented method further comprises using a recurrent switching linear dynamical system (rSLDS) to jointly infer continuous latent neural dynamics and discrete clinical state sequences from the neurophysiology data.
[0019] In certain embodiments, iteratively optimizing the parameter settings comprises multiobjective optimization to simultaneously optimize multiple clinical outcomes, wherein a Pareto frontier of non-dominated parameter configurations is identified.
[0020] In certain embodiments, the multi-objective optimization uses at least two measures selected from a biomarker measure, a symptom measure, a side effect measure, and an energy consumption measure.
[0021] In certain embodiments, iteratively optimizing the parameter settings incorporates safety constraints on stimulation parameters, wherein parameter configurations predicted to cause adverse effects are excluded from consideration.
[0022] In certain embodiments, the safety constraints comprises using Bayesian optimization, wherein the Bayesian optimization only explores parameter configurations predicted to be safe with high probability based on prior observations.
[0023] In certain embodiments, the computer-implemented method further comprises using a hierarchical Bayesian model to leverage data from multiple subjects, wherein population-level parameters provide prior information to accelerate optimization for individual subjects.
[0024] In certain embodiments, the computer-implemented method further comprises using metalearning to enable rapid adaptation of the supervised model to a new subject with limited subjectspecific data for the new subject.
[0025] In certain embodiments, the meta-learning uses a model-agnostic meta-learning (MAML) algorithm or a Reptile meta-learning algorithm.
[0026] In certain embodiments, computer-implemented method further comprises detecting a distribution shift in the neurophysiology data; and triggering retraining of at least one of the unsupervised clustering, the supervised model, or the optimization algorithm baseline when the distribution shift is detected.
[0027] In certain embodiments, computer-implemented method further comprises periodically updating a baseline dataset used for objective function computation to account for long-term drift in neurophysiology.
[0028] In certain embodiments, training the supervised model comprises training a temporal sequence model selected from the group consisting of: long short-term memory (LSTM) networks, gated recurrent units (GRUs), temporal convolutional networks, and transformer models with temporal self-attention.
[0029] In certain embodiments, training the supervised model comprises training a structured statespace model to capture long-range temporal dependencies in the neurophysiology data.
[0030] In certain embodiments, generating the objective function further comprises rolling-average baseline normalization. In some embodiments, the rolling-average baseline normalization comprises: (a) computing a rolling average of a biomarker for each of a plurality of baseline recording sessions; (b) temporally aligning the rolling average across sessions relative to a reference event; (c) computing a characteristic session comprising a mean and standard deviation across sessions; and (d) quantifying stimulation effects based on comparing a new recording session to the characteristic session using a z-score.
[0031] In certain embodiments, the computer-implemented method further comprises using gaussian process factor analysis (GPFA) to extract smooth latent dynamics from the neurophysiology data.
[0032] In certain embodiments, the computer-implemented method further comprises using latent factor analysis via dynamical systems (LFADS) to infer single-trial latent dynamics from the neurophysiology data.
[0033] In certain embodiments, the unsupervised machine learning algorithm uses K-means clustering, K-medoids clustering, Gaussian mixture modeling, density-based spatial clustering of applications with noise (DBSCAN), an autoencoding neural network, a variational autoencoder, Riemannian geometry-based manifold learning on covariance matrices, contrastive learning, a hidden Markov model, isometric mapping (Isomap), locally linear embedding, t-distributed stochastic neighbor embedding (t-SNE), uniform manifold approximation and projection (UMAP), diffusion maps, spectral clustering, or a self-organizing map. In some embodiments, the unsupervised machine learning algorithm uses the Riemannian geometry-based manifold learning to estimate covariance structures of the training neurophysiology data, wherein clustering is performed based on geodesic distances on the symmetric positive definite (SPD) manifold. In some embodiments, the unsupervised machine learning algorithm uses the contrastive learning to learn a representation of the training neurophysiology data, wherein temporally adjacent data epochs serve as positive pairs and temporally distant epochs serve as negative pairs. In some embodiments, the unsupervised machine learning algorithm uses the hidden Markov model to identify latent states in the training neurophysiology data, wherein the hidden states of the hidden Markov model correspond to clinical state labels. In some embodiments, the unsupervised machine learning algorithm uses manifold learning with Isomap, locally linear embedding (LLE), Laplacian eigenmaps, t-distributed stochastic neighbor embedding (t-SNE), uniform manifold approximation and projection (UMAP), or diffusion maps. In some embodiments, the unsupervised machine learning algorithm uses a variational autoencoder (VAE) or a β-VAE to learn a latent representation of the training neurophysiology data, wherein clustering is performed in the latent space.
[0034] In certain embodiments, the computer-implemented method further comprises instructing the neurostimulator to apply stimulation to a target region of the subject using the optimized parameter settings. In some embodiments, the stimulation comprises electrical stimulation, magnetic stimulation, or ultrasound stimulation. In some embodiments, the stimulation comprises deep brain stimulation, subgaleal electrical stimulation, transcranial stimulation, spinal cord stimulation, peripheral nerve stimulation, peripheral nerve field stimulation, neuromuscular electrical stimulation, or focused ultrasound stimulation. In some embodiments, the transcranial stimulation is transcranial direct current stimulation, transcranial alternating current stimulation, or transcranial magnetic stimulation. In some embodiments, the electrical stimulation is delivered to a brain region, spinal cord, peripheral nerve, or muscle of the subject. In some embodiments, the peripheral nerve is a vagus nerve, a median nerve, an ulnar nerve, a radial nerve, an occipital nerve, a sphenopalatine ganglion, a trigeminal nerve, a tibial nerve, a sacral nerve, a hypoglossal nerve, a phrenic nerve, a greater auricular nerve, a peroneal nerve, a sciatic nerve, a pudendal posterior nerve, a saphenousnerve, a suprascapular nerve, a carotid sinus nerve, a cervical sympathetic chain nerve, or a auriculotemporal nerve.
[0035] In certain embodiments, the training neurophysiology data and the test neurophysiology data comprise electroencephalography (EEG) data, subgaleal EEG, electrocorticography (ECoG) data, intracranial electroencephalography (iEEG) data, electromyography (EMG) data, accelerometry data, or any combination thereof.
[0036] In certain embodiments, the training neurophysiology data and the test neurophysiology data comprise alpha frequency, beta frequency, gamma frequency, delta frequency, theta frequency, or mixed-frequency neural oscillations. In some embodiments, the delta frequency neural oscillations are in a range from 0.5 Hz to 4 Hz, the theta frequency neural oscillations are in a range from 4 Hz to 7 Hz, the alpha frequency neural oscillations are in a range from 8 Hz to 12 Hz, the beta frequency neural oscillations are in a range from 13 Hz to 30 Hz, and the gamma frequency neural oscillations are in a range from 60 Hz to 90 Hz.
[0037] In certain embodiments, assigning the clinical state label to each feature cluster comprises using sparse labeling based on auxiliary data or patient self-reports tracking a symptom of the neurological disorder or a psychiatric disorder, wherein the auxiliary data or patient self-reports are collected from the subject at sparse intervals during a day. In some embodiments, the sparse labeling comprises collecting the auxiliary data or patient self-reports at at least one time point for each feature cluster in order to assign a time-synchronized label from the auxiliary data or patient selfreports to each feature cluster, wherein the time-synchronized label is assigned to the entire feature cluster. In some embodiments, the auxiliary data is acquired with an accelerometer, a speech audio monitor, or a video recording device. In some embodiments, the auxiliary data are collected with an external wearable device that tracks the symptom.
[0038] In certain embodiments, assigning the clinical state label to each feature cluster comprises using a biomarker to identify an association between a feature cluster and a clinical state.
[0039] In certain embodiments, the neurological disorder is a movement disorder (e.g., Parkinson’s disease or dystonia), a sleep disorder, stroke, epilepsy, a traumatic brain injury, dementia, delirium, coma or a minimally conscious state, a pain-associated disorder, or a mood disorder (e.g., depression, bipolar disorder, or anxiety disorder).
[0040] In certain embodiments, the clinical state label is a sleep stage label, a symptom label, a mood label, or a brain plasticity state label. In some embodiments, the sleep stage label is N1, N2, N3, or phasic or tonic rapid eye movement (REM). In some embodiments, the symptom label is a motor symptom label such as, but not limited to, bradykinesia, rigidity, tremor, hyperkinesia,dyskinesia, dysphagia, parkinsonian gait, or postural instability. In some embodiments, the mood label is depression or anxiety.
[0041] In certain embodiments, the computer-implemented method further comprises segmenting the training neurophysiology data and the test neurophysiology data into a plurality of data epochs.
[0042] In an exemplary embodiment, a computer-implemented method for adjusting parameter settings of a neurostimulator for treatment of sleep dysfunction in a subject with deep brain stimulation is provided, the computer performing steps comprising: (a) receiving training neurophysiology data and test neurophysiology data for the subject, wherein the training neurophysiology data and the test neurophysiology data comprise brain electrical signals from a subcortical region or a cortical region of the brain of the subject recorded while the subject is sleeping; (b) using an unsupervised machine learning algorithm to cluster features of the training neurophysiology data; (c) assigning a sleep stage label to each feature cluster to generate sleep stage labeled training neurophysiology data; (d) training a supervised model using the sleep stage labeled training neurophysiology data to predict the sleep stage of the subject from the test neurophysiology data; and (e) adjusting the parameter settings of the neurostimulator to a predefined set of neuromodulatory parameters based on the sleep stage predicted for the subject from the test neurophysiology data. In some embodiments, the assigning of sleep labels comprises assigning a non-rapid eye movement (NREM) sleep stage label to a first feature cluster and a rapid eye movement (REM) or wake stage label to a second feature cluster, wherein the first feature cluster has higher average delta power compared to the second feature cluster. In some embodiments, training the supervised model comprises training a linear discriminant analysis (LDA) model to define a linear boundary for distinguishing between the first feature cluster and the second feature cluster. In some embodiments, computer-implemented method further comprises: generating an objective function for adjusting the parameter settings of the neurostimulator to maximize average delta power during the NREM sleep stage with respect to amplitude of deep brain stimulation administered to the basal ganglia region of the brain of the subject during the NREM sleep stage; and iteratively optimizing the parameter settings of the neurostimulator using an optimization algorithm with the objective function as input, wherein optimized parameter settings are generated by maximizing an objective function value to maximize average delta power during the NREM sleep stage. In some embodiments, iteratively optimizing the parameter settings comprises optimizing the parameter settings for each brain hemisphere of the subject. In some embodiments, iteratively optimizing the parameter settings of the neurostimulator comprises performing Bayesian optimization with a Gaussian process regression model of the objective function. In some embodiments, iteratively optimizing the parameter settings comprises within-night optimization performed during a single nightof sleep, wherein the objective function is evaluated and the parameter settings are updated one or more times during the night based on neurophysiology data acquired during that night. In some embodiments, iteratively optimizing the parameter settings comprises across-night optimization performed over a plurality of nights of sleep, wherein the objective function is evaluated at the conclusion of each night and the parameter settings are updated between nights based on cumulative observations. In some embodiments, across-night optimization comprises comparing neurophysiology data from each night to a characteristic night of sleep derived from baseline recordings, wherein the characteristic night comprises a mean and standard deviation of a rolling average of delta power across baseline nights at each time interval from first entrance into NREM sleep. In some embodiments, the computer-implemented method further comprises instructing the neurostimulator to apply deep brain stimulation to a basal ganglia region of the brain of the subject using the optimized parameter settings. In some embodiments, the cortical region comprises a precentral gyrus region, a cross-central sulcus region, or any combination thereof. In some embodiments, the subcortical region comprises a basal ganglia region. In some embodiments, the basal ganglia region is a subthalamic nucleus (STN) region, a globus pallidus region, or a thalamic region. In some embodiments, the training neurophysiology data and the test neurophysiology data comprise field potential data. In some embodiments, the unsupervised machine learning algorithm uses K-means clustering, K-medoids clustering, Gaussian mixture modeling, density-based spatial clustering of applications with noise (DBSCAN), an autoencoding neural network, a variational autoencoder, Riemannian geometry-based manifold learning on covariance matrices, contrastive learning, a hidden Markov model, isometric mapping (Isomap), locally linear embedding, t-distributed stochastic neighbor embedding (t-SNE), uniform manifold approximation and projection (UMAP), diffusion maps, spectral clustering, or a self-organizing map. In some embodiments, assigning the sleep stage label to each feature cluster comprises using sparse labeling based on ancillary extracranial polysomnography data, wherein the ancillary extracranial polysomnography data is synchronized with the training neurophysiology data, and wherein the ancillary polysomnography data is collected from the subject at sparse intervals while the subject is sleeping. In some embodiments, sparse labeling comprises collecting the ancillary extracranial polysomnography data at at least one time point for each feature cluster in order to assign a time-synchronized label from the ancillary extracranial polysomnography data to each feature cluster, wherein the time- synchronized label is assigned to the entire feature cluster.
[0043] In another exemplary embodiment, a computer-implemented method for adjusting parameter settings of a neurostimulator for treatment of Parkinson’s disease in a subject with deep brain stimulation is provided, the computer performing steps comprising: (a) receiving trainingneurophysiology data and test neurophysiology data for the subject, wherein the training neurophysiology data and the test neurophysiology data comprise brain electrical signals from a subthalamic nucleus region or a sensorimotor cortex region of the brain of the subject; (b) using an unsupervised machine learning algorithm to cluster features of the training neurophysiology data; (c) assigning a clinical state label to each feature cluster to generate labeled training neurophysiology data; (d) training a supervised model using the labeled training neurophysiology data to predict the clinical state of the subject from the test neurophysiology data; and (e) adjusting the parameter settings of the neurostimulator to a predefined set of neuromodulatory parameters based on the clinical state predicted for the subject from the test neurophysiology data. In some embodiments, assigning a clinical state label to each feature cluster comprises assigning a bradykinetic clinical state label to a first feature cluster and a non-bradykinetic clinical state label to a second feature cluster, wherein the first feature cluster has higher average beta power compared to the second feature cluster. In some embodiments, training the supervised model comprises training a linear discriminant analysis (LDA) model to define a linear boundary for distinguishing between the first feature cluster and the second feature cluster. In some embodiments, the computer-implemented method further comprises: generating an objective function for said adjusting the parameter settings of the neurostimulator to minimize time spent by the subject in the bradykinetic clinical state; and iteratively optimizing the parameter settings of the neurostimulator using an optimization algorithm with the objective function as input, wherein optimized parameter settings are generated by minimizing an objective function value to minimize the time spent by the subject in the bradykinetic clinical state. In some embodiments, iteratively optimizing the parameter settings comprises optimizing the parameter settings for each brain hemisphere of the subject. In some embodiments, iteratively optimizing the parameter settings of the neurostimulator comprises performing Bayesian optimization with a Gaussian process regression model of the objective function. In some embodiments, the computer-implemented method further comprises instructing the neurostimulator to apply deep brain stimulation to a subthalamic nucleus region or a globus pallidus internus region of the brain of the subject using the optimized parameter settings. In some embodiments, the training neurophysiology data and the test neurophysiology data comprise field potential data. In some embodiments, the unsupervised machine learning algorithm uses K-means clustering, K-medoids clustering, Gaussian mixture modeling, density-based spatial clustering of applications with noise (DBSCAN), an autoencoding neural network, a variational autoencoder, Riemannian geometrybased manifold learning on covariance matrices, contrastive learning, a hidden Markov model, isometric mapping (Isomap), locally linear embedding, t-distributed stochastic neighbor embedding(t-SNE), uniform manifold approximation and projection (UMAP), diffusion maps, spectral clustering, or a self-organizing map.
[0044] In another aspect, a computer implemented method for classifying sleep stages is provided, the computer performing steps comprising: (a) receiving a first set of recorded intracranial brain electrical signal data from a subcortical region or a cortical region of the brain of a subject, wherein the first set of intracranial brain electrical signal data is recorded while the subject is sleeping; (b) receiving extracranial polysomnography data, wherein the extracranial polysomnography data is synchronized with the first set of recorded intracranial brain electrical signal data; (c) segmenting the first set of recorded intracranial brain electrical signal data into a plurality of data epochs; (d) assigning a sleep stage label to each data epoch of the plurality of data epochs using the extracranial polysomnography data; (e) training a classification model using a gradient boosting machine learning algorithm or an artificial neural network to identify a power spectral density feature in each data epoch that is associated with the assigned sleep stage label, wherein a trained classification model is produced; (f) receiving a second set of recorded intracranial brain electrical signal data from the subcortical region or the cortical region of the brain of the subject, wherein the second set of intracranial brain electrical signal data is recorded while the subject is sleeping; and (g) detecting sleep stages based on power spectral density features in the second set of recorded intracranial brain electrical signal data using the trained classification model without using any extracranial polysomnography data.
[0045] In certain embodiments, the gradient boosting machine learning algorithm is a light gradientboosting machine (LightGBM) algorithm. In some embodiments, the gradient boosting machine learning algorithm is supervised.
[0046] In certain embodiments, the artificial neural network is a multi-layer perceptron (MLP).
[0047] In certain embodiments, training the classification model further comprises performing Bayesian hyperparameter optimization.
[0048] In certain embodiments, the subject receives deep brain stimulation therapy during recording of the first set and / or the second set of intracranial brain electrical signal data.
[0049] In certain embodiments, the computer implemented method further comprises: detecting sleep dysfunction in the subject by identifying an abnormal sequence or duration of the sleep stages; and instructing a stimulator to modify the deep brain stimulation therapy to reduce or prevent the sleep dysfunction in the subject.
[0050] In certain embodiments, the first set of recorded intracranial brain electrical signal data and the second set of recorded intracranial brain electrical signal data comprise intracranial brainelectrical signal data from the subcortical region or the cortical region of each hemisphere of the brain.
[0051] In certain embodiments, the first set of recorded intracranial brain electrical signal data and the second set of recorded intracranial brain electrical signal data comprise intracranial brain electrical signal data from the subcortical region or the cortical region of a single hemisphere of the brain.
[0052] In certain embodiments, the subcortical region comprises a basal ganglia region. In some embodiments, the basal ganglia region is a subthalamic nucleus (STN) region, a globus pallidus region, or a thalamic region. In some embodiments, the cortical region comprises a precentral gyrus region, a cross-central sulcus region, or any combination thereof.
[0053] In certain embodiments, the subject has sleep dysfunction.
[0054] In certain embodiments, the subject has a movement disorder (e.g., Parkinson’s disease or cervical dystonia).
[0055] In certain embodiments, each data epoch contains only a single sleep stage label. In some embodiments, the sleep stage label is N1, N2, N3, N4, or rapid eye movement (REM). In some embodiments, the sleep stage label is non-rapid eye movement (NREM) or rapid eye movement (REM).
[0056] In certain embodiments, the computer implemented method further comprises receiving accelerometry data and / or autonomic data for the subject while the subject is sleeping, wherein the accelerometry data and / or autonomic data are used in combination with the extracranial polysomnography data in assigning a sleep stage label to each data epoch.
[0057] In certain embodiments, the computer implemented method further comprises receiving auxiliary data from a noninvasive sleep monitoring device, a wearable sleep monitoring device, a photoplethysmography (PPG)-based sleep monitoring device, or a radar-based sleep monitoring device while the subject is sleeping, wherein the auxiliary data are used in combination with the extracranial polysomnography data in said assigning a sleep stage label to each data epoch.
[0058] In certain embodiments, the intracranial brain electrical signal data comprises field potential data.
[0059] In certain embodiments, the recorded intracranial brain electrical signal data comprises neural oscillations in a frequency range from 0.5 Hz to 60 Hz.
[0060] In another aspect, a computer implemented method for classifying sleep stages is provided, the computer performing steps comprising: (a) receiving a first set of recorded intracranial brain electrical signal data from a subcortical region or a cortical region of the brain of a subject, wherein the first set of intracranial brain electrical signal data is recorded while the subject is sleeping; (b)receiving extracranial polysomnography data, wherein the extracranial polysomnography data is synchronized with the first set of recorded intracranial brain electrical signal data; (c) segmenting the first set of recorded intracranial brain electrical signal data into a plurality of data epochs; (d) assigning a sleep stage label to each data epoch of the plurality of data epochs using the extracranial polysomnography data; (e) training a classification model using a convolutional neural network to identify a spectrogram feature in each data epoch that is associated with the assigned sleep stage label, wherein a trained classification model is produced; (f) receiving a second set of recorded intracranial brain electrical signal data from the subcortical region or the cortical region of the brain of the subject, wherein the second set of intracranial brain electrical signal data is recorded while the subject is sleeping; and (g) detecting sleep stages based on spectrogram features in the second set of recorded intracranial brain electrical signal data using the trained classification model without using any extracranial polysomnography data.
[0061] In certain embodiments, the convolutional neural network comprises five convolutional layers followed by three fully connected layers.
[0062] In certain embodiments, the training the classification model further comprises performing Bayesian hyperparameter optimization.
[0063] In certain embodiments, the subject receives deep brain stimulation therapy during recording of the first set and / or the second set of intracranial brain electrical signal data.
[0064] In certain embodiments, the computer implemented method further comprises: detecting sleep dysfunction in the subject by identifying an abnormal sequence or duration of the sleep stages; and instructing a neurostimulator to modify the deep brain stimulation therapy to reduce or prevent the sleep dysfunction in the subject.
[0065] In certain embodiments, the first set of recorded intracranial brain electrical signal data and the second set of recorded intracranial brain electrical signal data comprise intracranial brain electrical signal data from the subcortical region or the cortical region of each hemisphere of the brain. In other embodiments, the first set of recorded intracranial brain electrical signal data and the second set of recorded intracranial brain electrical signal data comprise intracranial brain electrical signal data from the subcortical region or the cortical region of a single hemisphere of the brain.
[0066] In certain embodiments, the subcortical region comprises a basal ganglia region. In some embodiments, the basal ganglia region is a subthalamic nucleus (STN) region, a globus pallidus region, or a thalamic region.
[0067] In certain embodiments, the cortical region comprises a precentral gyrus region, a crosscentral sulcus region, or any combination thereof.
[0068] In certain embodiments, the subject has sleep dysfunction.
[0069] In certain embodiments, the subject has a movement disorder, optionally wherein the movement disorder is Parkinson’s disease or cervical dystonia.
[0070] In certain embodiments, each data epoch contains only a single sleep stage label. In some embodiments, the sleep stage label is N1, N2, N3, N4, or rapid eye movement (REM). In other embodiments, the sleep stage label is non-rapid eye movement (NREM) or rapid eye movement (REM).
[0071] In certain embodiments, the computer implemented method further comprises receiving accelerometry data and / or autonomic data for the subject while the subject is sleeping, wherein the accelerometry data and / or autonomic data are used in combination with the extracranial polysomnography data in said assigning a sleep stage label to each data epoch.
[0072] In certain embodiments, the computer implemented method further comprises receiving auxiliary data from a noninvasive sleep monitoring device, a wearable sleep monitoring device, a photoplethysmography (PPG)-based sleep monitoring device, or a radar-based sleep monitoring device while the subject is sleeping, wherein the auxiliary data are used in combination with the extracranial polysomnography data in said assigning a sleep stage label to each data epoch.
[0073] In certain embodiments, the brain electrical signal data comprises field potential data.
[0074] In certain embodiments, the recorded intracranial brain electrical signal data comprises delta frequency neural oscillations in a range from 0.5 Hz to 4 Hz, theta frequency neural oscillations in a range from 4 Hz to 7 Hz, alpha frequency neural oscillations in a range from 8 Hz to 12 Hz, beta frequency neural oscillations in a range from 13 Hz to 30 Hz, or any combination thereof.
[0075] In another aspect, a non-transitory computer-readable medium is provided, the non-transitory computer-readable medium comprising program instructions that, when executed by a processor in a computer, causes the processor to perform a computer-implemented method described herein.
[0076] In another aspect, a kit comprising the non-transitory computer-readable medium is provided.
[0077] In another aspect, a system is provided, the system comprising: a neural recording electrode;a neurostimulator; a data receiving device comprising a processor programmed according to a computer implemented method described herein; and a display, wherein the display is connected to the data receiving device.
[0078] In certain embodiments, the neurostimulator provides electrical stimulation, magnetic stimulation, or ultrasound stimulation.
[0079] In certain embodiments, the electrical stimulation is applied unilaterally or bilaterally.
[0080] In certain embodiments, the neurostimulator provides deep brain stimulation, subgaleal electrical stimulation, transcranial stimulation (e.g., transcranial stimulation is transcranial direct current stimulation, transcranial alternating current stimulation, or transcranial magnetic stimulation),spinal cord stimulation, peripheral nerve stimulation, peripheral nerve field stimulation, neuromuscular electrical stimulation, or focused ultrasound stimulation. In some embodiments, the neurostimulator provides the peripheral nerve stimulation or peripheral nerve field stimulation to a vagus nerve, a median nerve, an ulnar nerve, a radial nerve, an occipital nerve, a sphenopalatine ganglion, a trigeminal nerve, a tibial nerve, a sacral nerve, a hypoglossal nerve, a phrenic nerve, a greater auricular nerve, a peroneal nerve, a sciatic nerve, a pudendal posterior nerve, a saphenous nerve, a suprascapular nerve, a carotid sinus nerve, a cervical sympathetic chain nerve, or a auriculotemporal nerve.
[0081] In certain embodiments, the system further comprises a video recording device.
[0082] In certain embodiments, the system further comprises an external wearable monitor that can acquire accelerometry data, gyroscope data, magnetometer surface electromyographic (sEMG) data, or any combination thereof.
[0083] In certain embodiments, the system further comprises a noninvasive sleep monitoring device, a wearable sleep monitoring device, a photoplethysmography (PPG)-based sleep monitoring device, or a radar-based sleep monitoring device.
[0084] In certain embodiments, the data receiving device is a computer, a cloud computing system, a handheld device (e.g., cell phone or tablet), a smartwatch, or a smart ring.
[0085] In certain embodiments, the display is a liquid crystal display (LCD), light-emitting diode (LED) display, microLED display comprising microscopic LEDs, plasma (PDP) display, quantum dot LED (QLED) display, organic light emitting diode (OLED) display, quantum dot OLED (QD-OLED) display, or cathode ray tube display device.
[0086] In certain embodiments, the system further comprises a stimulation electrode, wherein the stimulation electrode is connected to the neurostimulator.
[0087] In certain embodiments, the stimulation electrode is a non-brain penetrating surface electrode array or a brain-penetrating electrode array.
[0088] In another aspect, a method of using a system, described herein, is provided, the method comprising: acquiring training neurophysiology data and test neurophysiology data for a subject using the neural recording electrode; adjusting the parameter settings of the neurostimulator to a predefined set of neuromodulatory parameters based on the clinical state predicted for the subject from the test neurophysiology data according to a computer implemented method described herein; and applying stimulation to a target region of the subject using the adjusted parameter settings.
[0089] In certain embodiments, the stimulation comprises electrical stimulation, magnetic stimulation, or ultrasound stimulation. In some embodiments, the stimulation comprises deep brain stimulation, subgaleal electrical stimulation, transcranial stimulation (e.g., transcranial stimulation istranscranial direct current stimulation, transcranial alternating current stimulation, or transcranial magnetic stimulation), spinal cord stimulation, peripheral nerve stimulation, peripheral nerve field stimulation, neuromuscular electrical stimulation, or focused ultrasound stimulation. In some embodiments, the electrical stimulation is delivered to a brain region, spinal cord, peripheral nerve, or muscle of the subject. In some embodiments, the peripheral nerve is a vagus nerve, a median nerve, an ulnar nerve, a radial nerve, an occipital nerve, a sphenopalatine ganglion, a trigeminal nerve, a tibial nerve, a sacral nerve, a hypoglossal nerve, a phrenic nerve, a greater auricular nerve, a peroneal nerve, a sciatic nerve, a pudendal posterior nerve, a saphenous nerve, a suprascapular nerve, a carotid sinus nerve, a cervical sympathetic chain nerve, or a auriculotemporal nerve.
[0090] In certain embodiments, the method further comprises using the supervised model to classify the clinical state of the subject as a desired clinical state or an undesired clinical state; generating an objective function for said adjusting the parameter settings of the neurostimulator to maximize time spent by the subject in the desired clinical state or minimize time spent by the subject in the undesired clinical state; iteratively optimizing the parameter settings of the neurostimulator using an optimization algorithm with the objective function as input, wherein optimized parameter settings are generated by maximizing an objective function value to maximize the time spent by the subject in the desired clinical state or minimizing the objective function value to minimize the time spent by the subject in the undesired clinical state; and applying stimulation to a target region of the subject using the optimized parameter settings.
[0091] In certain embodiments, assigning the clinical state label to each feature cluster comprises using sparse labeling based on auxiliary data or patient self-reports tracking a symptom of the neurological disorder or a psychiatric disorder, wherein the auxiliary data or patient self-reports are collected from the subject at sparse intervals during a day. In some embodiments, sparse labeling comprises collecting the auxiliary data or patient self-reports at at least one time point for each feature cluster in order to assign a time-synchronized label from the auxiliary data or patient selfreports to each feature cluster, wherein the time-synchronized label is assigned to the entire feature cluster. In some embodiments, the auxiliary data are acquired with an accelerometer, a speech audio monitor, or a video recording device. In some embodiments, the auxiliary data are collected with an external wearable device that tracks the symptom.
[0092] In certain embodiments, assigning the clinical state label to each feature cluster comprises using a biomarker to identify an association between a feature cluster and a clinical state.BRIEF DESCRIPTION OF THE DRAWINGS
[0093] FIGS. 1A-1C. (FIG. 1A) Intracranial data acquisition: the RC+S devices concomitantly record field potentials from the basal ganglia and the cortex (inset). Data are transmitted via telemetry to relay devices (1), then to a nearby tablet (2) using Bluetooth connection, and uploaded to the cloud.(FIG. 1B) Extracranial data acquisition: the portable Dreem polysomnogram headset was worn by the participant (top left). Dreem headband contains five dry electrodes, corresponding to seven electrode configurations. Ten second raw EEG trace from Dreem headband shown on the right, scale bar indicates 100 μV. Accelerometry stream not shown. After the polysomnogram data stream is completed, a hypnogram (bottom) of the participant’s sleep is generated. (FIG. 1C) Flowchart of the complete data acquisition and processing pipeline. Data is collected via dual streams and synchronized. Labeled data is then analyzed via different data processing and model training pipelines. Top branch indicates the ‘unconstrained’ pipeline, where contemporary approaches are benchmarked on the ability to classify all 5 sleep stages. The bottom branch indicates the ‘constrained’ pipeline, where data processing and model choices are limited to device embeddable methodologies.
[0094] FIG. 2. Flowchart of unsupervised vs supervised classification of NREM sleep. The bottom pathway conveys the conventional supervised learning approach. Additionally, the (top) unsupervised pathway generates surrogate cluster labels using GMMs. An LDA is trained on the cluster labels, but tested on the same hold-out test set containing sleep stage labels as the supervised learning approach to ascertain how closely the unsupervised labels match the supervised labels.
[0095] FIGS. 3A-3B. (FIG. 3A) Power spectral density plots from the precentral gyrus for each participant, partitioned by sleep stage (legend). Y-axis corresponds to the log base 10 of the spectral power. Top row depicts left device, bottom row depicts right device. (FIG. 3B) Log-standardized distributions of canonical power bands colored by sleep stage, with area for each color renormalized to one. Legend shared with FIG. 3A. Left and right hemispheres were aggregated together, prior to standardizing. Each row is a participant, with row groupings indicating a brain region. Columns indicate frequency bands in which frequency powers were summed. “CTX” refers to precentral gyrus. Delta: 1-5 Hz, Theta: 4-8 Hz, Alpha: 8-12 Hz, Beta: 12-30 Hz, Gamma: 30-60 Hz.
[0096] FIGS. 4A-4B. Performance of 5 Stage Sleep Stage Classification Models. (FIG. 4A) Table showing model accuracy on hold-out test set for each hemisphere. Numbers indicate the proportion of sleep stages correctly classified. Teal indicates better performance, while red indicates worse performance. (FIG. 4B) Scatter plot of time domain models’ accuracy compared to that of spectral models (Linear Mixed Model, using each unique grouping of (model, hemisphere) as the randomeffect. PSD vs Time Series; p = 4.5e-4; n=20. PSD vs Spectrogram; p = 0.041; n=20 / 10. Spectrogram vs Time Series; p = 0.52; n=10 / 20)
[0097] FIG. 5. Feature importance for LightGBM. Maximum split gain within each canonical power band. Rows indicate the brain hemisphere, and columns indicate participants. Color indicates the brain region: BG - Basal Ganglia; CS - Cross-central Sulcus; PG - Precentral Gyrus.
[0098] FIGS. 6A-6C. Model Performance segregated by Brain Region. (FIG. 6A) Table of model accuracies on hold-out test set, partitioned by brain region field potential used for model training and testing. Teal indicates better performance, while red indicates worse performance. (FIG. 6B) Comparison of all models across all hemispheres when trained on Basal Ganglia (BG) field potentials versus Cortical (precentral gyrus; CTX) field potentials (Linear Mixed Model [LMM], using each unique grouping of (model, hemisphere) as the random effect; p<1e-4; n=50) and Cortical vs Dual Cortical and BG (i.e. BG+CTX) (Linear Mixed Model [LMM], using each unique grouping of (model, hemisphere) as the random effect; p<1e-3; n=50) (FIG. 6C) Comparison of all models when trained on STN (participants 02,07) field potentials versus GP (participants 03,09) field potentials (LMM with (model, hemisphere) as random effect; p=0.23; n=20). Participant 16 was excluded to focus this analysis on participants with Parkinson’s disease.
[0099] FIGS. 7A-7C. Unsupervised Learning of NREM sleep. (FIG. 7A) Comparing distributions of features in the training set for the supervised vs unsupervised approach, from precentral gyrus data stream. Top - Example participant (PD02 Left device). Each column grouping consists of box plots summarizing the distributions of that particular power band. Colors indicate the classification label used for training the LDA. Bottom - The average of each power band for each participant, partitioned by classification label. Points depict each participant’s average power. Box plots represent distribution of average power across participants. (FIG. 7B) Table depicting the confusion matrix between surrogate class labels and true sleep stage labels for each participant’s training set. Numbers indicate the total number of data points that belong in the intersection between the label conditions. (FIG. 7C) Table showing the accuracy of LDA trained with canonical power bands and sleep stage labels (Supervised LDA) vs cluster labels (Unsupervised LDA) on a hold-out test set of sleep stage labeled power bands, partitioned by brain region.
[0100] FIG. 8. Box plots depicting the distributions of recorded time in each sleep stage across nights. Colors indicate distinct sleep stages, with columns corresponding to participants and rows corresponding to each brain hemisphere.
[0101] FIG. 9. Model accuracies, as reported by the hold-out test set, without applying class imbalance correction and data augmentation when training on the test set.
[0102] FIG. 10. Model accuracies as compared across hemispheres, or aggregated across hemispheres (‘Both’). When aggregating data across hemispheres, epochs when data was only present in a single hemisphere (e.g. the contralateral device had a temporary disconnection) were removed from the dataset.
[0103] FIG. 11. Model sensitivity for each individual sleep stage across all participant hemispheres.
[0104] FIG. 12. Confusion matrices of each model’s performance, aggregated across all participant hemispheres.
[0105] FIGS. 13A-13B. (FIG. 13A) Performance of AttnSleepEnsemble when using default,
[0106] “out-of-the-box” model hyperparameters trained on field potentials downsampled to 100 Hz.(FIG. 13B) Statistical tests were not substantially affected by changing the hyperparameters of AttnSleep models.
[0107] FIG. 14. Table comparing hold-out test set accuracies on NREM vs Wake+REM classification for Linear Discriminant Models. Log Transform indicates the power band data points underwent a natural logarithm transformation prior to z-scoring and training. No Log Transform indicates that the raw power band data was z-scored and used for training.
[0108] FIG. 15. Distributions of Supervised vs Unsupervised training data labels, as described inFIG. 7A, for all participants. Left grouping of columns corresponds to the left hemisphere, while right grouping corresponds to the right hemisphere.
[0109] FIG. 16. Accuracy for NREM vs Other (REM and Wake) classification on hold-out test set.
[0110] FIG. 17. Flow-chart Schematic. The method is performed until it is ineffective. Steps 1-6 are repeated if necessary due to distribution shift or change in patient condition.
[0111] FIG. 18. Steps 1-6 Example: Unsupervised learning of Sleep state and modeling brain responses to stimulation amplitude using Gaussian Process regression and subsequently finding optimal stimulation parameters.
[0112] FIG. 19. Step 2-3: Cluster power data into two groups to recapitulate NREM and REM+Wake sleep stages. The neural data, once transformed into the feature space via power band calculations, was clustered into two groups using Gaussian Mixture Modeling (GMM), an unsupervised approach that models the data density as a linear combination of a predetermined number of gaussian densities. Here, GMM identified two clusters. Using prior knowledge on sleep physiology, we identified the cluster with higher average delta power as a cluster corresponding to NREM sleep.
[0113] FIG. 20. Step 4-5: Cluster power data into two groups to recapitulate NREM and REM + Wake sleep stages. Embed Linear Models on RC+S device. Using the cluster identities for specific data points as their respective class labels, we train a Linear Discriminant Analysis model to define a boundary line in feature space to discriminate between NREM and REM + Wake sleep stages.This machine learning determined boundary is ultimately embedded onto our closed-loop neuromodulatory system. As the system runs in real-time, data points classified as NREM sleep will trigger the DBS system to change the stimulation amplitude to a pre-programmed target amplitude. A real-time example of the adaptive system inferring the physiological state from a linear model trained on the unsupervised cluster labels, and initiating neuromodulatory changes in response to physiological state is shown in FIG. 20.
[0114] FIG. 21. Step 6: Define objective function, and optimize over adaptive policies (i.e., choose optimal adaptive parameters) using Bayesian Optimization. In order to develop an objective function that is robust to both signal disconnections during non-stationary physiology and intermittent signal disconnections of varying length, we propose leveraging the baseline data collection used for model development (Step 1) as a comparative signal to the signals acquired during adaptive policy trials. For sleep specifically, power in the low-frequency band of interest (1-4 Hz), the delta band, slowly attenuates in healthy sleep as sleep progresses from start to finish, and the RC+S system is prone to Bluetooth disconnections, resulting in data loss. To circumvent these issues, we calculate the rolling average of the delta power, during putative NREM sleep, for each of the baseline nights of recording. We then temporally align rolling averages across nights by calculating each data point’s time interval from the first entrance into NREM sleep for that particular night. From this aggregation across nights, we can get a ‘characteristic night of sleep’, which is the mean of the rolling delta averages across nights at each time interval, and the subsequent standard deviation. New nights of sleep are compared against this ‘characteristic night’ via a z-score function. Positive values of z- scored incoming data corresponds to a quantification that new data is better than baseline, and vice versa for negative values. This concept is illustrated in FIG. 21, where the faint lines correspond to rolling averages of delta power for different nights of sleep. The lower black line and gray region correspond to the mean and standard deviation at that particular time-point across nights. The upper black line is a new night of recording, where an adaptive stimulation policy is deployed onto the device. The efficacy of the deployed adaptive policy is quantified by z-scoring the final datapoint in the rolling delta power average (i.e. the final position on the red line below). This methodology robustly quantifies the adaptive policy’s effect on the biomarker of interest, by simultaneously smoothing over intermittent signal disconnects while capturing the biomarker’s non-stationary dynamics.
[0115] FIG. 22. An example of a gaussian process model of the left and right stimulation target amplitudes effect on overnight NREM delta power.DETAILED DESCRIPTION OF THE INVENTION
[0116] Devices, systems, software, and methods are provided for optimization of adaptive neuromodulation for treating neurological disorders and psychiatric disorders. In particular, methods of using personalized supervised and unsupervised machine learning models for classification of features in neurophysiology data are provided. In addition, methods of using Bayesian optimization of stimulation parameters to promote desired clinical states and avoid undesired clinical states are provided.
[0117] Before the present devices, systems, software, and methods are described, it is to be understood that this invention is not limited to the particular devices, systems, software, and methods described, as such may, of course, vary. It is also to be understood that the terminology used herein is for the purpose of describing particular embodiments only, and is not intended to be limiting, since the scope of the present invention will be limited only by the appended claims.
[0118] Where a range of values is provided, it is understood that each intervening value, to the tenth of the unit of the lower limit unless the context clearly dictates otherwise, between the upper and lower limits of that range is also specifically disclosed. Each smaller range between any stated value or intervening value in a stated range and any other stated or intervening value in that stated range is encompassed within the invention. The upper and lower limits of these smaller ranges may independently be included or excluded in the range, and each range where either, neither or both limits are included in the smaller ranges is also encompassed within the invention, subject to any specifically excluded limit in the stated range. Where the stated range includes one or both of the limits, ranges excluding either or both of those included limits are also included in the invention.
[0119] Unless defined otherwise, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this invention belongs. Although any methods and materials similar or equivalent to those described herein can be used in the practice or testing of the present invention, some potential and preferred methods and materials are now described. All publications mentioned herein are incorporated herein by reference to disclose and describe the methods and / or materials in connection with which the publications are cited. It is understood that the present disclosure supersedes any disclosure of an incorporated publication to the extent there is a contradiction.
[0120] As will be apparent to those of skill in the art upon reading this disclosure, each of the individual embodiments described and illustrated herein has discrete components and features which may be readily separated from or combined with the features of any of the other several embodiments without departing from the scope or spirit of the present invention. Any recited method can be carried out in the order of events recited or in any other order which is logically possible.
[0121] It must be noted that as used herein and in the appended claims, the singular forms “a”, “an”, and “the” include plural referents unless the context clearly dictates otherwise. Thus, for example, reference to “an electrode” or “the electrode” includes a plurality of such electrodes and reference to “an electrical signal” or “the electrical signal” includes reference to one or more electrical signals, and so forth.
[0122] It is further noted that the claims may be drafted to exclude any element which may be optional. As such, this statement is intended to serve as antecedent basis for use of such exclusive terminology as “solely”, “only” and the like in connection with the recitation of claim elements, or the use of a “negative” limitation.
[0123] The publications discussed herein are provided solely for their disclosure prior to the filing date of the present application. Nothing herein is to be construed as an admission that the present invention is not entitled to antedate such publication by virtue of prior invention. Further, the dates of publication provided may be different from the actual publication dates which may need to be independently confirmed.Definitions
[0124] The term “about,” particularly in reference to a given quantity, is meant to encompass deviations of plus or minus five percent.
[0125] The term "neurological disorder" refers to any disorder that impairs function of the nervous system. Neurological disorders include, but are not limited to, movement disorders, sleep disorders, stroke, epilepsy, traumatic brain injuries, dementia, mild cognitive impairment, multiple sclerosis, delirium, coma, minimally conscious states, or pain-associated disorders.
[0126] The term “movement disorder” refers to any type of neurological disorder that causes either increased movements or reduced or slow movements. Movement disorders include, but are not limited to, Parkinson’s disease, parkinsonism, progressive supranuclear palsy, ataxia, cervical dystonia, chorea, dystonia, functional movement disorder, Huntington’s disease, multiple system atrophy, myoclonus, tardive dyskinesia, Tourette syndrome, tremor, restless legs syndrome, and Wilson’s disease. Symptoms may include, but are not limited to, tremor, involuntary movements, slowness of movement (bradykinesia), rigidity, postural instability, twisting movements, poor balance, irregularity of movements, stumbling, and difficulty with walking. In some cases, a movement disorder is caused by genetic and / or environmental factors, head trauma, infections, inflammation, metabolic disturbances, toxins, adverse reactions to medications, or stressful life events.
[0127] The term “sleep dysfunction’’ is used to refer herein to a sleep-wake disorder that causes sleeplessness, insomnia, or poor sleep quality. Sleep dysfunction may include difficulty falling asleep or staying asleep, frequent nocturnal awakenings, early morning awakening, sleep fragmentation, reduced total sleep time, reduced deep sleep time, reduced non-REM or REM sleep time, and / or inability to reach deep sleep (stage N3 or delta sleep). In addition, sleep dysfunction may be associated with overnight emergence of motor symptoms, pain, nocturia, sleep disordered breathing, periodic limb movement disorder (PLMD), parasomnia, sleep apnea, REM sleep behavior disorder (RBD), circadian rhythm dysfunction, and / or excessive daytime somnolence. Tremor, rigidity and dyskinesias associated with a movement disorder such as Parkinson’s disease or cervical dystonia may occur during nocturnal awakenings and contribute to sleep dysfunction by prolonging awakenings and inability to fall back to sleep.
[0128] In some embodiments, sleep dysfunction is associated with a stroke. Insomnia may occur after a stroke, particularly in patients who have right hemispheric strokes or strokes within the thalamus or brainstem, including the pontine tegmentum and thalamo-mensencephalic region. Hypersomnia may occur after a stroke in patients who have subcortical (caudate, putamen), upper pontine, medial ponto-medullary or cortical strokes affecting the reticular activating system (RAS). Paramedian or bilateral thalamic strokes may initially induce coma, followed by hypersomnia after awakening of the patient. Supratentorial strokes may reduce non-REM sleep, total sleep time, and ipsilateral or bilateral sleep spindles. Saw-tooth waves may be reduced after a hemispheric stroke. REM sleep may be reduced after an occipital stroke. Strokes in the ponto-mesencephalic junction and the raphe nucleus may reduce the amount of non-REM sleep. Strokes in the lower pons can selectively reduce REM sleep. Paramedian thalamus and lower pontine strokes may reduce slow- wave sleep. In some cases, insomnia is caused by deep brain stimulation therapy (e.g., insomnia caused by DBS such as used for treatment of a movement disorder such as Parkinson’s disease or dystonia or a psychiatric disorder such as obsessive-compulsive disorder or major depressive disorder).
[0129] The term “symptom” as used in the context of sleep dysfunction, may include, without limitation, problems with poor quality of sleep, timing of sleep, and / or the amount of sleep of a subject. A symptom of sleep dysfunction may include sleeplessness, difficulty falling asleep, difficulty staying asleep, reduced total sleep time, reduced deep sleep time, reduced non-REM or REM sleep time, and / or inability to reach deep sleep (stage N3 or delta sleep).
[0130] The term “psychiatric disorder” is used herein to refer to a condition that affects mood and / or behavior of a person suffering from the disorder. Psychiatric disorders include major depressive disorder (MDD), generalized anxiety disorder (GAD), post-traumatic stress disorder (PTSD),addiction, anorexia, obsessive-compulsive disorder (OCD), bipolar disorder (BD), disorders of diminished motivation (DDM), and chronic pain.
[0131] The term “affective disorders” is used herein to refer to a group of psychiatric disorders that typically affect mood of the person suffering from such a disorder. Psychiatric disorders that affect the mood are also referred to as mood disorders and are commonly associated with depression and / or anxiety. The main types of affective disorders are depression, bipolar disorder, and anxiety disorder. Symptoms vary by individual, but they typically affect mood. They can range from mild to severe.
[0132] As used herein the term “depression” refers to a mental state of morbid sadness, dejection, or melancholy.
[0133] As used herein the term “anxiety” refers to an uncomfortable and unjustified sense of apprehension that may be diffuse and unfocused and is often accompanied by physiological symptoms.
[0134] As used herein the term “bipolar disorder” refers to a type of affective disorder in which the person suffering from this disorder goes through periods of depression and periods of mania (feeling extremely positive and active).
[0135] As used herein the term “anxiety disorder” refers to a psychiatric disorder characterized by feelings of nervousness, anxiety, and even fear. Anxiety disorders include social anxiety (anxiety caused by social situations), post-traumatic stress disorder (anxiety, fear, and flashbacks caused by a traumatic event), generalized anxiety disorder (anxiousness and fear in general, with no particular cause), panic disorder (anxiety that causes panic attacks), and obsessive-compulsive disorder (obsessive thoughts that cause anxiety and compulsive actions).
[0136] As used herein the term “disorders of diminished motivation” refers to psychiatric disorders characterized by a reduction in motivation, will, and emotional expression. Such disorders often involve a lack of goal-directed behavior and a reduction in speech, movement, and emotional responses. Disorders of diminished motivation include apathy, abulia, and akinetic mutism.
[0137] The term “pain-associated disorder” is used herein to refer to conditions that cause pain in a person suffering from the disorder. The pain may be chronic, idiopathic, nociceptive, inflammatory, visceral or neuropathic pain. Pain-associated disorders include, without limitation, back pain, failed back surgery syndrome, spinal cord injury, spinal stenosis, post-surgical pain, complex regional pain syndrome, arachnoiditis, angina, nerve-related pain (e.g., such as caused by diabetic neuropathy, cancer-related neuropathy, or nerve damage caused by radiation, surgery, or chemotherapy), peripheral vascular disease, pain after an amputation, visceral abdominal pain, perineal pain, multiple sclerosis, arthritis, or chronic leg pain (e.g., sciatica), neck pain, foot pain, or arm pain.
[0138] The terms “individual”, “subject”, “recipient”, and “patient” are used interchangeably herein and refer to any mammalian subject for whom treatment or therapy is desired, particularly humans. " Mammal" for purposes of treatment refers to any animal classified as a mammal, including human and non-human mammals such as non-human primates, including chimpanzees and other apes and monkey species; laboratory animals such as mice, rats, rabbits, hamsters, guinea pigs, and chinchillas; domestic animals such as dogs and cats; and farm animals such as sheep, goats, pigs, horses and cows.
[0139] The term “user” as used herein refers to a person that interacts with a device and / or system disclosed herein for performing one or more steps of the presently disclosed methods. The user may be a patient being diagnosed or receiving treatment for a neurological disorder, a psychiatric disorder, or sleep dysfunction. The user may be a health care practitioner, such as, the patient’s physician.
[0140] By “treatment” or “treating” is meant that at least an amelioration of one or more symptoms associated with the condition afflicting the subject is achieved such that the patient has a desired or beneficial clinical result, where amelioration refers to at least a reduction in the magnitude of a parameter, e.g., a symptom, associated with the condition being treated. As such, treatment includes a broad spectrum of situations ranging from lessening intensity, duration or extent of impairment caused by a condition and / or correlated with a condition, up to and including completely eliminating the condition, along with any associated symptoms. Treatment therefore includes situations where the condition, or at least a symptom associated therewith, is completely inhibited, e.g., prevented from happening, or stopped, e.g., terminated, such that the subject no longer suffers from the condition, or at least the symptoms that characterize the condition. Treatment also includes situations where the progression of the condition, or at least the progression of a symptom associated therewith, is slowed, delayed, or halted. In such cases, a subject might still have residual symptoms associated with a condition, but any increase in the severity or magnitude of the symptoms is slowed, delayed, or prevented.
[0141] The terms "connected" or "coupled" are used in an operational sense and are not necessarily limited to a direct connection or coupling. For example, two devices or components may be coupled directly, or via one or more intermediary media or devices. As another example, devices may be coupled in such a way that information or data can be passed between them, while not sharing any physical connection with one another. In some cases, two devices or components may be connected by a wire or wirelessly to each other.
[0142] The term "representation learning" refers to machine learning techniques that learn a transformation of raw data into a representation that captures meaningful structure for downstreamtasks. Representation learning methods include, but are not limited to, manifold learning techniques that discover low-dimensional structure in high-dimensional data, contrastive learning methods that learn representations by comparing similar and dissimilar samples, and latent variable models that infer hidden states from observed data. Representation learning may be performed in an unsupervised, semi-supervised, or self-supervised manner.
[0143] The term "manifold learning" refers to dimensionality reduction techniques that assume data lies on or near a low-dimensional manifold embedded in high-dimensional space. Manifold learning methods include, but are not limited to, Riemannian geometry- based methods, isometric mapping methods (e.g., Isomap), locally linear embedding (LLE), Laplacian eigenmaps, t-distributed stochastic neighbor embedding (t-SNE), uniform manifold approximation and projection (UMAP), diffusion maps, and kernel principal component analysis (kernel PCA).
[0144] The term "contrastive learning" refers to self-supervised representation learning methods that learn embeddings by contrasting positive pairs (similar or augmented samples) against negative pairs (dissimilar samples). Contrastive learning methods include, but are not limited to, SimCLR, Momentum Contrast (MoCo), contrastive predictive coding (CPC), bootstrap your own latent (BYOL), SwAV, and Barlow Twins.
[0145] The term "state estimation" refers to methods for inferring the current state of a dynamical system from noisy or partial observations. State estimation methods for neurophysiology data include, but are not limited to, Kalman filtering, extended Kalman filtering, unscented Kalman filtering, particle filtering (e.g., sequential Monte Carlo methods), switching state-space models, and latent variable models. State estimation may be performed online (in real-time) or offline (retrospectively).
[0146] The term "latent variable model" refers to a statistical model that includes unobserved (latent) variables that influence observed variables. Latent variable models for neurophysiology include, but are not limited to, Gaussian Process Latent Variable Models (GP-LVM), Gaussian Process Factor Analysis (GPFA), Latent Factor Analysis via Dynamical Systems (LFADS), Poisson Linear Dynamical Systems (PLDS), and probabilistic principal component analysis (PPCA).
[0147] The term "switching dynamical system" refers to a dynamical system model that assumes the system can switch between multiple discrete modes or regimes, each with its own dynamics. Switching dynamical systems include, but are not limited to, switching linear dynamical systems (SLDS), recurrent switching linear dynamical systems (rSLDS), switching state-space models, and regime-switching models.
[0148] The term "reinforcement learning" refers to a category of machine learning methods wherein an agent learns to make decisions by interacting with an environment to maximize cumulative reward. Reinforcement learning methods include model-free methods (e.g., Q-learning, state-action-reward-state-action (SARSA), policy gradient methods, actor-critic methods), model-based methods (e.g., Dyna, probabilistic inference for learning control (PILCO), model-based policy optimization (MBPO)), and hybrid methods. In the context of neuromodulation, the environment corresponds to the patient's neurophysiology, the actions correspond to stimulation parameter adjustments, and the reward corresponds to improvement in clinical state.
[0149] The term "multi-armed bandit" refers to a class of sequential decision-making problems wherein an agent must choose among multiple options (arms) to maximize reward, balancing exploration of uncertain options with exploitation of known good options. Multi-armed bandit algorithms include, but are not limited to, ε-greedy, upper confidence bound (UCB), Thompson sampling, and contextual bandits.
[0150] The term "model-based reinforcement learning" refers to reinforcement learning methods that learn a model of the environment dynamics and use this model for planning. Model-based methods include, but are not limited to, probabilistic inference for learning control (PILCO), model-based policy optimization (MBPO), Dyna architectures, and world models.Systems and Computer Implemented Methods
[0151] The present disclosure provides systems and computer-implemented methods for automating the classification of features in neurophysiology data to determine the clinical state of a subject in real time and adjust stimulation parameters accordingly for treatment of the subject. The system may be an open-loop or closed-loop system configured for performing the methods provided herein. In some embodiments, the system comprises a stimulator (e.g., capable of providing electrical stimulation, magnetic stimulation, or ultrasound stimulation), and a neural recording electrode, adapted for positioning at a region (e.g., a subcortical region such as a basal ganglia region or a cortical region such as a precentral gyrus region or a cross-central sulcus region for detecting neural signals associated with sleep stages or sleep dysfunction; a sensorimotor cortex region, subthalamic nucleus region, or globus pallidus internus region for detecting neural signals associated with a symptom of a movement disorder such as Parkinson’s disease; a right amygdala region, left amygdala region, right orbitofrontal cortex region, left subgenual cingulate region, or right hippocampus region for detecting neural signals associated with a symptom of a psychiatric disorder; or a frontal lobe region for detecting neural signals associated with pain) of the brain of the subject to record brain electrical signal data before, during, or after stimulation is delivered to the subject with a stimulator. Various types of stimulators may be included in the system, including stimulators that provide deep brain stimulation, subgaleal electrical stimulation, transcranial stimulation (e.g., transcranial direct current stimulation, transcranial alternating current stimulation, or transcranialmagnetic stimulation), spinal cord stimulation, peripheral nerve stimulation, peripheral nerve field stimulation, neuromuscular electrical stimulation, or focused ultrasound stimulation (e.g., using ultrasound transducer).
[0152] In some embodiments, the system further comprises a stimulation electrode adapted for positioning at a location in a brain region (e.g., a basal ganglia region or a cortex region for treatment of sleep dysfunction; a subthalamic nucleus region or a globus pallidus internus region for treatment of a movement disorder such as Parkinson’s disease; or a ventral capsule / ventral striatum region, subgenual cingulate region, or orbitofrontal cortex region for treatment of a psychiatric disorder) of a subject to deliver electrical stimulation.
[0153] In some embodiments, the system further comprises a stimulation electrode adapted for positioning in an epidural space for delivering spinal cord stimulation to a subject. The stimulation electrode may be placed, for example, in the epidural space between vertebrae T9 to T10 to relieve lower back pain, at lower thoracic levels for lower limb pain, and at cervical levels for upper limb pain.
[0154] In some embodiments, the system further comprises a stimulation electrode adapted for positioning at a location near a nerve for delivering peripheral nerve stimulation or peripheral nerve field stimulation. The stimulation electrode may be placed, for example, near a vagus nerve, a median nerve, an ulnar nerve, a radial nerve, an occipital nerve, a sphenopalatine ganglion, a trigeminal nerve, a tibial nerve, a sacral nerve, a hypoglossal nerve, a phrenic nerve, a greater auricular nerve, a peroneal nerve, a sciatic nerve, a pudendal posterior nerve, a saphenous nerve, a suprascapular nerve, a carotid sinus nerve, a cervical sympathetic chain nerve, or a auriculotemporal nerve for delivering peripheral nerve stimulation to a subject. Stimulation electrodes may be placed near small nerve fibers under the skin in an area of pain to create an electrical field around the small nerve fibers for delivering peripheral nerve field stimulation to a subject.
[0155] In some embodiments, the system further comprises a magnetic coil for delivering transcranial magnetic stimulation to a subject. The magnetic coil is placed on the scalp of a subject to deliver magnetic pulses to targeted brain areas.
[0156] The system may also include a computing means and control unit programmed to instruct a neurostimulator to apply stimulation to a target region in a manner effective to treat a neurological or psychiatric disorder in a subject. A control algorithm may be used to automate the delivery of stimulation (e.g., electrical stimulation, magnetic stimulation, or ultrasound stimulation) to the subject in response to detection of neural activity associated with a symptom or clinical state of a neurological disorder or a psychiatric disorder.
[0157] In some embodiments, a computer implemented method is used for adjusting parameter settings of a neurostimulator for treatment of a neurological disorder or a psychiatric disorder in asubject. A processor can be programmed to perform steps of a computer implemented method comprising: (a) receiving training neurophysiology data and test neurophysiology data for the subject; (b) using an unsupervised machine learning algorithm to cluster features of the training neurophysiology data; (c) assigning a clinical state label to each feature cluster to generate labeled training neurophysiology data; (d) training a supervised model using the labeled training neurophysiology data to predict the clinical state of the subject from the test neurophysiology data; and (e) adjusting the parameter settings of the neurostimulator to a predefined set of neuromodulatory parameters based on the clinical state predicted for the subject from the test neurophysiology data. In some embodiments, the training neurophysiology data and the test neurophysiology data comprise electroencephalography (EEG) data, electrocorticography (ECoG) data, intracranial electroencephalography (iEEG) data, electromyography (EMG) data, accelerometry data, or any combination thereof.
[0158] The term "representation learning" refers to machine learning methods that learn a transformation of raw data into a representation that captures meaningful structure for downstream tasks. Representation learning methods include, but are not limited to, manifold learning techniques that discover low-dimensional structure in high-dimensional data, contrastive learning methods that learn representations by comparing similar and dissimilar samples, and latent variable models that infer hidden states from observed data. Representation learning may be performed in an unsupervised, semi-supervised, or self-supervised manner.
[0159] The term "manifold learning" refers to dimensionality reduction techniques that assume data lies on or near a low-dimensional manifold embedded in high-dimensional space. Manifold learning methods include, but are not limited to, Riemannian geometry- based methods, isometric mapping methods (e.g., Isomap), locally linear embedding (LLE), Laplacian eigenmaps, t-distributed stochastic neighbor embedding (t-SNE), uniform manifold approximation and projection (UMAP), diffusion maps, and kernel principal component analysis (kernel PCA).
[0160] The term "contrastive learning" refers to self-supervised representation learning methods that learn embeddings by contrasting positive pairs (similar or augmented samples) against negative pairs (dissimilar samples). Contrastive learning methods include, but are not limited to, SimCLR, MoCo (Momentum Contrast), contrastive predictive coding (CPC), Bootstrap Your Own Latent (BYOL), SwAV, and Barlow Twins.
[0161] Exemplary unsupervised machine learning algorithms and representation learning methods include, without limitation:
[0162] (a) Clustering methods: K-means clustering, K-medoids clustering, Gaussian mixture modeling (GMM), density-based spatial clustering of applications with noise (DBSCAN), hierarchicalclustering (agglomerative or divisive), spectral clustering, mean-shift clustering, affinity propagation, Ordering Points To Identify the Clustering Structure (OPTICS), and Balanced Iterative Reducing and Clustering using Hierarchies (BIRCH);
[0163] (b) Autoencoding neural networks: standard autoencoders, variational autoencoders(VAEs), P-VAE, denoising autoencoders, sparse autoencoders, contractive autoencoders, and vector-quantized variational autoencoders (VQ-VAE);
[0164] (c) Manifold learning and Riemannian geometry methods: methods based on covariance matrix estimation on the symmetric positive definite (SPD) manifold, including tangent space projection, log-Euclidean mapping, and affine-invariant Riemannian metric computations; Isomap, locally linear embedding (LLE), Laplacian eigenmaps, Hessian eigenmaps, local tangent space alignment (LTSA), maximum variance unfolding (MVU), t-distributed stochastic neighbor embedding (t-SNE), uniform manifold approximation and projection (UMAP), diffusion maps, and kernel PCA;
[0165] (d) Contrastive learning methods: SimCLR, MoCo, contrastive predictive coding (CPC),BYOL, SwAV, Barlow Twins, temporal contrastive learning (TCL), and neural contrastive learning methods adapted for time-series electrophysiology data;
[0166] (e) Temporal sequence models: Hidden Markov Models (HMMs), including continuous- observation HMMs, mixed-state HMMs, and factorial HMMs; recurrent autoencoders, sequence-to- sequence autoencoders, and transformer-based unsupervised models; and
[0167] (f) Self-organizing methods: self-organizing maps (SOMs), growing neural gas, competitive learning networks, and adaptive resonance theory (ART) networks.
[0168] In some embodiments, the unsupervised machine learning algorithm uses Riemannian geometry methods to estimate covariance structures of neurophysiology data distributions on the SPD manifold, wherein feature clusters are identified based on geodesic distances between covariance matrices in the Riemannian space.
[0169] In some embodiments, the unsupervised machine learning algorithm uses contrastive learning to learn representations of neurophysiology data, wherein similar temporal segments or augmented versions of the same data epoch are contrasted against dissimilar segments to learn an embedding space where clinical states form separable clusters.
[0170] In some embodiments, the unsupervised machine learning algorithm uses a hidden Markov model to model temporal transitions between latent physiological states, wherein the hidden states correspond to clinical states of interest, and transition probabilities capture the dynamics of state evolution.
[0171] In certain embodiments, the method further comprises using semi-supervised learning to leverage both labeled and unlabeled neurophysiology data. Semi-supervised learning methodsinclude, but are not limited to, self-training, co-training, label propagation, graph-based semisupervised learning, semi-supervised variational autoencoders (SS-VAE), and MixMatch. In some embodiments, a small number of labeled data epochs are combined with a larger number of unlabeled data epochs to improve clinical state classification accuracy.
[0172] In certain embodiments, the computer-implemented method further comprises using transfer learning to leverage neurophysiology data or models from other subjects or from the same subject at different time points. Transfer learning methods include, but are not limited to, fine-tuning pretrained models, domain adaptation methods (e.g., domain-adversarial training, maximum mean discrepancy minimization), and meta-learning approaches. In some embodiments, a model pretrained on data from multiple subjects is adapted to a new subject using a small amount of subjectspecific data.
[0173] In certain embodiments, the computer-implemented method further comprises using methods for handling data quality issues, non-stationarity, and distribution shift in the neurophysiology data.
[0174] (a) Artifact detection and rejection: In some embodiments, the method comprises detecting and rejecting or correcting artifacts in the neurophysiology data caused by stimulation, movement, or recording system noise. Artifact detection methods include threshold-based detection, template matching, independent component analysis (ICA)-based artifact removal, and deep learning-based artifact detection.
[0175] (b) Missing data handling: In some embodiments, the method is robust to missing data epochs due to signal disconnection or artifact rejection. Missing data handling methods include imputation using temporal interpolation, matrix completion, or probabilistic models that propagate uncertainty through missing observations. In some embodiments, the objective function is computed over available data with appropriate uncertainty quantification that accounts for the fraction of missing data.
[0176] (c) Distribution shift detection: In some embodiments, the method comprises detecting distribution shift in the neurophysiology data that may indicate disease progression, medication changes, neural plasticity, or device drift. Distribution shift detection methods include change-point detection algorithms (CUSUM, BOCPD), statistical tests comparing recent data to baseline distributions, and monitoring of prediction confidence or model uncertainty.
[0177] (d) Model updating and continual learning: In some embodiments, upon detecting distribution shift, the method triggers retraining or updating of the unsupervised clustering, supervised model, or optimization algorithm baseline. Continual learning methods include elasticweight consolidation (EWC), progressive neural networks, and experience replay to prevent catastrophic forgetting of previously learned patterns while adapting to new distributions.
[0178] (e) Baseline recalibration: In some embodiments, the baseline dataset used for computing the objective function (e.g., the rolling average baseline for normalization) is periodically updated to account for long-term drift in neurophysiology while maintaining sensitivity to stimulation-induced changes.
[0179] Exemplary supervised machine learning algorithms include, without limitation, linear discriminant analysis (LDA), average one-dependence estimators (AODE), artificial neural network (e.g., Backpropagation), transformer neural network (e.g., self-attention, multi-head attention, positional encoding, encoder-decoder transformer architectures for mapping neural recordings to latent state representations or control outputs), Bayesian statistics (e.g., Naive Bayes classifier, Bayesian network, Bayesian knowledge base), case-based reasoning, decision trees, inductive logic programming, Gaussian process regression, group method of data handling (GMDH), learning automata, learning vector quantization, minimum message length (decision trees, decision graphs, etc.), lazy learning, instance-based learning nearest neighbor algorithm, analogical modeling, probably approximately correct learning (PAC) learning, ripple down rules, a knowledge acquisition methodology, symbolic machine learning algorithms, subsymbolic machine learning algorithms, support vector machines, random forests, ensembles of classifiers, bootstrap aggregating (bagging), and boosting (e.g., (LightGBM, XGBoost, and CatBoost). Supervised learning may comprise ordinal classification such as regression analysis and Information fuzzy networks (IFN). Alternatively, supervised learning methods may comprise statistical classification, such as AODE, Linear classifiers (e.g., Fisher's linear discriminant, logistic regression, Naive Bayes classifier, Perceptron, and linear support vector machines (SVM)), quadratic classifiers, k-nearest neighbor, Boosting, Decision trees (e.g., C4.5, Random forests), Bayesian networks, and Hidden Markov models. In some embodiments, the supervised model uses boosting (e.g., LightGBM), linear discriminant analysis (LDA), or Bayesian optimization.
[0180] In certain embodiments, the supervised model comprises a temporal sequence model to capture temporal dependencies in the neurophysiology data. Temporal sequence models include, but are not limited to:
[0181] (a) Recurrent neural networks: Long Short-Term Memory (LSTM) networks, GatedRecurrent Units (GRUs), bidirectional recurrent networks, and stacked recurrent architectures;
[0182] (b) Temporal convolutional networks: dilated causal convolutions, WaveNet-style architectures, and temporal convolutional networks (TCNs) with residual connections;
[0183] (c) Attention-based models: Transformers, temporal self-attention mechanisms, and crossattention between neurophysiology channels;
[0184] (d) Structured state-space models: S4 (Structured State Space Sequence model), S5,Mamba, and linear state-space layers that efficiently model long-range temporal dependencies; and
[0185] (e) Continuous-time models: Neural Ordinary Differential Equations (Neural ODEs), LatentODEs, and continuous-time recurrent neural networks for modeling dynamics at arbitrary time resolutions.
[0186] In some embodiments, the temporal sequence model processes sequences of neurophysiology feature vectors to predict clinical state trajectories rather than individual epoch classifications.
[0187] In certain embodiments, a linear discriminant analysis (LDA) model is used to define a linear boundary for distinguishing between two feature clusters. For example, an LDA model can be used for sleep stage classification to distinguish between a feature cluster associated with an NREM stage (N1, N2, and N3) and a feature cluster associated with other stages (REM and awake), wherein the feature cluster associated with the NREM stage has higher average delta power compared to the feature cluster associated with the other stages. An LDA model can also be used for classification of motor symptoms, for example, to distinguish between a bradykinetic clinical state and a non- bradykinetic clinical state, wherein a feature cluster associated with the bradykinetic clinical state has higher average beta power compared to a feature cluster associated with a non-bradykinetic clinical state.
[0188] In some embodiments, the system further comprises one or more devices for collecting auxiliary data for tracking a symptom or clinical state of a neurological disorder or a psychiatric disorder. Such devices may include, but are not limited to, wearable monitors such as smartwatches, rings, and headbands that can track movement, heart rate, sleep stages, and / or muscle electrical activity; accelerometers, gyroscopes, magnetometers, surface electromyographic (sEMG) devices, heart monitors (e.g., Holter monitor, ANSiscope, Polar H10, implantable loop recorders, patch recorders); pulse oximeters, sleep monitoring devices such as photoplethysmography (PPG)-based sleep monitoring devices, radar-based sleep monitoring devices, and polysom nogram headsets, eye trackers, video recording devices (e.g., camera, camcorder, smart phone), voice recorders, and audio recorders.
[0189] Auxiliary data for tracking a motor symptom of a movement disorder can be provided by a wrist-watch style wearable monitor such as the Parkinson’s KinetiGraph®, PKG®, available from PKG Health (San Francisco, CA), which can be used to monitor movement continuously to detect various motor symptoms of a movement disorder such as bradykinesia, dyskinesia, tremor, daytimeimmobility, stiffness, slow movements, gait / walking, daytime somnolence, and sleep fragmentation. An Apple Watch is available from Apple Inc. (Cupertino, CA), which can be used, for example, for monitoring, bradykinesia, dyskinesia, tremors, gait, and arm movement.
[0190] Auxiliary data for tracking sleep dysfunction can be provided by a wearable sleep monitor such as the OURA RING smart ring from Oura Health Ltd. (Oulu, Finland) or the WHOOP 4.0 band from WHOOP, Inc. (Boston, MA), which can monitor heart rate, blood oxygen, and movement to provide sleep scores and detect sleep dysfunction. Apple Watch (Series 9 and later) can track sleep patterns and, in some models, may assess the risk of sleep apnea by analyzing data like respiratory rate and movement. The Muse S headband from InteraXon (Toronto ON, Canada) and the Dreem 3S headband from Beacon Biosignals (Boston, MA) have EEG electrodes and an accelerometer to monitor brain activity and movement for tracking sleep stages. Under-mattress sensors such as the Withings Sleep Tracking Mat from Withings Inc. (Issy-les-Moulineaux, France) can monitor sleep cycles, heart rate, and respiratory rate by sensing vibrations and movement through the mattress. The Withings Sleep Analyzer and other radar devices use radio waves or sound to monitor sleep, breathing, and heart rate from a distance. The Portable Full Polysomnography SF-A10S VentMed PSG from Hunan Ventmed Medical Technology Co Ltd. (Hunan, China) is a sleep monitoring device that can produce polysomnograms and monitor breathing patterns, heart rate, blood oxygen levels, and body movement during sleep.
[0191] Clinical state labels can be assigned to feature clusters (i.e., cluster-to-clinical state mapping) by sparse labeling with an auxiliary data stream or patient self-reports that track a symptom or clinical state of a neurological disorder or a psychiatric disorder. The auxiliary data or patient self-reports can be collected from the subject at sparse intervals throughout a day. In some embodiments, auxiliary data or patient self-reports are collected every 10 minutes, every 15 minutes, every 20 minutes, every 30 minutes, every 45 minutes, once an hour, once every 2 hours, every 3 hours, etc. In some embodiments, the sparse labeling comprises collecting the auxiliary data or patient selfreports at at least one time point for each feature cluster in order to assign a time-synchronized label from the auxiliary data or patient self-reports to each feature cluster, wherein the time-synchronized label is assigned to the entire feature cluster.
[0192] The term "state estimation" refers to methods for inferring the current state of a dynamical system from noisy or partial observations. State estimation methods for neurophysiology data include, but are not limited to, Kalman filtering, extended Kalman filtering, unscented Kalman filtering, particle filtering (sequential Monte Carlo methods), switching state-space models, and latent variable models. State estimation may be performed online (in real-time) or offline (retrospectively).
[0193] The term "latent variable model" refers to a statistical model that includes unobserved (latent) variables that influence observed variables. Latent variable models for neurophysiology include, but are not limited to, Gaussian Process Latent Variable Models (GP-LVM), Gaussian Process Factor Analysis (GPFA), Latent Factor Analysis via Dynamical Systems (LFADS), Poisson Linear Dynamical Systems (PLDS), and probabilistic principal component analysis (PPCA).
[0194] The term "switching dynamical system" refers to a dynamical system model that assumes the system can switch between multiple discrete modes or regimes, each with its own dynamics. Switching dynamical systems include, but are not limited to, switching linear dynamical systems (SLDS), recurrent switching linear dynamical systems (rSLDS), switching state-space models, and regime-switching models.
[0195] In certain embodiments, the computer-implemented method further comprises using a state estimation algorithm to infer the clinical state of the subject from the neurophysiology data. State estimation algorithms provide a principled framework for tracking time-varying physiological states under uncertainty and can incorporate prior knowledge about state dynamics.
[0196] In some embodiments, the state estimation algorithm comprises Kalman filtering or one of its extensions. A Kalman filter maintains an estimate of the clinical state and its uncertainty by recursively combining predictions from a dynamical model with observations from the neurophysiology data. The Kalman filter is suitable when the relationship between the latent clinical state and observed neurophysiology features is approximately linear and Gaussian. In some embodiments, an extended Kalman filter (EKF) or unscented Kalman filter (UKF) is used when the relationship between latent states and observations is nonlinear. In some embodiments, a particle filter (sequential Monte Carlo method) is used when the state-observation relationship is highly nonlinear or non-Gaussian.
[0197] In some embodiments, the state estimation algorithm comprises a switching linear dynamical system (SLDS), wherein the neurophysiology data is modeled as arising from one of multiple discrete clinical states, each with its own linear dynamics. The SLDS jointly infers the continuous latent state trajectory and the discrete clinical state sequence. In some embodiments, a recurrent switching linear dynamical system (rSLDS) is used, wherein the switching dynamics depend on the continuous latent state.
[0198] In some embodiments, the state estimation algorithm comprises a Gaussian Process Latent Variable Model (GP-LVM), wherein the training neurophysiology data is modeled as arising from a low-dimensional latent space with a Gaussian process mapping to the observed feature space. The GP-LVM discovers smooth manifold structure in the neurophysiology data and enables probabilisticinference of clinical states. In some embodiments, the GP-LVM is extended to a Gaussian Process Dynamical Model (GPDM) to incorporate temporal dynamics.
[0199] In some embodiments, the state estimation algorithm comprises Gaussian Process Factor Analysis (GPFA), wherein the neurophysiology data is modeled as arising from a low-dimensional latent trajectory with smooth Gaussian process temporal dynamics and a linear mapping to observed neural features. GPFA is particularly suited for extracting smooth latent dynamics from multi-channel neurophysiology recordings.
[0200] In some embodiments, the state estimation algorithm comprises Latent Factor Analysis via Dynamical Systems (LFADS), a deep learning method that infers single-trial latent dynamics from neural population recordings using a sequential variational autoencoder architecture. LFADS learns an initial condition encoder, a dynamics generator, and a mapping from latent states to observed neural activity.
[0201] In some embodiments, the state estimation algorithm comprises a Sequential Variational Autoencoder (SVAE) or Variational Recurrent Neural Network (VRNN), which combine the representational power of deep neural networks with principled probabilistic inference over latent state sequences.
[0202] In some embodiments, the state estimation algorithm is used in conjunction with the unsupervised clustering to provide temporal smoothing of clinical state estimates, wherein the clustering provides an initial assignment and the state estimation algorithm refines the assignment based on temporal dynamics and measurement uncertainty.
[0203] Alternatively, a biomarker can be used to identify an association between a feature cluster and a symptom or clinical state of a neurological disorder or a psychiatric disorder. In some embodiments, the biomarker is a range of brain electrical activity indicative of a symptom or clinical state. In some embodiments, the biomarker is a measurable level of a protein, RNA transcript, metabolite, or other substance in a biological sample obtained from the subject. The biological sample may include a bodily fluid, cell, or tissue of the subject.
[0204] The term "rolling-average baseline normalization" refers to a method for computing an objective function that is robust to non-stationary neurophysiology and intermittent signal disconnections. The method comprises: (a) computing a rolling average of a biomarker of interest (e.g., delta power during NREM sleep) for each of a plurality of baseline recording sessions; (b) temporally aligning the rolling averages across sessions by calculating each data point's time interval from a reference event (e.g., first entrance into NREM sleep); (c) computing a "characteristic session" comprising the mean and standard deviation of the rolling averages across sessions at each timeinterval; and (d) z-scoring new recording sessions against the characteristic session to quantify the effect of stimulation parameters on the biomarker relative to baseline.
[0205] In certain embodiments, the computer-implemented further comprises using the supervised model to classify the clinical state of the subject as a desired clinical state or an undesired clinical state; generating an objective function for adjusting the parameter settings of the neurostimulator to maximize time spent by the subject in the desired clinical state or minimize time spent by the subject in the undesired clinical state; and iteratively optimizing the parameter settings of the neurostimulator using an optimization algorithm with the objective function as input, wherein optimized parameter settings are generated by maximizing an objective function value to maximize the time spent by the subject in the desired clinical state or minimizing the objective function value to minimize the time spent by the subject in the undesired clinical state. In some embodiments, iteratively optimizing the parameter settings comprises optimizing the parameter settings for each brain hemisphere of the subject. In some embodiments, the computer-implemented method further comprises displaying the optimized parameter settings. In some embodiments, iteratively optimizing the parameter settings comprises optimizing stimulation amplitude and stimulation frequency. In some embodiments, iteratively optimizing the parameter settings of the neurostimulator comprises performing Bayesian optimization with a Gaussian process regression model of the objective function (see Examples).
[0206] The term "reinforcement learning" refers to a category of machine learning methods wherein an agent learns to make decisions by interacting with an environment to maximize cumulative reward. Reinforcement learning methods include model-free methods (e.g., Q-learning, SARSA, policy gradient methods, actor-critic methods), model-based methods (e.g., Dyna, PILCO, MBPO), and hybrid methods. I n the context of neuromodulation, the environment corresponds to the patient's neurophysiology, the actions correspond to stimulation parameter adjustments, and the reward corresponds to improvement in clinical state.
[0207] The term "multi-armed bandit" refers to a class of sequential decision-making problems wherein an agent must choose among multiple options (arms) to maximize reward, balancing exploration of uncertain options with exploitation of known good options. Multi-armed bandit algorithms include, but are not limited to, £-greedy, upper confidence bound (UCB), Thompson sampling, and contextual bandits.
[0208] The term "model-based reinforcement learning" refers to reinforcement learning methods that learn a model of the environment dynamics and use this model for planning. Model-based methods include, but are not limited to, Probabilistic Inference for Learning Control (PILCO), Model-Based Policy Optimization (MBPO), Dyna architectures, and world models.
[0209] In certain embodiments, iteratively optimizing the parameter settings of the neurostimulator comprises within-session optimization, across-session optimization, or a combination thereof. Within-session optimization refers to optimization performed during a single recording session, wherein the objective function is evaluated and parameter settings are updated one or more times within the session based on neurophysiology data acquired during that session. Across-session optimization refers to optimization performed over multiple recording sessions, wherein the objective function is evaluated at the conclusion of each session and parameter settings are updated between sessions based on cumulative observations across sessions.
[0210] In some embodiments involving within-session optimization, the recording session comprises a sleep session, a waking activity session, a therapy session, or a monitoring session. Within-session optimization enables rapid adaptation to intra-session physiological dynamics, such as transitions between sleep stages, medication state changes, or circadian fluctuations occurring within a single session. In some embodiments, within-session optimization comprises updating the parameter settings of the neurostimulator at intervals of 1 second to 60 minutes during the session, including any interval within this range such as 1 second, 5 seconds, 10 seconds, 30 seconds, 1 minute, 5 minutes, 10 minutes, 15 minutes, 30 minutes, or 60 minutes.
[0211] In some embodiments involving across-session optimization, the multiple recording sessions comprise multiple nights of sleep, multiple days of waking activity, multiple therapy sessions, or any combination thereof spanning a period of 2 days to 12 months or longer. Across-session optimization enables identification of parameter settings that are robust to inter-session variability, including nightto-night variability in sleep architecture, day-to-day variability in symptom severity, or long-term changes due to disease progression or neural plasticity. In some embodiments, across-session optimization comprises updating the parameter settings of the neurostimulator after each session, after every N sessions where N is an integer from 2 to 10, or after a predefined number of objective function evaluations.
[0212] In some embodiments, within-session optimization and across-session optimization are performed in combination. For example, within-session optimization may be used to adapt parameter settings in real-time during each session, while across-session optimization may be used to update the prior distribution, hyperparameters, or baseline of the optimization algorithm based on cumulative observations across sessions. In some embodiments involving Bayesian optimization with a Gaussian process regression model, within-session observations are incorporated into the posterior distribution during the session, and the prior mean function, kernel hyperparameters, or acquisition function parameters are updated across sessions based on aggregate session-level outcomes.
[0213] In some embodiments, the optimization algorithm employs different objective functions for within-session optimization and across-session optimization. For example, within-session optimization may employ an objective function based on instantaneous or short-timescale biomarker values (e.g., delta power in a sliding window during NREM sleep), while across-session optimization may employ an objective function based on session-level summary statistics (e.g., mean delta power across an entire night of sleep, total time spent in a desired clinical state, or z-scored biomarker values relative to a baseline characteristic session as described herein).
[0214] In some embodiments, the temporal granularity of optimization is selected based on the timescale of the clinical phenomenon being treated. For clinical states with rapid dynamics (e.g., tremor episodes, anxiety fluctuations, sleep stage transitions), within-session optimization may be preferred. For clinical states with slower dynamics (e.g., overall sleep quality, average daily symptom burden, mood over multiple days), across-session optimization may be preferred. In some embodiments, hierarchical optimization is performed wherein within-session optimization operates on fast-timescale parameters (e.g., stimulation amplitude) and across-session optimization operates on slow-timescale parameters (e.g., stimulation frequency, target clinical state thresholds, or classifier decision boundaries).
[0215] In certain embodiments, iteratively optimizing the parameter settings of the neurostimulator comprises performing optimization using a method selected from:
[0216] (a) Bayesian optimization methods: Bayesian optimization with Gaussian process regression, Bayesian optimization with random forests (SMAC), Bayesian optimization with Bayesian neural networks, Tree-structured Parzen Estimator (TPE), and expected improvement- based acquisition functions;
[0217] (b) Multi-armed bandit methods: e-greedy, upper confidence bound (UCB), UCB1, KL- UCB, Thompson sampling, contextual bandits with linear models, and contextual bandits with neural networks (NeuralUCB, NeuralTS);
[0218] (c) Model-based reinforcement learning methods: PILCO (Probabilistic Inference forLearning Control) with Gaussian process dynamics models, model predictive control (MPC) with learned dynamics, Dyna-Q with neural network models, MBPO (Model-Based Policy Optimization), and world model-based planning;
[0219] (d) Model-free reinforcement learning methods: Q-learning, Deep Q-Networks (DQN),Double DQN, Dueling DQN, SARSA, policy gradient methods (REINFORCE), Proximal Policy Optimization (PPO), Trust Region Policy Optimization (TRPO), Soft Actor-Critic (SAC), Deep Deterministic Policy Gradient (DDPG), and Twin Delayed DDPG (TD3); and
[0220] (e) Evolutionary and derivative-free optimization methods: genetic algorithms, evolution strategies (CMA-ES), particle swarm optimization, simulated annealing, and Nelder-Mead simplex method.
[0221] In some embodiments, iteratively optimizing the parameter settings comprises using a multiarmed bandit algorithm, wherein each arm corresponds to a distinct set of stimulation parameters and the reward corresponds to a measure of clinical improvement or biomarker optimization. In some embodiments, the multi-armed bandit algorithm uses Thompson sampling, wherein a posterior distribution over the expected reward for each arm is maintained and updated based on observed outcomes.
[0222] In some embodiments, iteratively optimizing the parameter settings comprises using a contextual bandit algorithm, wherein the context comprises the current clinical state or neurophysiology features of the subject, and the algorithm learns a policy that maps contexts to optimal stimulation parameters.
[0223] In some embodiments, iteratively optimizing the parameter settings comprises using modelbased reinforcement learning, wherein a dynamics model is learned that predicts how the subject's clinical state or neurophysiology features will evolve in response to stimulation parameter changes. In some embodiments, the dynamics model is a Gaussian process model, enabling uncertainty quantification over predicted outcomes. In some embodiments, the model-based reinforcement learning method is PILCO, which uses moment matching to propagate uncertainty through the learned dynamics model for policy optimization.
[0224] In some embodiments, iteratively optimizing the parameter settings comprises using Deep Q-learning (DQN) or a variant thereof, wherein a neural network approximates the optimal actionvalue function that maps states and actions to expected cumulative reward. In some embodiments, the state comprises neurophysiology features and the action comprises stimulation parameter settings.
[0225] In some embodiments, the optimization algorithm operates in a batch setting, wherein multiple parameter configurations are evaluated in parallel, and a batch Bayesian optimization or batch bandit algorithm is used to select the batch of configurations.
[0226] In some embodiments, the optimization algorithm incorporates safety constraints, wherein parameter configurations that are predicted to cause adverse effects are excluded from consideration. In some embodiments, safe Bayesian optimization or constrained Markov decision process (CMDP) methods are used to ensure patient safety during optimization.
[0227] In certain embodiments, the computer-implemented method further comprises online learning or adaptive learning to update the supervised model or optimization algorithm as newneurophysiology data is collected. Online learning enables the system to adapt to non-stationary changes in the subject's physiology, such as disease progression, medication changes, or neural plasticity. In some embodiments, the objective function baseline is periodically updated to account for distribution shift in the neurophysiology data.
[0228] In certain embodiments, the computer-implemented method further comprises using ensemble methods to combine predictions from multiple models. Ensemble methods include, but are not limited to, bagging, boosting, stacking, and model averaging. In some embodiments, an ensemble of unsupervised clustering methods is used to identify robust feature clusters. In some embodiments, an ensemble of supervised classifiers is used to improve clinical state prediction accuracy.
[0229] In certain embodiments, the optimization algorithm performs multi-objective optimization to simultaneously optimize multiple clinical outcomes or biomarkers. Multi-objective optimization methods include, but are not limited to:
[0230] (a) Pareto optimization methods: methods that identify a Pareto frontier of non-dominated parameter configurations, wherein no configuration is strictly better than another across all objectives;
[0231] (b) Multi-objective Bayesian optimization (MOBO): extensions of Bayesian optimization that model multiple objective functions and use acquisition functions such as expected hypervolume improvement or Pareto-based expected improvement;
[0232] (c) Scalarization methods: weighted sum approaches, Chebyshev scalarization, or achievement scalarizing functions that convert multiple objectives into a single composite objective;
[0233] (d) Constraint handling methods: barrier methods, penalty methods, or augmentedLagrangian methods for handling constraints on stimulation parameters.
[0234] In some embodiments, the multiple objectives include maximizing a biomarker of interest (e.g., delta power during NREM sleep), minimizing a symptom measure (e.g., time in bradykinetic state), minimizing side effects, and minimizing battery consumption or total energy delivered.
[0235] In some embodiments, the optimization algorithm incorporates hard constraints on stimulation parameters to ensure patient safety, wherein parameter configurations that violate safety limits are excluded from consideration. In some embodiments, safe Bayesian optimization methods such as SafeOpt or stage-wise safe optimization are used, wherein the algorithm only explores parameter configurations that are predicted to be safe with high probability based on prior observations.
[0236] In some embodiments, the optimization algorithm incorporates soft constraints representing patient preferences, comfort, or clinician guidance, wherein the objective function includes penalty terms for violating soft constraints.
[0237] In some embodiments, the computer-implemented method further comprises using the synthetic minority over-sampling technique (SMOTE) for class imbalance correction. For a description of SMOTE, see, e.g., Chawla, N. V., Bowyer, K. W., Hall, L. O. & Kegelmeyer, W. P. SMOTE: Synthetic Minority Over-sampling Technique. JAIR 16, 321-357 (2002); herein incorporated by reference in its entirety.
[0238] In certain embodiments, the computer-implemented method further comprises instructing the neurostimulator to apply stimulation (e.g., electrical stimulation, magnetic stimulation, or ultrasound stimulation) to a target region of the subject using the optimized parameter settings. The stimulation may comprise, for example, deep brain stimulation, subgaleal electrical stimulation, transcranial stimulation (e.g., transcranial stimulation is transcranial direct current stimulation, transcranial alternating current stimulation, or transcranial magnetic stimulation), spinal cord stimulation, peripheral nerve stimulation, peripheral nerve field stimulation, neuromuscular electrical stimulation, or focused ultrasound stimulation.
[0239] In certain embodiments, the computer-implemented method further comprises using hierarchical Bayesian models to leverage data from multiple subjects while maintaining personalized inference. In a hierarchical model, population-level parameters (hyperparameters) capture shared structure across subjects, while subject-level parameters capture individual variation. The hierarchical structure enables:
[0240] (a) Informative priors: population-level parameters provide informative prior distributions that accelerate optimization for new subjects with limited data;
[0241] (b) Partial pooling: subject-level parameter estimates are regularized toward the population mean, improving estimation for subjects with sparse data;
[0242] (c) Transfer of knowledge: insights from subjects with extensive data inform parameter estimation for subjects with limited data.
[0243] In some embodiments, the hierarchical model is applied to the Gaussian process regression model of the objective function, wherein a population-level GP prior is combined with subject-specific observations to form a personalized posterior.
[0244] In certain embodiments, the computer-implemented method further comprises using metalearning to enable rapid adaptation of the supervised model or optimization algorithm to a new subject. Meta-learning methods include, but are not limited to:
[0245] (a) Model-Agnostic Meta-Learning (MAML): learning an initialization for model parameters that enables rapid fine-tuning on a new subject with few gradient steps;
[0246] (b) Reptile: a first-order meta-learning algorithm that learns a parameter initialization by averaging fine-tuned parameters across subjects;
[0247] (c) Prototypical networks: learning a metric space where classification can be performed by computing distances to class prototypes derived from a small number of labeled examples;
[0248] (d) Meta-Bayesian optimization: learning a prior over objective functions from previous subjects to accelerate optimization for a new subject.
[0249] In some embodiments, meta-learning is used to learn an initialization for the unsupervised clustering algorithm, supervised model, or Bayesian optimization prior that enables rapid personalization with minimal subject-specific data.
[0250] In certain embodiments, the training neurophysiology data and the test neurophysiology data comprise alpha frequency, beta frequency, gamma frequency, delta frequency, theta frequency, or mixed-frequency neural oscillations. In some embodiments, the delta frequency neural oscillations are in a range from 0.5 Hz to 4 Hz, the theta frequency neural oscillations are in a range from 4 Hz to 7 Hz, the alpha frequency neural oscillations are in a range from 8 Hz to 12 Hz, the beta frequency neural oscillations are in a range from 13 Hz to 30 Hz, and the gamma frequency neural oscillations are in a range from 60 Hz to 90 Hz.
[0251] In certain embodiments, the neurological disorder is a movement disorder (e.g., Parkinson’s disease or dystonia), a sleep disorder, stroke, epilepsy, a traumatic brain injury, dementia, delirium, coma or a minimally conscious state, a pain-associated disorder, or a mood disorder (e.g., depression, bipolar disorder, or anxiety disorder).
[0252] In certain embodiments, the clinical state label is a sleep stage label, a symptom label, a mood label, or a brain plasticity state label. In some embodiments, the sleep stage label is N1, N2, N3, or phasic or tonic rapid eye movement (REM). In some embodiments, the symptom label is a motor symptom label such as, but not limited to, bradykinesia, rigidity, tremor, hyperkinesia, dyskinesia, dysphagia, parkinsonian gait, or postural instability. In some embodiments, the mood label is depression or anxiety.
[0253] In certain embodiments, the computer implemented method further comprises splitting the training neurophysiology data and the test neurophysiology data into consecutive time epochs. In some embodiments, each time epoch comprises 0.5 second to 10 minutes of time of the recorded brain electrical signal data, including any amount of time within this range such as 0.5 seconds, 0.75 seconds, 1 second, 2 seconds, 3 seconds, 4 seconds, 5 seconds, 6 seconds, 7 seconds, 8 seconds, 9 seconds, 10 seconds, 15 seconds, 20 seconds, 25 seconds, 30 seconds, 35 seconds, 40 seconds,45 seconds, 50 seconds, 55 seconds, 1 minute, 2 minutes, 3 minutes, 4 minutes, 5 minutes, 6 minutes, 7 minutes, 8 minutes, 9 minutes, or 10 minutes of time. In certain embodiments, the computer implemented method further comprises assigning clinical state label (e.g., sleep stage label, a symptom label, a mood label, or a brain plasticity state label) to each time epoch.
[0254] In an exemplary embodiment, a computer-implemented method for adjusting parameter settings of a neurostimulator for treatment of sleep dysfunction in a subject with deep brain stimulation is provided, the computer performing steps comprising: (a) receiving training neurophysiology data and test neurophysiology data for the subject, wherein the training neurophysiology data and the test neurophysiology data comprise brain electrical signals from a subcortical region or a cortical region of the brain of the subject recorded while the subject is sleeping; (b) using an unsupervised machine learning algorithm to cluster features of the training neurophysiology data; (c) assigning a sleep stage label to each feature cluster to generate sleep stage labeled training neurophysiology data; (d) training a supervised model using the sleep stage labeled training neurophysiology data to predict the sleep stage of the subject from the test neurophysiology data; and (e) adjusting the parameter settings of the neurostimulator to a predefined set of neuromodulatory parameters based on the sleep stage predicted for the subject from the test neurophysiology data. In some embodiments, the assigning of sleep labels comprises assigning a non-rapid eye movement (NREM) sleep stage label to a first feature cluster and a rapid eye movement (REM) or wake stage label to a second feature cluster, wherein the first feature cluster has higher average delta power compared to the second feature cluster. In some embodiments, training the supervised model comprises training a linear discriminant analysis (LDA) model to define a linear boundary for distinguishing between the first feature cluster and the second feature cluster. In some embodiments, computer-implemented method further comprises: generating an objective function for adjusting the parameter settings of the neurostimulator to maximize average delta power during the NREM sleep stage with respect to amplitude of deep brain stimulation administered to the basal ganglia region of the brain of the subject during the NREM sleep stage; and iteratively optimizing the parameter settings of the neurostimulator using an optimization algorithm with the objective function as input, wherein optimized parameter settings are generated by maximizing an objective function value to maximize average delta power during the NREM sleep stage. In some embodiments, iteratively optimizing the parameter settings comprises optimizing the parameter settings for each brain hemisphere of the subject. In some embodiments, iteratively optimizing the parameter settings of the neurostimulator comprises performing Bayesian optimization with a Gaussian process regression model of the objective function. In some embodiments, the computer- implemented method further comprises instructing the neurostimulator to apply deep brainstimulation to a basal ganglia region of the brain of the subject using the optimized parameter settings. In some embodiments, the cortical region comprises a precentral gyrus region, a crosscentral sulcus region, or any combination thereof. In some embodiments, the subcortical region comprises a basal ganglia region. In some embodiments, the basal ganglia region is a subthalamic nucleus (STN) region, a globus pallidus region, or a thalamic region. In some embodiments, the training neurophysiology data and the test neurophysiology data comprise field potential data. In some embodiments, the unsupervised machine learning algorithm uses K-means clustering, K- medoids clustering, Gaussian mixture modeling, density-based spatial clustering of applications with noise (DBSCAN), an autoencoding neural network, a variational autoencoder, Riemannian geometry-based manifold learning on covariance matrices, contrastive learning, a hidden Markov model, isometric mapping (Isomap), locally linear embedding, t-distributed stochastic neighbor embedding (t-SNE), uniform manifold approximation and projection (UMAP), diffusion maps, spectral clustering, or a self-organizing map. In some embodiments, assigning the sleep stage label to each feature cluster comprises using sparse labeling based on ancillary extracranial polysomnography data, wherein the ancillary extracranial polysomnography data is synchronized with the training neurophysiology data, and wherein the ancillary polysomnography data is collected from the subject at sparse intervals while the subject is sleeping. In some embodiments, sparse labeling comprises collecting the ancillary extracranial polysomnography data at at least one time point for each feature cluster in order to assign a time-synchronized label from the ancillary extracranial polysomnography data to each feature cluster, wherein the time-synchronized label is assigned to the entire feature cluster.
[0255] In another exemplary embodiment, a computer-implemented method for adjusting parameter settings of a neurostimulator for treatment of Parkinson’s disease in a subject with deep brain stimulation is provided, the computer performing steps comprising: (a) receiving training neurophysiology data and test neurophysiology data for the subject, wherein the training neurophysiology data and the test neurophysiology data comprise brain electrical signals from a subthalamic nucleus region or a sensorimotor cortex region of the brain of the subject; (b) using an unsupervised machine learning algorithm to cluster features of the training neurophysiology data; (c) assigning a clinical state label to each feature cluster to generate labeled training neurophysiology data; (d) training a supervised model using the labeled training neurophysiology data to predict the clinical state of the subject from the test neurophysiology data; and (e) adjusting the parameter settings of the neurostimulator to a predefined set of neuromodulatory parameters based on the clinical state predicted for the subject from the test neurophysiology data. In some embodiments, assigning a clinical state label to each feature cluster comprises assigning a bradykinetic clinicalstate label to a first feature cluster and a non-bradykinetic clinical state label to a second feature cluster, wherein the first feature cluster has higher average beta power compared to the second feature cluster. In some embodiments, training the supervised model comprises training a linear discriminant analysis (LDA) model to define a linear boundary for distinguishing between the first feature cluster and the second feature cluster. In some embodiments, the computer-implemented method further comprises: generating an objective function for said adjusting the parameter settings of the neurostimulator to minimize time spent by the subject in the bradykinetic clinical state; and iteratively optimizing the parameter settings of the neurostimulator using an optimization algorithm with the objective function as input, wherein optimized parameter settings are generated by minimizing an objective function value to minimize the time spent by the subject in the bradykinetic clinical state. In some embodiments, iteratively optimizing the parameter settings comprises optimizing the parameter settings for each brain hemisphere of the subject. In some embodiments, iteratively optimizing the parameter settings of the neurostimulator comprises performing Bayesian optimization with a Gaussian process regression model of the objective function. In some embodiments, the computer-implemented method further comprises instructing the neurostimulator to apply deep brain stimulation to a subthalamic nucleus region or a globus pallidus internus region of the brain of the subject using the optimized parameter settings. In some embodiments, the training neurophysiology data and the test neurophysiology data comprise field potential data. In some embodiments, the unsupervised machine learning algorithm uses K-means clustering, K-medoids clustering, Gaussian mixture modeling, density-based spatial clustering of applications with noise (DBSCAN), an autoencoding neural network, a variational autoencoder, Riemannian geometrybased manifold learning on covariance matrices, contrastive learning, a hidden Markov model, isometric mapping (Isomap), locally linear embedding, t-distributed stochastic neighbor embedding (t-SNE), uniform manifold approximation and projection (UMAP), diffusion maps, spectral clustering, or a self-organizing map.
[0256] In another embodiment, a computer implemented method for classifying sleep stages is provided, the computer performing steps comprising: (a) receiving a first set of recorded intracranial brain electrical signal data from a subcortical region or a cortical region of the brain of a subject, wherein the first set of intracranial brain electrical signal data is recorded while the subject is sleeping; (b) receiving extracranial polysomnography data, wherein the extracranial polysomnography data is synchronized with the first set of recorded intracranial brain electrical signal data; (c) segmenting the first set of recorded intracranial brain electrical signal data into a plurality of data epochs; (d) assigning a sleep stage label to each data epoch of the plurality of data epochs using the extracranial polysomnography data; (e) training a classification model using a gradientboosting machine learning algorithm or an artificial neural network to identify a power spectral density feature in each data epoch that is associated with the assigned sleep stage label, wherein a trained classification model is produced; (f) receiving a second set of recorded intracranial brain electrical signal data from the subcortical region or the cortical region of the brain of the subject, wherein the second set of intracranial brain electrical signal data is recorded while the subject is sleeping; and (g) detecting sleep stages based on power spectral density features in the second set of recorded intracranial brain electrical signal data using the trained classification model without using any extracranial polysomnography data. In certain embodiments, the gradient boosting machine learning algorithm is a light gradient-boosting machine (LightGBM) algorithm. In some embodiments, the gradient boosting machine learning algorithm is supervised. In certain embodiments, the artificial neural network is a multi-layer perceptron (MLP). In certain embodiments, training the classification model further comprises performing Bayesian hyperparameter optimization. In certain embodiments, the subject receives deep brain stimulation therapy during recording of the first set and / or the second set of intracranial brain electrical signal data.
[0257] The first set of recorded intracranial brain electrical signal data and the second set of recorded intracranial brain electrical signal data may comprise intracranial brain electrical signal data from the subcortical region or the cortical region of each hemisphere of the brain. Alternatively, the first set of recorded intracranial brain electrical signal data and the second set of recorded intracranial brain electrical signal data may comprise intracranial brain electrical signal data from the subcortical region or the cortical region of a single hemisphere of the brain. In certain embodiments, the subcortical region comprises a basal ganglia region. In some embodiments, the basal ganglia region is a subthalamic nucleus (STN) region, a globus pallidus region, or a thalamic region. In some embodiments, the cortical region comprises a precentral gyrus region, a cross-central sulcus region, or any combination thereof.
[0258] In certain embodiments, the computer implemented method further comprises: detecting sleep dysfunction in the subject by identifying an abnormal sequence or duration of the sleep stages; and instructing a stimulator to modify the deep brain stimulation therapy to reduce or prevent the sleep dysfunction in the subject.
[0259] In certain embodiments, the recorded intracranial brain electrical signal data comprises neural oscillations in a frequency range from 0.5 Hz to 60 Hz. In some embodiments, field potentials are used as feature inputs to train the classification model to classify the sleep stage of the subject in each time epoch. In certain embodiments, each data epoch contains only a single sleep stage label. In some embodiments, the sleep stage label is N1, N2, N3, N4, or rapid eye movement (REM).In some embodiments, the sleep stage label is non-rapid eye movement (NREM) or rapid eye movement (REM).
[0260] In certain embodiments, the computer implemented method further comprises receiving auxiliary data from a noninvasive sleep monitoring device, a wearable sleep monitoring device, a photoplethysmography (PPG)-based sleep monitoring device, or a radar-based sleep monitoring device while the subject is sleeping, wherein the auxiliary data are used in combination with the extracranial polysomnography data in assigning a sleep stage label to each data epoch.
[0261] In another embodiment, a computer implemented method for classifying sleep stages is provided, the computer performing steps comprising: (a) receiving a first set of recorded intracranial brain electrical signal data from a subcortical region or a cortical region of the brain of a subject, wherein the first set of intracranial brain electrical signal data is recorded while the subject is sleeping; (b) receiving extracranial polysomnography data, wherein the extracranial polysomnography data is synchronized with the first set of recorded intracranial brain electrical signal data; (c) segmenting the first set of recorded intracranial brain electrical signal data into a plurality of data epochs; (d) assigning a sleep stage label to each data epoch of the plurality of data epochs using the extracranial polysomnography data; (e) training a classification model using a convolutional neural network to identify a spectrogram feature in each data epoch that is associated with the assigned sleep stage label, wherein a trained classification model is produced; (f) receiving a second set of recorded intracranial brain electrical signal data from the subcortical region or the cortical region of the brain of the subject, wherein the second set of intracranial brain electrical signal data is recorded while the subject is sleeping; and (g) detecting sleep stages based on spectrogram features in the second set of recorded intracranial brain electrical signal data using the trained classification model without using any extracranial polysomnography data. In certain embodiments, the convolutional neural network comprises five convolutional layers followed by three fully connected layers. In certain embodiments, the training the classification model further comprises performing Bayesian hyperparameter optimization. In certain embodiments, the subject receives deep brain stimulation therapy during recording of the first set and / or the second set of intracranial brain electrical signal data.
[0262] In certain embodiments, the computer implemented method further comprises: detecting sleep dysfunction in the subject by identifying an abnormal sequence or duration of the sleep stages; and instructing a neurostimulator to modify the deep brain stimulation therapy to reduce or prevent the sleep dysfunction in the subject.
[0263] In certain embodiments, the first set of recorded intracranial brain electrical signal data and the second set of recorded intracranial brain electrical signal data comprise intracranial brainelectrical signal data from the subcortical region or the cortical region of each hemisphere of the brain. In other embodiments, the first set of recorded intracranial brain electrical signal data and the second set of recorded intracranial brain electrical signal data comprise intracranial brain electrical signal data from the subcortical region or the cortical region of a single hemisphere of the brain. In certain embodiments, the subcortical region comprises a basal ganglia region. In some embodiments, the basal ganglia region is a subthalamic nucleus (STN) region, a globus pallidus region, or a thalamic region. In certain embodiments, the cortical region comprises a precentral gyrus region, a cross-central sulcus region, or any combination thereof.
[0264] In certain embodiments, the each data epoch contains only a single sleep stage label. In some embodiments, the sleep stage label is N1, N2, N3, N4, or rapid eye movement (REM). In other embodiments, the sleep stage label is non-rapid eye movement (NREM) or rapid eye movement (REM).
[0265] In certain embodiments, the computer implemented method further comprises receiving auxiliary data such as accelerometry data and / or autonomic data for the subject while the subject is sleeping, wherein the auxiliary data are used in combination with the extracranial polysomnography data in assigning a sleep stage label to each data epoch. As discussed above, such auxiliary data may be obtained with a noninvasive sleep monitoring device, a wearable sleep monitoring device, a photoplethysmography (PPG)-based sleep monitoring device, or a radar-based sleep monitoring device while the subject is sleeping, wherein the auxiliary data are used in combination with the extracranial polysomnography data in assigning a sleep stage label to each data epoch.
[0266] In certain embodiments, the brain electrical signal data comprises field potential data. In certain embodiments, the recorded intracranial brain electrical signal data comprises delta frequency neural oscillations in a range from 0.5 Hz to 4 Hz, theta frequency neural oscillations in a range from 4 Hz to 7 Hz, alpha frequency neural oscillations in a range from 8 Hz to 12 Hz, beta frequency neural oscillations in a range from 13 Hz to 30 Hz, or any combination thereof.
[0267] The methods can be implemented in digital electronic circuitry, or in computer software, firmware, or hardware. The disclosed and other embodiments can be implemented as one or more computer program products, i.e., one or more modules of computer program instructions encoded on a computer readable medium for execution by, or to control the operation of, a data processing apparatus. The computer readable medium can be a machine-readable storage device, a machine- readable storage substrate, a memory device, a composition of matter effecting a machine-readable propagated signal, or any combination thereof.
[0268] A computer program (also known as a program, software, software application, script, or code) can be written in any form of programming language, including compiled or interpretedlanguages, and it can be deployed in any form, including as a stand-alone program or as a module, component, subroutine, or other unit suitable for use in a computing environment. A computer program does not necessarily correspond to a file in a file system. A program can be stored in a portion of a file that holds other programs or data (e.g., one or more scripts stored in a markup language document), in a single file dedicated to the program in question, or in multiple coordinated files (e.g., files that store one or more modules, sub programs, or portions of code). A computer program can be deployed to be executed on one computer or on multiple computers that are located at one site or distributed across multiple sites and interconnected by a communication network.
[0269] In a further aspect, the system for performing the computer implemented method, as described, may include a processor, a storage component (i.e., memory), a display component, and other components typically present in general purpose computers. In some embodiments, the processor is provided by a computer, a cloud computing system, a handheld device (e.g., a cell phone or tablet), or a wearable device (smartwatch or smart ring). The storage component stores information accessible by the processor, including instructions that may be executed by the processor and data that may be retrieved, manipulated or stored by the processor.
[0270] The storage component includes instructions. For example, the storage component includes instructions for classification of features in neurophysiology data to determine the clinical state of a patient and optimize stimulation parameters according to the methods described herein. The computer processor is coupled to the storage component and configured to execute the instructions stored in the storage component in order to receive neurophysiology data and any auxiliary data, and analyze the data according to one or more algorithms, as described herein (see, e.g., Examples).
[0271] The processor and / or memory may be operably connected to a display device, for example, via a wired, such as a Universal Serial Bus (USB) connection, or wireless connection, such as a Bluetooth connection. Any convenient display device, such as a liquid crystal display (LCD), lightemitting diode (LED) display, plasma (PDP) display, quantum dot (QLED) display or cathode ray tube display device may be used. The display component displays the final set of optimized parameter settings. In some embodiments, the display component displays the top 2.5% of parameter settings having the highest objective values from iteratively optimizing all of the parameter settings.
[0272] The storage component may be of any type capable of storing information accessible by the processor, such as a hard-drive, memory card, ROM, RAM, DVD, CD-ROM, USB Flash drive, write- capable, and read-only memories. The processor may be a general purpose processor, a graphics processor unit, a digital signal processor (DSP), an application specific integrated circuit (ASIC), a field programmable gate array (FPGA) or other programmable logic device, discrete gate ortransistor logic, discrete hardware components, or any combination thereof designed to perform the functions described herein. A general purpose processor can be a microprocessor, but in the alternative, the processor can be a controller, microcontroller, or state machine, combinations of the same, or the like. A processor can also be implemented as a combination of computing devices, e.g., a combination of a DSP and a microprocessor, a plurality of microprocessors, one or more microprocessors in conjunction with a DSP core, or any other such configuration. Although described herein primarily with respect to digital technology, a processor can also include primarily analog components. A computing environment can include any type of computer system, including, but not limited to, a computer system based on a microprocessor, a graphics processor unit, a mainframe computer, a digital signal processor, a portable computing device, a personal organizer, a device controller, and a computational engine within an appliance, to name a few.
[0273] The steps of a method, process, or algorithm described in connection with the embodiments disclosed herein can be embodied directly in hardware, in a software module executed by a processor, or in a combination of the two. A software module, engine, and associated databases can reside in memory resources such as in RAM memory, FRAM memory, flash memory, ROM memory, EPROM memory, EEPROM memory, registers, hard disk, a removable disk, a CD-ROM, or any other form of non-transitory computer-readable storage medium, media, or physical computer storage known in the art. An exemplary storage medium can be coupled to the processor such that the processor can read information from, and write information to, the storage medium. In the alternative, the storage medium can be integral to the processor. The processor and the storage medium can reside in an ASIC. The ASIC can reside in a user terminal. In the alternative, the processor and the storage medium can reside as discrete components in a user terminal.
[0274] The instructions may be any set of instructions to be executed directly (such as machine code) or indirectly (such as scripts) by the processor. In that regard, the terms "instructions," "steps" and "programs" may be used interchangeably herein. The instructions may be stored in object code form for direct processing by the processor, or in any other computer language including scripts or collections of independent source code modules that are interpreted on demand or compiled in advance.
[0275] Data may be retrieved, stored or modified by the processor in accordance with the instructions. For instance, although the system is not limited by any particular data structure, the data may be stored in computer registers, in a relational database as a table having a plurality of different fields and records, XML documents, or flat files. The data may also be formatted in any computer-readable format such as, but not limited to, binary values, ASCII or Unicode. Moreover, the data may comprise any information sufficient to identify the relevant information, such asnumbers, descriptive text, proprietary codes, pointers, references to data stored in other memories (including other network locations) or information which is used by a function to calculate the relevant data.
[0276] In certain embodiments, the processor and storage component may comprise multiple processors and storage components that may or may not be stored within the same physical housing. For example, some of the instructions and data may be stored on removable CD-ROM and others within a read-only computer chip. Some or all of the instructions and data may be stored in a location physically remote from, yet still accessible by, the processor. Similarly, the processor may comprise a collection of processors which may or may not operate in parallel.
[0277] In some embodiments, the method can be performed using a cloud computing system. In these embodiments, the neurophysiology data, any auxiliary data, and the programming can be exported to a cloud computer, which runs the program, and returns an output to the user.Adaptive Neurostimulation
[0278] The disclosed computer-implemented methods and systems can be used for performing, adaptive neurostimulation to adjust stimulation parameters as needed for a patient to treat symptoms, maximize time spent by a patient spent in desired clinical states, or minimize time spent by a patient in undesired clinical states. Various steps and aspects of the methods will now be described in greater detail below.
[0279] The methods include positioning an electrode at a first location in or near a brain region of the subject to record neural signal data (i.e., neural recording electrode) and positioning a stimulator to deliver stimulation to a second location in the subject. The stimulation may include, without limitation, deep brain stimulation, subgaleal stimulation, transcranial stimulation (e.g., transcranial direct current stimulation, transcranial alternating current stimulation, or transcranial magnetic stimulation), spinal cord stimulation, peripheral nerve stimulation, peripheral nerve field stimulation, or neuromuscular electrical stimulation. In some embodiments, an electrode is used to deliver electrical stimulation (i.e., stimulation electrode) to the second location. The position of the stimulation electrode will depend on the target of the electrical stimulation. For example, a stimulation electrode may be placed in a region of the brain for deep brain stimulation, in a subgaleal space for brain stimulation, on the head for transcranial stimulation, in the epidural space for spinal cord stimulation, near a peripheral nerve for peripheral nerve stimulation or peripheral nerve field stimulation, or near a muscle for neuromuscular electrical stimulation.
[0280] For brain stimulation, one or more neural recording electrodes or stimulation electrodes may be positioned at a first brain region or a second brain region, respectively. In some embodiments,the first brain region and the second brain region are the same. In other embodiments, the first brain region and the second brain region are different. The stimulation electrodes and the neural recording electrodes may be non-brain penetrating surface electrodes, extracranial electrodes, for example, subgaleal or skull mounted (in burr hole cap or in case of cranially mounted neurostimulator), subdural electrodes, or brain-penetrating depth electrodes.
[0281] The site chosen for detection of neural signals may differ for different subjects and may depend on the particular neurological or psychiatric disorder the subject has. In some embodiments, the brain of an individual subject is mapped to identify the optimal location(s) for positioning an electrode for detecting neural signals associated with a symptom of a neurological or psychiatric disorder, as discussed further below.
[0282] In an exemplary embodiment for a patient undergoing treatment for sleep dysfunction, the stimulation electrode may be positioned in a basal ganglia region, a cortex region, or other regions of the brain suitable for electrical stimulation. The neural recording electrode may be positioned at a location in a subcortical region, a cortical region, or other regions of the brain suitable for detecting neural signals associated with a sleep feature or sleep stage while the subject is sleeping. One or more stimulation electrodes may be positioned in the basal ganglia region or cortex region, and one or more neural recording electrodes may be positioned in the subcortical region or the cortical region. In some embodiments, one or more neural recording electrodes are positioned in a basal ganglia region, a subthalamic nucleus (STN) region, a globus pallidus region, a thalamic region, a precentral gyrus region, a cross-central sulcus region, or any combination thereof. In some embodiments, one or more stimulation electrodes are positioned in an STN region, a pedunculopontine nucleus (PPN) region, an internal globus pallidus (GPi) region, or a thalamus region, or any combination thereof.
[0283] In an exemplary embodiment for a patient undergoing treatment for Parkinson’s disease, the stimulation electrode may be positioned in a subthalamic nucleus region, a globus pallidus internus region, or other regions of the brain suitable for electrical stimulation. The neural recording electrode may be positioned at a location in a sensorimotor cortex region, a subthalamic nucleus region, a globus pallidus internus region, a subgaleal region, or other regions of the brain suitable for detecting neural signals associated with intended movement or a symptom of Parkinson’s disease. One or more stimulation electrodes may be positioned in the subthalamic nucleus region and / or globus pallidus internus region, and one or more neural recording electrodes may be positioned in the sensorimotor cortex region, subthalamic nucleus region globus pallidus internus region, and / or subgaleal region. In some embodiments, one or more neural recording electrodes are positioned in a precentral gyrus region, a postcentral gyrus region, or both the precentral gyrus region and the postcentral gyrus region of the contralateral cortex. In some embodiments, one or more stimulationelectrodes and one or more neural recording electrodes are positioned in a subthalamic nucleus region. In some embodiments, one or more stimulation electrodes and one or more neural recording electrodes are positioned in a globus pallidus internus region.
[0284] In an exemplary embodiment for a patient undergoing treatment for a psychiatric disorder, the stimulation electrode may be positioned in a ventral capsule / ventral striatum region, subgenual cingulate region, or orbitofrontal cortex region, or other regions of the brain suitable for electrical stimulation. The neural recording electrode may be positioned at a location in a right amygdala region, left amygdala region, right orbitofrontal cortex region, left subgenual cingulate region, right hippocampus region of the brain, or other regions of the brain suitable for detection of neural signals associated with a symptom of the psychiatric disorder. In some embodiments, one or more stimulation electrodes are positioned in the ventral capsule / ventral striatum region, subgenual cingulate region, orbitofrontal cortex region, or any combination thereof. In some embodiments, one or more neural recording electrodes are positioned in the right amygdala region, left amygdala region, right orbitofrontal cortex region, left subgenual cingulate region, right hippocampus region, or any combination thereof.
[0285] As used herein, the phrases “an electrode” or “the electrode” refer to a single electrode or multiple electrodes such as an electrode array. As used herein, the term “contact” as used in the context of an electrode in contact with a region of the brain refers to a physical association between the electrode and the region. In other words, a neural recording electrode that is in contact with a region of the brain is physically touching the region of the brain. A stimulation electrode can conduct electricity, for example, to specific targets in the brain, spinal cord, or peripheral nerves. Electrodes used in the methods disclosed herein may be monopolar (cathode or anode) or bipolar (e.g., having an anode and a cathode).
[0286] Positioning a neural recording electrode for recording neural activity at specified region(s) of the brain may be carried out using standard surgical procedures for placement of intra-cranial electrodes. In certain cases, placing the neural recording electrode may involve positioning the electrode on the surface of the specified region(s) of the brain. For example, for treatment of sleep dysfunction, electrodes may be placed on the surface of the brain at a subcortical region or a cortical region. The electrodes may be placed, for example, on the surface of the brain at the cortical precentral gyrus region or postcentral gyrus region, or a combination thereof. The electrode may contact at least a portion of the surface of the brain at the cortical precentral gyrus region or postcentral gyrus region. In some embodiments, the electrode may contact substantially the entire surface area at the cortical precentral gyrus region and postcentral gyrus region. In some embodiments, the electrode may additionally contact area(s) adjacent to the cortical precentral gyrusregion or postcentral gyrus region. In some embodiments, the neural recording electrodes may contact any area of the cortex that allows detection of sleep features or sleep stages. For treatment of a movement disorder such as Parkinson’s disease, electrodes may be placed on the surface of the brain at a sensorimotor cortex region (e.g., a precentral gyrus region or postcentral gyrus region), a subthalamic nucleus region, a globus pallidus internus region, or any combination thereof. The electrode may contact at least a portion of the surface of the brain at the sensorimotor cortex region (e.g., a precentral gyrus region or postcentral gyrus region). In some embodiments, the electrode may contact substantially the entire surface area at the sensorimotor cortex region, subthalamic nucleus region, or globus pallidus internus region. In some embodiments, the electrode may additionally contact area(s) adjacent to the sensorimotor cortex region, subthalamic nucleus region, or globus pallidus internus region. In some embodiments, the neural recording electrodes may contact any area of the subthalamic nucleus region, globus pallidus internus region, and / or sensorimotor cortex that allows detection of brain electrical signals from neural activity associated with intended movement of the subject or a symptom of the movement disorder.
[0287] In some embodiments, the electrodes may be placed extracranial ly, for example in the subgaleal space. In some embodiments, the electrodes may be placed in a subdural space over the contralateral cortex or under the scalp. In some embodiments, the neural recording electrode may be contained within a burr hole cap or on the case of the cranially mounted implantable neural stimulator device. In some embodiments, an electrode array, arranged on a planar support substrate, may be used for detecting brain electrical signals from neural activity associated with a symptom of a neurological disorder or psychiatric disorder from one or more of the brain regions specified herein. The surface area of the electrode array may be determined by the desired area of contact between the electrode array and the brain. An electrode for implanting on a brain surface, such as, a surface electrode or a surface electrode array may be obtained from a commercial supplier. A commercially obtained electrode / electrode array may be modified to achieve a desired contact area. In some cases, the non-brain penetrating electrode (also referred to as a surface electrode) that may be used in the methods disclosed herein may be an electrocorticography (ECoG) electrode, a subgaleal electrode, a subdural electrode, or an electroencephalography (EEG) electrode. In certain embodiments, a plurality of electrodes is positioned in an electrode grid for detection of brain electrical signals from neural activity associated with a symptom or clinical state of a neurological disorder or a psychiatric disorder. In certain embodiments, a plurality of electrodes is positioned at one or more of the brain regions specified herein for detection of brain electrical signals from neural activity associated with a symptom or clinical state of a neurological disorder or a psychiatric disorder by stereoelectroencephalography (sEEG).
[0288] In certain cases, placing the neural recording electrode at a target area or site (e.g., a cortical region, subcortical region, subthalamic nucleus region, globus pallidus region, thalamic region, cross-central sulcus region sensorimotor cortex region, precentral gyrus region, postcentral gyrus region, right amygdala region, left amygdala region, right orbitofrontal cortex region, left subgenual cingulate region, right hippocampus region, or frontal lobe region) may involve positioning a brain penetrating electrode (also referred to as depth electrode) in the specified region(s) of the brain. For example, a neural recording electrode may be placed in a cortical or subcortical region of the brain for recording neural signals associated with sleep dysfunction, in a sensorimotor cortex region of the brain for recording neural signals associated with a symptom of a movement disorder, or in a right amygdala region, left amygdala region, right orbitofrontal cortex region, left subgenual cingulate region, or right hippocampus region for recording neural signals associated with a symptom of a psychiatric disorder. In some embodiments, the neural recording electrode may additionally contact area(s) adjacent to a cortical region, subcortical region, sensorimotor cortex region, right amygdala region, left amygdala region, right orbitofrontal cortex region, left subgenual cingulate region, or right hippocampus region of the brain. In some embodiments, an electrode array may be used for detecting neural activity from a cortical area, for example, a central sulcus region, a precentral gyrus region, a postcentral gyrus region, or any combination thereof. In some embodiments, an electrode array may be used for detecting neural activity from a subcortical area, for example, a basal ganglia region such as a subthalamic nucleus (STN) region, globus pallidus region, a thalamic region, or any combination thereof.
[0289] The depth to which a neural recording electrode is inserted into the brain may be determined by the desired level of contact between the electrode array and the brain. A brain-penetrating electrode array may be obtained from a commercial supplier. A commercially obtained electrode array may be modified to achieve a desired depth of insertion into the brain tissue.
[0290] Positioning an electrode for delivering electrical stimulation to the brain may be carried out using standard surgical procedures for placement of electrodes for deep brain stimulation. In some embodiments, the stimulation electrode is placed in a subthalamic nucleus region, pedunculopontine nucleus region, internal globus pallidus region, or thalamus region for treatment of sleep dysfunction. In some embodiments, the stimulation electrode is placed in a subthalamic nucleus region, globus pallidus internus region, or other intracranial region for treatment of a movement disorder. In some embodiments, the stimulation electrode is placed in a ventral capsule / ventral striatum region, subgenual cingulate region, orbitofrontal cortex region, or other intracranial region for treatment of a psychiatric disorder. Medical imaging using, for example, magnetic resonance imaging (MRI) or computerized tomography (CT) may be used to provide guidance for placement of stimulationelectrodes and verify correct placement of the stimulation electrodes in the brain. In addition, a neurostimulator that generates electrical pulses is placed under the skin of the chest, typically below the collarbone or in the abdomen. In some embodiments the neurostimulator is cranially mounted. The surgical procedure may involve placing stimulation electrodes within the brain through small holes in the skull. An electrode lead is tunneled under the skin down the neck and under the skin of the chest to connect to a chest implanted neurostimulator.
[0291] Current is supplied by the neurostimulator to the stimulation electrodes. Parameters such as pulse width, shape, frequency, amplitude, pattern, and temporal distribution can be adjusted in response to changes in neural activity recorded by a neural recording electrode. In some embodiments, a closed loop system is used to automatically deliver electrical stimulation in response to detection of neural signals from neural activity associated with a symptom of a neurological disorder or psychiatric disorder. A control algorithm, as described above, may be used to automate the delivery of adaptive electrical stimulation to the brain, spinal cord, or a peripheral nerve in response to detection of neural activity associated with a symptom or clinical state of a neurological disorder or a psychiatric disorder, as described herein.
[0292] Current is supplied by the neurostimulator to the stimulation electrodes. Parameters such as pulse width, shape, frequency, amplitude, pattern, and temporal distribution can be adjusted in response to changes in neural activity recorded by a neural recording electrode. In some embodiments, a closed loop system is used to adjust settings of a neurostimulator automatically using a machine learning algorithm that optimizes adaptive parameter settings of a neurostimulator in response to detection of neural signals from neural activity associated with a symptom or clinical state of a neurological disorder or neuropsychiatric disorder. In other embodiments, an open loop system is used in which the machine learning algorithm provides suggested optimized parameter settings for a neurostimulator to a user or medical practitioner for consideration in adjusting the parameter settings of the neurostimulator manually.
[0293] Electrical stimulation may be applied using a single electrode, electrode pairs, or an electrode array. In some embodiments, the number of electrodes used to deliver electrical stimulation to the brain ranges from 8 to 32, including any number of electrodes in this range such as 8, 10, 12, 14, 16, 18, 20, 22, 24, 26, 28, 30, or 32 electrodes. In some embodiments, the electrical stimulation is applied to more than one site in the subthalamic nucleus, pedunculopontine nucleus, internal globus pallidus, or thalamus for treatment of sleep dysfunction, or to more than one site in the subthalamic nucleus or globus pallidus internus for treatment of a movement disorder, or to more than one site in the ventral capsule / ventral striatum, subgenual cingulate, or orbitofrontal cortex for treatment of a neuropsychiatric disorder. The site to which the electrical stimulation is applied may be alternated orotherwise spatially or temporally patterned. Electrical stimulation may be applied to the sites simultaneously or sequentially. The site chosen for stimulation may differ for different subjects and will depend on mapping of the brain of an individual subject to identify the optimal location for positioning an electrode for delivery of electrical stimulation to treat a symptom of a neurological disorder or a neuropsychiatric disorder.
[0294] In some embodiments, an electrode array arranged on a planar support substrate may be used for electrically stimulating the subthalamic nucleus, pedunculopontine nucleus, internal globus pallidus, or thalamus for treatment of sleep dysfunction, the subthalamic nucleus or globus pallidus internus for treatment of a movement disorder or the ventral capsule / ventral striatum, subgenual cingulate, or orbitofrontal cortex for treatment of a psychiatric disorder. The surface area of the electrode array may be determined by the desired area of contact between the electrode array and the subthalamic nucleus, pedunculopontine nucleus, thalamus, globus pallidus internus, ventral capsule / ventral striatum region, subgenual cingulate region, or orbitofrontal cortex region. In some cases, cylindrical electrode arrays, paddle-style electrode arrays, or plate-style electrode arrays may be used in the methods disclosed herein for deep brain stimulation. Such stimulation electrode arrays for implanting in the brain, may be obtained from a commercial supplier. A commercially obtained electrode / electrode array may be modified to achieve a desired contact area.
[0295] The precise number of stimulation electrodes or neural recording electrodes contained in an electrode array (e.g., for electrical stimulation or detection of neural activity) may vary. In certain aspects, an electrode array may include two or more electrodes, such as 3 or more, including 4 or more, e.g., about 3 to 6 electrodes, about 6 to 12 electrodes, about 12 to 18 electrodes, about 18 to 24 electrodes, about 24 to 30 electrodes, about 30 to 48 electrodes, about 48 to 72 electrodes, about 72 to 96 electrodes, or about 96 or more electrodes. The electrodes may be arranged into a regular repeating pattern (e.g., a grid, such as a grid with about 1 cm spacing between electrodes), or no pattern. An electrode that conforms to the target site for optimal delivery of electrical stimulation may be used. One such example is a single multi contact electrode with eight contacts separated by 2! mm. Each contract would have a span of approximately 2 mm. Another example is an electrode with two 1 cm contacts with a 2 mm intervening gap. Yet further, another example of an electrode that can be used in the present methods is a 2 or 3 branched electrode to cover the target site. Each one of these three-pronged electrodes has four 1-2 mm contacts with a center to center separation of 2 of 2.5 mm and a span of 1.5 mm.
[0296] The size of each electrode may also vary depending upon such factors as the number of electrodes in the array, the location of the electrodes, the material, the age of the patient, and other factors. In certain aspects, an electrode array has a size (e.g., a diameter) of about 5 mm or less,such as about 4 mm or less, including 4 mm-0.25 mm, 3 mm-0.25 mm, 2 mm-0.25 mm, 1 mm-0.25 mm, or about 3 mm, about 2 mm, about 1 mm, about 0.5 mm, or about 0.25 mm.
[0297] In certain embodiments, the method further comprises mapping the brain of the subject to optimize positioning of an electrode for applying electrical stimulation. Positioning of a stimulation electrode is optimized to maximize clinical responses to electrical stimulation for treating a neurological disorder or psychiatric disorder. In some embodiments, the subthalamic nucleus region, pedunculopontine nucleus region, internal globus pallidus region, thalamus region or other regions of the brain are mapped to determine optimal positioning of stimulation electrodes for treating sleep dysfunction. In some embodiments, the subthalamic nucleus region, globus pallidus internus region, or other regions of the brain are mapped to determine optimal positioning of stimulation electrodes for treating a movement disorder (e.g., Parkinson’s disease or dystonia). In some embodiments, the ventral capsule / ventral striatum region, subgenual cingulate region, orbitofrontal cortex region, or other regions of the brain are mapped to determine optimal positioning of stimulation electrodes for treating a psychiatric disorder.
[0298] The placement of stimulation electrodes differs for different neurostimulation methods. For example, for spinal cord stimulation (SCS) to relieve pain, an electrode is positioned in the epidural space for delivering electrical stimulation to the spinal cord. The placement of the SCS electrodes depends on the location where the subject is experiencing pain and may be carried out using standard surgical procedures for placement of SCS electrodes. SCS electrodes should be placed to allow stimulation of nerves in the area where pain is felt. The SCS electrodes are placed at the appropriate level along the spine to relieve pain. For example, the electrode may be placed in the epidural space between vertebrae T9 to T10 to relieve lower back pain, at lower thoracic levels for lower limb pain, and at cervical levels for upper limb pain. Paddle electrodes or percutaneous electrodes may be used for spinal cord stimulation. Fluoroscopy or ultrasound may be used to provide guidance for placement of the SCS electrodes. In addition, a pulse generator is placed under the skin, typically near the buttocks or abdomen. The surgical procedure may involve an incision over the spine for placement of the SCS electrodes. An electrode lead is tunneled under the skin and connected to the pulse generator. A subcutaneous pocket can be formed in the abdominal-flank area or the upper buttock for implantation of the pulse generator.
[0299] For peripheral nerve stimulation (PNS), an electrode is positioned near a peripheral nerve for delivering electrical stimulation to a nerve. The PNS electrode is typically placed 0.5 cm to 1 cm from a target nerve. Ultrasound may be used for identification of the target nerve and to guide placement of the PNS electrode. The placement of PNS electrodes depends on the location where the subject is experiencing pain. PNS electrodes should be placed to allow stimulation of nerves in the areawhere pain is felt without causing muscle contraction. After placement, the PNS electrode is connected to an external stimulator that delivers electrical current through the PNS electrode to peripheral nerves to disrupt pain signals. In some embodiments, peripheral nerve stimulation is delivered to a vagus nerve, a median nerve, an ulnar nerve, a radial nerve, an occipital nerve, a sphenopalatine ganglion, a trigeminal nerve, a tibial nerve, a sacral nerve, a hypoglossal nerve, a phrenic nerve, a greater auricular nerve, a peroneal nerve, a sciatic nerve, a pudendal posterior nerve, a saphenous nerve, a suprascapular nerve, a carotid sinus nerve, a cervical sympathetic chain nerve, or a auriculotemporal nerve.
[0300] Peripheral nerve field stimulation (PNFS) is similar to PNS, but can be used to stimulate a wider area around a peripheral nerve than PNS. In contrast to PNS, which typically targets the major, deeper peripheral nerves causing pain, PNFS targets small nerve fibers under the skin in an area of pain and in surrounding tissue. PNFS electrodes are placed superficially in the skin in an area of pain to create an electrical field around the small nerve fibers. After placement, the PNFS electrodes are connected to a stimulator device that delivers electrical pulses that interfere with pain signals. Either PNS or PNFS can be used to treat chronic pain conditions such as, but not limited to, back pain, neck pain, leg pain, neuropathic pain, diabetic neuropathy, complex regional pain syndrome, post-amputation pain, occipital neuralgia and other headache syndromes, and trigeminal neuralgia.
[0301] For neuromuscular electrical stimulation (NMES), an electrode is positioned near a muscle for delivering electrical stimulation to the muscle. NMES electrodes are placed on the skin over a target muscle or muscle group typically with longitudinal placement along muscle fibers. Self- adhesive electrodes may be used to attach electrodes to the surface of the skin over a target muscle. NMES electrodes are preferably not placed over joints or bony prominences to avoid causing pain during electrical stimulation. After placement of a NMES electrode, an electrical stimulator is attached to the NMES electrode. NMES can be used to treat various neurological disorders such as, but not limited to, stroke, spinal cord injury, muscle weakness from disuse or surgery, and musculoskeletal issues such as strains, sprains, and pain from conditions like arthritis. NMES can also be used for rehabilitation after orthopedic procedures, to manage spasticity, prevent muscle atrophy, and improve circulation and motor coordination.
[0302] Transcranial stimulation uses direct current, alternating current, or magnetic fields for neurostimulation of the brain. For transcranial direct current stimulation, electrodes are placed on the scalp to deliver direct current for neurostimulation of the brain. The electrodes are connected to a stimulator device that delivers constant current. For alternating current transcranial stimulation, electrodes are placed on the scalp to deliver alternating electrical current for neurostimulation of the brain. The electrodes are connected to a stimulator device that delivers alternating current. Theelectrodes are placed over a target region to be stimulated. In some cases, multiple electrodes are placed over multiple target regions. Smaller sized electrodes provide more focused stimulation, whereas larger electrodes spread stimulation over a larger area. A headstrap may be used to help hold electrodes in place. To produce a magnetic field for transcranial magnetic stimulation, a magnetic coil is placed on the scalp to deliver magnetic pulses to targeted brain areas. The magnetic coil is connected to a pulse generator that delivers electric current to the magnetic coil. Transcranial magnetic stimulation may be performed with magnetic coils having any suitable shape. In some embodiments, transcranial magnetic stimulation is delivered with a figure-of-eight coil, a circular coil, a four-leaf coil, a double-cone coil, a Hesed (H-core) coil, a butterfly coil, a slinky coil, a 3-D differential coil, a deformable coil, a C-shaped coil, a hat-shaped coil, or a coil having a customized shape designed to fit to a subject’s anatomy. A ferromagnetic material may be integrated into the coil to enhance the intensity and focus of the magnetic field. Transcranial stimulation can be used to treat neurological and psychiatric disorders, including, but not limited to, major depressive disorder, obsessive-compulsive disorder (OCD), anxiety disorders such as generalized anxiety disorder (GAD), social anxiety disorder, post-traumatic stress disorder (PTSD), and panic attacks; chronic pain, migraines, stroke, attention-deficit / hyperactivity disorder (ADHD), schizophrenia, movement disorders such as Parkinson's disease and Tourette syndrome; cognitive impairment, and addiction.
[0303] Pulsed focused ultrasound stimulation can be delivered to a target location with an ultrasound transducer that emits bursts of sound waves. The ultrasound transducer may comprise a single-element transducer with a fixed focal point or a phased-array transducer composed of a series of several single element transducers that can be controlled to move the focal point without moving the device. Pulsed focused ultrasound stimulation can be used for neuromodulation, for example, by targeting a nerve in the central or peripheral nervous system to excite or suppress neural activity. In some embodiments, pulsed focused ultrasound is used to provide neurostimulation for treatment of a neurological or psychiatric disorder such as, but not limited to, Parkinson's disease, essential tremor, epilepsy, Alzheimer's disease, stroke, brain tumors, depression, obsessive-compulsive disorder, schizophrenia, or opioid addiction.
[0304] In certain embodiments, the method further comprises mapping the brain of the subject to optimize positioning of a neural recording electrode. For example, positioning of the neural recording electrode can be optimized to detect brain activity features, including neural signals from neural activity associated with a symptom of a neurological disorder or psychiatric disorder that can be treated with neurostimulation. For example, the levels of overall power, or power in specific frequency ranges (e.g., alpha, beta, gamma, delta, and / or theta) may be correlated with a symptom or clinical state of a neurological disorder or psychiatric disorder. The neural recording electrodes may bepositioned to optimize detection of brain activity in specific frequency ranges that correlate with a symptom or clinical state of a neurological disorder or psychiatric disorder such as delta frequency neural oscillations in a range from 1 Hz to 4 Hz, theta frequency neural oscillations in a range from 4 Hz to 7 Hz, alpha frequency neural oscillations in a range from 8 Hz to 12 Hz, beta frequency neural oscillations in a range from 13 Hz to 30 Hz, and / or gamma frequency neural oscillations in a range from 60 Hz to 90 Hz. In certain embodiments, personalized power band features for detecting a symptom or clinical state of a neurological disorder or psychiatric disorder are identified for a subject.
[0305] Detection of brain activity may be performed by any method known in the art. For example, functional brain imaging of neural activity may be carried out by electrical methods such as electroencephalography (EEG), stereoelectroencephalography (sEEG), electrocorticography (ECoG), magnetoencephalography (MEG), single photon emission computed tomography (SPECT), as well as metabolic and blood flow studies such as functional magnetic resonance imaging (fMRI), and positron emission tomography (PET). In some embodiments, a subcortical region, cortical region, sensorimotor cortex region, subthalamic nucleus region, globus pallidus internus region, basal ganglia region, thalamic region, precentral gyrus region, cross-central sulcus region, right amygdala region, left amygdala region, right orbitofrontal cortex region, left subgenual cingulate region, right hippocampus region, frontal lobe region, subgaleal region, or other regions are mapped to determine optimal positioning for neural recording electrodes. One or more of these regions may be implanted with neural recording electrodes to measure electrical signals from neural activity, including brain electrical signals from neural activity associated with a symptom or clinical state of a neurological disorder or psychiatric disorder that can be treated with stimulation (e.g., electrical stimulation, magnetic stimulation, or ultrasound stimulation).
[0306] Closed-loop therapy can be performed with a neurostimulator used in combination with a neural recording device that records brain electrical activity, wherein stimulation (e.g., electrical stimulation, magnetic stimulation, or ultrasound stimulation) is delivered to the subject when a pattern of neural activity associated with a symptom or clinical state of a neurological disorder or psychiatric disorder is detected. The parameters for applying the stimulation may be initially determined empirically during treatment or may be pre-defined, such as, from a trial study with a subject, then optimized using the computer-implemented methods described herein. Varying stimulation settings may be applied when certain features are detected, including baseline (stimulation off), optimal therapeutic stimulation, modified and ineffective stimulation, and maximum tolerated stimulation to identify personal neural signatures of a symptom or clinical state of a neurological disorder or psychiatric disorder for a patient, which are used to assist with programming of a stimulator todetermine optimal therapeutic stimulation parameters for treating the symptom or clinical state of the neurological disorder or psychiatric disorder.
[0307] The parameters for electrical stimulation may include one or more of frequency, pulse width / duration, duty cycle, intensity / amplitude, pulse pattern, program duration, program frequency, and the like. The electrical stimulation may be applied, for example, to the brain, spinal cord, or peripheral nerves.
[0308] Frequency refers to the pulses produced per second during stimulation and is stated in units of Hertz (Hz, e.g., 60 Hz = 60 pulses per second). The frequencies of electrical stimulation used in the present methods may vary widely depending on numerous factors and may be determined empirically during treatment of the subject or may be pre-defined. In certain embodiments, the method may involve applying electrical stimulation to the brain at a frequency of 2 Hz - 250 Hz, such as, 25 Hz - 200 Hz, 50 Hz - 250 Hz, 50 Hz -185 Hz, 50 Hz -150 Hz, 75 Hz - 200 Hz, 100 Hz - 200 Hz, 100 Hz - 180 Hz, 100 Hz - 160 Hz, 120 Hz - 150 Hz, or 130 Hz - 140 Hz. In some embodiments, the electrical stimulation to the brain is applied at a frequency of about 120 Hz to about 160 Hz, including any pulse frequency within this range such as 120 Hz, 122 Hz, 124 Hz, 126 Hz, 128 Hz, 130 Hz, 132 Hz, 133 Hz, 134 Hz, 135 Hz, 136 Hz, 137 Hz, 138 Hz, 139 Hz, 140 Hz, 142 Hz, 144 Hz, 146 Hz, 148 Hz, 150 Hz, 152 Hz, 154 Hz, 156 Hz, 158 Hz, or 160 Hz. In some embodiments, noninteger pulse frequencies are used (e.g. 135.2 Hz, 135.4 Hz, etc.).
[0309] The electrical stimulation may be applied in pulses such as a uniphasic or a biphasic pulse.The time span of a single pulse is referred to as the pulse width or pulse duration. The pulse width used in the present methods may vary widely depending on numerous factors (e.g., severity of the disease, status of the patient, and the like) and may be determined empirically or may be pre-defined. In certain embodiments, the method may involve applying an electrical stimulation at a pulse width of about 10 psec - 500 psec, for example, 20 psec - 450 psec, 40 psec - 450 psec, 60 psec - 450 psec, 60 psec - 220 psec, 60 psec - 120 psec, or 60 psec - 90 psec. In some embodiments, the electrical stimulation to the brain is applied at a pulse width of about 60 psec to about 210 psec, including any pulse width within this range such as 60 psec, 65 psec, 70 psec, 75 psec, 80 psec, 85 psec, 90 psec, 95 psec, 100 psec, 105 psec, 110 psec, 115 psec, 120 psec, 125 psec, 130 psec, 135 psec, 140 psec, 145 psec, 150 psec, 155 psec, 160 psec, 165 psec, 170 psec, 175 psec, 180 psec, 185 psec, 190 psec, 195 psec, 200 psec, 205 psec, 210 psec, 215 psec, or 220 psec.
[0310] The electrical stimulation may be applied for a stimulation period of 0.1 sec-1 month, with periods of rest (i.e., no electrical stimulation) possible in between. In certain cases, the period of electrical stimulation may be 0.1 sec-1 week, 1 sec-1 day, 10 sec-12 hours, 1 min-6 hours, 10 min- 1 hour, and so forth. In certain cases, the period of electrical stimulation may be 1 sec-1 min, 1sec-30 sec, 1 sec- 15 sec, 1 sec- 10 sec, 1 sec-6 sec, 1 sec-3 sec, 1 sec-2 sec, or 6 sec- 10 sec. The period of rest in between each stimulation period may be 60 sec or less, 30 sec or less, 20 sec or less, or 10 sec. In some embodiments, electrical stimulation may be applied for a year or more, 2 years or more, 3 years or more, 5 years or more, or 10 years or more. In some embodiments, electrical stimulation may be continued indefinitely as part of a long-term DBS therapy regimen.
[0311] The electrical stimulation may be applied with an amplitude of current of 0.1 mA-500 mA, such as, 0.1 mA-25 mA, such as, 0.1 mA-20 mA, 0.1 mA-15 mA, 0.1 mA-10 mA, 0.1 mA-2 mA, 0.1 mA-1 mA, 1 mA-20 mA, 1 mA-10 mA, 2 mA-30 mA, 2 mA-15 mA, 2 mA-10 mA, or 1 mA-3 mA, 1 mA-100 mA, 100 mA-200 mA, 200 mA-300 mA, 300 mA-400 mA, or 400 mA-500 mA. In some embodiments, the amplitude of current is 0.1 mA-3.5 mA, or any amplitude of current in this range such as 0.1 mA, 0.2 mA, 0.3 mA, 0.4 mA, 0.5 mA, 0.6 mA, 0.7 mA, 0.8 mA, 0.9 mA, 1.0 mA, 1.1 mA, 1.2 mA, 1.3 mA, 1.4 mA, 1.5 mA, 1.6 mA, 1.7 mA, 1.8 mA. 1.9 mA, 2.0 mA, 2.1 mA, 2.2 mA, 2.3 mA, 2.4 mA, 2.5 mA, 2.6 mA, 2.7 mA, 2.8 mA, 2.9 mA, 3.0 mA, 3.1 mA, 3.2 mA, 3.3 mA, 3.4 mA, or 3.5 mA. In some embodiments, the amplitude of current is 10 mA-500 mA, or any amplitude of current in this range such as 10 mA, 20 mA, 30 mA, 40 mA, 50 mA, 60 mA, 70 mA, 80 mA, 90 mA, 100 mA,110 mA, 120 mA, 130 mA, 140 mA, 150 mA, 160 mA, 170 mA, 180 mA, 190 mA, 200 mA, 210 mA,220 mA, 230 mA, 240 mA, 250 mA, 260 mA, 270 mA, 280 mA, 290 mA, 300 mA, 310 mA, 320 mA,330 mA, 340 mA, 350 mA, 360 mA, 370 mA, 380 mA, 390 mA, 400 mA, 410 mA, 420 mA, 430 mA,440 mA, 450 mA, or 500 mA. The electrical stimulation may be applied with an amplitude of voltage of 0.1 V-15V, such as, 0.1 V-10V, 0.1 V-5V, 1 V-10V, 1 V-5, V, or 1 V-3.5V. In some embodiments, the amplitude of voltage is 1 V-3.5 V, or any amplitude of voltage in this range such as 1 V, 1.1 V, 1.2 V, 1.3 V, 1.4 V, 1.5 V, 1.6 V, 1.7 V, 1.8 V, 1.9 V, 2.0 V, 2.1 V, 2.2 V, 2.3 V, 2.4 V, 2.5 V, 2.6 V, 2.7 V, 2.8 V, 2.9 V, 3.0 V, 3.1 V, 3.2 V, 3.3 V, 3.4 V, or 3.5 V.
[0312] The electrical stimulation having the parameters as set forth above may be applied over a program duration of around 1 day or less, such as, 18 hours, 6 hours, 3 hours, 2 hours, 1 hour, 45 minutes, 30 minutes, 20 minutes, 10 minutes, or 5 minutes, or less, e.g., 1 minute - 5 minutes, 2 minutes - 10 minutes, 2 minutes - 20 minutes, 2 minutes - 30 minutes, 5 minutes - 10 minutes, 5 minutes - 30 minutes, or 5 minutes - 15 minutes, 10 minutes - 400 minutes, 25 minutes - 300 minutes, 50 minutes - 200 minutes, or 75 minutes - 150 minutes, which period would include the application of pulses and the intervening rest period. The program may be repeated at a desired program frequency to ameliorate symptoms of the subject. As such, a treatment regimen may include a program for electrical stimulation at a desired program frequency and program duration. In some embodiments, the treatment regimen is controlled by a control unit in communication with a pulse generator connected to the one or more stimulation electrodes in a closed-loop treatment regimen.
[0313] Alternatively, the subject methods may use transcranial stimulation. The transcranial stimulation may comprise transcranial direct current stimulation, transcranial alternating current stimulation, or transcranial magnetic stimulation. The parameters for transcranial direct current stimulation may include one or more of current intensity, duration, polarity of the current, current density, ramp time, and the like. The parameters for transcranial alternating current stimulation may include one or more of current amplitude, frequency, phase difference, duration, and the like. The parameters for transcranial magnetic stimulation may include pulse parameters such as intensity, frequency, shape, width, and amplitude; spatial parameters such as coil type and position; and protocol parameters such as train length, inter-train interval, and number of pulses and sessions.
[0314] In some embodiments, transcranial direct current stimulation is applied with a current intensity of 0.5 mA-4 mA such as 0.5 mA-1 mA, 1 mA-2 mA, 1 mA-3 mA, 1.5 mA-3 mA, or 3 mA-4 mA, or any current intensity in these ranges such as 0.5 mA, 1 mA, 1.5 mA, 2 mA, 2.5 mA, 3 mA, 3.5 mA, or 4 mA.
[0315] Polarity of the current refers to the direction of the current flow. The polarity of the transcranial direct current determines whether the current flows into a neuron (anodal) or exits a neuron (cathodal) and the effect on the membrane potential of a neuron. Anodal stimulation typically depolarizes neurons which increases excitability of neurons in the stimulated brain region and increases the number of action potentials. Cathodal stimulation typically hyperpolarizes neurons, which has an inhibitory effect on the stimulated brain region and decreases the number of action potentials.
[0316] Current density refers to the amount of electrical current flowing through a unit area of tissue and is calculated as current intensity divided by the electrode size. In some embodiments, the transcranial direct current density is in a range of 0.1 A / m2to 4 A / m2, 0.1 A / m2to 0.5 A / m2, 0.5 A / m2to 1 A / m2, or 1 A / m2to 2 A / m2, including any current density within these ranges such as 0.1 A / m2,0.2 A / m2, 0.3 A / m2, 0.4 A / m2, 0.5 A / m2, 0.6 A / m2, 0.7 A / m2, 0.8 A / m2. 0.9 A / m2, 1.0 A / m2, 1.1 A / m2,1.2 A / m2, 1.3 A / m2, 1.4 A / m2, 1.5 A / m2, 1.6 A / m2, 1.7 A / m2, 1.8 A / m2, 1.9 A / m2, 2.0 A / m2, 2.1 A / m2,2.2 A / m2, 2.3 A / m2, 2.4 A / m2, 2.5 A / m2, 2.6 A / m2, 2.7 A / m2, 2.8 A / m2, 2.9 A / m2, 3.0 A / m2, 3.1 A / m2,3.2 A / m2, 3.3 A / m2, 3.4 A / m2, 3.5 A / m2, 3.6 A / m2, 3.7 A / m2, 3.8 A / m2, 3.9 A / m2, or 4.0 A / m2.
[0317] In some embodiment, transcranial direct current stimulation having the parameters as set forth above is applied for a duration ranging from 1 minute to 1 hour, including any duration within this range such as 1 minutes, 2 minutes, 3 minutes, 4 minutes, 5 minutes, 6 minutes, 7 minutes, 8 minutes, 9 minutes, 10 minutes, 11 minutes, 12 minutes, 13 minutes, 14 minutes, 15 minutes, 16 minutes, 17 minutes, 18 minutes, 19 minutes, 20 minutes, 21 minutes, 22 minutes, 23 minutes, 24minutes, 25 minutes, 26 minutes, 27 minutes, 28 minutes, 29 minutes, 30 minutes, 35 minutes, 40 minutes, 45 minutes, 50 minutes, 55 minutes, or 60 minutes.
[0318] In some embodiments, transcranial alternating current stimulation is applied with a current amplitude of 0.5 mA to 2 mA (i.e., measured from the peak of the positive phase to the peak of the negative phase of the sinusoidal wave), including any current amplitude within this range such as 0.5 mA, 0.6 mA, 0.7 mA, 0.8 mA, 0.9 mA, 1.0 mA. 1.1 mA, 1.2 mA, 1.3 mA, 1.4 mA, 1.5 mA, 1.6 mA,1.7 mA, 1.8 mA, 1.9 mA, or 2.0 mA.
[0319] In some embodiments, transcranial alternating current stimulation is applied with a frequency, ranging from 0.5 Hz to 80 Hz, including any frequency within this range such as 0.5 Hz, 0.6 Hz, 0.7 Hz, 0.8 Hz, 0.9 Hz, 1 Hz, 2 Hz, 3 Hz, 4 Hz, 5 Hz, 6 Hz, 7 Hz, 8 Hz, 9 Hz, 10 Hz, 11 Hz, 12 Hz, 13 Hz, 14 Hz, 15 Hz, 16 Hz, 17 Hz, 18 Hz, 19 Hz, 20 Hz, 25 Hz, 30 Hz, 35 Hz, 40 Hz, 45 Hz, 50 Hz, 55 Hz, 60 Hz, 65 Hz, 70 Hz, 75 Hz, or 80 Hz. In some embodiments, the frequency is chosen to match intrinsic brain oscillations.
[0320] Transcranial alternating current stimulation uses sinusoidal alternating currents that oscillate back and forth over time. The term “phase difference” refers to the timing difference, measured in degrees, between the oscillating currents applied to different brain regions or electrodes. The choice of phase difference influences the location of the electric field's focus. In some embodiments, transcranial alternating current stimulation is applied with a phase difference of 0°, 45°, 60°, 90°, or 180°, wherein 360° represents a full cycle of a wave. For example, a phase difference of 0° (in- phase) can be used to synchronize neural oscillations in different brain areas, whereas a phase difference of 180° (anti-phase) can be used to desynchronize neural oscillations in different brain areas.
[0321] In some embodiments, transcranial alternating current stimulation having the parameters as set forth above is applied for a duration ranging from 1 minute to 24 hours, 1 minute to 10 hours, 1 minute to 1 hour, or 1 hour to 5 hours, including any duration within these ranges such as 1 minute, 2 minutes, 3 minutes, 4 minutes, 5 minutes, 6 minutes, 7 minutes, 8 minutes, 9 minutes, 10 minutes, 15 minutes, 20 minutes, 25 minutes, 30 minutes, 35 minutes, 40 minutes, 45 minutes, 50 minutes, 55 minutes, 1 hour, 2 hours, 3 hours, 4 hours, 5 hours, 6 hours, 7 hours, 8 hours, 9 hours, 10 hours,11 hours, 12 hours, 13 hours, 14 hours, 15 hours, 16 hours, 17 hours, 18 hours, 19 hours, 20 hours, 21 hours, 22 hours, 23 hours, or 24 hours.
[0322] The pulse intensity used in transcranial magnetic stimulation refers to the strength of the magnetic pulse, which is typically expressed as a percentage of an individual's motor threshold (MT). In some embodiments, transcranial magnetic stimulation is delivered at 80% to 120% of the MT of a subject, including any percentage of MT in this range such as 80%, 81%, 82%, 83%, 84%, 85%,86%, 87%, 88%, 89%, 90%, 91%, 92%, 93%, 94%, 95%, 96%, 97%, 98%, 99%, 100%, 101%, 102%,103%, 104%, 105%, 106%, 107%, 108%, 109%, 110%, 111%, 112%, 113%, 114%, 115%, 116%,117%, 118%, 119%, or 120%.
[0323] In some embodiments, transcranial magnetic stimulation is delivered with a pulse frequency in a range of 0.5 Hz to 1000 Hz, 0.5 Hz to 25 Hz, 0.5 Hz to 1 Hz, 5 Hz to 10 Hz, 10 Hz to 20 Hz, 15 Hz to 25 Hz, or 50 Hz to 1000 Hz, including any pulse frequency within these ranges such as 0.5 Hz, 1 Hz, 2 Hz, 3 Hz, 4 Hz, 5 Hz, 6 Hz, 7 Hz, 8 Hz, 9 Hz, 10 Hz, 11 Hz, 12 Hz, 13 Hz, 14 Hz, 15 Hz, 16Hz, 17 Hz, 18 Hz, 19 Hz, or 20 Hz. Pulse frequencies of 1 Hz or less (i.e., low frequency) reduce cortical excitability whereas higher pulse frequencies, typically, in a range of 5 Hz to 20 Hz (i.e., high frequency) increase cortical excitability, induce synaptic plasticity, and strengthen neuronal connections in the brain. Even higher pulse frequencies such as in a range of 50 Hz to 1000 Hz (i.e., ultra-high frequency) are generally excitatory and may be used to increase brain activity.
[0324] The stimulus train duration is the length of time of a burst or train of magnetic pulses. In some embodiments, transcranial magnetic stimulation is applied with a stimulus train duration ranging from2 to 5 seconds, including any stimulus train duration within this range such as 2.0 seconds, 2.1 seconds, 2.2 seconds, 2.3 seconds, 2.4 seconds, 2.5 seconds, 2.6 seconds, 2.7 seconds, 2.8 seconds, 2.9 seconds, 3.0 seconds, 3.1 seconds, 3.2 seconds, 3.3 seconds, 3.4 seconds, 3.5 seconds, 3.6 seconds, 3.7 seconds, 3.8 seconds, 3.9 seconds, 4.0 seconds, 4.1 seconds, 4.2 seconds, 4.3 seconds, 4.4 seconds, 4.5 seconds, 4.6 seconds, 4.7 seconds, 4.8 seconds, 4.9 seconds, or 5.0 seconds.
[0325] The inter-train interval is the time between different bursts or trains of pulses. In some embodiments, transcranial magnetic stimulation is applied with an inter-train interval ranging from 1 second to 1 minute, 2 seconds to 10 seconds, 10 seconds to 20 seconds, 20 seconds to 30 seconds, or 40 seconds to 50 seconds, including any inter-train interval within these ranges such as 1 second, 2 seconds, 3 seconds, 4 seconds, 5 seconds, 6 seconds, 7 seconds, 8 seconds, 9 seconds, 10 seconds, 15 seconds, 20 seconds, 25 seconds, 30 seconds, 35 seconds, 40 seconds, 45 seconds, or 50 seconds.
[0326] In some embodiments, transcranial magnetic stimulation is applied with a total number of pulses per session ranging from 500 pulses to 100,000 pulses, 2000 pulses to 4500 pulses, 5000 pulses to 10,000 pulses, 20,000 pulses to 50,000 pulses, or 50,000 pulses to 100,000 pulses, including any number of pulses within these ranges such as 500 pulses, 600 pulses, 700 pulses, 800 pulses, 900 pulses, 1000 pulses, 1100 pulses, 1200 pulses, 1300 pulses, 1400 pulses, 1500 pulses, 1600 pulses, 1700 pulses, 1800 pulses, 1900 pulses, 2000 pulses, 2100 pulses, 2200 pulses, 2300 pulses, 2400 pulses, 2500 pulses, 2600 pulses, 2700 pulses, 2800 pulses, 2900 pulses, 3000 pulses,3500 pulses, 4000 pulses, 4500 pulses, 5000 pulses, 5500 pulses, 6000 pulses, 6500 pulses, 7000 pulses, 7500 pulses, 8000 pulses, 8500 pulses, 9000 pulses, 9500 pulses, 10,000 pulses, 20,000 pulses, 30,000 pulses, 40,000 pulses, 45,000 pulses, 50,000 pulses, 55,000 pulses, 60,000 pulses, 65,000 pulses, 70,000 pulses, 75,000 pulses, 80,000 pulses, 85,000 pulses, 90,000 pulses, 95,000 pulses, or 100,000 pulses.
[0327] The pulse shape refers to the waveform of the magnetic pulse. The waveform can be monophasic (unidirectional), biphasic (bidirectional, with two phases), or polyphasic (multi-phase). In some embodiments, transcranial magnetic stimulation is applied with a sinusoidal, square, rectangular, or customized wave pulse shape.
[0328] Alternatively, the subject methods may use ultrasound stimulation. The parameters for ultrasound stimulation may include one or more of stimulation duration, ultrasound frequency, pulse repetition frequency, number of pulses, pulse length, duty cycle, negative peak pressure, spatial average pulse average intensity (Isapa), and the like. The ultrasound stimulation may comprise pulsed focused ultrasound, including low-intensity pulsed ultrasound (LI PUS) or high-intensity pulsed ultrasound (HIFU).
[0329] In certain embodiments, pulsed focused ultrasound has an ultrasound frequency ranging from about 20 kHz to about 5.0 MHz, about 0.7 MHz to about 3.0 MHz, or about 1.0 MHz to about 1.1 MHz, including any ultrasound frequency within these ranges, such as 0.2 MHz, 0.4 MHz, 0.6MHz, 0.8 MHz, 1.0 MHz, 1.1 MHz, 1.2 MHz, 1.3 MHz, 1.4 MHz, 1.5 MHz, 1.6 MHz, 1.7 MHz, 1.8MHz, 1.9 MHz, 2.0 MHz, 2.1 MHz, 2.2 MHz, 2.3 MHz, 2.4 MHz, 2.5 MHz, 2.6 MHz, 2.7 MHz, 2.8MHz, 3.0 MHz, 3.2 MHz, 3.4 MHz, 3.6 MHz, 3.8 MHz, 4.0 MHz, 4.2 MHz, 4.4 MHz, 4.6 MHz, 4.8MHz, or 5.0 MHz.
[0330] In certain embodiments, the pulsed focused ultrasound has a pulse repetition frequency (PRF) ranging from 0.1 Hz to 1000 Hz, 1 Hz to 100 Hz, or about 5 Hz to 20 Hz, or any PRF with these ranges, such as 0.1 Hz, 0.2 Hz, 0.3 Hz, 0.4 Hz, 0.5 Hz, 0.6 Hz, 0.7 Hz, 0.8 Hz, 0.9 Hz, 1 Hz, 2 Hz, 3 Hz, 4 Hz, 5 Hz, 6 Hz, 7 Hz, 8 Hz, 9 Hz, 10 Hz, 20 Hz, 30 Hz, 40 Hz, 50 Hz, 60 Hz, 70 Hz, 80 Hz, 90 Hz, 100 Hz, 150 Hz, 200 Hz, 250 Hz, 300 Hz, 350 Hz, 400 Hz, 450 Hz, 500 Hz, 550 Hz, 600 Hz, 650 Hz, 700 Hz, 750 Hz, 800 Hz, 850 Hz, 900 Hz, 950 Hz, or 1000 Hz.
[0331] In certain embodiments, the pulsed focused ultrasound has a duty cycle ranging from 0.01% to 100% or 1% to 20%, including any ultrasound duty cycle within these ranges such as 0.01%, 0.1%, 1%, 2%, 3%, 4%, 5%, 6%, 7%, 8%, 9%, 10%, 11%, 12%, 13%, 14%, 15%, 16%, 17%, 18%, 19%, 20%, 25%, 30%, 35%, 40%, 45%, 50%, 55%, 60%, 65%, 70%, 75%, 80%, 90%, 95%, or 100%.
[0332] In certain embodiments, the pulsed focused ultrasound has a negative peak pressure (NPP) ranging from 0.1 MPa to 10 MPa, including any NPP within this range such as 0.1 MPa, 0.2 MPa,0.3 MPa, 0.4 MPa, 0.5 MPa, 0.6 MPa, 0.7 MPa, 0.8 MPa, 0.9 MPa, 1 MPa, 2 MPa, 3 MPa, 4 MPa, 5 MPa, 6 MPa, 7 MPa, 8 MPa, 9 MPa, or 10 MPa. In some embodiments, the pulsed focused ultrasound is administered with a negative peak pressure (NPP) of up to 3 MPa. In some embodiments, the pulsed focused ultrasound is administered with a negative peak pressure (NPP) of up to 3 MPa.
[0333] In certain embodiments, the pulsed focused ultrasound is administered to the subject for a time ranging from about 20 seconds to about 7 minutes, including any amount of time within this range, such as 20 seconds, 25 seconds, 30 seconds, 35 seconds, 40 seconds, 45 seconds, 50 seconds, 55 seconds, 1 minute, 1.25 minutes, 1.5 minutes, 1.75 minutes, 2 minutes, 2.25 minutes, 2.5 minutes, 2.75 minutes, 3 minutes, 3.25 minutes, 3.5 minutes, 3.75 minutes, 4 minutes, 4.25 minutes, 4.5 minutes, 4.75 minutes, 5 minutes, 5.25 minutes, 5.5 minutes, 5.75 minutes, 6 minutes, 6.25 minutes, 6.5 minutes, 6.75 minutes, or 7 minutes. In some embodiments, the pulsed focused ultrasound is administered to the subject for at least 20 seconds. In some embodiments, the pulsed focused ultrasound is administered to the subject for a period ranging from about 1 minute to about 5 minutes.
[0334] As noted above, the treatment may ameliorate one or more symptoms of a neurological or psychiatric disorder suffered by the subject. In certain cases, the symptom that may be ameliorated by the disclosed method is a symptom of a sleep disorder such as insomnia, hyposomnia, or hypersomnia. The treatment may increase non-REM or REM sleep time, increase stage N2 sleep time, and / or increase stage N3 sleep time. Symptoms of a sleep disorder may be assessed using any standardized assessment method. In certain cases, the symptom of the sleep disorder is measured by self-reporting, such as, by using a visual-analog scale (VAS), a psychomotor vigilance test (PVT), a Likert scale, a Stanford Sleepiness Scale (SSS), a maintenance of wakefulness test (MWT), an Epworth sleepiness scale (ESS), a multiple sleep latency test (MSLT), or an Athens insomnia scale (AIS). In some embodiments, the subject is monitored while sleeping using actigraphy, electroencephalography, or polysomnography. Autonomic data may also be collected while the subject is sleeping. In some cases, an observer may monitor the subject at night to determine if the subject stays asleep or has nocturnal awakenings.
[0335] In certain cases, effectiveness of treatment for sleep dysfunction may be assessed by detecting brain activity (e.g., electrical signals) associated with a sleep feature or sleep stage, which may be within a subcortical or cortical region, or another area. For example, the brain region may be the cortical precentral gyrus region and / or postcentral gyrus region and may include read outs of physiologically important variables associated with sleep such as delta / slow waves, spindles, K complexes, beta bursts and beta oscillations as well as spectral coherence. Detection of brain activitymay be performed by functional brain imaging. Functional brain imaging may be carried out by electrical methods such as electroencephalography (EEG), chronic subgaleal recordings, burr hole or cranially mounted neurostimulator electrode recording, electrocorticography (ECoG), magnetoencephalography (MEG), single photon emission computed tomography (SPECT), as well as metabolic and blood flow studies such as functional magnetic resonance imaging (fMRI), and positron emission tomography (PET). In some embodiments, electrical methods for assessing effectiveness of treatment may involve use of a detection electrode as described herein or placement of an additional electrode for measuring electrical signals at a secondary region of the brain or in the skull, or extracranially. One or more regions of the brain may be implanted with an electrode and electrical signals measured for assessment of effectiveness of the treatment. Any suitable electrodes may be used for measurements and may include one or more surface electrodes (non-brain penetrating electrode(s)) or one or more depth electrodes (brain penetrating electrode(s)) as described herein.
[0336] In the case of a movement disorder, the treatment may assist movement of the subject and reduce motor symptoms such as bradykinesia, dyskinesia, dysarthria, dystonia, tremor, or gait disturbance. Assessment of effectiveness of the treatment may be performed using any known method for evaluating motor symptoms. In some embodiments, efficacy of the treatment is evaluated using a Movement Disorder Society-Sponsored Revision of the Unified Parkinson's Disease Rating Scale (MDS-UPDRS) or a Hoehn and Yahr (HnY) scale, a Parkinson’s Disease Composite Scale (PDCS), or a Schwab and England Activities of Daily Living (ADL) Scale. In some embodiments, assessing effectiveness of the treatment of a movement disorder comprises monitoring the subject using multi-view video recordings of the subject, keylogging data from a computer used by the subject, or a wearable monitor that can acquire accelerometry, gyroscope and / or surface electromyographic (sEMG) data. For example, a wrist-watch style wearable monitor such as the Parkinson’s KinetiGraph®, PKG®, available from PKG Health (San Francisco, CA), can be used to monitor movement continuously to detect various motor symptoms of a movement disorder such as bradykinesia, dyskinesia, tremor, daytime immobility, stiffness, slow movements, gait / walking, daytime somnolence, and sleep fragmentation. An Apple Watch is available from Apple Inc. (Cupertino, CA), which can be used, for example, for monitoring, bradykinesia, dyskinesia, tremors, gait, and arm movement.
[0337] In the case of a psychiatric disorder, the symptoms may include anxiety, depression, frequency of episodes of compulsive behavior, frequency of self-starvation episodes, mania, panic attacks, social anxiety, or distress related to chronic pain. Assessment of effectiveness of the treatment may be performed by neurological examinations and / or neuropsychological tests (e.g.,Minnesota Multiphasic Personality Inventory, Beck Depression Inventory, Mini-Mental Status Examination (MMSE), Visual Analogue Scale for Depression (VAS-D), Depression Rating Scale (HAM-D), Montgomery-Asberg Depression Rating Scale (MADRS), Wisconsin Card Sorting Test (WCST), Tower of London, Stroop task, Montgomery-Asberg Depression Rating Scale (MADRS), a Hamilton Depression Rating Scale (HDRS), Zung Self-Rating Depression Scale (SDS), Yale-Brown Obsessive Compulsive score (Y-BOCS), a Bipolar Affective Disorder Dimension Scale (BADDS), a Mood Disorder Questionnaire (MDQ), a Patient Health Questionnaire-9 (PHQ-9)), motor examination, visual analog scales of pain symptoms, and / or cranial nerve examination.
[0338] In certain cases, the symptom that may be ameliorated by the disclosed method may be anxiety. Anxiety of a subject may be assessed using any standardized assessment method. In certain cases, anxiety may be measured by self-reporting, such as, by a Beck Anxiety Inventory (BAI) score, Visual Analogue Scale for Anxiety (VAS-A), or Hamilton Anxiety Rating Scale (HAM-A). Additional measures of anxiety include State-straight anxiety inventory (STAI) which consists of State Anxiety Scale (S-Anxiety) and Trait Anxiety Scale (T-Anxiety) and hospital anxiety and depression scale-Anxiety (HADS-A). Amelioration of anxiety may include a reduction in anxiety level compared to the anxiety level prior to the treatment. A 5% or higher reduction in anxiety level (measured by BAI or HAM-A, for example), may indicate that the treatment was effective.
[0339] In certain cases, the symptom that may be ameliorated by the disclosed method may be depression. Depression of a subject may be assessed using any standardized assessment method. In certain cases, depression may be measured by self-reporting, such as, by Visual Analogue Scale for Depression (VAS-D), Hamilton Depression Rating Scale (HAM-D), Montgomery-Asberg Depression Rating Scale (MADRS), a Beck Depression Inventory (BDI) score, Center for Epidemiological Studies Depression Scale (CES-D), Geriatric Depression Scale (GDS), or Zung Self-Rating Depression Scale (Zung SDS). In certain cases, an interviewer-administered depression assessment may be used alone or in conjunction with a self-reporting tool. Interviewer-administered depression assessments include Cornell Scale for Depression in Dementia (CSDD) and RAND Corporation Self-Administered Depression Screener Amelioration of depression may include a reduction in depression level compared to the depression level prior to the treatment. A 5% or higher reduction in depression level (measured by BDI score, for example), may indicate that the treatment was effective.
[0340] In certain cases, the symptom that may be ameliorated by the disclosed method is pain.Assessment of effectiveness of the treatment may be performed using any known method for evaluating pain. In certain cases, an interviewer-administered pain assessment may be used alone or in conjunction with a self-reporting tool. Interviewer-administered pain assessments may use anumerical rating scale (NRS), verbal descriptor scale (VDS), visual analog scale (VAS), or a verbal rating scale. In some cases, pain is assessed using a McGill Pain Questionnaire (MPQ), a Wong- Baker FACES® scale, or a behavioral observation scale such as the Face, Legs, Activity, Cry, Consolability (FLACC) scale or behavioral pain scale (BPS).
[0341] In certain cases, effectiveness of treatment may be assessed by detecting brain electrical activity (e.g., neural signals from neural activity associated with a symptom) in a brain region, which will depend on the particular disorder being treated. For example, the brain region may be a sensorimotor cortex region, central sulcus region, precentral gyrus region, postcentral gyrus region, amygdala region, orbitofrontal cortex region, hippocampus region, septum region, cingulate gyrus region, cingulate cortex region, subgenual cingulate region, hypothalamus region, epithalamus region, anterior thalamus region, mammillary body region, or fornix region. Detection of brain activity may be performed by functional brain imaging. Functional brain imaging may be carried out by electrical methods such as electroencephalography (EEG), chronic subgaleal recordings, burr hole or cranially mounted neurostimulator electrode recording, electrocorticography (ECoG), magnetoencephalography (MEG), single photon emission computed tomography (SPECT), as well as metabolic and blood flow studies such as functional magnetic resonance imaging (fMRI), and positron emission tomography (PET). In some embodiments, electrical methods for assessing effectiveness of treatment may involve use of a neural recording electrode as described herein or placement of an additional electrode for measuring electrical signals at a secondary region of the brain or in the skull, or extracranially. One or more regions of the brain may be implanted with an electrode and electrical signals measured for assessment of effectiveness of the treatment. Any suitable electrodes may be used for measurements and may include one or more surface electrodes (non-brain penetrating electrode(s)) or one or more depth electrodes (brain penetrating electrode(s)) as described herein.
[0342] Assessment of effectiveness of treatment may be performed at any suitable time point after commencement of the treatment procedure, for example, during open-loop or closed-loop therapy. Embodiments of the subject methods include assessing effectiveness of neurostimulation in treating a symptom of a neurological disorder or psychiatric disorder in a subject within seconds, minutes, hours, or days after the initial treatment regimen has been completed. In some instances, assessment may be performed at multiple time points. In some cases, more than one type of assessment may be performed at the different time points. In some embodiments, brain activity including brain electrical signals from neural activity associated with symptom may be measured prior to the application of neurostimulation, and assessing may include comparing the subject’s brainactivity after the treatment to that before the treatment and a change in the post-treatment brain activity may indicate successful treatment.
[0343] Upon completion of a treatment regimen, the patient may be assessed for effectiveness of the treatment and the treatment regimen may be repeated, if needed. In certain cases, the treatment regimen may be altered before repeating. For example, one or more of the stimulation parameters such as, but not limited to, frequency, pulse width, pulse shape, pulse repetition frequency, number of pulses, current amplitude, current polarity, current density, phase difference, duty cycle, stimulation duration, program duration, program frequency, and / or placement of a stimulation electrode, neural recording electrode, magnetic coil, or pulse generator / stimulator device may be altered before starting a second treatment regimen.
[0344] Application of the method may include a prior step of selecting a patient for treatment based on need as determined by clinical assessment, which may include assessment of severity of the neurological disorder or psychiatric disorder, physical condition, cognitive assessment, anatomical assessment, behavioral assessment and / or neurophysiological assessment. In certain cases, a subject may be further assessed to determine if adaptive neurostimulation will completely or partially (e.g., at least 50%) relieve symptoms. Such a patient may undergo neurostimulation therapy on a temporary trial basis to determine if neurostimulation decreases the severity of symptoms experienced by the patient. Such a patient may also be implanted with neural recording electrodes to identify personalized neural signatures of “symptoms” and “relief of symptoms” to assist with stimulation programming to determine therapeutic stimulation parameters for the patient and / or evaluate whether neurostimulation therapy will be effective for treating the neurological disorder or psychiatric disorder in the patient.
[0345] In some cases, data driven approaches are used to identify spectral features that are individualized and different from canonical power bands. In some cases, the application of stimulation may alter other neural features from one more regions of the brain. The alterations may be compared to the state of these features prior to the application of stimulation.
[0346] A closed-loop method allows determination of parameters of neurostimulation based upon real-time feedback signals from the brain of the subject. Closed-loop methods and systems allow for automation of treatment of the subject including real-time need-based modulation of the treatment regimen. The machine learning algorithms, disclosed herein, can be used for classification of features in neurophysiology data and to identify optimal personalized adaptive stimulation parameter settings for a patient, which may be used in combination with an open-loop or closed-loop neurostimulation system for treatment of a neurological disorder or neuropsychiatric disorder. For example, the machine learning algorithm may be used to provide suggested optimized parametersettings to a user or medical practitioner for consideration in adjusting the parameter settings of a neurostimulator manually for open-loop neurostimulation. Alternatively, a closed loop system may be used with the machine learning algorithm to identify optimized parameter settings and automate delivery of stimulation with the optimized parameter settings. Exemplary machine learning algorithms and systems for classification of features in neurophysiology data and optimization of parameter settings for neurostimulation are further described in the Examples section and FIGS. 1A, 1C, 17, and 18.Utility
[0347] Clinical neuromodulation encompasses therapeutic interventions which alter neural firing patterns and network activity to ameliorate pathophysiology and recover healthier clinical states. However, these clinical states are usually dynamic; therefore, neuromodulatory parameters ideally are adjusted in response to physiological dynamics, including changes due to circadian rhythm or medication cycles. Such adaptive neuromodulation requires inferring clinical states from the underlying neural activity.
[0348] The disclosed software, methods, and systems address this need and are useful for classification of features in neurophysiology data and automating identification of optimal personalized neurostimulator parameter settings for an individual undergoing treatment of a neurological disorder or neuropsychiatric disorder. In particular, methods of using personalized supervised and unsupervised machine learning models for classification of features in neurophysiology data are provided. In addition, methods of using Bayesian optimization of stimulation parameters to promote desired clinical states and avoid undesired clinical states are provided. The subject methods provide rapid, automated, and data-driven feature classification and optimization of personalized adaptive neurostimulation settings tailored to individual needs of patients and, in particular, should benefit patients with residual symptoms while on standard-of-care conventional neurostimulation.Examples of Non-Limiting Aspects of the Disclosure
[0349] Aspects, including embodiments, of the present subject matter described above may be beneficial alone or in combination, with one or more other aspects or embodiments. Without limiting the foregoing description, certain non-limiting aspects of the disclosure numbered 1-171 are provided below. As will be apparent to those of skill in the art upon reading this disclosure, each of the individually numbered aspects may be used or combined with any of the preceding or followingindividually numbered aspects. This is intended to provide support for all such combinations of aspects and is not limited to combinations of aspects explicitly provided below.1. A computer-implemented method for adjusting parameter settings of a neurostimulator for treatment of a neurological disorder or a psychiatric disorder in a subject, the computer performing steps comprising:(a) receiving training neurophysiology data and test neurophysiology data for the subject;(b) using an unsupervised machine learning algorithm to cluster features of the training neurophysiology data;(c) assigning a clinical state label to each feature cluster to generate labeled training neurophysiology data;(d) training a supervised model using the labeled training neurophysiology data to predict the clinical state of the subject from the test neurophysiology data; and(e) adjusting the parameter settings of the neurostimulator to a predefined set of neuromodulatory parameters based on the clinical state predicted for the subject from the test neurophysiology data.2. The computer-implemented method of aspect 1, wherein said training the supervised model comprises training a linear discriminant analysis (LDA) model to define a linear boundary for distinguishing between two feature clusters.3. The computer-implemented method of aspect 1 or 2, further comprising using the supervised model to classify the clinical state of the subject as a desired clinical state or an undesired clinical state;generating an objective function for said adjusting the parameter settings of the neurostimulator to maximize time spent by the subject in the desired clinical state or minimize time spent by the subject in the undesired clinical state; anditeratively optimizing the parameter settings of the neurostimulator using an optimization algorithm with the objective function as input, wherein optimized parameter settings are generated by maximizing an objective function value to maximize the time spent by the subject in the desired clinical state or minimizing the objective function value to minimize the time spent by the subject in the undesired clinical state.4. The computer-implemented method of aspect 3, wherein said iteratively optimizing the parameter settings comprises optimizing the parameter settings for each brain hemisphere of the subject.5. The computer-implemented method of aspect 3 or 4, further comprising instructing the neurostimulator to apply stimulation to a target region of the subject using the optimized parameter settings.6. The computer-implemented method of aspect 5, wherein the stimulation comprises electrical stimulation, magnetic stimulation, or ultrasound stimulation.7. The computer-implemented method of aspect 6, wherein the stimulation comprises deep brain stimulation, subgaleal electrical stimulation, transcranial stimulation, spinal cord stimulation, peripheral nerve stimulation, peripheral nerve field stimulation, neuromuscular electrical stimulation, or focused ultrasound stimulation.8. The computer-implemented method of aspect 7, wherein the transcranial stimulation is transcranial direct current stimulation, transcranial alternating current stimulation, or transcranial magnetic stimulation.9. The computer-implemented method of any one of aspects 6-8, wherein the electrical stimulation is delivered to a brain region, spinal cord, peripheral nerve, or muscle of the subject.10. The computer-implemented method of aspect 9, wherein the peripheral nerve is a vagus nerve, a median nerve, an ulnar nerve, a radial nerve, an occipital nerve, a sphenopalatine ganglion, a trigeminal nerve, a tibial nerve, a sacral nerve, a hypoglossal nerve, a phrenic nerve, a greater auricular nerve, a peroneal nerve, a sciatic nerve, a pudendal posterior nerve, a saphenous nerve, a suprascapular nerve, a carotid sinus nerve, a cervical sympathetic chain nerve, or a auriculotemporal nerve.11. The computer-implemented method of any one of aspects 3-10, wherein said iteratively optimizing the parameter settings comprises within-session optimization performed during a single recording session, wherein the objective function is evaluated and the parameter settings are updated one or more times within the recording session.12. The computer-implemented method of aspect 11, wherein the recording session is a sleep session, and wherein the parameter settings are updated at intervals of 1 second to 4 hours during the sleep session, optionally wherein the intervals are 1 second, 5 seconds, 10 seconds, 30 seconds, 1 minute, 2 minutes, 5 minutes, 10 minutes, 15 minutes, 20 minutes, 30 minutes, 45 minutes, 1 hour, 1.5 hours, 2 hours, 2.5 hours, 3 hours, 3.5 hours, or 4 hours.13. The computer-implemented method of any one of aspects 3-10, wherein said iteratively optimizing the parameter settings comprises across-session optimization performed over a plurality of recording sessions, wherein the objective function is evaluated at the conclusion of each recording session and the parameter settings are updated between recording sessions.14. The computer-implemented method of aspect 13, wherein the plurality of recording sessions comprises a plurality of nights of sleep spanning a period of at least one week.15. The computer-implemented method of any one of aspects 3-10, wherein said iteratively optimizing the parameter settings comprises both within-session optimization and across-session optimization, wherein within-session optimization adapts the parameter settings in real-time during each recording session, and wherein across-session optimization updates a prior distribution, hyperparameters, or baseline of the Gaussian process regression model based on cumulative observations across recording sessions.16. The computer-implemented method of any one of aspects 3-10, wherein said iteratively optimizing the parameter settings comprises within-session optimization using a first objective function based on instantaneous biomarker values, and across-session optimization using a second objective function based on session-level summary statistics or z-scored biomarker values relative to a baseline characteristic session.17. The computer-implemented method of any one of aspects 3-16, further comprising displaying the optimized parameter settings.18. The computer-implemented method of any one of aspects 3-17, wherein said iteratively optimizing the parameter settings of the neurostimulator comprises optimizing stimulation amplitude and stimulation frequency.19. The computer-implemented method of any one of aspects 3-18, wherein said iteratively optimizing the parameter settings of the neurostimulator comprises using Bayesian optimization with a Gaussian process regression model of the objective function, a multi-armed bandit algorithm, a contextual bandit algorithm, model-based reinforcement learning, model-free reinforcement learning, or an evolutionary optimization method.20. The computer-implemented method of any one of aspects 1-13, wherein the training neurophysiology data and the test neurophysiology data comprise electroencephalography (EEG) data, electrocorticography (ECoG) data, or intracranial electroencephalography (iEEG) data, electromyography (EMG) data, accelerometry data, or any combination thereof.21. The computer-implemented method of any one of aspects 1-20, wherein said training the supervised model further comprises incorporating a state estimation algorithm to track the clinical state overtime, wherein the state estimation algorithm is selected from the group consisting of: Kalman filtering, extended Kalman filtering, unscented Kalman filtering, particle filtering, and ensemble Kalman filtering.22. The computer-implemented method of any one of aspects 1-21, wherein the computer-implemented method further comprises using a switching linear dynamical system (SLDS) to model transitions between clinical states, wherein each clinical state is associated with distinct linear dynamics of the neurophysiology data.23. The computer-implemented method of aspect 22, wherein the computer-implemented method further comprises using a Gaussian Process Latent Variable Model (GP-LVM) to learn a low-dimensional representation of the neurophysiology data, wherein the clinical states correspond to regions in the latent space.24. The computer-implemented method of any one of aspects 1-23, wherein the computer-implemented method further comprises using a recurrent switching linear dynamical system (rSLDS) to jointly infer continuous latent neural dynamics and discrete clinical state sequences from the neurophysiology data.25. The computer-implemented method of any one of aspects 3-24, wherein said iteratively optimizing the parameter settings comprises multi-objective optimization to simultaneously optimize multiple clinical outcomes, wherein a Pareto frontier of non-dominated parameter configurations is identified.26. The computer-implemented method of aspect 25, wherein the multi-objective optimization uses at least two measures selected from a biomarker measure, a symptom measure, a side effect measure, and an energy consumption measure.27. The computer-implemented method of any one of aspects 3-26, wherein said iteratively optimizing the parameter settings incorporates safety constraints on stimulation parameters, wherein parameter configurations predicted to cause adverse effects are excluded from consideration.28. The computer-implemented method of aspect 27, wherein incorporating the safety constraints comprises using Bayesian optimization, wherein the Bayesian optimization only explores parameter configurations predicted to be safe with high probability based on prior observations.29. The computer-implemented method of any one of aspects 3-28, wherein the computer-implemented method further comprises using a hierarchical Bayesian model to leverage data from multiple subjects, wherein population-level parameters provide prior information to accelerate optimization for individual subjects.30. The computer-implemented method of any one of aspects 1-29, wherein the computer-implemented method further comprises using meta-learning to enable rapid adaptation of the supervised model to a new subject with limited subject-specific data for the new subject.31. The computer-implemented method of aspect 30, wherein the meta-learning uses a model-agnostic meta-learning (MAML) algorithm or a Reptile meta-learning algorithm.32. The computer-implemented method of any one of aspects 3-31, further comprising detecting a distribution shift in the neurophysiology data; and retraining the unsupervised clustering, the supervised model, or the optimization algorithm baseline, or any combination thereof when the distribution shift is detected.33. The computer-implemented method of any one of aspects 1-32, further comprising periodically updating a baseline dataset used for objective function computation to account for longterm drift in neurophysiology.34. The computer-implemented method of any one of aspects 1-33, wherein said training the supervised model comprises training a temporal sequence model selected from the group consisting of: long short-term memory (LSTM) networks, gated recurrent units (GRUs), temporal convolutional networks, and transformer models with temporal self-attention.35. The computer-implemented method of any one of aspects 1-34, wherein said training the supervised model comprises training a structured state-space model to capture long-range temporal dependencies in the neurophysiology data.36. The computer-implemented method of any one of aspects 3-35, wherein generating the objective function further comprises rolling-average baseline normalization.37. The computer-implemented method of aspect 36, wherein the rolling-average baseline normalization comprises:(a) computing a rolling average of a biomarker for each of a plurality of baseline recording sessions;(b) temporally aligning the rolling average across sessions relative to a reference event;(c) computing a characteristic session comprising a mean and standard deviation across sessions; and(d) quantifying stimulation effects based on comparing a new recording session to the characteristic session using a z-score.38. The computer-implemented method of any one of aspects 1-37, wherein the computer-implemented method further comprises using gaussian process factor analysis (GPFA) to extract smooth latent dynamics from the neurophysiology data.39. The computer-implemented method of any one of aspects 1-38, wherein the computer-implemented method further comprises using latent factor analysis via dynamical systems (LFADS) to infer single-trial latent dynamics from the neurophysiology data.40. The computer-implemented method of any one of aspects 1-39, wherein the training neurophysiology data and the test neurophysiology data comprise alpha frequency, beta frequency, gamma frequency, delta frequency, theta frequency, or mixed-frequency neural oscillations.41. The computer-implemented method of aspect 40, wherein the delta frequency neural oscillations are in a range from 0.5 Hz to 4 Hz, the theta frequency neural oscillations are in a range from 4 Hz to 7 Hz, the alpha frequency neural oscillations are in a range from 8 Hz to 12 Hz, the beta frequency neural oscillations are in a range from 13 Hz to 30 Hz, and the gamma frequency neural oscillations are in a range from 60 Hz to 90 Hz.42. The computer-implemented method of any one of aspects 1-41, wherein said assigning the clinical state label to each feature cluster comprises using sparse labeling based on auxiliary data or patient self-reports tracking a symptom of the neurological disorder or a psychiatric disorder, wherein the auxiliary data or patient self-reports are collected from the subject at sparse intervals during a day.43. The computer-implemented method of aspect 42, wherein said sparse labeling comprises collecting the auxiliary data or patient self-reports at at least one time point for each feature cluster in order to assign a time-synchronized label from the auxiliary data or patient selfreports to each feature cluster, wherein the time-synchronized label is assigned to the entire feature cluster.44. The computer-implemented method of aspect 42 or 43, wherein the auxiliary data is acquired with an accelerometer, a speech audio monitor, or a video recording device.45. The computer-implemented method of any one of aspects 42-44, wherein the auxiliary data are collected with an external wearable device that tracks the symptom.46. The computer-implemented method of any one of aspects 1-45, wherein said assigning the clinical state label to each feature cluster comprises using a biomarker to identify an association between a feature cluster and a clinical state.47. The computer-implemented method of any one of aspects 1-46, wherein the unsupervised machine learning algorithm uses K-means clustering, K-medoids clustering, Gaussian mixture modeling, density-based spatial clustering of applications with noise (DBSCAN), an autoencoding neural network, a variational autoencoder, Riemannian geometry-based manifold learning on covariance matrices, contrastive learning, a hidden Markov model, isometric mapping (Isomap), locally linear embedding, t-distributed stochastic neighbor embedding (t-SNE), uniform manifold approximation and projection (UMAP), diffusion maps, spectral clustering, or a selforganizing map.48. The computer-implemented method of aspect 47, wherein the unsupervised machine learning algorithm uses the Riemannian geometry-based manifold learning to estimate covariance structures of the training neurophysiology data, wherein clustering is performed based on geodesic distances on the symmetric positive definite (SPD) manifold.49. The computer-implemented method of aspect 47, wherein the unsupervised machine learning algorithm uses the contrastive learning to learn a representation of the training neurophysiology data, wherein temporally adjacent data epochs serve as positive pairs and temporally distant epochs serve as negative pairs.50. The computer-implemented method of aspect 47, wherein the unsupervised machine learning algorithm uses the hidden Markov model to identify latent states in the training neurophysiology data, wherein the hidden states of the hidden Markov model correspond to clinical state labels.51. The computer-implemented method of any one of aspects 1-50, wherein the unsupervised machine learning algorithm uses manifold learning with Isomap, locally linear embedding (LLE), Laplacian eigenmaps, t-distributed stochastic neighbor embedding (t-SNE), uniform manifold approximation and projection (UMAP), or diffusion maps.52. The computer-implemented method of any one of aspects 1-51, wherein the unsupervised machine learning algorithm uses a variational autoencoder (VAE) or a β-VAE to learn a latent representation of the training neurophysiology data, wherein clustering is performed in the latent space.53. The computer-implemented method of any one of aspects 1-52, wherein the neurological disorder is a movement disorder, a sleep disorder, stroke, epilepsy, a traumatic brain injury, dementia, delirium, coma or a minimally conscious state, a pain-associated disorder, or a mood disorder.54. The computer-implemented method of aspect 53, wherein the movement disorder is Parkinson’s disease or dystonia.55. The computer-implemented any one of aspects 1-54, wherein the clinical state label is a sleep stage label, a symptom label, a mood label, or a brain plasticity state label.56. The computer-implemented method of aspect 55, wherein the sleep stage label is N1, N2, N3, or phasic or tonic rapid eye movement (REM).57. The computer implemented method of aspect 55 or 56, wherein delta band power between 0.5 Hz to 4 Hz is used as the primary feature for NREM sleep classification.58. The computer implemented method of any one of aspects 55-57, further comprising using detection of slow wave activity and sleep spindles to discriminate between the N2 sleep stage and the N3 sleep stage.59. The computer-implemented method of aspect 55, wherein the symptom label is a motor symptom label, optionally wherein the motor symptom label is bradykinesia, rigidity, tremor, hyperkinesia, dyskinesia, dysphagia, parkinsonian gait, or postural instability.60. The computer-implemented method of aspect 55, wherein the mood label is depression or anxiety.61. The computer-implemented method of any one of aspects 1-60, further comprising segmenting the training neurophysiology data and the test neurophysiology data into a plurality of data epochs.62. The computer-implemented method of any one of aspects 1-61, further comprising detecting and rejecting or correcting artifacts in the neurophysiology data caused by the stimulation,movement, or recording system noise using threshold-based detection, template matching, independent component analysis (ICA)-based artifact removal, or deep learning-based artifact detection.63. The computer-implemented method of any one of aspects 1-62, wherein linear discriminant analysis (LDA) model is used to distinguish between canonical power band feature clusters.64. The computer-implemented method of any one of aspects 1-63, further comprising using synthetic minority over-sampling technique (SMOTE) for class imbalance correction.65. A computer-implemented method for adjusting parameter settings of a neurostimulator for treatment of sleep dysfunction in a subject with deep brain stimulation, the computer performing steps comprising:(a) receiving training neurophysiology data and test neurophysiology data for the subject, wherein the training neurophysiology data and the test neurophysiology data comprise brain electrical signals from a subcortical region or a cortical region of the brain of the subject recorded while the subject is sleeping;(b) using an unsupervised machine learning algorithm to cluster features of the training neurophysiology data;(c) assigning a sleep stage label to each feature cluster to generate sleep stage labeled training neurophysiology data;(d) training a supervised model using the sleep stage labeled training neurophysiology data to predict the sleep stage of the subject from the test neurophysiology data; and(e) adjusting the parameter settings of the neurostimulator to a predefined set of neuromodulatory parameters based on the sleep stage predicted for the subject from the test neurophysiology data.66. The computer-implemented method of aspect 65, wherein said assigning comprises assigning a non-rapid eye movement (NREM) sleep stage label to a first feature cluster and a rapid eye movement (REM) or wake stage label to a second feature cluster, wherein the first feature cluster has higher average delta power compared to the second feature cluster.67. The computer-implemented method of aspect 66, wherein said training the supervised model comprises training a linear discriminant analysis (LDA) model to define a linear boundary for distinguishing between the first feature cluster and the second feature cluster.68. The computer-implemented method of any one of aspects 65-67, further comprising: generating an objective function for adjusting the parameter settings of the neurostimulator to maximize average delta power during the NREM sleep stage with respect to amplitude of deep brain stimulation administered to the basal ganglia region of the brain of the subject during the N REM sleep stage; anditeratively optimizing the parameter settings of the neurostimulator using an optimization algorithm with the objective function as input, wherein optimized parameter settings are generated by maximizing an objective function value to maximize average delta power during the NREM sleep stage.69. The computer-implemented method of aspect 68, wherein said iteratively optimizing the parameter settings comprises optimizing the parameter settings for each brain hemisphere of the subject.70. The computer-implemented method of aspect 68 or 69, wherein said iteratively optimizing the parameter settings of the neurostimulator comprises performing Bayesian optimization with a Gaussian process regression model of the objective function.71. The computer-implemented method of any one of aspects 68-70, wherein said iteratively optimizing the parameter settings comprises within-night optimization performed during a single night of sleep, wherein the objective function is evaluated and the parameter settings are updated one or more times during the night based on neurophysiology data acquired during that night.72. The computer-implemented method of aspect 71, wherein the parameter settings are updated at intervals of 1 second to 4 hours during the night, optionally wherein the intervals are 1 second, 5 seconds, 10 seconds, 30 seconds, 1 minute, 2 minutes, 5 minutes, 10 minutes, 15 minutes, 20 minutes, 30 minutes, 45 minutes, 1 hour, 1.5 hours, 2 hours, 2.5 hours, 3 hours, 3.5 hours, or 4 hours.73. The computer-implemented method of any one of aspects 68-70, wherein said iteratively optimizing the parameter settings comprises across-night optimization performed over a plurality of nights of sleep, wherein the objective function is evaluated at the conclusion of each night and the parameter settings are updated between nights based on cumulative observations.74. The computer-implemented method of aspect 73, wherein said across-night optimization comprises comparing neurophysiology data from each night to a characteristic night of sleep derived from baseline recordings, wherein the characteristic night comprises a mean and standard deviation of a rolling average of delta power across baseline nights at each time interval from firstentrance into NREM sleep.75. The computer-implemented method of any one of aspects 65-74, further comprising instructing the neurostimulator to apply deep brain stimulation to a basal ganglia region of the brain of the subject using the optimized parameter settings.76. The computer implemented method of any one of aspects 65-75, wherein the cortical region comprises a precentral gyrus region, a cross-central sulcus region, or any combination thereof.77. The computer implemented method of any one of aspects 65-76, wherein the subcortical region comprises a basal ganglia region.78. The computer implemented method of aspect 77, wherein the basal ganglia region is a subthalamic nucleus (STN) region, a globus pallidus region, or a thalamic region.79. The computer-implemented method of any one of aspects 65-78, wherein the training neurophysiology data and the test neurophysiology data comprise field potential data.80. The computer-implemented method of any one of aspects 65-79, wherein the unsupervised machine learning algorithm uses K-means clustering, K-medoids clustering, Gaussian mixture modeling, density-based spatial clustering of applications with noise (DBSCAN), an autoencoding neural network, a variational autoencoder, Riemannian geometry-based manifold learning on covariance matrices, contrastive learning, a hidden Markov model, isometric mapping (Isomap), locally linear embedding, t-distributed stochastic neighbor embedding (t-SNE), uniformmanifold approximation and projection (UMAP), diffusion maps, spectral clustering, or a selforganizing map.81. The computer-implemented method of any one of aspects 65-80, wherein said assigning the sleep stage label to each feature cluster comprises using sparse labeling based on ancillary extracranial polysomnography data, wherein the ancillary extracranial polysomnography data is synchronized with the training neurophysiology data, and wherein the ancillary polysomnography data is collected from the subject at sparse intervals while the subject is sleeping.82. The computer-implemented method of aspect 81, wherein said sparse labeling comprises collecting the ancillary extracranial polysomnography data at at least one time point for each feature cluster in order to assign a time-synchronized label from the ancillary extracranial polysomnography data to each feature cluster, wherein the time-synchronized label is assigned to the entire feature cluster.83. The computer-implemented method of aspect 81 or 82, wherein the ancillary extracranial polysomnography data is collected using a portable or wearable device.84. The computer-implemented method of aspect 83, wherein the portable or wearable device is a headband, ring, or patch comprising a sensor for collecting the ancillary extracranial polysomnography data.85. A computer-implemented method for adjusting parameter settings of a neurostimulator for treatment of Parkinson’s disease in a subject with deep brain stimulation, the computer performing steps comprising:(a) receiving training neurophysiology data and test neurophysiology data for the subject, wherein the training neurophysiology data and the test neurophysiology data comprise brain electrical signals from a subthalamic nucleus region or a sensorimotor cortex region of the brain of the subject;(b) using an unsupervised machine learning algorithm to cluster features of the training neurophysiology data;(c) assigning a clinical state label to each feature cluster to generate labeled training neurophysiology data;(d) training a supervised model using the labeled training neurophysiology data to predict the clinical state of the subject from the test neurophysiology data; and(e) adjusting the parameter settings of the neurostimulator to a predefined set of neuromodulatory parameters based on the clinical state predicted for the subject from the test neurophysiology data.86. The computer-implemented method of aspect 85, wherein said assigning comprises assigning a bradykinetic clinical state label to a first feature cluster and a non-bradykinetic clinical state label to a second feature cluster, wherein the first feature cluster has higher average beta power compared to the second feature cluster.87. The computer-implemented method of aspect 86, wherein said training the supervised model comprises training a linear discriminant analysis (LDA) model to define a linear boundary for distinguishing between the first feature cluster and the second feature cluster.88. The computer-implemented method of any one of aspects 85-87, further comprising: generating an objective function for said adjusting the parameter settings of the neurostimulator to minimize time spent by the subject in the bradykinetic clinical state; and iteratively optimizing the parameter settings of the neurostimulator using an optimization algorithm with the objective function as input, wherein optimized parameter settings are generated by minimizing an objective function value to minimize the time spent by the subject in the bradykinetic clinical state.89. The computer-implemented method of aspect 88, wherein said iteratively optimizing the parameter settings comprises optimizing the parameter settings for each brain hemisphere of the subject.90. The computer-implemented method of aspect 88 or 89, wherein said iteratively optimizing the parameter settings of the neurostimulator comprises performing Bayesian optimization with a Gaussian process regression model of the objective function.91. The computer-implemented method of any one of aspects 88-90, further comprising instructing the neurostimulator to apply deep brain stimulation to a subthalamic nucleus region or a globus pallidus internus region of the brain of the subject using the optimized parameter settings.92. The computer-implemented method of any one of aspects 88-91, wherein the training neurophysiology data and the test neurophysiology data comprise field potential data.93. The computer-implemented method of any one of aspects 88-92, wherein the unsupervised machine learning algorithm uses K-means clustering, K-medoids clustering, Gaussian mixture modeling, density-based spatial clustering of applications with noise (DBSCAN), an autoencoding neural network, a variational autoencoder, Riemannian geometry-based manifold learning on covariance matrices, contrastive learning, a hidden Markov model, isometric mapping (Isomap), locally linear embedding, t-distributed stochastic neighbor embedding (t-SNE), uniform manifold approximation and projection (UMAP), diffusion maps, spectral clustering, or a selforganizing map.94. A computer implemented method for classifying sleep stages, the computer performing steps comprising:(a) receiving a first set of recorded intracranial brain electrical signal data from a subcortical region or a cortical region of the brain of a subject, wherein the first set of intracranial brain electrical signal data is recorded while the subject is sleeping;(b) receiving extracranial polysomnography data, wherein the extracranial polysomnography data is synchronized with the first set of recorded intracranial brain electrical signal data;(c) segmenting the first set of recorded intracranial brain electrical signal data into a plurality of data epochs;(d) assigning a sleep stage label to each data epoch of the plurality of data epochs using the extracranial polysomnography data;(e) training a classification model using a gradient boosting machine learning algorithm or an artificial neural network to identify a power spectral density feature in each data epoch that is associated with the assigned sleep stage label, wherein a trained classification model is produced;(f) receiving a second set of recorded intracranial brain electrical signal data from the subcortical region or the cortical region of the brain of the subject, wherein the second set of intracranial brain electrical signal data is recorded while the subject is sleeping; and(g) detecting sleep stages based on power spectral density features in the second set of recorded intracranial brain electrical signal data using the trained classification model without using any extracranial polysomnography data.95. The computer implemented method of aspect 94, wherein the gradient boosting machine learning algorithm is a light gradient-boosting machine (LightGBM) algorithm.96. The computer implemented method of aspect 94 or 95, wherein the gradient boosting machine learning algorithm is supervised.97. The computer implemented method of aspect 94, wherein the artificial neural network is a multi-layer perceptron (MLP).98. The computer implemented method of any one of aspects 94-97, wherein said training the classification model further comprises performing Bayesian hyperparameter optimization.99. The computer implemented method of any one of aspects 94-98, wherein the subject receives deep brain stimulation therapy during recording of the first set and / or the second set of intracranial brain electrical signal data.100. The computer implemented method of any one of aspects 94-99, further comprising: detecting sleep dysfunction in the subject by identifying an abnormal sequence or duration of the sleep stages; andinstructing a stimulator to modify the deep brain stimulation therapy to reduce or prevent the sleep dysfunction in the subject.101. The computer implemented method of any one of aspects 94-100, wherein the first set of recorded intracranial brain electrical signal data and the second set of recorded intracranial brain electrical signal data comprise intracranial brain electrical signal data from the subcortical region or the cortical region of each hemisphere of the brain.102. The computer implemented method of any one of aspects 94-101, wherein the first set of recorded intracranial brain electrical signal data and the second set of recorded intracranial brain electrical signal data comprise intracranial brain electrical signal data from the subcortical region or the cortical region of a single hemisphere of the brain.103. The computer implemented method of any one of aspects 94-102, wherein the subcortical region comprises a basal ganglia region.104. The computer implemented method of aspect 103, wherein the basal ganglia region is a subthalamic nucleus (STN) region, a globus pallidus region, or a thalamic region.105. The computer implemented method of any one of aspects 94-104, wherein the cortical region comprises a precentral gyrus region, a cross-central sulcus region, or any combination thereof.106. The computer implemented method of any one of aspects 94-105, wherein the subject has sleep dysfunction.107. The computer implemented method of any one of aspects 94-106, wherein the subject has a movement disorder, optionally wherein the movement disorder is Parkinson’s disease or cervical dystonia.108. The computer implemented method of any one of aspects 94-107, wherein each data epoch contains only a single sleep stage label.109. The computer implemented method of aspect 108, wherein the sleep stage label is N1, N2, N3, N4, or rapid eye movement (REM).110. The computer implemented method of aspect 109, wherein classification accuracy for the sleep stage exceeds 80%.111. The computer implemented method of aspect 108, wherein the sleep stage label is non-rapid eye movement (NREM) or rapid eye movement (REM).112. The computer implemented method of any one of aspects 108-111, wherein delta band power between 0.5 Hz to 4 Hz is used as the primary feature for NREM sleep classification.113. The computer implemented method of any one of aspects 94-112, further comprising receiving accelerometry data and / or autonomic data for the subject while the subject is sleeping, wherein the accelerometry data and / or autonomic data are used in combination with the extracranial polysomnography data in said assigning a sleep stage label to each data epoch.114. The computer implemented method of any one of aspects 94-113, further comprising synchronizing the recorded intracranial brain electrical signal data and the accelerometry data using cross-correlation analysis.115. The computer implemented method of any one of aspects 94-114, further comprising receiving auxiliary data from a noninvasive sleep monitoring device, a wearable sleep monitoring device, a photoplethysmography (PPG)-based sleep monitoring device, or a radar-based sleep monitoring device while the subject is sleeping, wherein the auxiliary data are used in combination with the extracranial polysomnography data in said assigning a sleep stage label to each data epoch.116. The computer-implemented method of any one of aspects 94-115, wherein the intracranial brain electrical signal data comprises field potential data.117. The computer-implemented method of any one of aspects 94-116, wherein the recorded intracranial brain electrical signal data comprises neural oscillations in a frequency range from 0.5 Hz to 60 Hz.118. The computer-implemented method of any one of aspects 94-117, wherein cortical field potentials provide at least 8% higher classification accuracy than subcortical field potentials.119. The computer-implemented method of any one of aspects 94-118, wherein the ancillary extracranial polysomnography data is collected using a portable or wearable device.120. The computer-implemented method of aspect 119, wherein the portable or wearable device is a headband, ring, or patch comprising a sensor for collecting the ancillary extracranial polysomnography data.121. A computer implemented method for classifying sleep stages, the computer performing steps comprising:(a) receiving a first set of recorded intracranial brain electrical signal data from a subcortical region or a cortical region of the brain of a subject, wherein the first set of intracranial brain electrical signal data is recorded while the subject is sleeping;(b) receiving extracranial polysomnography data, wherein the extracranial polysomnography data is synchronized with the first set of recorded intracranial brain electrical signal data;(c) segmenting the first set of recorded intracranial brain electrical signal data into a plurality of data epochs;(d) assigning a sleep stage label to each data epoch of the plurality of data epochs using the extracranial polysomnography data;(e) training a classification model using a convolutional neural network to identify a spectrogram feature in each data epoch that is associated with the assigned sleep stage label, wherein a trained classification model is produced;(f) receiving a second set of recorded intracranial brain electrical signal data from the subcortical region or the cortical region of the brain of the subject, wherein the second set of intracranial brain electrical signal data is recorded while the subject is sleeping; and(g) detecting sleep stages based on spectrogram features in the second set of recorded intracranial brain electrical signal data using the trained classification model without using any extracranial polysomnography data.122. The computer implemented method of aspect 121, wherein the convolutional neural network comprises five convolutional layers followed by three fully connected layers.123. The computer implemented method of aspect 121 or 122, wherein said training the classification model further comprises performing Bayesian hyperparameter optimization.124. The computer implemented method of any one of aspects 121-123, wherein the subject receives deep brain stimulation therapy during recording of the first set and / or the second set of intracranial brain electrical signal data.125. The computer implemented method of any one of aspects 121-124, further comprising:detecting sleep dysfunction in the subject by identifying an abnormal sequence or duration of the sleep stages; andinstructing a neurostimulator to modify the deep brain stimulation therapy to reduce or prevent the sleep dysfunction in the subject.126. The computer implemented method of any one of aspects 121-125, wherein the first set of recorded intracranial brain electrical signal data and the second set of recorded intracranial brain electrical signal data comprise intracranial brain electrical signal data from the subcortical region or the cortical region of each hemisphere of the brain.127. The computer implemented method of any one of aspects 121-126, wherein the first set of recorded intracranial brain electrical signal data and the second set of recorded intracranial brain electrical signal data comprise intracranial brain electrical signal data from the subcortical region or the cortical region of a single hemisphere of the brain.128. The computer implemented method of any one of aspects 121-127, wherein the subcortical region comprises a basal ganglia region.129. The computer implemented method of aspect 128, wherein the basal ganglia region is a subthalamic nucleus (STN) region, a globus pallidus region, or a thalamic region.130. The computer implemented method of any one of aspects 121-129, wherein the cortical region comprises a precentral gyrus region, a cross-central sulcus region, or any combination thereof.131. The computer implemented method of any one of aspects 121-130, wherein the subject has sleep dysfunction.132. The computer implemented method of any one of aspects 121-131, wherein the subject has a movement disorder, optionally wherein the movement disorder is Parkinson’s disease or cervical dystonia.133. The computer implemented method of any one of aspects 121-132, wherein each data epoch contains only a single sleep stage label.134. The computer implemented method of aspect 133, wherein the sleep stage label is N1, N2, N3, N4, or rapid eye movement (REM).135. The computer implemented method of aspect 133, wherein the sleep stage label is non-rapid eye movement (NREM) or rapid eye movement (REM).136. The computer implemented method of aspect 134 or 135, wherein delta band power between 0.5 Hz to 4 Hz is used as the primary feature for NREM sleep classification.137. The computer implemented method of any one of aspects 121-136, further comprising receiving accelerometry data and / or autonomic data for the subject while the subject is sleeping, wherein the accelerometry data and / or autonomic data are used in combination with the extracranial polysomnography data in said assigning a sleep stage label to each data epoch.138. The computer implemented method of aspect 137, further comprising synchronizing the recorded intracranial brain electrical signal data and the accelerometry data using crosscorrelation analysis.139. The computer implemented method of any one of aspects 121-138, further comprising receiving auxiliary data from a noninvasive sleep monitoring device, a wearable sleep monitoring device, a photoplethysmography (PPG)-based sleep monitoring device, or a radar-based sleep monitoring device while the subject is sleeping, wherein the auxiliary data are used in combination with the extracranial polysomnography data in said assigning a sleep stage label to each data epoch.140. The computer-implemented method of aspect 139, wherein the auxiliary data from the noninvasive sleep monitoring device is collected using a portable or wearable device.141. The computer-implemented method of aspect 140, wherein the portable or wearable device is a headband, ring, or patch comprising a sensor for collecting polysomnography data.142. The computer-implemented method of any one of aspects 121-141, wherein the brain electrical signal data comprises field potential data.143. The computer-implemented method of any one of aspects 121-142, wherein the recorded intracranial brain electrical signal data comprises delta frequency neural oscillations in a range from 0.5 Hz to 4 Hz, theta frequency neural oscillations in a range from 4 Hz to 7 Hz, alphafrequency neural oscillations in a range from 8 Hz to 12 Hz, beta frequency neural oscillations in a range from 13 Hz to 30 Hz, or any combination thereof.144. A non-transitory computer-readable medium comprising program instructions that, when executed by a processor in a computer, causes the processor to perform the method of any one of aspects 1-143.145. A kit comprising the non-transitory computer-readable medium of aspect 144.146. A system comprising:a neural recording electrode;a neurostimulator;a data receiving device comprising a processor programmed according to the computer implemented method of any one of aspects 1-143; anda display, wherein the display is connected to the data receiving device.147. The system of aspect 146, wherein the neurostimulator provides electrical stimulation, magnetic stimulation, or ultrasound stimulation.148. The system of aspect 147, wherein the electrical stimulation is applied unilaterally or bilaterally.149. The system of any one of aspects 146-148, wherein the neurostimulator provides deep brain stimulation, subgaleal electrical stimulation, transcranial stimulation, spinal cord stimulation, peripheral nerve stimulation, peripheral nerve field stimulation, neuromuscular electrical stimulation, or focused ultrasound stimulation.150. The system of aspect 149, wherein the transcranial stimulation is transcranial direct current stimulation, transcranial alternating current stimulation, or transcranial magnetic stimulation.151. The system of aspect 149, wherein the neurostimulator provides the peripheral nerve stimulation or peripheral nerve field stimulation to a vagus nerve, a median nerve, an ulnar nerve, a radial nerve, an occipital nerve, a sphenopalatine ganglion, a trigeminal nerve, a tibial nerve, a sacral nerve, a hypoglossal nerve, a phrenic nerve, a greater auricular nerve, a peroneal nerve, a sciaticnerve, a pudendal posterior nerve, a saphenous nerve, a suprascapular nerve, a carotid sinus nerve, a cervical sympathetic chain nerve, or a auriculotemporal nerve.152. The system of any one of aspects 146-151, further comprising a video recording device.153. The system of any one of aspects 146-152, further comprising an external wearable monitor that can acquire accelerometry data, gyroscope data, magnetometer surface electromyographic (sEMG) data, or any combination thereof.154. The system of any one of aspects 146-153, further comprising a noninvasive sleep monitoring device, a wearable sleep monitoring device, a photoplethysmography (PPG)-based sleep monitoring device, or a radar-based sleep monitoring device.155. The system of any one of aspects 146-154, wherein the data receiving device is a computer, a cloud computing system, a handheld device, a smartwatch, or a smart ring.156. The system of aspect 155, wherein the handheld device is a cell phone or tablet.157. The system of any one of aspects 146-156, wherein the display is a liquid crystal display (LCD), light-emitting diode (LED) display, microLED display comprising microscopic LEDs, plasma (PDP) display, quantum dot LED (QLED) display, organic light emitting diode (OLED) display, quantum dot OLED (QD-OLED) display, or cathode ray tube display device.158. The system of any one of aspects 146-157, further comprising a stimulation electrode, wherein the stimulation electrode is connected to the neurostimulator.159. The system of aspect 158, wherein the stimulation electrode is a non-brain penetrating surface electrode array or a brain-penetrating electrode array.160. A method of using the system of any one of aspects 146-159, the method comprising: acquiring training neurophysiology data and test neurophysiology data for a subject using the neural recording electrode;adjusting the parameter settings of the neurostimulator to a predefined set of neuromodulatory parameters based on the clinical state predicted for the subject from the test neurophysiology data according to the computer implemented method; andapplying stimulation to a target region of the subject using the adjusted parameter settings.161. The method of aspect 160, wherein the stimulation comprises electrical stimulation, magnetic stimulation, or ultrasound stimulation.162. The method of aspect 161, wherein the stimulation comprises deep brain stimulation, subgaleal electrical stimulation, transcranial stimulation, spinal cord stimulation, peripheral nerve stimulation, peripheral nerve field stimulation, neuromuscular electrical stimulation, or focused ultrasound stimulation.163. The method of aspect 162, wherein the transcranial stimulation is transcranial direct current stimulation, transcranial alternating current stimulation, or transcranial magnetic stimulation.164. The method of any one of aspects 161-163, wherein the electrical stimulation is delivered to a brain region, spinal cord, peripheral nerve, or muscle of the subject.165. The method of aspect 164, wherein the peripheral nerve is a vagus nerve, a median nerve, an ulnar nerve, a radial nerve, an occipital nerve, a sphenopalatine ganglion, a trigeminal nerve, a tibial nerve, a sacral nerve, a hypoglossal nerve, a phrenic nerve, a greater auricular nerve, a peroneal nerve, a sciatic nerve, a pudendal posterior nerve, a saphenous nerve, a suprascapular nerve, a carotid sinus nerve, a cervical sympathetic chain nerve, or a auriculotemporal nerve.166. The method of any one of aspects 160-165, further comprising using the supervised model to classify the clinical state of the subject as a desired clinical state or an undesired clinical state;generating an objective function for said adjusting the parameter settings of the neurostimulator to maximize time spent by the subject in the desired clinical state or minimize time spent by the subject in the undesired clinical state;iteratively optimizing the parameter settings of the neurostimulator using an optimization algorithm with the objective function as input, wherein optimized parameter settings are generated by maximizing an objective function value to maximize the time spent by the subject in the desiredclinical state or minimizing the objective function value to minimize the time spent by the subject in the undesired clinical state; andapplying stimulation to a target region of the subject using the optimized parameter settings.167. The method of any one of aspects 160-166, wherein said assigning the clinical state label to each feature cluster comprises using sparse labeling based on auxiliary data or patient selfreports tracking a symptom of the neurological disorder or a psychiatric disorder, wherein the auxiliary data or patient self-reports are collected from the subject at sparse intervals during a day.168. The method of aspect 167, wherein said sparse labeling comprises collecting the auxiliary data or patient self-reports at least one time point for each feature cluster in order to assign a time-synchronized label from the auxiliary data or patient self-reports to each feature cluster, wherein the time-synchronized label is assigned to the entire feature cluster.169. The method of aspect 167 or 168, wherein the auxiliary data are acquired with an accelerometer, a speech audio monitor, or a video recording device.170. The method of any one of aspects 160-169, wherein the auxiliary data are collected with an external wearable device that tracks the symptom.171. The method of any one of aspects 160-170, wherein said assigning the clinical state label to each feature cluster comprises using a biomarker to identify an association between a feature cluster and a clinical state.
[0350] It will be apparent to one of ordinary skill in the art that various changes and modifications can be made without departing from the spirit or scope of the invention.EXPERIMENTAL
[0351] The following examples are put forth so as to provide those of ordinary skill in the art with a complete disclosure and description of how to make and use the present invention, and are not intended to limit the scope of what the inventors regard as their invention nor are they intended to represent that the experiments below are all or the only experiments performed. Efforts have been made to ensure accuracy with respect to numbers used (e.g. amounts, temperature, etc.) but some experimental errors and deviations should be accounted for. Unless indicated otherwise, parts areparts by weight, molecular weight is weight average molecular weight, temperature is in degrees Centigrade, and pressure is at or near atmospheric.
[0352] All publications and patent applications cited in this specification are herein incorporated by reference as if each individual publication or patent application were specifically and individually indicated to be incorporated by reference.
[0353] The present invention has been described in terms of particular embodiments found or proposed by the present inventor to comprise preferred modes for the practice of the invention. It will be appreciated by those of skill in the art that, in light of the present disclosure, numerous modifications and changes can be made in the particular embodiments exemplified without departing from the intended scope of the invention. For example, due to codon redundancy, changes can be made in the underlying DNA sequence without affecting the protein sequence. Moreover, due to biological functional equivalency considerations, changes can be made in protein structure without affecting the biological action in kind or amount. All such modifications are intended to be included within the scope of the appended claims.Example 1Personalized Supervised and Unsupervised Intracranial Sleep Decoding during Deep Brain StimulationIntroduction
[0354] Parkinson’s disease (PD) was initially formulated as a disorder of movement. However, more recently, PD has been understood as a broader neuropsychiatric disorder, with greater emphasis placed on non-motor symptoms 1 Sleep dysfunction, and its consequences, are of particular importance because they are common, disabling, and difficult to treat in PD 2-4.
[0355] Sleep is commonly divided into four stages: rapid eye movement (REM), which physiologically resembles wakefulness; and non-rapid eye movement sleep (NREM), divided into three stages of increasing depth and delta power (N1-3) 5. Sleep disruption in people with Parkinson’s disease (PwP) usually involves reduced time in, and increasingly fragmented, NREM (particularly N2 / N3) sleep 6. REM sleep behavior disorder is also prevalent, which includes loss of normal atonia during REM and resultant acting out of dreams 6. Chronic sleep disruption in PwP reduces quality of life and increases caregiver burden 7,8. Reduced N3 sleep (or slow wave sleep; SWS) also correlates with the progression of motor symptom severity 9,10. Ameliorating the consequences of sleep dysfunction in PD is a high priority because of the role of sleep for glymphaticclearance of protein aggregates and maintaining cognitive capacities 11-15. Therefore, addressing sleep dysfunction in PD would improve symptomatic therapy and could provide an intervention for disease progression.
[0356] Deep Brain Stimulation (DBS) is an effective neuromodulatory therapy for treating motor signs of PD by delivering pulses of electrical current to a region of the basal ganglia (BG) via invasive electrodes. Despite not being optimized for sleep physiology, DBS slightly improves overall sleep quality in PwP by various mechanisms, including improved mobility and potential attenuation of overnight beta bursts 16-19. Currently, DBS programming is primarily targeted towards daytime motor symptoms including tremor, stiffness and slowness 20. However, conventional (constant) DBS programs cannot dynamically adjust to underlying physiological states, and therefore remain at constant settings across the entire circadian rhythm, including sleep cycles. It may be that alternative stimulation paradigms are better suited for sleep physiology 21.. Thus, stimulation programs responsive to individual sleep stages may further improve therapeutic effects, such as amelioration of NREM sleep disruption and enhancement of slow wave activity. Additionally, sampling different stimulation parameters for specific sleep stages may provide a mechanistic probe on the impact of DBS to sleep physiology.
[0357] Adaptive deep brain stimulation (aDBS) allows for real-time stimulation parameter adjustment in response to brain physiology through programmed control policies, and offers a means to address the aforementioned putative benefits of sleep stage-specific DBS. However, to date, aDBS efforts have targeted daytime motor symptoms and fluctuations 22-25. aDBS provides a promising platform for sleep-specific DBS therapy because sleep provides consistent and well-characterized physiological input features for aDBS control policies. A proof-of-principle aDBS study using cortical decoding to target N3 sleep demonstrated potential to impact underlying physiology 21..
[0358] Previous studies have demonstrated intracranial sleep stage classification, however, these were in the absence of chronic stimulation 26-31. To advance sleep specific aDBS, it is necessary to determine the limits of sleep stage classification accuracy from intracranial signals in the presence of stimulation. Current aDBS control policies rely on simple linear classification using spectral features from intracranial data, primarily basal ganglia field potentials 32,33. In light of the limited capabilities of aDBS embeddable classification schemes, it is necessary to validate the performance of aDBS on determining sleep stages with both constrained (e.g. for current aDBS systems) and unconstrained (e.g. for future aDBS systems) classification pipelines.
[0359] Additionally, sleep stage discrimination is typically performed on cortical data, while deep brain stimulation devices are conventionally limited to basal ganglia data. A direct comparison between the two brain regions assesses potential feasibility of sleep specific aDBS and informsfuture development efforts. Furthermore, a practical constraint to adoption of sleep specific aDBS is the necessity of extracranial encephalography (EEG) for conventional sleep labeling. To collect appropriate training data would therefore require multiple nights of wearing polysomnography (PSG) equipment for patients, which is an undesirable outcome. A solution to this might be personalized unsupervised approaches, e.g. direct clustering of the intracranial data for inferring groupings of sleep physiology features that may correspond to canonical sleep stages 34. Unsupervised sleep label generation would remove the necessity for additional hardware for patients, and arguably, might better identify personalized physiology characteristics salient for neuromodulatory therapy than canonical sleep stages.
[0360] To address these needs, we developed an at-home intracranial recording and sleep stage label procurement system. This setup supports multi-night recordings of intracranial sleep data while conferring improved participant comfort compared to an in-hospital sleep laboratory. We compare personalized machine learning techniques for classifying sleep stages from intracranial neural data while participants received chronic, therapeutic deep brain stimulation. Sleep stage labels were acquired using extracranial polysomnography. We report high classification accuracy from cortical and basal ganglia data streams in the presence of chronic stimulation, and note spectral data processing techniques achieve highest accuracy. We also benchmark constrained model development for NREM classification to match compatibility with currently available sensing-enabled DBS hardware. Lastly, we demonstrate that unsupervised machine learning for NREM sleep identification presents a promising approach to personalized aDBS development while removing the need for formal sleep stage labels scored from individual polysomnography.Methodology:3.1: Participant Demography and Study Protocol
[0361] The Institutional Review Board approved the study protocol, and the study was registered on clinicaltrials.gov (NCT0358289; IDE G180097). We enrolled five participants. Four participants were diagnosed with idiopathic Parkinson’s disease, and one participant was diagnosed with Cervical Dystonia (Table 1). All participants were enrolled as part of a parent study exploring adaptive deep brain stimulation for daytime movement symptom fluctuations 23,24.
[0362] Participants were implanted with bilateral sensing and stimulation-capable quadripolar electrodes in either the Subthalamic Nucleus (STN; n=2, Medtronic model 3389 lead) or the Globus Pallidus (GP; n=3, Medtronic model 3387 lead). Implant site was determined by standard clinical criteria 35. Additionally, bilateral subdural quadripolar sensing electrocorticogram (ECoG) arrayswere implanted to span the central sulcus (Medtronic Resume II, model 0913025). Electrodes are connected to investigational Summit RC+S (Medtronic model B35300R) implantable neural stimulators (INS), described extensively in our previous studies 18,21,23,36. The Summit RC+S system is capable of recording field potentials from both the cortical and basal ganglia electrode locations during chronic stimulation, and can stream data recordings at-home to a nearby tablet for offline analysis (FIG. 1A).3.2: Chronic Recording of Intracranial Activities
[0363] Classifying sleep stages from intracranial data requires synchronizing the intracranial data with sleep stage labels collected from an extracranial polysomnogram (FIGS. 1A, 1B). Participants therefore wore a portable, polysomnogram headband (Dreem 2 headband, Beacon Biosignals Co.) while simultaneously recording field potentials from the RC+S devices during at-home sleep over multiple nights 21,37. The Dreem wearable headband provides an automated hypnogram (i.e. sleep stage label for each 30 second epoch) generated from electroencephalography (EEG) and additional (pulse oximetry, electromyogram, and accelerometry) data streams. The hypnogram provides sleep stage labels comparable in accuracy to a conventional, manual scored PSG 37.
[0364] Three intracranial field potential (FP) streams were sampled in millivolts at a rate of 500 Hz.The basal ganglia local FP was sampled using a bipolar 'sandwich’ electrode configuration, where the resultant data stream is the electric potential difference between the two electrodes immediately adjacent to, and therefore equidistant to, the electrode delivering stimulation. Cortical FPs were acquired in two data streams: a bipolar configuration on the precentral gyrus, and a wide bipolar configuration spanning the central sulcus. Each participant recorded ~ ten nights of external polysomnogram and intracranial field potential recordings during chronic therapeutic stimulation.
[0365] We next aligned the sleep stage labels from the polysomnogram headband with the intracranial FP (FIG. 1C). To overcome potential sampling rate discrepancies and temporal offsets between the Dreem and RC+S data, we resampled and applied cross-correlation analysis on the accelerometry streams of each recording device, adjusting the temporal alignment to maximize cross-correlation (see Anjum et al. 2024).
[0366] The resultant dataset consists of a sleep stage label (e.g. N1, N2, N3, REM, Wake) for each 30-second epoch of the three intracranial data streams (basal ganglia, precentral gyrus, crosscentral sulcus) for each hemisphere.3.3: Data Preprocessing and Unconstrained Model Training
[0367] Participant FP streams were standardized to have zero mean and a standard deviation of one for each individual night, and subsequently segmented into 30 second epochs. Each data epoch contained only a single sleep stage label, and data epochs with missing data (i.e. epochs shorter than 30 seconds) due to streaming disconnections were automatically excluded from further analysis. Data was aggregated across all nights for each hemisphere and randomly partitioned into either a training set containing 80% of the data, or a stratified hold-out test set containing the other 20%.3.3.1: Model Architectures, feature engineering and model training
[0368] Current DBS devices typically leverage spectral power features for classification tasks.Spectral power can encapsulate features related to sleep physiology 18. However, spectral processing approaches may potentially underutilize information in the underlying time series data streams that are relevant for the sleep classification task. Additionally, raw time series data are utilized for manual AASM sleep scoring 5. We therefore evaluated three feature processing approaches for electrophysiology: (average) power spectral density power, time-frequency resolved (spectrograms), and time series; and chose established, validated classification models for each feature category.
[0369] Power spectral density classification: For the average spectral power features, we chose Light Gradient Boosting Machine (LightGBM) and Multi-Layer Perceptron (MLP) because of their relatively simple implementation and wide-ranging utility in supervised classification problems 38. LightGBM is a gradient-boosting forest based methodology shown to be effective at sleep staging 29,39. MLP is a feedforward, fully connected artificial neural network containing two to four hidden layers, and is well-known for generalized classification tasks 26. The LightGBM and MLP models were trained to predict sleep stages from intracranial power spectral density (PSD) vectors generated for each 30-second epoch. These two models belong to the “spectral” categorization because they are trained on data vectors containing only spectral power information. PSD vectors for each 30 second epoch were generated using Welch’s method with two-second windows and 50% overlap 40, and truncated to only include frequencies between 0.5 to 60 Hz. Power in each frequency bin was transformed via natural logarithm and standardized across epochs. PSD vectors were calculated for each field potential channel individually, then concatenated together. To address the difference in sample number between sleep stages, class imbalance in the training set was corrected via synthetic minority oversampling technique of minority classes (SMOTE) 41. Five iterations ofBayesian hyperparameter optimization were performed using five-fold cross validation on the training set. Hyperparameter optimization for LightGBM was performed over maximum depth and leaves and number of estimators, for each hemisphere. For MLP, hyperparameter optimization was performed over learning rate, dropout, epoch and batch size, number of hidden layers (2-5), and hidden layer size (16-384). After identification of hyperparameters, the final model was trained on the entire training set and performance tested on the unseen stratified hold-out test set.
[0370] Spectrogram image classification-. We also include a time- frequency resolved feature category, as an intermediate modality between spectral power and continuous raw time series classification. The time-frequency pipeline does not collapse the spectral features across time, but rather analyses the spectral power at individual timesteps in the form of the spectrogram image. We chose AlexNet for “time-frequency” resolved classification 42. AlexNet is a convolutional neural network consisting of five convolutional layers, followed by three fully connected layers, designed to classify objects in images, here trained on spectrograms.
[0371] To transform the field potentials into time-frequency resolved data points, we generated log spectrograms of each 30-second epoch for each field potential stream. Spectrograms for each field potential are stacked, resembling the stacking of color channels common to image classification tasks, and ingested into AlexNet for training and classification 42. We employed adaptive pooling to address the discrepancy in pixel size from our spectrograms and ImageNet image dimensionality for which AlexNet is designed. The training set was augmented via channel shuffling and masking a portion of the frequency data in 15% of the training samples, and class imbalance was addressed by random oversampling of the minority classes. The augmented data was added to the original data, artificially increasing the size of the training set. Five iterations of Bayesian hyperparameter optimization over epoch and batch size, dropout, and learning rate were performed using a random 80 / 20 stratified split of the training data set into a sub-training and validation set, respectively. Final metrics are reported on the unseen stratified hold-out test set.
[0372] Time series classification: For time series approaches, models were needed that are capable of capturing temporal features and more sophisticated data statistics. Each index in an time series data epoch corresponds to a measurement of millivolts, and the indices correspond to time points. We tested EEGNet and AttnSleepEnsemble 43,44. EEGNet is an effective convolutional network architecture designed for feature extraction and classification of electrophysiology time series data 43. For EEGNet, time series data was preprocessed by splitting the raw field potential data into five band-passed and downsampled time series vectors (similar to 45. 8th-order butterworth forwardsand backwards filters were applied to the raw time series vector for the delta (0.5-4Hz), theta (4- 8Hz), alpha (8-12 Hz), beta (12-30Hz), and gamma (30-60Hz) frequency bands. After bandpassing, each resultant stream was downsampled by a factor of four to a sampling rate of 125 Hz. The resultant bandpass-filtered time series vectors act as surrogate ‘electrodes’ to more closely recapitulate the native (multi-channel) data format for EEGNet. EEGNet hyperparameter optimization was performed over learning rate, epoch and batch size, number of temporal and depthwise filters, and convolutional factor and kernel sizes.
[0373] AttnSleepEnsemble is a customized version of the AttnSleep model 44. AttnSleep is a convolutional architecture with attention mechanisms, designed to classify sleep stages on a single EEG channel. With three available field potential channels, for this study we employed an ensemble approach with AttnSleep, hereafter called “AttnSleepEnsemble”, where an AttnSleep model is trained on a single channel. For example, one AttnSleep model would be trained on the basal ganglia field potential data, another on the precentral gyrus data, and a final model on the cross-central sulcus data. Each model contributes a single vote for the sleep stage prediction. The majority vote across the individual model predictions is the final prediction for a given data epoch, with tie-breaks defaulting to the deepest sleep stage.
[0374] The AttnSleepEnsemble ingested unprocessed time series vectors. To account for the higher sampling rate for the intracranial data compared to typical EEG data (500 Hz vs 125 Hz), the short and long convolutional window kernel size for each AttnSleep model were increased from 50 to 300 and 400 to 1600, respectively 44. This ensures low frequency relationships can be captured by the convolutional and attention mechanisms. Hyperparameter optimization was performed over batch and epoch size, dropout, and learning rate. Performance of AttnSleepEnsemble when using “out-of- the-box” (i.e. default) hyperparameters trained on field potential streams (standardized per night) downsampled to 100 Hz is provided in FIG. 13.
[0375] For the time domain models, the training set was augmented via the addition of Gaussian noise into the training samples 46. The augmented training set was added to the original, unaltered training set, thereby doubling the total size of the training data. Class imbalance was then addressed by random oversampling of the minority classes. Hyperparameter optimization was performed similarly to AlexNet, and final metrics are reported on the stratified hold-out test set.3.3.3: Assessment of Embeddable (Constrained) Models
[0376] To assess implementable sleep-staging techniques, we use the RC+S device as an example of discriminatory features and models that can be currently utilized by DBS devices. Briefly, the RC+S is capable of binary classification (i.e. two class discrimination) from a linear model using upto four power bands as feature inputs. To analyze the performance of device-capable sleep stage discrimination, we assess the performance of embeddable Linear Discriminant Analysis (LDA) models to classify between NREM (N 1, N2, and N3) vs other (REM and awake) utilizing the canonical powerbands (delta, alpha plus theta, beta, and low gamma). We refer to data preprocessing and model training pipelines that are limited to current DBS device capabilities as ‘constrained’ (FIG. 1C).Five-fold cross validation for hyperparameter optimization of LDA models was performed over the solver and the tolerance.
[0377] We compare both LDA and LightGBM models trained on the natural logarithm of canonical power bands versus the entire PSD vector (FIG. 16). Power bands were calculated as the sum of the power in the relevant frequency bins from the PSD vector. Frequency bins outside of canonical power bands were thus omitted. Preprocessing was performed similarly to the power spectral density category above. Although the RC+S device cannot explicitly calculate the logarithm function, linear estimates of the logarithm function can be employed on the system. Including the logarithm transform confers a minor performance enhancement for cortical data (FIG. 14), and was included for consistency with the LightGBM methodologies described above.3.3.4: Generation and Assessment of Unsupervised labels for NREM classification
[0378] We explored the efficacy of unsupervised clusters as surrogates for sleep stage labels in discriminating NREM from REM and wake stages. We coupled the unsupervised clustering with Linear Discriminant Analysis to assess the clusters predictive abilities for classical sleep stages. We chose a binary classification schema to analyze the effectiveness of unsupervised approaches for embeddable, i.e. constrained, control policies targeted NREM versus REM and wake (see sections 3.3.3 and 4.4.1).
[0379] Canonical power band data (as described in 3.3.3) were labeled as either NREM (corresponding to stages N1-3) or other (REM and Wake) (FIG. 2). An LDA model was trained to discriminate these two classes from each other as specified in section 3.3.3, and tested on a stratified hold-out test set containing NREM vs other labels. We refer to this procedure as the ‘supervised LDA’ approach to NREM vs other classification.
[0380] We compare the ‘supervised LDA’ approach with an ‘unsupervised LDA’ approach. In the ‘unsupervised LDA’ approach, the canonical power bands in the training set were stripped of their sleep stage labels. The training set was subsequently clustered using Gaussian Mixture Models (GMMs) with the cluster number hyperparameter set to two 47. The cluster identity for each data point thus became its class label for model training (e.g. cluster 0 and cluster 1), acting as surrogates for the original sleep stage labels. For consistency, the cluster with higher average delta power wasalways labeled as cluster 0. An LDA model was trained on the power band training set to discriminate between cluster 0 and cluster 1 with default hyperparameters (singular value decomposition solver and tolerance at 1e-4). The LDA defines a linear boundary for distinguishing between the two unsupervised clusters. We refer to this LDA model as the ‘unsupervised LDA’. Default hyperparameters for ‘unsupervised’ approach were chosen to adhere to the assumption that no prior information on LDA performance on sleep stage labels is known when training on cluster identity. However, the ‘unsupervised LDA’ was tested using the same hold-out test set as the ‘supervised LDA’ model. Therefore, the reported results for both the ‘supervised’ and ‘unsupervised’ LDA approaches are on identical hold-out test sets containing sleep stage NREM vs other labels.
[0381] In both of these ‘supervised’ and ‘unsupervised’ LDA approaches, training set points were ranked based on their average euclidean distance to their closest 15 neighbors. The data points within the top 2.5% of average distance to the 15 closest neighbors were excluded; this preprocessing step ensures that a purely noise cluster corresponding to outliers does not appear as a surrogate class label in the ‘unsupervised’ approach 48. Additionally, no class imbalance correction was performed on the training set, as class imbalance requires sleep stage labels, which are not used when training the 'unsuperv...
Claims
What is claimed is:
1. A computer-implemented method for adjusting parameter settings of a neurostimulator for treatment of a neurological disorder or a psychiatric disorder in a subject, the computer performing steps comprising:(a) receiving training neurophysiology data and test neurophysiology data for the subject;(b) using an unsupervised machine learning algorithm to cluster features of the training neurophysiology data;(c) assigning a clinical state label to each feature cluster to generate labeled training neurophysiology data;(d) training a supervised model using the labeled training neurophysiology data to predict the clinical state of the subject from the test neurophysiology data; and(e) adjusting the parameter settings of the neurostimulator to a predefined set of neuromodulatory parameters based on the clinical state predicted for the subject from the test neurophysiology data.
2. The computer-implemented method of claim 1, wherein said training the supervised model comprises training a linear discriminant analysis (LDA) model to define a linear boundary for distinguishing between two feature clusters.
3. The computer- implemented method of claim 1 or 2, further comprising using the supervised model to classify the clinical state of the subject as a desired clinical state or an undesired clinical state;generating an objective function for said adjusting the parameter settings of the neurostimulator to maximize time spent by the subject in the desired clinical state or minimize time spent by the subject in the undesired clinical state; anditeratively optimizing the parameter settings of the neurostimulator using an optimization algorithm with the objective function as input, wherein optimized parameter settings are generated by maximizing an objective function value to maximize the time spent by the subject in the desired clinical state or minimizing the objective function value to minimize the time spent by the subject in the undesired clinical state.
4. The computer-implemented method of claim 3, wherein said iteratively optimizing the parameter settings comprises optimizing the parameter settings for each brain hemisphere of the subject.
5. The computer-implemented method of claim 3 or 4, further comprising instructing the neurostimulator to apply stimulation to a target region of the subject using the optimized parameter settings.
6. The computer-implemented method of claim 5, wherein the stimulation comprises electrical stimulation, magnetic stimulation, or ultrasound stimulation.
7. The computer-implemented method of claim 6, wherein the stimulation comprises deep brain stimulation, subgaleal electrical stimulation, transcranial stimulation, spinal cord stimulation, peripheral nerve stimulation, peripheral nerve field stimulation, neuromuscular electrical stimulation, or focused ultrasound stimulation.
8. The computer-implemented method of claim 7, wherein the transcranial stimulation is transcranial direct current stimulation, transcranial alternating current stimulation, or transcranial magnetic stimulation.
9. The computer-implemented method of any one of claims 6-8, wherein the electrical stimulation is delivered to a brain region, spinal cord, peripheral nerve, or muscle of the subject.
10. The computer-implemented method of claim 9, wherein the peripheral nerve is a vagus nerve, a median nerve, an ulnar nerve, a radial nerve, an occipital nerve, a sphenopalatine ganglion, a trigeminal nerve, a tibial nerve, a sacral nerve, a hypoglossal nerve, a phrenic nerve, a greater auricular nerve, a peroneal nerve, a sciatic nerve, a pudendal posterior nerve, a saphenous nerve, a suprascapular nerve, a carotid sinus nerve, a cervical sympathetic chain nerve, or a auriculotemporal nerve.
11. The computer-implemented method of any one of claims 3-10, wherein said iteratively optimizing the parameter settings comprises within-session optimization performed during a single recording session, wherein the objective function is evaluated and the parameter settings are updated one or more times within the recording session.
12. The computer-implemented method of claim 11, wherein the recording session is a sleep session, and wherein the parameter settings are updated at intervals of 1 second to 4 hours during the sleep session, optionally wherein the intervals are 1 second, 5 seconds, 10 seconds, 30 seconds, 1 minute, 2 minutes, 5 minutes, 10 minutes, 15 minutes, 20 minutes, 30 minutes, 45 minutes, 1 hour, 1.5 hours, 2 hours, 2.5 hours, 3 hours, 3.5 hours, or 4 hours.
13. The computer-implemented method of any one of claims 3-10, wherein said iteratively optimizing the parameter settings comprises across-session optimization performed over a plurality of recording sessions, wherein the objective function is evaluated at the conclusion of each recording session and the parameter settings are updated between recording sessions.
14. The computer-implemented method of claim 13, wherein the plurality of recording sessions comprises a plurality of nights of sleep spanning a period of at least one week.
15. The computer-implemented method of any one of claims 3-10, wherein said iteratively optimizing the parameter settings comprises both within-session optimization and across-session optimization, wherein within-session optimization adapts the parameter settings in real-time during each recording session, and wherein across-session optimization updates a prior distribution, hyperparameters, or baseline of the Gaussian process regression model based on cumulative observations across recording sessions.
16. The computer-implemented method of any one of claims 3-10, wherein said iteratively optimizing the parameter settings comprises within-session optimization using a first objective function based on instantaneous biomarker values, and across-session optimization using a second objective function based on session-level summary statistics or z-scored biomarker values relative to a baseline characteristic session.
17. The computer-implemented method of any one of claims 3-16, further comprising displaying the optimized parameter settings.
18. The computer-implemented method of any one of claims 3-17, wherein said iteratively optimizing the parameter settings of the neurostimulator comprises optimizing stimulation amplitude and stimulation frequency.
19. The computer-implemented method of any one of claims 3-18, wherein said iteratively optimizing the parameter settings of the neurostimulator comprises using Bayesian optimization with a Gaussian process regression model of the objective function, a multi-armed bandit algorithm, a contextual bandit algorithm, model-based reinforcement learning, model-free reinforcement learning, or an evolutionary optimization method.
20. The computer-implemented method of any one of claims 1-13, wherein the training neurophysiology data and the test neurophysiology data comprise electroencephalography (EEG) data, electrocorticography (ECoG) data, or intracranial electroencephalography (iEEG) data, electromyography (EMG) data, accelerometry data, or any combination thereof.
21. The computer-implemented method of any one of claims 1-20, wherein said training the supervised model further comprises incorporating a state estimation algorithm to track the clinical state over time, wherein the state estimation algorithm is selected from the group consisting of: Kalman filtering, extended Kalman filtering, unscented Kalman filtering, particle filtering, and ensemble Kalman filtering.
22. The computer-implemented method of any one of claims 1-21, wherein the computer-implemented method further comprises using a switching linear dynamical system (SLDS) to model transitions between clinical states, wherein each clinical state is associated with distinct linear dynamics of the neurophysiology data.
23. The computer-implemented method of claim 22, wherein the computer-implemented method further comprises using a Gaussian Process Latent Variable Model (GP-LVM) to learn a low-dimensional representation of the neurophysiology data, wherein the clinical states correspond to regions in the latent space.
24. The computer-implemented method of any one of claims 1-23, wherein the computer-implemented method further comprises using a recurrent switching linear dynamical system (rSLDS) to jointly infer continuous latent neural dynamics and discrete clinical state sequences from the neurophysiology data.
25. The computer-implemented method of any one of claims 3-24, wherein said iteratively optimizing the parameter settings comprises multi-objective optimization to simultaneously optimize multiple clinical outcomes, wherein a Pareto frontier of non-dominated parameter configurations is identified.
26. The computer-implemented method of claim 25, wherein the multi-objective optimization uses at least two measures selected from a biomarker measure, a symptom measure, a side effect measure, and an energy consumption measure.
27. The computer-implemented method of any one of claims 3-26, wherein said iteratively optimizing the parameter settings incorporates safety constraints on stimulation parameters, wherein parameter configurations predicted to cause adverse effects are excluded from consideration.
28. The computer-implemented method of claim 27, wherein incorporating the safety constraints comprises using Bayesian optimization, wherein the Bayesian optimization only explores parameter configurations predicted to be safe with high probability based on prior observations.
29. The computer-implemented method of any one of claims 3-28, wherein the computer-implemented method further comprises using a hierarchical Bayesian model to leverage data from multiple subjects, wherein population-level parameters provide prior information to accelerate optimization for individual subjects.
30. The computer-implemented method of any one of claims 1-29, wherein the computer-implemented method further comprises using meta-learning to enable rapid adaptation of the supervised model to a new subject with limited subject-specific data for the new subject.
31. The computer-implemented method of claim 30, wherein the meta-learning uses a model-agnostic meta-learning (MAML) algorithm or a Reptile meta-learning algorithm.
32. The computer-implemented method of any one of claims 3-31, further comprising detecting a distribution shift in the neurophysiology data; and retraining the unsupervised clustering, the supervised model, or the optimization algorithm baseline, or any combination thereof when the distribution shift is detected.
33. The computer-implemented method of any one of claims 1-32, further comprising periodically updating a baseline dataset used for objective function computation to account for longterm drift in neurophysiology.
34. The computer-implemented method of any one of claims 1-33, wherein said training the supervised model comprises training a temporal sequence model selected from the group consisting of: long short-term memory (LSTM) networks, gated recurrent units (GRUs), temporal convolutional networks, and transformer models with temporal self-attention.
35. The computer-implemented method of any one of claims 1-34, wherein said training the supervised model comprises training a structured state-space model to capture long-range temporal dependencies in the neurophysiology data.
36. The computer-implemented method of any one of claims 3-35, wherein generating the objective function further comprises rolling-average baseline normalization.
37. The computer-implemented method of claim 36, wherein the rolling-average baseline normalization comprises:(a) computing a rolling average of a biomarker for each of a plurality of baseline recording sessions;(b) temporally aligning the rolling average across sessions relative to a reference event;(c) computing a characteristic session comprising a mean and standard deviation across sessions; and(d) quantifying stimulation effects based on comparing a new recording session to the characteristic session using a z-score.
38. The computer-implemented method of any one of claims 1-37, wherein the computer-implemented method further comprises using gaussian process factor analysis (GPFA) to extract smooth latent dynamics from the neurophysiology data.
39. The computer-implemented method of any one of claims 1-38, wherein the computer-implemented method further comprises using latent factor analysis via dynamical systems (LFADS) to infer single-trial latent dynamics from the neurophysiology data.
40. The computer-implemented method of any one of claims 1-39, wherein the training neurophysiology data and the test neurophysiology data comprise alpha frequency, beta frequency, gamma frequency, delta frequency, theta frequency, or mixed-frequency neural oscillations.
41. The computer-implemented method of claim 40, wherein the delta frequency neural oscillations are in a range from 0.5 Hz to 4 Hz, the theta frequency neural oscillations are in a range from 4 Hz to 7 Hz, the alpha frequency neural oscillations are in a range from 8 Hz to 12 Hz, the beta frequency neural oscillations are in a range from 13 Hz to 30 Hz, and the gamma frequency neural oscillations are in a range from 60 Hz to 90 Hz.
42. The computer-implemented method of any one of claims 1-41, wherein said assigning the clinical state label to each feature cluster comprises using sparse labeling based on auxiliary data or patient self-reports tracking a symptom of the neurological disorder or a psychiatric disorder, wherein the auxiliary data or patient self-reports are collected from the subject at sparse intervals during a day.
43. The computer-implemented method of claim 42, wherein said sparse labeling comprises collecting the auxiliary data or patient self-reports at at least one time point for each feature cluster in order to assign a time-synchronized label from the auxiliary data or patient selfreports to each feature cluster, wherein the time-synchronized label is assigned to the entire feature cluster.
44. The computer-implemented method of claim 42 or 43, wherein the auxiliary data is acquired with an accelerometer, a speech audio monitor, or a video recording device.
45. The computer-implemented method of any one of claims 42-44, wherein the auxiliary data are collected with an external wearable device that tracks the symptom.
46. The computer-implemented method of any one of claims 1-45, wherein said assigning the clinical state label to each feature cluster comprises using a biomarker to identify an association between a feature cluster and a clinical state.
47. The computer-implemented method of any one of claims 1-46, wherein the unsupervised machine learning algorithm uses K-means clustering, K-medoids clustering, Gaussianmixture modeling, density-based spatial clustering of applications with noise (DBSCAN), an autoencoding neural network, a variational autoencoder, Riemannian geometry-based manifold learning on covariance matrices, contrastive learning, a hidden Markov model, isometric mapping (Isomap), locally linear embedding, t-distributed stochastic neighbor embedding (t-SNE), uniform manifold approximation and projection (UMAP), diffusion maps, spectral clustering, or a selforganizing map.
48. The computer-implemented method of claim 47, wherein the unsupervised machine learning algorithm uses the Riemannian geometry-based manifold learning to estimate covariance structures of the training neurophysiology data, wherein clustering is performed based on geodesic distances on the symmetric positive definite (SPD) manifold.
49. The computer-implemented method of claim 47, wherein the unsupervised machine learning algorithm uses the contrastive learning to learn a representation of the training neurophysiology data, wherein temporally adjacent data epochs serve as positive pairs and temporally distant epochs serve as negative pairs.
50. The computer-implemented method of claim 47, wherein the unsupervised machine learning algorithm uses the hidden Markov model to identify latent states in the training neurophysiology data, wherein the hidden states of the hidden Markov model correspond to clinical state labels.
51. The computer-implemented method of any one of claims 1-50, wherein the unsupervised machine learning algorithm uses manifold learning with Isomap, locally linear embedding (LLE), Laplacian eigenmaps, t-distributed stochastic neighbor embedding (t-SNE), uniform manifold approximation and projection (UMAP), or diffusion maps.
52. The computer-implemented method of any one of claims 1-51, wherein the unsupervised machine learning algorithm uses a variational autoencoder (VAE) or a p-VAE to learn a latent representation of the training neurophysiology data, wherein clustering is performed in the latent space.
53. The computer-implemented method of any one of claims 1-52, wherein the neurological disorder is a movement disorder, a sleep disorder, stroke, epilepsy, a traumatic braininjury, dementia, delirium, coma or a minimally conscious state, a pain-associated disorder, or a mood disorder.
54. The computer-implemented method of claim 53, wherein the movement disorder is Parkinson’s disease or dystonia.
55. The computer-implemented any one of claims 1-54, wherein the clinical state label is a sleep stage label, a symptom label, a mood label, or a brain plasticity state label.
56. The computer-implemented method of claim 55, wherein the sleep stage label is N1, N2, N3, or phasic or tonic rapid eye movement (REM).
57. The computer implemented method of claim 55 or 56, wherein delta band power between 0.5 Hz to 4 Hz is used as the primary feature for NREM sleep classification.
58. The computer implemented method of any one of claims 55-57, further comprising using detection of slow wave activity and sleep spindles to discriminate between the N2 sleep stage and the N3 sleep stage.
59. The computer-implemented method of claim 55, wherein the symptom label is a motor symptom label, optionally wherein the motor symptom label is bradykinesia, rigidity, tremor, hyperkinesia, dyskinesia, dysphagia, parkinsonian gait, or postural instability.
60. The computer-implemented method of claim 55, wherein the mood label is depression or anxiety.
61. The computer-implemented method of any one of claims 1-60, further comprising segmenting the training neurophysiology data and the test neurophysiology data into a plurality of data epochs.
62. The computer-implemented method of any one of claims 1-61, further comprising detecting and rejecting or correcting artifacts in the neurophysiology data caused by the stimulation, movement, or recording system noise using threshold-based detection, template matching,independent component analysis (ICA)-based artifact removal, or deep learning-based artifact detection.
63. The computer-implemented method of any one of claims 1-62, wherein linear discriminant analysis (LDA) model is used to distinguish between canonical power band feature clusters.
64. The computer-implemented method of any one of claims 1-63, further comprising using synthetic minority over-sampling technique (SMOTE) for class imbalance correction.
65. A computer-implemented method for adjusting parameter settings of a neurostimulator for treatment of sleep dysfunction in a subject with deep brain stimulation, the computer performing steps comprising:(a) receiving training neurophysiology data and test neurophysiology data for the subject, wherein the training neurophysiology data and the test neurophysiology data comprise brain electrical signals from a subcortical region or a cortical region of the brain of the subject recorded while the subject is sleeping;(b) using an unsupervised machine learning algorithm to cluster features of the training neurophysiology data;(c) assigning a sleep stage label to each feature cluster to generate sleep stage labeled training neurophysiology data;(d) training a supervised model using the sleep stage labeled training neurophysiology data to predict the sleep stage of the subject from the test neurophysiology data; and(e) adjusting the parameter settings of the neurostimulator to a predefined set of neuromodulatory parameters based on the sleep stage predicted for the subject from the test neurophysiology data.
66. The computer-implemented method of claim 65, wherein said assigning comprises assigning a non-rapid eye movement (NREM) sleep stage label to a first feature cluster and a rapid eye movement (REM) or wake stage label to a second feature cluster, wherein the first feature cluster has higher average delta power compared to the second feature cluster.
67. The computer-implemented method of claim 66, wherein said training the supervised model comprises training a linear discriminant analysis (LDA) model to define a linear boundary for distinguishing between the first feature cluster and the second feature cluster.
68. The computer-implemented method of any one of claims 65-67, further comprising: generating an objective function for adjusting the parameter settings of the neurostimulator to maximize average delta power during the NREM sleep stage with respect to amplitude of deep brain stimulation administered to the basal ganglia region of the brain of the subject during the N REM sleep stage; anditeratively optimizing the parameter settings of the neurostimulator using an optimization algorithm with the objective function as input, wherein optimized parameter settings are generated by maximizing an objective function value to maximize average delta power during the NREM sleep stage.
69. The computer-implemented method of claim 68, wherein said iteratively optimizing the parameter settings comprises optimizing the parameter settings for each brain hemisphere of the subject.
70. The computer-implemented method of claim 68 or 69, wherein said iteratively optimizing the parameter settings of the neurostimulator comprises performing Bayesian optimization with a Gaussian process regression model of the objective function.
71. The computer-implemented method of any one of claims 68-70, wherein said iteratively optimizing the parameter settings comprises within-night optimization performed during a single night of sleep, wherein the objective function is evaluated and the parameter settings are updated one or more times during the night based on neurophysiology data acquired during that night.
72. The computer-implemented method of claim 71, wherein the parameter settings are updated at intervals of 1 second to 4 hours during the night, optionally wherein the intervals are 1 second, 5 seconds, 10 seconds, 30 seconds, 1 minute, 2 minutes, 5 minutes, 10 minutes, 15 minutes, 20 minutes, 30 minutes, 45 minutes, 1 hour, 1.5 hours, 2 hours, 2.5 hours, 3 hours, 3.5 hours, or 4 hours.
73. The computer-implemented method of any one of claims 68-70, wherein said iteratively optimizing the parameter settings comprises across-night optimization performed over a plurality of nights of sleep, wherein the objective function is evaluated at the conclusion of each night and the parameter settings are updated between nights based on cumulative observations.
74. The computer-implemented method of claim 73, wherein said across-night optimization comprises comparing neurophysiology data from each night to a characteristic night of sleep derived from baseline recordings, wherein the characteristic night comprises a mean and standard deviation of a rolling average of delta power across baseline nights at each time interval from firstentrance into NREM sleep.
75. The computer-implemented method of any one of claims 65-74, further comprising instructing the neurostimulator to apply deep brain stimulation to a basal ganglia region of the brain of the subject using the optimized parameter settings.
76. The computer implemented method of any one of claims 65-75, wherein the cortical region comprises a precentral gyrus region, a cross-central sulcus region, or any combination thereof.
77. The computer implemented method of any one of claims 65-76, wherein the subcortical region comprises a basal ganglia region.
78. The computer implemented method of claim 77, wherein the basal ganglia region is a subthalamic nucleus (STN) region, a globus pallidus region, or a thalamic region.
79. The computer-implemented method of any one of claims 65-78, wherein the training neurophysiology data and the test neurophysiology data comprise field potential data.
80. The computer-implemented method of any one of claims 65-79, wherein the unsupervised machine learning algorithm uses K-means clustering, K-medoids clustering, Gaussian mixture modeling, density-based spatial clustering of applications with noise (DBSCAN), an autoencoding neural network, a variational autoencoder, Riemannian geometry-based manifold learning on covariance matrices, contrastive learning, a hidden Markov model, isometric mapping (Isomap), locally linear embedding, t-distributed stochastic neighbor embedding (t-SNE), uniformmanifold approximation and projection (UMAP), diffusion maps, spectral clustering, or a selforganizing map.
81. The computer-implemented method of any one of claims 65-80, wherein said assigning the sleep stage label to each feature cluster comprises using sparse labeling based on ancillary extracranial polysomnography data, wherein the ancillary extracranial polysomnography data is synchronized with the training neurophysiology data, and wherein the ancillary polysomnography data is collected from the subject at sparse intervals while the subject is sleeping.
82. The computer-implemented method of claim 81, wherein said sparse labeling comprises collecting the ancillary extracranial polysomnography data at at least one time point for each feature cluster in order to assign a time-synchronized label from the ancillary extracranial polysomnography data to each feature cluster, wherein the time-synchronized label is assigned to the entire feature cluster.
83. The computer-implemented method of claim 81 or 82, wherein the ancillary extracranial polysomnography data is collected using a portable or wearable device.
84. The computer-implemented method of claim 83, wherein the portable or wearable device is a headband, ring, or patch comprising a sensor for collecting the ancillary extracranial polysomnography data.
85. A computer-implemented method for adjusting parameter settings of a neurostimulator for treatment of Parkinson’s disease in a subject with deep brain stimulation, the computer performing steps comprising:(a) receiving training neurophysiology data and test neurophysiology data for the subject, wherein the training neurophysiology data and the test neurophysiology data comprise brain electrical signals from a subthalamic nucleus region or a sensorimotor cortex region of the brain of the subject;(b) using an unsupervised machine learning algorithm to cluster features of the training neurophysiology data;(c) assigning a clinical state label to each feature cluster to generate labeled training neurophysiology data;(d) training a supervised model using the labeled training neurophysiology data to predict the clinical state of the subject from the test neurophysiology data; and(e) adjusting the parameter settings of the neurostimulator to a predefined set of neuromodulatory parameters based on the clinical state predicted for the subject from the test neurophysiology data.
86. The computer-implemented method of claim 85, wherein said assigning comprises assigning a bradykinetic clinical state label to a first feature cluster and a non-bradykinetic clinical state label to a second feature cluster, wherein the first feature cluster has higher average beta power compared to the second feature cluster.
87. The computer-implemented method of claim 86, wherein said training the supervised model comprises training a linear discriminant analysis (LDA) model to define a linear boundary for distinguishing between the first feature cluster and the second feature cluster.
88. The computer-implemented method of any one of claims 85-87, further comprising: generating an objective function for said adjusting the parameter settings of the neurostimulator to minimize time spent by the subject in the bradykinetic clinical state; and iteratively optimizing the parameter settings of the neurostimulator using an optimization algorithm with the objective function as input, wherein optimized parameter settings are generated by minimizing an objective function value to minimize the time spent by the subject in the bradykinetic clinical state.
89. The computer-implemented method of claim 88, wherein said iteratively optimizing the parameter settings comprises optimizing the parameter settings for each brain hemisphere of the subject.
90. The computer-implemented method of claim 88 or 89, wherein said iteratively optimizing the parameter settings of the neurostimulator comprises performing Bayesian optimization with a Gaussian process regression model of the objective function.
91. The computer-implemented method of any one of claims 88-90, further comprising instructing the neurostimulator to apply deep brain stimulation to a subthalamic nucleus region or a globus pallidus internus region of the brain of the subject using the optimized parameter settings.
92. The computer-implemented method of any one of claims 88-91, wherein the training neurophysiology data and the test neurophysiology data comprise field potential data.
93. The computer-implemented method of any one of claims 88-92, wherein the unsupervised machine learning algorithm uses K-means clustering, K-medoids clustering, Gaussian mixture modeling, density-based spatial clustering of applications with noise (DBSCAN), an autoencoding neural network, a variational autoencoder, Riemannian geometry-based manifold learning on covariance matrices, contrastive learning, a hidden Markov model, isometric mapping (Isomap), locally linear embedding, t-distributed stochastic neighbor embedding (t-SNE), uniform manifold approximation and projection (UMAP), diffusion maps, spectral clustering, or a selforganizing map.
94. A computer implemented method for classifying sleep stages, the computer performing steps comprising:(a) receiving a first set of recorded intracranial brain electrical signal data from a subcortical region or a cortical region of the brain of a subject, wherein the first set of intracranial brain electrical signal data is recorded while the subject is sleeping;(b) receiving extracranial polysomnography data, wherein the extracranial polysomnography data is synchronized with the first set of recorded intracranial brain electrical signal data;(c) segmenting the first set of recorded intracranial brain electrical signal data into a plurality of data epochs;(d) assigning a sleep stage label to each data epoch of the plurality of data epochs using the extracranial polysomnography data;(e) training a classification model using a gradient boosting machine learning algorithm or an artificial neural network to identify a power spectral density feature in each data epoch that is associated with the assigned sleep stage label, wherein a trained classification model is produced;(f) receiving a second set of recorded intracranial brain electrical signal data from the subcortical region or the cortical region of the brain of the subject, wherein the second set of intracranial brain electrical signal data is recorded while the subject is sleeping; and(g) detecting sleep stages based on power spectral density features in the second set of recorded intracranial brain electrical signal data using the trained classification model without using any extracranial polysomnography data.
95. The computer implemented method of claim 94, wherein the gradient boosting machine learning algorithm is a light gradient-boosting machine (LightGBM) algorithm.
96. The computer implemented method of claim 94 or 95, wherein the gradient boosting machine learning algorithm is supervised.
97. The computer implemented method of claim 94, wherein the artificial neural network is a multi-layer perceptron (MLP).
98. The computer implemented method of any one of claims 94-97, wherein said training the classification model further comprises performing Bayesian hyperparameter optimization.
99. The computer implemented method of any one of claims 94-98, wherein the subject receives deep brain stimulation therapy during recording of the first set and / or the second set of intracranial brain electrical signal data.
100. The computer implemented method of any one of claims 94-99, further comprising: detecting sleep dysfunction in the subject by identifying an abnormal sequence or duration of the sleep stages; andinstructing a stimulator to modify the deep brain stimulation therapy to reduce or prevent the sleep dysfunction in the subject.
101. The computer implemented method of any one of claims 94-100, wherein the first set of recorded intracranial brain electrical signal data and the second set of recorded intracranial brain electrical signal data comprise intracranial brain electrical signal data from the subcortical region or the cortical region of each hemisphere of the brain.
102. The computer implemented method of any one of claims 94-101, wherein the first set of recorded intracranial brain electrical signal data and the second set of recorded intracranial brain electrical signal data comprise intracranial brain electrical signal data from the subcortical region or the cortical region of a single hemisphere of the brain.
103. The computer implemented method of any one of claims 94-102, wherein the subcortical region comprises a basal ganglia region.
104. The computer implemented method of claim 103, wherein the basal ganglia region is a subthalamic nucleus (STN) region, a globus pallidus region, or a thalamic region.
105. The computer implemented method of any one of claims 94-104, wherein the cortical region comprises a precentral gyrus region, a cross-central sulcus region, or any combination thereof.
106. The computer implemented method of any one of claims 94-105, wherein the subject has sleep dysfunction.
107. The computer implemented method of any one of claims 94-106, wherein the subject has a movement disorder, optionally wherein the movement disorder is Parkinson’s disease or cervical dystonia.
108. The computer implemented method of any one of claims 94-107, wherein each data epoch contains only a single sleep stage label.
109. The computer implemented method of claim 108, wherein the sleep stage label is N1, N2, N3, N4, or rapid eye movement (REM).
110. The computer implemented method of claim 109, wherein classification accuracy for the sleep stage exceeds 80%.
111. The computer implemented method of claim 108, wherein the sleep stage label is non-rapid eye movement (NREM) or rapid eye movement (REM).
112. The computer implemented methodof any one of claims 108-111, wherein delta band power between 0.5 Hz to 4 Hz is used as the primary feature for NREM sleep classification.
113. The computer implemented method of any one of claims 94-112, further comprising receiving accelerometry data and / or autonomic data for the subject while the subject is sleeping, wherein the accelerometry data and / or autonomic data are used in combination with the extracranial polysomnography data in said assigning a sleep stage label to each data epoch.
114. The computer implemented method of any one of claims 94-113, further comprising synchronizing the recorded intracranial brain electrical signal data and the accelerometry data using cross-correlation analysis.
115. The computer implemented method of any one of claims 94-114, further comprising receiving auxiliary data from a noninvasive sleep monitoring device, a wearable sleep monitoring device, a photoplethysmography (PPG)-based sleep monitoring device, or a radar-based sleep monitoring device while the subject is sleeping, wherein the auxiliary data are used in combination with the extracranial polysomnography data in said assigning a sleep stage label to each data epoch.
116. The computer-implemented method of any one of claims 94-115, wherein the intracranial brain electrical signal data comprises field potential data.
117. The computer-implemented method of any one of claims 94-116, wherein the recorded intracranial brain electrical signal data comprises neural oscillations in a frequency range from 0.5 Hz to 60 Hz.
118. The computer-implemented method of any one of claims 94-117, wherein cortical field potentials provide at least 8% higher classification accuracy than subcortical field potentials.
119. The computer-implemented method of any one of claims 94-118, wherein the ancillary extracranial polysomnography data is collected using a portable or wearable device.
120. The computer-implemented method of claim 119, wherein the portable or wearable device is a headband, ring, or patch comprising a sensor for collecting the ancillary extracranial polysomnography data.
121. A computer implemented method for classifying sleep stages, the computer performing steps comprising:(a) receiving a first set of recorded intracranial brain electrical signal data from a subcortical region or a cortical region of the brain of a subject, wherein the first set of intracranial brain electrical signal data is recorded while the subject is sleeping;(b) receiving extracranial polysomnography data, wherein the extracranial polysomnography data is synchronized with the first set of recorded intracranial brain electrical signal data;(c) segmenting the first set of recorded intracranial brain electrical signal data into a plurality of data epochs;(d) assigning a sleep stage label to each data epoch of the plurality of data epochs using the extracranial polysomnography data;(e) training a classification model using a convolutional neural network to identify a spectrogram feature in each data epoch that is associated with the assigned sleep stage label, wherein a trained classification model is produced;(f) receiving a second set of recorded intracranial brain electrical signal data from the subcortical region or the cortical region of the brain of the subject, wherein the second set of intracranial brain electrical signal data is recorded while the subject is sleeping; and(g) detecting sleep stages based on spectrogram features in the second set of recorded intracranial brain electrical signal data using the trained classification model without using any extracranial polysomnography data.
122. The computer implemented method of claim 121, wherein the convolutional neural network comprises five convolutional layers followed by three fully connected layers.
123. The computer implemented method of claim 121 or 122, wherein said training the classification model further comprises performing Bayesian hyperparameter optimization.
124. The computer implemented method of any one of claims 121-123, wherein the subject receives deep brain stimulation therapy during recording of the first set and / or the second set of intracranial brain electrical signal data.
125. The computer implemented method of any one of claims 121-124, further comprising: detecting sleep dysfunction in the subject by identifying an abnormal sequence or duration of the sleep stages; andinstructing a neurostimulator to modify the deep brain stimulation therapy to reduce or prevent the sleep dysfunction in the subject.
126. The computer implemented method of any one of claims 121-125, wherein the first set of recorded intracranial brain electrical signal data and the second set of recorded intracranialbrain electrical signal data comprise intracranial brain electrical signal data from the subcortical region or the cortical region of each hemisphere of the brain.
127. The computer implemented method of any one of claims 121-126, wherein the first set of recorded intracranial brain electrical signal data and the second set of recorded intracranial brain electrical signal data comprise intracranial brain electrical signal data from the subcortical region or the cortical region of a single hemisphere of the brain.
128. The computer implemented method of any one of claims 121-127, wherein the subcortical region comprises a basal ganglia region.
129. The computer implemented method of claim 128, wherein the basal ganglia region is a subthalamic nucleus (STN) region, a globus pallidus region, or a thalamic region.
130. The computer implemented method of any one of claims 121-129, wherein the cortical region comprises a precentral gyrus region, a cross-central sulcus region, or any combination thereof.
131. The computer implemented method of any one of claims 121-130, wherein the subject has sleep dysfunction.
132. The computer implemented method of any one of claims 121-131, wherein the subject has a movement disorder, optionally wherein the movement disorder is Parkinson’s disease or cervical dystonia.
133. The computer implemented method of any one of claims 121-132, wherein each data epoch contains only a single sleep stage label.
134. The computer implemented method of claim 133, wherein the sleep stage label is N1, N2, N3, N4, or rapid eye movement (REM).
135. The computer implemented method of claim 133, wherein the sleep stage label is non-rapid eye movement (NREM) or rapid eye movement (REM).
136. The computer implemented method of claim 134 or 135, wherein delta band power between 0.5 Hz to 4 Hz is used as the primary feature for NREM sleep classification.
137. The computer implemented method of any one of claims 121-136, further comprising receiving accelerometry data and / or autonomic data for the subject while the subject is sleeping, wherein the accelerometry data and / or autonomic data are used in combination with the extracranial polysomnography data in said assigning a sleep stage label to each data epoch.
138. The computer implemented method of claim 137, further comprising synchronizing the recorded intracranial brain electrical signal data and the accelerometry data using crosscorrelation analysis.
139. The computer implemented method of any one of claims 121-138, further comprising receiving auxiliary data from a noninvasive sleep monitoring device, a wearable sleep monitoring device, a photoplethysmography (PPG)-based sleep monitoring device, or a radar-based sleep monitoring device while the subject is sleeping, wherein the auxiliary data are used in combination with the extracranial polysomnography data in said assigning a sleep stage label to each data epoch.
140. The computer-implemented method of claim 139, wherein the auxiliary data from the noninvasive sleep monitoring device is collected using a portable or wearable device.
141. The computer-implemented method of claim 140, wherein the portable or wearable device is a headband, ring, or patch comprising a sensor for collecting polysomnography data.
142. The computer-implemented method of any one of claims 121-141, wherein the brain electrical signal data comprises field potential data.
143. The computer-implemented method of any one of claims 121-142, wherein the recorded intracranial brain electrical signal data comprises delta frequency neural oscillations in a range from 0.5 Hz to 4 Hz, theta frequency neural oscillations in a range from 4 Hz to 7 Hz, alpha frequency neural oscillations in a range from 8 Hz to 12 Hz, beta frequency neural oscillations in a range from 13 Hz to 30 Hz, or any combination thereof.
144. A non-transitory computer-readable medium comprising program instructions that, when executed by a processor in a computer, causes the processor to perform the method of any one of claims 1-143.
145. A kit comprising the non-transitory computer-readable medium of claim 144.
146. A system comprising:a neural recording electrode;a neurostimulator;a data receiving device comprising a processor programmed according to the computer implemented method of any one of claims 1-143; anda display, wherein the display is connected to the data receiving device.
147. The system of claim 146, wherein the neurostimulator provides electrical stimulation, magnetic stimulation, or ultrasound stimulation.
148. The system of claim 147, wherein the electrical stimulation is applied unilaterally or bilaterally.
149. The system of any one of claims 146-148, wherein the neurostimulator provides deep brain stimulation, subgaleal electrical stimulation, transcranial stimulation, spinal cord stimulation, peripheral nerve stimulation, peripheral nerve field stimulation, neuromuscular electrical stimulation, or focused ultrasound stimulation.
150. The system of claim 149, wherein the transcranial stimulation is transcranial direct current stimulation, transcranial alternating current stimulation, or transcranial magnetic stimulation.
151. The system of claim 149, wherein the neurostimulator provides the peripheral nerve stimulation or peripheral nerve field stimulation to a vagus nerve, a median nerve, an ulnar nerve, a radial nerve, an occipital nerve, a sphenopalatine ganglion, a trigeminal nerve, a tibial nerve, a sacral nerve, a hypoglossal nerve, a phrenic nerve, a greater auricular nerve, a peroneal nerve, a sciatic nerve, a pudendal posterior nerve, a saphenous nerve, a suprascapular nerve, a carotid sinus nerve, a cervical sympathetic chain nerve, or a auriculotemporal nerve.
152. The system of any one of claims 146-151, further comprising a video recording device.
153. The system of any one of claims 146-152, further comprising an external wearable monitor that can acquire accelerometry data, gyroscope data, magnetometer surface electromyographic (sEMG) data, or any combination thereof.
154. The system of any one of claims 146-153, further comprising a noninvasive sleep monitoring device, a wearable sleep monitoring device, a photoplethysmography (PPG)-based sleep monitoring device, or a radar-based sleep monitoring device.
155. The system of any one of claims 146-154, wherein the data receiving device is a computer, a cloud computing system, a handheld device, a smartwatch, or a smart ring.
156. The system of claim 155, wherein the handheld device is a cell phone or tablet.
157. The system of any one of claims 146-156, wherein the display is a liquid crystal display (LCD), light-emitting diode (LED) display, microLED display comprising microscopic LEDs, plasma (PDP) display, quantum dot LED (QLED) display, organic light emitting diode (OLED) display, quantum dot OLED (QD-OLED) display, or cathode ray tube display device.
158. The system of any one of claims 146-157, further comprising a stimulation electrode, wherein the stimulation electrode is connected to the neurostimulator.
159. The system of claim 158, wherein the stimulation electrode is a non-brain penetrating surface electrode array or a brain-penetrating electrode array.
160. A method of using the system of any one of claims 146-159, the method comprising: acquiring training neurophysiology data and test neurophysiology data for a subject using the neural recording electrode;adjusting the parameter settings of the neurostimulator to a predefined set of neuromodulatory parameters based on the clinical state predicted for the subject from the test neurophysiology data according to the computer implemented method; andapplying stimulation to a target region of the subject using the adjusted parameter settings.
161. The method of claim 160, wherein the stimulation comprises electrical stimulation, magnetic stimulation, or ultrasound stimulation.
162. The method of claim 161, wherein the stimulation comprises deep brain stimulation, subgaleal electrical stimulation, transcranial stimulation, spinal cord stimulation, peripheral nerve stimulation, peripheral nerve field stimulation, neuromuscular electrical stimulation, or focused ultrasound stimulation.
163. The method of claim 162, wherein the transcranial stimulation is transcranial direct current stimulation, transcranial alternating current stimulation, or transcranial magnetic stimulation.
164. The method of any one of claims 161-163, wherein the electrical stimulation is delivered to a brain region, spinal cord, peripheral nerve, or muscle of the subject.
165. The method of claim 164, wherein the peripheral nerve is a vagus nerve, a median nerve, an ulnar nerve, a radial nerve, an occipital nerve, a sphenopalatine ganglion, a trigeminal nerve, a tibial nerve, a sacral nerve, a hypoglossal nerve, a phrenic nerve, a greater auricular nerve, a peroneal nerve, a sciatic nerve, a pudendal posterior nerve, a saphenous nerve, a suprascapular nerve, a carotid sinus nerve, a cervical sympathetic chain nerve, or a auriculotemporal nerve.
166. The method of any one of claims 160-165, further comprising using the supervised model to classify the clinical state of the subject as a desired clinical state or an undesired clinical state;generating an objective function for said adjusting the parameter settings of the neurostimulator to maximize time spent by the subject in the desired clinical state or minimize time spent by the subject in the undesired clinical state;iteratively optimizing the parameter settings of the neurostimulator using an optimization algorithm with the objective function as input, wherein optimized parameter settings are generated by maximizing an objective function value to maximize the time spent by the subject in the desired clinical state or minimizing the objective function value to minimize the time spent by the subject in the undesired clinical state; andapplying stimulation to a target region of the subject using the optimized parameter settings.
167. The method of any one of claims 160-166, wherein said assigning the clinical state label to each feature cluster comprises using sparse labeling based on auxiliary data or patient selfreports tracking a symptom of the neurological disorder or a psychiatric disorder, wherein the auxiliary data or patient self-reports are collected from the subject at sparse intervals during a day.
168. The method of claim 167, wherein said sparse labeling comprises collecting the auxiliary data or patient self-reports at least one time point for each feature cluster in order to assign a time-synchronized label from the auxiliary data or patient self-reports to each feature cluster, wherein the time-synchronized label is assigned to the entire feature cluster.
169. The method of claim 167 or 168, wherein the auxiliary data are acquired with an accelerometer, a speech audio monitor, or a video recording device.
170. The method of any one of claims 160-169, wherein the auxiliary data are collected with an external wearable device that tracks the symptom.
171. The method of any one of claims 160-170, wherein said assigning the clinical state label to each feature cluster comprises using a biomarker to identify an association between a feature cluster and a clinical state.
