Aspect-based Sentiment Classification with Sequential Cross-modal Semantic Graph

Yufeng Huang, Zhuo Chen, Wen Zhang, Jiaoyan Chen, Jeff Z. Pan, Zhen Yao, Yujie Xie, Huajun ChenarXiv 2022

Abstract

Multi-modal aspect-based sentiment classification (MABSC) is the task of classifying the sentiment of a target entity mentioned in a sentence and an image. However, previous methods failed to account for the fine-grained semantic association between the image and the text, which resulted in limited identification of fine-grained image aspects and opinions. To address these limitations, we propose SeqCSG, which enhances the encoder-decoder sentiment classification framework using sequential cross-modal semantic graphs. SeqCSG utilizes image captions and scene graphs to extract both global and local fine-grained image information and considers them as elements of the cross-modal semantic graph along with tokens from tweets. The sequential cross-modal semantic graph is represented as a sequence with a multi-modal adjacency matrix indicating relationships between elements. Experimental results show that the approach outperforms existing methods and achieves state-of-the-art performance on two standard datasets.

Introduction: The Challenge of Multi-modal Granularity

Multi-modal Aspect-based Sentiment Classification (MABSC) aims to determine the sentiment toward a specific "target" (e.g., a person, organization, or location) mentioned in a social media post that contains both text and imagery.

Example of the MABSC task where different targets (Jackson Swisher vs. Danville) in the same tweet require distinct sentiment predictions.

A significant challenge in this field is granularity. As shown in Figure 1, a single tweet may mention multiple targets with differing sentiments. Previous models often treated images as global data points, failing to link specific visual objects (like a finish line) to the corresponding text entities. This "semantic gap" limits the model's ability to distinguish between targets within the same multi-modal context.

Methodology: The SeqCSG Framework

To bridge this gap, we introduce SeqCSG (Sequential Cross-modal Semantic Graph). This framework utilizes an encoder-decoder architecture (based on BART) and incorporates three primary innovations to handle fine-grained visual information.

1. Fine-grained Feature Extraction

Instead of processing raw pixels as a single vector, SeqCSG extracts two types of visual information:

  • Global Information: Image captions generated by a pre-trained transformer to provide a high-level summary.
  • Local Information: A "Scene Graph" consisting of triples such as (man, wearing, hat) and (sub-image, image of, man). This explicitly maps specific image regions to semantic concepts.

2. Sequential Graph Construction and Visibility Matrix

All extracted components—tweet text, captions, and scene graph triples—are flattened into a single sequence of tokens. To maintain the structural relationships of the graph within this sequence, we implement a Multi-modal Adjacency Matrix. This "visibility matrix" controls the self-attention mechanism, ensuring tokens only attend to relevant neighbors (e.g., tokens within the same triple). This prevents "knowledge noise" from unrelated visual elements from degrading the prediction.

The SeqCSG pipeline: (a) Input processing, (b) Extraction of captions and scene graphs, (c) Construction of the sequential graph with a visibility matrix, and (d) Prompt-based sentiment decoding.

3. Prompt-based Decoding

The model employs a prompt-based approach for classification. Rather than using a standard classification head, the decoder fills a template: [Target] is [mask]. The model predicts the sentiment word (Positive, Negative, or Neutral) to replace the [mask] token.

Experimental Results

SeqCSG was evaluated on two benchmark datasets: Twitter2015 and Twitter2017. The model achieved state-of-the-art (SOTA) performance on both benchmarks:

  • Twitter2015: 79.3% Accuracy and 75.0 Macro-F1 score.
  • Twitter2017: 74.6% Accuracy and 73.2 Macro-F1 score.

Ablation studies confirmed that both the scene graph and the adjacency matrix are critical; removing either component led to a significant decrease in performance. Furthermore, analysis revealed that using approximately five scene graph triples provides the optimal balance between detail and noise.

Conclusion

SeqCSG demonstrates that converting visual data into a structured, language-like format (triples and captions) allows Large Language Models to perform more effective cross-modal reasoning. By pinpointing the specific parts of an image that relate to a text-based target, the model overcomes the limitations of coarse-grained multi-modal analysis.

Summary updated

BibTeX
@misc{huang2022aspect,
  author = {Yufeng Huang and Zhuo Chen and Wen Zhang and Jiaoyan Chen and Jeff Z. Pan and Zhen Yao and Yujie Xie and Huajun Chen},
  title = {{Aspect-based Sentiment Classification with Sequential Cross-modal Semantic Graph}},
  year = {2022},
  eprint = {2208.09417},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2208.09417},
}
Figure