Variational Semi-Supervised Aspect-Term Sentiment Analysis via Transformer

Xingyi Cheng, Weidi Xu, Taifeng Wang, Wei Chu, Weipeng Huang, Kunlong Chen, Junfeng Hu

Abstract

Aspect-term sentiment analysis (ATSA) is a long-standing challenge in natural language processing. It requires fine-grained semantical reasoning about a target entity appeared in the text. As manual annotation over the aspects is laborious and time-consuming, the amount of labeled data is limited for supervised learning. This paper proposes a semisupervised method for the ATSA problem by using the Variational Autoencoder based on Transformer. The model learns the latent distribution via variational inference. By disentangling the latent representation into the aspect-specific sentiment and the lexical context, our method induces the underlying sentiment prediction for the unlabeled data, which then benefits the ATSA classifier. Our method is classifier-agnostic, i.e., the classifier is an independent module and various supervised models can be integrated. Experimental results are obtained on the SemEval 2014 task 4 and show that our method is effective with different five specific classifiers and outperforms these models by a significant margin.

Introduction

Aspect-term Sentiment Analysis (ATSA) represents a fine-grained approach to sentiment analysis, focusing on identifying the sentiment polarity associated with specific entities or "aspects" within a sentence. For instance, in the review "The pizza was delicious, but the service was terrible," an ATSA model must distinguish the positive sentiment for "pizza" from the negative sentiment for "service."

A primary bottleneck in developing robust ATSA models is the scarcity of high-quality labeled data. Creating sentence-aspect-sentiment triplets is labor-intensive, resulting in standard datasets like SemEval containing only a few thousand samples. Conversely, vast amounts of unlabeled text are readily available. This research introduces ASVAET (Aspect-term Semi-supervised Variational Autoencoder based on Transformer), a framework designed to leverage this unlabeled "dark matter" to enhance supervised classifiers.

Methodology

The core of ASVAET is a generative framework that treats the sentiment of unlabeled data as a latent variable. The model architecture is built upon the Transformer to capture complex dependencies within the text.

Disentangled Latent Space

ASVAET disentangles the sentence representation into two independent latent variables: $z$, representing the lexical context and style, and $y$, representing the sentiment polarity. By separating these factors, the model learns to isolate sentiment-bearing words from the general narrative structure.

Architecture

The framework consists of a bidirectional Transformer encoder and dual unidirectional Transformer decoders. The encoder extracts lexical features ($z$) from the input. To ensure the model understands the relationship between the aspect and its context, the decoders reconstruct the original sentence starting from the aspect term and moving outward (left and right) based on the latent context and sentiment.

The ASVAET architecture featuring a Transformer encoder for latent context extraction and dual decoders for sentence reconstruction.

Classifier-Agnostic Design

A key advantage of ASVAET is its modularity. It is classifier-agnostic, meaning it can wrap around various existing supervised ATSA models (e.g., MemNet, TNet). During training, the framework uses the integrated classifier to estimate the sentiment of unlabeled data, which in turn guides the generative reconstruction process.

Experiments

The model was evaluated using the SemEval 2014 Task 4 datasets for the Restaurant and Laptop domains. To provide the semi-supervised signal, the researchers utilized large-scale unlabeled datasets:

  • Restaurant: ~82,000 unlabeled samples from Kaggle.
  • Laptop: ~412,000 unlabeled samples from Amazon Product Reviews.

Results and Discussion

Experimental results demonstrate that ASVAET consistently improves the performance of five different state-of-the-art classifiers. For example, the TNet-AS (ASVAET) variant achieved accuracies of 81.77% on the Restaurant dataset and 77.57% on the Laptop dataset, representing a significant absolute gain of 1-2% over the base supervised models.

Robustness in Low-Resource Scenarios

The framework's utility is most pronounced when labeled data is extremely scarce. As shown in the figure below, the performance gap between the base model and the ASVAET-enhanced version is largest at smaller training set sizes (e.g., 500 samples), highlighting its effectiveness for niche domains or low-resource languages.

Performance comparison between the base MemNet and the ASVAET-enhanced version across different amounts of labeled data.

Latent Space Visualization

Visual analysis using t-SNE confirmed that the model successfully clusters different sentiment polarities in the latent space, even for unlabeled data. This indicates that the disentanglement strategy effectively captures the underlying sentiment signal.

Conclusion

ASVAET provides a powerful, flexible framework for semi-supervised aspect-term sentiment analysis. By leveraging the generative capabilities of Transformer-based VAEs, it effectively utilizes unlabeled data to boost the performance of diverse classifiers. Future work will explore joint models that simultaneously identify aspect terms and their sentiments in a semi-supervised manner, further reducing the reliance on manual annotation.

Summary updated

BibTeX
@inproceedings{cheng2019variational,
  author = {Xingyi Cheng and Weidi Xu and Taifeng Wang and Wei Chu and Weipeng Huang and Kunlong Chen and Junfeng Hu},
  title = {{Variational Semi-Supervised Aspect-Term Sentiment Analysis via Transformer}},
  booktitle = {CoNLL},
  year = {2019},
  url = {https://openreview.net/forum?id=xzYjavloYX2},
}
Figure