G en ABSA -Vec: Generative Aspect-Based Sentiment Feature Vectorization for Document-Level Sentiment Classification (2024)

Abstract: Currently, document-level sentiment classification focuses on extracting text features directly using a deep neural network and representing the document through a high-dimensional vector. Such sentiment classifiers that directly accept text as input may not be able to capture more fine-grained sentiment representations based on different aspects in a review, which could be informative for document-level sentiment classification. We propose a method to construct a GenABSA feature vector containing five aspect-sentiment scores to represent each review document. We first generate an aspect-based sentiment analysis (ABSA) quadruple by finetuning the T5 pre-trained language model. The aspect term from each quadruple is then scored for sentiment using our sentiment lexicon fusion approach, SentLex-Fusion. For each document, we then aggregate the sentiment score belonging to the same aspect to derive the aspect-sentiment feature vector, which is subsequently used as input to train a document-level sentiment classifier. Based on a Yelp restaurant review corpus labeled with sentiment polarity containing 2040 documents, the sentiment classifier trained with ABSA features aggregated using geometric mean achieved the best performance compared to the baselines.

## introduction document-level sentiment analysis (dlsa) aims to detect the sentiment polarity of a document and is popularly used for product or service reviews @xcite . the outcomes of document-level sentiment classification could help individuals and businesses make more informed decisions based on user opinions and emotions @xcite especially in offline consumer consumption scenarios such as the selection of restaurants or entertainment venues. sentiment polarity identified from reviews shows the general performance of a business, product or service, and provides useful information for consumers to uncover the opinions from previous customers @xcite . dlsa is framed as a conventional text binary classification task with the goal of identifying sentiment polarity (positive or negative) expressed in a unit of text. in the context of restaurant review, we denote one review text from a corpus as t, the word-based feature extraction method as fea_ex, and the different classification methods as cls. thus, the output is represented as 𝐶𝐿𝑆(𝑓𝑒𝑎_𝑒𝑥(𝑡)). previous word-based feature representation methods focused on extracting sentiment at a coarse-grained level (i.e., directly from text) and may not capture necessarily relevant sentiment patterns or signals on finergrained aspects causing the representation to be susceptible to spurious signals. in contrast to dlsa, aspect-based sentiment analysis (absa) is a method that aims to analyze and understand user opinions at the aspect level @xcite . absa enables the sentiment polarity detection of different objects on different attributes, thus allowing for fine-grained analysis within a document @xcite . absa can capture the sentiment score of each aspect in one review text. in general, absa contains multiple subtasks including aspect term extraction (ate), aspect category detection (acd), opinion term extraction (ote), and aspect sentiment classification (asc) @xcite . the ## methodology figure 1 shows our methodological framework encompassing four phases: 1) absa quadruple generation, 2) absa feature extraction, and 3) absa feature aggregation and 4) document-level sentiment classification. we first use a generative method to extract absa quadruples from each review. to obtain aspect-based sentiment features, the opinion term from each absa quadruple is then scored for sentiment. it is possible for multiple absa quadruples to be generated for a single review. therefore, the sentiment scores from all quadruples in each review are aggregated based on five aspects of interest (i.e., food, service, ambience, location, and drink) into a feature vector containing five elements to serve as input to a document-level sentiment classifier. ## results and discussion macro-recall, @xmath0. of the three genabsa feature vectors, absa + gm produced the best results, which proves that using geometric mean as the absa feature aggregation method is more effective than merely using simple mean. surprisingly, our feature scaling method to differentiate between neutral sentiment and no sentiment leads to a slight decrease in model accuracy, precision, and f1. this could mean capturing neutral sentiment in the absa vectors counterintuitively added a layer of complexity and confusion to the sentiment classification model. based on the evaluation metrics, the genabsa feature-based models yield comparable performance to the baselines. absa + gm achieved the highest accuracy, precision, recall and f1, outperforming all the baselines. our genabsa models successfully achieved competitive performance to baselines with a lowdimensional feature vector containing only five dimensions as opposed to higher-dimensional text vectors. absa + gm not only achieved notable improvements over the simple and naïve text representations such as tf-idf and word2vec but also outperform the richer text representations such as bert and the pre-trained sentiment analysis model which presumably have been pretrained with larger external resources for the sentiment classification task. this finding implies that aspect-sentiment features can semantically capture more meaningful sentiment signals with reduced noise, thus increasing the likelihood for the sentiment classifier to learn more succinct patterns to distinguish between the two sentiment classes. in fact, the aspect-sentiment features are more explainable as illustrated by example 3 and example 4 compared to the more complex textual embeddings. it is easy to explain absa + gm classified the review in example 3 as positive because of the positive sentiment scores for food, service and ambience whereas the negative sentiment scores for these three aspects led to the review in example 4 being classified as negative. example 3 (review): best thai food in santa barbara area. well priced, great outdoor area. casual and easy. takeout is always on point. what more could you want from a mid-priced thai restaurant in a small beach community? absa + gm feature vector: [0.733, 0.600, 0.233, 0, 0] ([food, service, ambience, location, drink]) actual: positive; predicted: positive example 4 (review): horrible customer service at this logan's location. i've had mixed experiences with each visit but this was by far the worst. against better judgement, i returned after being served burnt food and waiter argued the food was not burnt. poor quality, poor customer service and filthy bathrooms. (failed to mention, bathroom horribly dirty, broken blocks on doors and broken toilet seats. reminds me of the bathroom in a public park overrun with the homeless). absa + gm feature vector: [-0.262, -0.409, -0.455, 0, 0] ([food, service, ambience, location, drink]) actual: negative; predicted: negative despite genabsa's strength in terms of explainability, our preliminary error analysis on misclassified examples reveals its sensitivity towards explicit sentiment terms tied to a specific aspect in a sentence as illustrated in example 5. genabsa focused only on the phrase "suck good cookies", which produced a positive food sentiment score albeit being low but missed other sentiment signals (e.g., "such sneaks", "very disheartening") from short sentences without reference to any specific aspect. ## conclusion and future work in conclusion, instead of following the typical text feature extraction pipeline for dlsa, we experimented with a more novel genabsa approach to first extract absa features using a generative model and then aggregating the aspectsentiment signals into a more compact absa feature vector for the downstream document-level sentiment classification task. our main contribution in this paper is to provide empirical insights on how to extract aspect-sentiment information from generated absa quadruples to be transformed into a compact absa feature vector that would serve as the most effective aspect-sentiment feature representation for dlsa. our findings show our low-dimensional absa feature vectors yield at par performance with baselines using text features. we also found that geometric mean has demonstrated more promising results compared to using simple mean in absa feature aggregation. our study has proven it is possible to fuse absa (i.e., extracting aspect-sentiment signals first from text) into the dlsa pipeline with promising results. we have yet to thoroughly examine the feasibility of the method in terms of computational time on a large dataset as opposed to using direct text input and conduct an error analysis based on the performance of each absa sub-task, which leaves room for our future work. future research efforts can also investigate the application and finetuning of other llms for absa quadruple generation to capture aspect-sentiment signals more accurately. in addition, other imputation methods can be explored to fill the missing sentiment scores caused by the coverage of the lexicon.