{"status":"ok","message-type":"work","message-version":"1.0.0","message":{"indexed":{"date-parts":[[2026,5,19]],"date-time":"2026-05-19T10:06:45Z","timestamp":1779185205998,"version":"3.51.4"},"reference-count":32,"publisher":"MDPI AG","issue":"5","license":[{"start":{"date-parts":[[2026,5,18]],"date-time":"2026-05-18T00:00:00Z","timestamp":1779062400000},"content-version":"vor","delay-in-days":0,"URL":"https:\/\/creativecommons.org\/licenses\/by\/4.0\/"}],"content-domain":{"domain":[],"crossmark-restriction":false},"short-container-title":["Information"],"abstract":"<jats:p>The ability to identify emotions based on written text is one of the core areas of Natural Language Processing (NLP) and has many applications in areas such as mental health monitoring, sentiment analysis, and dialogue systems. This study proposes an explainable emotion recognition (EER) framework built on a fine-tuned RoBERTa-base model trained on the Emotions for NLP dataset with an accuracy of 92.4% and a weighted F1 score of 92.5%. To interpret the decision process of the EER model, we systematically applied four complementary explainable artificial intelligence (XAI) techniques to provide explanations and insights into how the model makes its predictions: SHAP for global token-level feature attribution, LIME for local instance-level explanations, multi-head attention visualization for structural interpretability, and integrated gradients via Captum for axiom-satisfying gradient-based attribution. Each of these four methods provides complementary multi-perspective views of EER model behavior, which can help increase model transparency, identify potential biases, and enable the responsible use of transformer-based models in critical environments (e.g., those requiring formal clinical documentation). Our experiments consistently show that the EER model identifies tokens as having the highest emotional expression level as the strongest predictive feature across methodological perspectives, with strong evidence of cross-methodological agreement regarding the semantic coherence of learned representations. Our findings have direct implications for the responsible implementation of AI-based emotion recognition systems in mental health support systems, where model user-interface transparency, bias mitigation, and clinical trust are necessary to ensure quality patient care.<\/jats:p>","DOI":"10.3390\/info17050496","type":"journal-article","created":{"date-parts":[[2026,5,19]],"date-time":"2026-05-19T08:55:28Z","timestamp":1779180928000},"page":"496","update-policy":"https:\/\/doi.org\/10.3390\/mdpi_crossmark_policy","source":"Crossref","is-referenced-by-count":0,"title":["Explainable Transformer Models for Human Emotion Recognition: A Multi-Method Explainability Study in the Context of Mental Health"],"prefix":"10.3390","volume":"17","author":[{"ORCID":"https:\/\/orcid.org\/0000-0003-3687-0270","authenticated-orcid":false,"given":"Muhammad","family":"Azhar","sequence":"first","affiliation":[{"name":"Department of Applied Data Science, Hong Kong Shue Yan University, Hong Kong SAR, China"}],"role":[{"role":"author","vocabulary":"crossref"}]},{"ORCID":"https:\/\/orcid.org\/0000-0001-6003-0250","authenticated-orcid":false,"given":"Naureen","family":"Riaz","sequence":"additional","affiliation":[{"name":"Department Mathematics, Lahore Garison University, Lahore 54000, Pakistan"}],"role":[{"role":"author","vocabulary":"crossref"}]},{"ORCID":"https:\/\/orcid.org\/0000-0001-5839-5621","authenticated-orcid":false,"given":"Waqar","family":"Azeem","sequence":"additional","affiliation":[{"name":"Department of Infomatics and Systems, University of Management and Technology, Lahore 54000, Pakistan"}],"role":[{"role":"author","vocabulary":"crossref"}]},{"ORCID":"https:\/\/orcid.org\/0000-0003-1488-7696","authenticated-orcid":false,"given":"Deshinta Arrova","family":"Dewi","sequence":"additional","affiliation":[{"name":"Faculty of Data Science and Information Technology, INTI International University, Nilai 71800, Malaysia"}],"role":[{"role":"author","vocabulary":"crossref"}]},{"ORCID":"https:\/\/orcid.org\/0009-0003-9981-7394","authenticated-orcid":false,"given":"Adeen","family":"Amjad","sequence":"additional","affiliation":[{"name":"Department of Computer Science, University of Sahiwal, Sahiwal 57000, Pakistan"}],"role":[{"role":"author","vocabulary":"crossref"}]},{"ORCID":"https:\/\/orcid.org\/0009-0009-1821-9792","authenticated-orcid":false,"given":"Muhammad","family":"Arman","sequence":"additional","affiliation":[{"name":"Department of Computer Science, University of Sahiwal, Sahiwal 57000, Pakistan"}],"role":[{"role":"author","vocabulary":"crossref"}]}],"member":"1968","published-online":{"date-parts":[[2026,5,18]]},"reference":[{"key":"ref_1","doi-asserted-by":"crossref","first-page":"49","DOI":"10.1109\/TAFFC.2021.3053275","article-title":"A Survey of Textual Emotion Recognition and Its Challenges","volume":"14","author":"Deng","year":"2023","journal-title":"IEEE Trans. Affect. Comput."},{"key":"ref_2","doi-asserted-by":"crossref","unstructured":"Straw, I., and Callison-Burch, C. (2020). Artificial Intelligence in Mental Health and the Biases of Language Based Models. PLoS ONE, 15.","DOI":"10.1371\/journal.pone.0240376"},{"key":"ref_3","doi-asserted-by":"crossref","first-page":"2400304","DOI":"10.1002\/aisy.202400304","article-title":"A Perspective on Explainable Artificial Intelligence Methods: SHAP and LIME","volume":"7","author":"Salih","year":"2023","journal-title":"Adv. Intell. Syst."},{"key":"ref_4","first-page":"4765","article-title":"A Unified Approach to Interpreting Model Predictions","volume":"Volume 30","author":"Lundberg","year":"2017","journal-title":"Advances in Neural Information Processing Systems (NeurIPS)"},{"key":"ref_5","doi-asserted-by":"crossref","unstructured":"Ribeiro, M.T., Singh, S., and Guestrin, C. (2016, January 13\u201317). \u201cWhy Should I Trust You?\u201d: Explaining the Predictions of Any Classifier. Proceedings of the 22nd ACM SIGKDD International Conference on Knowledge Discovery and Data Mining (KDD), San Francisco, CA, USA.","DOI":"10.1145\/2939672.2939778"},{"key":"ref_6","doi-asserted-by":"crossref","unstructured":"Chefer, H., Gur, S., and Wolf, L. (2021, January 20\u201325). Transformer Interpretability Beyond Attention Visualization. Proceedings of the IEEE\/CVF Conference on Computer Vision and Pattern Recognition (CVPR), Nashville, TN, USA.","DOI":"10.1109\/CVPR46437.2021.00084"},{"key":"ref_7","unstructured":"Kokhlikyan, N., Miglani, V., Martin, M., Wang, E., Alsallakh, B., Reynolds, J., Melnikov, A., Klibert, N., Fan, N., and Araya, S. (2020). Captum: A Unified and Generic Model Interpretability Library for PyTorch. arXiv."},{"key":"ref_8","unstructured":"Sundararajan, M., Taly, A., and Yan, Q. (2017, January 6\u201311). Axiomatic Attribution for Deep Networks. Proceedings of the 34th International Conference on Machine Learning (ICML), Sydney, Australia."},{"key":"ref_9","unstructured":"Vaswani, A., Shazeer, N., Parmar, N., Uszkoreit, J., Jones, L., Gomez, A.N., Kaiser, \u0141., and Polosukhin, I. (2017). Attention Is All You Need. Advances in Neural Information Processing Systems (NeurIPS), Curran Associates."},{"key":"ref_10","unstructured":"Devlin, J., Chang, M.-W., Lee, K., and Toutanova, K. (2019, January 2\u20137). BERT: Pre-training of Deep Bidirectional Transformers for Language Understanding. Proceedings of the 2019 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies (NAACL-HLT), Minneapolis, MN, USA."},{"key":"ref_11","unstructured":"Liu, Y., Ott, M., Goyal, N., Du, J., Joshi, M., Chen, D., Levy, O., Lewis, M., Zettlemoyer, L., and Stoyanov, V. (2019). RoBERTa: A Robustly Optimized BERT Pretraining Approach. arXiv."},{"key":"ref_12","doi-asserted-by":"crossref","unstructured":"Kamath, R., Ghoshal, A., Eswaran, S., and Honnavalli, P. (2022, January 8\u201310). An Enhanced Context-Based Emotion Detection Model Using RoBERTa. Proceedings of the IEEE International Conference on Electronics, Computing and Communication Technologies (CONECCT), Bangalore, India.","DOI":"10.1109\/CONECCT55679.2022.9865796"},{"key":"ref_13","doi-asserted-by":"crossref","unstructured":"Yan, X., Liu, Z., and Wang, G. (2025). Emotion-RGC Net: A Novel Approach for Emotion Recognition in Social Media Using RoBERTa and Graph Neural Networks. PLoS ONE, 20.","DOI":"10.1371\/journal.pone.0318524"},{"key":"ref_14","unstructured":"Kusal, S., Patil, S., Choudrie, J., Kotecha, K., Vora, D., and Pappas, I. (2022). A Review on Text-Based Emotion Detection: Techniques, Applications, Datasets, and Future Directions. arXiv."},{"key":"ref_15","unstructured":"Thogesan, T. (2025). Integration of explainable AI techniques with large language models for enhanced interpretability for sentiment analysis. arXiv."},{"key":"ref_16","doi-asserted-by":"crossref","unstructured":"Perikos, I., and Pylarinou, C. (2024, January 20\u201322). Explainable emotion recognition in social networks with transformers. Proceedings of the 2024 IEEE\/ACIS 24th International Conference on Computer and Information Science (ICIS), Tokyo, Japan.","DOI":"10.1109\/ICIS61260.2024.10778326"},{"key":"ref_17","doi-asserted-by":"crossref","unstructured":"Wolf, T., Debut, L., Sanh, V., Chaumond, J., Delangue, C., Moi, A., Cistac, P., Rault, T., Louf, R., and Funtowicz, M. (2020, January 16\u201320). Transformers: State-of-the-Art Natural Language Processing. Proceedings of the 2020 Conference on Empirical Methods in Natural Language Processing (EMNLP): System Demonstrations, Online.","DOI":"10.18653\/v1\/2020.emnlp-demos.6"},{"key":"ref_18","doi-asserted-by":"crossref","unstructured":"Abid, F., Alam, M., Yasir, M., and Li, C. (2024). Explainable pre-trained language models for sentiment analysis in low-resourced languages. Big Data Cogn. Comput., 8.","DOI":"10.3390\/bdcc8110160"},{"key":"ref_19","doi-asserted-by":"crossref","unstructured":"Perikos, I., and Diamantopoulos, T. (2024). Explainable aspect-based sentiment analysis using transformer models. Big Data Cogn. Comput., 8.","DOI":"10.3390\/bdcc8110141"},{"key":"ref_20","doi-asserted-by":"crossref","unstructured":"Rathod, M., Dalvi, C., Kaur, K., Patil, S., Gite, S., Kamat, P., Kotecha, K., Abraham, A., and Gabralla, L.A. (2022). Kids\u2019 Emotion Recognition Using Various Deep Learning Models with Explainable AI. Sensors, 22.","DOI":"10.3390\/s22208066"},{"key":"ref_21","doi-asserted-by":"crossref","first-page":"2780","DOI":"10.11591\/eei.v10i5.3157","article-title":"Performance Comparison of TF-IDF and Word2Vec Models for Emotion Text Classification","volume":"10","author":"Cahyani","year":"2021","journal-title":"Bull. Electr. Eng. Inform."},{"key":"ref_22","doi-asserted-by":"crossref","first-page":"51522","DOI":"10.1109\/ACCESS.2019.2909919","article-title":"Sentiment Analysis of Comment Texts Based on BiLSTM","volume":"7","author":"Xu","year":"2019","journal-title":"IEEE Access"},{"key":"ref_23","doi-asserted-by":"crossref","first-page":"7212366","DOI":"10.1155\/2022\/7212366","article-title":"GloVe-CNN-BiLSTM Model for Sentiment Analysis on Text Reviews","volume":"2022","author":"Xiaoyan","year":"2022","journal-title":"J. Sens."},{"key":"ref_24","unstructured":"Sanh, V., Debut, L., Chaumond, J., and Wolf, T. (2019). DistilBERT, a Distilled Version of BERT: Smaller, Faster, Cheaper and Lighter. arXiv."},{"key":"ref_25","doi-asserted-by":"crossref","unstructured":"Areshey, A., and Mathkour, H. (2023). Transfer Learning for Sentiment Classification Using Bidirectional Encoder Representations from Transformers (BERT) Model. Sensors, 23.","DOI":"10.3390\/s23115232"},{"key":"ref_26","doi-asserted-by":"crossref","unstructured":"Adoma, A.F., Henry, N., and Chen, W. (2020, January 18\u201319). Comparative Analyses of BERT, RoBERTa, DistilBERT, and XLNet for Text-Based Emotion Recognition. Proceedings of the 17th International Computer Conference on Wavelet Active Media Technology and Information Processing (ICCWAMTIP), Chengdu, China.","DOI":"10.1109\/ICCWAMTIP51612.2020.9317379"},{"key":"ref_27","doi-asserted-by":"crossref","unstructured":"Cortiz, D. (2022, January 26\u201328). Exploring Transformers in Emotion Recognition: A Comparison of BERT, DistilBERT, RoBERTa, XLNet and ELECTRA. Proceedings of the 3rd International Conference on Control, Robotics and Intelligent System (CCRIS), Virtual.","DOI":"10.1145\/3562007.3562051"},{"key":"ref_28","doi-asserted-by":"crossref","unstructured":"Raza, M.A., and Fr\u00e4nti, P. (2019). A Hierarchical Gamma Mixture Model-Based Method for Classification of High-Dimensional Data. Entropy, 21.","DOI":"10.3390\/e21090906"},{"key":"ref_29","doi-asserted-by":"crossref","unstructured":"Azhar, M., Amjad, A., Dewi, D.A., and Kasim, S. (2025). A Systematic Review and Experimental Evaluation of Classical and Transformer-Based Models for Urdu Abstractive Text Summarization. Information, 16.","DOI":"10.20944\/preprints202507.1846.v1"},{"key":"ref_30","doi-asserted-by":"crossref","first-page":"1791","DOI":"10.47738\/jads.v6i3.702","article-title":"A Study of Unified Framework for Extremism Classification, Ideology Detection, Propaganda Analysis, and Flagged Data Detection Using Transformers","volume":"6","author":"Balaji","year":"2025","journal-title":"J. Appl. Data Sci."},{"key":"ref_31","doi-asserted-by":"crossref","unstructured":"Azhar, M., Amjad, A., Dewi, D.A., and Kasim, S. (2025). Efficient Transformer-Based Abstractive Urdu Text Summarization Through Selective Attention Pruning. Information, 16.","DOI":"10.20944\/preprints202511.0601.v1"},{"key":"ref_32","doi-asserted-by":"crossref","first-page":"994","DOI":"10.1007\/s10489-025-06824-4","article-title":"EGPT-SPE: Story Point Effort Estimation Using Improved GPT-2 by Removing Inefficient Attention Heads","volume":"55","author":"Cheema","year":"2025","journal-title":"Appl. Intell."}],"container-title":["Information"],"original-title":[],"language":"en","link":[{"URL":"https:\/\/www.mdpi.com\/2078-2489\/17\/5\/496\/pdf","content-type":"unspecified","content-version":"vor","intended-application":"similarity-checking"}],"deposited":{"date-parts":[[2026,5,19]],"date-time":"2026-05-19T09:16:22Z","timestamp":1779182182000},"score":1,"resource":{"primary":{"URL":"https:\/\/www.mdpi.com\/2078-2489\/17\/5\/496"}},"subtitle":[],"short-title":[],"issued":{"date-parts":[[2026,5,18]]},"references-count":32,"journal-issue":{"issue":"5","published-online":{"date-parts":[[2026,5]]}},"alternative-id":["info17050496"],"URL":"https:\/\/doi.org\/10.3390\/info17050496","relation":{},"ISSN":["2078-2489"],"issn-type":[{"value":"2078-2489","type":"electronic"}],"subject":[],"published":{"date-parts":[[2026,5,18]]}}}