An Encoder-Decoder Based Audio Captioning System with Transfer and Reinforcement Learning

Xinhao Mei, Qiushi Huang, Xubo Liu, Gengyun Chen, Jingqian Wu, Yusong Wu, Jinzheng Zhao, Shengchen Li, Tom Ko, H. Tang, Xi Shao, Mark D. Plumbley, Wenwu Wang

Abstract

Automated Audio Captioning (AAC) is a cross-modal task that requires generating human-like textual descriptions for audio clips. This paper describes a high-performing AAC system developed for the DCASE 2021 Task 6 challenge. The proposed architecture combines a 10-layer Convolutional Neural Network (CNN) encoder with a Transformer decoder. To overcome data scarcity and the training-evaluation gap, the authors employ transfer learning from large-scale audio datasets and reinforcement learning (RL) using Self-Critical Sequence Training (SCST). The system achieved 3rd place overall and was the top-ranked non-ensemble submission, demonstrating the effectiveness of pre-trained audio encoders and metric-specific optimization.

Introduction

Automated Audio Captioning (AAC) bridges the gap between digital signal processing and natural language processing. Unlike audio tagging, which identifies discrete labels, AAC aims to describe the temporal relationships and environmental context of sounds (e.g., "a car engine idling followed by a horn honking").

The field faces two major hurdles:

  1. Data Scarcity: Audio captioning datasets like Clotho are significantly smaller than their image captioning counterparts, making it difficult to train deep models from scratch.
  2. The Training-Evaluation Gap: Standard training uses "Teacher Forcing" to minimize cross-entropy loss. However, evaluation relies on discrete metrics like CIDEr or SPIDEr. This mismatch, coupled with exposure bias during inference, often leads to sub-optimal performance.

System Architecture

The authors propose an encoder-decoder framework designed to extract rich acoustic features and generate coherent sequences.

Encoder

The encoder is a 10-layer CNN based on the Pre-trained Audio Neural Networks (PANNs) architecture. It processes Log Mel-spectrograms to produce high-level vector representations of the audio. Using a pre-trained encoder allows the model to leverage knowledge from massive datasets like AudioSet.

Decoder

A standard Transformer decoder is used for sequence generation. Transformers have become the state-of-the-art for such tasks due to their ability to model long-range dependencies through self-attention mechanisms.

The proposed CNN-Transformer architecture for automated audio captioning.

Training Strategies

To address the identified challenges, two primary strategies were implemented:

Transfer Learning

The model was not trained from scratch. The encoder was initialized with PANNs weights. Furthermore, the entire system underwent cross-modal pre-training on the AudioCaps dataset (~50k clips) before being fine-tuned on the target Clotho v2 dataset.

Reinforcement Learning (RL)

To bridge the gap between training objectives and evaluation metrics, the authors utilized Self-Critical Sequence Training (SCST). This RL technique fine-tunes the model to directly maximize the CIDEr score. By treating the generation process as a sequence of actions, the model receives a "reward" based on the quality of the entire generated caption compared to ground-truth references.

Experimental Results

The system was evaluated on the Clotho v2 benchmark. The results demonstrate that both transfer learning and RL contribute significantly to performance.

Comparison of performance across different model configurations and benchmarks.

As shown in the table, the baseline SPIDEr score of 0.226 was improved to 0.270 with PANNs pre-training and further to 0.305 after RL optimization. The final model (B+PANNs+AC+RL) outperformed several competitive systems, including the SJTU ensemble on several metrics.

Discussion: The "In the Background" Phenomenon

A notable qualitative finding was the impact of RL on language diversity. While RL significantly boosted CIDEr scores, it encouraged the model to adopt "safe" repetitive phrases. Specifically, the phrase "in the background" appeared in 765 generated captions after RL, compared to only 155 before RL and 302 in the ground-truth data. This suggests that the model learned to "game" the CIDEr metric by appending common, high-reward phrases, potentially at the cost of descriptive variety.

Conclusion

This work highlights the power of combining pre-trained audio encoders with reinforcement learning for AAC. While the system achieved state-of-the-art results for a single-model architecture, the findings also point to the limitations of current evaluation metrics. Future research should focus on developing metrics that better correlate with human judgment and exploring RL techniques that preserve linguistic diversity.

Summary updated

BibTeX
@inproceedings{mei2021encoder,
  author = {Xinhao Mei and Qiushi Huang and Xubo Liu and Gengyun Chen and Jingqian Wu and Yusong Wu and Jinzheng Zhao and Shengchen Li and Tom Ko and H. Tang and Xi Shao and Mark D. Plumbley and Wenwu Wang},
  title = {{An Encoder-Decoder Based Audio Captioning System with Transfer and Reinforcement Learning}},
  booktitle = {DCASE},
  year = {2021},
  url = {https://openreview.net/forum?id=W81RaJ10TnD},
}
Figure