Source-linked AI summary

A Unified Generative Framework for Aspect-Based Sentiment Analysis

Hang Yan, Junqi Dai, Tuo ji, Xipeng Qiu, Zheng Zhang

arXiv:2106.04300v1cs.CL

TL;DR

ABSA contains seven related subtasks, but prior work generally addresses only subsets, motivating a unified solution. The paper converts each subtask into pointer- and class-index generation, uses BART for end-to-end sequence generation, and reports substantial gains across four datasets.

  • Problem

    Existing ABSA studies commonly focus on only subsets of seven related subtasks, making a unified framework difficult to achieve.

  • Method

    The paper reformulates extraction and classification as pointer-index and sentiment-class-index generation, then uses BART in an end-to-end sequence-to-sequence framework.

  • Results

    The framework achieves significant improvements on most datasets and outperforms most state-of-the-art models across the ABSA subtasks.

  • Takeaways & Limitations

    The experiments demonstrate an end-to-end unified generative solution for the whole set of ABSA subtasks.

Abstract

from arXiv · show

Aspect-based Sentiment Analysis (ABSA) aims to identify the aspect terms, their corresponding sentiment polarities, and the opinion terms. There exist seven subtasks in ABSA. Most studies only focus on the subsets of these subtasks, which leads to various complicated ABSA models while hard to solve these subtasks in a unified framework. In this paper, we redefine every subtask target as a sequence mixed by pointer indexes and sentiment class indexes, which converts all ABSA subtasks into a unified generative formulation. Based on the unified formulation, we exploit the pre-training sequence-to-sequence model BART to solve all ABSA subtasks in an end-to-end framework. Extensive experiments on four ABSA datasets for seven subtasks demonstrate that our framework achieves substantial performance gain and provides a real unified end-to-end solution for the whole ABSA subtasks, which could benefit multiple tasks.

1 Introduction

ABSA identifies aspect terms, their sentiment polarities, and opinion terms, yielding seven related subtasks. Despite their strong relationships, existing work commonly addresses only one to three subtasks individually, complicating unified solutions.

  • ABSA objectives: ABSA identifies aspect terms, corresponding sentiment polarities, and opinion terms in fine-grained sentiment analysis.The example identifies “drinks” and “wine selection” as aspects, with positive polarity and associated opinion terms.
  • Seven subtasks: Seven ABSA subtasks arise from different combinations of aspects, sentiments, and opinions.These include extraction, classification, paired extraction, and triplet extraction tasks.
  • Seven subtasks: Triplet Extraction simultaneously extracts aspect terms, opinion terms, and sentiment polarity.
  • Research gap: Most existing studies focus on only 1∼3 subtasks individually, despite their strong relationships.

