Source-linked AI summary

Comprehending and Ordering Semantics for Image Captioning

Yehao Li, Yingwei Pan, Ting Yao, Tao Mei

arXiv:2206.06930v1cs.CVcs.AIcs.CLcs.MM

TL;DR

Image captioning methods have limited semantic perception and underuse the linguistic ordering of image semantics. COS-Net jointly enriches and orders semantics before generation, with extensive COCO experiments demonstrating its effectiveness.

  • Problem

    Pre-trained detectors and classifiers limit semantic perception through predefined labels, while existing methods underexploit the linguistic ordering of image semantics.

  • Method

    COS-Net retrieves relevant captions with CLIP, filters and enriches their semantic words, dynamically orders them, and guides caption generation.

  • Results

    Extensive experiments on COCO demonstrate COS-Net’s effectiveness in image captioning.

  • Takeaways & Limitations

    Jointly comprehending and ordering image semantics provides a unified way to capture richer relevant content and facilitate sentence generation.

  • Takeaways & Limitations

    Because COS-Net learns from training-data statistics, its image descriptions may reflect biases rooted in those data and produce negative societal impacts.

Abstract

from arXiv · show

Comprehending the rich semantics in an image and ordering them in linguistic order are essential to compose a visually-grounded and linguistically coherent description for image captioning. Modern techniques commonly capitalize on a pre-trained object detector/classifier to mine the semantics in an image, while leaving the inherent linguistic ordering of semantics under-exploited. In this paper, we propose a new recipe of Transformer-style structure, namely Comprehending and Ordering Semantics Networks (COS-Net), that novelly unifies an enriched semantic comprehending and a learnable semantic ordering processes into a single architecture. Technically, we initially utilize a cross-modal retrieval model to search the relevant sentences of each image, and all words in the searched sentences are taken as primary semantic cues. Next, a novel semantic comprehender is devised to filter out the irrelevant semantic words in primary semantic cues, and meanwhile infer the missing relevant semantic words visually grounded in the image. After that, we feed all the screened and enriched semantic words into a semantic ranker, which learns to allocate all semantic words in linguistic order as humans. Such sequence of ordered semantic words are further integrated with visual tokens of images to trigger sentence generation. Empirical evidences show that COS-Net clearly surpasses the state-of-the-art approaches on COCO and achieves to-date the best CIDEr score of 141.1% on Karpathy test split. Source code is available at \url{https://github.com/YehLi/xmodaler/tree/master/configs/image_caption/cosnet}.

1. Introduction

Image captioning seeks visually grounded, linguistically ordered descriptions, but existing methods emphasize semantic extraction or language modeling while under-exploiting semantic ordering. COS-Net jointly comprehends and orders image semantics using retrieved sentences, semantic filtering and enrichment, and learnable linguistic ranking.

  • Introduction: Image captioning [7] [11] [21] [33] aims to produce visually grounded sentences that cover salient image semantics in linguistic order.
  • Introduction: Existing methods extract attributes [40] [41], objects [2] [14] [37], or scene graphs [36] [38] [39] with pretrained encoders, but primarily enhance vision-language alignment.
  • Introduction: COS-Net jointly optimizes a semantic comprehender and ranker within a Transformer-style encoder-decoder, using CLIP retrieval [29] [24] to obtain relevant sentence words.The comprehender removes irrelevant words and infers missing relevant semantics, while the ranker orders the retained and enriched words for sentence generation.
  • Introduction: Language-modeling decoders can over-rely on language priors and hallucinate image-absent objects, motivating explicit exploitation of semantics’ inherent linguistic ordering [27].
  • Introduction: Extensive experiments on COCO demonstrate the effectiveness of COS-Net for image captioning.

2. Related Work

Image captioning evolved from RNN-based encoder-decoder schemes to Transformer-based architectures that enhance visual encoding and vision-language interaction through attention. COS-Net follows the Transformer-based paradigm while extending CLIP-based modeling with cross-modal retrieval and semantic refinement.

  • RNN-based Encoder-decoder Scheme: RNN-based encoder-decoder architectures became the de-facto recipe for modern image captioning after demonstrating improvements in machine translation.
  • Transformer-based Encoder-decoder Scheme: Transformer-based captioning strengthens visual encodings and vision-language interaction through self-attention or cross-attention mechanisms.
  • Summary: COS-Net uses Transformer-style modules while going beyond CLIP-ViL by retrieving richer semantic cues from human-annotated sentences and refining them through semantic comprehension.

3. Our Approach: COS-Net

COS-Net unifies semantic comprehending and linguistic ordering in a Transformer-style image-captioning architecture. It enriches retrieved semantic cues, ranks them dynamically, and combines them with encoded visual tokens for sentence generation.

  • 3. Our Approach: COS-Net: COS-Net integrates semantic comprehending and ordering into a unified architecture for image captioning.Its overall architecture is depicted in Figure 2.
  • Visual Encoding and Generation: A CLIP-based visual encoder [24] transforms global and grid image features into contextually enriched visual tokens using stacked Transformer blocks [6] [10] [15].The position-aware semantic tokens and enriched visual tokens are then integrated in a Transformer decoder for sentence generation.
  • Cross-modal Retrieval: CLIP retrieval searches semantically relevant training captions, removes stop words, and uses the resulting words as primary semantic cues.Caption relevance is computed from cosine similarity between CLIP image and text features.
  • Semantic Comprehender: The semantic comprehender filters irrelevant cues and reconstructs missing relevant words through Transformer self-attention, visual cross-attention, and set prediction.Parametric semantic queries provide additional slots for reconstructing missing semantics, while a proxy objective trains screening and reconstruction.
  • Semantic Ranker: The semantic ranker estimates dynamic linguistic positions for comprehended semantic words instead of relying on fixed sequence-position encodings.This addresses uncertain word positions and reduces reliance on language priors that can cause object hallucination.

4. Experiments

COS-Net is evaluated on COCO across standard, online official, and robust object-hallucination splits, with ablations and qualitative comparisons examining its semantic components. It consistently outperforms state-of-the-art methods, including a 7.7% absolute CIDEr improvement over ensemble X-Transformer and reduced object hallucination.

  • Ablation Study: Ablation experiments evaluate how cross-modal retrieval, irrelevant-semantic filtering, missing-semantic inference, and semantic ranking affect COS-Net without self-critical sequence training.The comparison starts from a Transformer encoder-decoder base using CLIP grid features and progressively examines the proposed design choices.
  • Ensemble Model on Karpathy Test Split: 7.7% absolute CIDEr improvement over ensemble X-Transformer is achieved by the ensemble COS-Net on the COCO Karpathy test split.The ensemble uses four models trained with different random seeds, and its performance trends mirror the single-model results.
  • Hallucination Analysis on Robust Split: COS-Net reduces object hallucination on the robust split, achieving lower CHs and CHi scores than Transformer † through retrieval-based cue mining and semantic refinement and ordering.CLIP-based Att2In † and Up-Down † also improve hallucination-related scores over their standard counterparts, while COS-Net goes beyond Transformer †.
  • Qualitative Results: Qualitative comparisons show that COS-Net, Transformer †, and Up-Down † all generate coherent descriptions, while COS-Net provides stronger semantic relevance to image content.The comparison uses human-annotated ground-truth sentences alongside outputs from the three systems.

5. Conclusion and Discussion

The paper introduces COS-Net, a Transformer-style encoder-decoder that unifies enriched semantic comprehending with learnable semantic ordering for image captioning. It also acknowledges that dataset-learned biases may produce negative societal impacts.

  • Conclusion and Discussion: COS-Net unifies enriched semantic comprehending and learnable semantic ordering within a single Transformer-style encoder-decoder architecture.The framework is designed to comprehend and order rich image semantics for image captioning.
  • Conclusion and Discussion: A CLIP-based cross-modal retrieval model gathers primary semantic cues, after which a semantic comprehender removes irrelevant words and infers missing relevant ones.A subsequent semantic ranker estimates the ordering of the semantic words.
  • Broader Impact: Because COS-Net learns from training-dataset statistics, it may reproduce data-rooted biases and cause negative societal impacts.The paper identifies further research on this issue as necessary.
Loading 2206.06930v1…