AI can help us understand chronic pain better
A UOC study reveals that language models such as GPT-4 can assess the severity of pain based on narratives with accuracy close to that of expertsThese results would support the use of this resource to explain pain; it provides more nuance than tests, but is not being used because specialists lack resources
Researchers from the Artificial Intelligence and Data for Society (AID4So) group, part of the UOC-TECH Research Centre at the Universitat Oberta de Catalunya (UOC), have carried out a pioneering study that explores how artificial intelligence (AI), and in particular large language models such as GPT-4, can ally with healthcare professionals and patients to assess the experience of chronic pain more quickly and in greater depth.
The study, led by Rubén Nieto, professor at the Faculty of Psychology and Education Sciences, has focused on the analysis of dozens of narratives written by patients with fibromyalgia, a syndrome that is especially complex as it is difficult to diagnose and has a profound impact on patients. The study has shown that AI can analyse personal descriptions of pain with results comparable to those of clinical experts, opening up an innovative avenue to complement medical care. However, despite its utility, it is often not used because of the difficulties involved in implementing it.
Chronic pain is, by definition, a subjective and multifaceted experience. The standardized questionnaires normally used to assess it during consultations, although essential, do not always succeed in capturing the emotional and contextual richness of what the patient feels. Written narratives are another valuable tool, as they allow people to describe in their own words how the pain evolves, how it affects their work, family and emotional life, and what treatments have been tried. Although this approach has been demonstrated to be extremely valuable, its clinical use tends to be very limited because professionals lack the time needed to analyse the texts.
"This is where artificial intelligence comes in. The central idea of the research arises from the need to improve the evaluation of chronic pain with solutions that can viably be used in clinical practice, without losing the richness of narratives," explained Rubén Nieto. The contributors to the study, published as open access in the Journal of Medical Internet Research, also included Jacopo Amidei, Andreas Kaltenbrunner and Gregorio Ferreira, from the UOC's AID4So group, and researchers from Hospital Vall d'Hebron in Barcelona.
AI as a clinical assistant
Based on 43 narratives of fibromyalgia patients with chronic pain, the study has shown that GPT-4 can assign scores for the severity of pain and the level of disability it causes in patients, and that its assessments are very close to those made by human experts. On a scale of 0 to 10, the average difference between the AI scores and those of the experts was just 1.2 points when assessing the severity of pain and 1.4 points in terms of disability. Moreover, AI assessments showed a significant correlation with standardized clinical questionnaires such as the Fibromyalgia Impact Questionnaire and the Hospital Anxiety and Depression Scale.
"The comparisons between the scores generated by GPT-4 and those of the experts were significantly similar, but AI doesn't just give a number: it also offers understandable explanations as to why it reaches that conclusion, helping human professionals to interpret and verify the results," explained Amidei, co-author of the study. "The key message is that AI doesn't replace the specialist, but rather acts as a clinical assistant, streamlining assessment and allowing for a deeper understanding of the subjective experience of pain," added Kaltenbrunner.
Detecting hidden signs
The research also suggests AI could help to detect psychosocial signs linked to pain, such as anxiety and depression, factors that aggravate the experience of pain in many cases. Moreover, according to the authors, the prolonged monitoring over time of the same patient's successive narratives would allow for the observation of subtle changes in the evolution of the condition or in coping strategies, providing added value to the medical controls.
Even so, the researchers warn that AI still has certain limitations. The study, which combined independent assessments, repetitions and blind testing to ensure that the results were as objective and robust as possible, demonstrated that GPT-4 tends to slightly overestimate the severity of pain and avoids using extreme scores, which could skew the results. The specialists are clear, therefore, that these tools must continue to evolve and always be used under clinical supervision. "AI helps to make narratives viable in practice, but it never replaces human judgement," Nieto stressed.
Source of support resources for patients and physicians
In the study of pain, where subjectivity is inevitable and many patients feel misunderstood, AI stands out as a rich source of resources for the treatment and support of patients who suffer from chronic pain, who account for more than 20% of the world's population. Apart from the benefits derived from this research, AI can be used to design personalized treatment strategies, cross-referencing data from various sources, including medical records, lifestyle habits or patient narratives.
There are already applications to detect pain in people who have difficulty expressing themselves verbally, such as patients with cognitive impairment, through the analysis of their facial expressions, and work is also being done to get AI to determine which cases require priority treatment or a review in greater depth.
One of the most interesting possibilities is the creation of a system that interacts with patients to record their descriptions of pain and produce a rapid automated report with an accurate personalized assessment that the doctor can analyse before seeing the patient, optimizing the use of clinical care time. This is, indeed, one of the projects the AID4So researchers are already working on. They are currently recruiting adult volunteers who have experienced chronic pain for more than three months to respond to a survey and complete a narrative that will serve to train AINarratives, the new system they are developing. The UOC team is also working to extend the research to other types of chronic pain and to more diverse samples of patients, in order to test tools that can be integrated into routine healthcare.
"In the coming years, language models will become increasingly accurate, multilingual and able to offer more verifiable explanations, allowing patients to express themselves in their mother tongue and allowing clinicians to have reliable and transparent analyses," the authors predict.
International events in Barcelona for the Global Day Against Pain
The Global Day Against Pain is held every year on 17 October. This year, between 16 and 18 October, Barcelona will host the Congress of the Spanish Multidisciplinary Pain Society and a Conference on Pain and Psychology organized by the Society. Nieto will take part as a speaker at both events to present the latest advances in the use of AI in the assessment and treatment of pain and how to integrate these new resources into day-to-day clinical practice. "AI doesn't eliminate pain, but it can act as a bridge between the patient's private experience and medical care, turning personal stories into useful clinical knowledge," concluded Nieto.
This research project is aligned with the UOC's research missions in Ethical and human-centred technology, Digital health and planetary well-being, and Digital transition and sustainability. It also contributes to UN Sustainable Development Goals (SDG) 3, Good Health and Well-being, 9, Industry, Innovation and Infrastructure, and 10, Reduced Inequalities.
Reference article:
Amidei, J., Nieto, R., Kaltenbrunner, A., Ferreira de Sá, J. G., Serrat, M., & Albajes, K. (2025). Exploring the Capacity of Large Language Models to Assess the Chronic Pain Experience: Algorithm Development and Validation. Journal of Medical Internet Research, 27, e65903. https://www.jmir.org/2025/1/e65903
Transformative, impactful research
At the UOC, we see research as a strategic tool to advance towards a future society that is more critical, responsible and nonconformist. With this vision, we conduct applied research that's interdisciplinary and linked to the most important social, technological and educational challenges.
The UOC’s over 500 researchers and more than 50 research groups are working in five research units focusing on five missions: lifelong learning; ethical and human-centred technology; digital transition and sustainability; culture for a critical society, and digital health and planetary well-being.
The university's Hubbik platform fosters knowledge transfer and entrepreneurship in the UOC community.
More information: www.uoc.edu/en/research
Experts UOC
Press contact
-
Anna Sánchez-Juárez