Source-linked AI summary

BERT Post-Training for Review Reading Comprehension and Aspect-based Sentiment Analysis

Hu Xu, Bing Liu, Lei Shu, Philip S. Yu

arXiv:1904.02232v2cs.CL

TL;DR

The paper addresses the lack of review-based machine reading comprehension for product question answering, where reviews can provide information about changing products and services. It builds ReviewRC and applies joint BERT post-training using domain and task knowledge, reporting effective performance across RRC, aspect extraction, and aspect sentiment classification.

  • Problem

    Review-based question answering lacks an established MRC task and dataset, while ReviewRC and related review tasks have limited supervised training examples.

  • Method

    The paper builds the ReviewRC dataset and jointly post-trains BERT with review-domain and task knowledge before fine-tuning on RRC, aspect extraction, and aspect sentiment classification.

  • Results

    The proposed post-training approach is reported to be effective across RRC, aspect extraction, and aspect sentiment classification, with the best performance over all tasks and domains.

  • Takeaways & Limitations

    The approach provides a general-purpose way to enhance BERT for multiple review-based tasks when supervised training data is limited.

  • Takeaways & Limitations

    RRC remains constrained by the prohibitive cost of annotating large-scale training data across a wide range of domains.

Abstract

from arXiv · show

Question-answering plays an important role in e-commerce as it allows potential customers to actively seek crucial information about products or services to help their purchase decision making. Inspired by the recent success of machine reading comprehension (MRC) on formal documents, this paper explores the potential of turning customer reviews into a large source of knowledge that can be exploited to answer user questions.~We call this problem Review Reading Comprehension (RRC). To the best of our knowledge, no existing work has been done on RRC. In this work, we first build an RRC dataset called ReviewRC based on a popular benchmark for aspect-based sentiment analysis. Since ReviewRC has limited training examples for RRC (and also for aspect-based sentiment analysis), we then explore a novel post-training approach on the popular language model BERT to enhance the performance of fine-tuning of BERT for RRC. To show the generality of the approach, the proposed post-training is also applied to some other review-based tasks such as aspect extraction and aspect sentiment classification in aspect-based sentiment analysis. Experimental results demonstrate that the proposed post-training is highly effective. The datasets and code are available at https://www.cs.uic.edu/~hxu/.

1 Introduction

The paper introduces Review Reading Comprehension (RRC), a review-based question-answering task, and constructs the ReviewRC dataset to support it. It then proposes BERT post-training to address limited review-task data and reports benefits across RRC and related sentiment tasks.

  • Motivation: RRC addresses product question answering when up-to-date knowledge bases are difficult to construct and whole-review retrieval is time-consuming.The motivation includes changing products and services, unanswered community questions, and the burden of reading an entire review.
  • Review Reading Comprehension: RRC extracts a text span from a product review that answers a customer’s question.The input consists of a question and a review containing the answer; the output is an extractive span.
  • Review Reading Comprehension: RRC extends conventional machine reading comprehension to informal reviews containing product knowledge, fine-grained opinions, and frequent yes/no questions.Unlike many formal MRC sources, reviews combine factual and subjective product information.
  • Dataset: ReviewRC is an annotated RRC dataset built from SemEval 2016 Task 5 reviews in the laptop and restaurant domains.The authors note that its annotated examples are limited because broad domain coverage is expensive to create.
  • Method and Contributions: Joint BERT post-training is proposed to improve RRC, aspect extraction, and aspect sentiment classification with limited supervised examples.The paper presents the approach as a general-purpose method for review-based tasks.
  • Results: Experimental results report that the proposed post-training approach is effective across the three review-based tasks.The stated contributions include a new task, an annotated dataset, and a general-purpose post-training approach.

2 Related Works

Prior work covers machine reading comprehension on formal, news, fictional, and web texts, while review question answering has mainly used community answers or whole-review retrieval. Reviews also motivate aspect-based sentiment analysis, whose fine-grained tasks remain challenging.

  • Machine Reading Comprehension: Existing MRC datasets primarily use Wikipedia, news, fictional stories, or general web documents rather than reviews.The cited examples include SQuAD, CNN/Daily Mail, MCTest, MS MARCO, and related datasets.
  • Review-Based MRC: The paper states that MRC had not been applied to primarily subjective reviews and introduces ReviewRC as a review-based extractive MRC dataset.ReviewRC answers are text spans rather than abstractive responses.
  • Question Answering: Community question answering can leave product questions unanswered or delayed because it relies on human responses.This motivates automated use of review content for answering users’ questions.
  • Question Answering: Information-retrieval approaches return whole reviews, which the paper describes as time-consuming and unsuitable for users seeking focused answers.The limitation is the amount of text users must read rather than a lack of review information.
  • Knowledge Bases: Knowledge bases are difficult to maintain for constantly changing online products and services.The related-work discussion identifies the continual appearance of new products and services as a barrier to comprehensive coverage.
  • Aspect-Based Sentiment Analysis: Aspect-based sentiment analysis converts unstructured reviews into fine-grained aspects and sentiment polarities, with aspect extraction and sentiment classification as key tasks.Aspect extraction identifies aspects such as “battery,” while sentiment classification assigns polarity to an aspect.

3 BERT and Review-based Tasks

