Abstract
The Audio Captioning Transformer (ACT) introduces a convolution-free approach to automated audio captioning. By treating log mel-spectrograms as sequences of patches and utilizing a full Transformer encoder-decoder architecture, ACT overcomes the local bias of CNNs and the long-range dependency issues of RNNs. Through a multi-stage transfer learning process involving ImageNet and AudioSet, the model achieves state-of-the-art results on the AudioCaps dataset, demonstrating the power of global attention and cross-modal pre-training for sound understanding.
Introduction
Automated Audio Captioning (AAC) is the task of generating natural language descriptions for audio clips, such as "a dog barks while a car passes by." This cross-modal challenge requires a model to identify specific audio events while simultaneously understanding their spatial and temporal relationships.
Historically, researchers have relied on Recurrent Neural Networks (RNNs) or Convolutional Neural Networks (CNNs) as encoders. However, these architectures possess inherent limitations: RNNs struggle with long-range dependencies in audio signals, and CNNs are local operators that require very deep, overfit-prone networks to capture global context. The Audio Captioning Transformer (ACT) addresses these issues by adopting a purely sequence-to-sequence Transformer architecture.
Methods and Architecture
ACT is entirely "convolution-free," treating audio features as a sequence of discrete units.
- The Encoder: The model takes a log mel-spectrogram and splits it into small, non-overlapping patches along the time axis. These patches are flattened and projected into an embedding space. To represent the entire clip, a global "class token" (
[CLS]) is added. Since Transformers lack an inherent sense of sequence order, positional embeddings are incorporated. - The Decoder: A standard Transformer decoder predicts words autoregressively. It utilizes masked self-attention to maintain causality and cross-attention to attend to the encoder's audio features.
Transfer Learning Pipeline
Because Transformers are data-hungry, the authors implement a three-step training strategy to overcome the relatively small size of audio captioning datasets:
- Step 1: Initialize the encoder with weights from a Data-efficient image Transformer (DeiT) pre-trained on ImageNet.
- Step 2: Pre-train the encoder on AudioSet for a large-scale audio tagging task.
- Step 3: Fine-tune the full encoder-decoder stack on the target AudioCaps dataset.
Key Results
The authors evaluated three variants (Small, Medium, Large) against established baselines like RNN-RNN and CNN-Transformer hybrids.
- State-of-the-Art Performance: The ACT-m (Medium) model achieved a BLEU@4 of 0.259 and a METEOR of 0.222. On the SPIDEr metric—the standard ranking metric for audio captioning—the ACT-l (Large) model achieved a score of 0.420, which is highly competitive with complex hybrid models.
- The Power of Pre-training: Ablation studies highlighted the necessity of the transfer learning pipeline. Moving from training "from scratch" to using AudioSet pre-training resulted in a massive performance jump, with the SPIDEr score increasing from 0.314 to 0.413 for the medium model.
- Efficiency: ACT is faster to train than hybrid models. In experiments, ACT required less than 5 minutes per epoch, compared to 7 minutes for "CNN + Transformer" approaches.
Key Insights and Discussion
ACT demonstrates that global context is beneficial from the start. Unlike CNNs, which build a global view layer-by-layer through downsampling, the Transformer's self-attention allows every audio patch to attend to every other patch from the very first layer. This is particularly effective for capturing relationships between sounds that occur far apart in time.
Furthermore, the success of the DeiT initialization suggests a significant cross-modal synergy between computer vision and audio processing. Even though images and spectrograms differ in channel count, the model generalizes effectively across domains.
Limitations and Future Work
Despite its success, the model remains limited by the scarcity of audio captioning data compared to image or text datasets. Additionally, the current implementation uses fixed-size patches and 10-second clips. Future research may focus on adapting ACT to handle variable-length audio clips more flexibly and exploring the model's sensitivity to decoder hyper-parameters, such as the number of layers and attention heads.
Summary updated