Abstract
Chronic pain syndromes are often refractory to treatment and cause substantial suffering and disability. Pain severity is often measured through subjective report, while objective biomarkers that may guide diagnosis and treatment are lacking. Also, which brain activity underlies chronic pain on clinically relevant timescales, or how this relates to acute pain, remains unclear. Here four individuals with refractory neuropathic pain were implanted with chronic intracranial electrodes in the anterior cingulate cortex and orbitofrontal cortex (OFC). Participants reported pain metrics coincident with ambulatory, direct neural recordings obtained multiple times daily over months. We successfully predicted intraindividual chronic pain severity scores from neural activity with high sensitivity using machine learning methods. Chronic pain decoding relied on sustained power changes from the OFC, which tended to differ from transient patterns of activity associated with acute, evoked pain states during a task. Thus, intracranial OFC signals can be used to predict spontaneous, chronic pain state in patients.
Chronic pain syndromes pose a major healthcare problem and are leading contributors to disability worldwide1. Neuropathic pain syndromes such as post-stroke and phantom limb pain are particularly refractory to treatment and impose substantial suffering. A hurdle to a mechanistic understanding of chronic pain, and the development of effective diagnostics and therapeutics, is the lack of objective measures of pain severity or underlying neurophysiology. Of necessity, chronic pain is commonly measured by the individual’s subjective report, an interrogative approach limited by difficulties in quantitation, reliability and interindividual comparability. Objective biomarkers for chronic pain would greatly facilitate diagnosis and classification of pain pathophysiology, assist with disease prognostication or prediction of therapy response, and catalyze therapeutic development2,3.
Most previous attempts to identify pain biomarkers have focused on healthy participants and experimental thermal pain, which ignores natural, spontaneous fluctuations in individuals’ chronic pain experience4–7. Even studies of spontaneous chronic pain severity are limited by characterization over short timescales (minutes) due to reliance on ex vivo technologies such as electroencephalography7 and blood-oxygen-level-dependent functional magnetic resonance imaging8,9 that are not amenable to frequent, long-term measurement. Further, interpretation of blood-oxygen-level-dependent functional magnetic resonance imaging responses associated with chronic back pain is complicated due to inclusion of participants with heterogeneous sources of pain (for example, inflammatory, myofascial and neuropathic). It is unclear whether lessons learned from healthy human participants or mixed pain syndromes translate to individuals with chronic neuropathic pain over clinically relevant time periods. A growing body of evidence from humans and animals suggests that chronic pain processing engages the medial frontal cortex in a manner distinct from acute, thermal pain10–13.
Frontal brain regions harbor important signals that integrate the somatosensory, affective and cognitive dimensions of pain. The rostral anterior cingulate cortex (ACC) has been extensively implicated in affective/emotional processing related to both acute and chronic pain10,14 and proposed as a therapeutic stimulation target to treat chronic pain15. The orbitofrontal cortex (OFC) has rarely been studied in pain, but its reciprocal connections with the ACC and many other regions in the functional pain network such as the amygdala, insula and ventral striatum16,17 make it well positioned to influence pain perception. Functional imaging has revealed increased OFC activity in response to multimodal sensory stimuli during tasks requiring the integration of bodily signals to guide behavior (for example, interoception)18,19, reversal learning and pain expectation related to monetary reward20. Direct recordings from the OFC have confirmed key signals that track internal deliberation of reward choices21 and OFC stimulation can improve mood state in depressed patients22. Other studies have identified the ventromedial prefrontal cortex, a region overlapping with definitions of OFC, as an important region associated with interindividual variability in acute pain perception23 and negative affective responses to multimodal stimuli24. Specific coactivation of the dorsal ACC and OFC is seen both during opioid consumption and in response to placebo analgesia25, implicating these regions in myriad functions ranging from sensory perception and expectation to cognitive flexibility and mood regulation. While long-distance connections between the ACC/OFC and subcortical structures may support plasticity underlying chronic pain, signals from either brain region alone may be sufficient to track pain state. It remains an open question whether previous studies of chronic back pain due to heterogeneous pain generators generalize to true neuropathic pain states or is reflected in direct brain activity in vivo. Therefore, we targeted two relatively less-studied, non-somatosensory brain regions as part of a larger deep brain stimulation (DBS) clinical trial. We hypothesized that neural activity from the ACC or OFC may provide an integrated biomarker of the subjective experience underlying chronic pain severity. To our knowledge, long-term direct brain measurement of chronic pain-related neural activity has never been done.
By studying brain biomarkers with high resolution across both short (sub-second) and long (months) timescales in humans, we aimed to develop a sensitive test of high pain states and study the neurophysiologic basis of spontaneous chronic pain. Such insights potentially bring new clarity to pain biology and help to inform personalized treatments such as tailored closed-loop DBS therapies for chronic pain26,27. We collected pain reports and intracranial recordings in the ambulatory setting using a novel bidirectional brain implant (Medtronic Activa PC + S) in four human participants with long-standing refractory, chronic neuropathic pain over 3–6 months. These are first-in-human chronic in vivo neural recordings of key pain-related cortical regions8,14, the ACC and OFC. We analyzed local field potentials (LFPs) with machine learning to develop personalized neural signatures for chronic pain severity and characterize the relative feature importance from each brain region. By comparing brain-based signatures for spontaneous, chronic pain with signatures derived for acute, evoked thermal pain, we identify distinct neural substrates for each. Brain biomarkers of chronic pain reflected sustained changes in neural power features that tended to rely more on the OFC, which only generalized to the acute pain condition within one participant. Acute pain decoding tended to reflect greater contributions from the ACC with more frequent, transient changes in power. Biomarker decoding was superior for current versus recent changes in pain state and largely stable over time. These data demonstrate that spontaneous, chronic pain states can be predicted from direct brain activity over ecological timescales in the ambulatory setting.
Results
Longitudinal pain-state tracking
Each participant provided pain score reports multiple times daily (range 2–8/d) over a range of 78–184 d (mean 320 reports/participant; Supplementary Table 1). All participants reported 11-point pain intensity using a numerical rating score (NRS; 0–10), while two participants (CP3 and CP4) also provided pain intensity via a visual analog score (VAS), the short-form McGill Pain Questionnaire (SF-MPQ) and pain unpleasantness (NRS and VAS). Pain NRS values were high for all participants (mean ± s.d., 7.8 ± 0.9), and all ratings exhibited fluctuation exceeding established minimal clinically important differences (MCID for SF-MPQ > 5 (ref. 28), NRS > 2 (ref. 29), VAS > 1.6; Fig. 1b,c). To assess the internal validity of pain score reporting, we computed Pearson’s correlations between VAS and NRS for pain intensity and unpleasantness, which were highly correlated within participants (Figure 1d; R2 range 0.84–0.96). We evaluated periodicity in chronic pain fluctuation by computing an autocorrelation for each participant’s pain NRS (Fig. 1e). While all participants showed diurnal cycles in their pain states, we also observed clinically significant multidien cycles of pain fluctuation, with two participants exhibiting pain fluctuation nearly every 3 d (72 h, CP1 and CP3).
Cross-validated decoding of chronic pain state
To identify biomarkers of chronic pain state, we used ambulatory, intracranial LFP recordings from the ACC and OFC (Fig. 2a,b) to build models decoding participants’ pain severity scores. Candidate biomarkers consisted of spectral power in frequency bands of interest, which showed no clear trend over time to suggest non-neural changes in recordings (Supplementary Fig. 1). We first tried predicting exact reported pain metrics using cross-validated multivariate least absolute shrinkage and selection operator (LASSO) regression on neural band-power data (Supplementary Fig. 3). First, we created subregion decoding models using band-power values sub-selected from individual brain regions and/or hemispheres and full models using all available data (that is, bilateral ACC/OFC; Fig. 2c,d). For participants with bihemispheric electrode implants (CP2–4), there were nine possible subregion models through possible combinations of contralateral, ipsilateral or both hemispheres (relative to side of pain) from the ACC, OFC or both regions. Overall regression-based prediction showed mixed results (Supplementary Fig. 3), often poor but at other times comparable to classification (below). Regression of NRS pain intensity was poor in all participants with multivariate coefficients of determination (R2) between observed versus predicted scores ranging from −0.2 to 0.1 across all subregion and full models. LASSO regression performance on the alternative metrics of pain intensity VAS and unpleasantness NRS in two participants showed R2 values as high as 0.3 (CP4). Even an R2 value of 0.18 (CP3 VAS) is equivalent to a Pearson’s r = 0.42, a moderate effect size which corresponds a binary classification area under the curve (AUC) = 0.74 assuming normally distributed, equal samples30. Notably, regression performed well when predicting MPQ in two participants, as evidenced by many values of R2 > 0.7 (CP4). In summary, regression models performed moderately at best, when predicting pain intensity (NRS or VAS), but fared better for other pain metrics. Specifically for tracking pain intensity, these results may further support previous observations that a forced choice between low versus high pain states may be more pragmatic for clinical application6.
To investigate the role of different cortical circuits in a forced-choice framework, we turned our attention to predicting dichotomized pain scores (high versus low divided by median). Using cross-validated linear discriminant analysis (LDA; Methods) with at least one subregion model, dichotomized chronic pain NRSs could be classified in all participants (Fig. 2d,e, highest LDA AUCs (P value), and Supplementary Fig. 4): 0.673 (0.016), 0.851 (0.001), 0.721 (0.001), 0.802 (0.001) for CP1–CP4, respectively. Ranges for chronic pain NRS decoding statistics were as follows: positive predictive value 0.83–0.93, sensitivity 0.62–0.84 and specificity 0.56–0.82 (Supplementary Table 2). In three participants, the best decoding performance resulted from either full models or combining ACC and OFC activity in either hemisphere. Overall, chronic pain state could be significantly decoded across all participants using contralateral OFC alone. Misclassified pain states were distributed across timepoints spanning months and the range of pain scores (that is, not only near the dichotomized boundary), confirming robustness of prediction (Supplementary Fig. 5). Decoding and biomarkers appeared stable over time. Compared to the leave-one-out cross-validation (LOOCV) method (which leaves out power values and pain score class associated with one recording clip at a time), we observed better performance when we trained LDA pain NRS models on the first 70% of data and tested on the remaining 30% with AUCs near 0.9 in all but in one participant (CP1), with the fewest number of recordings (Supplementary Fig. 6). This suggests stability in the biomarkers tracking pain intensity NRSs over the timescale of months.
To test performance of an independent method (linear state space model, LSSM) that may be used to flexibly guide brain stimulation, we used full models (Supplementary Fig. 7) to predict pain intensity NRSs. LSSM had similar performance to LDA in all participants except CP1. Moreover, two participants reported additional pain metrics including pain intensity VAS, pain unpleasantness NRS/VAS and SF-MPQ. Full models could significantly decode these pain metrics using both LDA and LSSM (Supplementary Figs. 4, 5a, 7 and 8) except for CP3 unpleasantness VAS using LSSM. Using LDA, SF-MPQ decoding showed equally high performance using either the full model or contralateral OFC/ACC subregion model (AUC (P value) CP3 = 0.623 (0.004); CP4 = 0.995 (0.001)), with positive predictive values ranging from 0.77 to 0.99 (Supplementary Table 2). Further, using single region LDA models for classification of chronic pain unpleasantness NRS, a measure of the affective dimension of pain, showed the highest AUCs for data from contralateral ACC (AUC 0.69 (CP3) and 0.84 (CP4)) as expected.
By visualizing the normalized, mean LDA feature weights supporting successful LDA decoding (Fig. 2e), we observed that the most important power features varied across participants. Despite this variability, a single brain region was sufficient to track chronic pain states in each participant, with contralateral OFC being common across all participants.
It is possible that neural features may track the relative fluctuation of pain, rather than the current pain state. To test for this possibility, we constructed regression and LDA models of successive pain score differences (that is, prior pain score subtracted from current pain score; Supplementary Fig. 9a,b). Dichotomizing these difference values by those equal to zero (no change) versus those that were non-zero (increasing or decreasing) may identify neural activity distinguishing stable versus fluctuating pain states. Classification of stable versus fluctuating pain NRSs was broadly significant only in one participant (CP4). Consistent with previous results8, we observed that stable versus changing pain scores in two participants (CP2 and CP3) could be distinguished only when models included neural signals from ACC. All LDA model AUC values were inferior to contemporaneous pain-state prediction (Supplementary Fig. 9a). Further, regression of pain NRS difference was poor across participants (R2 range −0.2 to 0.1) and alternative pain metric regression (for example, VAS) was not successful except for unpleasantness NRS and VAS each in one participant (Supplementary Fig. 9b). The failure of regression to robustly predict increases or decreases in sequential pain scores over many hours may imply that ACC and OFC harbor weak signals for prediction errors over these timescales or that subjective pain experience is integrated over shorter historical durations than many hours. Therefore, while LFPs from the ACC and OFC may contain information relevant to recent changes in pain, the current chronic pain experience appears to be more reliably represented across participants and pain-related metrics compared to pain fluctuations.
Cross-validated decoding of acute pain state
To compare with neural mechanisms supporting chronic pain, we next sought to identify biomarkers of acute, experimental thermal pain state. Brain recordings and pain ratings were collected while participants participated in quantitative sensory testing (Fig. 3a). Background chronic pain ratings just before the acute task were equivalent to the mode of participants’ reported scores (participants CP1–4 and NRS 9, 8, 7 and 8/10, respectively; compare to Supplementary Table 1). Heat stimuli at five different temperatures, calibrated for each participant, were applied with a thermal probe to the most painful region on the side of the body affected by chronic pain (aff-ACUTE) and the same body part on the unaffected side (unaff-ACUTE) for five trials per target temperature; pain intensity NRS was reported 3 s after target temperature was reached (Fig. 3b–d). Participants were extensively trained on the task to avoid potential reporting confounds with respect to usual chronic pain (Methods). Subregion LDA models demonstrated significant prediction of high versus low acute pain in the aff-ACUTE condition in two participants, only when trained on data including ACC (CP1 AUCLDA = 0.738, P = 0.045; CP2, AUCLDA = 0.74, P = 0.037; Fig. 3e and Supplementary Fig. 10). Given unsuccessful decoding from any models trained on OFC alone, these data may suggest preferential involvement of ACC in circuits harboring acute pain signals. Tested models could not significantly predict acute pain in the unaff-ACUTE condition (Fig. 3f). In contrast to acute pain metrics on the affected side, we found no significant decoding of the actual delivered temperature on the affected side in any participant (Supplementary Fig. 11). One participant (CP4) showed significant decoding of temperature when applied to the unaffected side.
Again, key neural features supporting acute pain-state prediction varied between the two participants in whom decoding was possible, with the highest magnitude feature weight coming from the ACC for each (CP1 contra ACC alpha, CP2 contra ACC beta; Fig. 3g). Notably, features supporting acute pain decoding visually differed from those supporting chronic pain (compare to Fig. 2e). If neural features that drive decoding of chronic pain state are similarly important for supporting acute pain decoding, full LDA models trained on the former should perform well when tested on data from the latter. We only observed such generalization from chronic to acute pain in one participant (CP2) who did not have a preexisting brain lesion (Supplementary Fig. 12). The lack of such generalization between acute and chronic pain representation in the remaining three participants suggests distinct neural codes in the ACC and OFC in these participants.
ACC and OFC distinguish acute and chronic pain states
The extent to which neural representations of chronic pain and acute pain states resemble one another is a major gap in knowledge. One way to gain additional insight into associated neurophysiologic mechanisms underlying chronic versus acute pain is to compare the importance of neural features driving prediction of each pain type. We assessed the relative importance of OFC versus ACC by subtracting each normalized ACC feature weight from the corresponding normalized OFC feature weight to obtain a distribution of feature importance differences; this difference distribution was then compared to a permuted, null distribution to assess if activity from the OFC or ACC was more important to pain decoding than by chance (see ‘LDA feature importance’ and Fig. 4a,b). Values greater than 0 indicate greater OFC importance. We observed that the OFC was more important than the ACC to chronic pain NRS decoding in a greater proportion of all features for three participants (OFC proportion of significant features: CP1 = 100%, CP3 = 75%, CP4 = 58%). Common for all participants, contralateral OFC delta power was consistently more important than contralateral ACC delta power to decoding chronic pain NRS (Wilcoxon rank-sum tes, z = 13–36.3, P = 10−6). In contrast, for acute pain decoding in two participants, the ACC appeared more important than the OFC for a greater proportion of all significant features when compared to chronic pain (Fig. 4b; acute versus chronic pain ACC proportion: CP1 = 100% versus 0%, CP2 = 64% versus 58%). Because feature importance for acute pain was only assessed in two participants showing successful acute pain decoding, caution is advised in interpretation due to low participant numbers.
Neural time dynamics distinguish acute and chronic pain
We next sought to characterize the temporal dynamics of these power bands by analyzing patterns of power changes at short-term (seconds, within a recording) and long-term (diurnal, across recordings) scales. Chronic and acute pain decoding model features consisted of band-pass filtered power, averaged by time over the duration of the recording clip (30 s for chronic, 3 s for acute), which variably showed increases or decreases associated with predicting a ‘high pain’ state (Figs. 2e and 3g).
It is possible that if a feature was important to ‘high pain’ decoding, power changes may be associated with either transient or sustained changes within specific frequency bands over time or some combination of the two. To distinguish these possibilities, we calculated the power time series of each feature over the duration of the recording clip and averaged among clips in the high versus low pain groups (Fig. 5a and Supplementary Fig. 13). This analysis provides an impression of how average power associated with high or low pain fluctuates in real time. As expected, we observed that if a feature weight was positive or negative (Figs. 2e and 3g), then that feature’s average power was respectively increased or decreased over time during high pain states, compared to low pain states (Fig. 5a and Supplementary Fig. 13). For example, a negative-signed feature weight for contralateral OFC delta indicates that the contralateral OFC delta power was concordantly decreased during high pain states. Across each 30-s recording clip for chronic pain decoding, the total power amplitude maintained this concordant relationship 76% of the time (group mean ± s.d. = 22.8 ± 6.2 s; Fig. 5b) across all participants. Although we observed fluctuations in the power values over the 30-s duration, the top five power features were associated with sustained changes lasting a mean of 4.4 s (±8.8 s.d.) above or below the low pain-state average. We rarely observed transient bouts of fluctuation among chronic pain features, suggesting that temporal dynamics in decoding features reflected sustained oscillations relevant to ongoing perceived pain.
Despite a shorter 3-s recording clip duration for acute pain trials, we observed that power increases and decreases occupied a similar total proportion of recording clip time for both acute and chronic pain features (76.4% of total time acute versus 76% chronic; acute group mean ± s.d. = 2.1 s ± 0.3 s, rank sum P > 0.08; Fig. 5b). In contrast to chronic pain; however, the top five acute pain features showed more temporal variability with more transient bouts of fluctuation lasting an average of 0.56 s (s.d. = 0.18 s, rank sum P < 10−14; Fig. 5c). Notably, we rarely observed such bouts of increases or decreases approaching 3 s, which was the theoretical upper limit given acute recording duration of 3 s. Because these bouts of power increases or decreases occurred for a similar proportion of recording clip duration for chronic and acute pain data, we expected that the more transient bouts would occur more frequently for acute pain features. As expected, acute pain features showed many more frequent bouts of increases or decreases compared to chronic pain features (acute = 1.3 ± 0.29 bouts per second versus chronic = 0.23 ± 0.18, rank sum P < 10−19; Fig. 5d). Therefore, compared to chronic pain, the top five acute ‘high pain’ biomarkers exhibited shorter, more frequent bursts of power changes, resulting in a similar total percentage of time with increases or decreases between high and low pain states.
To characterize longer timescale dynamics of chronic pain neural features, we performed a diurnal analysis by organizing both pain scores and neural features by time of day of report and resampling this diurnal pattern at a 3-h time resolution to model diurnal fluctuations (Methods, Supplementary Fig. 14 and Supplementary Table 3). We did not observe significant correlations between the diurnal trends of neural features and of pain NRS for any feature, in any participant. Overall, chronic pain decoding was associated with sustained power changes over time, distinct from more transient bursts of power changes supporting acute pain decoding. Diurnal time dynamics of neural features did not appear grossly related to diurnal fluctuations in pain metrics, suggesting a possible importance for short timescales in encoding subjective pain states.
Discussion
Objective biomarkers of spontaneous chronic pain severity are requisite for understanding basic mechanisms of clinically relevant pain, diagnosing pain syndromes, prognosticating disease course and devising new therapies. Using first-in-human long-term, ambulatory, intracranial recordings in four participants with chronic, neuropathic pain, we used LFP signals from the ACC and OFC to predict various measures of chronic pain severity, with high sensitivity. While we could predict dichotomized pain state using two different methods, regardless of pain etiology, duration of symptoms or nervous system lesion, prediction of continuous metrics using regression was not as successful. Chronic pain biomarkers appeared stable over months in three of four participants and were more predictive of current pain state rather than recent transitions in pain report. In two participants, we could also predict acute, evoked thermal pain during an experimental heat pain task. We observed that chronic pain decoding tended to rely more on activity in the OFC (for example, contralateral OFC delta) as evidenced by OFC subregion models and greater OFC feature weights across participants. Acute pain decoding was supported more by ACC activity. Finally, the time course of neural activity supporting chronic pain decoding reflected sustained increases or decreases in power in the order of seconds, while acute pain decoding was associated with more frequent and transient changes in power. These results provide a proof of principle that signals from key neural hubs can be used to track clinically relevant chronic pain states in humans and have important implications for understanding circuit mechanisms underlying the chronification of pain.
While a complex neural network underlies the maintenance of chronic pain states17,31, we found that activity from either ACC or OFC alone was sufficient to track pathological network activity underlying chronic pain fluctuation. Previous neuroimaging studies of chronic back pain established the importance of the ACC and medial prefrontal cortex32,33, although notably failed to identify a role for the OFC, possibly due to sparse time resolution of up to 4 visits over 1 year. Consistent with prior studies of spontaneous, chronic back pain measured over seconds to minutes in a single visit, we observed that ACC activity in three participants could discriminate when spontaneous pain was stable versus fluctuating8,12. The present findings suggest that signals in the OFC can track current chronic pain severity for neuropathic pain syndromes such as central post-stroke pain (CPSP) or phantom limb pain. In the context of previous studies supporting a broad role of the OFC in reward, punishment and the placebo effect18,25, OFC circuits may integrate pain expectation and context-dependent predictions that influence subjective pain evaluation, which may include rumination or engagement of coping mechanisms. Areas we indicate as OFC in this study also overlap with prior definitions of ventromedial prefrontal cortex, which has been associated with interindividual variability in pain perception and aversiveness23,24. In two participants with CPSP, decoding of pain unpleasantness was driven more by ACC activity, also consistent with prior roles of ACC circuits in affective14,34 dimensions of pain processing. However, the preferential importance of ACC in acute pain decoding (which is described as having a smaller affective component than chronic pain states) challenges prior concepts of a medial pain pathway35 from the medial thalamus to ACC as selective for affective processing11.
In contrast to the spontaneous and enduring phenomenology of chronic pain, acute thermal pain administered to patients reflects a transient, externally evoked pain experience. In two participants, acute, evoked pain was associated with distinct spatiotemporal activation patterns consisting of transient power fluctuations biased toward ACC. This observation is consistent with numerous imaging studies showing the ACC as a key node activated with experimental pain stimuli across individuals4,6,12,23,36. Transient bursts of power among cingulate neurons may reflect facilitation of nociceptive hypersensitivity by recruitment of descending serotonergic projections to the spinal cord11 or ascending information flow from the medial thalamus37. Although most participants exhibited thermal allodynia, the transient power change patterns underlying acute pain decoding in the current study were found in two participants (both women): one with severe allodynia and hyperpathia (CP1) and one with a normal neurological sensory exam (CP2), which may suggest preserved information processing mechanisms across disparate phenotypes. However, within-participant generalization of chronic to acute pain biomarkers was only found in one participant with phantom pain (CP2), without an ischemic brain lesion, suggesting that more robust models that directly incorporate acute versus chronic pain classes may potentially aid in discriminating pain syndrome subtypes or reflect cortical reorganization after a lesion33. As acute, evoked pain was only decodable when the painful stimulus was applied to the same body side as ongoing chronic pain, the absence of evidence of successful decoding should not be interpreted as evidence of absence, possibly due to sample size of participants, trial number or environmental context (for example, at-home versus in-clinic testing).
Global cerebral pain networks in all participants likely underwent rewiring over many years living with chronic pain32. Still, ongoing ‘background’ chronic pain may have influenced acute pain perception even in the unaffected body side (see Methods for testing precautions used). Rather, the inability to decode acute pain in the unaffected side may suggest that the ACC and OFC are either sensitive to pain on one side of the body or perhaps more sensitive to representing pain in body regions where chronic pain is ongoing. It is possible that an acute pain signal may be detectable in the OFC if a task explicitly requires decision-making or pain anticipation components as seen in prior studies38. If the contributions of ascending versus descending pathways to acute versus chronic pain processing can be elucidated in future studies, this would help to explain the common clinical observation that the chronic pain experience is not simply a more enduring version of acute pain.
Classical models of the role of neural oscillations propose that frequency-specific activity serves to flexibly route information flow through networks to support selective attention39 and working memory40. Oscillations within a particular brain region may represent modulation of postsynaptic excitability, which itself impacts input gain39. The present observation that chronic pain intensity was associated with sustained increases or decreases in OFC power may therefore reflect maladaptive plasticity or changes in excitation/inhibition41 between the OFC and afferent primary sensory cortices, magnocellular cells of the medial thalamus or reciprocal connections with the ACC18 to perpetuate pathological sensory integration. In contrast, transient burst-like oscillatory activity associated with acute pain intensity may reflect stochastic packets reflecting fast computations42 between ascending medial thalamic inputs or descending rostral brainstem outputs supporting allodynia or evoked pain. Similar transient ‘high current spikes’ in rodent ACC have been observed to shift to more transient states in response to acute noxious stimuli and more sustained spiking states in a rodent model of post-stroke pain37. We further speculate that transient burst-like power changes may support aberrant sensory, affective and cognitive integration in chronic pain in a manner analogous to how pathological beta bursting influences motor processing in Parkinson’s disease43. Of note, because our decoder inputs consisted of time-averaged power values, it is unlikely that these disparate temporal dynamics were responsible for the lack of generalization between acute and chronic pain we observed here.
Although we could reliably predict multiple metrics of chronic pain severity when scores were dichotomized into ‘high’ and ‘low’ categories, prediction of exact pain scores with linear regression faired relatively poorer for metrics tracking pain intensity. One reason for this may be that subjective pain perception is psychophysically non-linear44, in a manner that binarization may better capture45. Binary classification yielded high sensitivities across participants, which is crucial for practical diagnostic or therapeutic biomarkers. Consistent with prior suggestions3, such a binary biomarker could be more useful for diagnosis or disease classification, while continuous measures or grading scales may be more useful for assessing treatment response. Future analysis of neural signatures that predict treatment response would lend further insights to basic pain mechanisms.
Three of four participants suffered from CPSP, due to ischemic brain injuries acquired greater than 2 years before data collection. Despite potential concern that a previous stroke may have induced brain plasticity specifically related to stroke symptoms, all participants had stable symptoms and physical exams over the study period. While OFC activity was sufficient to decode chronic pain in these participants despite varying locations of ischemic infarcts or stable use of various pain medications, in many cases activity from the ACC also performed as well. Given the small sample size of the present study, and idiosyncratic decoding observations in acute pain from 1–2 participants, caution must be used to avoid overinterpretation. Further studies are required to establish greater confidence in the specificity of the OFC for chronic pain prediction across larger groups.
A further limitation of the current study is that rather than directly predicting pain state per se, it is possible that machine learning models may be predicting other variables strongly correlated with reported pain metrics such as arousal or attention. However, as the adaptive value of pain may be to alert the organism to impending tissue damage, arousal effects may be a fundamental component of the complex subjective perception of pain itself. Further, in the diurnal analyses, we found many nonsignificant correlation values with large effect size (r > 0.5). Because we did not explicitly quantify Bayes’ factors related to the null hypothesis, the absence of evidence should not be interpreted as evidence of absence for a particular effect, particularly in cases of nonsignificant model results where the effect size may be high.
The development of personalized pain biomarkers will be central to accurate diagnosis, tracking prognosis and for future therapeutic drug and device development. Individualized biomarkers are also critical to the growing field of adaptive neurostimulation, where a participant’s ongoing neural activity may be used to control therapeutic brain stimulation46. Personalized biomarkers of chronic pain state may be used as input signals in real time, to control the amplitude or frequency of therapeutic electrical brain stimulation for treating refractory pain as they have for movement disorders. By adaptively delivering intermittent bouts of stimulation or adjusting parameters based on pain-state biomarkers, it may be possible to mitigate known effects of adaptation and loss of efficacy demonstrated in nearly all open-loop continuous DBS paradigms. It remains to be seen if similar signals may be non-invasively recorded using electroencephalography to track disease state or inform drug development.
Online content
Any methods, additional references, Nature Portfolio reporting summaries, source data, extended data, supplementary information, acknowledgements, peer review information; details of author contributions and competing interests; and statements of data and code availability are available at https://doi.org/10.1038/s41593-023-01338-z.
Methods
General trial methods
This current study was undertaken as part of an ongoing multiyear clinical trial aimed at developing closed-loop control algorithms for DBS to treat chronic neuropathic pain. The clinical trial protocol (NCT03029884) was approved by UCSF Human Research Protection Program (IRB) and the Food and Drug Administration (FDA).
Inclusion and exclusion criteria were:
Inclusion criteria.
Age ≥ 21 years
Clinical diagnosis of post-stroke pain (thalamic pain), spinal cord injury or phantom limb pain with allodynia or dysesthesia with pinprick anesthesia or hypoesthesia on the affected hemi-body or limb (anesthesia dolorosa).
For post-stroke pain: stroke of ischemic etiology only. MRI done within 1 year of surgery showing a lesion that involves the contralateral brainstem, thalamus or cortex. The lesion involves cortical–subcortical areas in topography consistent with sensory thalamocortical connections. This will include participants with infarcts in the territory of the middle cerebral artery. A more recent MRI may be required if the participant’s condition changed within the previous year.
For phantom limb pain: MRI done within 1 year does not show any contraindication to surgery such as mass, lesion, hemorrhage or other abnormality near target.
For spinal cord injury pain: MRI done within 1 year does not show contraindication to surgery such as mass, lesion, hemorrhage or other abnormality near target.
One year or more of medically refractory severe pain (see below).
Average daily pain for the past 30 d reported as >5 on a 0–10 NRS.
Failure to respond adequately to at least one antidepressant, one anti-seizure medication and one oral narcotic with current stable doses of medications.
Ability to speak/read English.
Capable of understanding and providing informed consent.
Stable doses of pain medications (for example, anticonvulsant drug, antidepressants and opioids) for at least 30 d.
Women of childbearing age must regularly use an accepted contraceptive method(s).
Exclusion criteria.
Pregnancy or breastfeeding.
Inability to speak and/or read English.
Inability to give informed consent.
Significant cognitive impairment or dementia (MoCA < 25).
Aphasia severe enough to limit the consent process or communication between the investigators and the participant. Participants with mild or recovering aphasia may be considered candidates at the discretion of the Principal Investigator (PI).
Recommendation of exclusion by evaluating psychiatrist based on comprehensive neuropsychological evaluation, which may include: active depression (Beck Depression Inventory > 20) or other untreated or uncontrolled psychiatric illness (active general anxiety disorder, schizophrenia, bipolar disorder, obsessive–compulsive disorder or personality disorders (for example, multiple personality disorder and borderline personality disorder).
Suicide attempt within the previous 12 months or imminent suicide risk.
History of substance abuse in the previous 3 years.
Major medical comorbidities increasing the risk of surgery including uncontrolled hypertension, severe diabetes, major organ system failure, history of hemorrhagic stroke, need for chronic anticoagulation other than aspirin, active infection and immunocompromised state or malignancy with <5 years life expectancy.
Inability to stop Coumadin (warfarin) or platelet anti-aggregation therapy for surgery and after surgery. Participants taking these medications will need to discuss the need/risk of continuing these medications with their physicians, and the PI or study personnel may contact the treating physician(s) as well to discuss the risks of anticoagulation/anti-aggregation therapy discontinuation.
Coagulopathy. Participants will be excluded unless assessed and cleared by hematology.
MRI (done within 1 year of surgery) showing significant abnormalities other than those associated with the neurological disorder causing chronic pain.
Implantable hardware not compatible with MRI or with the study.
Inability to comply with study follow-up visits.
Previous ablative intracranial surgery for the management of thalamic pain syndrome.
Previously implanted with DBS system or any previously implanted device treatment involving brain stimulation.
Major neurological disorder other than the one that led to the chronic pain including epilepsy, neurodegenerative condition or any history of seizure.
Requires diathermy, electroconvulsive therapy or transcranial magnetic stimulation to treat a chronic condition.
Has an implanted electronic device such as a neurostimulator, cardiac pacemaker or medication pump.
Allergies or known hypersensitivity to materials in the Activa PC + S system (that is, titanium, polyurethane, silicone, polyetherimide and stainless steel).
Pregnancy or lack of regular use of contraceptives. Participants who become pregnant after enrollment may be excluded from the study. Participants who become pregnant before the surgical implantation of the DBS systems will be excluded from the study.
Participants may be excluded from enrollment due to a condition that, in the judgment of the PI, significantly increases risk or reduces significantly the likelihood of benefit from brain stimulation.
Participants
Four right-handed participants (CP1–4) with refractory neuropathic pain limited to one side of the body for >1 year were enrolled in an ongoing study to devise adaptive brain stimulation for pain. Three participants had post-stroke pain and one had phantom limb pain (Fig. 1a and Supplementary Table 1). Half were women and the mean (±s.d.) age was 58.5 ± 3.1 years; all were free from untreated depression, recent substance use disorder and cognitive impairment. All participants maintained constant doses of medications for 3 months. Each participant signed written informed consent and the study was approved by both FDA under an Investigational Device Exemption and UCSF Committee on Human Research. Participants were reimbursed for travel and accommodation but not otherwise compensated.
Brief participant descriptions.
See Supplementary Table 3 for task-related temperature calibration quantitatively reflecting allodynia.
CP1.
Woman aged 58 years old with a history of CPSP syndrome, after right middle cerebral artery infarct in 2013. Approximately 12 weeks after her stroke, she began having sharp, burning, stabbing pain in the left hemi-body from her head to foot, most severely concentrated over the left hand/arm and leg. A pain-focused neurological exam was notable for hemiparesis in the left arm and leg, with reduced sensation to light touch and temperature along the whole left arm, ankle and foot. She experienced dynamic mechanical, cold and heat allodynia with symptoms of hyperpathia involving the spatial spread of lingering pain in response to rapidly repeated stimuli (interval <3 s).
CP2.
Woman aged 63 years old with elective above-the-knee amputation of the right leg in 2016 (for pain) and refractory phantom limb pain with right leg, calf and foot pain involving burning and pressure sensation. Her leg pain began 4.5 years before enrollment resulting from compartment syndrome as a complication from total knee arthroplasty. A pain-focused neurological exam was normal, with no stump pain nor evoked sensations on palpation of the stump (negative Tinel’s sign). She did not have sensory loss, weakness or allodynia.
CP3.
Man aged 56 years old with history of hypertension and left thalamic infarct in 2014, with persistent CPSP involving the right-sided face, arm and leg. Beginning 5 d after stroke, he developed severe burning pain associated with dysesthesias of the right bicep, forearm and leg. A pain-focused neurological exam showed intact motor and sensory function with notable hyperalgesia and allodynia in the right arm and leg. Allodynia was confined to cold and heat allodynia, with minimal mechanical allodynia.
CP4.
Man aged 59 years old with history of prostate cancer (no current disease), a solitary episode of atrial fibrillation and CPSP after left posterior cerebral artery infarct in April 2017. Approximately 6 weeks after his stroke, he began having burning and stabbing pain in the right arm as well as the right ankle which progressed to involve the entire right hemi-body after 1 year. A pain-focused neurological exam was notable for mild hemiparesis in the right arm, with intact sensation to light touch and temperature all over. There was dynamic mechanical, cold and heat allodynia in the right arm (worst distal to the elbow circumferentially) and leg (worst below mid-calf on the right including whole ankle and foot).
Device implant surgery
All participants underwent chronic intracranial electrode and neurostimulator implant targeting the ACC and OFC using Medtronic electrodes connected to the Activa PC + S device26 (bilateral in three participants, unilateral in CP1 contralateral to side of pain). Multielectrode leads targeted the dorsal ACC (models 3389/3387) and subdural surface of the OFC (paddle nos. 3587A/0930A) using frame-based stereotaxy under general anesthesia. Individual trajectories were determined using neurosurgical mapping software from BrainLab and Medtronic Stealth 8.0 based on preoperative 3T MRI scans (Supplementary Fig. 1).
For the dorsal ACC, target locations for each electrode tip were determined by computing diffusion tractography images (55 directions) and identifying the cingulum bundle in a region 20–25 mm posterior to the anterior border of the lateral ventricle (Supplementary Fig. 1 and Supplementary Methods) as in a previous study34. For the OFC, a burr hole was made through the temporal bone to allow passage of the paddle lead to the subdural surface. We targeted both medial and lateral OFC, areas that overlap with definitions of the ventrolateral medial prefrontal cortex in other studies. Electrodes were advanced through frontal burr holes, with correct placement confirmed by intraoperative computed tomography (CT) and reconfirmed by CT at the 2-month visit. Stim-loc devices were used for electrode lead anchoring, with a strain relief loop anterior to the site of anchoring to prevent movement or torque on the lead over time. The free ends of the leads were then placed in a subgaleal pocket, created by blunt dissection in the parietal area. A lead extender was tunneled subcutaneously between the parietal incision and a 5-cm incision over the pectoralis muscle, where a pocket was bluntly dissected for the Activa implantable neurostimulator system. A small amount of Medtronic medical glue was applied to the junction of the lead and each barrel of the implantable neurostimulator to mitigate electrical cardiac artifacts. Participants had at least 10 d of recovery before neural data collection began.
Electrode localization and brain imaging
Electrode (depth and paddle electrocorticography (ECoG)) contact locations were reconstructed using a CT scan taken 2–3 months after implantation and fused with the preoperative T1-weighted volumetric MRI. The T1 MRI was used to construct cortical surface models in FreeSurfer (version 7.1.1)47,48. We projected ECoG contacts onto the cortical surface mesh with the imgpipe toolbox49 using a surface vector projection method50. Once we identified locations for each ECoG and depth electrode, we projected all participants’ electrodes onto Montreal Neurological Institute 152 space for plotting and comparison.
In addition to the stereotactic preoperative MRI scans, high angular resolution diffusion imaging was acquired on the same 3 Tesla MR scanner (General Electric), using a spin-echo echo-planar imaging pulse sequence (TE = 71 ms, TR = 7,765 ms, flip angle alpha = 90°), field of view 28 × 28 cm, at least 70 axial slices, 2 mm3 isotropic voxels, b value = 2,000 s mm−2 in 55 non-collinear gradient directions and a signal-to-noise ratio >60. A single non-diffusion-weighted b0 image was also obtained. The diffusion-weighted tractography was processed using BrainLab software. Preoperative MRI, postoperative CT and high angular resolution diffusion imaging scans were automatically merged and corrected for distortion. The contacts used for recordings were segmented on the CT scan based on visible contacts and known spacing measurements. The regions of interest were created using manual tracing of bilateral dorsal ACC, using a fractional anisotropy threshold between 0.2 and 0.3 and a minimum length of at least 8 cm.
Ambulatory data collection
We collected neural recordings coincident with pain reports multiple times daily (mean 3.5 per day) from morning to evening. The Activa PC + S system is an investigational, implantable ‘bidirectional’ neural interface, that can sense and store patient-triggered neural recordings (LFP time series) that can be analyzed offline or used for adaptive DBS26. Participants initiated a 30-s neural recording using their remote control while sitting quietly, immediately following a pain report. Each 30-s neural recording was self-triggered by participants by pressing a button on their remote control. Participants were instructed to space out recordings at least three times daily, once each in the morning, afternoon and evening. In rare instances (<10% of all recordings), devices were programmed to automatically capture a 30-s recording at prespecified times throughout the day, to increase recording frequency. In such cases, we attempt to vary specific times of recordings every 2 weeks to more equally sample morning, afternoon and evening periods. Also, in these cases participants were notified of the imminent start of a recording via text message and prompted to submit a pain report via text message or by clicking a hyperlink to a REDCap survey page. Neural recordings were included in analysis only if they occurred within 15 min of reported scores.
Pain metrics were reported using mobile text message or the online REDCap platform version 10.0.33 (REDCap, Vanderbilt). Reported metrics included pain intensity NRS (0–10) and VAS (where 0 is no pain and 10 is the worst pain they have ever experienced); pain unpleasantness NRS and VAS (where 0 is not bothersome at all and 10 is most bothersome ever felt) and the SF-MPQ (version 2)28. Although VAS and NRS may provide redundant information, both were collected when possible to assess reporting consistency within participants (Fig. 1c). While data from all metrics were not available from all participants, pain intensity NRS was reported by all and so prioritized in the study.
Participants provided pain reports at least 2 weeks before surgery, and reported score means did not change after surgery. To standardize reporting, participants were trained to report pain intensity NRS values based on a narrative description of each number (0–10) from a comparative pain severity scale table51. VAS sliders contained only the numbers 0 or 10 at each end and were presented horizontally with the slider bar starting at a value of 5/10. The SF-MPQ2 is a multidimensional survey tool that requires participants to rate the extent (none, mild, moderate, severe) to which each of 15 pain words matches their symptoms. We reported the SF-MPQ2 score as the sum of all verbal descriptor ratings (maximum = 45). The magnitude by which pain scores differed between the high and low group within each participant was confirmed to be clinically significant and surpassed a meaningful threshold for each participant. All participants confirmed that individual successive numbers in reported ranges carried discernable clinical meaning, and so an NRS difference of 1 of 10 was therefore noted separately by each participant to have different clinical meaning with reliability over repeated reports (Fig. 1d). Brain recordings commenced immediately after pain reports were submitted.
Activa PC + S neural recordings and preprocessing
Each recording sampled two bipolar referenced time-series channels capturing LFPs at a 422-Hz sampling rate. The contacts used for sampling were chosen based on those showing the largest root-mean-square voltage in the raw tracings as determined by investigators (for example, for the ACC we chose 0–3+ as one possible bipolar channel, where 0 was the deepest contact). Data download of collected recordings was performed every 2–3 weeks by either participants or investigators using the Medtronic sensing programmer (version 1.5.0.0) via a wand resting on the skin over the Activa device.
Data analysis used MATLAB 2022b (MathWorks) and Python 3.7.4 with the Scikit-learn library (version 1.0.2). To identify pain-state biomarkers, LFPs were high-pass filtered above 1 Hz and low-pass filtered below 100 Hz, converted to frequency domain using multitaper spectral estimation52, log10 transformed and z-scored within frequency band. Standardized power values for each 30-s recording were averaged within canonical frequency bands: δ (1–4 Hz), θ (4–8 Hz), α (8–12 Hz), β (12–30 Hz), low γ (30–70 Hz) and high γ (70–100 Hz). Bandwidths containing idiosyncratic noise sources (known from Activa PC + S by the manufacturer) were visually identified for each participant (by an investigator blinded to results) and excluded from power averages. Outlier recordings were excluded from analysis if power within three or more frequency bands (of six in total) contained power averages greater than three scaled median absolute deviations from the median, in a manner blinded to the results.
Acute/experimental thermal pain protocol
We applied transient heat stimuli of varying intensity to each participant’s most painful body part (and contralateral side) using the Medoc TSA 2001 while recording brain LFP activity. Heat temperatures were calibrated separately for each body side and participant, such that reported NRS values ranged from 0 to 9 out of 10. Background chronic pain NRSs were collected before starting acute pain trials. Participants underwent five trials at each of five intensities, where temperature first increased at a rate of 1 °C s−1 from a baseline of 32 °C, was held at target intensity for 3 s, and then returned to baseline. Around 10 to 15 s elapsed between trials, and participants were cued to trial start, although 3 s of neural data was only included after target temperatures were reached. Target temperatures ranged from 34 to 48 °C. Participants verbally reported pain NRSs 3 s after reaching target temperature. Trials with movement or uncertain pain report were discarded.
To mitigate the possibility that participants may ‘merge’ or conflate ratings of chronic and acute pain (even subconsciously), we took three precautionary steps: (1) Participants were exposed to at least four different blocks of the acute pain paradigm before formal testing, so that they became accustomed to the pacing and attention to acute, thermal pain phenomenology. (2) Thermal pain was applied adjacent to, instead of directly over, anatomical regions where background chronic pain was experienced, tailored to each participant. This was done to avoid confounding spontaneous underlying pain in the same body part that was in physical contact with the thermode. (3) Participants were explicitly trained to provide only the pain score corresponding in time (by verbal cueing at the 3-s plateau time point) and in space (in only the anatomical area contacted by the thermode). To specifically train participants to understand this difference, they were given visual feedback of the temperature as it ramped to target temperature during training blocks, so that they could understand the relationship between stimulus delivery and perceived sensation. However, to avoid bias, they were not shown the visual temperature during actual testing blocks.
Pain decoding models and biomarker analysis
Separate models were constructed for each participant and each reported pain score, using as input features the standardized mean spectral power in each frequency band, per brain region, per hemisphere (that is, CP1 model used 12 features (6 each from unilateral implants in the ACC and OFC); CP2–4 models contained 24 features from bihemispheric recordings). We computed multivariate regularized regression (LASSO) on continuous pain metrics and two types of classification on dichotomized pain metrics (LDA and LSSM). For classification, binary response variables were pain scores dichotomized into ‘high pain state’ and ‘low pain state’ categories for each participant, based on dividing scores above and below that participant’s median value (test data point was not included in the median calculation for full independence; see ‘Cross-validation’). To ensure robust decoding of pain state, we used independent machine learning approaches: LDA, LSSM (Supplementary Fig. 2) and LASSO regression. While LDA produces directly interpretable feature weights that can be programmed into currently available adaptive DBS devices, LSSM is a dynamical systems approach that can more flexibly represent complex brain activity53.
The approaches below were used to predict multiple pain metric responses that were available for each participant (Supplementary Table 1): All participants: chronic pain intensity NRS, acute pain verbal NRS, acute pain temperature; CP3 and CP4: pain intensity VAS, pain unpleasantness NRS/VAS, SF-MPQ2.
LASSO regression.
In addition to predicting binarized chronic and acute pain states, we also trained multivariate LASSO regression models to predict continuous pain scores. LASSO regression models implicitly perform variable selection through regularization whereby the weighting factors of multicollinear or extraneous input variables are shrunk, thereby having less influence on the outcome prediction. Similarly to LDA models, we stratified our regression analyses by constructing models trained on data separately from each available subregion. All models were fit with a regularization parameter of 0.001 and validated with our modified LOOCV. Model fit was evaluated by calculating the coefficient of determination (R2) values of the models, which can range from below 0 to 1, and root mean square error.
LDA decoding.
LDA is a common supervised classification method used to categorize labeled samples into two or more classes by determining an optimal decision boundary that best separates samples from each class54. LDA makes predictions by estimating the probability that each input belongs to a particular class based on variance in the input features.
We used LDA to classify high versus low dichotomized pain states for two main reasons. First, LDA produces an interpretable set of feature weights for each trained model, permitting inference of the importance of specific neural features (that is, brain regions, hemisphere, power bands)54. Second, the Activa PC + S, Summit RC + S and Percept sensing-enabled brain stimulation devices (Medtronic) exclusively use device-embedded LDA algorithms for ambulatory closed-loop control55,56. Results from LDA-based decoding can therefore be directly implemented for closed-loop control in current clinical devices and for future stimulation studies.
We constructed multiple LDA classification models using data sub-selected from different brain regions and/or hemispheres, which we called subregion models (for example, right hemisphere ACC and OFC, left ACC and left OFC). One model consisting of all available data (for example, both hemispheres and brain regions) was termed the full model (that is, contralateral ACC/OFC for CP1 and bilateral ACC/OFC for CP2–4 represent the full model). Separate full and subregion models were constructed to classify each available pain metric for each participant (that is, pain intensity NRS and VAS, pain unpleasantness NRS and VAS and SF-MPQ2)28. However, pain intensity NRS was reported by all participants and so is emphasized in the main study. For the acute pain data, we also sought to predict the delivered temperature as a response variable. For all participants, we optimized the shrinkage parameter used for discriminant analysis, which was set to the default value for all participants except for CP1 for whom it was set to a value of 1, indicating maximum shrinkage. Shrinkage is a form of regularization used to improve model estimation in scenarios when the number of training samples is low relative to input features57. Setting shrinkage to a value of 1 effectively maximizes regularization. All other hyperparameters were set to default values (for example, prior probabilities = 0.5 for each class) in Python 3.7.4 with the Scikit-learn library (version 1.0.2)57.
AUC was calculated using the predictions from all test points compared to the ground truth pain states for all models. We also calculated sensitivity, specificity, positive predictive value and accuracy of binary classification.
To determine whether neural features correlated with chronic pain may generalize to acute (experimental) pain, we used full models trained on the chronic pain dataset to classify acute pain scores from the experimental thermal pain dataset, and vice versa (Fig. 4a). Specifically, for this acute/chronic generalization analysis, a particular participant’s neural features and pain reports from the chronic pain dataset were used as the training set, while that same participant’s neural features and pain reports from the acute, experimental thermal pain dataset were used as the test set. The same analysis was done by reversing the test and training sets for completeness. Neural input features and pain score response variables were standardized by subtracting the mean and dividing by the standard deviation for each model.
LSSM decoding.
Neural decoding of pain may benefit from dynamic models that can predict how neural dynamics lead to pain score variations over time. Such an approach was previously used to decode interindividual mood state in patients with epilepsy and can reduce the dimensionality of neural features to fewer ‘latent states’, which can then be used to guide stimulation in a potential future control scheme (Supplementary Fig. 2). We thus independently assessed the feasibility of decoding chronic pain states using dynamic LSSM53.
In this case, in nonoverlapping 1-s windows, we computed the log of signal power within the six canonical frequency bands (Methods) resulting in power time series with 30 time-steps during each 30-s recording. We modeled the dynamics of the power time series as the outputs of an LSSM with a latent state and used the subspace identification algorithm and Akaike’s information criterion to learn the LSSM parameters and determine its latent state dimension53. Given the learned LSSM, we then applied the associated Kalman filter to the power time series in each recording to extract the latent state time series and decoded the pain state from the latent state at the end of each recording. Decoding was evaluated as above with a modified LOOCV and performance was quantified by computing the AUC. As LSSM methods may predict neural dynamics over time, they could hold promise for informing the closed-loop adaptive DBS system58, although present technology relies on LDA approaches26,46.
Cross-validation
To mitigate model overfitting, we used LOOCV in which one test sample was iteratively omitted from the training set (see Supplementary Table 1 for the number of recordings for each participant). Specifically, for all models, we predicted each test data point individually using a model trained on all other points. For all models, the median value used for dichotomizing pain scores was computed using only the training dataset (excluding the test data sample) to maintain strict independence between training and testing sets. Decoding AUCs were averaged across all runs to compute the model average AUC reported in the text and figures.
It is possible that autocorrelations in the pain score metric time series could result in potentially overfitted models and inflate prediction accuracy. Therefore, we performed a separate ‘modified cross-validation’ procedure, which omitted ±3 samples around the test point, from the training data. We chose a window of three samples based on the average number of pain scores reported per day across participants (3.2 reports per day). For participants CP2–4, the ‘modified cross-validation’ method resulted in significant decoding of pain intensity NRS for all subregion models containing the ACC or OFC from the contralateral hemisphere (6 of 9 models per participant). For the one participant with the smallest number of data samples (CP1), this method failed to produce significant classification of pain intensity NRS, due to the omission of substantially more training data than the standard LOOCV method. Consistent with shown results for the two participants with pain unpleasantness NRS reporting, the ‘modified cross-validation’ method resulted in significant decoding when the ACC was included in subregion models (CP3: 7 of 9 models; CP4: 6 of 9 models). For SF-MPQ2, all subregion models were significant for CP3, and 7 of 9 models were significant for CP4 (excluding those containing ipsilateral OFC).
Sequential pain difference/pain fluctuation analysis
Predicting changes in successive pain scores versus state (Supplementary Fig. 9a,b): We were interested in understanding whether the neural features tracked fluctuations or differences between sequential pain ratings (instead of the actual reported individual pain scores/states). Pain score differences were calculated by subtracting the immediately preceding pain score from the current one to generate a metric of whether pain state recently increased or decreased. Therefore, pain scores that were previously higher than the current one would result in negative difference scores, while those that were previously lower would result in positive difference scores. To assess whether neural features discriminated changes in pain, we generated binary LDA classification models trained to distinguish stable pain scores (0 change in pain NRS) versus fluctuating pain scores (non-zero changes in pain NRS). We also built regression models trained to predict the change from the prior pain score to the current score. We performed the same subregion model stratification and validation methods as described for other models.
Decoding stability (70/30 split).
To test whether the important neural features were stable across the ambulatory data collection period, we additionally performed a 70/30 train/test split validation protocol using an LDA classifier. For each participant, we trained an LDA model on the first 70% of their collected data and tested the model on the remaining 30%. We then calculated the AUC on the test set. If AUC from this analysis is comparable to the AUC computed using modified LOOCV, this suggests that neural features important for decoding are stable over time.
LDA feature importance.
Model feature importance (Figs. 2e and 3g) was calculated by taking the mean value of each feature coefficient weight across all cross-validation runs (using LDA) and linearly rescaling the resulting values between −1 and 1 for each feature and participant. The feature importance values were visualized by plotting colored heat maps ranging from blue to red to compare across participants.
OFC versus ACC feature comparison.
To further assess the relative contribution of OFC versus ACC features on chronic and acute pain decoding, we computed the difference between the absolute magnitudes of each power band feature from the OFC and ACC in the same brain hemisphere (OFC minus ACC) for all recording clips. Values greater than 0 indicate greater OFC than ACC feature importance. To compare the distributions of these feature importance differences to a null hypothesis distribution, we generated null permuted distributions by randomly shuffling the OFC/ACC labels and recalculating feature differences 1,000 times. Real versus shuffled feature difference distributions were compared using two-tailed Wilcoxon rank-sum tests. Multiple-comparisons correction was performed across all features within each participant using false discovery rate correction as below.
Temporal feature analysis
To assess the time-varying characteristics of power features supporting pain-state decoding, we first computed multitaper spectrograms of neural recordings from each brain region52. Spectrograms were computed on 500-ms windows, with a 50-ms window step, TW = 3 (1.5-Hz resolution) and five tapers, with signals zero padded to the next power of 2 number of samples. We then averaged power values within canonical frequency bands as above (that is, delta, theta, alpha, and so on) to obtain power time-series plots for each feature from each brain region. To understand the relative changes in power that underlie decoding of high versus low pain states, we next averaged the feature power time-series clips belonging to each high versus low pain-state group (Fig. 5a and Supplementary Fig. 13a). The same method was carried out for the acute-affected pain features for the two participants that had successful acute pain decoding (Supplementary Fig. 13b). Note that because the 30-s neural recording clips were collected at various times of day within 5 min preceding a pain report, there is no well-defined task onset/offset for each 30-s recording as there is for each 3-s recording clip in the acute pain task. Therefore, one may expect to see reliable increases/decreases in power if there were sustained power changes across this time. However, one might not see any difference between low versus high pain power curves if power only fluctuated in transient bursts because the timing of such bursts may cancel out when averaged across sessions. To quantify increases or decreases in power change patterns for chronic and acute pain features, we computed three metrics (Fig. 5b–d): (1) the number of bouts per second. A bout was defined as an event where the higher power curve crossed above the low power curve before crossing below if at all (for example, if a feature had a negative feature weight sign, then low pain state was associated with higher power than high pain state for that feature). Instances where the higher power curve did not intersect with the lower power curve were counted as one bout. We divided the number of bouts by clip duration to obtain bouts per second. (2) Mean bout duration was computed by taking an average duration of all detected bouts for that feature. (3) The total proportion of recording clip time where the higher curve was sustained above the lower curve (that is, equivalent to summing all bout durations and dividing by clip duration).
To investigate diurnal patterns in the time series of each chronic pain neural feature, we separately plotted pain NRS and each feature’s clip averaged power as a function of time of day from midnight to midnight (Supplementary Fig. 14). Because the time of day was non-uniformly sampled by each participant in the ambulatory setting, we resampled these diurnal plots with shape-preserving piecewise cubic interpolation (‘pchip’) using a uniform time resolution of 3 h to obtain a summary diurnal trend line for each feature. We chose a resolution of 3 h because this was the shortest time interval across each participant’s reports, and because doing so did not introduce visible artifactual trends. The resampled trend lines for each feature were then correlated with the pain NRS trend line using Pearson’s correlation, within participants, to assess for correlated patterns between neural features and pain reports (Supplementary Table 3).
General statistical methods
False discovery rate correction for multiple comparisons used the Benjamini–Hochberg–Yekutieli procedure59.
Autocorrelation.
Sample partial autocorrelations were calculated on reported pain intensity NRS using default parameters in MATLAB60. Because pain NRS was reported on an irregular timescale for each participant, we uniformly resampled the original pain NRS time series using shape-preserving piecewise cubic interpolation, rounded to the nearest 6 min (that is, 1/10 of 1 h).
Permutation tests: empirical P values.
All machine learning model results (AUCs for LDA and LSSM and coefficient of determination R2 for regression) were compared against 5,000 (n) permuted results from null models (AUCs or R2) obtained by randomly shuffling the true response class labels or values (for example, randomly shuffling high or low pain class label) to obtain a distribution of chance level performance. We conservatively calculated empirical one-sided P values by comparing the number of randomly permuted AUCs or R2(k) greater than the actual model AUC or R2 using the following correction to avoid underestimation as previously demonstrated61: Pcorr = k + 1 / n + 1. Note that because R2 values can be <0, it is possible for very low R2 values to sometimes be significant, if the R2 results from shuffled/permuted, null models were largely negative.
Reporting summary
Further information on research design is available in the Nature Portfolio Reporting Summary linked to this article.
Supplementary Material
Acknowledgements
We thank H. Fields, K. Sellers and J. Motzkin for advice during study design and data analysis and for critical editing of the paper. This study was funded by the National Institutes of Health (NIH) Brain Initiative Grant UH3NS109556 (to E.F.C., P. Shirvalkar, P. Starr), NIH HEAL Initiative Grant UH3NS115631 (to P. Shirvalkar) and DARPA grant W911NF-14-2-0043 (to E.F.C.). The funders had no role in study design, data collection and analysis, decision to publish or preparation of the manuscript.
Competing interests
Medtronic provided research devices for use in this study and technical support through a research agreement with UCSF (with E.F.C. and P. Shirvalkar) but no financial support. Medtronic had no role in study design, data collection and analysis, decision to publish or preparation of the manuscript. All authors declare no other competing interests.
Footnotes
Code availability
MATLAB and Python analytical software code used to generate the main results and figures is available on the NIH Brain Initiative platform above and at GitHub: https://github.com/shirvalkarlab/ChronicPain2023_NatNeuro.git/.
Supplementary information The online version contains supplementary material available at https://doi.org/10.1038/s41593-023-01338-z.
Data availability
The datasets generated during and/or analyzed during the current study will be available in the NIH Brain Initiative data sharing platform within 1 month of publication at https://dabi.loni.usc.edu/. Datasets will include raw neurophysiology data including metadata.
References
- 1.Wide-Ranging Online Data for Epidemiologic Research (WONDER) (Centers for Disease Control and Prevention, 2016); https://wonder.cdc.gov/ [Google Scholar]
- 2.FDA-NIH Biomarker Working Group. BEST (Biomarkers, EndpointS, and other Tools) Resource (FDA, 2016). [PubMed] [Google Scholar]
- 3.Davis KD et al. Discovery and validation of biomarkers to aid the development of safe and effective pain therapeutics: challenges and opportunities. Nat. Rev. Neurol 16, 381–400 (2020). [DOI] [PMC free article] [PubMed] [Google Scholar]
- 4.Coghill RC, McHaffie JG & Yen Y-F Neural correlates of interindividual differences in the subjective experience of pain. Proc. Natl Acad. Sci. USA 100, 8538–8542 (2003). [DOI] [PMC free article] [PubMed] [Google Scholar]
- 5.Hutchison WD, Davis KD, Lozano AM, Tasker RR & Dostrovsky JO Pain-related neurons in the human cingulate cortex. Nat. Neurosci 2, 403–405 (1999). [DOI] [PubMed] [Google Scholar]
- 6.Wager TD et al. An fMRI-based neurologic signature of physical pain. N. Engl. J. Med 368, 1388–1397 (2013). [DOI] [PMC free article] [PubMed] [Google Scholar]
- 7.Ploner M, Sorg C & Gross J Brain rhythms of pain. Trends Cogn. Sci 21, 100–110 (2017). [DOI] [PMC free article] [PubMed] [Google Scholar]
- 8.Baliki MN et al. Chronic pain and the emotional brain: specific brain activity associated with spontaneous fluctuations of intensity of chronic back pain. J. Neurosci 26, 12165–12173 (2006). [DOI] [PMC free article] [PubMed] [Google Scholar]
- 9.Baliki MN et al. Corticostriatal functional connectivity predicts transition to chronic back pain. Nat. Neurosci 15, 1117–1119 (2012). [DOI] [PMC free article] [PubMed] [Google Scholar]
- 10.Corder G et al. An amygdalar neural ensemble that encodes the unpleasantness of pain. Science 363, 276–281 (2019). [DOI] [PMC free article] [PubMed] [Google Scholar]
- 11.Tan LL et al. A pathway from midcingulate cortex to posterior insula gates nociceptive hypersensitivity. Nat. Neurosci 20, 1591–1601 (2017). [DOI] [PubMed] [Google Scholar]
- 12.Lee J-J et al. A neuroimaging biomarker for sustained experimental and clinical pain. Nat. Med 27, 174–182 (2021). [DOI] [PMC free article] [PubMed] [Google Scholar]
- 13.Lee M et al. Activation of corticostriatal circuitry relieves chronic neuropathic pain. J. Neurosci 35, 5247–5259 (2015). [DOI] [PMC free article] [PubMed] [Google Scholar]
- 14.Rainville P, Duncan GH, Price DD, Carrier B & Bushnell MC Pain affect encoded in human anterior cingulate but not somatosensory cortex. Science 277, 968–971 (1997). [DOI] [PubMed] [Google Scholar]
- 15.Boccard SGJ et al. Long-term results of deep brain stimulation of the anterior cingulate cortex for neuropathic pain. World Neurosurg 106, 625–637 (2017). [DOI] [PubMed] [Google Scholar]
- 16.Kringelbach ML & Rolls ET The functional neuroanatomy of the human orbitofrontal cortex: evidence from neuroimaging and neuropsychology. Prog. Neurobiol 72, 341–372 (2004). [DOI] [PubMed] [Google Scholar]
- 17.Kucyi A & Davis KD The dynamic pain connectome. Trends Neurosci 38, 86–95 (2015). [DOI] [PubMed] [Google Scholar]
- 18.Kringelbach ML The human orbitofrontal cortex: linking reward to hedonic experience. Nat. Rev. Neurosci 6, 691–702 (2005). [DOI] [PubMed] [Google Scholar]
- 19.Damasio AR The somatic marker hypothesis and the possible functions of the prefrontal cortex. Phils. Trans. R. Soc. B 351, 1413–1420 (1996). [DOI] [PubMed] [Google Scholar]
- 20.Becker S, Gandhi W, Pomares F, Wager TD & Schweinhardt P Orbitofrontal cortex mediates pain inhibition by monetary reward. Soc. Cogn. Affect Neurosci 12, 651–661 (2017). [DOI] [PMC free article] [PubMed] [Google Scholar]
- 21.Rich EL & Wallis JD Decoding subjective decisions from orbitofrontal cortex. Nat. Neurosci 19, 973–980 (2016). [DOI] [PMC free article] [PubMed] [Google Scholar]
- 22.Rao VR et al. Direct electrical stimulation of lateral orbitofrontal cortex acutely improves mood in individuals with symptoms of depression. Curr. Biol 28, 3893–3902.e4 (2018). [DOI] [PubMed] [Google Scholar]
- 23.Kohoutová L et al. Individual variability in brain representations of pain. Nat. Neurosci 25, 749–759 (2022). [DOI] [PMC free article] [PubMed] [Google Scholar]
- 24.Čeko M, Kragel PA, Woo C-W, López-Solà M & Wager TD Common and stimulus-type-specific brain representations of negative affect. Nat. Neurosci 25, 760–770 (2022). [DOI] [PubMed] [Google Scholar]
- 25.Petrovic P, Kalso E, Petersson KM & Ingvar M Placebo and opioid analgesia–imaging a shared neuronal network. Science 295, 1737–1740 (2002). [DOI] [PubMed] [Google Scholar]
- 26.Swann NC et al. Chronic multisite brain recordings from a totally implantable bidirectional neural interface: experience in 5 patients with Parkinson’s disease. J. Neurosurg 128, 605–616 (2017). [DOI] [PMC free article] [PubMed] [Google Scholar]
- 27.Giordano JJ et al. Proceedings of the fourth annual deep brain stimulation think tank: a review of emerging issues and technologies. Front Integr. Neurosci 10, 38 (2016). [DOI] [PMC free article] [PubMed] [Google Scholar]
- 28.Strand LI, Ljunggren AE, Bogen B, Ask T & Johnsen TB The short-form McGill pain questionnaire as an outcome measure: test–retest reliability and responsiveness to change. Eur. J. Pain 12, 917–925 (2008). [DOI] [PubMed] [Google Scholar]
- 29.Hawker GA, Mian S, Kendzerska T & French M Measures of adult pain: visual analog scale for pain (VAS pain), numeric rating scale for pain (NRS pain), McGill pain questionnaire (MPQ), short-form McGill pain questionnaire (SF-MPQ), chronic pain grade scale (CPGS), short form-36 bodily pain scale (SF-36 BPS), and measure of intermittent and constant osteoarthritis pain (ICOAP). Arthritis Care Res 63, S240–S252 (2011). [DOI] [PubMed] [Google Scholar]
- 30.Salgado JF Transforming the area under the normal curve (AUC) into Cohen’s d, Pearson’s r pb, odds ratio, and natural log odds ratio: two conversion tables. Psy. Intervention 10, 35–47 (2018). [Google Scholar]
- 31.Tracey I & Mantyh PW The cerebral signature for pain perception and its modulation. Neuron 55, 377–391 (2007). [DOI] [PubMed] [Google Scholar]
- 32.Hashmi JA et al. Shape shifting pain: chronification of back pain shifts brain representation from nociceptive to emotional circuits. Brain 136, 2751–2768 (2013). [DOI] [PMC free article] [PubMed] [Google Scholar]
- 33.Reckziegel D et al. Deconstructing biomarkers for chronic pain: context- and hypothesis-dependent biomarker types in relation to chronic pain. Pain 160, S37–S48 (2019). [DOI] [PMC free article] [PubMed] [Google Scholar]
- 34.Boccard SGJ et al. Targeting the affective component of chronic pain: a case series of deep brain stimulation of the anterior cingulate cortex. Neurosurgery 74, 628–637 (2014). [DOI] [PubMed] [Google Scholar]
- 35.Kulkarni B et al. Attention to pain localization and unpleasantness discriminates the functions of the medial and lateral pain systems. Eur. J. Neurosci 21, 3133–3142 (2005). [DOI] [PubMed] [Google Scholar]
- 36.Derbyshire SWG et al. Cerebral responses to noxious thermal stimulation in chronic low back pain patients and normal controls. Neuroimage 16, 158–168 (2002). [DOI] [PubMed] [Google Scholar]
- 37.Shih H-C, Yang J-W, Lee C-M & Shyu B-C Spontaneous cingulate high-current spikes signal normal and pathological pain states. J. Neurosci 39, 5128–5142 (2019). [DOI] [PMC free article] [PubMed] [Google Scholar]
- 38.Brodersen KH et al. Decoding the perception of pain from fMRI using multivariate pattern analysis. Neuroimage 63, 1162–1170 (2012). [DOI] [PMC free article] [PubMed] [Google Scholar]
- 39.Fries P Rhythms for cognition: communication through coherence. Neuron 88, 220–235 (2015). [DOI] [PMC free article] [PubMed] [Google Scholar]
- 40.Colgin LL et al. Frequency of gamma oscillations routes flow of information in the hippocampus. Nature 462, 353–357 (2009). [DOI] [PubMed] [Google Scholar]
- 41.Wang X-J Neurophysiological and computational principles of cortical rhythms in cognition. Physiol. Rev 90, 1195–1268 (2010). [DOI] [PMC free article] [PubMed] [Google Scholar]
- 42.van Ede F, Quinn AJ, Woolrich MW & Nobre AC Neural oscillations: sustained rhythms or transient burst-events? Trends Neurosci 41, 415–417 (2018). [DOI] [PMC free article] [PubMed] [Google Scholar]
- 43.Feingold J, Gibson DJ, DePasquale B & Graybiel AM Bursts of beta oscillation differentiate postperformance activity in the striatum and motor cortex of monkeys performing movement tasks. Proc. Natl Acad. Sci. USA 112, 13687–13692 (2015). [DOI] [PMC free article] [PubMed] [Google Scholar]
- 44.Foss JM, Apkarian AV & Chialvo DR Dynamics of pain: fractal dimension of temporal variability of spontaneous pain differentiates between pain states. J. Neurophysiol 95, 730–736 (2006). [DOI] [PubMed] [Google Scholar]
- 45.Rothaug J, Weiss T & Meissner W How simple can it get? Measuring pain with NRS items or binary items. Clin. J. Pain 29, 224–232 (2013). [DOI] [PubMed] [Google Scholar]
- 46.Gilron R et al. Long-term wireless streaming of neural recordings for circuit discovery and adaptive stimulation in individuals with Parkinson’s disease. Nat. Biotechnol 39, 1078–1085 (2021). [DOI] [PMC free article] [PubMed] [Google Scholar]
References
- 47.Dale AM, Fischl B & Sereno MI Cortical surface-based analysis: I. segmentation and surface reconstruction. Neuroimage 9, 179–194 (1999). [DOI] [PubMed] [Google Scholar]
- 48.Fischl B et al. Whole brain segmentation: automated labeling of neuroanatomical structures in the human brain. Neuron 33, 341–355 (2002). [DOI] [PubMed] [Google Scholar]
- 49.Hamilton LS, Chang DL, Lee MB & Chang EF Semi-automated anatomical labeling and inter-subject warping of high-density intracranial recording electrodes in electrocorticography. Front. Neuroinform 11, 62 (2017). [DOI] [PMC free article] [PubMed] [Google Scholar]
- 50.Kubanek J & Schalk G NeuralAct: a tool to visualize electrocortical (ECoG) activity on a three-dimensional model of the cortex. Neuroinform 13, 167–174 (2015). [DOI] [PMC free article] [PubMed] [Google Scholar]
- 51.Rich A Comparative pain scale. The Cluster Headache Support Group; https://clusterheadachewarriors.org/wp-content/uploads/2017/03/0-10_Pain_Scale.pdf (2014). [Google Scholar]
- 52.Bokil H, Andrews P, Kulkarni JE, Mehta S & Mitra P Chronux: a platform for analyzing neural signals. J. Neurosci. Methods 192, 146–151 (2010). [DOI] [PMC free article] [PubMed] [Google Scholar]
- 53.Sani OG et al. Mood variations decoded from multi-site intracranial human brain activity. Nat. Biotechnol 36, 954–961 (2018). [DOI] [PubMed] [Google Scholar]
- 54.Bishop C Pattern Recognition and Machine Learning (Springer, 2006). [Google Scholar]
- 55.Stanslaski S et al. Design and validation of a fully implantable, chronic, closed-loop neuromodulation device with concurrent sensing and stimulation. IEEE Trans. Neural Syst. Rehabil. Eng 20, 410–421 (2012). [DOI] [PubMed] [Google Scholar]
- 56.Afshar P et al. A translational platform for prototyping closed-loop neuromodulation systems. Front. Neural Circuits 6, 117 (2013). [DOI] [PMC free article] [PubMed] [Google Scholar]
- 57.Pedregosa F et al. Scikit-learn: machine learning in Python. J. Mach. Learn. Res 12, 2825–2830 (2011). [Google Scholar]
- 58.Shanechi MM Brain–machine interfaces from motor to mood. Nat. Neurosci 22, 1554–1564 (2019). [DOI] [PubMed] [Google Scholar]
- 59.Yekutieli D & Benjamini Y Resampling-based false discovery rate controlling multiple test procedures for correlated test statistics. J. Stat. Plan. Inference 82, 171–196 (1999). [Google Scholar]
- 60.Box GEP, Jenkins GM & Reinsel GC Time Series Analysis: Forecasting and Control (Prentice Hall, 1994). [Google Scholar]
- 61.North BV, Curtis D & Sham PC A note on the calculation of empirical P Values from Monte Carlo procedures. Am. J. Hum. Genet 71, 439–441 (2002). [DOI] [PMC free article] [PubMed] [Google Scholar]
Associated Data
This section collects any data citations, data availability statements, or supplementary materials included in this article.
Supplementary Materials
Data Availability Statement
The datasets generated during and/or analyzed during the current study will be available in the NIH Brain Initiative data sharing platform within 1 month of publication at https://dabi.loni.usc.edu/. Datasets will include raw neurophysiology data including metadata.