Instruction Tuning for Few-Shot Aspect-Based Sentiment Analysis Siddharth Varia1Shuai Wang1Kishaloy Halder1Robert Vacareanu2 Miguel Ballesteros1Yassine Benajiba1Neha Anna John1

2025-04-24 0 0 404.72KB 9 页 10玖币
侵权投诉
Instruction Tuning for Few-Shot Aspect-Based Sentiment Analysis
Siddharth Varia1Shuai Wang1Kishaloy Halder1Robert Vacareanu2
Miguel Ballesteros1Yassine Benajiba1Neha Anna John1
Rishita Anubhai1Smaranda Muresan1Dan Roth1
1AWS AI Labs
2University of Arizona, Tucson, AZ, USA
{siddhvar, wshui, kishaloh, ballemig, benajiy, ranubhai, smaranm, drot}@amazon.com
rvacareanu@arizona.edu
Abstract
Aspect-based Sentiment Analysis (ABSA) is a
fine-grained sentiment analysis task which in-
volves four elements from user-generated texts:
aspect term, aspect category, opinion term, and
sentiment polarity. Most computational ap-
proaches focus on some of the ABSA sub-tasks
such as tuple (aspect term, sentiment polar-
ity) or triplet (aspect term, opinion term, senti-
ment polarity) extraction using either pipeline
or joint modeling approaches. Recently, gener-
ative approaches have been proposed to extract
all four elements as (one or more) quadruplets
from text as a single task. In this work, we take
a step further and propose a unified framework
for solving ABSA, and the associated sub-tasks
to improve the performance in few-shot scenar-
ios. To this end, we fine-tune a
T5
model with
instructional prompts in a multi-task learning
fashion covering all the sub-tasks, as well as
the entire quadruple prediction task. In experi-
ments with multiple benchmark datasets, we
show that the proposed multi-task prompting
approach brings performance boost (by abso-
lute
8.29
F1) in the few-shot learning setting.
1 Introduction
Aspect-Based Sentiment Analysis (ABSA) is a
fine-grained sentiment analysis task where the goal
is to extract the sentiment associated with an entity
and all its aspects (Liu,2012;Pontiki et al.,2014,
2015,2016;Schouten and Frasincar,2015;Zhang
et al.,2018;Nazir et al.,2020;Zhang et al.,2022).
For example, in the context of Restaurant reviews
the relevant aspects could be food, ambience, lo-
cation, service with general used to represent the
subject itself (i.e., restaurant). ABSA can provide
valuable fine-grained information for businesses
to analyze the aspects they care about. Annotated
Indicates equal contribution.
Work done during internship at AWS.
Figure 1: Illustrative orientation of four ABSA elements
i.e., Aspect Term, Aspect Category, Opinion Term, and
Sentiment. The related tasks often involve predicting
either everything together or a subset of them.
datasets have been released to foster research in
this area (Pontiki et al.,2014,2015,2016).
A full ABSA task aims to extract four elements
from a user-generated text: aspect term, aspect
category, opinion term and the sentiment polar-
ity (see Figure 1for an example). Most existing
approaches have the focus on extracting some of
these elements such as a single element (e.g., as-
pect term), tuple (e.g., aspect term, sentiment po-
larity), or triplet (e.g., aspect term, aspect cate-
gory, sentiment polarity) (Li et al.,2020;Hu et al.,
2019;Xu et al.,2020a). Recently, Zhang et al.
(2021a) tackled the full ABSA task, under the
name of Aspect Sentiment Quadruple Prediction
(ASQP). Technically, most existing computational
approaches have used extractive and discrimina-
tive models either in a pipeline or in an end-to-end
framework (Wang et al.,2016;Yu et al.,2019;
Cai et al.,2021) to address ABSA. Generative ap-
proaches have been recently shown to be effective
for the full ABSA task and its sub-tasks (Zhang
et al.,2021a,b;Yan et al.,2021). Most notably,
Zhang et al. (2021a) used a sequence-to-sequence
(seq-to-seq) model to address ASQP as a para-
phrase generation problem. One important con-
sideration is that modeling ABSA in a generative
fashion allows for cross-task knowledge transfer.
We go a step further and propose a unified model
arXiv:2210.06629v2 [cs.CL] 11 Jun 2023
that can tackle multiple ABSA sub-tasks, including
the ASQP task, and explore its effectiveness for
low data scenarios. Recent work on large language
models relies on the intuition that most natural
language processing tasks can be described via nat-
ural language instructions and that models trained
on these instructions show strong zero-shot perfor-
mance on several tasks (Wei et al.,2021;Sanh et al.,
2022). Based on this success, we propose a unified
model based on multi-task prompting with instruc-
tional prompts using T5 (Raffel et al.,2020) to
solve the full ABSA task i.e., ASQP (Zhang et al.,
2021a) and several of its associated sub-tasks ad-
dressed in the literature: 1) Aspect term Extraction
(AE) (Jakob and Gurevych,2010); 2) Aspect term
Extraction and Sentiment Classification (AESC)
(Yan et al.,2021); 3) Target Aspect Sentiment
Detection (TASD), which aims to extract the as-
pect term, aspect category, and sentiment polarity
(Wan et al.,2020); 4) Aspect Sentiment Triplet Ex-
traction (ASTE), which aims to extract the aspect
term, opinion term, sentiment polarity (Peng et al.,
2020). We conduct an extensive set of experiments
with multiple review datasets. Experimental results
show that our proposed model achieves substan-
tial improvement (
8.29
F1 on average) against the
state-of-the-art in few-shot learning scenario1.
2 Methods
The four elements of ABSA form a quadruple as
the sentiments are associated with both the aspect,
and the opinion terms (cf Figure 1). In this work,
we hypothesize that it is important to capture the
interaction between these components not only at
the quadruple level, but also within a subset of
these four elements.
We consider multiple factorized sub-tasks in-
volving one or more of the four elements to be pre-
dicted. We pose it as a combination of five Ques-
tion Answering (QA) tasks as illustrated in Figure
2. For each QA task, an instructional prompt is
used to train a seq-to-seq model to learn one or
more ABSA elements – referred to as Instruction
Tuning (IT). Our formulation enables learning all
sub-tasks via Multi-Task Learning (MTL).
1
Sources available at:
https://github.com/
amazon-science/instruction-tuning-for-absa
Figure 2: Instruction tuning to solve the sub-tasks re-
lated to ABSA. We devise multiple prompts to instruct a
seq-to-seq model to learn in multi-task learning manner.
2.1 Input Transformation
First, we transform each sentence in the corpus
using the instruction templates provided for each
task as shown in Table 1. Furthermore, we use mul-
tiple paraphrased instruction templates as shown
in Table 2for a task, and sample randomly when
preparing a batch during training (and evaluation)
of the seq-to-seq model. However, the target out-
put sequence remains unchanged irrespective of
the template sampled for a task.
2.2 Model Training
Next, we perform IT with the seq-to-seq model.
We train it in a MTL fashion where input-output
combinations are sampled from all tasks simultane-
ously. We use the following loss for model training:
L=1
T
T
X
t=1
n
X
i=1
log pθ(yi|y1, ..., yi1,xt).(1)
where
xt
is the transformed input sequence (
x
) for
tth
task.
θ
is the set of model parameters.
n
is the
length of output sequence.
yi
is the
ith
token in out-
put sequence.
T
is the number of tasks. The model
parameters are updated using
Adam
optimizer with
weight decay (Loshchilov and Hutter,2019).
2.3 Output Transformation
Finally, we transform the output using the tem-
plates provided in the rightmost column in Table 1.
In case there is more than one quadruple in the out-
put, we use a special separation token
[SSEP]
. We
map sentiment classes positive, negative and neu-
tral to great, bad and ok respectively in the output
2
摘要:

