Skip to main page content
U.S. flag

An official website of the United States government

Dot gov

The .gov means it’s official.
Federal government websites often end in .gov or .mil. Before sharing sensitive information, make sure you’re on a federal government site.

Https

The site is secure.
The https:// ensures that you are connecting to the official website and that any information you provide is encrypted and transmitted securely.

Access keys NCBI Homepage MyNCBI Homepage Main Content Main Navigation
. 2023 Apr;7(4):533-545.
doi: 10.1038/s41551-021-00736-7. Epub 2021 Jun 21.

A prototype closed-loop brain-machine interface for the study and treatment of pain

Affiliations

A prototype closed-loop brain-machine interface for the study and treatment of pain

Qiaosheng Zhang et al. Nat Biomed Eng. 2023 Apr.

Abstract

Chronic pain is characterized by discrete pain episodes of unpredictable frequency and duration. This hinders the study of pain mechanisms and contributes to the use of pharmacological treatments associated with side effects, addiction and drug tolerance. Here, we show that a closed-loop brain-machine interface (BMI) can modulate sensory-affective experiences in real time in freely behaving rats by coupling neural codes for nociception directly with therapeutic cortical stimulation. The BMI decodes the onset of nociception via a state-space model on the basis of the analysis of online-sorted spikes recorded from the anterior cingulate cortex (which is critical for pain processing) and couples real-time pain detection with optogenetic activation of the prelimbic prefrontal cortex (which exerts top-down nociceptive regulation). In rats, the BMI effectively inhibited sensory and affective behaviours caused by acute mechanical or thermal pain, and by chronic inflammatory or neuropathic pain. The approach provides a blueprint for demand-based neuromodulation to treat sensory-affective disorders, and could be further leveraged for nociceptive control and to study pain mechanisms.

PubMed Disclaimer

Conflict of interest statement

Competing interests

The authors declare no competing interests.

Figures

