{"status":"ok","message-type":"work","message-version":"1.0.0","message":{"indexed":{"date-parts":[[2026,3,4]],"date-time":"2026-03-04T16:50:31Z","timestamp":1772643031674,"version":"3.50.1"},"reference-count":48,"publisher":"Frontiers Media SA","license":[{"start":{"date-parts":[[2025,11,27]],"date-time":"2025-11-27T00:00:00Z","timestamp":1764201600000},"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:p>Understanding how large language models (LLMs) process emotionally sensitive content is critical for building safe and reliable systems, particularly in mental health contexts. We compare the performance of LLMs of different sizes on two key tasks: trinary classification of emotional safety (safe vs. unsafe vs. borderline) and multi-label classification using a six-category safety risk taxonomy. To support this, we construct a novel dataset by merging several human-authored mental health datasets (&amp;gt; 15K samples) and augmenting them with emotion re-interpretation prompts generated via ChatGPT. We evaluate four LLaMA models (1B, 3B, 8B, 70B) across zero-shot and few-shot settings. Our results show that larger LLMs achieve stronger average performance, particularly in nuanced multi-label classification and in zero-shot settings. However, lightweight fine-tuning allowed the 1B model to achieve performance comparable to larger models and BERT in several high-data categories, while requiring &amp;lt; 2GB VRAM at inference. These findings suggest that smaller, on-device models can serve as viable, privacy-preserving alternatives for sensitive applications, offering the ability to interpret emotional context and maintain safe conversational boundaries. This work highlights key implications for therapeutic LLM applications and the scalable alignment of safety-critical systems.<\/jats:p>","DOI":"10.3389\/frai.2025.1706090","type":"journal-article","created":{"date-parts":[[2025,11,27]],"date-time":"2025-11-27T11:40:06Z","timestamp":1764243606000},"update-policy":"https:\/\/doi.org\/10.3389\/crossmark-policy","source":"Crossref","is-referenced-by-count":1,"title":["Comparative performance of large language models in emotional safety classification across sizes and tasks"],"prefix":"10.3389","volume":"8","author":[{"given":"Edoardo","family":"Pinzuti","sequence":"first","affiliation":[],"role":[{"role":"author","vocabulary":"crossref"}]},{"given":"Oliver","family":"T\u00fcscher","sequence":"additional","affiliation":[],"role":[{"role":"author","vocabulary":"crossref"}]},{"given":"Andr\u00e9","family":"Ferreira Castro","sequence":"additional","affiliation":[],"role":[{"role":"author","vocabulary":"crossref"}]}],"member":"1965","published-online":{"date-parts":[[2025,11,27]]},"reference":[{"key":"B1","doi-asserted-by":"publisher","first-page":"1877","DOI":"10.48550\/arXiv.2005.14165","article-title":"Language models are few-shot learners","volume":"33","author":"Brown","year":"2020","journal-title":"Adv. Neural Inf. Process. Syst"},{"key":"B2","doi-asserted-by":"publisher","first-page":"277","DOI":"10.1111\/papt.12222","article-title":"The digital revolution and its impact on mental health care","volume":"92","author":"Bucci","year":"2019","journal-title":"Psychol. Psychother"},{"key":"B3","doi-asserted-by":"publisher","first-page":"18","DOI":"10.1109\/T-AFFC.2010.1","article-title":"Affect detection: an interdisciplinary review of models, methods, and their applications","volume":"1","author":"Calvo","year":"2010","journal-title":"IEEE Trans. Affect. Comp"},{"key":"B4","doi-asserted-by":"publisher","first-page":"1","DOI":"10.1145\/3392838","article-title":"The role of conversational grounding in supporting symbiosis between people and digital assistants","volume":"4","author":"Cho","year":"2020","journal-title":"Proc. ACM on Human-Comp. Interact"},{"key":"B5","doi-asserted-by":"publisher","first-page":"132","DOI":"10.1186\/s12888-025-06483-2","article-title":"The application of artificial intelligence in the field of mental health: a systematic review","volume":"25","author":"Dehbozorgi","year":"2025","journal-title":"BMC Psychiatry"},{"key":"B6","doi-asserted-by":"publisher","DOI":"10.48550\/arXiv.1810.04805","article-title":"Bert: pre-training of deep bidirectional transformers for language understanding","author":"Devlin","year":"2018","journal-title":"arXiv"},{"key":"B7","article-title":"The llama 3 herd of models","author":"Dubey","year":"2024","journal-title":"arXiv"},{"key":"B8","doi-asserted-by":"publisher","DOI":"10.1002\/isaf.70015","article-title":"Finsentiment: predicting financial sentiment through transfer learning","author":"Ergun","year":"2025","journal-title":"Intellig. Syst. Account. Finance Managem"},{"key":"B9","doi-asserted-by":"publisher","first-page":"5799","DOI":"10.1109\/OJCOMS.2024.3456549","article-title":"LLM-based edge intelligence: A comprehensive survey on architectures, applications, security and trustworthiness","volume":"5","author":"Friha","year":"2024","journal-title":"IEEE Open J. Commun. Soc"},{"key":"B10","doi-asserted-by":"publisher","first-page":"411","DOI":"10.1007\/s11023-020-09539-2","article-title":"Artificial intelligence, values, and alignment","volume":"30","author":"Gabriel","year":"2020","journal-title":"Minds Mach"},{"key":"B11","doi-asserted-by":"publisher","DOI":"10.48550\/arXiv.2209.07858","article-title":"Red teaming language models to reduce harms: Methods, scaling behaviors, and lessons learned","author":"Ganguli","year":"2022","journal-title":"arXiv"},{"key":"B12","doi-asserted-by":"publisher","DOI":"10.18653\/v1\/2023.findings-acl.757","article-title":"An annotated dataset for explainable interpersonal risk factors of mental disturbance in social media posts","author":"Garg","year":"2023","journal-title":"arXiv"},{"key":"B13","doi-asserted-by":"publisher","first-page":"3","DOI":"10.48550\/arXiv.2106.09685","article-title":"Lora: Low-rank adaptation of large language models","volume":"1","author":"Hu","year":"2022","journal-title":"ICLR"},{"key":"B14","doi-asserted-by":"publisher","DOI":"10.48550\/arXiv.2312.06674","article-title":"Llama guard: LLM-based input-output safeguard for human-ai conversations","author":"Inan","year":"2023","journal-title":"arXiv"},{"key":"B15","doi-asserted-by":"publisher","DOI":"10.48550\/arXiv.2001.08361","article-title":"Scaling laws for neural language models","author":"Kaplan","year":"2020","journal-title":"arXiv"},{"key":"B16","doi-asserted-by":"publisher","first-page":"1","DOI":"10.1057\/s41599-025-04532-5","article-title":"Why human-ai relationships need socioaffective alignment","volume":"12","author":"Kirk","year":"2025","journal-title":"Humanit. Soc. Sci. Commun"},{"key":"B17","doi-asserted-by":"publisher","DOI":"10.48550\/arXiv.2307.11991","article-title":"Psy-LLM: Scaling up global mental health psychological services with ai-based large language models","author":"Lai","year":"2023","journal-title":"arXiv"},{"key":"B18","doi-asserted-by":"publisher","first-page":"1234","DOI":"10.1093\/bioinformatics\/btz682","article-title":"Biobert: a pre-trained biomedical language representation model for biomedical text mining","volume":"36","author":"Lee","year":"2020","journal-title":"Bioinformatics"},{"key":"B19","doi-asserted-by":"publisher","DOI":"10.1109\/TSC.2025.3596892","article-title":"TPI-LLM: serving 70b-scale LLMs efficiently on low-resource edge devices","author":"Li","year":"2024","journal-title":"arXiv"},{"key":"B20","doi-asserted-by":"publisher","DOI":"10.1162\/tacl_a_00638","article-title":"Lost in the middle: how language models use long contexts","author":"Liu","year":"2023","journal-title":"arXiv"},{"key":"B21","article-title":"\u201cDora: Weight-decomposed low-rank adaptation,\u201d","author":"Liu","year":"2024","journal-title":"Forty-first International Conference on Machine Learning"},{"key":"B22","doi-asserted-by":"publisher","DOI":"10.48550\/arXiv.2508.07063","article-title":"Towards safer ai moderation: evaluating LLM moderators through a unified benchmark dataset and advocating a human-first approach","author":"Machlovi","year":"2025","journal-title":"arXiv"},{"key":"B23","first-page":"1","article-title":"\u201cSad: a stress annotated dataset for recognizing everyday stressors in sms-like conversational systems,\u201d","author":"Mauriello","year":"2021","journal-title":"Extended Abstracts of the 2021 CHI Conference on Human Factors in Computing Systems"},{"key":"B24","doi-asserted-by":"publisher","DOI":"10.18653\/v1\/2022.emnlp-main.759","article-title":"Rethinking the role of demonstrations: what makes in-context learning work?","author":"Min","year":"2022","journal-title":"arXiv"},{"key":"B25","doi-asserted-by":"publisher","first-page":"1217","DOI":"10.1001\/jama.2017.14151","article-title":"Talking to machines about personal mental health problems","volume":"318","author":"Miner","year":"2017","journal-title":"JAMA"},{"key":"B26","doi-asserted-by":"publisher","first-page":"1008","DOI":"10.3390\/bs13121008","article-title":"Digitally assisted mindfulness in training self-regulation skills for sustainable mental health: a systematic review","volume":"13","author":"Mitsea","year":"2023","journal-title":"Behav. Sci"},{"key":"B27","author":"OpenA","year":"2023","journal-title":"Gpt-3.5 Technical Overview"},{"key":"B28","doi-asserted-by":"publisher","DOI":"10.48550\/arXiv.2203.02155","article-title":"Training language models to follow instructions with human feedback","author":"Ouyang","year":"2022","journal-title":"arXiv"},{"key":"B29","doi-asserted-by":"publisher","first-page":"151","DOI":"10.1023\/A:1018643815520","article-title":"Affective intelligence\u2013the missing link?","volume":"15","author":"Picard","year":"1997","journal-title":"BT Technol. J"},{"key":"B30","doi-asserted-by":"crossref","DOI":"10.7551\/mitpress\/1140.003.0008","volume-title":"Affective Computing","author":"Picard","year":"2000"},{"key":"B31","article-title":"Visually grounded emotion regulation via diffusion models and user-driven reappraisal","author":"Pinzuti","year":"2025","journal-title":"arXiv"},{"key":"B32","first-page":"9","article-title":"\u201cIdentifying depression on reddit: The effect of training data,\u201d","author":"Pirina","year":"2018","journal-title":"Proceedings of the 2018 EMNLP Workshop SMM4H: the 3rd Social Media Mining for Health Applications Workshop"},{"key":"B33","doi-asserted-by":"publisher","DOI":"10.18653\/v1\/D19-1410","article-title":"Sentence-bert: Sentence embeddings using siamese bert-networks","author":"Reimers","year":"2019","journal-title":"arXiv"},{"key":"B34","doi-asserted-by":"publisher","DOI":"10.48550\/arXiv.1910.01108","article-title":"Distilbert, a distilled version of bert: smaller, faster, cheaper and lighter","author":"Sanh","year":"2019","journal-title":"arXiv"},{"key":"B35","doi-asserted-by":"publisher","DOI":"10.36227\/techrxiv.22816586","article-title":"Multiwd: Multiple wellness dimensions in social media posts","author":"Sathvik","year":"2023","journal-title":"TechRxiv"},{"key":"B36","doi-asserted-by":"crossref","first-page":"148","DOI":"10.1109\/ICEAST64767.2025.11088202","article-title":"\u201cFine-tuning ai models with limited resources,\u201d","volume-title":"2025 11th International Conference on Engineering, Applied Sciences, and Technology (ICEAST)","author":"Singhapoo","year":"2025"},{"key":"B37","unstructured":"Taori\n              R.\n            \n            \n              Gulcehre\n              C.\n            \n            \n              Dubois\n              Y.\n            \n            \n              Chang\n              X.\n            \n            \n              Srivastava\n              S.\n            \n            \n              Mirchandani\n              A.\n            \n          \n          Alpaca: A Strong, Replicable Instruction-Following Model\n          \n          2023"},{"key":"B38","article-title":"Persistent instability in LLM's personality measurements: effects of scale, reasoning, and conversation history","author":"Tosato","year":"2025","journal-title":"arXiv"},{"key":"B39","doi-asserted-by":"publisher","DOI":"10.48550\/arXiv.2302.13971","article-title":"Llama: Open and efficient foundation language models","author":"Touvron","year":"2023","journal-title":"arXiv"},{"key":"B40","doi-asserted-by":"publisher","DOI":"10.18653\/v1\/D19-6213","article-title":"Dreaddit: A reddit dataset for stress analysis in social media","author":"Turcan","year":"2019","journal-title":"arXiv"},{"key":"B41","doi-asserted-by":"publisher","DOI":"10.48550\/arXiv.2311.08370","article-title":"Simplesafetytests: a test suite for identifying critical safety risks in large language models","author":"Vidgen","year":"2023","journal-title":"arXiv"},{"key":"B42","unstructured":"von Platen\n              P.\n            \n          \n          Transformers Reinforcement Learning (TRL)\n          \n          2023"},{"key":"B43","doi-asserted-by":"publisher","DOI":"10.48550\/arXiv.2407.10671","article-title":"Qwen2 technical report","author":"Yang","year":"2024","journal-title":"arXiv"},{"key":"B44","doi-asserted-by":"crossref","first-page":"4489","DOI":"10.1145\/3589334.3648137","article-title":"\u201cMentallama: interpretable mental health analysis on social media with large language models,\u201d","author":"Yang","year":"2024","journal-title":"Proceedings of the ACM Web Conference 2024"},{"key":"B45","doi-asserted-by":"publisher","first-page":"100211","DOI":"10.1016\/j.hcc.2024.100211","article-title":"A survey on large language model (LLM) security and privacy: The good, the bad, and the ugly","volume":"4","author":"Yao","year":"2024","journal-title":"High-Confidence Comp"},{"key":"B46","first-page":"1","article-title":"\u201cEdge-LLM: Enabling efficient large language model adaptation on edge devices via unified compression and adaptive layer voting,\u201d","author":"Yu","year":"2024","journal-title":"Proceedings of the 61st ACM\/IEEE Design Automation Conference"},{"key":"B47","doi-asserted-by":"publisher","DOI":"10.48550\/arXiv.2402.17193","article-title":"When scaling meets LLM finetuning: the effect of data, model and finetuning method","author":"Zhang","year":"2024","journal-title":"arXiv"},{"key":"B48","doi-asserted-by":"publisher","DOI":"10.48550\/arXiv.2303.10512","article-title":"AdaLoRA: adaptive budget allocation for parameter-efficient fine-tuning","author":"Zhang","year":"2023","journal-title":"arXiv"}],"container-title":["Frontiers in Artificial Intelligence"],"original-title":[],"link":[{"URL":"https:\/\/www.frontiersin.org\/articles\/10.3389\/frai.2025.1706090\/full","content-type":"unspecified","content-version":"vor","intended-application":"similarity-checking"}],"deposited":{"date-parts":[[2025,11,27]],"date-time":"2025-11-27T11:40:11Z","timestamp":1764243611000},"score":1,"resource":{"primary":{"URL":"https:\/\/www.frontiersin.org\/articles\/10.3389\/frai.2025.1706090\/full"}},"subtitle":[],"short-title":[],"issued":{"date-parts":[[2025,11,27]]},"references-count":48,"alternative-id":["10.3389\/frai.2025.1706090"],"URL":"https:\/\/doi.org\/10.3389\/frai.2025.1706090","relation":{},"ISSN":["2624-8212"],"issn-type":[{"value":"2624-8212","type":"electronic"}],"subject":[],"published":{"date-parts":[[2025,11,27]]},"article-number":"1706090"}}