Context-aware Learning for Sentence-level Sentiment Analysis with Posterior Regularization

Bishan Yang, Claire Cardie

Introduction

Sentiment analysis is a cornerstone of natural language processing, yet most traditional models treat sentences as independent units. This "isolated island" approach often fails to capture the nuanced sentiment of sentences that lack explicit polar words but derive meaning from their surrounding context. For instance, a sentence describing a player's performance as "on a stage" only becomes clearly positive when preceded by praise for the music's "revelation." This paper addresses this gap by introducing a framework that leverages discourse context and linguistic structure to improve sentence-level sentiment classification.

Methodology: Integrating Context via Posterior Regularization

The authors propose a hybrid approach combining Conditional Random Fields (CRFs) with Posterior Regularization (PR). While the CRF serves as the base sequence model for predicting sentiment labels (positive, negative, neutral), the PR framework allows for the integration of high-level linguistic knowledge as "soft constraints."

Unlike "hard" rules that strictly dictate labels, soft constraints encourage the model to align with linguistic expectations while remaining flexible enough to accommodate statistical evidence from the data. This is particularly useful for handling the inherent ambiguity and exceptions in natural language.

Linguistically-motivated Constraints

To guide the model, the researchers identified several key types of constraints based on discourse and lexical patterns. These include lexical patterns for high-precision sentiment words, discourse connectives that signal sentiment flips (e.g., "but") or continuity (e.g., "in fact"), and coreference relations where multiple sentences referring to the same entity likely share the same polarity.

Table 1: Overview of the linguistically-motivated constraints and their inter-sentential properties.

For complex dependencies like coreference, which extend beyond the linear sequence of a standard CRF, the authors employed Gibbs Sampling to approximate the posterior distribution during training, ensuring the model could learn from long-distance contextual cues.

Experimental Setup

The framework was evaluated on two primary benchmarks:

  1. Customer Review (CR) dataset: Comprising 638 reviews of consumer electronics.
  2. Multi-domain Amazon (MD) dataset: Containing 294 reviews across Books, Electronics, and Music, along with 33,000 unlabeled reviews used for semi-supervised experiments.

Key Results and Discussion

The experimental results demonstrate that incorporating discourse context significantly boosts performance across both supervised and semi-supervised settings.

Supervised Performance

On the CR dataset, the PR-enhanced model achieved an accuracy of 82.7%, outperforming the baseline CRF (81.1%) and previous state-of-the-art models like TreeCRF. This confirms that even with labeled data, the addition of structured linguistic constraints provides a valuable inductive bias.

Semi-supervised Gains

The most striking improvements were observed in the semi-supervised setting on the MD dataset. By using unlabeled data guided by linguistic constraints, the PR model achieved an average accuracy of 62.3%, a substantial lead over the baseline CRF (58.9%) and specialized models like HCRF.

Table 2: Performance comparison on the Multi-domain Amazon (MD) dataset in a semi-supervised setting across different product categories.

These results underscore that discourse relations act as a "force multiplier," allowing the model to propagate sentiment from clear, unambiguous sentences to more subtle ones. The study also found that discourse-based constraints were more effective than simply increasing the number of lexical features, highlighting the importance of structural context over mere vocabulary.

Limitations and Future Directions

Despite its success, the model faces challenges in identifying "neutral" sentiments, which often lack the structured discourse signals found in polar expressions. Additionally, the system's performance is tied to the accuracy of the underlying discourse parsers and coreference resolution tools. Future work may involve joint learning architectures where sentiment analysis and discourse parsing are optimized simultaneously, potentially creating a virtuous cycle of mutual improvement.

Conclusion

By moving beyond the single-sentence paradigm, this research demonstrates that the "rules of thumb" governing human discourse can be effectively encoded into machine learning models. The use of Posterior Regularization provides a robust way to combine statistical learning with linguistic theory, paving the way for more context-aware and accurate sentiment analysis systems.

Summary updated

BibTeX
@inproceedings{yang2014context,
  author = {Bishan Yang and Claire Cardie},
  title = {{Context-aware Learning for Sentence-level Sentiment Analysis with Posterior Regularization}},
  booktitle = {Annual Meeting of the Association for Computational Linguistics},
  year = {2014},
  doi = {10.3115/v1/p14-1031},
}
Figure