Fig. 1 |
Fig. 1 |. Design of a closed-loop brain-machine interface (BMI) to detect and treat pain.
a, Schematic of BMI that consists of three steps: (1) Neural recording and online signal processing including spike sorting; (2) neural decoding for pain onset detection based on sorted units; (3) pain onset detection to trigger therapeutic neurostimulation as neurofeedback. The magenta and green circular symbols with black arrows indicate the state-space model (SSM, details below). The curved magenta arrows denote data flow for the model inputs, while the curved blue arrows denote the model outputs for therapeutic neurostimulation. The blue box denotes the laser. b, Placement of optic fiber in the prelimbic prefrontal cortex (PFC) and recording electrodes in the anterior cingulate cortex (ACC). c, Left: schematic of the state-space model (SSM) for detecting the change point (pain onset) from the neuronal ensemble spike activity. Right: an example of pain onset detection using the SSM-based decoding strategy. The top example raster plot shows online sorted population spike counts (bin size = 50 ms), with the darker color representing greater spike counts. The unit of color bar is spikes/bin. The bottom magenta trace represents the estimated Z-score from the univariate latent state, and the shaded area marks the 95% confidence intervals (CI). Horizontal dashed lines mark the significance thresholds. Vertical yellow line denotes the onset of noxious stimulation. In the training phase, the SSM parameters were inferred from the ACC ensemble spike data as represented by the top raster plot. In the testing phase, a one-dimensional discrete-time latent dynamic state sequence {zk} (k=1,…,T) was inferred from the SSM, and the bottom Z-score (magenta trace) was calculated from the inferred latent state variable (see Methods).
Fig. 2 |
Fig. 2 |. Closed-loop BMI control of acute thermal pain.
a, Schematic of BMI experiments during thermal pain delivery with an infrared (IR) emitter. Stimulus presentation lasted until paw withdrawal or 5 s. b, Peripheral nocifensive behavioral response to thermal stimulation. A noxious stimulus (IR 70) triggered paw withdrawals, whereas a non-noxious stimulus (IR 10) did not. Withdrawal rate, defined as the percentage of peripheral stimulations that resulted in observed paw withdrawal, is shown. n = 7 rats used with non-noxious stimulation (IR 10), n = 17 rats used with noxious stimulation (IR 70); p < 0.0001, two-sided unpaired Student’s t test. Data are presented as mean ± s.e.m. of biological replicates. c, d, Example SSM detection performances. The SSM-based decoder detected the onset of an pain episode in a single trial in response to noxious stimulation (c), in contrast to a trial with non-noxious stimulation (d). The top raster plots show online sorted population spike counts (bin size =50 ms), with the darker color representing greater spike counts. The unit of color bar is spikes/bin. The bottom magenta trace represents the estimated Z-score from the univariate latent state, and the shaded area marks the 95% confidence intervals (CI). Horizontal dashed lines mark the significance thresholds (see Methods). The vertical magenta and green lines indicate the time of peripheral stimulation; magenta: noxious stimulus; green: non-noxious stimulus. The vertical blue line indicates the time of paw withdrawal. The black arrow indicates the decoded pain onset. n=28 biologically independent neurons recorded in the example session (panel c), and n=26 biologically independent neurons in the example session (panel d). e, The performance of SSM-based decoder in detecting thermal pain. Pain detection rates were calculated as a percentage of trials that had positive pain onset detection. n = 7 rats used with non-noxious stimulation (IR 10), n = 18 rats used with noxious stimulation (IR 70); p < 0.0001, two-sided unpaired Student’s t test. Data are presented as mean ± s.e.m. of biological replicates. f, Schematic of SSM-decoder training and behavior testing with BMI. g, Pain onset detection occurred prior to withdrawal responses to noxious thermal stimulations. n = 9 sessions from 6 biologically independent rats; p = 0.0057, two-sided paired Student’s t test. h, Application of the closed-loop BMI prolonged the withdrawal latency on Hargreaves test. n = 8 rats. No opto vs. BMI opto: p = 0.0074, no opto vs. manual opto: p = 0.0027, BMI opto vs. manual opto: p = 0.4486, one-way ANOVA, two-sided Tukey’s multiple comparisons test with repeated measures. Data are presented as mean ± s.e.m. of biological replicates. i, Left: a representative ACC neuron increased firing rates in response to a noxious thermal stimulus (IR 70). Right: BMI reduced firing rate changes in response to the noxious stimulus. Time 0 indicates the onset of the stimulus. FR: firing rates. j, BMI treatment reduced the peak firing rates of pain-responsive ACC neurons in response to the noxious stimulus (see Methods). n = 33 neurons from 6 rats, p = 0.0001, two-sided paired Student’s t test. Data are presented as mean ± s.e.m. of biological replicates. k, BMI treatment reduced cumulative firing rate response of ACC neurons over a 5-s period (within the [0, 5] s range, where time 0 indicates the onset of the stimulus) in response to the noxious stimulus. n = 33 neurons from 6 rats, p = 0.0135, two-sided paired Student’s t test. Data are presented as mean ± s.e.m. of biological replicates.
Fig. 3 |
Fig. 3 |. Closed-loop BMI control of acute mechanical pain.
a, Schematic of BMI experiments during mechanical stimulus delivery. b, Peripheral nocifensive behavioral response to mechanical stimulation. A noxious stimulus (pin prick or PP) triggered paw withdrawals, whereas a non-noxious stimulus (6g von Frey filament, or vF) did not. Withdrawal rate, defined as the percentage of peripheral stimulations that resulted in observed paw withdrawal, is shown. n = 9 rats; p < 0.0001, two-sided paired Student’s t test. Data are presented as mean ± s.e.m. of biological replicates. c, d, The SSM-based decoder detected the onset of a pain episode in a single trial in response to noxious stimulation (PP, panel c), in contrast to a trial with non-noxious stimulation (6g vF, panel d). The top raster plots show online sorted population spike counts (bin size =50 ms), with the darker color representing greater spike counts. The unit of color bar is spikes/bin. The bottom magenta trace represents the estimated Z-score from the univariate latent state, and the shaded area marks the 95% confidence intervals (CI). Horizontal dashed lines mark the significance thresholds (see Methods). The vertical magenta and green lines indicate the time of peripheral stimulation. magenta: noxious stimulus; green: non-noxious stimulus. The vertical blue line indicates the time of paw withdrawal. The black arrow indicates the decoded pain onset. n=26 biologically independent neurons in panel c, and n=37 neurons in panel d. e, The performance of SSM-based decoder in detecting mechanical pain. Detection rates were calculated as a percentage of trials that had positive pain onset detection. n = 9 rats; p = 0.0002, two-sided paired Student’s t test. Data are presented as mean ± s.e.m. of biological replicates. f, Schematic of the conditioned place aversion (CPA) assay to assess pain aversion. In a two-chamber set up, aversive response was triggered by a noxious mechanical stimulus (PP) applied to the hind paws. One of the chambers was paired with BMI, and the opposite chamber was paired with random PFC activation of matching duration and intensity. The orange solid line on the rat’s head denotes BMI decoding, while the blue line denotes optogenetic stimulation. In the control chamber, the dashed blue line indicates random optogenetic stimulation. g, After conditioning, ChR2 rats preferred BMI treatment chamber. n = 9 rats; p = 0.0039, two-sided Wilcoxon signed-rank test. Data are presented as mean ± s.e.m. of biological replicates. h, YFP control rats demonstrated no preference for the BMI treatment. n = 6 rats; p = 0.8438, two-sided Wilcoxon signed-rank test. Data are presented as mean ± s.e.m. of biological replicates. i, CPA scores for BMI treatment in rats that experienced acute mechanical pain. n = 9 rats with ChR2 injection, n = 6 control rats with YFP injection; p = 0.0016, two-sided Mann-Whitney U test. Data are presented as mean ± s.e.m. of biological replicates.
Fig. 4 |
Fig. 4 |. Closed-loop BMI control of evoked pain in a model of chronic inflammatory pain.
a, Schematic for the CFA model of inflammatory pain. b, Peripheral allodynia response after CFA treatment. 6g vF triggered paw withdrawals, whereas 0.4g vF did not. Withdrawal rate, defined as the percentage of peripheral stimulations that resulted in observed paw withdrawal, is shown. n = 7 rats; p = 0.0008, two-sided paired Student’s t test. Data are presented as mean ± s.e.m of biological replicates. c, d, The SSM-based decoder detected the onset of a pain episode in a single trial in response to peripheral allodynia-inducing stimulus (6g vF, panel c) in a CFA-treated rat, in contrast to a trial with a non-allodynia-inducing stimulus (0.4g vF, panel d). The top raster plots show online sorted population spike counts (bin size =50 ms), with the darker color representing greater spike counts. The unit of color bar is spikes/bin. The bottom magenta trace represents the estimated Z-score from the univariate latent state, and the shaded area marks the 95% confidence intervals (CI). Horizontal dashed lines mark the significance thresholds (see Methods). The vertical magenta and green lines indicate the time of peripheral stimulation. magenta: 6g vF stimulus; green: 0.4g vF stimulus. The vertical blue line indicates the time of paw withdrawal. The black arrow indicates the decoded pain onset. n=24 biologically independent neurons in panel c, and n=24 neurons in panel d. e, The performance of SSM-based decoder in detecting the onset of mechanical allodynia in CFA-treated rats. Detection rates were calculated as a percentage of trials that had positive pain onset detection. n = 7 rats; p = 0.0008, two-sided paired Student’s t test. Data are presented as mean ± s.e.m. of biological replicates. f, Closed-loop BMI inhibited mechanical allodynia in CFA-treated rats. n = 6 rats with ChR2 injection, n = 4 control rats with YFP injection; p = 0.0002, two-sided unpaired Student’s t test. Data are presented as mean ± s.e.m. of biological replicates. g, Schematic of the conditioned place aversion (CPA) assay in CFA-treated rats. Aversive response was triggered by an allodynia-inducing mechanical stimulus (6g vF) applied in both chambers. One of the chambers was paired with BMI, and the opposite chamber was paired with random PFC activation of matching duration and intensity. The orange solid line on the rat’s head denotes BMI decoding, while the blue line denotes optogenetic stimulation. In the control chamber, the dashed blue line indicates random optogenetic stimulation. h, In ChR2 rats, BMI treatment reduced aversion associated with mechanical allodynia (triggered by the 6g vF stimulus) in the CFA model. n = 8 rats; p = 0.0078, two-sided Wilcoxon signed-rank test. Data are presented as mean ± s.e.m. of biological replicates. i, YFP control rats demonstrated no preference for the BMI treatment. n = 4 rats; p = 0.8750, two-sided Wilcoxon signed-rank test. Data are presented as mean ± s.e.m. of biological replicates. j, CPA scores for BMI treatment in CFA-treated rats. n = 8 rats with ChR2 injection, n = 4 control rats with YFP injection; p = 0.0040, two-sided Mann-Whitney U test. Data are presented as mean ± s.e.m. of biological replicates.
Fig. 5 |
Fig. 5 |. Closed-loop BMI control of evoked pain in a model of chronic neuropathic pain.
a, Schematic for the SNI model of chronic neuropathic pain. b, Peripheral allodynia response after SNI. 6g vF triggered paw withdrawals, whereas 0.4g vF did not. Withdrawal rate, defined as the percentage of peripheral stimulations that resulted in observed paw withdrawal, is shown. n = 6 rats; p < 0.0001, two-sided paired Student’s t test. Data are presented as mean ± s.e.m. of biological replicates. c, d, The SSM-based decoder detected the onset of a pain episode in a single trial in response to peripheral allodynia-inducing stimulus (6g vF, panel c) in a SNI-treated rat, in contrast to a trial with a non-allodynia-inducing stimulus (0.4g vF, panel d). The top raster plots show online sorted population spike counts (bin size =50 ms), with the darker color representing greater spike counts. The unit of color bar is spikes/bin. The bottom magenta trace represents the estimated Z-score from the univariate latent state, and the shaded area marks the 95% confidence intervals (CI). Horizontal dashed lines mark the significance thresholds (see Methods). The vertical magenta and green lines indicate the time of peripheral stimulation. magenta: 6g vF stimulus; green: 0.4g vF stimulus. The vertical blue line indicates the time of paw withdrawal. The black arrow indicates the decoded pain onset. n=30 biologically independent neurons in panel c, and n=30 neurons in panel d. e, The performance of SSM-based decoder in detecting mechanical allodynia in SNI-treated rats. Detection rates were calculated as a percentage of trials that had positive pain onset detection. n = 6 rats; p = 0.0008, two-sided paired Student’s t test. Data are presented as mean ± s.e.m. of biological replicates. f, Closed-loop BMI inhibited mechanical allodynia in the SNI model. n = 5 rats with ChR2 injection, n = 4 control rats with YFP injection; p = 0.0004, two-sided unpaired Student’s t test. Data are presented as mean ± s.e.m. of biological replicates. g, Schematic of the CPA assay in SNI-treated rats. Aversive response was triggered by an allodynia-inducing mechanical stimulus (6g vF) applied in both chambers. One of the chambers was paired with BMI, and the opposite chamber was paired with random PFC activation of matching duration and intensity. The orange solid line on the rat’s head denotes BMI decoding, while the blue line denotes optogenetic stimulation. In the control chamber, the dashed blue line indicates random optogenetic stimulation. h, In ChR2 rats, BMI treatment reduced aversion associated with mechanical allodynia in the SNI model. n = 6 rats; p = 0.0313, two-sided Wilcoxon signed-rank test. Data are presented as mean ± s.e.m. of biological replicates. i, YFP control rats demonstrated no preference for the BMI treatment. n = 4 rats; p = 0.6250, two-sided Wilcoxon signed-rank test. Data are presented as mean ± s.e.m. of biological replicates. j, CPA scores for BMI treatment in SNI-treated rats. n = 6 rats with ChR2 injection, n = 4 control rats with YFP injection; p = 0.0381, two-sided Mann-Whitney U test. Data are presented as mean ± s.e.m. of biological replicates.
Fig. 6 |
Fig. 6 |. Closed-loop BMI control of spontaneous pain in the chronic inflammatory pain model.
a, Schematic of the CPA assay to test tonic or spontaneous pain in the CFA model. No peripheral stimuli were given. One of the chambers was paired with BMI, and the opposite chamber was paired with random PFC activation of matching duration and intensity. The orange solid line on the rat’s head denotes BMI decoding, while the blue line denotes optogenetic stimulation. In the control chamber, the dashed blue line indicates random optogenetic stimulation. b, An example session of sequential pain onset detection based on the SSM-based decoder in a CFA-treated rat. The top raster plots show online sorted population spike counts (bin size =50 ms), with the darker color representing greater spike counts. The unit of color bar is spikes/bin. The bottom magenta trace represents the estimated Z-score from the univariate latent state, and the shaded area marks the 95% confidence intervals (CI). Horizontal dashed lines mark the significance thresholds (see Methods). The black arrows indicate detected onset of tonic pain episodes. n=13 biologically independent neurons. c, In ChR2 rats, CFA-treated rats prefer the BMI chamber. n = 6 rats; p = 0.0313, two-sided Wilcoxon signed-rank test. Data are presented as mean ± s.e.m. of biological replicates. d, YFP control rats demonstrated no preference for the BMI treatment. n = 6 rats; p = 0.8125, two-sided Wilcoxon signed-rank test. Data are presented as mean ± s.e.m. of biological replicates. e, CPA scores for BMI treatment in reducing tonic pain in CFA rats. n = 6 rats with ChR2 injection, n = 6 control rats with YFP injection; p = 0.0087, two-sided Mann-Whitney U test. Data are presented as mean ± s.e.m. of biological replicates.
Fig. 7 |
Fig. 7 |. Closed-loop BMI control of spontaneous pain in the chronic neuropathic pain model.
a, Schematic of the CPA assay to test tonic pain in the SNI model. No peripheral stimuli were given. One of the chambers was paired with BMI, and the opposite chamber was paired with random PFC activation. The orange solid line on the rat’s head denotes BMI decoding, while the blue line denotes optogenetic stimulation. In the control chamber, the dashed blue line indicates random optogenetic stimulation. b, An example session of sequential pain onset detection based on the SSM-based decoder in a SNI-treated rat. The top raster plots show online sorted population spike counts (bin size =50 ms), with the darker color representing greater spike counts. The unit of color bar is spikes/bin. The bottom magenta trace represents the estimated Z-score from the univariate latent state, and the shaded area marks the 95% confidence intervals (CI). Horizontal dashed lines mark the significance thresholds (see Methods). The black arrows indicate detected onset of tonic pain episodes. n=6 biologically independent neurons. c, In ChR2 rats, SNI-treated rats preferred the BMI chamber after conditioning. n = 6 rats; p = 0.0313, two-sided Wilcoxon signed-rank test. Data are presented as mean ± s.e.m. of biological replicates. d, YFP control rats demonstrated no preference for the BMI treatment. n = 4 rats; p = 0.8750, two-sided Wilcoxon signed-rank test. Data are presented as mean ± s.e.m. of biological replicates. e, CPA scores for BMI treatment in reducing tonic pain in SNI rats . n = 6 rats with ChR2 injection, n = 4 rats with YFP injection; p = 0.0381, two-sided Mann-Whitney U test. Data are presented as mean ± s.e.m. of biological replicates.

References

    1. Basbaum AI, Bautista DM, Scherrer G & Julius D Cellular and molecular mechanisms of pain. Cell 139, 267–284 (2009). - PMC - PubMed
    1. Busse JW, et al. Opioids for Chronic Noncancer Pain: A Systematic Review and Meta-analysis. Jama 320, 2448–2460 (2018). - PMC - PubMed
    1. Finnerup NB, et al. Pharmacotherapy for neuropathic pain in adults: a systematic review and meta-analysis. The Lancet. Neurology 14, 162–173 (2015). - PMC - PubMed
    1. Deer TR, et al. The appropriate use of neurostimulation: stimulation of the intracranial and extracranial space and head for chronic pain. Neuromodulation Appropriateness Consensus Committee. Neuromodulation 17, 551–570; discussion 570 (2014). - PubMed
    1. Coffey RJ Deep brain stimulation for chronic pain: results of two multicenter trials and a structured review. Pain Med 2, 183–192 (2001). - PubMed

Publication types