ResearchJournal of Medical Internet Research · Jul 6, 2026

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

Feng X, Kwok HC, Chung CK, Yorke J, Hui V
Digital Health & AIOncologyAdult
Read the full paper free at PubMed Central ↗
Top Digital Health & AI studies every Monday

The week’s key trials and guidelines, free to read, in one short email. No account; unsubscribe in one click.

Choose specialties and topics

Abstract

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.

More on this topic

AI in medicine

Subject terms

Humans; Large Language Models; Neoplasms; Narration; Social Network Analysis

DOI: 10.2196/92539 · PubMed: 42406894

Cite this article

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. J Med Internet Res. 2026. doi:10.2196/92539

RIS (EndNote, Zotero, Mendeley)BibTeX

Spotted a mistake? Suggest a correction

Similar articles

Research · JNCI Cancer Spectr · Mar 31, 2026 · Oncology

Computational identification of salient cancer care topics and themes in oncology social work notes

Research · J Med Internet Res · Oct 20, 2026 · Digital Health & AI, Oncology

Chinese social media posts reveal cancer symptom experiences and psychosocial concerns

Research · J Med Internet Res · Sep 30, 2026 · Digital Health & AI

Leveraging Generative Large Language Models for Temporal Relation Extraction From French Clinical Narratives: Prompt-Chaining Approach

Research · Pediatrics · Jan 27, 2026 · Pediatric · Pediatrics, Oncology

Bereaved Parents' Narratives of Their Child Who Died of Cancer: A Qualitative Study

Research · BMC Palliat Care · Dec 11, 2025 · Palliative Care, Oncology

Narrative-based study of spiritual health in advanced cancer patients: insights from Macao's cultural context with broader implications for Asia and beyond