Natural language processing reveals network structure of pain communication in social media using discrete mathematical analysis
- PMID: 40783425
- PMCID: PMC12335456
- DOI: 10.1038/s41598-025-14680-y
Natural language processing reveals network structure of pain communication in social media using discrete mathematical analysis
Abstract
Pain-related discussions on social media provide valuable insights into how people naturally express and communicate their pain experiences. However, the network structure of these discussions remains poorly understood. This study analyzed 57,000 Reddit comments from the GoEmotions dataset (2005-2019) using natural language processing and network analysis techniques grounded in discrete mathematical principles. The constructed network, comprising 5,630 nodes and 86,972 edges, revealed complex patterns of pain-related language use. The network exhibited a sparse overall density (0.0055) but a high clustering coefficient (0.7700), indicating the presence of distinct thematic communities. At the center of the network was the term pain, which showed the highest degree centrality (0.821429), reflecting its semantic anchoring function in pain discourse. Other terms, such as headache, served as context-sensitive bridge nodes that connected different semantic subdomains. In contrast, terms like burning, despite moderate centrality values, were found to co-occur predominantly with metaphorical or decorative expressions rather than emotion- or symptom-related descriptors. Community detection revealed 12 distinct clusters, with the largest containing 1,021 nodes, capturing diverse aspects of pain communication. Stability analysis demonstrated that core pain-related terms maintained consistent centrality, while peripheral or metaphorical terms showed greater variability. These findings offer novel insights into the semantic structure of pain discourse and suggest that network analysis of social media discussions can inform improved clinical communication and symptom assessment.
Keywords: Digital health communication; Discrete mathematics in health communication; Natural language; Pain assessment in social media; Pain perception; Symptom network analysis.
© 2025. The Author(s).
Conflict of interest statement
Competing interests: The authors declare no competing interests. Generative AI and AI-assisted technologies in the writing process: We used Python libraries with machine learning capabilities for statistical analysis and network visualization. However, no generative AI or AI-assisted technologies were used in the writing or editing of the manuscript text.
Figures





Similar articles
-
Short-Term Memory Impairment.2024 Jun 8. In: StatPearls [Internet]. Treasure Island (FL): StatPearls Publishing; 2025 Jan–. 2024 Jun 8. In: StatPearls [Internet]. Treasure Island (FL): StatPearls Publishing; 2025 Jan–. PMID: 31424720 Free Books & Documents.
-
Analyzing Reddit Forums Specific to Abortion That Yield Diverse Dialogues Pertaining to Medical Information Seeking and Personal Worldviews: Data Mining and Natural Language Processing Comparative Study.J Med Internet Res. 2024 Feb 14;26:e47408. doi: 10.2196/47408. J Med Internet Res. 2024. PMID: 38354044 Free PMC article.
-
Agendas on Nursing in South Korea Media: Natural Language Processing and Network Analysis of News From 2005 to 2022.J Med Internet Res. 2024 Mar 19;26:e50518. doi: 10.2196/50518. J Med Internet Res. 2024. PMID: 38393293 Free PMC article.
-
Psychological therapies for panic disorder with or without agoraphobia in adults: a network meta-analysis.Cochrane Database Syst Rev. 2016 Apr 13;4(4):CD011004. doi: 10.1002/14651858.CD011004.pub2. Cochrane Database Syst Rev. 2016. PMID: 27071857 Free PMC article.
-
Systemic pharmacological treatments for chronic plaque psoriasis: a network meta-analysis.Cochrane Database Syst Rev. 2021 Apr 19;4(4):CD011535. doi: 10.1002/14651858.CD011535.pub4. Cochrane Database Syst Rev. 2021. Update in: Cochrane Database Syst Rev. 2022 May 23;5:CD011535. doi: 10.1002/14651858.CD011535.pub5. PMID: 33871055 Free PMC article. Updated.
References
-
- Bradley, M. M. & Lang, P. J. Affective norms for English words (ANEW): instruction manual and affective ratings. Technical report C-2. Univ. Florida, Gainesville (2010).
-
- Ekman, P., Davidson, R. J. & Friesen, W. V. The Duchenne smile: Emotional expression and brain physiology. II. J. Pers. Soc. Psychol.58, 342–353 (1990). - PubMed
-
- Saffar, A. H., Mann, T. K. & Ofoghi, B. Textual emotion detection in health: Advances and applications. J. Biomed. Inform.137, 104258 (2023). - PubMed
-
- Craig, K. D. Toward the social communication model of pain. In Social and Interpersonal Dynamics in Pain (eds Vervoort, T. et al.) 23–41 (Springer, 2018).
MeSH terms
LinkOut - more resources
Full Text Sources
Medical