SpecAugment++: A Hidden Space Data Augmentation Method for Acoustic Scene Classification

Helin Wang, Yuexian Zou, Wenwu Wang

Abstract

In this paper, we present SpecAugment++, a novel data augmentation method for deep neural networks based acoustic scene classification (ASC). Different from other popular data augmentation methods such as SpecAugment and mixup that only work on the input space, SpecAugment++ is applied to both the input space and the hidden space of the deep neural networks to enhance the input and the intermediate feature representations. For an intermediate hidden state, the augmentation techniques consist of masking blocks of frequency channels and masking blocks of time frames, which improve generalization by enabling a model to attend not only to the most discriminative parts of the feature, but also the entire parts. Apart from using zeros for masking, we also examine two approaches for masking based on the use of other samples within the mini-batch, which helps introduce noises to the networks to make them more discriminative for classification. The experimental results on the DCASE 2018 Task1 dataset and DCASE 2019 Task1 dataset show that our proposed method can obtain 3.6% and 4.7% accuracy gains over a strong baseline without augmentation (i.e. CP-ResNet) respectively, and outperforms other previous data augmentation methods.

Introduction

Acoustic Scene Classification (ASC)—the task of identifying environments like "airport," "park," or "metro station" from audio—is a cornerstone of machine hearing. While deep learning models like CNNs have mastered this task, they are notoriously data-hungry. In the ASC community, datasets are often small, leading to overfitting, where a model memorizes the training data instead of learning generalizable acoustic patterns.

Existing solutions like SpecAugment (which masks blocks of time and frequency in the input spectrogram) or Mixup (which blends two different audio samples) help, but they typically only operate on the raw input. SpecAugment++ addresses this by augmenting the "hidden space"—the intermediate feature representations inside the neural network.

Methodology

The authors introduce SpecAugment++, which applies time and frequency masking not just to the input log-mel spectrogram (Layer 0), but also to the hidden states (Layers 1-4) of a residual network (CP-ResNet). The core of the method involves three different masking schemes:

1. Zero-value Masking (ZM)

The traditional approach where selected blocks of time frames or frequency channels are set to zero. This forces the model to find alternative discriminative features by removing information.

Algorithm for Zero-value Masking (ZM)

2. Mini-batch Mixture Masking (MM)

Instead of zeroing out a block, the researchers fill it with the average of the target sample and a random sample from the same mini-batch. This introduces "informative noise" that forces the network to learn more robust features.

Algorithm for Mini-batch Mixture Masking (MM)

3. Mini-batch Cutting Masking (CM)

The selected block is completely replaced by the corresponding block from another sample in the mini-batch (a "cut-and-paste" approach in the feature space). Unlike Mixup, SpecAugment++ does not change the ground-truth label of the sample, leading to more stable training.

Experiments and Results

The method was evaluated on two gold-standard benchmarks: DCASE 2018 Task 1a (~17 hours of training data) and DCASE 2019 Task 1a (~40 hours). Both consist of 10-second urban audio clips across 10 scene classes. Using CP-ResNet as the baseline, SpecAugment++ was compared against other state-of-the-art augmentation methods:

Method DCASE 18 Accuracy DCASE 19 Accuracy
No Augmentation (Baseline) 74.3% 78.9%
SpecAugment (Input only) 74.9% 79.1%
Mixup 75.5% 79.3%
SpecAugment++ (MM) 77.0% (+2.7%) 82.6% (+3.7%)

Overall, SpecAugment++ (MM) provided a 3.6% to 4.7% absolute accuracy gain over the baseline and consistently outperformed SpecAugment, Mixup, and BC Learning.

Discussion and Key Insights

  • Hidden Space is Key: Augmenting intermediate layers provides a stronger regularization effect than input augmentation alone, preventing the network from becoming overly reliant on specific high-level features.
  • The Power of "Informative Noise": The MM and CM schemes outperformed standard ZM. By using data from other samples as noise, the network learns to ignore interference while focusing on the underlying scene.
  • MM is the "Sweet Spot": Mixture Masking (MM) was the top performer. It retains some information from the target sample while introducing external interference, making it a more natural deformation than the abrupt changes in CM or ZM.
  • Layer Sensitivity: Augmenting layers closer to the input is particularly effective, though the best results come from applying the method across all layers.

Conclusion

SpecAugment++ demonstrates that hidden space augmentation is a powerful tool for improving ASC performance. While performance is sensitive to the masking ratio (optimal at ~10%), the method significantly enhances generalization. Future work may explore its application to other architectures like Transformers and investigate additional geometric deformations in the hidden space.

Summary updated

BibTeX
@inproceedings{wang2021specaugment,
  author = {Helin Wang and Yuexian Zou and Wenwu Wang},
  title = {{SpecAugment++: A Hidden Space Data Augmentation Method for Acoustic Scene Classification}},
  booktitle = {Interspeech},
  year = {2021},
  url = {https://openreview.net/forum?id=XOOu9SRD10},
}
Figure