InstructionTuningforFew-ShotAspect-BasedSentimentAnalysisSiddharthVaria1∗ShuaiWang1∗KishaloyHalder1∗RobertVacareanu2†∗MiguelBallesteros1YassineBenajiba1NehaAnnaJohn1RishitaAnubhai1SmarandaMuresan1DanRoth11AWSAILabs2UniversityofArizona,Tucson,AZ,USA{siddhvar,wshui,kishaloh,ballemig,benajiy,ranubhai,s...

展开>> 收起<<
Instruction Tuning for Few-Shot Aspect-Based Sentiment Analysis Siddharth Varia1Shuai Wang1Kishaloy Halder1Robert Vacareanu2 Miguel Ballesteros1Yassine Benajiba1Neha Anna John1.pdf

共9页,预览2页

还剩页未读, 继续阅读

声明:本站为文档C2C交易模式,即用户上传的文档直接被用户下载,本站只是中间服务平台,本站所有文档下载所得的收益归上传人(含作者)所有。玖贝云文库仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对上载内容本身不做任何修改或编辑。若文档所含内容侵犯了您的版权或隐私,请立即通知玖贝云文库,我们立即给予删除!
分类:图书资源 价格:10玖币 属性:9 页 大小:404.72KB 格式:PDF 时间:2025-04-24

开通VIP享超值会员特权

  • 多端同步记录
  • 高速下载文档
  • 免费文档工具
  • 分享文档赚钱
  • 每日登录抽奖
  • 优质衍生服务
/ 9
客服
关注