Variational Semi-Supervised Aspect-Term Sentiment Analysis via Transformer

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

TL;DR

Researchers from Ant Financial have developed ASVAET, a Transformer-based Variational Autoencoder (VAE) that significantly improves Aspect-term Sentiment Analysis (ATSA) by leveraging large amounts of unlabeled data. By disentangling a sentence into "lexical context" and "aspect sentiment," the model can learn from raw text, boosting the performance of virtually any existing ATSA classifier.

What Problem Does This Paper Address?

Aspect-term Sentiment Analysis (ATSA) is the "high-definition" version of sentiment analysis. Instead of just saying a review is "positive," ATSA identifies the sentiment for specific entities. For example, in the sentence "The pizza was delicious, but the service was terrible," a model must identify "pizza" as positive and "service" as negative.

The challenge is that training these models requires precisely labeled data (sentence-aspect-sentiment triplets), which is expensive and slow to produce. Standard datasets like SemEval only contain a few thousand samples—hardly enough to fully train modern deep learning architectures. Meanwhile, millions of unlabeled reviews sit unused on sites like Yelp or Amazon. This paper addresses how to effectively use that unlabeled "dark matter" to improve fine-grained sentiment classification.

Methods

The authors introduce ASVAET (Aspect-term Semi-supervised Variational Autoencoder based on Transformer). The core innovation is treating the sentiment of unlabeled data as a latent (hidden) variable within a generative framework.

Key components include:

  • Disentangled Latent Space: The model splits the representation of a sentence into two independent parts: $z$ (the lexical context/style) and $y$ (the sentiment polarity).
  • Classifier-Agnostic Design: ASVAET isn't a single model but a framework. You can plug in almost any supervised ATSA classifier (like TNet or MemNet). The framework uses the classifier to "guess" the sentiment of unlabeled data to help the generative process.
  • Bidirectional Transformer Encoder: Used to extract the lexical features ($z$) from the input.
  • Dual Unidirectional Transformer Decoders: To ensure the model truly understands the relationship between the aspect and its surroundings, the decoder attempts to reconstruct the original sentence starting from the aspect term and moving outward (left and right) based on the latent context and sentiment.
  • Variational Inference: The model is trained by maximizing the Evidence Lower Bound (ELBO), a standard technique in VAEs that balances reconstruction accuracy with a well-behaved latent space.

Datasets

The authors evaluated their method on the gold-standard SemEval 2014 Task 4 datasets:

  • Restaurant: ~3,600 labeled samples.
  • Laptop: ~2,300 labeled samples.

To provide the "semi-supervised" boost, they pulled large-scale unlabeled data from:

  • Kaggle Restaurant Reviews: ~82,000 unlabeled samples.
  • Amazon Product Reviews: ~412,000 unlabeled samples (specifically the Laptop category).

Key Insights and Ideas

  • The Power of Disentanglement: By forcing the model to reconstruct a sentence using separate "sentiment" and "context" variables, the model learns to identify which words contribute to sentiment and which are just part of the narrative structure.
  • Reconstruction as a Teacher: Even without a label, the act of trying to "re-write" a sentence helps the model understand the semantic nuances of how people express opinions.
  • Sharing isn't always Caring: Interestingly, the authors found that not sharing word embeddings between the classifier and the autoencoder led to better results. Sharing them caused "gradient interference," where the goals of reconstruction and classification conflicted.
  • Robustness to Small Data: The performance gains were most dramatic when labeled data was extremely scarce (e.g., using only 500 labeled samples), proving the framework's utility for low-resource languages or niche domains.

Key Results

The ASVAET framework was tested with five different state-of-the-art classifiers (TC-LSTM, MemNet, IAN, BILSTM-ATT-G, and TNet-AS).

  • Consistent Gains: Every single classifier saw an improvement when wrapped in the ASVAET framework.
  • State-of-the-Art: TNet-AS (ASVAET) achieved an accuracy of 81.77% on the Restaurant dataset and 77.57% on the Laptop dataset, outperforming the base supervised models by a significant margin (approx. 1-2% absolute gain).
  • Latent Space Clarity: t-SNE visualizations showed that the model successfully separated different sentiment polarities in the latent space, even for unlabeled data.

Limitations and Future Work

  • Known Aspects: The model assumes the "aspect terms" (like "pizza") are already identified. In a real-world pipeline, you would need a separate aspect extractor, and errors there could propagate through the system.
  • Error Accumulation: The authors noted that using a pre-trained aspect extractor on unlabeled data introduces some noise.
  • Future Direction: A promising next step is to build a model that jointly learns to identify the aspects and their sentiment polarities simultaneously in a semi-supervised fashion.

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