Boosting Video Captioning with Dynamic Loss Network

Nasib Ullah, Partha Pratim MohantaarXiv 2021

Abstract

Standard video captioning models often suffer from a "training-evaluation gap" because they are trained to minimize word-level cross-entropy loss but are evaluated using sentence-level metrics like BLEU or CIDEr. This paper introduces a Dynamic Loss Network (DLN), a pre-trained Transformer-based module that learns to approximate these non-differentiable evaluation metrics. By providing a differentiable training signal that aligns directly with human-like phrasing, the DLN enables state-of-the-art performance on major benchmarks without adding computational overhead during inference.

Introduction

Video captioning requires a model to translate complex spatial and temporal visual information into natural language. Traditionally, these models are trained using Cross-Entropy (CE) loss, which penalizes the model for failing to predict the exact next word in a ground-truth sequence. However, evaluation is performed using metrics like BLEU, METEOR, and CIDEr, which prioritize semantic similarity and n-gram overlap. This discrepancy means a model can achieve low CE loss while producing nonsensical text, or high loss while producing valid but differently worded descriptions.

While Reinforcement Learning (RL) has been used to bridge this gap, it often introduces training instability and sparse rewards. The authors propose a more direct approach: making the evaluation metrics themselves differentiable through a proxy network.

Methodology: The Dynamic Loss Network

The proposed framework utilizes a two-stage training process centered on the DLN, which acts as a differentiable surrogate for standard evaluation metrics.

Figure 6: The two-stage training framework. Stage 1 involves training the DLN on a caption corpus, while Stage 2 integrates the DLN into the main captioning pipeline.

Stage 1: Training the DLN

The authors employ a TransformerXL architecture as the backbone for the DLN. It is trained in a self-supervised manner to predict BLEU, METEOR, and CIDEr scores for pairs of candidate and reference captions. TransformerXL was specifically chosen over subword-based models like BERT because it operates on standard word inputs, making it more effective at modeling word-level n-gram metrics.

Stage 2: Training the Captioner

The main video captioning model (an encoder-decoder) is trained using a multi-component loss function:

  1. Cross-Entropy Loss: Ensures basic grammatical structure, particularly in early training phases.
  2. DLN Loss: Provides the "dynamic" signal that optimizes the model for higher evaluation scores.
  3. Coherence Loss: A novel addition that ensures visual embeddings of successive frames remain similar, accounting for temporal redundancy in video.

Crucially, the DLN is only required during training. At inference, the model generates captions using only the visual encoder and language decoder, maintaining standard execution speeds.

Experimental Results

The model was evaluated on the MSVD and MSR-VTT datasets. The DLN-enhanced model achieved state-of-the-art results, notably reaching a CIDEr score of 97.4 on MSVD, significantly outperforming previous leaders like ORG-TRL (95.2).

Figure 3: Comparison of training dynamics. (a) High-level architecture. (b) Existing methods show a disconnect between loss and metrics. (c) The proposed method shows metrics like CIDEr improving significantly as training progresses.

As shown in the comparison above, standard methods (b) often see evaluation metrics plateau or fluctuate inconsistently with training loss. In contrast, the proposed method (c) demonstrates a clear upward trajectory for metrics like CIDEr, proving that the DLN successfully aligns the training signal with the final evaluation criteria. Qualitative analysis further showed that the DLN helps the model identify specific objects more accurately (e.g., correctly identifying a "turtle" where baseline models saw a "cat").

Conclusion

The Dynamic Loss Network effectively bridges the training-evaluation gap in video captioning. By treating non-differentiable metrics as a regression problem for a proxy network, the authors provide a generalizable strategy to boost performance across various architectures. Future work may involve extending this "proxy loss" approach to other sequence-to-sequence tasks like machine translation and image captioning.

Summary updated

BibTeX
@misc{ullah2021boosting,
  author = {Nasib Ullah and Partha Pratim Mohanta},
  title = {{Boosting Video Captioning with Dynamic Loss Network}},
  year = {2021},
  eprint = {2107.11707},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2107.11707},
}
Figure