"Factual" or "Emotional": Stylized Image Captioning with Adaptive Learning and Attention

Tianlang Chen, Zhongping Zhang, Quanzeng You, Chen Fang, Zhaowen Wang, Hailin Jin, Jiebo Luo

Abstract

Generating stylized captions for an image is an emerging topic in image captioning. Given an image as input, it requires the system to generate a caption that has a specific style (e.g., humorous, romantic, positive, and negative) while describing the image content semantically accurately. In this paper, we propose a novel stylized image captioning model that effectively takes both requirements into consideration. To this end, we first devise a new variant of LSTM, named style-factual LSTM, as the building block of our model. It uses two groups of matrices to capture the factual and stylized knowledge, respectively, and automatically learns the word-level weights of the two groups based on previous context. In addition, when we train the model to capture stylized elements, we propose an adaptive learning approach based on a reference factual model, it provides factual knowledge to the model as the model learns from stylized caption labels, and can adaptively compute how much information to supply at each time step. We evaluate our model on two stylized image captioning datasets, which contain humorous/romantic captions and positive/negative captions, respectively. Experiments shows that our proposed model outperforms the state-of-the-art approaches, without using extra ground truth supervision.

Introduction

Standard image captioning models have reached high levels of descriptive accuracy, identifying objects and actions with precision. However, these models often lack the linguistic nuance and "personality" that humans naturally use to make stories engaging. Stylized image captioning aims to bridge this gap by generating captions that are not only accurate but also possess a specific tone, such as humorous, romantic, positive, or negative.

The core challenge lies in the tension between content and style. Over-prioritizing style can lead to "hallucinations" where the model invents poetic details not present in the image. Conversely, a strict focus on image pixels often results in dry, purely factual descriptions. This research introduces a framework that balances these competing goals at a granular, word-by-word level.

Methodology

The authors propose two primary innovations to manage the interplay between factual accuracy and stylistic flair:

Style-factual LSTM (SF-LSTM)

Traditional LSTM units are replaced with a specialized SF-LSTM block. This block contains two distinct sets of matrices: one dedicated to factual knowledge and another for stylized expression.

The SF-LSTM architecture utilizes style attention to weight factual and stylized components at each time step.

As shown in the architecture diagram, the model employs an internal attention mechanism ($g_{xt}$ and $g_{ht}$) at every word-step to decide the appropriate weight for each component. For instance, when generating a common article like "a," the model leans on factual matrices; when generating an adjective like "majestic," it shifts toward the stylized side.

Adaptive Learning with a Reference Model

To train the model effectively, the researchers use a "Reference Factual Model"—a frozen, pre-trained factual captioner—to act as a tutor. During the style-learning phase, the system calculates the similarity between its current prediction and the reference model's prediction. If the predictions are similar, the word is likely factual, and the model is encouraged to stay close to the reference. If they differ significantly, the model is likely generating a stylized word and is allowed to follow the stylized training labels more freely. This "Factual Strength" metric ($g_{ip}$) eliminates the need for expensive, manual word-level sentiment labels.

Experiments and Results

The model was evaluated on two benchmarks: FlickrStyle10K (humorous and romantic styles) and the MSCOCO Sentiment Dataset (positive and negative sentiments).

Qualitative examples showing how the model adapts its "voice" across factual, humorous, and romantic styles for the same image.

Quantitative Performance

The proposed SF-LSTM + Adaptive Learning model consistently outperformed state-of-the-art methods like StyleNet and SentiCap. On the FlickrStyle10K dataset, the model achieved a CIDEr score of 39.5 for humorous captions, a significant improvement over StyleNet's 30.7.

Qualitative Insights

The results demonstrate a clear distinction in "voice." For an image of a man rock climbing, the factual model might say, "A man is climbing a large rock," while the humorous version quips, "A man is rock climbing on a rock wall like a lizard." The research highlights that style is a dynamic choice made at each time step rather than a global filter; a romantic sentence still requires factual nouns and verbs to remain grounded in reality.

Conclusion

By treating style as a word-level attention problem and using a reference model to guide training, the SF-LSTM framework successfully generates engaging, stylized captions without sacrificing descriptive integrity. Future work may explore unsupervised stylized captioning, allowing models to learn styles from large text corpora (like novels or joke books) without requiring direct image-style pairings.

Summary updated

Abstract

Generating stylized captions for an image is an emerging topic in image captioning. Given an image as input, it requires the system to generate a caption that has a specific style (e.g., humorous, romantic, positive, and negative) while describing the image content semantically accurately. In this paper, we propose a novel stylized image captioning model that effectively takes both requirements into consideration. To this end, we first devise a new variant of LSTM, named style-factual LSTM, as the building block of our model. It uses two groups of matrices to capture the factual and stylized knowledge, respectively, and automatically learns the word-level weights of the two groups based on previous context. In addition, when we train the model to capture stylized elements, we propose an adaptive learning approach based on a reference factual model, it provides factual knowledge to the model as the model learns from stylized caption labels, and can adaptively compute how much information to supply at each time step. We evaluate our model on two stylized image captioning datasets, which contain humorous/romantic captions and positive/negative captions, respectively. Experiments shows that our proposed model outperforms the state-of-the-art approaches, without using extra ground truth supervision.
BibTeX
@inproceedings{chen2018factual,
  author = {Tianlang Chen and Zhongping Zhang and Quanzeng You and Chen Fang and Zhaowen Wang and Hailin Jin and Jiebo Luo},
  title = {{"Factual" or "Emotional": Stylized Image Captioning with Adaptive Learning and Attention}},
  booktitle = {European Conference on Computer Vision},
  year = {2018},
  url = {https://openreview.net/forum?id=Sk4rTKZOWB},
}
Figure