When Ginevra Liptan came back to medical school after a year’s leave, she told her favorite professor she’d taken time off to deal with the onset of fibromyalgia. “He rolled his eyes and said, ‘That doesn’t exist,’” says Liptan.

In the 16 years since Liptan had her illness so summarily dismissed in 2002, there are still those who believe fibromyalgia isn’t “real.” There’s no tissue damage that explains the pain fibromyalgia patients experience all over their body, and contemporary medicine struggles to treat and even accept an illness where pain seems to be rooted in the mind or brain, rather than a bodily injury.

Patients typically see upwards of 10 specialists before they’re diagnosed with fibromyalgia, says Liptan, who is now a doctor and founder of the The Frida Center for Fibromyalgia in Portland, Oregon (the center is named for the artist Frida Kahlo, who some doctors and art historians believe suffered from fibromyalgia). One study of 51 patients found it took, on average, seven years to get a diagnosis.

Artificial intelligence, though, has the potential to make a diagnosis in minutes. Last year, researchers used machine learning to distinguish the brain scans of those with fibromyalgia from those without, and had 93% accuracy.

The implications are immense: Decoding the brain signature for fibromyalgia could hold the key to understanding the disease and which treatments work for which patients. But it’s also a definitive, objective sign that fibromyalgia really does exist.

There’s no accepted criteria for diagnosing fibromyalgia. There is no known biological malfunction, nor is there any biomarker that can be uncovered in a lab test. Patients experience pain all over their body, fatigue, insomnia, difficulty focusing, depression, and 18 “tender points”—including the back of the neck, elbows, and knees—that are sore to the touch. Antidepressants, painkillers, physical therapy, acupuncture, massage, counseling, and exercise are all used to treat the condition, with varying effects.

Online support groups discuss the benefits of alternative treatments, such as hypnosis or turmeric supplements, and are often the only forum where those with fibro can find a sympathetic audience for their frustration over suffering from a disease no one understands. Both patients and researchers believe skepticism around the illness partly reflects gender discrimination: Close to 90% of fibromyalgia patients are women.

Close to 90% of fibromyalgia patients are women.

Every week, Liptan argues with insurance companies about whether her patients really are in pain and if fibromyalgia is a legitimate condition. “For most of my patients, that’s the hardest thing for them. It’s not the illness but the judgment that they get from other people,” she says. “People with fibromyalgia look fine; our lab tests are fine. Maybe we’re just lazy [and] we should suck it up?” The millions of people (an estimated 3% to 6% of the population) worldwide who experience fibromyalgia know that their pain is real. Proving this to others, though, is a perpetual challenge.

Zack Rosebrugh for Quartz

The researchers who successfully used machine learning to identify fibromyalgia patients started by using fMRI machines to capture images of the brain signals of 37 fibromyalgia patients and 35 healthy people used as a control group. All the participants had pressure applied to their right thumbnail to create “severe but tolerable pain,” explained the researchers in their paper, published in the journal Pain last year. Those with fibromyalgia experienced more pain compared to the healthy controls, according to a neurological signature of physical pain, as well as different activity in the insula area of the brain, related to sensory integration, and the medial prefrontal cortex, which is important for emotional regulation. Collectively, these different neurological responses created a brain signature for fibromyalgia patients. A machine-learning algorithm that was programmed to recognize this neurological signature was able to use it to predict which brain scans were indicative of fibromyalgia and which were not.

As such, neuroimaging combined with artificial intelligence was able to create an objective snapshot of what, to date, has been characterized as a subjective sensation. It made perceptible an experience that was previously unknowable to anyone but the patient.

This study was small, and it will take years, likely at least a decade, before such techniques can be used in a clinical setting. The findings from this small dataset cannot be extrapolated or applied to other patients, and so researchers will need to repeat the process with thousands more.

But it has still provided hope to many. Marina López-Solà, a professor at the Cincinnati Children’s Hospital, affiliated with the University of Cincinnati, and co-author of the study, says she’s received dozens of emails from fibromyalgia patients saying how relieved they are by her findings. She’s also gotten plenty of letters from doctors expressing similar relief that her research provides evidence for the existence of fibromyalgia. The lack of clear biomarkers can make it difficult for doctors to definitively diagnose and treat fibromyalgia, but López-Solà’s work provides hope that researchers are on the right path.

“There are still providers who don’t understand it or think it’s real.”

López-Solà’s research is compelling evidence to convince those who are reluctant to accept the existence of fibromyalgia. “There’s not much uncertainty among people in the pain field who read this literature,” says Daniel Clauw, a professor at the University of Michigan and director of the school’s Chronic Pain and Fatigue Research Center. “But in the general medical field there are still providers who don’t understand it or think it’s real.”

