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





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