The paper applies BERT with lightweight task-specific layers to three review-based tasks: span extraction for RRC, sequence labeling for aspect extraction, and polarity classification for aspect sentiment. It identifies limited supervised data, domain knowledge, and task awareness as central challenges before post-training.

  • BERT Overview: The paper uses BERT as a base model and adds one extra task-specific layer for RRC, aspect extraction, and aspect sentiment classification.Figure 1 summarizes the input and output settings for the three tasks.
  • Review Reading Comprehension: RRC represents a question-review pair with BERT and predicts answer-span start and end positions using two softmax layers.The predicted span is constrained to positions in the review after the separator token.
  • Review Reading Comprehension: RRC training minimizes averaged cross entropy over the two answer-span pointers.The targets are one-hot ground-truth vectors for the start and end positions.
  • Aspect Extraction: Aspect extraction is modeled as BIO sequence labeling over the input sentence.A continuous B-I token sequence forms an extracted aspect, and predictions use a three-label softmax at each position.
  • Aspect Extraction: Aspect extraction requires domain knowledge, such as recognizing that “screen” is a laptop part, making review-domain adaptation important.The paper connects this need to the reported benefits of adapting BERT to domain reviews.
  • Aspect Sentiment Classification: Aspect sentiment classification uses an aspect and its review sentence to predict positive, negative, or neutral polarity from the [CLS] representation.Unlike RRC, ASC outputs a polarity class rather than a textual span.
  • Challenges: The paper identifies insufficient supervised data, domain knowledge, and task awareness as constraints on performance across the three review-based tasks.Directly fine-tuning BERT may provide limited or worse gains than existing baselines, motivating post-training.

4 Post-training

The post-training strategy jointly adapts BERT to review-domain knowledge and machine-reading-comprehension task structure before end-task fine-tuning. It combines review-specific pre-training objectives with SQuAD-based task-aware training and gradient accumulation for memory efficiency.

  • Direct fine-tuning on limited end-task data leaves BERT exposed to domain and task-awareness challenges.
  • Review-domain post-training uses masked language modeling and next sentence prediction to inject review knowledge and reduce Wikipedia-derived bias.MLM predicts masked words, while NSP distinguishes whether input parts belong together.
  • NSP creates artificial review-prediction examples by contrasting original reviews with synthesized reviews formed from two different reviews.The task exposes relationships involving ratings and product targets.
  • SQuAD 1.1 supplies task-aware knowledge for post-training because its large-scale MRC supervision trains question and textual-span prediction behavior.The joint post-training loss combines domain-knowledge and MRC losses.
  • Gradient accumulation splits batches into sub-batches before parameter updates, reducing the GPU memory required for joint post-training.

7 end

The algorithm accumulates gradients from multiple sub-batches so joint-loss computation can fit within GPU memory before updating BERT’s parameters.

  • The algorithm divides domain-knowledge and MRC batches into u sub-batches, accumulates their partial-loss gradients, and then updates BERT parameters.

5 Experiments

The experiments evaluate dataset construction and post-training across RRC, aspect extraction, and aspect sentiment classification. Joint post-training performs best across all tasks and domains, while the relative value of domain and task knowledge varies by task.

  • Experimental questions: The experiments assess post-training gains, vanilla BERT without adaptation, and the separate contributions of domain knowledge and task-awareness knowledge.The three research questions compare performance with state-of-the-art results and use ablations to analyze each post-training component.
  • Dataset construction: ReviewRC is created from laptop and restaurant reviews because no existing RRC dataset was available, with multiple annotated question-answer pairs per review.The dataset follows SemEval 2016 Task 5 splits and uses SQuAD 1.1-compatible annotations; 20% of training reviews are reserved for validation.
  • Overall results: Joint post-training achieves the best performance across RRC, aspect extraction, and aspect sentiment classification in all evaluated domains.The result supports combining domain knowledge and task-awareness knowledge rather than relying on either source alone.
  • RRC analysis: For RRC, most performance gains come from task-awareness post-training, while domain knowledge helps more for restaurant than laptop reviews.The authors associate the domain difference with Wikipedia containing more laptop specifications than restaurant knowledge.
  • ABSA analysis: For aspect extraction, gains come mostly from domain knowledge, whereas large-scale MRC data is useful for aspect sentiment classification.The authors relate aspect-extraction gains to domain representations and interpret sentiment classification as a special MRC-like input formulation.
  • Error analysis: RRC errors mainly involve non-concise or incorrectly located spans, while aspect extraction and sentiment classification suffer from annotation inconsistencies, rare aspects, and ambiguous polarity boundaries.BERT-PT also struggles with sentences containing two opposite opinions, which the authors believe are rare.

6 Conclusions

The paper introduces Review Reading Comprehension and uses BERT post-training to improve review-based tasks. The approach enhances domain and task knowledge across RRC, aspect extraction, and aspect sentiment classification.

  • The paper proposes Review Reading Comprehension (RRC) for answering user questions from reviews.
  • It adopts BERT and introduces joint post-training to enhance domain and task knowledge.
  • The approach is also applied to aspect extraction and aspect sentiment classification.
  • Experimental results show that post-training before fine-tuning is effective.
Loading 1904.02232v2…