AJE advances : research in epidemiology

A Bayesian latent class analysis approach for assessing the accuracy of natural language processing models classifying topic and sentiment of public health-related social media content.

José Denis-Robichaud, Hélène Carabin, Jingcheng Niu, Erin E Rees

Independent Researcher, Amqui, Quebec G5J 2N5, Canada. · Groupe de recherche en épidémiologie des zoonoses et santé publique (GREZOSP), Université de Montréal, Saint-Hyacinthe, Quebec J2S 2M2, Canada.

Key points

From the paper's conclusion
  • This study demonstrates an approach to estimate the posterior distribution of the probability, adjusted for misclassification error, of including topic/sentiment for each social media post and derived classifier accuracy metrics for the tests.

Abstract

Natural language processing (NLP) models can classify unstructured social media content into structured data suitable for generating public health intelligence. Natural language processing models, however, can vary in performance, given differences in architecture and sensitivities to temporal drift. Our objective was measuring the performance of different NLP models for identifying topics and sentiment of social media posts related to COVID-19 within a framework that integrated model outputs and human-labeled posts. Posts were obtained from Twitter (Canada; December 2020-August 2021). Tweets were classified by public health measure (PHM) topic (mask-wearing, vaccination, social distancing, others) using 5 crowdsourcing annotators, a keyword-based filter (KB), and a large language model (LLM). Sentiment (in support, neutral, against) was categorized using the same crowdsourcing annotators and LLM, and a neural network sentiment analysis (NSA) model. Sensitivity and specificity of the NLP models were estimated using hierarchical Bayesian latent class models. A total of 443 and 801 tweets were assessed for topic and sentiment classification, respectively. Keyword-based and LLM models had similar specificity and sensitivity for all topics, except for LLM having higher sensitivity for vaccination (0.88). The NSA model yielded sensitivity < 0.50 for classifying "in support" and "against" sentiments, while the LLM had sensitivity > 0.60 for all sentiments. Deployment of NLP models for public health applications requires critical understanding of model performance. This study demonstrates an approach to estimate the posterior distribution of the probability, adjusted for misclassification error, of including topic/sentiment for each social media post and derived classifier accuracy metrics for the tests.

Read the paper

Discussion

Science Skim's AI key points, plus readers' public thoughts

Readers' thoughts

No reader thoughts yet.

Related papers

A Bayesian latent class analysis approach for assessing the accuracy of natural language processing models classifying topic and sentiment of public health-related social media content — Science Skim