Multi-Task Learning Aspect Based Sentiment Analysis with BERT
Muhammad Naufal Hakim, Syukron Abu Ishaq Alfarozi, Paulus Insap Santosa · 2024
Recent advances in sentiment analysis enable the classification of text as positive, negative, or neutral but often fail to capture detailed sentiments tied to specific topics. Aspect-Based Sentiment Analysis (ABSA) addresses this limitation by identifying sentiments associated with particular aspects within a text. Previous ABSA research uses multi-label learning (MLL), where a classifier is assigned to each aspect to jointly predict both aspect presence and sentiment. This study investigates the use of multi-task learning (MTL) in ABSA to enhance model performance. Specifically, the proposed MTL framework introduces two classifiers per aspect: one for detecting the presence of an aspect and another for classifying its sentiment if detected. This design improves task specialization and optimizes performance by combining the losses from both tasks through a weighted sum approach, with weights (α) for aspect detection and (1−α) for sentiment classification. The results demonstrate that the MTL model significantly outperforms traditional non-MTL models, achieving an F1 score of 96.16% for combined tasks. It also shows superior performance in individual tasks, with F1 scores of 96.93% for aspect detection and 94.13% for sentiment classification. Furthermore, the study explores various α values to determine the optimal balance between tasks. The study identifies the optimal performance at (α) = 0.55, indicating that slightly emphasizing aspect detection enhances overall accuracy.