\documentclass[english]{jnlp_3.8}
\usepackage{jnlpbbl_2.2}
\usepackage[dvipdfmx]{graphicx}
\usepackage{amsmath}
\usepackage{amssymb}
\usepackage{url}
\usepackage{array}
\usepackage{hangcaption_jnlp}
\allowdisplaybreaks


%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%% author's definition
\usepackage[dvipdfmx]{xcolor}
%%%%\usepackage{times}
%%%%\usepackage{latexsym}
%%%%\usepackage[T1]{fontenc}
%%%%\usepackage[utf8]{inputenc}
%%%%\usepackage{url}
%%%%\usepackage{latexsym}
%%%%\usepackage{amsmath}
%%%%\usepackage{amssymb}
\usepackage{multirow}
%%%%\usepackage{siunitx}
\usepackage{booktabs}
%%%%\usepackage{paralist}
%%%%\usepackage{adforn}
%%%%\usepackage{graphics}
%%%%\usepackage{float}
%%%%% \usepackage{caption}
%%%%\usepackage[export]{adjustbox} 
%%%%\usepackage{enumitem}
%%%%\usepackage{color}
%%%%\usepackage{bm}
%%%%\usepackage{subfigure}
%%%%\newcommand{\argmax}{\mathop{\rm argmax}\limits}
%%%%\usepackage{makecell}
%%%%\usepackage{multirow}
%%%%\usepackage{amsfonts}
%%%%\usepackage{caption}
%%%%\usepackage{subcaption}
%%%%\usepackage{booktabs}
%%%%\usepackage{array}
% \def\newblock{\ }
% my commands
%%%%\newcommand{\draft}[1]{\textcolor{gray}{#1}}
%%%%\newcommand{\verify}[1]{\textcolor{red}{#1}}
%%%%\makeatletter
%%%%\def\blfootnote{\xdef\@thefnmark{}\@footnotetext}
%%%%\makeatother
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\Volume{31}
\Number{4}
\Month{December}
\Year{2024}
%%%%\Issuetitle{Special Issue: XXXXXXXX}

\received{2024}{3}{30}
\revised{2024}{7}{1}
\accepted{2024}{8}{6}

\setcounter{page}{1523}


%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%   Title, Author, etc.            %%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\esubject{General Paper}
\etitle{Generative Data Augmentation for Aspect Sentiment Quad Prediction}
\eauthor{An Wang\affiref{TIT} \and Junfeng Jiang\affiref{UT} \and Youmi Ma\affiref{TIT} \and Ao Liu\affiref{TIT} \and Naoaki Okazaki\affiref{TIT}}

\eabstract{%
Aspect sentiment quad prediction (ASQP) analyzes the aspect terms, opinion terms, sentiment polarity, and aspect categories in a text. One challenge in this task is the scarcity of data owing to the high annotation cost. Data augmentation techniques are commonly used to address this issue. However, existing approaches simply rewrite texts in the training data, restricting the semantic diversity of the generated data and impairing the quality due to the inconsistency between text and quads. To address these limitations, we augment quads and train a quads-to-text model to generate corresponding texts. Furthermore, we designed novel strategies to filter out low-quality data and balance the sample difficulty distribution of the augmented dataset. Empirical studies on two ASQP datasets demonstrate that our method outperforms other data augmentation methods and achieves state-of-the-art performance on the benchmarks.
}
\ekeywords{Sentiment Analysis, Data Augmentation}

\headauthor{Wang et al.}
\headtitle{Generative Data Augmentation for Aspect Sentiment Quad Prediction}

\affilabel{TIT}{}{Tokyo Institute of Technology}
\affilabel{UT}{}{The University of Tokyo}


%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{document}

\maketitle

\renewcommand{\thefootnote}{}
\footnote[0]{This paper is an extended version of our preliminary paper \cite{wang-etal-2023-generative} presented in Proceedings of the 12th Joint Conference on Lexical and Computational Semantics (*SEM 2023).}
\renewcommand{\thefootnote}{\arabic{footnote}}


%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\section{Introduction}

Aspect-based sentiment analysis (ABSA) aims to mine opinions expressed regarding specific aspects of a given text. 
Recently, \citeA{zhang-etal-2021-aspect-sentiment} proposed a challenging compound subtask of ABSA called aspect sentiment quad prediction (ASQP), which predicts four kinds of elements (aspect category, aspect term, opinion term, sentiment polarity) as quadruplets (quads). A single text may contain multiple quads. For example, the text ``\textit{The \textit{pizza} is \textit{delicious} but \textit{expensive}.}'' mentions one aspect term (\textit{pizza}) and two opinion terms (\textit{delicious} and \textit{expensive}). Because these two opinions are related to the same aspect, the text includes two quads: (taste, pizza, delicious, positive) and (price, pizza, expensive, negative).

Traditional methods \cite{cai2020aspect,wan2020target,cai2021aspect} address such compound subtasks of ABSA in a discriminative manner. Recent studies \cite{zhang2021towards,hu2022improving} have primarily concentrated on sequence-to-sequence (Seq2Seq) frameworks for ASQP because of their superior performance. Specifically, These frameworks transform the input text into a sequence of linearized quads. In the realm of large language models, like ChatGPT, there's been a surge of interest due to their impressive capabilities in understanding and generating natural language. Nonetheless, \citeA{xu2023limits} have pinpointed that despite their groundbreaking performance, they still lag behind meticulously fine-tuned, smaller Seq2Seq models such as T5 in ASQP task. Consequently, this study will continue to focus on fine-tuned Seq2Seq models as the cornerstone of our research.

Despite the success of the field of ASQP, the scarcity of annotated data is still a remaining challenge. For instance, {\tt Rest15} and {\tt  Rest16} ASQP datasets only consist of 834 and 1,264 training samples respectively. However, manual annotation is costly and time consuming. One solution for expanding the number of training samples is data augmentation. EDA \cite{wei-zou-2019-eda} adopted some typical data augmentation techniques such as random swapping, inserting, deleting words, and synonym replacement to improve text classification. Back-translation \cite{yu2018qanet} obtained augmented data by translating the original text in English into another language and then translating it back into English. However, applying these operations to ASQP datasets usually disrupts crucial spans, such as aspect or opinion terms, resulting in label mismatches with the original input text. 
Additionally, traditional data augmentation methods only focus on augmenting texts that preserve semantic information similar to the original text in the training dataset. Therefore, the ability of these methods to help models generalize to unseen data is limited.

In this study, we propose a novel \textbf{Gen}erative \textbf{D}ata \textbf{A}ugmentation method (GenDA) by proposing a quads-to-text (Q2T) generation task---the reverse task of ASQP, which aims to generate a text based on the input quads. 
We synthesize a large number of quads by mixing the labels from the ASQP training dataset.
Then, we feed these labels to the trained Q2T model which uses a sequence-to-sequence model to generate new parallel data with high diversity. 
Figure~\ref{fig:compare_example} shows some examples of the traditional text augmentation methods and our method.
In addition, we propose a data filtering strategy concerning the unalignment of the aspect and opinion terms between text and quads to remove low-quality augmented data.
Furthermore, we propose a new measurement, Average Context Inverse Document Frequency (AC-IDF), to evaluate the difficulty of augmented samples and a strategy to balance the difficulty distribution. 
Finally, we can augment sufficient training data with good diversity and high quality.

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%% fig. 1
\begin{figure}[t]
\begin{center}
\includegraphics{31-4ia4f1.pdf}
\end{center}
\hangcaption{Examples of text data augmentation methods. We observe that the augmented texts from previous methods fail to include all spans in the label and the augmented texts are semantically very similar to the source text. Our method addresses these problems by generating texts from augmented labels.}
\label{fig:compare_example}
\end{figure}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

To evaluate our method, we conducted empirical studies using two ASQP datasets. 
We applied the proposed data augmentation with the previous ASQP model.
These studies demonstrate that our method outperforms other data augmentation methods and achieves state-of-the-art performance on the benchmark. 
In addition, the experimental analysis also verifies that our method successfully generates data with stronger diversity. 
Additionally, we conducted a detailed ablation study to confirm the effectiveness of each component of our method and provide insights into how they contribute to the performance of our method.

The contributions of this study are summarized as follows:
(1) We propose the synthesis of diverse parallel data using a Q2T model for ASQP. To the best of our knowledge, this is the first study to achieve data augmentation by text generation for ABSA.
(2) We propose a data filtering strategy to remove low-quality augmented data and a measurement to evaluate the difficulty of the augmented samples, which is used to balance the augmented dataset.
(3) Our experiments demonstrate that the proposed method achieves state-of-the-art performance on the two ASQP datasets.


%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\section{Preliminaries}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\subsection{Task Definition of ASQP}

Aspect sentiment quad prediction aims to predict all sentiment-related quadruplets $(ac, at, ot, sp)$ from a given text $x$. The elements of each quadruplet are aspect category ($ac$), aspect term ($at$), opinion term ($ot$), and sentiment polarity ($sp$). In particular, the aspect category belongs to a specific category set $AC$ and the sentiment polarity falls into sentiment classes $\{\mathtt{POS}, \mathtt{NEU}, \mathtt{NEG}\}$ denoting positive, neutral, and negative sentiments toward the aspect. Note that if the aspect and opinion terms are not explicitly mentioned in the given text, they are set as $\mathtt{NULL}$.


%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\subsection{Generative ASQP Methods}

Although early work handled ABSA in a discriminative manner, recent studies \cite{zhang-etal-2021-aspect-sentiment,zhang2021towards,hu2022improving} have mainly focused on generative ASQP methods because of their better performances. 

PARAPHRASE \cite{zhang-etal-2021-aspect-sentiment} % followed the model design of GAS and 
formulated ASQP into a paraphrasing problem. They transformed sentiment-related quadruplets into a natural language. Specifically, given a quad $(ac, at, ot, sp)$, they designed the following template:
    ``$ac$ is $sp$ because $at$ is $ot$.'',
where $ac$ and $sp$ are projected onto the natural language format.
When the input text contains multiple quads, the quads are transformed into different templated sentences separately and then concatenated with a special marker $\mathrm{[SSEP]}$.
\citeA{hu2022improving} explored the effect of the order of each quad element in the template. In addition, they proposed a more effective target template: ``[AT] $at$ [OT] $ot$ [AC] $ac$ [SP] $sp$'', where [AT], [OT], [AC], and [SP] are special tokens. We refer to the method that modifies the PARAPHRASE output to the marked template format as ``PARAPHRASE + Marked Template''.

Inspired by previous generative ASQP methods, we consider the reverse process of text-to-quads and further propose a generative data augmentation method based on it. 


%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\section{Methodology}

To alleviate the problem of annotated data scarcity and to generate augmented data with strong diversity and high quality for the ASQP task, we propose a novel generative data augmentation method. 
Figure~\ref{fig:overview} presents an overview of the proposed method. 
The proposed method consists of three main steps.
(1) We reverse the data in the ASQP dataset to create a new training set, which we then use to train a quads-to-text model. 
(2) We aim to generate data that are semantically different from the training data. Hence, we collect all labels from the training set and propose mixing them to create an augmented quad set. We then randomly sample several mixed quads and feed them into the quads-to-text model to generate the corresponding source text.
(3) To further improve the performance of our data augmentation, we propose two strategies to filter out generated texts that do not match the given quads and balance the sample difficulty distribution of the augmented data.
Finally, we combine the augmented data with the original training set to train an ASQP model.

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%% fig. 2
\begin{figure}[t]
\begin{center}
\includegraphics{31-4ia4f2.pdf}
\end{center}
\hangcaption{Overview of our proposed method. In Step 3 of Figure (a), AW Set, OW Set, and CW Set represent aspect word set, opinion word set, and context word set, respectively. They are utilized to aid the filtering process.
Figure (b) shows an example of synthesizing augmented parallel data consisting of a text, ``I am happy with the food in this dinner,'' and an associated label, ``(food quality, food, happy, $\mathtt{POS}$), (food quality, dinner, happy, $\mathtt{POS}$)''. The dotted line indicates the source of the quad or label.}
\label{fig:overview}
\end{figure}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%


%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\subsection{Quads-to-Text Task}

Before introducing our generative data augmentation method, we first define a new text generation task, the quads-to-text (Q2T) task, and then design a Q2T model based on a pre-trained sequence-to-sequence model.


%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\subsubsection{Task Definition of Quads-to-Text Task}
\label{method:task}

To obtain parallel augmented data for our generative ASQP data augmentation, 
\pagebreak
we first propose a quads-to-text task.
Q2T aims to generate text describing the given quads. Given $n$ quads $\{q_1, q_2, ..., q_n\}$, where $q_i = (ac_i, at_i, ot_i, sp_i)$, the task requires generating a text $x$ that includes and only includes the input quads.


%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\subsubsection{Quads-to-Text Model}
\label{method:augmentor}

To handle the Q2T problem, we utilize the pre-trained sequence-to-sequence model following other works on controllable text generation \cite{zhang2022survey}. Unlike conventional text generation methods, our designed Q2T model not only generates texts but also provides a mechanism to conveniently judge whether the generated statement meets the task requirements of Q2T. In our method, we mainly focus on the input and output designs of the model.

For the input sequence of the model, we formulate the given quads as template sentences similarly to \cite{hu2022improving}. The difference is that we insert special indexing markers before and after each sentence to distinguish multiple quads. Specifically, the $i$-th quad $(ac_i, at_i, ot_i, sp_i)$ is transformed into a templated text:
\begin{quote}
    [i][AT] $at_i$ [OT] $ot_i$ [AC] $ac_i$ [SP] $sp_i$ [i]
\end{quote}
The final transformed texts are linked with a special marker $\mathrm{[SSEP]}$ following previous work \cite{zhang2021towards,hu2022improving}. 

For the output sequence of the model, instead of only generating the source text, the Q2T model can generate text with annotations. The annotations identify aspect terms and opinion terms in the text. In addition, the annotation also includes the relation information between aspects and opinions. The model annotates aspect and opinion terms of $i$-th quad in the text using special markers ``[AT]'', ``[$i$~/AT]'', ``[OT]'', and ``[$i$~/OT]''. Special tokens [AT] and [OT] denote the beginning of an aspect and opinion term while [$i$~/AT] and [$i$~/OT] denote the ending position. When there are multiple aspects in a text that are described by the same opinion or there are multiple opinions describing the same aspect, they can be grouped together using a comma-separated list of numbers within square brackets, such as [1,2~AT] to indicate that the first and second opinion describe the same aspect. We will explain the function of these annotations in detail in Section~\ref{method:filtering}.


%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\subsubsection{Training}

To make the Q2T model generate text that meets our requirements, we first build Q2T datasets based on ASQP datasets. ASQP aims to predict quads from the given text,  thus, we obtain Q2T datasets by simply inverting the input and label of the ASQP dataset. To enhance the ability to understand the meaning of the special index markers, we augment Q2T data by permuting the order of quads in the templated input of Q2T model. After training the Q2T model, the model can be used to obtain more abundant augmented data for the ASQP task.


%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\subsection{Augmention Strategy}

In this section, we first propose a novel method for obtaining a diverse augmented dataset based on the Q2T model. We then propose a filtering strategy and a difficulty balancing strategy to further improve the performance of data augmentation.


%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\subsubsection{Synthesizing Augmented Quads}

To obtain diverse data that are meaningfully different from the data in the original ASQP training dataset, we propose to diversify the input of the Q2T as shown in Figure~\ref{fig:overview}. 

First, we collect all quads from the ASQP training dataset as a quad collection, denoted as $\mathcal{S}_{origin}=\{(ac_i, at_i, ot_i, sp_i)\}$. Subsequently, for those quads that \textbf{share the same aspect category} $ac_i$, we randomly exchange their aspect term $at$ and opinion term $ot$ with sentiment polarity $sp$ to create new quads. The opinion term and sentiment polarity from the same original quad will be bound together to avoid getting new quads where elements conflict with each other. For example, given two quads: (price, pizza, cheap, $\mathtt{POS}$) and (price, steak, expensive, $\mathtt{NEG}$), we can synthesize new quads (price, steak, cheap, $\mathtt{POS}$) and (price, pizza, expensive, $\mathtt{NEG}$). Finally, we balance the number of synthesized quads for each aspect category to obtain the augmented quad collection, denoted as $\mathcal{S}_{augment}$. Subsequently, each time we randomly select $1\sim 3$ quads from $\mathcal{S}_{origin} \cup \mathcal{S}_{augment}$, and feed them to the Q2T model for data augmentation. 
During the training of the ASQP model, we remove the annotations such as [AT] in the augmented text.


%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\subsubsection{Data Filtering}
\label{method:filtering}

For ASQP data augmentation, a common problem is that the augmented texts may not be faithful to the given quads. Specifically, the generated texts from the Q2T model may contain fewer or more quads compared to input quads. Using unfaithful text as ground truth for given quads to train the ASQP model will introduce noise that decreases the performance. Thus we propose a two-step filtering strategy to remove these low-quality data. 

The first step of filtering involves checking the consistency between the output text of the Q2T model and the input quads.
As introduced in Section~\ref{method:augmentor}, our Q2T model annotates aspect terms and opinion spans using special markers when generating texts. This allows us to collect aspect-opinion pairs from the output text and then check the consistency between the detected pairs and input quads. The consistency between the detected pairs and the input quads is verified automatically, as illustrated in Figure \ref{fig:overview} (b), the model's output text includes markers to indicate (aspect term, opinion term) pairs, referred to as P1. For the input (aspect category, aspect term, opinion term, sentiment polarity) quads, we derive (aspect term, opinion term) pairs, referred to as P2, by removing aspect category and sentiment polarity. If P1 does not match P2, it indicates that the detected pairs and the input quads are inconsistent. We filter out the examples with inconsistent aspect and opinion terms.

However, the generated texts that pass the first filtering step may contain additional aspect or opinion terms that are not annotated with special markers. If the generated text includes aspects or opinions that are unmarked, the quad labels will be unable to cover all the aspect-opinion pairs within the text, resulting in inconsistent data labels. Since these associations are not present in the labels, training the ASQP model with such data prevents the model from thoroughly learning all the correct quads during the training phase. Consequently, the model will not be able to accurately identify and extract these correct quads during testing, which leads to a reduction in recall.

To address this issue, we propose the second step of data filtering. The process involves building two keyword sets (an aspect word set and an opinion word set) and a context word set.
Specifically, we begin by collecting all the texts from the training data. Because the aspect and opinion terms are annotated, we categorize the words in the text based on labels into three groups: aspect words, opinion words, and context words. After that, we gather all the aspect words to create the aspect word set. Similarly, we collect all the opinion words to form the opinion word set and all the context words to construct the context word set.
If the unmarked part (i.e., the context) of a generated text contains any word that belongs to the keyword sets but does not exist in the context word set, we consider this example as containing additional aspect/opinion terms and remove it from the augmented dataset.  


%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\subsubsection{Difficulty Balancing}

In addition to the existence of low-quality data, another problem we observe is that more than half of the generated texts are simple expressions. These generated texts are far simpler than most texts in the ASQP dataset.
A text can be divided into three different parts, aspect terms, opinion terms, and context. Even if being given different quads as inputs, the Q2T model usually generates text with relatively similar context, such as `The $at$ is $ot$'.
When most augmented training data are too simple, the model may not learn the complex patterns required to make accurate predictions on unseen data. Therefore, it is necessary to balance the distribution of the sample difficulty of the augmented dataset.

To assess the sample difficulty, we propose a new measurement factor, called the Average Context Inverse Document Frequency ($\text{AC-IDF}$). 
The difficulty of a text can be defined as the level of language proficiency required to understand the text \cite{fulcher1997text}. A text that uses many uncommon words is considered more difficult than one that uses simple and common language. Therefore, one way to measure the difficulty of a text is to calculate the average IDF score of the words in the text. 
Furthermore, because aspects and opinions are directly copied from the input of the model, it is critical to evaluate the difficulty of the context part of the text.
Therefore, we propose using the context difficulty to measure the learning difficulty of the sample for our model.

Specifically, given a text collection $X$ from the dataset, we remove all aspects and opinions terms to obtain only the context words. We denote the preprocessed text collection by $\bar{X}$. Then, for each text $\bar{x}_i$ after preprocessing, we calculate the AC-IDF$_i$ of the text as follows: 
\begin{align}
    \text{AC-IDF}_i & = \frac{1}{n_i}\sum_{j=1}^{n_i} \text{IDF}(t_{ij}),\\
    \text{IDF}(t_{ij}) & = \ln \frac{|\bar{X}|}{1+|\{\bar{x}\in\bar{X}:t_{ij} \in \bar{x}\}|},
\end{align}
where $t_{ij}$ is the $j$-th word in $\bar{x}_i$, $n_i$ is the number of words in $\bar{x}_i$, $|\bar{X}|$ denotes the size of $\bar{X}$, and $|\{\bar{x}\in\bar{X}:t_{ij}\in\bar{x}\}|$ represents the total number of texts where $t_{ij}$ appears. 

We build a subset according to the AC-IDF of the generated texts so that the difficulty of the selected data follows a uniform distribution. Specifically, we set several intervals according to the sample difficulty and randomly sample similar amounts of data from the entire augmented dataset for each interval. Finally, we create a subset whose data obey an approximate uniform distribution with respect to the sample difficulty. Thus, the model learns to predict quads from diverse and balanced data to improve performance.


%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\section{Experiment}
\label{experiment}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\subsection{Datasets}

We evaluate our method on two ASQP datasets: {\tt Rest15} and {\tt Rest16} \cite{zhang2021towards}, which originates from the SemEval Challenges \cite{pontiki2015semeval,pontiki2016semeval}. Their domain is of restaurant reviews. 
In these datasets, each sample includes a text as input, with sentiment quads as ground truth. Datasets are split to train, validation, and test sets officially. Table~\ref{tab:ASQP stastistic} presents the relevant statistics. 

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%% table 1
\begin{table}[t]
\input{04table01.tex}%
\caption{Statistics of datasets of ASQP task.}
\label{tab:ASQP stastistic}
\end{table}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%


%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\subsection{Experiment Setting}

In accordance with previous studies \cite{zhang-etal-2021-aspect-sentiment,hu2022improving}, our method also employs T5-base \cite{raffel2020exploring} as the pre-trained backbone for both Q2T and ASQP tasks. 
The parameter count is twice the size of the backbone model (one for the Q2T model and one for the ASQP model), which is equivalent to $2 \times 220$ million parameters.
We set the batch size to 8 and the learning rate to 1e-4. During the inference stage, greedy decoding is used to generate the output sequence. 
The amount of augmented data is four times that of training data.
The experiments are run for a maximum of 20 epochs. All reported results are the average of five runs initialized with different random seeds. We use precision, recall, and micro F1 scores as the evaluation metric. A sentiment quad prediction is considered accurate only when all of its predicted elements match the ground truth exactly. We also report the standard errors of our base model and proposed data augmentation method.


%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\subsection{Experimental Environment and Runtime}

All our experiments are conducted with a single NVIDIA Tesla V100 GPU. 
Our method was implemented using the Hugging Face transformers library \cite{wolf2019huggingface}.
The training process of our method on GPU for one run took approximately 50 minutes including 20 minutes for training the Q2T model and 30 minutes for the ASQP model. 
Our filtering and balancing strategies are rule-based methods rather than model-based methods, so their execution takes almost zero time compared to the model training.


%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\subsection{Main Results}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\subsubsection{Compared Methods}

Previous ASQP methods can be categorized into three types: BERT \cite{devlin-etal-2019-bert} based methods, T5 \cite{raffel2020exploring} based methods and ChatGPT. The BERT based methods include \textbf{HGCN} \cite{cai2020aspect}, \textbf{TASO} \cite{wan2020target}, and \textbf{Extract-Classify-ACOS} \cite{cai2021aspect}. T5 based methods include \textbf{GAS} \cite{zhang2021towards}, \textbf{PARAPHRASE} \cite{zhang-etal-2021-aspect-sentiment}, \textbf{DLO} and \textbf{ILO} \cite{hu2022improving}. These methods finetuned the model using all training data. 
\citeA{xu2023limits} evaluated gpt-3.5-turbo on ASQP task under few-shot learning setting.
We report the performance of these methods directly copied from their paper. \textbf{PARAPHRASE + Marked Template} is a variant of the PARAPHRASE method. It uses a different target template with special markers which are proposed by \citeA{hu2022improving}. We implement it by ourselves and adopt it as our base model to apply our data augmentation method.

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%% table 2
\begin{table}[b]
\input{04table02.tex}%
\hangcaption{Evaluation results (\%) on {\tt Rest 16} and {\tt Rest 15} datasets of ASQP for comparing with previous state-of-the-art methods. The best and second-best performances are highlighted in bold and underlined, respectively. DA means using the data augmentation technique.}
\label{Table:ASQPCompare}
\end{table}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%


%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\subsubsection{Analysis}

Table~\ref{Table:ASQPCompare} shows the evaluation results on the ASQP task. 
We observe that our proposed data augmentation method, \textbf{GenDA}, clearly improves the performance of the base model by +2.22 and +2.18 F1 score on {\tt Rest15} an {\tt Rest16}. GenDA achieves state-of-the-art performance on the ASQP benchmark. Note that GenDA has a higher precision score while maintaining a good recall compared with other methods. This observation indicates that our proposed data augmentation method helps to improve the robustness of our model, and therefore, predicts the sentiment quadruplets more precisely. 

Our base model \textbf{PARAPHRASE + Marked Template} achieves better performance than the original PARAPHRASE method but does not outperform DLO and ILO. The reason why we do not choose DLO or ILO as our base model is that these two methods are relatively complex and not suitable for integrating our data augmentation methods.


%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\subsection{Effects of Augmentation Methods}

To demonstrate the effectiveness of the data augmentation method we proposed, we also compare it with several representative data augmentation methods on the ASQP benchmark. For all data augmentation methods, the amount of augmented data is four times that of training data.

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%% table 3
\begin{table}[b]
\input{04table03.tex}%
\hangcaption{Evaluation results (\%) on {\tt Rest 16} and {\tt Rest 15} datasets of ASQP for comparing different data augmentation methods and ablations. All involved data augmentation methods are applied on ``PARAPHRASE + Marked Template'' ASQP model for a fair comparison. GenDA (original label) denotes only using quad collection from the training dataset instead of augmented quads collection for Q2T generation.}
\label{Table:AugCompare}
\end{table}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\textbf{EDA} \cite{wei-zou-2019-eda} adopts four operations including synonym replacement, random insertion, random swap, and random deletion to the input texts. We additionally design two ASQP-specific variants of EDA: \textbf{CEDA} applies EDA only in the context of input text whereas \textbf{AOEDA} applies EDA on the aspect terms and opinion terms of the input text. Note that the terms in quads will also be revised correspondingly.
\textbf{AEDA} \cite{karimi-etal-2021-aeda-easier} is an simpler data augmentation method that randomly inserts punctuation into the input texts.
\textbf{Back Translation} \cite{yu2018qanet} augments data by translating text from English to another language and then back to English. We used the machine translation models proposed by \citeA{ng-etal-2019-facebook} in our experiment. 

Comparison results are reported in Table~\ref{Table:AugCompare}. 
Compared with existing data augmentation methods, we observe that applying EDA and Back Translation on the base model brings no noticeable improvement and can even reduce performance. We attribute it to the fact that sometimes these methods disrupt the matching of input text and labels because they may revise some important spans including aspects or opinion terms. 
To explore whether directly modifying traditional data augmentation methods to adapt the ASQP task can improve model performance, we evaluate AOEDA and CEDA, two simple variants of EDA which avoid mismatches between text and labels of augmented data. The results show that both two variants could improve the performance slightly, but the improvement is limited,  likely because the existing data augmentation methods cannot provide training samples with high diversity.
Finally, our method GenDA significantly outperforms all traditional data augmentation methods under all evaluation metrics. Compared with the best F1 scores of previous data augmentation methods, the improvement of our method reaches 1.26 and 1.04. These results demonstrate the effectiveness of our data augmentation method.


%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\subsection{Analysis of the Text Diversity}

We analyze the text diversity of different data augmentation methods. In Figure~\ref{fig:visualization}, we visualize the text representations of the entire {\tt Rest 16} training dataset and 4,000 augmented data generated by different data augmentation methods. Specifically, we first adopt a BERT-based encoder to transform each text into a representative vector and then use t-SNE \cite{van2008visualizing} to reduce dimension for visualizing the distributions.

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%% fig. 3
\begin{figure}[t]
\begin{center}
\includegraphics{31-4ia4f3.pdf}
\end{center}
\hangcaption{Visualization of text semantic representation. Each subfigure shows the distribution of original texts (in salmon color) from the Rest16 training dataset and corresponding augmented texts (in blue color) obtained using different methods. In each subcaption, we report the distance between two datasets and the Self-BLEU score (\%) computed on each augmented dataset.}
\label{fig:visualization} 
\end{figure}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

We can observe that traditional data augmentation methods, such as EDA and Back Translation, produce augmented text distributions that closely resemble the original text in terms of structure and semantic information. In contrast, the augmented text generated by GenDA exhibits a distribution that does not overlap with the original text, indicating a significant divergence from the original data. To quantify this difference, we calculate the average Euclidean distance between each point in the augmented dataset and its nearest neighbor in the training dataset. The semantic representations of traditionally augmented texts closely align with the original texts, resulting in small average distances. However, our proposed method, GenDA, yields a high distance score, demonstrating its ability to generate texts that are less likely to semantically overlap with the original texts. Although our model is trained on the original dataset, the inherent randomness in the text generation process allows it to produce data that deviates from the original pattern, thereby showcasing the advantages of our approach. Traditional data augmentation methods, on the other hand, involve direct edits to the original dataset's text, preventing any substantial deviation from the original data pattern.

We also provide the Self-BLEU scores \cite{zhu2018texygen}, a metric used to evaluate the diversity of generated text in natural language generation tasks. Self-BLEU measures the similarity among multiple generated texts. The high Self-BLEU score of EDA indicates low diversity in EDA-augmented texts, while Back Translation achieves a lower Self-BLEU score than EDA. Our proposed method, GenDA, achieves the lowest Self-BLEU score, clearly demonstrating its superior ability to generate more diverse texts. This highlights the advantage of GenDA in producing a wider variety of augmented texts compared to traditional methods, which tend to generate more repetitive and less varied outputs.


%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\subsection{Ablation Studies}

To investigate the effectiveness of each component of our proposed method, 
\pagebreak
we conduct an ablation study on two ASQP datasets as shown in Table~\ref{Table:AugCompare}. 
Even without adopting our filtering or balancing strategies, our model can outperform the base model. After applying our filtering strategy, we observe an improvement because it filters out noisy and irrelevant data. 
The balancing strategy also brings a performance gain, which indicates that addressing the sample difficulty imbalance issue in the augmented datasets is beneficial for models to learn. 
Note that compared to the filtering strategy, the balancing strategy contributes more to performance gains, which means that sample difficulty imbalance has a worse impact on performance than the low-quality problem.
Furthermore, when the filtering and balancing strategies are applied jointly, our model achieves a further performance gain. 
In addition, when only the original labels are input, the model's f1 scores noticeably decline by 0.83 and 0.74 compared to when augmented labels are input.
Employing solely the original labels from the training dataset, herein designated as GenDA (original label), in the absence of augmented quads, results in a noticeable decline in performance when contrasted with GenDA utilizing augmented quads.
ChatGPT is a powerful model for text generation and it can also be used in our GenDA approach. We ultilize ChatGPT (gpt3.5-turbo) to generate text from quads and apply our filtering and balancing strategies to it. We employ in-context learning with 30 examples for ChatGPT to learn quads-to-text task. We observed that using ChatGPT significantly improves precision, although the improvement in recall is only slight. However, the cost of using ChatGPT is considerably higher compared to our Q2T model, primarily because the number of parameters in ChatGPT is much higher than that of T5-base.

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%% fig. 4
\begin{figure}[b]
\begin{center}
\includegraphics{31-4ia4f4.pdf}
\end{center}
\caption{Examples of generative data.}
\label{fig:err}
\end{figure}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%


%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\subsection{Examples of Generative Text}

We present four examples of generative text: 
\pagebreak
one correct example and three low-quality examples. The provided examples illustrate the 
issues of low-quality generated text and the motivation of our data filtering strategies. The first example is a high-quality one, faithful to the input quads. The second and third examples are low-quality ones that can be filtered out by the first step of the proposed two-step filtering strategy, which checks consistency between the output text and input quads. The fourth example is another low-quality one, which contains an additional aspect that is not present in the input but not annotated by the special markers. Such noisy texts would escape the first-step filtering but can be identified by the second-step filtering.


%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\subsection{Error Analysis}

After conducting a comprehensive analysis of the error cases, we present two specific examples to shed light on the challenges encountered by our approach, as illustrated in Table \ref{table:error}.
In the first case, our model incorrectly identifies the predicted aspect category as ``restaurant miscellaneous'' instead of the correct label ``restaurant general.'' This error highlights a limitation of our model in accurately categorizing certain aspects where the classification boundaries become ambiguous. 
In the second case, we observe a flaw in aspect extraction. The predicted aspect is ``frozen pizza,'' whereas the correct aspect should have been ``pizza.'' This error reveals that our model sometimes faces difficulties in extracting the precise aspect when there are subtle variations or distinctions within the aspect terms.
Consequently, our data augmentation approach may not effectively assist the model when it encounters such challenging instances.

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%% table 4
\begin{table}[b]
\input{04table04.tex}%
\caption{Two error examples of our methods.}
\label{table:error} 
\end{table}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%


%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\subsection{Performance of Quads-to-Text Model}

Since our data augmentation technique relies on the Q2T model, the quality of the generated data is based on the model's capability. We evaluate the performance of Q2T models, including T5-base and ChatGPT, in Table \ref{tab:Q2T performance}. 
We reverse the labels and inputs of the ASQP test dataset and ultilize them for evaluation. We employ three evaluation metrics: BLEU score, RougeL score, and AO Match score. The BLEU and RougeL scores are traditional metrics used to assess the quality of generated text by comparing it to reference texts. These metrics focus on the precision and recall of n-grams, providing insights into the fluency and coherence of the generated sentences. The AO Match score is a new defined metric. It denotes the proportion of samples in which all aspects and opinions in the input quads appear in the generated output text. AO Match score evaluates the ability of the generated text to cover the aspects and opinions present in the input quads. The results showed that the T5-base model achieved higher BLEU and RougeL scores, indicating its proficiency in generating text that closely matches the reference in terms of lexical and syntactic structure. However, ChatGPT achieved a higher AO Match score, demonstrating its superior ability to follow input quads. Please note that the BLEU and RougeL scores are for reference only. Because our test data only contain one reference text, it cannot take into account the diversity of generation, which may lead to a lower score for the model.

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%% table 5
\begin{table}[t]
\input{04table05.tex}%
\hangcaption{Performance of Quads-to-Text Model on reversed ASQP test dataset. AO Match means the proportion of samples in which all aspects and opinions in the input quads appear in the generated output text.}
\label{tab:Q2T performance}
\end{table}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%


%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\section{Related Work}
\label{related}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\subsection{Aspect-based Sentiment Analysis}

ABSA aims to analyze fine-grained sentiment elements including not only the sentiment polarity but also the aspect term, opinion term, and aspect category. 
Intuitively, these elements are related. Therefore, recent studies tried to model them jointly, such as constructing aspect-sentiment pairs \cite{cai2020aspect} or triples \cite{peng2020knowing}. Furthermore, there is a growing interest in modeling these four elements simultaneously, with two promising directions being proposed. \cite{cai2021aspect} proposed a two-stage method that first extracts aspect and opinion terms, and then uses them to classify aspect category and sentiment polarity. Another framework is based on a generation model \cite{zhang-etal-2021-aspect-sentiment,zhang2021towards}, which predicts the quadruplet in an end-to-end manner by paraphrasing the input text to a target template. Since they additionally exploit the information from label semantics, the generation-based method achieves dominantly better performance in the field of ABSA.


%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\subsection{Data Augmentation}

Data augmentation is a common technique in language and vision domains to improve model performance. Previous data augmentation methods can be categorized into three types. The first type only augments the input, such as image flipping, rotation, and scaling \cite{bjerrum2017smiles} for images, and text modification \cite{wei-zou-2019-eda} as well as back translation \cite{yu2018qanet} for natural language. 
The second type only augments the output, such as generating target-side soft pseudo sequences \cite{xie2022target}. These approaches are particularly relevant for generation tasks where the order of words is important. 
The third type augments both the input and the output, such as the mixup approach \cite{zhang2018mixup} which generates virtual training examples through linear combinations of feature vectors and their associated targets.
To the best of our knowledge, our work is the first to propose a data augmentation method of the third type specifically for subtasks of ABSA. Unlike previous methods in this realm that augment only the input \cite{li2020conditional} or output \cite{hu2022improving}, our method augments both input and output, leading to augmenting more diverse samples. Our method reduces the model's reliance on a limited set of examples and enables it to better generalize to unseen data, thereby mitigating the problem of overfitting and achieving better performance on test data.


%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\section{Conclusion}
\label{conclusion}

In this paper, we have proposed a new approach to tackle the problem of data scarcity in the ASQP task. To address this challenge, we present a generative data augmentation method based on a pre-trained quads-to-text model. Our method generates new parallel data by synthesizing a large number of quads from the training dataset and generating corresponding pseudo texts. Moreover, we propose a data filtering strategy to remove low-quality generated data and a measurement to balance the difficulty of augmented samples. Our empirical studies on two ASQP datasets have demonstrated the superiority of our method compared to other data augmentation methods and the effectiveness of each component in our method. Our approach not only is an innovative solution to the problem of data scarcity in ASQP, but also provides a potential direction for future work in other related fields, such as relation extraction and event extraction.


%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\section{Acknowledgments}

This paper is an extended version of our preliminary paper \cite{wang-etal-2023-generative}, presented in Proceedings of the 12th Joint Conference on Lexical and Computational Semantics (*SEM 2023).
This work was supported by JSPS KAKENHI Grant Number 19H01118. 


%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\bibliographystyle{jnlpbbl_1.7}
\bibliography{04refs}


%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{biography}

\bioauthor[:]{An Wang}{%
Ph.D. student in the School of Computing, Tokyo Institute of Technology. 
He received a bachelor's degree from the School of Mechatronic Engineering and Automation, Shanghai University in 2019. He received a master's degree from the School of Computing, Tokyo Institute of Technology in 2022. 
}

\bioauthor[:]{Junfeng Jiang}{
Ph.D. student at The University of Tokyo. He received the B.S. degree from the School of Mathematics, Sun Yat-sen University, Guangzhou, China, in 2019, and the M.E. degree from the Graduate School of Information Science and Technology, The University of Tokyo, Japan, in 2022. 
}

\bioauthor[:]{Youmi Ma}{
Ph.D. student at Tokyo Institute of Technology. She received the bachelor's degree (Bachelor of Engineering) from ShanghaiTech University, Shanghai, China in 2019 and the M.S. degree (Master of Engineering) from Tokyo Institute of Technology in 2021.
}

\bioauthor[:]{Ao Liu}{Senior Researcher in Tencent Inc. He received his Ph.D. degree in Artificial Intelligence from Tokyo Institute of Technology in 2023. Prior to that, he received his master's degree in 2020 and bachelor's degree in 2017 from University of Electronic Science and Technology of China (UESTC).
}

\bioauthor[:]{Naoaki Okazaki}{
Professor at Department of Computer Science, School of Computing, Tokyo Institute of Technology. He obtained his Ph.D. from University of Tokyo in 2007. He worked as a post-doctoral researcher in University of Tokyo (in 2007--2011) and as an associate professor in Tohoku University (in 2011--2017). He is also a visiting research scholar of the Artificial Intelligence Research Center (AIRC), AIST.
}

\end{biography}



%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\biodate




\end{document}

