Learning to Describe Differences Between Pairs of Similar Images

Harsh Jhamtani, Taylor Berg-Kirkpatrick

Abstract

While standard image captioning has advanced significantly, describing the relationship or changes between two similar images remains a complex challenge. This task, termed "Spot-the-diff," requires an AI to identify salient changes while ignoring sensor noise and background fluctuations. We introduce a new dataset of over 13,000 surveillance image pairs and propose the Difference Description with Latent Alignment (DDLA) model. DDLA explicitly aligns generated sentences with specific clusters of visual changes, outperforming traditional attention mechanisms.

Introduction

The ability to describe changes between scenes is fundamental to human perception, yet difficult for computer vision models. Unlike static image captioning, change description requires identifying "what changed" versus "what stayed the same." This involves filtering out irrelevant variations—such as lighting shifts or moving foliage—to focus on salient objects like vehicles or pedestrians.

Example of a salient change: a blue truck is present in the left image but absent in the right.

The Spot-the-diff Dataset

To facilitate research in this area, we present the Spot-the-diff dataset, derived from the VIRAT surveillance video corpus. The dataset consists of 13,192 image pairs. Human annotators provided exhaustive, multi-sentence descriptions for each pair, focusing on state changes within a fixed environment. This dataset provides a rigorous benchmark for models to move beyond simple pixel-level detection toward semantic abstraction.

An image pair showing pedestrians appearing in the 'after' scene (right).

Proposed Methodology: DDLA

The core contribution of this work is the Difference Description with Latent Alignment (DDLA) model. The pipeline consists of several key stages:

  1. Change Clustering: Instead of processing raw pixels directly, the model uses a pre-calculated pixel-difference mask. These pixels are grouped into clusters using DBScan, which serves as a proxy for "objects" that have moved or changed state.
  2. Latent Alignment Variable ($z$): Standard models often use "soft attention," which can be distracted by static backgrounds. DDLA introduces a latent variable $z$ to force the model to align each generated sentence with a specific visual cluster.
  3. Salience Prior: The model learns to predict which clusters are most likely to be described by humans based on geometric features such as area and the number of changed pixels.
  4. Constrained Attention: During sentence generation, the LSTM decoder's attention is restricted to the visual features within the mask of the selected cluster.

Experimental Results

The DDLA model was evaluated against standard attention-based baselines (CAPT) using metrics like BLEU, METEOR, and CIDEr.

  • Performance: In single-sentence generation, DDLA achieved a CIDEr score of 0.328, compared to 0.263 for the baseline. For multi-sentence generation, DDLA maintained its lead with a score of 0.297.
  • Human Alignment: A study revealed that DDLA’s predicted alignment between sentences and visual clusters matched human intuition 54.6% of the time, doubling the performance of random alignment (27.4%).

Conclusion and Future Work

DDLA demonstrates that explicit object-level alignment is superior to broad attention for change description. However, limitations remain. The model currently treats movement as a sequence of "disappear" and "reappear" events rather than continuous motion. Future work will explore the integration of pre-trained object detectors (e.g., YOLO) to provide richer semantic labels and improve attribute accuracy, reducing instances where the model misidentifies object properties like color.

Summary updated

BibTeX
@inproceedings{jhamtani2018learning,
  author = {Harsh Jhamtani and Taylor Berg-Kirkpatrick},
  title = {{Learning to Describe Differences Between Pairs of Similar Images}},
  booktitle = {Conference on Empirical Methods in Natural Language Processing},
  year = {2018},
  doi = {10.18653/v1/d18-1436},
}
Figure