None of us has the brain we were born with. Brains grow and adapt. This process, called neuroplasticity, doesn’t end when you step out of the classroom. Even habits — reaching for cookies when stressed, keeping your head down during staff meetings — cut “trails” in the brain throughout life that can be hard to overcome.

When it comes to drug habits, the effect on the brain can be dramatic. “These are things we can see under the microscope,” said Ellen Unterwald, director of the Center for Substance Abuse Research at Temple University. “There are actually structural changes to neurons in different brain regions, and those are different for different drugs of abuse. They each have their own signature.”

As the national opioid crisis continues, neuroscientists like Unterwald are beginning to peel back the mystery of opioid addiction in the brain. Their findings are shedding light on how best to deal with addiction, and are even helping doctors spot people who may be more likely to get hooked in the first place.

No one — even those who have never taken a prescription painkiller or used heroin — is truly opioid-free. Fact is, opioids occur naturally. Experiences like runner’s high and the beneficial effects of acupuncture depend on opioids made in the brain, such as endorphins, that help us enjoy good feelings, Unterwald said.

Subtle differences in how individual brains sense and respond to pleasure may help explain a range of behaviors, from overeating to the likelihood of opioid abuse.

“Certainly more than half the risk [for opioid abuse] is genetic,” said Henry Kranzler, director of the Center for the Studies of Addiction at the University of Pennsylvania. “Risk is not about character. It’s about genetics and environmental exposure.”

Substance-abuse disorders are “genetically complex,” Kranzler said. “There are many different genes — we’re not even sure how many — that contribute to risk.”

Last year, Kranzler and colleagues identified a gene variant in black children associated with a lower sensitivity to prescription pain medication. The team is now looking to see whether the same genetic pattern could explain how older black Americans respond to prescription opioids after hip or knee replacement. The long-term goal of this research, said Kranzler, is to customize pain management, making it more effective and safer.

The feel-good effects of opioids are well understood. “The reward pathway that’s stimulated by things that we find pleasurable — eating, social interaction, sex — causes dopamine to be released. Opioids act at the beginning of that pathway,” Unterwald said.

But opioid drugs like morphine do much more than stimulate pleasure. Many opioids also target the amygdala, an almond-shaped bulb buried deep in the brain where emotions and motivation are concocted. This drives up drug cravings.

The effects of opioids are now being discovered throughout the brain. In a study published in June, a team of researchers from Temple University, the Max Planck Institute of Biochemistry in Germany, and the Medical University of Innsbruck in Austria used sensitive instruments to detect drug-induced molecular changes in the brains of rats.

“We found more than 1,000 changes after exposure to an opioid-like drug, showing a global effect of these drugs on signaling in the brain,” said Jeffrey Liu, the lead author of the study.

When hit by high doses of opioids every day for several months, tiny structures throughout the brain called dendritic spines begin to disappear, said Wade Berrettini, director of the Center for Neurobiology and Behavior at Penn. These specialized structures allow neurons to communicate with one another. Losing the structures leads to “trouble reasoning and thinking through problems,” he said.

As addiction progresses, the brain’s reward system gets pushed further and further off balance. Cravings begin steering behavior, Berrettini said. And because of widespread brain changes including the loss of dendritic spines, those in addiction may have “limited ability to resist,” he said.

Brain adaptations are also what cause the nightmarish symptoms of opioid withdrawal — nausea, cramping, sweating, shaking, and more, Unterwald said.

When opioids are first taken, a stress-associated region of the brain called the locus coeruleus gets quieted. But after long-term exposure, the brain compensates by supercharging the neurons in that region. If the dampening effects of opioids are removed, an altered locus coeruleus can wreak havoc on the body, producing the symptoms of withdrawal.

To help customize addiction treatment, Penn’s Kranzler and colleagues relied on a standard scale to assess the severity of an individual’s addiction. By studying the genetic makeup of those with the highest scores, the team is discovering DNA markers associated with severe addiction.

“We are looking to identify genetic biomarkers that can be used to dose medications, both for analgesics for pain post-surgery as well as for methadone maintenance,” he said. The FDA is evaluating whether genetic or brain-based signatures can be used to guide clinical decisionmaking.

“Treatment works,” Kranzler said. “We tend to hear more about the people for whom treatment failed — and there still are too many of those. The better we can match treatment to an individual’s profile, both genetic and otherwise, the better we are going to be able to treat people.”