# Generative Aspect Sentiment Quad Prediction with Self-Inference Template
## 1 Introduction  
The research on Aspect-Based Sentiment Analysis (ABSA) mainly involves four sentiment elements: Aspect Term, Aspect Category, Opinion Term, and Sentiment Polarity. The study of ABSA tasks aims to identify sentiment elements related to specific text items, which can be individual elements such as aspect term extraction [1; 2], aspect category detection [3; 4], or multiple dependent sentiment elements like aspect-opinion pair extraction [5; 6], aspect sentiment triplet extraction [7], aspect-category-sentiment detection [8], etc. Clearly, the more sentiment elements identified, the better the understanding of aspect-level opinions in the text. In 2021, [PERSON] [9] first proposed the Aspect-Category-Opinion-Sentiment(ACOS) quadruple extraction task, which includes implicit aspect and opinion elements. In the same year, [PERSON] [10] introduced the Aspect Sentiment Quad Prediction (ASQP) task, excluding implicit opinions. Thus, the task of aspect sentiment quadruple extraction officially emerged. [PERSON] [10] also proposed a novel modeling paradigm based on the T5 generative model. This paradigm involves paraphrasing the original sentence into the form \"\(x_{ac}\) is \(x_{sp}\) because \(x_{at}\) is \(x_{ot}\)\", making it easy to extract quadruplets from the paraphrased sentences. In this context, \(x_{ac}\) represents the aspect category, \(x_{sp}\) represents the sentiment polarity, \(x_{at}\) represents the aspect term, and \(x_{ot}\) represents the opinion term. Subsequently, numerous studies in aspect-level sentiment analysis based on the generative paradigm emerged, some of which explored template settings. [PERSON] [11] investigated the impact of the order of sentiment tuples in templates on aspect sentiment quadruplet prediction. They simplified templates by directly connecting symbols and elements, such as \"[AC] \(x_{ac}\) [AT] \(x_{at}\) [SP] \(x_{sp}\) [OT] \(x_{ot}\)\". [PERSON] [12] also redefined model templates, setting them as \"\(x_{ac}\)! the \(x_{at}\) is \(x_{ot}\)! \(x_{sp}\)\". These templates, through different orders and forms of placing sentimentelements, attempted to improve the prediction of aspect sentiment quadruplets. However, these templates were all concise sentences, expecting the model to directly provide a sentence containing the quadruplet. We consider the possibility of allowing the model to think slowly to provide answers. This is because there are complex dependencies among various sentiment elements in some sentences. For example, the aspect category is not only determined by the aspect term but also related to the opinion term. In the two examples in Figure 1, although the aspect terms are both \"sandwiches\", the aspect categories are different. Therefore, if we could design a template to assist the model in reasoning and analyzing the relationships among various sentiment elements, it might be beneficial for aspect sentiment quadruple prediction. Inspired by the chain-of-thought approach proposed by [PERSON] [13], we incorporated intermediate reasoning steps into our templates. This inclusion guides the model to progressively reason through the generation process based on our template, step by step inferring each sentiment element. We term this approach the Self-Inference Template (SIT). Simultaneously, during this process, there might be a repetitive generation of aspect terms, aspect categories, opinion terms, and sentiment polarities. To address this, we conduct a voting mechanism on the repetitively generated sentiment elements to obtain the final quadruplet. This approach helps ensure the correctness of predictions to some extent. We transform the gold labels into a Self-Inference Template form, denoted as \(y\), and the original text denoted as \(x\), is input into the model for supervised training, resulting in a \(p_{\theta}(y|x)\) model. To train the \(\theta\) parameters effectively, a large amount of supervised data is usually required.