A structure-enhanced graph convolutional network for sentiment analysis

Fanyu Meng, Junlan Feng, Danping Yin, Si Chen, Min Hu2020

Abstract

Syntactic information is essential for both sentiment analysis (SA) and aspect-based sentiment analysis (ABSA). Previous work has already achieved great progress utilizing Graph Convolutional Networks (GCN) over the dependency tree of a sentence. However, these models do not fully exploit the syntactic information obtained from dependency parsing, such as the diversified types of dependency relations. The message passing process of GCN should be distinguished based on this syntactic information. To tackle this problem, we design a novel weighted graph convolutional network (WGCN) which can exploit rich syntactic information based on feature combination. Furthermore, we utilize BERT instead of Bi-LSTM to generate contextualized representations as inputs for GCN and present an alignment method to keep word-level dependencies consistent with the wordpiece unit of BERT. With our proposal, we are able to improve the state-of-the-art on four ABSA tasks out of six and two SA tasks out of three.

Introduction

Sentiment Analysis (SA) has evolved from simple sentence-level classification to the more nuanced Aspect-Based Sentiment Analysis (ABSA). In ABSA, a single sentence can contain multiple sentiments directed at different targets—for example, "The food was great, but the service was dreadful." Identifying these relationships requires a deep understanding of the sentence's syntactic structure.

While Graph Convolutional Networks (GCNs) have been successfully applied to dependency trees to capture these relationships, most existing models treat every grammatical link as equal. However, a "nominal subject" (nsubj) relationship is often far more critical for sentiment than a "determiner" (det) relationship. Additionally, integrating word-level dependency trees with BERT's sub-word "wordpiece" tokenization remains a significant technical challenge.

Methodology

Model Architecture

The proposed system utilizes a multi-stage pipeline that combines deep contextual embeddings with structural graph processing. As shown in the architecture diagram below, the model processes input through both a syntactic parser and BERT, aligns the representations, and then applies a Weighted Graph Convolutional Network (WGCN) before final pooling for sentiment tasks.

Overall architecture of the BERT-WGCN model, showing the flow from input to sentiment classification.

Weighted Graph Convolutional Network (WGCN)

The core innovation is the WGCN, which moves beyond binary adjacency matrices. Instead, the model learns a specific weight ($\alpha_{xy}$) for every edge based on the type of dependency relation (e.g., amod, nsubj) and the Part-of-Speech (POS) tags of the connected words. By using a feature combination method inspired by Factorization Machines, the model learns complex interactions between these syntactic features.

Illustration of the WGCN message passing mechanism where different dependency relations (e.g., nsubj, det) are assigned varying weights to prioritize sentiment-rich connections.

BERT Integration and Token Alignment

To leverage BERT's superior contextual power, the authors developed a principled alignment strategy. When BERT's tokenizer splits a word into multiple wordpieces (e.g., "Binoche" into "bin" and "##oche"), all constituent pieces inherit the original word's POS tag and dependency relationships. This ensures that the syntactic graph remains consistent with the transformer's internal representations.

Experimental Results

The model was evaluated on several standard benchmarks, including LAP14, REST14/15/16, and Twitter for ABSA, as well as SST-2, SST-5, and SE13 for general SA.

Key Findings

  • State-of-the-Art Performance: BERT-WGCN improved the SOTA on four out of six ABSA tasks and two out of three SA tasks. It was particularly effective on the Twitter and Restaurant datasets.
  • Importance of Weighting: Ablation studies showed that removing the learned weights and reverting to a standard GCN significantly degraded performance, proving that syntactic nuance is vital.
  • Network Depth: The researchers found that a 3-layer GCN configuration provided the optimal depth for capturing structural information without suffering from over-smoothing.

Conclusion

By treating grammatical relationships with varying levels of importance, the Weighted Graph Convolutional Network (WGCN) significantly advances the state-of-the-art in sentiment analysis. The combination of BERT's contextual representations with a structure-aware graph model provides a robust framework for handling the complexities of natural language, particularly in fine-grained tasks like ABSA. Future research will explore applying this architecture to other structured NLP domains such as relation extraction.

Summary updated

BibTeX
@misc{meng2020structure,
  author = {Fanyu Meng and Junlan Feng and Danping Yin and Si Chen and Min Hu},
  title = {{A structure-enhanced graph convolutional network for sentiment analysis}},
  year = {2020},
  doi = {10.18653/v1/2020.findings-emnlp.52},
}
Figure