NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

Utilizing BERT for Aspect-Based Sentiment Analysis via Constructing Auxiliary Sentence

Chi Sun, Luyao Huang, Xipeng Qiu

Introduction

Sentiment Analysis (SA) has traditionally focused on determining the overall emotional tone of a text. However, real-world feedback is rarely monolithic. A single review often contains nuanced opinions on different features, such as "The food was amazing, but the service was slow." This complexity necessitates Aspect-Based Sentiment Analysis (ABSA), which aims to identify sentiments toward specific "aspects" or categories within a sentence.

While the Bidirectional Encoder Representations from Transformers (BERT) model has set new benchmarks across Natural Language Processing (NLP), its initial application to ABSA was surprisingly limited. Simply treating ABSA as a single-sentence classification task—feeding a review into BERT and requesting a sentiment label—fails to leverage the model's full potential. This paper addresses this gap by proposing a method to transform ABSA into a sentence-pair classification task, effectively "speaking the language" of BERT's pre-training objectives.

Methodology: The Auxiliary Sentence Approach

The core innovation of this research is the conversion of ABSA from a single-sentence task into a sentence-pair classification task. By constructing an "auxiliary sentence" that specifies the aspect being queried, the authors allow BERT to utilize its pre-trained ability to understand the relationship between two sequences of text (originally learned via the Next Sentence Prediction task).

Summary of the four proposed auxiliary sentence construction methods.

The researchers proposed four distinct templates for generating these auxiliary sentences:

  1. QA-M (Question-Answer Modal): Constructs a natural language question, such as "What do you think of the safety of location - 1?"
  2. NLI-M (Natural Language Inference Modal): Uses a simplified pseudo-sentence format like "location - 1 - safety".
  3. QA-B (Binary Question): Reconstructs the task as a verification problem (e.g., "the polarity of the aspect safety of location - 1 is positive"), requiring the model to predict "Yes" or "No."
  4. NLI-B (Binary Pseudo-sentence): A simplified version of the binary approach, using formats like "location - 1 - safety - positive".

Experimental Results

The proposed "BERT-pair" models were evaluated on two major benchmarks: SentiHood, which focuses on targeted ABSA for urban locations, and SemEval-2014 Task 4, which covers laptop and restaurant reviews.

Performance comparison on the SentiHood dataset.

The results demonstrated a significant performance leap over both the "BERT-single" baseline and previous state-of-the-art (SOTA) neural models. On the SentiHood dataset, the BERT-pair models achieved a 9.4 point improvement in Macro-F1 for aspect detection compared to the previous best model, Dmu-Entnet. Furthermore, sentiment accuracy on SentiHood exceeded 93%, a substantial increase from the ~85% accuracy observed when using BERT as a standard single-sentence classifier.

Similar gains were observed in the SemEval-2014 benchmark. For Aspect Category Detection (Subtask 3), the BERT-pair-NLI-B model reached an F1 score of 92.18, significantly outperforming the previous SOTA of 88.58.

Key Insights

Several factors contribute to the success of the auxiliary sentence method:

  • Leveraging Pre-training: By framing the task as a sentence pair, the model can better attend to the specific aspect within the context of the review, utilizing the pairwise attention mechanisms BERT developed during pre-training.
  • Implicit Data Augmentation: This approach exponentially expands the training data. A single review with multiple aspects is transformed into multiple distinct training pairs, allowing the model to learn more robust, aspect-specific features.
  • Task Simplification: The binary models (QA-B and NLI-B) were particularly effective. By asking the model to verify a specific sentiment rather than choosing from multiple categories, the complexity of the decision-making process is reduced to a matching task.

Conclusion

By transforming Aspect-Based Sentiment Analysis into a sentence-pair classification task, this paper demonstrates how to more effectively fine-tune BERT for complex, multi-faceted NLP problems. While the approach introduces some computational overhead due to the need for multiple passes per review, the dramatic improvements in accuracy and F1 scores establish a new standard for the field. Future work may focus on optimizing these templates and reducing inference time for real-time applications.

Summary updated

BibTeX
@inproceedings{sun2019utilizing,
  author = {Chi Sun and Luyao Huang and Xipeng Qiu},
  title = {{Utilizing BERT for Aspect-Based Sentiment Analysis via Constructing Auxiliary Sentence}},
  booktitle = {Conference of the North American Chapter of the Association for Computational Linguistics},
  year = {2019},
  doi = {10.18653/v1/n19-1035},
}
Figure