Abstract: Aspect-based sentiment analysis (ABSA) is an important subtask of sentiment analysis, which aims to extract the aspects and predict their sentiments. Most existing studies focus on improving the performance of the target domain by fine-tuning domain-specific models (trained on source domains) based on the target domain dataset. Few works propose continual learning tasks for ABSA, which aim to learn the target domain’s ability while maintaining the history domains’ abilities. In this paper, we propose a Large Language Model-based Continual Learning (LLM-CL) model for ABSA. First, we design a domain knowledge decoupling module to learn a domain-invariant adapter and separate domain-variant adapters dependently with an orthogonal constraint. Then, we introduce a domain knowledge warmup strategy to align the representation between domain-invariant and domain-variant knowledge. In the test phase, we index the corresponding domain-variant knowledge via domain positioning to not require each sample’s domain ID. Extensive experiments over 19 datasets indicate that our LLM-CL model obtains new state-of-the-art performance.
Introduction
Aspect-Based Sentiment Analysis (ABSA) involves identifying specific aspects of a product (e.g., "battery life" or "crust") and determining the sentiment expressed toward them. A significant hurdle in this field is that sentiment is often domain-variant. For instance, the word "hot" represents a positive attribute for a pizza but a negative one for a laptop CPU.
While Large Language Models (LLMs) are exceptionally powerful, they suffer from catastrophic forgetting in continual learning scenarios. As they learn a new domain, they tend to lose the specialized knowledge required for previous ones. This paper introduces LLM-CL, a framework designed to learn a sequence of domains, retain knowledge from all of them, and automatically apply the correct domain-specific knowledge to unlabeled inputs.
Methodology
The LLM-CL framework is built on LLaMA-7B using LoRA (Low-Rank Adaptation). The architecture consists of three core innovations:
- Domain Knowledge Decoupling (DKD): Instead of a single adapter, the model uses two types: a Domain-Invariant Adapter to capture general sentiment language (e.g., "excellent," "bad") and separate Domain-Variant Adapters for each specific domain. An Orthogonal Constraint is applied during training to ensure these adapters learn non-overlapping information.
- Domain Knowledge Warmup (DKW): To prevent a mismatch between the evolving shared adapter and static older domain-variant adapters, a small amount of "replay data" is used to re-align the shared knowledge with specific adapters.
- Domain Positioning (DP): At test time, the model automatically routes inputs to the most appropriate domain-variant adapter using Mahalanobis distance to calculate "domain prototypes," removing the need for a Task ID.
Experimental Results
The model was evaluated on 19 ABSA datasets across three sub-tasks: Sentiment Classification (ABSC), Aspect Extraction (AE), and joint performance (JOINT).
State-of-the-Art Performance
On the ABSC task, LLM-CL achieved an average Accuracy of 0.9491 and a Macro-F1 of 0.9143, significantly outperforming previous state-of-the-art models like CLASSIC. Notably, LLM-CL's performance is remarkably close to the "Upper Bound" of multi-task learning, where a model is trained on all datasets simultaneously rather than sequentially.
Zero-Shot Comparison
LLM-CL also demonstrated superiority over powerful general-purpose models like GPT-3.5-Turbo in both 0-shot and 4-shot scenarios, highlighting the critical importance of fine-tuning for the intricate requirements of ABSA.
Conclusion
LLM-CL effectively addresses the challenge of catastrophic forgetting in ABSA by decoupling shared and domain-specific knowledge. While the model achieves state-of-the-art results, future work will focus on improving storage scalability as the number of domains grows and reducing the inference latency introduced by the Domain Positioning module.
Summary updated