Exploiting BERT For Multimodal Target Sentiment Classification Through Input Space Translation

Zaid Khan, Yun Fu · DOI

Abstract

Multimodal target/aspect sentiment classification combines multimodal sentiment analysis and aspect/target sentiment classification. The goal of the task is to combine vision and language to understand the sentiment towards a target entity in a sentence. Twitter is an ideal setting for the task because it is inherently multimodal, highly emotional, and affects real world events. However, multimodal tweets are short and accompanied by complex, possibly irrelevant images. We introduce a two-stream model that translates images in input space using an object-aware transformer followed by a single-pass non-autoregressive text generation approach. We then leverage the translation to construct an auxiliary sentence that provides multimodal information to a language model. Our approach increases the amount of text available to the language model and distills the object-level information in complex images. We achieve state-of-the-art performance on two multimodal Twitter datasets without modifying the internals of the language model to accept multimodal data, demonstrating the effectiveness of our translation. In addition, we explain a failure mode of a popular approach for aspect sentiment analysis when applied to tweets.

The Challenge of Multimodal Sentiment on Twitter

Sentiment analysis is inherently difficult with text alone, but Multimodal Target Sentiment Classification (MTASC) introduces a significant layer of complexity: determining the sentiment toward a specific entity (the "target") using both text and images.

Social media platforms like Twitter present unique hurdles for this task. Unlike "classical" datasets where images are simple and highly relevant to the text, Twitter images are often complex, noisy, or even irrelevant. Furthermore, tweets are notoriously short, lacking the rich context found in long-form product reviews.

Challenges of MTASC on Twitter: complex visuals and low-context text.

As shown in Figure 1, the relevance of visuals in MTASC can vary wildly, and the text is often too brief to provide sufficient context for a language model. Traditional methods often attempt to "hack" the internals of language models like BERT to force-feed them visual features, which can lead to brittle models that are difficult to train and interpret.

Comparison of standard multimodal sentiment tasks versus target-oriented analysis.

Figure 2 highlights how MTASC differs from standard multimodal sentiment classification or target-oriented analysis. While standard tasks might deal with simple, relevant visuals or long, informative text, MTASC on Twitter must navigate the intersection of complex scenes and sparse textual data.

Methods: EF-CaTrBERT

Researchers from Northeastern University have developed EF-CaTrBERT (End-to-end Fusion Caption Transformer BERT), a model that masters MTASC by "translating" images into descriptive text. Instead of merging raw image vectors with text vectors in a high-dimensional feature space, they translate the image into the input space of the language model.

Image Translation and the Auxiliary Sentence

The model utilizes a two-stream approach:

  • Image Translation: A modified DETR (DEtection TRansformer) architecture is used. Unlike standard autoregressive captioners, this model predicts the entire description in a single pass (non-autoregressive), significantly increasing speed.
  • The "Auxiliary Sentence" Trick: BERT is pre-trained to compare two sentences (Sentence A and Sentence B). The authors set the tweet as Sentence A. For Sentence B, they concatenate the Target Entity with the Generated Image Caption.

By presenting the image content as a natural language sentence, BERT can leverage its massive pre-trained knowledge to "understand" the visual context just as it understands the tweet text.

Datasets and Evaluation

The model was evaluated on several key benchmarks:

  • Twitter-15 & Twitter-17: The primary benchmarks for multimodal target-oriented sentiment.
  • MS-COCO: Used to pre-train the captioning transformer to recognize objects and scenes.
  • Bloomberg Twitter-Image Relationship Dataset: Used to evaluate if the model truly understands whether an image is relevant to the text or just "background noise."

Key Insights: Interpretability and Calibration

  • Input Space vs. Feature Space: Translating images into text allows the model to stay "within the lines" of what BERT was originally trained to do, often proving more effective than abstract mathematical vectors.
  • Interpretability: Because the image is turned into a caption, humans can read what the model "sees." This allows researchers to diagnose whether a failure was due to a poor caption or flawed sentiment logic.
  • Calibration and Overconfidence: The authors discovered that previous state-of-the-art models (like BERT-Pair-QA) often fail on Twitter because they are overconfident. These models, designed for long reviews, struggle with the high variance and noise of short-form social media.
  • The "Goldilocks" Caption: Interestingly, longer captions aren't always better. Excessive detail can introduce "spurious objects" (noise) that distract the model from the actual target.

Results

EF-CaTrBERT achieved state-of-the-art performance, outperforming previous models like TomBERT on both Twitter-15 and Twitter-17.

  • Accuracy: The model achieved 78.01% accuracy on Twitter-15 and 72.3% on Twitter-17 (using domain-specific BERT weights).
  • Relational Understanding: On the Bloomberg dataset, the method showed a 6% improvement over text-only BERT, demonstrating its success in using images to understand entity relationships.

Limitations and Future Work

Despite its success, the model faces challenges with domain mismatch; the captioning transformer (trained on MS-COCO) may struggle with niche Twitter content like specific memes or celebrities. Additionally, while the non-autoregressive captioning is fast, it may miss subtle nuances. Future work will focus on improving stability and expanding the captioning vocabulary to better handle social media's dynamic nature.

Summary updated

BibTeX
@inproceedings{khan2021exploiting,
  author = {Zaid Khan and Yun Fu},
  title = {{Exploiting BERT For Multimodal Target Sentiment Classification Through Input Space Translation}},
  booktitle = {ACM Multimedia},
  year = {2021},
  doi = {10.1145/3474085.3475692},
}
Figure