Some old-fashioned physicians may never change their preconceptions that conditions such as fibromyalgia exist, says Clauw. “The classic biomedical model is there’s something broken and you find it, you do surgery and repair it and the person’s better. A lot of illnesses don’t follow that model. Chronic pain doesn’t follow that model,” he says. “It’s a pretty big leap to try to re-teach people that you can have pain in your knee because of a problem in the way your brain is processing pain.”

Machine learning was an essential tool in distinguishing fibromyalgia patients from healthy controls. “If we hadn’t used machine learning, we wouldn’t have been able to identify the pattern of brain activity that was most predictive of patient status, and we would not have been able to say anything about an individual patient,” says López-Solà. Machine learning was the only way to do such deep and wide-raging statistical analysis on brain activity. “There’s a tremendous amount of information in that dataset,” says Robert Coghill, director of research at Cincinnati Children’s Hospital’s department of anesthesiology. “They [machine learning techniques] pick up on features that untrained humans might not perceive as significant.”

Zack Rosebrugh for Quartz

It’s not yet clear whether the brain signals symptomatic of fibromyalgia are reflecting the experience of pain, the brain malfunctions that cause the pain, or some combination of the two. In general, patterns in the physical brain both cause and represent the sensations that play out in the mind. And so a biomarker that can definitively identify fibromyalgia should help patients get the serious consideration and treatment they need.

Every mental experience is “the consequence of something that’s happening at another level, the physiological processes,” says López-Solà. “The emerging properties of those underlying processes are what we refer to as the mind.” When patients talk of their pain, that subjective report is “the tip of the iceberg,” she says. “Neuroimaging is starting to have the potential to provide information about the pathophysiology of such pain symptoms, information that is below the surface.”

[It’s] “the tip of the iceberg.”

Some fibromyalgia patients experience stronger depressive symptoms whereas others struggle more with the pain or difficulty concentrating. It’s likely different brain mechanisms cause the various symptoms of the disease, and López-Solà hopes machine learning will eventually be able to tell which patients are suffering which symptoms. Ultimately, the goal is to be able to neuroimage patients before and after treatment, in order to better determine what works best for each individual; whether there’s a type of fibromyalgia sufferer who will definitely improve after hypnosis, for example. This would dramatically improve the pace of treatment compared to today, where fibromyalgia sufferers typically spend years in pain as they try multiple options before finding a treatment plan that reduces their symptoms.

There are limits, though, to the insights artificial intelligence can provide. Though neuroimaging provides new information, it still doesn’t offer a perfectly accurate picture. Analyzing the neurological responses of thousands more patients would certainly increase accuracy, but reading any given individual brain is a complicated and messy business, and brain signatures provide guidance at best, and certainly not a definitive checklists of symptoms.

Researchers are also adamant that machine learning should not be used to claim that any one patient is free from pain. “The brain can generate pain in potentially very different ways. The fact that you know one or two or three [brain signals for fibromyalgia] doesn’t mean you know the others,” adds López-Solà.

“In no way could this be used for not giving people treatment. We have false negatives—we have people who have pain but do not show expression of the marker,” says López-Solà. “It would be deeply wrong, unethical and technically incorrect to use a negative response in these markers to not give treatment to patients.”

This is the posture medical science already takes towards other difficult-to-diagnose diseases: An ultrasound might show signs of endometriosis lesions, for example, but doctors know that a clear scan doesn’t rule out the condition, either. The point is that even with all our tools, it’s difficult to accurately look inside the body.

Medical researchers must not forget the value of subjective experience.

Though plenty can be learned from objective data, medical researchers must not forget the value of subjective experience. Liptan points to earlier research showing that patients’ self-reports of pain are the most accurate means of classifying patients with fibromyalgia. “I think the biggest downside is taking away the component where doctors are listening to their patients and taking into account self report,” says Liptan. “My concern is if someone says they have pain and then they stick them in an MRI machine that says, ‘no pain,’ where does that leave that patient?”

The value of doctors listening to their patients is a cornerstone of any medical treatment. But many doctors fail to do so and, even in cases where they are willing, such conversations can be impossible. There are plenty of patients who cannot communicate the pain they’re in: Those with disabilities that make it difficult for them to talk, elderly patients who can struggle with confusion as well as pain, and newborn children who can’t yet express themselves. And there are plenty of other diseases that, like fibromyalgia, don’t necessarily come with clear-cut physical symptoms. Those who suffer from conditions such as Lyme disease, back pain, and chronic fatigue syndrome know what it’s like to be in terrible pain without being able to point to the physical cause. Patients who fall in any of these categories are likely to benefit from artificial intelligence’s ability to perceive their suffering.

Zack Rosebrugh for Quartz

The effort to objectively capture a physical image of pain is, in some ways, inherently at odds with the amorphous, subjective experience of feeling pain. But the way patients know their symptoms is necessarily different from doctors’ knowledge of their condition. Allowing machines to peer inside mental experiences means that, for the first time, patients can know that their suffering is truly seen.

This is the second in a series of articles on the impact of artificial intelligence on health care and medicine. Click here to sign up to get alerted when new stories are published.