Automated Audio Captioning with Recurrent Neural Networks

Konstantinos Drossos, Sharath Adavanne, Tuomas VirtanenarXiv 2017

TL;DR

This paper introduces the first automated audio captioning system, moving beyond simple audio tagging to generate full textual descriptions of soundscapes. By leveraging an encoder-decoder recurrent neural network with an attention mechanism, the model successfully translates raw audio features into descriptive sentences. While the system accurately identifies key acoustic elements, mastering the exact word order and syntax remains an open challenge.

What Problem Does This Paper Address?

While computer vision has made massive strides in automatically captioning images and videos, the audio domain has lagged behind. Existing audio analysis methods typically focus on Sound Event Detection (SED) (identifying what happened and when, like a dog barking from second 2 to 4) or audio tagging (assigning static labels like "nature" or "indoor").

However, these methods fail to capture the rich, contextual relationships within a soundscape. Automated audio captioning aims to bridge this gap by generating human-like textual descriptions (e.g., "large flock off and flying away" or "domestic clock striking five"). The core challenge lies in cross-modal translation: mapping continuous, variable-length acoustic features to discrete, syntactically structured natural language tokens.

Methods

The authors propose an end-to-end neural network architecture based on the sequence-to-sequence framework commonly used in machine translation.

Fig. 1. Illustration of the presented neural network.

The pipeline consists of three main components:

  1. Audio Feature Extraction: Raw audio files are segmented using a 46 ms Hamming window with 50% overlap. From each frame, 64 log mel-band energies are extracted to form the input feature matrix.
  2. The Encoder: A three-layered, bi-directional Gated Recurrent Unit (GRU) processes the audio features. To improve gradient flow, a residual connection is integrated between the second and third layers. The bi-directional nature allows the network to capture both past and future acoustic context.
  3. The Attention (Soft Alignment) Mechanism: A fully connected layer with a softmax activation acts as an attention mechanism. It dynamically weights different parts of the encoder's hidden states, allowing the decoder to focus on specific acoustic events when generating each word.
  4. The Decoder: A two-layered GRU takes the attention-weighted context vector and predicts the caption word-by-word. A final fully connected layer with softmax activation outputs a probability distribution over the vocabulary to select the most likely next word.

Datasets

The model was trained and evaluated using the ProSound Effects (PSE) Library, a commercial sound effects dataset containing roughly 175,000 recordings.

Because the raw data was highly inconsistent, the authors applied rigorous preprocessing:

  • Audio was standardized to 44.1 kHz, 16-bit, single-channel format.
  • Text captions were cleaned using spell-checkers (Enchant and GNU-Aspell) to fix typographic errors, and punctuation was removed.
  • To prevent the network from simply memorizing specific sound-caption pairs, the dataset split (60% training, 20% validation, 20% testing) ensured that no identical captions overlapped between the splits.
  • The final filtered subset comprised 14,692 recordings with a vocabulary of 633 unique words, capped at a maximum caption length of 10 words.

Key Insights and Ideas

  • Acoustic Ambiguity: The authors highlight a fascinating hurdle unique to audio: semantic ambiguity. For instance, the model predicted "field dark" for an audio clip originally captioned "electric hum deep." In audio production, completely different physical sources can sound identical (e.g., crinkling plastic simulating a roaring fire), making context-free captioning inherently subjective.
  • Vocabulary vs. Syntax: The model proved highly capable of identifying the correct words associated with an audio file, but frequently struggled to arrange them in the correct order. This indicates that while the acoustic-to-semantic mapping is functioning, the model lacks a strong internal language model to govern syntax.
  • Proof of Learning: By testing the network against baselines using completely random inputs and random words, the authors proved that the network genuinely learned to process acoustic features rather than exploiting statistical shortcuts in the text data.

Key Results

The system was evaluated using standard machine translation and image captioning metrics, including BLEU, ROUGE_L, METEOR, and CIDEr.

Table 1. Obtained results for the evaluation metrics

As shown in Table 1, the proposed method significantly outperforms both the random word baseline and the random input baseline across all metrics. The model achieved a $BLEU_1$ score of 0.191 and a CIDEr score of 0.526. The rapid drop from $BLEU_1$ (0.191) to $BLEU_4$ (0.094) quantitatively confirms that while individual words are often predicted accurately, longer multi-word phrases (n-grams) match less frequently due to ordering errors.

Limitations and Future Work

As the pioneering work in this sub-field, the system has clear limitations:

  • Length Mismatch: Over 56% of the generated captions were shorter than the ground truth, indicating the model struggles with longer, more descriptive sequences.
  • Lack of Syntactic Structure: The PSE dataset itself consists largely of keywords rather than proper, grammatically correct sentences, which limits the model's ability to learn natural syntax.

To address these issues, the authors suggest that future iterations should incorporate dedicated language models (to improve sentence structure), explore architectures that better handle varying audio-text lengths, and utilize datasets that provide multiple human-authored captions per audio file.

Summary updated

Abstract

We present the first approach to automated audio captioning. We employ an encoder-decoder scheme with an alignment model in between. The input to the encoder is a sequence of log mel-band energies calculated from an audio file, while the output is a sequence of words, i.e. a caption. The encoder is a multi-layered, bi-directional gated recurrent unit (GRU) and the decoder a multi-layered GRU with a classification layer connected to the last GRU of the decoder. The classification layer and the alignment model are fully connected layers with shared weights between timesteps. The proposed method is evaluated using data drawn from a commercial sound effects library, ProSound Effects. The resulting captions were rated through metrics utilized in machine translation and image captioning fields. Results from metrics show that the proposed method can predict words appearing in the original caption, but not always correctly ordered.
BibTeX
@misc{drossos2017automated,
  author = {Konstantinos Drossos and Sharath Adavanne and Tuomas Virtanen},
  title = {{Automated Audio Captioning with Recurrent Neural Networks}},
  year = {2017},
  eprint = {1706.10006},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/1706.10006},
}

Loading related content...

Figure