EUVIMEDOpdag EUVIMED
Open access

Exploring the Narratives of Patients With Cancer Using Large Language Models: Topic Modeling and Social Network Analysis

Xinyu Feng, Hin Chi Kwok, Ching Kok Chung, Janelle Yorke, Vivian Hui

Journal of Medical Internet Research · 2026-07-06 · 28 · e92539-e92539

DOI: 10.2196/92539 ↗

At a glance

Journal article in Journal of Medical Internet Research, published online on 2026-07-06. Written by Xinyu Feng and 4 co-authors. Institution: School of Nursing, The Hong Kong Polytechnic University, 11 Yuk Choi Road, Hung Hom, Kowloon, China (Hong Kong), 852 27664691. Major MEDLINE topics: Neoplasms, Narration, Social Network Analysis. Cited 1 times so far (Crossref); 36 references. The full text is freely available in PubMed Central.

AbstractSubjectsBibliografiske oplysningerCiteRelated studies

Abstract (original language)

Background

Patients with cancer often experience diverse psychosocial stressors that profoundly affect disease trajectories, treatment adherence, and overall quality of life. Understanding how patients experience and articulate these issues is critical for designing patient-centered interventions. Conventional data collection methods, such as surveys and interviews, provide depth but are constrained by recall bias and scalability and may overlook sensitive or underreported concerns. Patient-authored narratives in online health communities present a valuable opportunity to identify prevalent and underserved issues. However, critical analytic challenges remain in generating coherent and interpretable insights due to their unstructured and large-scale nature.

Objective

This study aims to leverage TopicGPT, a prompt-based topic modeling framework powered by large language models (LLMs), in combination with network analysis for interpretable topic discovery and interrelationship analysis in the narratives of patients with cancer.

Methods

Patient-authored posts describing psychosocial challenges about cancer experience were collected from 4 online health communities. Eligible posts were preprocessed and analyzed using TopicGPT, wherein topics were generated hierarchically and mapped at the sentence level. Comparison analyses were conducted among 3 state-of-the-art LLMs through cosine similarity and manual evaluation. Results from the best-performing LLM were further compared with 2 conventional topic models through topic diversity and were used to construct the network subsequently. Topic co-occurrence was examined using the pointwise mutual information algorithm and centrality metrics to reveal influential topics and thematic interconnections across narratives.

Results

A total of 11,306 posts were collected from Reddit, Macmillan, Mijian, and Douban between December 6, 2006, and September 24, 2025. Of these, 3169 posts were retained for topic modeling and network analysis. DeepSeek-V3.2 consistently outperformed Gemini-2.5-Flash and GPT-4o, with similarity scores of 0.6295, 0.5342, and 0.5247, respectively. TopicGPT maintained consistently high topic diversity across languages. “Fear of cancer recurrence” and “Psychological distress” emerged as both most frequent and bridging topics across a hierarchy comprising 42 top-level and 58 subtopics. Strong connections were observed among “Sexual health concerns,” “Reproductive concerns,” and “Quality of life impact”; “Family communication concerns” frequently co-occurred with “Employment concerns,” “Diagnostic delays and misdiagnosis,” and “Social support.” Conclusions This study demonstrates the potential of LLM-based topic modeling for large-scale, context-sensitive analysis of patient-authored narratives. The proposed integrated, domain-adaptable pipeline enables the identification of high-fidelity topics and their interrelationships, offering a scalable and interpretable approach to qualitative data in health care. Importantly, our findings reveal substantial concerns and unmet needs among patients with cancer, with potential to support patient-centered research and inform future clinical assessment and supportive care strategies.

Subjects

MeSH terms (MEDLINE)

NeoplasmsNarrationSocial Network AnalysisHumansLarge Language Models

Author keywords

TopicGPTcancerlarge language modelnetwork analysispsychosocial stressorstext miningtopic modeling

Authors and institutions

  • School of Nursing, The Hong Kong Polytechnic University, 11 Yuk Choi Road, Hung Hom, Kowloon, China (Hong Kong), 852 27664691.
  • School of Nursing, University of Manchester, Manchester, United Kingdom.
  • Department of Health and Community Sytems, School of Nursing, University of Pittsburgh, Pittsburgh, PA, United States.

Cite

APA

Feng, X., Kwok, H. C., Chung, C. K., Yorke, J., & Hui, V. (2026). Exploring the Narratives of Patients With Cancer Using Large Language Models: Topic Modeling and Social Network Analysis. Journal of Medical Internet Research, 28, e92539-e92539. https://doi.org/10.2196/92539

Vancouver

Feng X, Kwok HC, Chung CK, Yorke J, Hui V. Exploring the Narratives of Patients With Cancer Using Large Language Models: Topic Modeling and Social Network Analysis. Journal of Medical Internet Research. 2026;28:e92539-e92539. doi:10.2196/92539

BibTeX
@article{Feng2026,
  author = {Feng, Xinyu and Kwok, Hin Chi and Chung, Ching Kok and Yorke, Janelle and Hui, Vivian},
  title = {Exploring the Narratives of Patients With Cancer Using Large Language Models: Topic Modeling and Social Network Analysis},
  journal = {Journal of Medical Internet Research},
  year = {2026},
  volume = {28},
  pages = {e92539--e92539},
  doi = {10.2196/92539}
}
Start for free →