Weakly labelled AudioSet Classification with Attention Neural Networks

Qiuqiang Kong, Changsong Yu, Turab Iqbal, Yong Xu, Wenwu Wang, Mark D. Plumbley

Abstract

Audio tagging is the task of predicting the presence or absence of sound classes within an audio clip. Previous work in audio tagging focused on relatively small datasets limited to recognising a small number of sound classes. We investigate audio tagging on AudioSet, which is a dataset consisting of over 2 million audio clips and 527 classes. AudioSet is weakly labelled, in that only the presence or absence of sound classes is known for each clip, while the onset and offset times are unknown. To address the weakly-labelled audio tagging problem, we propose attention neural networks as a way to attend the most salient parts of an audio clip. We bridge the connection between attention neural networks and multiple instance learning (MIL) methods, and propose decision-level and feature-level attention neural networks for audio tagging. We investigate attention neural networks modeled by different functions, depths and widths. Experiments on AudioSet show that the feature-level attention neural network achieves a state-of-the-art mean average precision (mAP) of 0.369, outperforming the best multiple instance learning (MIL) method of 0.317 and Google's deep neural network baseline of 0.314. In addition, we discover that the audio tagging performance on AudioSet embedding features has a weak correlation with the number of training samples and the quality of labels of each sound class.

Introduction: The Challenge of Weakly Labelled Audio

Traditional audio recognition systems often rely on "strongly labelled" data, where every sound event is annotated with precise onset and offset timestamps. However, the cost of manually labeling millions of seconds of audio is prohibitive. This has led to the rise of Weakly Labelled Data (WLD), exemplified by Google’s AudioSet. In WLD, a 10-second clip might be tagged with "music" or "dog bark," but the system is not informed where within that duration the sound occurs.

The core challenge in WLD is label assignment. If a target sound event, such as a dog bark, occupies only a small fraction of the clip, a standard classifier might inadvertently learn features from irrelevant background noise or silence. To mitigate this, we propose a model that can automatically "attend" to the most salient segments of an audio clip while ignoring non-informative parts.

Methodology: Attention as a Pooling Mechanism

We frame audio tagging as a Multiple Instance Learning (MIL) problem, where an audio clip is treated as a "bag" and its constituent short segments are "instances." We propose two primary attention-based architectures to aggregate these instances:

  1. Decision-level Attention: The model generates a prediction for every segment. An attention function then calculates a weight for each segment's prediction, and the final clip-level tag is a weighted average of these individual decisions.
  2. Feature-level Attention: Instead of weighting class predictions, the model weights the underlying feature embeddings of the segments. These weighted features are aggregated into a single representative vector for the entire clip before a final classification layer is applied.
Architectures for decision-level (a) and feature-level (b, c) attention neural networks.

Our experiments explored various non-linear functions (ReLU, Sigmoid, Softmax) for modeling attention weights and investigated the impact of network depth and width on performance. We found that feature-level attention is generally superior because it avoids the information bottleneck inherent in collapsing features into class predictions too early.

Dataset and Features

The study utilizes AudioSet, a massive-scale dataset containing over 2 million 10-second audio clips across 527 hierarchical sound classes. To focus on temporal aggregation logic rather than low-level signal processing, we use VGGish bottleneck features—128-dimensional embeddings extracted by a pre-trained VGG-like convolutional network.

Results and the "Data Paradox"

The proposed feature-level attention model achieved a state-of-the-art mean Average Precision (mAP) of 0.369, significantly outperforming Google’s original deep neural network baseline (0.314) and the best standard MIL method (0.317).

Distribution of training samples and average precision (AP) across various sound classes in AudioSet.

An interesting finding is the "Data Paradox": there is only a weak correlation between the number of training samples and the final performance (mAP) for specific classes. As shown in the performance distribution, some sounds are inherently more difficult to distinguish, or their labels in AudioSet are noisier. Consequently, increasing data volume does not always lead to linear improvements in accuracy. We also observed that a 3-layer embedding mapping provided the best results, suggesting that while depth helps with domain adaptation, excessive depth can lead to overfitting on bottleneck features.

Conclusion and Future Work

While our attention models excel at audio tagging, they were not explicitly designed for localization (Sound Event Detection). However, the attention weights naturally provide a temporal "heat map" of sound events. Future research will focus on extending these mechanisms to provide precise onset and offset times and developing methods to better handle the inherent label noise in massive, crowdsourced datasets like AudioSet.

Summary updated

Abstract

Audio tagging is the task of predicting the presence or absence of sound classes within an audio clip. Previous work in audio tagging focused on relatively small datasets limited to recognising a small number of sound classes. We investigate audio tagging on AudioSet, which is a dataset consisting of over 2 million audio clips and 527 classes. AudioSet is weakly labelled, in that only the presence or absence of sound classes is known for each clip, while the onset and offset times are unknown. To address the weakly-labelled audio tagging problem, we propose attention neural networks as a way to attend the most salient parts of an audio clip. We bridge the connection between attention neural networks and multiple instance learning (MIL) methods, and propose decision-level and feature-level attention neural networks for audio tagging. We investigate attention neural networks modeled by different functions, depths and widths. Experiments on AudioSet show that the feature-level attention neural network achieves a state-of-the-art mean average precision (mAP) of 0.369, outperforming the best multiple instance learning (MIL) method of 0.317 and Google's deep neural network baseline of 0.314. In addition, we discover that the audio tagging performance on AudioSet embedding features has a weak correlation with the number of training samples and the quality of labels of each sound class.
BibTeX
@article{kong2019weakly,
  author = {Qiuqiang Kong and Changsong Yu and Turab Iqbal and Yong Xu and Wenwu Wang and Mark D. Plumbley},
  title = {{Weakly labelled AudioSet Classification with Attention Neural Networks}},
  journal = {IEEE ACM Trans. Audio Speech Lang. Process.},
  year = {2019},
  doi = {10.1109/taslp.2019.2930913},
}
Figure