CLIP4IDC: CLIP for Image Difference Captioning

Zixin Guo, Tzu-Jui Julius Wang, Jorma Laaksonen

Abstract

Image Difference Captioning (IDC) involves generating natural language descriptions of changes between two similar images. Existing approaches often suffer from a domain gap between general-purpose visual features and the fine-grained requirements of IDC, as well as an interaction gap where image pairs are processed independently. We introduce CLIP4IDC, a framework that repurposes the CLIP model for IDC using a specialized "adapt-and-fine-tune" strategy. By employing a dual-module vision encoder to capture both individual context and inter-image differences, CLIP4IDC achieves state-of-the-art results on benchmarks like CLEVR-Change and Spot-the-Diff.

Introduction

The task of Image Difference Captioning (IDC) is fundamentally about identifying "nuances"—subtle shifts in color, position, or object presence—while ignoring the vast majority of shared visual information. Current research faces two primary bottlenecks:

  1. The Domain Gap: Visual extractors (like ResNet) pre-trained on ImageNet are optimized for high-level object recognition rather than the fine-grained detail needed to describe differences.
  2. The Interaction Gap: Conventional encoders often process images separately, failing to capture the relational "flow" or specific changes between them.

The CLIP4IDC Framework

To address these challenges, CLIP4IDC leverages the pre-trained semantic richness of OpenAI’s CLIP through two key innovations: a two-stage training strategy and a specialized encoder architecture.

Adapt-and-Fine-Tune Strategy

Instead of direct fine-tuning for captioning, the model first undergoes an IDC-specific Adaptation phase. This phase uses a contrastive loss to align the visual representation of a "change" with its textual description via a retrieval task. This ensures the model understands what a difference "looks like" in the semantic space before attempting sentence generation.

The CLIP4IDC architecture featuring the two-stage Adapt-and-Fine-Tune process and the dual-module vision encoder.

Intra- and Inter-Encoder Architecture

The vision encoder is bifurcated to optimize comparison:

  • Intra-Encoder: Learns the individual context and features of each image in the pair.
  • Inter-Encoder: Acts as a "comparison engine," specifically designed to focus on the subtle differences between the contexts provided by the Intra-Encoders.

Ablation studies confirm that the Inter-Encoder is vital; removing these layers leads to a significant drop in performance, proving that explicit comparison structures are necessary for IDC.

Experimental Results

CLIP4IDC was evaluated on three major benchmarks: CLEVR-Change (synthetic geometric changes), Spot-the-Diff (real-world surveillance), and Image-Editing-Request (human-written edit instructions).

The model set new state-of-the-art (SOTA) records across all datasets, primarily measured by the CIDEr metric:

  • CLEVR-Change: 150.7 (vs. previous 128.9)
  • Spot-the-Diff: 47.4 (vs. previous 41.5)
  • Image-Editing-Request: 32.2 (vs. previous 27.7)
Qualitative attention maps showing the model focusing on the specific changed object (a car) while ignoring the static background.

Qualitative analysis via attention maps demonstrates that the model successfully ignores static backgrounds and "locks on" to the specific objects that changed, as seen in the Spot-the-Diff examples where the model identifies a moving or appearing vehicle.

Conclusion

CLIP4IDC demonstrates that the joint vision-language latent space of CLIP provides a superior foundation for IDC compared to traditional CNNs. By bridging the domain and interaction gaps through a dedicated adaptation phase and a comparison-focused architecture, the model achieves significant performance gains. Future work will explore deeper cross-modal interactions and the application of this framework to other large-scale vision-language models.

Summary updated

BibTeX
@inproceedings{guo2022clip,
  author = {Zixin Guo and Tzu-Jui Julius Wang and Jorma Laaksonen},
  title = {{CLIP4IDC: CLIP for Image Difference Captioning}},
  booktitle = {Aacl/ijcnlp},
  year = {2022},
  doi = {10.18653/v1/2022.aacl-short.5},
}
Figure