Hierarchical Bayesian Attention: Finegrained Sentiment Classification
DOI:
https://doi.org/10.61173/86rnrr18Keywords:
Hierarchical attention, Bayesian attention mechanism, fine-grained sentiment, prior knowledgeAbstract
In recent years, the application of natural language processing (NLP) technology in the field of mental health has continued to deepen. Among them, fine-grained emotion classification is a core means to capture complex psychological states in texts. The subtle emotional changes hidden in texts are also important signals for early psychological risk identification. The uncertainty modeling of emotion classification has attracted attention. Early work mostly focused on the probabilistic improvement of a single module, making it difficult to capture multi-level semantic uncertainties. Meanwhile, knowledge enhancement strategies have been widely applied in few-shot learning. For instance, the initialization method based on sentiment dictionaries has improved the performance of models in low-resource scenarios. However, most existing studies introduce knowledge as static features, which limits the guiding role of prior information in quantifying uncertainty. To address the above issues, this study builds a hierarchical Bayesian attention model. By adopting probabilistic modeling in the three key links of word embedding, attention mechanism, and classification decision-making, the uncertainty quantification of the entire process from text encoding to sentiment prediction can be achieved. A domain knowledge-driven prior distribution is constructed based on the sentiment dictionary to enhance the efficiency in small sample scenarios, too. This method can accurately identify the fine-grained emotional tendencies of the text, providing a technical path for the demand of mental health monitoring and facilitating clinical risk assessment.
References
[1] Liu B. Sentiment analysis and opinion mining. Synthesis Lectures on Human Language Technologies, 2012, 5(1): 1-167.
[2] Saria S, Subbaswamy A. Tutorial: Safe and reliable machine learning. arXiv preprint arXiv:1904.07204, 2019.
[3] Plutchik R. The nature of emotions. American Scientist, 2001, 89(4): 344-350.
[4] Kendall A, Gal Y. What uncertainties do we need in Bayesian deep learning for computer vision? arXiv preprint arXiv:1703.04977, 2017.
[5] Blei D M, Kucukelbir A, McAuliffe J D. Variational inference: A review for statisticians. Journal of the American Statistical Association, 2017, 112(518): 859-877.
[6] Gal Y. Uncertainty in deep learning [Doctoral dissertation, University of Cambridge]. Apollo - University of Cambridge Repository, 2016.
[7] Wang X, He X, Cao Y, Liu M, Chua T. KGAT: Knowledge graph attention network for recommendation. In: Proceedings of the 25th ACM SIGKDD International Conference on Knowledge Discovery & Data Mining, 2019: 950-958.
[8] McCallum A, Nigam K. A comparison of event models for naive Bayes text classification. In: AAAI-98 workshop on learning for text categorization, AAAI Press, 1998: 41-48.
[9] Yang Z, Yang D, Dyer C, He X, Smola A, Hovy E. Hierarchical attention networks for document classification. In: Proceedings of the 2016 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies, 2016: 1480-1489.
[10] Buechel S, Hahn U. EmoBank: Studying the impact of annotation perspective and representation format on dimensional emotion analysis. In: Proceedings of the 15th Conference of the European Chapter of the Association for Computational Linguistics: Volume 1, Long Papers, 2017: 578-585.
Downloads
Published
Issue
Section
License
Copyright (c) 2025 by the authors.

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