Computational Linguistics
Researchers develop multilingual sentiment analysis model handling 100 languages with balanced emotional classification
A new framework tackles cross-lingual sentiment analysis by treating emotions as multiple overlapping categories and using dynamic weighting to prevent common emotions from dominating model training.
Researchers have developed a sentiment analysis system capable of operating across 100 languages by framing emotion detection as a multi-label classification task. Rather than assigning a single sentiment to text, the model recognizes that emotions often overlap—an approach grounded in psychological emotion theory.
The Challenge of Imbalanced Labels#
Traditional machine learning models struggle when training data contains uneven distributions of categories. In sentiment analysis, certain emotions typically appear far more frequently than others, causing models to overfit toward common labels while neglecting rare ones. Earlier approaches used fixed weighting schemes based on how often each emotion appeared in the training set, but these static methods fail to adapt as learning progresses.
Dynamic Weighting and Focal Loss#
The researchers introduced a dynamic weighting method that continuously adjusts class weights during training rather than keeping them constant. This allows the model to shift its focus away from easy-to-predict emotions toward harder, underrepresented ones as it improves. They also adapted focal loss—a technique from computer vision—to work with multi-label problems, further prioritizing difficult instances.
Optimizing Decision Thresholds#
Since multi-label classification requires deciding whether each emotion applies to a given text, the team developed an efficient algorithm for selecting optimal decision thresholds for each class. This approach maximizes the overall performance metric (macro-F1 score) while maintaining linear computational complexity.
Results and Availability#
Testing across three languages revealed the model achieves state-of-the-art performance on seven of nine standard evaluation metrics, outperforming competition benchmarks from SemEval. The researchers have made their code publicly available to enable further development in multilingual sentiment research.