[Paper Review] Hierarchical Attention Generative Adversarial Networks for Cross-domain Sentiment Classification
This paper proposes Hierarchical Attention Generative Adversarial Networks (HAGAN) for cross-domain sentiment classification, using a GAN-based framework to learn domain-invariant, sentiment-discriminative document representations. By combining bidirectional GRUs with hierarchical attention and adversarial training, HAGAN effectively aligns source and target domain representations, achieving state-of-the-art performance on Amazon review datasets with improved generalization across domains.
Cross-domain sentiment classification (CDSC) is an importance task in domain adaptation and sentiment classification. Due to the domain discrepancy, a sentiment classifier trained on source domain data may not works well on target domain data. In recent years, many researchers have used deep neural network models for cross-domain sentiment classification task, many of which use Gradient Reversal Layer (GRL) to design an adversarial network structure to train a domain-shared sentiment classifier. Different from those methods, we proposed Hierarchical Attention Generative Adversarial Networks (HAGAN) which alternately trains a generator and a discriminator in order to produce a document representation which is sentiment-distinguishable but domain-indistinguishable. Besides, the HAGAN model applies Bidirectional Gated Recurrent Unit (Bi-GRU) to encode the contextual information of a word and a sentence into the document representation. In addition, the HAGAN model use hierarchical attention mechanism to optimize the document representation and automatically capture the pivots and non-pivots. The experiments on Amazon review dataset show the effectiveness of HAGAN.
Motivation & Objective
- To address domain discrepancy in cross-domain sentiment classification (CDSC), where sentiment patterns vary significantly across domains.
- To develop a deep learning model that learns shared, sentiment-discriminative representations across source and target domains without relying on manual pivot selection.
- To overcome limitations of existing methods using Gradient Reversal Layers (GRL) by introducing a Generative Adversarial Network (GAN) framework for end-to-end adversarial training.
- To automatically identify and emphasize sentiment-relevant pivots (words effective in both domains) and non-pivots (domain-specific words) through a hierarchical attention mechanism.
- To improve model generalization by balancing generator and discriminator capacity to avoid mode collapse and ensure robust feature alignment.
Proposed method
- HAGAN employs a GAN architecture where a generator and discriminator are trained alternately to produce document representations that are sentiment-distinguishable but domain-indistinguishable.
- The generator uses two-layer bidirectional GRUs (Bi-GRU) to encode word-level and sentence-level contextual information into a hierarchical document representation.
- A hierarchical attention mechanism is applied to dynamically weight important words and sentences, enabling automatic identification of sentiment-relevant pivots and domain-specific non-pivots.
- The discriminator performs dual tasks: sentiment classification and domain classification, forcing the generator to produce representations that fool the domain classifier while preserving sentiment distinctions.
- The model is trained using a multi-task loss combining sentiment classification loss, domain classification loss, and adversarial objectives to align representations across domains.
- The training process alternates between optimizing the generator (to minimize domain classification loss while preserving sentiment accuracy) and the discriminator (to maximize both sentiment and domain classification performance).
Experimental results
Research questions
- RQ1Can a GAN-based framework effectively learn domain-invariant, sentiment-discriminative representations for cross-domain sentiment classification without relying on Gradient Reversal Layers?
- RQ2How well can a hierarchical attention mechanism automatically identify and emphasize sentiment-relevant pivots and non-pivots across domains?
- RQ3Does the combination of Bi-GRU encoding and adversarial training reduce domain discrepancy in learned document representations?
- RQ4How does the performance of HAGAN compare to existing methods like DANN, SCL, and SFA in terms of accuracy and robustness across domain shifts?
- RQ5What is the impact of generator-discriminator capacity balance on model convergence and performance in CDSC?
Key findings
- HAGAN significantly reduces domain discrepancy in document representations, as shown by t-SNE visualization, where source and target domain data distributions become nearly indistinguishable.
- The model achieves state-of-the-art performance on the Amazon review dataset across multiple cross-domain sentiment classification tasks (e.g., B→E, E→B), outperforming baseline models including HAN and DANN.
- The hierarchical attention mechanism successfully identifies sentiment pivots such as 'excellent', 'good', and 'amazing', which are relevant across domains, while downweighting domain-specific non-pivots like 'readable' in books or 'pixelated' in electronics.
- HAGAN-C, a variant using CNN instead of MLP in the discriminator, outperforms the original HAGAN, indicating that stronger discriminative capacity improves performance.
- The ablation study confirms that the adversarial training with dual objectives (sentiment and domain classification) is essential for learning domain-invariant representations.
- The model demonstrates robustness to domain shifts, maintaining high accuracy even when target domain data is entirely unlabeled, validating its effectiveness in zero-shot or few-shot adaptation scenarios.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.