Understanding Graph Convolutional Networks for Text Classification

Soyeon Caren Han, Zihan Yuan, Kunze Wang, Siqu Long, Josiah Poon

Abstract

Graph Convolutional Networks (GCNs) have emerged as powerful tools for text classification, yet their internal mechanisms often remain opaque. This paper systematically evaluates the impact of graph construction and network depth on performance. Our findings reveal that a two-layer GCN architecture serves as the optimal configuration for most text classification tasks. Furthermore, we demonstrate that simple one-hot embeddings can surprisingly outperform contextualized BERT embeddings in datasets with a high number of classification categories, highlighting the importance of global structural information over pre-trained semantic knowledge in specific contexts.

Introduction

While GCNs are widely adopted for their ability to capture global word co-occurrence and relational structures, their implementation is frequently treated as a "black box." Researchers often prioritize hyperparameter tuning or model comparisons without a fundamental understanding of how graph construction affects learning. This study addresses two critical gaps: determining the most effective way to represent nodes and edges, and identifying the necessary depth of GCN layers for capturing neighborhood information without suffering from over-smoothing.

Methodology

The research utilizes the TextGCN framework as a baseline to explore three primary variables: node embeddings, edge construction, and layer depth.

Graph Construction

The authors evaluate three types of edge connections to build the graph:

  1. Word-Document (d2w): Based on TF-IDF weights.
  2. Word-Word (w2w): Based on Point-wise Mutual Information (PMI).
  3. Document-Document (d2d): Based on Jaccard similarity between documents.
Graph construction strategies: d2w only, d2w + w2w, and d2w + w2w + d2d.

Node Representation and Depth

The study compares one-hot embeddings against BERT embeddings to assess the value of pre-trained contextual knowledge versus raw structural representation. Architectures ranging from 1 to 5 layers were tested across various standard benchmarks (20NG, R8, R52, Ohsumed, MR) and multilingual datasets.

Key Results and Insights

The "Two-Layer" Sweet Spot

A consistent finding across all datasets is that performance peaks at two GCN layers. As shown in the experimental results, increasing the depth beyond this point leads to a sharp decline in performance metrics. This phenomenon, known as "over-smoothing," occurs when node representations become too similar, rendering the model unable to distinguish between different classes.

Performance metrics (Accuracy, Macro F1, Weighted F1) across different GCN layer depths for five benchmark datasets.

One-Hot vs. BERT Embeddings

Contrary to the prevailing trend of using pre-trained models for all tasks, BERT is not always the superior choice. While BERT excels in sentiment analysis (e.g., the MR dataset) by leveraging external semantic knowledge, one-hot embeddings performed better on topic-heavy datasets with many categories, such as 20NG or R52. This suggests that for complex classification, the internal graph structure is more critical than pre-trained word meanings.

Edge Variety and Semi-Supervised Learning

The inclusion of all three edge types (d2w, w2w, and d2d) generally yielded the highest accuracy, improving results by 0.01 to 0.04 over simpler configurations. Furthermore, GCNs demonstrated robust performance in semi-supervised settings, maintaining high accuracy even when only 1% of the data was labeled.

Conclusion

This study clarifies the design principles for GCNs in text classification. The two-layer architecture is identified as the optimal depth to balance information propagation and representation distinctness. While BERT provides significant advantages for sentiment-based tasks, the structural information captured by GCNs with one-hot embeddings remains superior for high-category topic classification. Future research should focus on better integrating pre-trained language models with the global topology of graph structures to combine the strengths of both approaches.

Summary updated

BibTeX
@misc{han2022understanding,
  author = {Soyeon Caren Han and Zihan Yuan and Kunze Wang and Siqu Long and Josiah Poon},
  title = {{Understanding Graph Convolutional Networks for Text Classification}},
  year = {2022},
  eprint = {2203.16060},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2203.16060},
}
Figure