SIAM News Blog
SIAM News

# Data-driven Chronic Pain Management Using Hybrid Mathematical Methods

Think back to the last time you stubbed your toe or burned your finger. The pain probably took over all of your senses and concentration — you took deep gasps of air and maybe cursed under your breath until the discomfort subsided and you could return to your life. This is a typical reaction to acute—or short-duration—pain.

For some though, the pain lasts for months or even years. Those who suffer with chronic—or long-lasting—pain are often unable to work, interact with friends and family, or think about anything except the pain. The sensation of pain seems so fundamental to human experience, yet scientists and physicians struggle to understand what causes chronic pain and how to eliminate it.

Chronic pain is most commonly managed at home or in the hospital with narcotics and over-the-counter drugs. Unfortunately, people commonly develop resistance or addiction to these drugs, partly fueling the current opioid epidemic in America. How can physicians balance the subjective pain experienced by their patients with the risks inherent to pain management drugs?

Our recent study merges mathematical modeling, statistics, and a mobile health application to assist physicians in answering this tough question. Our team of clinicians, mobile health application designers, statisticians, and math modelers developed a hybrid statistical and mechanistic model of chronic pain dynamics that uses patient demographics and history to predict future pain levels and offer optimal drug interventions in real time.

Both statistical and mechanistic modeling play an important role in predicting subjective pain. Statistical models require little a priori knowledge about the causes of pain and offer correlations between patient characteristics and expected pain. Mechanistic models exploit known system behavior and allow for validation or rejection of underlying pain drivers.

Though one can apply our hybrid statistical and mechanistic approach to the understanding and prediction of any chronic pain, our study focuses on pain caused by complications of sickle cell disease. This chronic illness is associated with frequent hospitalization due to unsuccessfully-managed pain. Recently, physicians have used mobile health applications to offer remote interventions meant to minimize pain and prevent hospitalization. Using patient data— such as demographic information, self-reported pain, and drug treatments—collected by our mobile health application, our hybrid modeling approach guides data-driven physician recommendations.

Explanation of sickle-cell anemia. Image credit: Diana Grib (Creative Commons Attribution-Share Alike 4.0 International license).

The hybrid model’s mechanistic component exploits knowledge that many human sensory systems function on a roughly return-to-setpoint basis. For instance, if you stub your toe, you will experience a rush of pain that will gradually subside to your pain-free setpoint. We assume that individuals with chronic pain have a constant level of pain as a setpoint if they are not on medication. If they take pain medication, the pain will decrease rapidly before returning slowly to the setpoint level as the body metabolizes and eliminates the drugs. We propose a simple mathematical model to capture these dynamics:

$\frac{\textrm{d}P}{\textrm{d}t}=-(k_0 +k_1D_1+k_2D_2+k_3D_3)P+k_0u$

$\frac{\textrm{d}D_i}{\textrm{d}t}=-k_{D_i}D_i+\sum\limits^{N_i}_{j=1}\delta(t-\tau_{i,j})$

where $$P$$ is the patient’s subjective pain level, $$D_i$$ is the amount of the $$i$$th drug (out of three types) in the patient’s bloodstream, $$k_0$$ is the relaxation rate to setpoint pain without drugs, $$k_i$$ is the impact of the $$i$$th drug on the relaxation rate, $$u$$ is the patient’s setpoint (unmitigated) pain, $$k_{D_i}$$ is the elimination rate of the $$i$$th drug from the bloodstream, $$N_i$$ is the total number of the $$i$$th drug doses taken, and $$\tau_{i,j}$$ are the times the patient takes the $$i$$th drug.

We derive the parameters $$k_{D_i}$$ from validated pharmacokinetic models, but we must estimate the patient-specific parameters like $$u$$ (unmitigated pain) and $$k_i$$ (reaction to drugs) from patient data. Unfortunately, estimating these parameters for each patient in real time is computationally expensive; this is where the statistical modeling component can help.

Because we have several dozen patients in our clinical trials, we can use population-level statistics (on variables such as disease type, age, and long-term medication use) to guess patient parameters (like $$u$$ and $$k_i$$). These estimates serve as initial conditions for our parameter search algorithm, which speeds up the computation. After fitting all the parameters for each patient, we can update the statistical model to reflect knowledge of previous pain and drug interventions. Iterating back and forth between the statistical and mechanistic model quickly yields a personalized set of parameters for each patient.

Sample pain and medication data from a single patient. Upper panel. Patient reported pain (black circles) and model fit (red solid line); red shading indicates model fit plus/minus one standard deviation. Lower panel. Long-acting methadone (red solid line) and short-acting oxycodone (blue dashed line) medication concentrations in patient bloodstream, as inferred from medication usage reported via the mobile health application.

Once we compute parameters for each patient, we can use the model to predict future pain under various drug intervention protocols. To help physicians use this information when prescribing drug protocols, we packaged the model into a graphical tool. In the future, given enough physician recommendation data, a machine learning algorithm could make automated recommendations to patients.

Example expected pain given optimal drug dosage protocol. For each set of drug dosage protocols, from no drugs to four doses of each drug, a physician can view the expected average pain for their patient over a certain time period. Given the patient's maximum acceptable pain level, the physician can select the best compromise between drug doses and expected pain. In this case, the physician may tell the patient to take no long-acting (LA) opioid drugs but take three-four short-acting (SA) opioid drugs. Alternatively, the physician might tell the patient to take one LA drug and one-two doses of SA medication. The optimization algorithm supplies the best timing of LA and SA drugs.

Though simple, this hybrid statistical and mechanistic model for chronic pain dynamics shows great promise. Sparse data limited the complexity of the model, but the expected deluge of medical data from mobile health applications and wearables (including current clinical trial NCT02895841) will open the door for more sophisticated models in the future.

The author presented this research during a poster session at the 2017 SIAM Conference on Applications of Dynamical Systems, which took place this May in Snowbird, Utah.