Cross-Domain Sentiment Classification using Semantic Representation

Shichen Li, Zhongqing Wang, Xiaotong Jiang, Guodong ZhouEMNLP 2022

Abstract

Cross-domain sentiment classification aims to generalize models from a source domain to a target domain where labeled data is scarce. This paper introduces a novel framework that leverages Abstract Meaning Representation (AMR) to bridge the gap between different product categories. By converting review text into sentiment-driven semantic graphs and fusing these with raw text representations, the authors demonstrate that deep semantic structure is more domain-invariant than surface-level words, achieving state-of-the-art performance on the new BEAR benchmark.

The Challenge of Domain Shift

Sentiment classification models often struggle when trained on one domain (e.g., "Books") and tested on another (e.g., "Airlines"). The primary obstacle is the domain-specific vocabulary used to express sentiment; for instance, "fast-paced" is a compliment for a thriller but nonsensical for a refrigerator. While existing methods focus on "pivot features" or adversarial training, they often neglect the underlying semantic relevance between domains. The authors argue that while specific words change, the core semantic structure of sentiment remains remarkably consistent across domains.

Methodology: Sentiment-Driven Semantic Graphs

The proposed pipeline captures and utilizes these semantic structures through a multi-step process:

1. Graph Construction and Enrichment

The system converts sentences into AMR graphs, which represent concepts and their relationships (e.g., "who did what to whom") rather than just surface-level syntax. These sentence-level graphs are consolidated into a single document-level graph via a "ROOT" node. To enhance sentiment detection, the authors inject sentiment-aware phrases and domain identification nodes directly into the graph.

The pipeline for constructing document-level sentiment-driven semantic graphs from raw review text.

2. Linearization and Interaction

To leverage Transformer models like BERT, the graphs are linearized using strategies like Breadth-First Search (BFS), which groups related concepts together. A dual-encoder setup then processes both the raw text and the linearized semantic graphs. A gated attention mechanism fuses these representations, allowing the model to dynamically weigh raw text against semantic structure for the final prediction.

The BEAR Benchmark

To rigorously test generalization, the authors introduced the BEAR dataset, covering Books, Electronics, Airlines, and Restaurants. BEAR features significantly lower domain overlap (Jaccard similarity of 0.243) compared to standard datasets like Amazon (0.320), presenting a more challenging test for cross-domain models.

Key Insights: AMR as a Universal Language

The central finding is that AMR graphs for similar sentiments in different domains are structurally nearly identical. For example, "I love this book" and "I love this restaurant" yield almost the same graph structure. By focusing on these patterns, the model learns sentiment as a structural concept rather than a keyword-matching task.

Comparison of AMR graphs across Book and Restaurant domains, showing structural similarity despite vocabulary differences.

Furthermore, the BFS linearization proved effective by maintaining "structural locality," keeping core semantic concepts close together in the sequence for the Transformer's attention mechanism.

Experimental Results

The proposed model consistently outperformed strong baselines, including standard BERT and domain-adaptation models like UDALM.

  • Accuracy: The model achieved an average accuracy of 89.8% on the BEAR dataset, a significant improvement over BERT's 86.5%.
  • Data Efficiency: In low-data scenarios, the AMR-based model reached high performance using only 25% of labeled source data, outperforming other models using 100% of the data. This highlights the efficiency of semantic structures as features for transfer learning.
  • Ablation: Removing the semantic graph component led to a drop in accuracy to 86.5%, confirming its critical role in performance gains.

Conclusion and Future Work

While highly effective, the approach faces challenges regarding computational overhead and the "lossy" nature of graph linearization. Future work may explore more direct graph-to-model integration and address the dependency on the accuracy of off-the-shelf AMR parsers. Nonetheless, this research proves that deep semantic representations provide a robust, domain-invariant foundation for sentiment analysis.

Summary updated

BibTeX
@inproceedings{li2022cross,
  author = {Shichen Li and Zhongqing Wang and Xiaotong Jiang and Guodong Zhou},
  title = {{Cross-Domain Sentiment Classification using Semantic Representation}},
  booktitle = {Conference on Empirical Methods in Natural Language Processing},
  year = {2022},
  doi = {10.18653/v1/2022.findings-emnlp.22},
}
Figure