CONTRASTE : Supervised Contrastive Pre-training With Aspect-based Prompts For Aspect Sentiment Triplet Extraction (2023)

Abstract: Existing works on Aspect Sentiment Triplet Extraction (ASTE) explicitly focus on developing more efficient fine-tuning techniques for the task. Instead, our motivation is to come up with a generic approach that can improve the downstream performances of multiple ABSA tasks simultaneously. Towards this, we present CONTRASTE, a novel pre-training strategy using CONTRastive learning to enhance the ASTE performance. While we primarily focus on ASTE, we also demonstrate the advantage of our proposed technique on other ABSA tasks such as ACOS, TASD, and AESC. Given a sentence and its associated (aspect, opinion, sentiment) triplets, first, we design aspect-based prompts with corresponding sentiments masked. We then (pre)train an encoder-decoder model by applying contrastive learning on the decoder-generated aspect-aware sentiment representations of the masked terms. For fine-tuning the model weights thus obtained, we then propose a novel multi-task approach where the base encoder-decoder model is combined with two complementary modules, a tagging-based Opinion Term Detector, and a regression-based Triplet Count Estimator. Exhaustive experiments on four benchmark datasets and a detailed ablation study establish the importance of each of our proposed components as we achieve new state-of-the-art ASTE results.

## introduction aste is the most interpretable aspect-based sentiment analysis (absa) task that, given a sentence, requires the extraction of opinion triplets, each consisting of an aspect term, the sentiment expressed towards it, and the corresponding opinion term explaining the rationale behind the sentiment, as shown in after pre-training is completed, we need to finetune the trained model weights for the downstream absa tasks (we focus on aste here). similar to paraphrase @xcite , the most competitive generative approach for aste and other absa tasks, we train our base encoderdecoder framework, contraste-base, to generate opinion triplets as templatized paraphrases, as shown in fig. 1(b ). our template however differs. we argue that the template used in para-phrase, although more intuitive, does not generalize well across tasks, and often results in semantically meaningless target sequences, as reported in ## related works supervised contrastive learning (scl) has been explored previously in the absa domain with very different objectives and approaches than ours. @xcite use supervised contrastive pretraining to effectively learn implicit sentiments. however, their approach is not optimal as they apply contrastive learning on sentence-level sentiment representations of sentences, whereas in aste (or any other absa task), sentiments are defined at an aspect-level. additionally, they rely on external large-scale sentiment-annotated corpora to learn sentiment knowledge. we, differ from them as we do not use any external data. also, we per-form cl on aspect-aware sentiment representations of masked opinion terms expressing the sentiment. @xcite try to distinguish between aspect-invariant and aspect-dependent sentiment features. further, their data augmentation strategy masks the aspect terms, whereas we mask the sentiment. finally, they apply contrastive learning only to fine-tune the bert encoder, whereas we use scl to pre-train an encoder-decoder setup. @xcite apply contrastive learning in a continual learning setup with very different objectives of knowledge transfer across tasks, and knowledge distillation from old tasks to the new task. moreover, all these works tackle a relatively easier downstream absa task of aspect sentiment classification (asc), where the goal is to determine the sentiment, given the sentence and a specific aspect. also, all of them are encoder-based approaches. the novelty of our approach, therefore lies in designing aspect-based prompts, obtaining aspectaware sentiment representations of masked sentiment terms, and applying contrastive learning on these embeddings to (pre)train an encoder-decoder framework for the downstream aste task. ## conclusion we propose a novel strategy to continually pre-train t5, from its publicly available generic pre-trained checkpoint, for absa tasks. for this, given a sentence, first, we derive aspect-based prompts with corresponding sentiments masked. we then apply supervised contrastive learning (scl) on the decoder-generated aspect-level sentiment embeddings of the masked tokens. compared to performing scl on sentence-level sentiment embeddings, we show that our strategy results in a better downstream performance for absa tasks such as aste, acos, tasd, and aesc. also, we do not use any external data for pre-training. for task-specific finetuning, we propose generic placeholder-based templates to train t5. finally, we present our multi-task model, contraste-mtl, that achieves sota results on the majority of aste benchmark datasets.