Bidirectional Generative Framework for Cross-domain Aspect-based Sentiment Analysis (2023)

Abstract: Cross-domain aspect-based sentiment analysis (ABSA) aims to perform various fine-grained sentiment analysis tasks on a target domain by transferring knowledge from a source domain. Since labeled data only exists in the source domain, a model is expected to bridge the domain gap for tackling cross-domain ABSA. Though domain adaptation methods have proven to be effective, most of them are based on a discriminative model, which needs to be specifically designed for different ABSA tasks. To offer a more general solution, we propose a unified bidirectional generative framework to tackle various cross-domain ABSA tasks. Specifically, our framework trains a generative model in both text-to-label and label-to-text directions. The former transforms each task into a unified format to learn domain-agnostic features, and the latter generates natural sentences from noisy labels for data augmentation, with which a more accurate model can be trained. To investigate the effectiveness and generality of our framework, we conduct extensive experiments on four cross-domain ABSA tasks and present new state-of-the-art results on all tasks. Our data and code are publicly available at https://github.com/DAMO-NLP-SG/BGCA .

## introduction aspect-based sentiment analysis (absa) is the task of analyzing people's sentiments at the aspect level. it often involves several sentiment elements, including aspects, opinions, and sentiments @xcite . for instance, given the sentence "the apple is sweet.", the aspect is apple, its opinion is sweet, and the corresponding sentiment polarity is positive. absa has attracted increasing attention in the last decade, and various tasks have been proposed to extract either single or multiple sentiment elements under different scenarios. for example, aspect sentiment classification (asc) predicts the sentiment polarity of a given aspect target @xcite @xcite and aspect term extraction (ate) extracts aspects given the sentence @xcite , while aspect sentiment triplet extraction (aste) predicts all three elements in the triplet format @xcite . the main research line of absa focuses on solving various tasks within a specific domain. however, in real-world applications, such as ecommerce websites, there often exist a wide variety of domains. existing methods often struggle when applying models trained in one domain to unseen domains, due to the variability of aspect and opinion expressions across different domains @xcite @xcite . moreover, manually labeling data for each domain can be costly and time-consuming, particularly for absa requiring fine-grained aspect-level annotation. this motivates the task of cross-domain absa, where only labeled data in the source domain is available and the knowledge is expected to be transferable to the target domain that only has unlabeled data. to enable effective cross-domain absa, domain adaptation techniques @xcite are employed to transfer learnt knowledge from the labeled source domain to the unlabeled target domain. they either focus on learning domain-agnostic features @xcite @xcite , or adapt the training distribution to the target domain @xcite @xcite . however, the majority of these works are based on discriminative models and need task-specific designs, making a cross-domain model designed for one absa task difficult to be extended for other tasks @xcite @xcite . in addition, some methods further require external resources, such as domain-specific opinion lexicons @xcite , or extra models for augmenting pseudo-labeled target domain data @xcite , which narrows their application scenarios. in a recent research line, pre-trained generative models like bart @xcite and t5 @xcite have demonstrated impressive power in unifying various absa tasks without any task-specific design and external resources. by formulating each task as a sequence-to-sequence problem and producing the desired label words, i.e., the desired sentiment elements, they achieve substantial improvements on various absa tasks @xcite @xcite . despite their success in supervised in-domain settings, their effectiveness has yet to be verified in the cross-domain setting. moreover, unlabeled data of the target domain, which is usually easy to collect, has shown to be of great importance for bringing in domain-specific knowledge @xcite . how to exploit such data with the generative formulation remains a challenge. towards this end, we propose a bidirectional generative cross-domain absa (bgca) framework to fully exploit generative methods for various cross-domain absa tasks. bgca employs a unified sequence-to-sequence format but contains two reverse directions: text-to-label and label-to-text. the text-to-label direction converts an absa task into a text generation problem, using the original sentence as input and a sequence of sentiment tuples as output. after training on the source labeled data d s , the model can then directly conduct inference on the unlabeled data x t of the target domain d t to get the prediction ŷt . the prediction can be used as pseudo-labeled data to continue-train the text-to-label model. however, ŷt is inevitably less accurate due to the domain gap between the source and target domains. this is where the reverse direction, i.e., label-to-text, plays its role. specifically, we first reverse the order of input and output from the text-to-label stage of the source domain to train a label-to-text model. then this model takes the prediction ŷt as input and generates a coherent natural language text xt that contains the label words of ŷt . note that even though the prediction ŷt could be inaccurate regarding the original unlabeled data x t , the generated sentence xt can plausibly well match with ŷt . this is because the label-to-text model was trained to generate an output text that can appropriately describe the input labels. consequently, ŷt , drawn from the target domain, is able to introduce in-domain knowledge, thereby enhancing the overall understanding of the domain-specific information. in addition, xt aligns more closely with ŷt compared to x t , which effectively minimizes the prediction noise. as such, they can be paired together to create a more accurate and reliable generated dataset. finally, the generated target data d g and the labeled source data d s can be combined to train the model in the text-to-label direction, which effectively enriches the model knowledge in the target domain. our proposed bgca framework exhibits some unique advantages. firstly, it effectively utilizes the unlabeled target domain data by capturing important domain-specific words (i.e., sentiment elements) of the target domain in the first text-to-label stage. in the meantime, it bypasses the issue from the domain gap since it takes the noisy prediction as input and obtains more accurate text-label pairs in the label-to-text stage. secondly, we fully leverage generative models' encoding and generating capabilities to predict labels and generate natural sentences within a unified framework, which is infeasible for discriminative models. this allows the model to seamlessly switch between the roles of predictor and generator. finally, bgca utilizes a shared model to perform training in both directions, allowing for a more comprehensive understanding of the association between sentences and labels. in summary, our main contributions are: (1) we evaluate generative methods on four crossdomain absa tasks, including aspect term extraction (ate), unified absa (uabsa), aspect opinion pair extraction (aope), and aspect sentiment triplet extraction (aste), and find that the generative approach is an effective solution. without any unlabeled target domain data, it can already achieve better performance than previous discriminative methods. (2) we propose a novel bgca framework to effectively utilize unlabeled target domain data and train a shared model in reverse directions. it can provide high-quality augmented data by generating coherent sentences given noisy labels and a unified solution to learn the association between sentences and labels thoroughly. (3) our proposed method achieves new state-of-the-art results on all tasks, which validate the effectiveness and generality of our framework. the manager was @xcite neg and handled the situation extremely poorly. ## problem formulation to examine the generality of our proposed framework, we consider four absa tasks, including ate, uabsa, aope, and aste. given a sentence @xmath0, w 2 , ..., w n ] with n words, the task is to predict a set of sentiment tuples denoted as under the cross-domain absa setting, the training dataset consists of a set of labeled sentences from a source domain the goal is to leverage both d s and d t to train a model, which can predict the label of test data from the target domain. ## methodology we introduce our bidirectional generative crossdomain absa (bgca) framework in this section. as shown in figure 1 , it contains two sequential stages, namely text-to-label, and label-to-text, to obtain high-quality augmented data. the text-tolabel direction (on the top part) converts various tasks into a unified format and can produce noisy predictions on the unlabeled target data, whereas the label-to-text direction (on the bottom part) utilizes such noisy predictions to generate natural sentences containing the given labels so as to augment high-quality training data and enriches model knowledge of the target domain. ## conclusions in this work, we extend the generative method to cross-domain absa tasks and propose a novel bgca framework to boost the generative model's cross-domain ability. specifically, we train a shared generative model in reverse directions, allowing high-quality target domain augmentation and a unified solution to comprehend sentences and labels fully. experiments on four cross-domain absa tasks verify the effectiveness of our method.