Explainable Artificial Intelligence for Social Media Sentiment Mining: Integrating Transformer-Based Attention and Human-Centric Interpretation
Keywords:
explainable artificial intelligence, sentiment mining, social media, transformer attention, human-centric interpretation, algorithmic fairness, socio-technical systemsAbstract
The proliferation of user-generated content on social media platforms has created enormous demand for automated sentiment mining tools that can accurately capture nuanced opinion, emotion, and stance at scale. While transformer-based deep learning architectures have achieved state-of-the-art performance in text sentiment classification, their inherent opacity presents a critical barrier to adoption in high-stakes domains such as public health surveillance, financial market analysis, and political discourse monitoring. This paper presents a comprehensive interdisciplinary examination of explainable artificial intelligence (XAI) approaches tailored to social media sentiment mining, focusing on the integration of transformer-based attention mechanisms with human-centric interpretation frameworks. We survey contemporary architectural paradigms including bidirectional encoder representations, generative pre-trained transformers, and their fine-tuning strategies, then systematically analyze how intrinsic attention weights can be repurposed to generate post hoc explanations. The discussion extends to the structural tension between explanation fidelity and model complexity, the infrastructure requirements for deploying interpretable models in real-time social media pipelines, and the governance frameworks necessary to ensure fairness and accountability. By examining cross-domain case illustrations from healthcare misinformation detection, crisis response coordination, and consumer sentiment tracking, we identify key trade-offs in latency, transparency, and robustness. The paper further addresses sustainability concerns related to the computational carbon footprint of large-scale transformer fine-tuning and inference, proposing lightweight distillation and modular explanation proxies as viable paths forward. Policy implications concerning algorithmic transparency mandates and auditability standards are synthesized with technical design choices, culminating in a set of architectural principles for building socially responsible sentiment mining systems. The analysis reveals that effective explainability cannot be reduced to a single technical method but must be constructed as a socio-technical assemblage where attention visualization, contrastive example generation, and structured natural language rationales are combined under participatory design with domain stakeholders.
References
1. Vaswani, A., Shazeer, N., Parmar, N., Uszkoreit, J., Jones, L., Gomez, A. N., Kaiser, L., & Polosukhin, I. (2017). Attention is all you need. In Advances in Neural Information Processing Systems (pp. 5998–6008).
2. Devlin, J., Chang, M.-W., Lee, K., & Toutanova, K. (2019). BERT: Pre-training of deep bidirectional transformers for language understanding. In Proceedings of the 2019 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies (pp. 4171–4186).
3. Jain, S., & Wallace, B. C. (2019). Attention is not explanation. In Proceedings of the 2019 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies (pp. 3543–3556).
4. Sundararajan, M., Taly, A., & Yan, Q. (2017). Axiomatic attribution for deep networks. In Proceedings of the 34th International Conference on Machine Learning (pp. 3319–3328).
5. Clark, K., Khandelwal, U., Levy, O., & Manning, C. D. (2019). What does BERT look at? An analysis of BERT’s attention. In Proceedings of the 2019 ACL Workshop BlackboxNLP: Analyzing and Interpreting Neural Networks for NLP (pp. 276–286).
6. Wiegreffe, S., & Pinter, Y. (2019). Attention is not not explanation. In Proceedings of the 2019 Conference on Empirical Methods in Natural Language Processing (pp. 11–20).
7. Serrano, S., & Smith, N. A. (2019). Is attention interpretable? In Proceedings of the 57th Annual Meeting of the Association for Computational Linguistics (pp. 2931–2951).
8. Liu, Y., Ott, M., Goyal, N., Du, J., Joshi, M., Chen, D., Levy, O., Lewis, M., Zettlemoyer, L., & Stoyanov, V. (2019). RoBERTa: A robustly optimized BERT pretraining approach. arXiv preprint arXiv:1907.11692.
9. Rogers, A., Kovaleva, O., & Rumshisky, A. (2020). A primer in BERTology: What we know about how BERT works. Transactions of the Association for Computational Linguistics, 8, 842–866.
10. Li, Q. (2026). Dynamic Adaptive Attention and Supervised Contrastive Learning: A Novel Hybrid Framework for Text Sentiment Classification. arXiv preprint arXiv:2604.10459.
11. Ribeiro, M. T., Singh, S., & Guestrin, C. (2016). “Why should I trust you?” Explaining the predictions of any classifier. In Proceedings of the 22nd ACM SIGKDD International Conference on Knowledge Discovery and Data Mining (pp. 1135–1144).
12. Lundberg, S. M., & Lee, S.-I. (2017). A unified approach to interpreting model predictions. In Advances in Neural Information Processing Systems (pp. 4765–4774).
13. Abnar, S., & Zuidema, W. (2020). Quantifying attention flow in transformers. In Proceedings of the 58th Annual Meeting of the Association for Computational Linguistics (pp. 4190–4197).
14. Miller, T. (2019). Explanation in artificial intelligence: Insights from the social sciences. Artificial Intelligence, 267, 1–38.
15. Ehsan, U., Liao, Q. V., Muller, M., Riedl, M. O., & Weisz, J. D. (2021). The human in human-centric AI: A literature review of empirical studies on XAI. arXiv preprint arXiv:2105.07191.
16. Liao, Q. V., Gruen, D., & Miller, S. (2020). Questioning the AI: Informing design practices for explainable AI user experiences. In Proceedings of the 2020 CHI Conference on Human Factors in Computing Systems (pp. 1–15).
17. Camburu, O.-M., Rocktäschel, T., Lukasiewicz, T., & Blunsom, P. (2018). e-SNLI: Natural language inference with natural language explanations. In Advances in Neural Information Processing Systems (pp. 9539–9549).
18. Floridi, L., Cowls, J., Beltrametti, M., Chatila, R., Chazerand, P., Dignum, V., ... & Schafer, B. (2018). AI4People—An ethical framework for a good AI society: Opportunities, risks, principles, and recommendations. Minds and Machines, 28(4), 689–707.
19. Bhatt, U., Xiang, A., Sharma, S., Weller, A., Taly, A., Jia, Y., Ghosh, J., Puri, R., Moura, J. M., & Eckersley, P. (2020). Explainable machine learning in deployment. In Proceedings of the 2020 Conference on Fairness, Accountability, and Transparency (pp. 648–657).
20. Selbst, A. D., Boyd, D., Friedler, S. A., Venkatasubramanian, S., & Vertesi, J. (2019). Fairness and abstraction in sociotechnical systems. In Proceedings of the Conference on Fairness, Accountability, and Transparency (pp. 59–68).
21. Strubell, E., Ganesh, A., & McCallum, A. (2019). Energy and policy considerations for deep learning in NLP. In Proceedings of the 57th Annual Meeting of the Association for Computational Linguistics (pp. 3645–3650).
22. Sanh, V., Debut, L., Chaumond, J., & Wolf, T. (2019). DistilBERT, a distilled version of BERT: Smaller, faster, cheaper and lighter. arXiv preprint arXiv:1910.01108.
23. Blodgett, S. L., Barocas, S., Daumé III, H., & Wallach, H. (2020). Language (technology) is power: A critical survey of “bias” in NLP. In Proceedings of the 58th Annual Meeting of the Association for Computational Linguistics (pp. 5454–5476).
24. Jobin, A., Ienca, M., & Vayena, E. (2019). The global landscape of AI ethics guidelines. Nature Machine Intelligence, 1(9), 389–399.
25. Pruthi, D., Bansal, M., Dhingra, B., Neubig, G., & Lipton, Z. C. (2020). Evaluating explanations: How much do explanations from the teacher aid students? Transactions of the Association for Computational Linguistics, 8, 721–737.
Downloads
Published
Issue
Section
License
Copyright (c) 2026 Journal of Engineering Systems and Digital Innovation

This work is licensed under a Creative Commons Attribution 4.0 International License.