CaptionSmiths: Flexibly Controlling Language Pattern in Image Captioning

Kuniaki Saito, Donghyun Kim, Kwanyong Park, Atsushi Hashimoto, Yoshitaka Ushiku

TL;DR

This paper introduces CaptionSmiths, a novel approach to image captioning that allows for flexible, continuous control over caption properties like length, descriptiveness, and vocabulary uniqueness. Unlike previous methods that rely on discrete categories, CaptionSmiths enables smooth transitions between different caption styles, leading to more precise control and better alignment with image content.

What Problem Does This Paper Address?

Generating descriptive text for images is a crucial task in computer vision with applications ranging from assisting visually impaired individuals to content summarization. While recent vision-language models have shown impressive capabilities, controlling the style of the generated captions remains a challenge. Users often have specific preferences for caption length (concise vs. detailed) or the level of detail (general vs. specific vocabulary). Existing methods for controlling caption style typically rely on discrete categories (e.g., "short," "medium," "long") or require training separate models for each desired style. This approach is inflexible, can lead to abrupt style changes, and is computationally expensive. The paper aims to address this by developing a single model that can smoothly adapt its language patterns based on interpretable, continuous control signals.

Methods

CaptionSmiths introduces a framework with two key innovations: a "Condition Calculator" and "Condition Encoding."

  • Condition Calculator: This module automatically quantifies three properties of each caption without human annotation:
  • Length: Simply the number of tokens in the caption.
  • Descriptiveness: Defined as the ratio of nouns and adjectives to the total number of words, indicating information density.
  • Uniqueness: Measures the use of rare words, reflecting the choice between general and fine-grained vocabulary. These raw values are then optionally decorrelated to ensure independent control and normalized to a [0, 1] range.

  • Condition Encoding: Instead of using discrete indices, CaptionSmiths employs a continuous approach. For each property, it learns two "endpoint" vectors representing extreme states (e.g., very short vs. very long captions). The desired continuous scalar value (from the Condition Calculator) is then used to linearly interpolate between these two endpoint vectors. This creates a smooth transition in the conditioning signal fed to the language model, allowing for fine-grained control over the output caption's style. This is achieved by modifying the standard auto-regressive loss to incorporate these learned conditioning embeddings.

Datasets

The paper trains and evaluates CaptionSmiths on a combination of image-captioning datasets to ensure generalization across different caption styles and lengths. These include:

  • MSCOCO [22]
  • LN COCO [31]
  • Detail23K [24]
  • Docci [28]
  • Laion-COCO [33]
  • Monkey [20]

The total dataset size is approximately 1.3 million image-caption pairs. For specific evaluations, they also utilize fine-grained classification datasets like CUB [37], Stanford Dogs [17], and Stanford Cars [18].

Key Insights and Ideas

  • Continuous Control is Superior: The core insight is that continuous control signals lead to smoother transitions and more precise control over caption properties compared to discrete methods. This avoids the "jumpiness" and limitations of previous approaches.
  • Automatic Property Quantification: Developing methods to automatically quantify caption properties like descriptiveness and uniqueness without manual labeling is crucial for enabling this continuous control.
  • Disentangled Control: The paper demonstrates that the three controlled properties (length, descriptiveness, uniqueness) are largely disentangled, meaning adjusting one property has minimal impact on the others. This is a significant advantage for user control.
  • Improved Lexical Alignment: By enabling more precise control, CaptionSmiths not only generates captions with desired styles but also achieves better lexical alignment with ground-truth captions, indicating a deeper understanding of the image content.
  • Unified Model for Diverse Styles: The ability to handle diverse caption styles (short, long, descriptive, concise) within a single model is a major step towards more adaptable and user-friendly image captioning systems.

Key Results

  • CaptionSmiths reduces the error in controlling caption length by 50.6% compared to baselines, while maintaining better lexical alignment.
  • Increasing descriptiveness improves the ClipScore, indicating that richer descriptions are more aligned with image content. In some cases, generated captions with high descriptiveness outperformed ground-truth captions.
  • Increasing uniqueness improves recall on fine-grained category datasets, demonstrating that the model generates more specific and accurate terms.
  • Self-retrieval evaluations on COCO show that CaptionSmiths outperforms baselines, suggesting its generated captions better capture image-specific features.
  • The model demonstrates a significantly richer vocabulary compared to baselines, as evidenced by the higher ratio of unique words.
  • CaptionSmiths generalizes well across different datasets and outperforms specialized models tailored to individual datasets.

Limitations and Future Work

  • Hallucination in Long Captions: The paper acknowledges that, like other models, CaptionSmiths can suffer from hallucination when generating very long captions.
  • Uniqueness Intuition: Specifying the "uniqueness" value can be less intuitive for users compared to length or descriptiveness. The authors suggest addressing this by providing example sentences with corresponding uniqueness values.
  • Extending Properties: While the paper focuses on three properties, the authors note that other quantifiable properties (e.g., structural coherence, image content alignment) could also be valuable to control. They suggest that their framework is extensible to incorporate additional properties.
  • Zero-Shot Performance: The paper mentions zero-shot evaluation on Nocaps and Vizwiz datasets, showing competitive performance, but this could be a more central focus for future work.

Summary updated

BibTeX
@inproceedings{saito2025captionsmiths,
  author = {Kuniaki Saito and Donghyun Kim and Kwanyong Park and Atsushi Hashimoto and Yoshitaka Ushiku},
  title = {{CaptionSmiths: Flexibly Controlling Language Pattern in Image Captioning}},
  booktitle = {IEEE/CVF International Conference on Computer Vision},
  year = {2025},
}
Figure