Improving Reference-Based Distinctive Image Captioning with Contrastive Rewards

Yangjun Mao, Jun Xiao, Dong Zhang, Meng Cao, Jian Shao, Yueting Zhuang, Long Chen

Abstract

Standard image captioning models often produce generic descriptions that fail to distinguish between similar scenes. This paper introduces Reference-based Distinctive Image Captioning (Ref-DIC), a task requiring models to describe a target image by highlighting its unique features relative to a set of similar reference images. We propose two new challenging benchmarks (COCO-DIC and Flickr30K-DIC), a novel Transformer-based architecture (TransDIC++) utilizing contrastive rewards, and a new evaluation metric (DisCIDEr) designed to measure distinctiveness more accurately than traditional metrics.

Introduction: The Challenge of Distinctiveness

Image captioning has reached high levels of accuracy, yet models frequently suffer from "blandness." For instance, a model might describe multiple different bathrooms as simply "a bathroom with a toilet and a sink." While factually correct, such captions lack the specificity needed to identify a particular image within a group.

Ref-DIC addresses this by providing "distractor" reference images. The goal is to generate a caption like "a bathroom with a pink towel" if the reference images contain white towels. A critical observation of this work is that previous Ref-DIC benchmarks were too simplistic; reference images often belonged to the same scene category but shared no specific objects, allowing models to be "distinctive" without performing actual visual comparisons.

Comparison of coarse-grained (a) vs. fine-grained (b) reference matching. In (a), the distractor is too different, while in (b), the shared objects force the model to find subtle differences.

Methodology

To push the boundaries of distinctive captioning, the authors developed a multi-faceted pipeline:

1. Two-Stage Matching for Benchmarks

To create more rigorous datasets, the authors employed a two-stage matching mechanism. First, CLIP is used for coarse-grained scene-level matching. Second, Scene Graphs ensure that the target and reference images share specific objects and attributes. This forces the model to look at fine-grained details (like color or state) rather than just identifying object presence.

2. TransDIC++ and DisReward

The core architecture, TransDIC, features a Two-Flow Encoder. One flow processes the target image, while the "Target-Reference" flow uses specialized "Select" and "Fuse" layers to explicitly compare target regions to corresponding regions in reference images.

TransDIC++ enhances this with a contrastive learning module. During training, the model is presented with "hard" negative samples where informative parts of the reference images are masked out. A reinforcement learning reward, DisReward, then encourages the model to generate captions that are highly descriptive of the target but poorly descriptive of the masked references.

Evaluation: The DisCIDEr Metric

Traditional metrics like CIDEr do not penalize generic descriptions. The authors propose DisCIDEr, which incorporates an Inverse Reference Frequency (IRF). If a word (e.g., "towel") appears in the ground-truth captions of all reference images, its weight is reduced. Conversely, unique words (e.g., "pink") are prioritized, providing a metric that better aligns with human perception of distinctiveness.

Experimental Results

TransDIC++ achieved state-of-the-art performance across multiple benchmarks:

  • Accuracy: On COCO-DIC, TransDIC++ achieved a CIDEr score of 132.4, significantly outperforming the previous state-of-the-art model, GdisCap (125.8).
  • Distinctiveness: On the DisCIDEr (DisC) metric, TransDIC++ reached 102.4, compared to 98.7 for a standard Transformer baseline.
  • Human Alignment: A user study confirmed that DisCIDEr has a higher agreement rate with human judgment (64%) than standard CIDEr (58%).

Conclusion

By introducing more challenging benchmarks and a contrastive reward system, this work significantly advances the ability of models to generate distinctive, comparative descriptions. While dataset bias in human annotations remains a challenge, the proposed framework provides a robust foundation for future work in both image and video reference-based captioning.

Summary updated

BibTeX
@article{mao2023improving,
  author = {Yangjun Mao and Jun Xiao and Dong Zhang and Meng Cao and Jian Shao and Yueting Zhuang and Long Chen},
  title = {{Improving Reference-Based Distinctive Image Captioning with Contrastive Rewards}},
  journal = {ACM Trans. Multim. Comput. Commun. Appl.},
  year = {2023},
}
Figure