Improving Sentiment Classification Using 0-Shot Generated Labels for Custom Transformer Embeddings
In this article, we present an approach to enrich transformers with additional information for general classification tasks given a set of relevant helper labels. We investigate whether the addition of preselected emotions as relevant helper labels can improve sentiment classification using BERT and DistilBERT. This method generates zero-shot labels like emotions for sentiment, and uses them as auxiliary text and classifier inputs to contribute to the final sentiment prediction. The approach has shown improvements in F1 score primarily for small datasets (1,000–50,000 samples). We also found that large, difficult-to-improve datasets such as the Sentiment140 dataset, with 1.6 million samples, also benefited from our approach. We tested the improvements on a smaller dataset, specifically an airline dataset comprising over 11,500 samples, and on subsamples of the Sentiment140 dataset with sizes ranging from 500 to 50,000. We conducted an ablation study on the zero-shot labels, which indicated that more labels generally improve the model. Our results show improvements in all cases over the original model for both BERT and DistilBERT when tested with added emotion inputs generated from zero-shot pretrained models.
Authors
- Ryan Bluteau (ORCID: https://orcid.org/0000-0001-9777-0711)
- Robin Gras (ORCID: https://orcid.org/0000-0002-0563-0250)
Institutions
- University of Windsor (CA)
Publication Details
- Journal
- The European Journal on Artificial Intelligence
- Published
- 2025-04-17
- DOI
- https://doi.org/10.1177/30504554251326853
- Citations
- 1
- Primary Topic
- Sentiment Analysis and Opinion Mining
- Type
- article
- Field-Weighted Citation Impact
- 2.48