AlignVE: Visual Entailment Recognition Based on Alignment Relations

Biwei Cao, Jiuxin Cao, Jie Gui, Jiayun Shen, Bo Liu, Lei He, Yuan Yan Tang, James Tin-Yau KwokIEEE Trans. Multimedia 2022 · DOI

Abstract

Visual entailment (VE) is to recognize whether the semantics of a hypothesis text can be inferred from the given premise image, which is one special task among recent emerged vision and language understanding tasks. Currently, most of the existing VE approaches are derived from the methods of visual question answering. They recognize visual entailment by quantifying the similarity between the hypothesis and premise in the content semantic features from multi modalities. Such approaches, however, ignore the VE's unique nature of relation inference between the premise and hypothesis. Therefore, in this paper, a new architecture called AlignVE is proposed to solve the visual entailment problem with a relation interaction method. It models the relation between the premise and hypothesis as an alignment matrix. Then it introduces a pooling operation to get feature vectors with a fixed size. Finally, it goes through the fully-connected layer and normalization layer to complete the classification. Experiments show that our alignment-based architecture reaches 72.45% accuracy on SNLI-VE dataset, outperforming previous content-based models under the same settings.

Introduction

Visual Entailment (VE) is the task of determining if a text "hypothesis" can be inferred from a "premise" image. The goal is to classify the relationship into one of three categories: Entailment (the image proves the text), Contradiction (the image disproves the text), or Neutral (the image doesn't provide enough info).

Most existing VE models are essentially "borrowed" from Visual Question Answering (VQA). These models focus on fusing image and text features into a single vector to predict an answer. However, the authors argue that VE is fundamentally different from VQA. While VQA is about extracting specific content (colors, counts, objects), VE is about relational inference. Standard fusion methods often ignore the fine-grained interactions between specific image regions and specific words, which are crucial for logical reasoning.

Methodology: The AlignVE Architecture

The proposed AlignVE architecture consists of three main modules designed to capture these fine-grained interactions:

  1. Visual Feature Extraction: The model uses either a CNN (for grid-based features) or Faster R-CNN (for object-based "Region of Interest" features). These features are then passed through a Transformer-style Self-Attention Encoder (AttEnc) to enrich them with spatial context.
  2. Text Feature Extraction: Text is embedded using GloVe, combined with positional encodings, and processed through its own AttEnc to capture linguistic context.
  3. Alignment-based Classifier: This is the core innovation. Instead of simple concatenation or element-wise multiplication, the model computes an alignment matrix ($R_{align} = P H^T$). This matrix represents the dot-product similarity between every image region and every word in the hypothesis.
The AlignVE architecture explicitly models the alignment between visual and textual features.

To handle the variable size of this matrix, the authors use adaptive pooling (both average and max) to condense the alignment data into a fixed-size feature vector for the final classification layer.

Key Results

AlignVE was evaluated on the SNLI-VE dataset, containing over 500,000 premise-hypothesis pairs, as well as SNLI-VE-2.0, a refined version with corrected neutral samples. The model achieved 72.45% accuracy on the SNLI-VE test set, outperforming previous leading models like EVE-Image (71.16%) and BUTD (68.90%).

Experiments with different ResNet backbones showed that ResNet-101 performed the best. Interestingly, the much larger ResNet-152 actually performed slightly worse, suggesting a point of diminishing returns or potential overfitting for this specific architecture. Ablation studies further showed that replacing the Self-Attention Encoders with simpler MLPs or GRUs led to a significant drop in accuracy (~1-2%), proving that contextualized features are vital before the alignment step.

Visualizing Logical Inference

The "aha moment" of this research is that the interaction between modalities matters more than the modalities themselves for this specific task. By building a 2D alignment matrix, the model creates an "interaction space" where logical contradictions become easier to spot.

Visualization of attention maps for Neutral, Entailment, and Contradiction cases.

As shown in the visualizations, the alignment matrix allows for high-quality interpretation. For example, in a "Contradiction" case where the text says "The man was laying by the pool," the model can show exactly which words (like "laying") failed to find a strong match in the image, leading to the correct classification. Explicit alignment outperformed standard co-attention mechanisms by over 5%, suggesting that for logical tasks, a raw similarity map is more informative than the weighted summaries produced by typical attention layers.

Conclusion and Future Work

AlignVE demonstrates that rethinking VE as a relational inference problem leads to significant performance gains. However, performance remains tied to the quality of visual backbones. While ResNet-101 worked well, the model's reliance on fixed feature extractors might limit its ability to understand very complex or abstract scenes. Future work could explore incorporating external knowledge bases to help resolve "Neutral" cases where the image is ambiguous, or explicitly handling higher-order logic like negation.

Summary updated

BibTeX
@article{cao2022alignve,
  author = {Biwei Cao and Jiuxin Cao and Jie Gui and Jiayun Shen and Bo Liu and Lei He and Yuan Yan Tang and James Tin-Yau Kwok},
  title = {{AlignVE: Visual Entailment Recognition Based on Alignment Relations}},
  journal = {IEEE Trans. Multimedia},
  year = {2022},
  doi = {10.1109/tmm.2022.3222118},
}
Figure