Title: Dynamic Multi-Task Weight Adaptation for Efficient Sentiment Analysis Fine-Tuning on LLMs
Primary area: optimization
Keywords: Sentiment Analysis, Multi-Task Learning, Large Language Models, Dynamic Weight Adaptation, Imbalanced Data

Abstract: Sentiment analysis is crucial across domains from business intelligence to financial forecasting, with large language models (LLMs) emerging as powerful tools for financial text analysis. However, fine-tuned LLMs often exhibit suboptimal performance due to severe data distribution imbalance in financial datasets, where neutral sentiments dominate while extreme sentiments remain underrepresented, causing strong bias toward over-represented regions and poor accuracy for critical extreme sentiment values. To address this limitation, we propose a novel multi-task learning framework that incorporates both regression and classification objectives, along with data-aware stratification (DAS) algorithm and dynamic weight adapter (DWA) module. The multi-task learning design introduces auxiliary classification tasks to assist sentiment polarity analysis, providing complementary supervision that helps models better understand sentiment boundaries. The DAS algorithm mitigates data distribution imbalance through automatic threshold optimization, creating balanced categorical mapping for the classification task. The DWA module dynamically adjusts task weights based on gradient information and batch characteristics during training, addressing the varying task complexities and convergence rates inherent in multi-task optimization. Our approach decomposes the data distribution imbalance problem into two manageable sub-problems: balanced categorical mapping and adaptive task weighting. Comprehensive experiments using different model configurations demonstrate superior performance. Our framework achieves an average improvement of 12.36\% in Mean Squared Error (MSE) and 1.41\% in Accuracy (ACC) across multiple datasets compared with previous work.