Abstract
Training sentiment analysis models typically requires extensive labeled datasets, which are costly and time-consuming to acquire. This paper presents Semantic Consistency Regularization (SCR), a novel semi-supervised learning framework that leverages Large Language Models (LLMs) to generate high-quality augmentations of unlabeled text. By ensuring semantic consistency across varied phrasings and employing a "class re-assembling" strategy for uncertain samples, SCR addresses the limitations of traditional data augmentation and consistency regularization. Experimental results on financial and product review datasets demonstrate that SCR significantly outperforms existing baselines like FixMatch, particularly in low-resource settings.
Introduction
The "labeled data bottleneck" remains a significant challenge in Natural Language Processing (NLP). Semi-supervised learning (SSL) attempts to mitigate this by utilizing small labeled datasets alongside large unlabeled ones through consistency regularization. This principle posits that a model's predictions should remain invariant under minor input perturbations. However, traditional NLP augmentation techniques, such as synonym replacement or back-translation, often produce ungrammatical results or inadvertently alter the sentiment (e.g., changing "not bad" to "not good"). Furthermore, many SSL frameworks discard unlabeled samples when the model's confidence is low, wasting informative data.
Methodology
The SCR framework introduces a more sophisticated approach to consistency regularization by utilizing LLMs as semantic-aware augmenters rather than simple word-swappers.
Semantic Augmentation Strategies
SCR employs two primary prompting strategies to generate "strong" augmentations:
- Entity-based Enhancement (SCR-EE): The LLM extracts key entities and numerical data to serve as anchors, then reconstructs the sentence around them to preserve factual integrity while varying the phrasing.
- Concept-based Enhancement (SCR-CE): The LLM is prompted to rephrase the sentence while strictly maintaining the core sentiment and conceptual essence.
Consistency Regularization and Class Re-assembling
The framework processes both the original (weakly augmented) and LLM-generated (strongly augmented) sentences through a BERT-base encoder. A consistency loss ($L_{con}$) is applied to align the model's predictions for both versions.
To utilize samples where the model lacks high confidence, SCR introduces Class Re-assembling. Based on the class-space shrinking theorem, this strategy removes the least likely class (the "bottom-1" probability) and re-evaluates the sample within the reduced class space. This allows the model to derive supervision signals from ambiguous data without being forced into potentially incorrect high-confidence classifications.
Experimental Evaluation
The SCR framework was evaluated on two benchmarks: Financial Sentiment Analysis (FSA) and Amazon Product Reviews. The experiments simulated real-world data scarcity by using limited label regimes (e.g., 50 to 200 labels per class).
Key Results
SCR consistently outperformed state-of-the-art semi-supervised baselines:
- FSA Dataset: With 200 labels per class, SCR-EE achieved 76.13% accuracy, surpassing the popular FixMatch algorithm by 3.42%.
- Amazon Dataset: In the 150-label setting, SCR-CE reached 89.60% accuracy, establishing a significant lead over baselines.
- Training Stability: SCR demonstrated superior stability, maintaining high validation accuracy throughout training, whereas traditional methods often suffered from performance collapse due to noisy augmentations.
Discussion and Conclusion
The success of SCR highlights the utility of LLMs as sophisticated data augmenters rather than just direct predictors. By focusing on semantic rather than surface-level variations, SCR provides higher-quality training signals for smaller, specialized models like BERT. The class re-assembling strategy further enhances performance by effectively utilizing the "confused" data often discarded by other methods.
While effective, the framework's reliance on LLMs introduces higher computational costs compared to simple word-swapping. Future work will explore more diverse prompting strategies and the application of semantic consistency to other complex NLP tasks beyond sentiment analysis.
Summary updated