1. Input: Some subtasks ( AE, OE, AESC, Pair

ABSA subtasks diverge in their inputs, outputs, and task types, making a single unified model difficult. The proposed framework reformulates extraction and classification as index generation and applies BART end to end across all subtasks.

  • Input and output divergences: Some ABSA subtasks take only the sentence as input, whereas ALSC and AOE also require a given aspect term.
  • Input and output divergences: Outputs range from a single aspect, sentiment, or opinion type to compound combinations of these elements.
  • Prior approaches: Prior unified approaches use pipelines or extended tagging schemas, but existing methods struggle to solve all subtasks without submodels or structural changes.
  • Proposed framework: The framework represents extraction as pointer-index generation and classification as class-index generation within one generative formulation.
  • Proposed framework: BART generates unified target sequences in an end-to-end sequence-to-sequence framework without task-specific decoder designs.
  • Evaluation: Experiments cover four public datasets spanning subsets of the seven subtasks, constituting the first evaluation claimed to cover all ABSA tasks.
  • Evaluation: The framework significantly outperforms recent state-of-the-art methods.

2 Background

Prior ABSA research develops specialized approaches for single-output and compound-output subtasks, while sequence-to-sequence pretraining provides a general modeling foundation. BART is selected as the paper’s sequence-to-sequence backbone.

  • Single-output subtasks: AE, OE, ALSC, and AOE are single-output subtasks that produce one type of aspect, sentiment, or opinion representation.
  • Single-output subtasks: AE research commonly uses sequence tagging, whereas recent work also explores sequence-to-sequence learning with pretrained language models.
  • Single-output subtasks: OE is often treated as an auxiliary task, and many methods extract unpaired aspect and opinion terms.
  • Single-output subtasks: AOE research commonly applies sequence tagging, following its introduction alongside dedicated datasets.
  • Compound-output subtasks: Compound-output subtasks use pipelines, tagging schemas, multitask learning, span extraction, or MRC-based methods.
  • Sequence-to-sequence models: Sequence-to-sequence models have been studied across NLP, and pretrained sequence-to-sequence models include BART.
  • Sequence-to-sequence models: BART is a denoising autoencoder with Transformer encoder and decoder layers that autoregressively restores noised input sentences.

3 Methodology

The framework represents every ABSA subtask as a target sequence mixing pointer indexes for term spans with class indexes for sentiment, then generates these sequences using BART. It trains autoregressively and decodes generated indexes into term spans and sentiment polarities.

  • Task Formulation: All seven ABSA subtasks are formulated as sequences of pointer indexes and sentiment class indexes, covering extraction, classification, and their combinations.Pointer indexes identify term boundaries, while class indexes represent sentiment polarity.
  • Task Formulation: The target sequences encode AE, OE, AESC, Pair, and Triplet outputs using aspect and opinion boundary indexes, with sentiment class indexes added where required.ALSC uses aspect boundaries with a sentiment class index, while AOE pairs aspect and opinion spans.
  • Task Formulation: For ALSC and AOE, the specified aspect term is placed on the target side rather than the input side, yielding target sequences conditioned on that aspect.This design preserves the unified input format while incorporating the given aspect into generation.
  • Our Model: The final prediction distribution spans source-token pointer indexes and sentiment class indexes, enabling one generation space for all subtasks.The model predicts an index sequence autoregressively and converts it into spans and sentiment polarity after inference.
  • Our Model: The model uses a BART encoder-decoder: the encoder represents the input sentence, while the decoder uses prior outputs after Index2Token conversion to predict the next index.Pointer indexes map to source tokens, and class indexes map to class tokens before decoder processing.
  • Our Model: Training uses teacher forcing with negative log-likelihood, while inference uses beam search followed by task-specific decoding of the generated target sequence.The Triplet decoding algorithm is provided as the example, with other task decoders described separately.

4 Experiments

Experiments evaluate the unified framework across four ABSA datasets covering the seven subtasks, using task-specific exact-match metrics and comparisons with established baselines. The method generally matches or exceeds baselines across datasets, including substantial gains on AOE and Triplet extraction.

  • 4.1 Datasets: Four datasets derived from SemEval challenges provide coverage of ABSA subtasks, with annotations ranging from aspect-sentiment labels to unpaired, paired, and triplet opinion relations.D17 adds unpaired opinions, D19 pairs opinions with aspects, D20a uses <a, o, s> triplets, and D20b corrects missing overlapping-opinion triplets.
  • 4.2 Baselines: Baselines are grouped by dataset and task coverage, spanning BERT-Large sequence tagging and span-based systems, task-specific AOE methods, and unified ABSA models.The third baseline group on D20a and D20b covers nearly all subtasks, except where baseline structures omit one task.
  • 4.3 Evaluation Metrics: Exact span-boundary matching evaluates AE, OE, and AOE, while ALSC requires correct polarity and AESC, Pair, and Triplet require all spans and sentiment polarity to be correct.The evaluation criteria therefore become stricter for compound outputs than for single-output subtasks.
  • 4.4 Main Results: On D17, the method achieves better or comparable results to competitive BERT-Large baselines for AE, OE, ALSC, and AESC despite using BART-Base with almost half the parameters.The reported comparisons are summarized in Table 3.
  • 4.4 Main Results: On D19, AOE results show significant precision, recall, and F1 improvements on 14res, 15res, and 16res, while 14lap is close to the previous state of the art.The authors associate the 14lap difference with its laptop-comment domain versus restaurant comments in the other datasets.
  • 4.4 Main Results: On D20a and D20b, the method outperforms baselines across evaluated tasks, with especially strong Triplet results and nearly 7 F1-point gains on D20b restaurant datasets.The D20b Triplet results also improve recall by nearly 13, 9, 7, and 12 points across the reported datasets, alongside lower precision.

5 Framework Analysis

The framework analysis examines invalid Triplet predictions and beam-size sensitivity on D20b. BART produces low invalid-prediction rates, while beam size has little effect on F1 scores.

  • Experimental setting: The Triplet error analysis is conducted on the D20b test set.The table reports errors for the Triplet subtask.
  • Invalid predictions: Triplet predictions are valid when they contain five elements and their end indexes exceed the corresponding start indexes.The required format is [as, ae, os, oe, sp], with ordered spans.
  • Invalid predictions: BART produces low rates of invalid Triplet predictions, indicating that the generative task form is practically realizable.Invalid predictions include incorrect length, invalid ordering, and invalid token starts; these predictions are removed during experimentation.
  • Beam-size analysis: Beam size seems to have little impact on F1 scores on the D20b development set.The analysis varies beam size and observes little effect on F1.

6 Conclusion

The paper concludes that a unified generative formulation can address divergences across the seven ABSA subtasks using BART in an end-to-end sequence-to-sequence process. Experiments on public datasets show significant improvements on most datasets and support the method’s effectiveness.

  • Conclusion: The paper identifies divergences across ABSA inputs, outputs, and task types as obstacles to a unified framework.It summarizes seven subtasks and previous studies before presenting the proposed reformulation.
  • Conclusion: All seven ABSA subtasks are converted into a unified generative task and implemented with BART.The reformulation supports an end-to-end sequence-to-sequence process.
  • Conclusion: The method achieves significant improvements on most datasets in experiments covering seven ABSA subtasks.The experiments use public datasets, and the reported results demonstrate the effectiveness of the method.
  • Conclusion: The paper points to sequence-to-sequence frameworks for other tasks and data augmentation as promising directions.These directions are presented as follow-up opportunities from the reported work.

Ethical Considerations

The ethical considerations state that the experiments use existing datasets derived from public scientific papers and do not involve identity characteristics. The paper also describes its dataset analysis, resource use, and planned code release.

  • Ethical considerations: All experiments use existing datasets derived from public scientific papers.The paper frames this as part of its ethical considerations.
  • Ethical considerations: The paper describes dataset characteristics in a specific section and states that its analysis is consistent with the results.This is presented as an ethical consideration concerning the study’s analysis.
  • Ethical considerations: The work does not contain identity characteristics and is stated not to harm anyone.This claim appears directly in the ethical considerations.
  • Ethical considerations: The experiments are described as requiring fewer computer resources than pre-trained models.The comparison is stated without further resource measurements.
  • Ethical considerations: The authors state that they will open-source all code.The planned release is listed among the ethical considerations.

A.1 Experimental Environment

The experimental environment uses an Nvidia GeForce RTX-3090 with 24G memory, and each dataset’s experiments average less than 15 minutes. The paper reports model parameter counts for BART-Base and BERT-Base.

  • Optimization: The experiments use a triangular learning-rate warmup.This is the only optimization-setting detail supplied for the environment section.
  • Hardware: Experiments run on an Nvidia GeForce RTX-3090 graphics card with 24G of graphical memory.This specifies the reported hardware environment.
  • Runtime: The average running time for experiments on each dataset is less than 15 minutes.The paper reports this as the average runtime across datasets.
  • Model configuration: BART-Base has 139M parameters across 12 layers, with 768 hidden dimensions and 16 heads.These are the reported BART-Base configuration details.
  • Model configuration: BERT-Base has 110M parameters across 12 layers, with 768 hidden dimensions and 12 heads.These are the reported BERT-Base configuration details.

A.2 Decoding Algorithm for Different Datasets

The decoding algorithms convert predicted target sequences into target span sets, with task-specific inputs and outputs across the datasets. Experiments instantiate these sequences for AOE, Triplet Extraction, AESC, and OE, then evaluate using subtask-specific metrics.

  • Decoding algorithms: The decoding procedure converts a predicted target sequence Y into a target span set L using task-specific algorithms.Algorithms 2, 3, and 4 cover AOE, AESC, and AE/OE/Pair subtasks.
  • D17 experiments: For AESC and OE on D17, predefined task tags are fed to the decoder first in a multi-task learning setup.The tags are “<AESC>” and “<OE>”.
  • D19 experiments: For AOE on D19, aspect terms are supplied to the decoder first because the task detects opinion terms given aspects.The target sequence contains pointer indexes for the relevant spans.
  • D20a and D20b experiments: For Triplet Extraction on D20a and D20b, the target sequence combines aspect, opinion, and sentiment-position information.The example sequence includes pointer indexes and POS sentiment class indexes.
  • Evaluation: D17 reports AESC and OE results directly, while AOE and Triplet Extraction use standard Precision, Recall, and F1 metrics on their respective datasets.For D17, AESC and ALSC metrics are calculated from true-positive AE predictions; Triplet Extraction also preserves Pair and AESC outputs.
Loading 2106.04300v1…