Self-training Strategies for Sentiment Analysis: An Empirical Study (2024)

Abstract: Sentiment analysis is a crucial task in natural language processing that involves identifying and extracting subjective sentiment from text. Self-training has recently emerged as an economical and efficient technique for developing sentiment analysis models by leveraging a small amount of labeled data and a large amount of unlabeled data. However, given a set of training data, how to utilize them to conduct self-training makes a significant difference in the final performance of the model. We refer to this methodology as the self-training strategy. In this paper, we present an empirical study of various self-training strategies for sentiment analysis. First, we investigate the influence of the self-training strategy and hyper-parameters on the performance of traditional small language models (SLMs) in various few-shot settings. Second, we also explore the feasibility of leveraging large language models (LLMs) to help self-training. We propose and empirically compare several self-training strategies with the intervention of LLMs. Extensive experiments are conducted on three real-world sentiment analysis datasets.

## introduction sentiment analysis is an important and popular technique used in natural language processing @xcite to analyze text data and determine the sentiment expressed @xcite . from social media monitoring and customer support management to customer feedback analysis, sentiment analysis has been widely applied in various daily business scenarios @xcite . machine learning based sentiment detection models are usually developed via supervised learning, whose success relies on extensive, high-quality human-annotated data. however, human-labeled data is typically limited and expensive to obtain. plus, human annotations can be noisy and require statistical filtering before usage @xcite . to this end, selftraining is proposed to leverage a small amount of labeled data and a large amount of unlabeled data to enhance the model's performance while reducing the annotation costs @xcite . self-training starts with some initial seed sentiment patterns and then uses iterative training to enlarge these patterns. it has been proven to train promising sentiment models with limited labeled data @xcite . the choice of self-training strategies determines the training effect of the sentiment analysis models to a great extent. nevertheless, they have not been studied thoroughly. in this paper, we present an empirical study on self-training strategies. selftraining sentiment analysis with slms follows an iterative two-step procedure. first, the model is initialized via supervised training on the labeled data. second, the model makes inferences on the unlabeled data, selects the reliable instances with inferred labels, and adds them to the labeled training set. then the model is retrained on the new labeled set, and we repeat the procedure until certain requirements are met (e.g., no more labeled data can be added). in this procedure, how to select reliable instances to add makes a big difference. various instance selection strategies can be adopted. for example, we can decide based on the model's confidence in its prediction (e.g. the confidence score, or the entropy of the predicted probability distribution). for different tasks or datasets, the best instance selection strategy varies. in this work, we present an empirical study on the instance selection strategies of self-training for slms on three public sentiment analysis datasets and analyze how the choice of strategy and hyper-parameters affect the self-training performance in different few-shot settings. with the advent of llms, they are extensively adopted and show promising performances in various nlp tasks, including sentiment analysis @xcite . they can be involved in selftraining to facilitate this procedure in two modes: subject mode and object mode. in subject mode, the llm is treated as the sentiment classifier, and the labeled or unlabeled are fed into it via prompts to improve its performance on the specific task. in the object mode, the llm serves as an assistant to help train an slm as the sentiment classifier. for example, the llm can provide pseudo labels for the unlabeled data so that the slm gets more labeled data for training. which mode works better under different conditions? what strategies should we use? to answer these questions, we conduct experiments on three real-world sentiment datasets with two popular llms: flan-ul2 and gpt-4, and summarize the empirical conclusions. ## related works sentiment analysis approaches commonly applied by the industry have experienced a transition from lexicon-based methods to machine learning based methods @xcite . the latter leverages machine learning algorithms and training data to develop sentiment classification models @xcite . in this category, various feature extraction techniques including bag of words (bow) and distributed representations, as known as word embeddings, can be adopted. with the prosperity of deep learning and language models, the latter gradually dominates. diverse word embedding models are proposed @xcite @xcite , and endeavors are also conducted to improve the quality of word embeddings through statistical perspective @xcite . the family of machine learning based sentiment analysis methods can be further divided into su-pervised learning, unsupervised learning, semisupervised learning, and reinforcement learning. supervised learning methods require high-quality labeled data for training @xcite . in contrast, unsupervised learning models can be built using a large amount of unlabeled data, and they can handle the case that the specific sentimental classes are not given @xcite . moreover, semi-supervised learning methods train the model with a few labeled data and enhance it with a large set of unlabeled data @xcite . reinforcement learning methods strengthen the capability of a sentiment classifier with the trial and error mechanism @xcite . the self-training approach is one kind of semisupervised learning method. @xcite develop a self-training method where they employ multiple feature subspace-based classifiers to select useful features for sentiment classification and choose informative unlabeled samples for labeling. to alleviate the issue of errors being selfreinforcing in self-training, @xcite propose to create three models based on the models' outputs and choose the best one. @xcite introduce a novel framework that combines self-training with active learning for cross-lingual sentiment classification. in addition, @xcite explore when self-training can improve the performance of sentiment analysis models. they find that the similarity among the labeled, unlabeled, and evaluation data can determine whether self-training is beneficial. ## self-training with slms we first investigate self-training sentiment analysis with slms. in this section, we introduce the base slm used for sentiment analysis, the general self-training procedure, and the instance selection strategies we explored. ## self-training with llms llms are trained on extremely huge corpora, which endow them with promising capability in many tasks and domains for which they have not been specifically trained. we can leverage llms to facilitate a certain sentiment analysis task under the self-training setting (i.e. a small set of labeled data and a large set of unlabeled data are given) in two modes: subject mode and object mode. ## experiments ii: llms we conduct experiments on two popular llms: flan-ul2 @xcite and gpt-4 (openai, 2023) ## conclusion in this study, we present an empirical study on self-training strategies for the sentiment analysis task. we first propose several heuristic instance selection strategies for self-training with slms, and conduct an evaluation of them under different few-shot settings. second, we make endeavors to leverage llms to help self-training. we propose and evaluate several self-training strategies with the intervention of llms. based on the experiments on three public datasets, we compare different selftraining strategies, discuss their applicability under various conditions, and analyze the influence of hyper-parameters on their performances. the work serves as an empirical study to assist practitioners in selecting appropriate strategies to construct sentiment analysis models when limited annotated data is available.