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.
Subscribe to Journal
Get full journal access for 1 year
only $4.92 per issue
All prices are NET prices.
VAT will be added later in the checkout.
Tax calculation will be finalised during checkout.
Rent or Buy article
Get time limited or full article access on ReadCube.
All prices are NET prices.
The main data supporting the results in this study are available within the paper and its Supplementary Information. The raw datasets generated during the study are too large to be publicly shared, yet they are available for research purposes from the corresponding authors on reasonable request.
The custom BMI client software used in this study is available at https://github.com/wangresearch1/onlinePainDecodingGUI.
Basbaum, A. I., Bautista, D. M., Scherrer, G. & Julius, D. Cellular and molecular mechanisms of pain. Cell 139, 267–284 (2009).
Busse, J. W. et al. Opioids for chronic noncancer pain: a systematic review and meta-analysis. JAMA 320, 2448–2460 (2018).
Finnerup, N. B. et al. Pharmacotherapy for neuropathic pain in adults: a systematic review and meta-analysis. Lancet Neurol. 14, 162–173 (2015).
Deer, T. R. 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 (2014).
Coffey, R. J. Deep brain stimulation for chronic pain: results of two multicenter trials and a structured review. Pain Med. 2, 183–192 (2001).
Nandi, D., Aziz, T., Carter, H. & Stein, J. Thalamic field potentials in chronic central pain treated by periventricular gray stimulation—a series of eight cases. Pain 101, 97–107 (2003).
Owen, S. L. et al. Deep brain stimulation for neuropathic pain. Acta Neurochir. Suppl. 97, 111–116 (2007).
Green, A. L. et al. N-of-1 trials for assessing the efficacy of deep brain stimulation in neuropathic pain. Neuromodulation 7, 76–81 (2004).
Bittar, R. G. et al. Deep brain stimulation for pain relief: a meta-analysis. J. Clin. Neurosci. 12, 515–519 (2005).
Boccard, S. G., Pereira, E. A., Moir, L., Aziz, T. Z. & Green, A. L. Long-term outcomes of deep brain stimulation for neuropathic pain. Neurosurgery 72, 221–230 (2013).
Marchand, S., Kupers, R. C., Bushnell, M. C. & Duncan, G. H. Analgesic and placebo effects of thalamic stimulation. Pain 105, 481–488 (2003).
Spooner, J., Yu, H., Kao, C., Sillay, K. & Konrad, P. Neuromodulation of the cingulum for neuropathic pain after spinal cord injury. Case report. J. Neurosurg. 107, 169–172 (2007).
Boccard, S. G. et al. Deep brain stimulation of the anterior cingulate cortex: targeting the affective component of chronic pain. Neuroreport 25, 83–88 (2014).
Lende, R. A., Kirsch, W. M. & Druckman, R. Relief of facial pain after combined removal of precentral and postcentral cortex. J. Neurosurg. 34, 537–543 (1971).
Tsubokawa, T., Katayama, Y., Yamamoto, T., Hirayama, T. & Koyama, S. Chronic motor cortex stimulation for the treatment of central pain. Acta Neurochir. Suppl. (Wien) 52, 137–139 (1991).
Katayama, Y., Tsubokawa, T. & Yamamoto, T. Chronic motor cortex stimulation for central deafferentation pain: experience with bulbar pain secondary to Wallenberg syndrome. Stereotact. Funct. Neurosurg. 62, 295–299 (1994).
Katayama, Y., Fukaya, C. & Yamamoto, T. Poststroke pain control by chronic motor cortex stimulation: neurological characteristics predicting a favorable response. J. Neurosurg. 89, 585–591 (1998).
Herregodts, P., Stadnik, T., De Ridder, F. & D’Haens, J. Cortical stimulation for central neuropathic pain: 3-D surface MRI for easy determination of the motor cortex. Acta Neurochir. Suppl. 64, 132–135 (1995).
Ebel, H., Rust, D., Tronnier, V., Boker, D. & Kunze, S. Chronic precentral stimulation in trigeminal neuropathic pain. Acta Neurochir. (Wien) 138, 1300–1306 (1996).
Nguyen, J. P. et al. [Treatment of central and neuropathic facial pain by chronic stimulation of the motor cortex: value of neuronavigation guidance systems for the localization of the motor cortex]. Neurochirurgie 46, 483–491 (2000).
Garcia-Larrea, L. et al. Electrical stimulation of motor cortex for pain control: a combined PET-scan and electrophysiological study. Pain 83, 259–273 (1999).
Lenz, F. A., Kwan, H. C., Dostrovsky, J. O. & Tasker, R. R. Characteristics of the bursting pattern of action potentials that occurs in the thalamus of patients with central pain. Brain Res. 496, 357–360 (1989).
Tasker, R. R., Gorecki, J., Lenz, F. A., Hirayama, T. & Dostrovsky, J. O. Thalamic microelectrode recording and microstimulation in central and deafferentation pain. Appl. Neurophysiol. 50, 414–417 (1987).
Lenz, F. A. et al. Abnormal single-unit activity recorded in the somatosensory thalamus of a quadriplegic patient with central pain. Pain 31, 225–236 (1987).
Mazars, G., Merienne, L. & Cioloca, C. [Treatment of certain types of pain with implantable thalamic stimulators]. Neurochirurgie 20, 117–124 (1974).
Mazars, G., Merienne, L. & Ciolocca, C. [Intermittent analgesic thalamic stimulation. Preliminary note]. Rev. Neurol. (Paris) 128, 273–279 (1973).
Turnbull, I. M., Shulman, R. & Woodhurst, W. B. Thalamic stimulation for neuropathic pain. J. Neurosurg. 52, 486–493 (1980).
Richardson, D. E. & Akil, H. Pain reduction by electrical brain stimulation in man. Part 1: acute administration in periaqueductal and periventricular sites. J. Neurosurg. 47, 178–183 (1977).
Richardson, D. E. & Akil, H. Pain reduction by electrical brain stimulation in man. Part 2: chronic self-administration in the periventricular gray matter. J. Neurosurg. 47, 184–194 (1977).
Hosobuchi, Y., Adams, J. E. & Linchitz, R. Pain relief by electrical stimulation of the central gray matter in humans and its reversal by naloxone. Science 197, 183–186 (1977).
Boccard, S. G., Pereira, E. A. & Aziz, T. Z. Deep brain stimulation for chronic pain. J. Clin. Neurosci. 22, 1537–1543 (2015).
Sadtler, P. T. et al. Neural constraints on learning. Nature 512, 423–426 (2014).
Berenyi, A., Belluscio, M., Mao, D. & Buzsaki, G. Closed-loop control of epilepsy by transcranial electrical stimulation. Science 337, 735–737 (2012).
Bergey, G. K. et al. Long-term treatment with responsive brain stimulation in adults with refractory partial seizures. Neurology 84, 810–817 (2015).
Heck, C. N. et al. Two-year seizure reduction in adults with medically intractable partial onset epilepsy treated with responsive neurostimulation: final results of the RNS System Pivotal trial. Epilepsia 55, 432–441 (2014).
Morrell, M. J. & RNS System in Epilepsy Study Group. Responsive cortical stimulation for the treatment of medically intractable partial epilepsy. Neurology 77, 1295–1304 (2011).
Ajiboye, A. B. et al. Restoration of reaching and grasping movements through brain-controlled muscle stimulation in a person with tetraplegia: a proof-of-concept demonstration. Lancet 389, 1821–1830 (2017).
Taylor, D. M., Tillery, S. I. & Schwartz, A. B. Direct cortical control of 3D neuroprosthetic devices. Science 296, 1829–1832 (2002).
Hochberg, L. R. et al. Neuronal ensemble control of prosthetic devices by a human with tetraplegia. Nature 442, 164–171 (2006).
Hochberg, L. R. et al. Reach and grasp by people with tetraplegia using a neurally controlled robotic arm. Nature 485, 372–375 (2012).
Collinger, J. L. et al. High-performance neuroprosthetic control by an individual with tetraplegia. Lancet 381, 557–564 (2013).
Aflalo, T. et al. Neurophysiology. Decoding motor imagery from the posterior parietal cortex of a tetraplegic human. Science 348, 906–910 (2015).
Wenger, N. et al. Closed-loop neuromodulation of spinal sensorimotor circuits controls refined locomotion after complete spinal cord injury. Sci. Transl. Med. 6, 255ra133 (2014).
Wagner, F. B. et al. Targeted neurotechnology restores walking in humans with spinal cord injury. Nature 563, 65–71 (2018).
Anumanchipalli, G. K., Chartier, J. & Chang, E. F. Speech synthesis from neural decoding of spoken sentences. Nature 568, 493–498 (2019).
Shanechi, M. M. Brain–machine interfaces from motor to mood. Nat. Neurosci. 22, 1554–1564 (2019).
Grosenick, L., Marshel, J. H. & Deisseroth, K. Closed-loop and activity-guided optogenetic control. Neuron 86, 106–139 (2015).
Mickle, A. D. et al. A wireless closed-loop system for optogenetic peripheral neuromodulation. Nature 565, 361–365 (2019).
Turnbull, I. M. Bilateral cingulumotomy combined with thalamotomy or mesencephalic tractotomy for pain. Surg. Gynecol. Obstet. 134, 958–962 (1972).
Rainville, P., Duncan, G. H., Price, D. D., Carrier, B. & Bushnell, M. C. Pain affect encoded in human anterior cingulate but not somatosensory cortex. Science 277, 968–971 (1997).
Foltz, E. L. & White, L. E. The role of rostral cingulumotomy in ‘pain’ relief. Int. J. Neurol. 6, 353–373 (1968).
Qu, C. et al. Lesion of the rostral anterior cingulate cortex eliminates the aversiveness of spontaneous neuropathic pain following partial or complete axotomy. Pain 152, 1641–1648 (2011).
Johansen, J. P., Fields, H. L. & Manning, B. H. The affective component of pain in rodents: direct evidence for a contribution of the anterior cingulate cortex. Proc. Natl Acad. Sci. USA 98, 8077–8082 (2001).
LaGraize, S. C., Borzan, J., Peng, Y. B. & Fuchs, P. N. Selective regulation of pain affect following activation of the opioid anterior cingulate cortex system. Exp. Neurol. 197, 22–30 (2006).
Lubar, J. F. Effect of medial cortical lesions on the avoidance behavior of the cat. J. Comp. Physiol. Psychol. 58, 38–46 (1964).
Melzack, R & Casey, L. In The Skin Senses (eds Kenshalo, D. R.) 423–439 (Charles C Thomas, 1968).
Chen, Z., Zhang, Q., Tong, A. P., Manders, T. R. & Wang, J. Deciphering neuronal population codes for acute thermal pain. J. Neural Eng. 14, 036023 (2017).
Hu, S., Zhang, Q., Wang, J. & Chen, Z. Real-time particle filtering and smoothing algorithms for detecting abrupt changes in neural ensemble spike activity. J. Neurophysiol. 119, 1394–1410 (2018).
Zhang, Q. et al. Chronic pain induces generalized enhancement of aversion. eLife 6, e25302 (2017).
Lewin, W. & Whitty, C. W. Effects of anterior cingulate stimulation in conscious human subjects. J. Neurophysiol. 23, 445–447 (1960).
Buchel, C. et al. Dissociable neural responses related to pain intensity, stimulus intensity, and stimulus awareness within the anterior cingulate cortex: a parametric single-trial laser functional magnetic resonance imaging study. J. Neurosci. 22, 970–976 (2002).
Meda, K. S. et al. Microcircuit mechanisms through which mediodorsal thalamic input to anterior cingulate cortex exacerbates pain-related aversion. Neuron 102, 944–959 (2019).
Hutchison, W. D., Davis, K. D., Lozano, A. M., Tasker, R. R. & Dostrovsky, J. O. Pain-related neurons in the human cingulate cortex. Nat. Neurosci. 2, 403–405 (1999).
Sikes, R. W. & Vogt, B. A. Nociceptive neurons in area 24 of rabbit cingulate cortex. J. Neurophysiol. 68, 1720–1732 (1992).
Li, X. Y. et al. Alleviating neuropathic pain hypersensitivity by inhibiting PKMzeta in the anterior cingulate cortex. Science 330, 1400–1404 (2010).
Singh, A. et al. Mapping cortical integration of sensory and affective pain pathways. Curr. Biol. 30, 1703–1715 (2020).
Lee, M. et al. Activation of corticostriatal circuitry relieves chronic neuropathic pain. J. Neurosci. 35, 5247–5259 (2015).
Martinez, E. et al. Corticostriatal regulation of acute pain. Front. Cell. Neurosci. 11, 146 (2017).
Zhang, Z. et al. Role of prelimbic GABAergic circuits in sensory and emotional aspects of neuropathic pain. Cell Rep. 12, 752–759 (2015).
Hardy, S. G. Analgesia elicited by prefrontal stimulation. Brain Res. 339, 281–284 (1985).
Kiritoshi, T., Ji, G. & Neugebauer, V. Rescue of impaired mGluR5-driven endocannabinoid signaling restores prefrontal cortical output to inhibit pain in arthritic rats. J. Neurosci. 36, 837–850 (2016).
Dale, J. et al. Scaling up cortical control inhibits pain. Cell Rep. 23, 1301–1313 (2018).
Ji, G. et al. Cognitive impairment in pain through amygdala-driven prefrontal cortical deactivation. J. Neurosci. 30, 5451–5464 (2010).
Huang, J. et al. A neuronal circuit for activating descending modulation of neuropathic pain. Nat. Neurosci. 22, 1659–1668 (2019).
Cheriyan, J. & Sheets, P. L. Altered excitability and local connectivity of mPFC-PAG neurons in a mouse model of neuropathic pain. J. Neurosci. 38, 4829–4839 (2018).
Metz, A. E., Yau, H. J., Centeno, M. V., Apkarian, A. V. & Martina, M. Morphological and functional reorganization of rat medial prefrontal cortex in neuropathic pain. Proc. Natl Acad. Sci. USA 106, 2423–2428 (2009).
Vertes, R. P. Interactions among the medial prefrontal cortex, hippocampus and midline thalamus in emotional and cognitive processing in the rat. Neuroscience 142, 1–20 (2006).
Apkarian, A. V. et al. Chronic back pain is associated with decreased prefrontal and thalamic gray matter density. J. Neurosci. 24, 10410–10415 (2004).
Zhou, H. et al. Ketamine reduces aversion in rodent pain models by suppressing hyperactivity of the anterior cingulate cortex. Nat. Commun. 9, 3751 (2018).
King, T. et al. Unmasking the tonic-aversive state in neuropathic pain. Nat. Neurosci. 12, 1364–1366 (2009).
Decosterd, I. & Woolf, C. J. Spared nerve injury: an animal model of persistent peripheral neuropathic pain. Pain 87, 149–158 (2000).
De Felice, M. et al. Capturing the aversive state of cephalic pain preclinically. Ann. Neurol. 74, 257–265 (2013).
Navratilova, E. et al. Endogenous opioid activity in the anterior cingulate cortex is required for relief of pain. J. Neurosci. 35, 7264–7271 (2015).
Johansen, J. P. & Fields, H. L. Glutamatergic activation of anterior cingulate cortex produces an aversive teaching signal. Nat. Neurosci. 7, 398–403 (2004).
Xiao, Z. et al. Cortical pain processing in the rat anterior cingulate cortex and primary somatosensory cortex. Front. Cell. Neurosci. 13, 165 (2019).
Karim, F., Wang, C. C. & Gereau, R. W. T. Metabotropic glutamate receptor subtypes 1 and 5 are activators of extracellular signal-regulated kinase signaling required for inflammatory pain in mice. J. Neurosci. 21, 3771–3779 (2001).
Hu, H. J., Alter, B. J., Carrasquillo, Y., Qiu, C. S. & Gereau, R. W. T. Metabotropic glutamate receptor 5 modulates nociceptive plasticity via extracellular signal-regulated kinase-Kv4.2 signaling in spinal cord dorsal horn neurons. J. Neurosci. 27, 13181–13191 (2007).
O’Callaghan, J. P. & Holtzman, S. G. Quantification of the analgesic activity of narcotic antagonists by a modified hot-plate procedure. J. Pharmacol. Exp. Ther. 192, 497–505 (1975).
Cheppudira, B. P. Characterization of hind paw licking and lifting to noxious radiant heat in the rat with and without chronic inflammation. J. Neurosci. Methods 155, 122–125 (2006).
Kang, S. J. et al. Bidirectional modulation of hyperalgesia via the specific control of excitatory and inhibitory neuronal activity in the ACC. Mol. Brain 8, 81 (2015).
Langford, D. J. et al. Coding of facial expressions of pain in the laboratory mouse. Nat. Methods 7, 447–449 (2010).
Tappe-Theodor, A. & Kuner, R. Studying ongoing and spontaneous pain in rodents—challenges and opportunities. Eur. J. Neurosci. 39, 1881–1890 (2014).
Beric, A. et al. Complications of deep brain stimulation surgery. Stereotact. Funct. Neurosurg. 77, 73–78 (2001).
Alomar, S. et al. Speech and language adverse effects after thalamotomy and deep brain stimulation in patients with movement disorders: a meta-analysis. Mov. Disord. 32, 53–63 (2017).
Xiao, Z. et al. Ensembles of change-point detectors: implications for real-time BMI applications. J. Comput. Neurosci. 46, 107–124 (2019).
Chen, Z. Advanced State Space Methods for Neural and Clinical Data (Cambridge Univ. Press, 2015).
Eden, U. T., Frank, L. M., Barbieri, R., Solo, V. & Brown, E. N. Dynamic analysis of neural encoding by point process adaptive filtering. Neural Comput. 16, 971–998 (2004).
Hu, S., Zhang, Q., Wang, J. & Chen, Z. A real-time rodent neural interface for deciphering acute pain signals from neuronal ensemble spike activity. Proc. 51st Asilomar Conference on Signals, Systems and Computers 93–97 (IEEE, 2017).
Wang, J. et al. A single subanesthetic dose of ketamine relieves depression-like behaviors induced by neuropathic pain in rats. Anesthesiology 115, 812–821 (2011).
This work was supported by NIH grants R01-GM115384 (J.W.), R01-NS100065 (Z.S.C. and J.W.) and R01-MH118928 (Z.S.C.) and NSF grant CBET-1835000 (Z.S.C. and J.W.).
The authors declare no competing interests.
Peer review information Nature Biomedical Engineering thanks the anonymous reviewer(s) for their contribution to the peer review of this work.
Publisher’s note Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.
About this article
Cite this article
Zhang, Q., Hu, S., Talay, R. et al. A prototype closed-loop brain–machine interface for the study and treatment of pain. Nat Biomed Eng (2021). https://doi.org/10.1038/s41551-021-00736-7