{"status":"ok","message-type":"work","message-version":"1.0.0","message":{"indexed":{"date-parts":[[2026,10,29]],"date-time":"2026-10-29T12:34:32Z","timestamp":1793277272298,"version":"4.5.0"},"reference-count":36,"publisher":"Frontiers Media SA","license":[{"start":{"date-parts":[[2026,8,27]],"date-time":"2026-08-27T00:00:00Z","timestamp":1787788800000},"content-version":"vor","delay-in-days":0,"URL":"https:\/\/creativecommons.org\/licenses\/by\/4.0\/"}],"content-domain":{"domain":["frontiersin.org"],"crossmark-restriction":true},"short-container-title":["Front. Artif. Intell."],"abstract":"<jats:sec>\n                    <jats:title>Background<\/jats:title>\n                    <jats:p>Recent advances in machine learning and natural language processing (NLP) have enabled the early identification of mental disorders from social media content. Among such platforms, Reddit is characterized by linguistically rich, long-form narratives in which users describe their psychological symptoms, emotions, and personal experiences. However, these datasets present significant challenges for text classification because the posts are lengthy, voluminous, and class-imbalanced. In this study, we revisit the concept of a segmentation-based, expression-weighted representation that emphasizes clinically relevant language while suppressing irrelevant content. During this investigation, we identify a critical limitation in conventional preprocessing pipelines\u2014specifically, the application of chunking and oversampling prior to the train\u2013test split\u2014which introduces data leakage and consequently inflates reported performance. To address this issue, we propose a leakage-safe evaluation protocol together with a domain-informed density extraction method that identifies clinically dense passages using a lexicon derived exclusively from the training data.<\/jats:p>\n                  <\/jats:sec>\n                  <jats:sec>\n                    <jats:title>Results<\/jats:title>\n                    <jats:p>\n                      The proposed method was evaluated using logistic regression, linear SVM, XGBoost, fastText, RNN, and TextCNN, together with a transformer-based baseline (MentalBERT), all under a leakage-safe evaluation protocol. After eliminating data leakage, the apparent advantage of naive weighted chunking disappeared, and the headline macro-F1 score decreased from approximately 0.96 to 0.67. In contrast, the proposed domain-informed density extraction method consistently outperformed fixed-window chunking in five of the six models and matched or exceeded the full-text baseline in several cases. Statistically significant improvements were observed for logistic regression, RNN, and fastText, despite using only a fraction of the input text. For the context-limited transformer, density-based selection significantly outperformed naive truncation (macro-F1\u202f+\u202f0.023, 95% CI [+0.006, +0.041],\n                      <jats:italic>p<\/jats:italic>\n                      \u202f=\u202f0.008).\n                    <\/jats:p>\n                  <\/jats:sec>\n                  <jats:sec>\n                    <jats:title>Conclusion<\/jats:title>\n                    <jats:p>Our findings demonstrate that a leakage-safe evaluation protocol is essential for producing credible results in mental health classification from long social media posts. They further show that domain-informed density extraction provides a robust and practical text representation, with its greatest benefits emerging when models are unable to process the entire post. By selectively preserving clinically informative content while reducing input length, the proposed approach offers an effective and computationally efficient alternative to increasingly complex model architectures.<\/jats:p>\n                  <\/jats:sec>","DOI":"10.3389\/frai.2026.1861620","type":"journal-article","created":{"date-parts":[[2026,8,27]],"date-time":"2026-08-27T05:34:36Z","timestamp":1787808876000},"update-policy":"https:\/\/doi.org\/10.3389\/crossmark-policy","source":"Crossref","is-referenced-by-count":1,"title":["Domain-informed density extraction for robust mental health classification of long social media posts"],"prefix":"10.3389","volume":"9","author":[{"given":"Rafat","family":"Hammad","sequence":"first","affiliation":[{"name":"Faculty of Information Technology and Computer Sciences, Yarmouk University","place":["Irbid, Jordan"]}],"role":[{"vocabulary":"crossref","role":"author"}]},{"given":"Suha","family":"Rababah","sequence":"additional","affiliation":[{"name":"Faculty of Information Technology and Computer Sciences, Yarmouk University","place":["Irbid, Jordan"]}],"role":[{"vocabulary":"crossref","role":"author"}]}],"member":"1965","published-online":{"date-parts":[[2026,8,27]]},"reference":[{"key":"ref1","doi-asserted-by":"publisher","first-page":"123","DOI":"10.32604\/cmc.2022.022609","article-title":"Attention-based bi-LSTM model for Arabic depression classification","volume":"71","author":"Almars","year":"2022","journal-title":"Comput. Mater. Contin."},{"key":"ref2","doi-asserted-by":"publisher","first-page":"551","DOI":"10.32604\/csse.2023.031048","article-title":"A deep learning model to analyse social-cyber psychological problems in youth","volume":"46","author":"Alqazzaz","year":"2023","journal-title":"Comput. Syst. Sci. Eng."},{"key":"ref3","doi-asserted-by":"publisher","first-page":"676","DOI":"10.3390\/electronics11050676","article-title":"Deep learning for depression detection from textual data","volume":"11","author":"Amanat","year":"2022","journal-title":"Electronics"},{"key":"ref4","doi-asserted-by":"publisher","first-page":"74","DOI":"10.1007\/s42979-021-00958-1","article-title":"Sentiment analysis in social media data for depression detection using artificial intelligence: a review","volume":"3","author":"Babu","year":"2022","journal-title":"SN Comput. Sci."},{"key":"ref5","doi-asserted-by":"publisher","first-page":"649","DOI":"10.1017\/s1351324916000383","article-title":"Natural language processing in mental health applications using non-clinical texts","volume":"23","author":"Calvo","year":"2017","journal-title":"Nat. Lang. Eng."},{"key":"ref6","doi-asserted-by":"publisher","first-page":"e23205","DOI":"10.2196\/23205","article-title":"Social media and health care, part I: literature review of social media use by health care providers","volume":"23","author":"Farsi","year":"2021","journal-title":"J. Med. Internet Res."},{"key":"ref7","doi-asserted-by":"publisher","first-page":"100225","DOI":"10.1016\/j.osnem.2022.100225","article-title":"Early depression detection in social media based on deep learning and underlying emotions","volume":"31","author":"Figueiredo","year":"2022","journal-title":"Online Soc. Netw. Media"},{"key":"ref8","doi-asserted-by":"publisher","first-page":"357","DOI":"10.2967\/jnumed.117.190397","article-title":"Machine learning will change medicine","volume":"58","author":"Forsting","year":"2017","journal-title":"J. Nucl. Med."},{"key":"ref9","doi-asserted-by":"publisher","first-page":"29","DOI":"10.22219\/kinetik.v9i1.1849","article-title":"Mental health prediction model on social media data using CNN-BiLSTM","volume":"9","author":"Fudholi","year":"2024","journal-title":"Kinetik"},{"key":"ref10","doi-asserted-by":"publisher","first-page":"45141","DOI":"10.1038\/srep45141","article-title":"Characterisation of mental health conditions in social media using informed deep learning","volume":"7","author":"Gkotsis","year":"2017","journal-title":"Sci. Rep."},{"key":"ref11","doi-asserted-by":"publisher","first-page":"10955","DOI":"10.1007\/s00521-024-09642-w","article-title":"A BERT-encoded ensembled CNN model for suicide risk identification in social media posts","volume":"36","author":"Gorai","year":"2024","journal-title":"Neural Comput. Appl."},{"key":"ref12","doi-asserted-by":"publisher","first-page":"2188","DOI":"10.3390\/ejihpe13060078","article-title":"The role of social media as a resource for mental health care","volume":"11","author":"Herrera-Peco","year":"2023","journal-title":"Healthcare"},{"key":"ref13","first-page":"147","author":"Jiang","year":"2020"},{"key":"ref14","first-page":"137","author":"Joachims","year":"1998"},{"key":"ref15","first-page":"562","author":"Johnson","year":"2017"},{"key":"ref16","first-page":"427","author":"Joulin","year":"2017"},{"key":"ref17","first-page":"1746","author":"Kim","year":"2014"},{"key":"ref18","first-page":"1045","article-title":"Recurrent neural network based language model","author":"Mikolov","year":"2010"},{"key":"ref19","doi-asserted-by":"publisher","first-page":"372","DOI":"10.1093\/pan\/mpn018","article-title":"Fightin' words: lexical feature selection and evaluation for identifying the content of political conflict","volume":"16","author":"Monroe","year":"2008","journal-title":"Polit. Anal."},{"key":"ref20","first-page":"36","article-title":"A scalable tree boosting system: XGBoost","volume":"7","author":"Nalluri","year":"2020","journal-title":"Int. J. Res. Stud. Sci. Eng. Technol."},{"key":"ref21","doi-asserted-by":"crossref","first-page":"33","DOI":"10.1186\/s40537-022-00575-6","article-title":"Stress detection using natural language processing and machine learning over social interactions","volume":"9","author":"Nijhawan","year":"2022","journal-title":"J. Big Data"},{"key":"ref22","doi-asserted-by":"publisher","first-page":"624","DOI":"10.1080\/26408066.2020.1788478","article-title":"Social media and suicide: a validation of terms to help identify suicide-related social media posts","volume":"17","author":"Parrott","year":"2020","journal-title":"J Evidence Based Soc. Work (2019)"},{"key":"ref23","first-page":"1310","author":"Pascanu","year":"2013"},{"key":"ref24","first-page":"arXiv.2503.07653","article-title":"Early detection of mental health issues using social media posts","author":"Saeed","year":"2025","journal-title":"arXiv"},{"key":"ref25","doi-asserted-by":"publisher","first-page":"122","DOI":"10.1016\/j.dib.2016.11.056","article-title":"A corpus for mining drug-related knowledge from twitter chatter: language models and their utilities","volume":"10","author":"Sarker","year":"2017","journal-title":"Data Brief"},{"key":"ref26","doi-asserted-by":"publisher","first-page":"2069","DOI":"10.3758\/s13428-020-01531-z","article-title":"How do you feel? Using natural language processing to automatically rate emotion in psychotherapy","volume":"53","author":"Tanana","year":"2021","journal-title":"Behav. Res. Methods"},{"key":"ref27","doi-asserted-by":"publisher","first-page":"987","DOI":"10.11591\/eei.v12i2.4182","article-title":"Depression detection in social media comments data using machine learning algorithms","volume":"12","author":"Vasha","year":"2023","journal-title":"Bull. Electr. Eng. Inform."},{"key":"ref28","first-page":"491","article-title":"Social media and health care professionals: benefits, risks, and best practices","volume":"39","author":"Ventola","year":"2014","journal-title":"P T."},{"key":"ref29","first-page":"37","author":"Wang","year":"2020"},{"key":"ref30","doi-asserted-by":"publisher","first-page":"2074","DOI":"10.1109\/tcss.2022.3200213","article-title":"Depression screening in humans with AI and deep learning techniques","volume":"10","author":"Wani","year":"2022","journal-title":"IEEE Trans. Comput. Soc. Syst."},{"key":"ref31","doi-asserted-by":"publisher","first-page":"1555","DOI":"10.52436\/1.jutif.2025.6.3.4874","article-title":"Depression detection using CNN and BiLSTM with BERT variations and FastText","volume":"6","author":"Widjayanto","year":"2025","journal-title":"J. Tek. Inform."},{"key":"ref32","doi-asserted-by":"publisher","first-page":"46","DOI":"10.1038\/s41746-022-00589-7","article-title":"Natural language processing applied to mental illness detection: a narrative review","volume":"5","author":"Zhang","year":"2022","journal-title":"npj Digit. Med."},{"key":"ref33","first-page":"arXiv.2502.04342","article-title":"Tutorial on using machine learning and deep learning models for mental illness detection","author":"Zhang","year":"2025","journal-title":"arXiv"},{"key":"ref34","first-page":"649","article-title":"Character-level convolutional networks for text classification","volume":"28","author":"Zhang","year":"2015","journal-title":"Adv Neural Inf Process Syst"},{"key":"ref35","doi-asserted-by":"publisher","first-page":"63284","DOI":"10.1109\/ACCESS.2025.3559170","article-title":"Mental health safety and depression detection in social media text data","volume":"13","author":"Zhou","year":"2025","journal-title":"IEEE Access"},{"key":"ref36","first-page":"24","author":"Zirikly","year":"2019"}],"container-title":["Frontiers in Artificial Intelligence"],"original-title":[],"link":[{"URL":"https:\/\/www.frontiersin.org\/articles\/10.3389\/frai.2026.1861620\/full","content-type":"unspecified","content-version":"vor","intended-application":"similarity-checking"}],"deposited":{"date-parts":[[2026,8,27]],"date-time":"2026-08-27T05:34:38Z","timestamp":1787808878000},"score":1,"resource":{"primary":{"URL":"https:\/\/www.frontiersin.org\/articles\/10.3389\/frai.2026.1861620\/full"}},"subtitle":[],"short-title":[],"issued":{"date-parts":[[2026,8,27]]},"references-count":36,"alternative-id":["10.3389\/frai.2026.1861620"],"URL":"https:\/\/doi.org\/10.3389\/frai.2026.1861620","relation":{},"ISSN":["2624-8212"],"issn-type":[{"value":"2624-8212","type":"electronic"}],"subject":[],"published":{"date-parts":[[2026,8,27]]},"article-number":"1861620"}}