SemanticAC: Semantics-Assisted Framework for Audio Classification

Yicheng Xiao, Yue Ma, Shuyan Li, Hantao Zhou, Ran Liao, Xiu Li · DOI

Introduction

In the field of audio classification, the standard paradigm has long relied on treating class labels as discrete, independent entities—typically represented as one-hot vectors. While effective for simple categorization, this approach fails to capture the inherent semantic relationships between different sounds. For instance, a "Car Horn" and "Engine Idling" share a common vehicle-related context that a one-hot encoding ignores, treating them as distinct from each other as they are from a "Bird Chirp."

SemanticAC addresses this limitation by treating labels as rich semantic text. By aligning audio signals with natural language descriptions through a specialized convolutional similarity module and contrastive learning, the framework achieves state-of-the-art performance on major environmental and urban sound benchmarks without requiring auxiliary visual data.

System Architecture

The SemanticAC framework is built upon three primary components designed to bridge the gap between acoustic signals and linguistic semantics.

1. Class Label Encoder

Rather than using raw integer labels, SemanticAC employs prompt engineering to convert labels into descriptive phrases. For example, the label "Siren" is transformed into the phrase "an audio clip of Siren." This text is then processed by a multi-layer Transformer-based text encoder, inspired by the CLIP architecture, to generate high-dimensional semantic vectors. This process ensures that the model leverages the pre-trained linguistic knowledge of large-scale language models.

2. Audio Signal Encoder

The audio processing pipeline utilizes a Hierarchical Token-Semantic Audio Transformer (HTS-AT). Audio signals are first converted into mel-spectrograms, which the HTS-AT then processes to capture complex acoustic patterns across varying temporal and frequency scales. The output is a sequence of "audio tokens" that represent the hierarchical structure of the sound.

3. Convolutional Similarity Calculation Module (CSCM)

The CSCM is the central innovation of the SemanticAC framework. Traditional multimodal alignment often relies on heavy, computationally expensive projection layers. In contrast, the CSCM uses a lightweight architecture featuring CNNs and a convolutional attention mechanism. By reshaping audio tokens into a 3D feature map, the module effectively captures local and global correlations before mapping them into the shared embedding space with the text vectors.

Methodology: Contrastive Learning

The framework is trained using a contrastive learning objective. This approach optimizes the model to minimize the distance between matching audio-text pairs in the embedding space while maximizing the distance between non-matching pairs. This "push-pull" dynamic forces the audio encoder to extract features that are not just discriminative for classification, but are also semantically aligned with the natural language descriptions provided by the label encoder.

Experimental Results

The researchers evaluated SemanticAC on two benchmark datasets: ESC-50 (environmental sounds) and US8K (UrbanSound8K).

Performance Benchmarks

SemanticAC established new state-of-the-art (SOTA) records across both datasets:

  • ESC-50: The model achieved an accuracy of 97.25%, outperforming established models such as AudioCLIP (97.15%) and the standalone HTS-AT (97%).
  • US8K: The model reached 91.34% accuracy, representing a significant improvement over AudioCLIP (90.07%) and EAT-M (90%).

Ablation Studies

Ablation experiments highlighted the importance of the CSCM. Integrating this module provided a 1.5% accuracy boost over a baseline that utilized text assistance but relied on standard linear projections for alignment. Furthermore, the study confirmed that expanded prompts (e.g., "an audio clip of...") consistently outperformed raw labels, suggesting that linguistic context is vital for anchoring semantic representations.

Discussion and Future Work

The success of SemanticAC demonstrates that "labels are data." By treating class names as semantic anchors, the model gains a more nuanced understanding of the audio domain. However, several avenues for future research remain. Currently, the framework relies on fixed prompt templates; exploring dynamic or automated prompt generation could further enhance performance. Additionally, while SemanticAC excels at single-source classification, future iterations could integrate multi-modal metadata or scale to more complex tasks such as multi-label audio tagging and automated audio captioning.

Conclusion

SemanticAC represents a significant step forward in audio classification by successfully porting the benefits of semantic text alignment to the audio domain. By replacing rigid one-hot vectors with fluid natural language embeddings and utilizing an efficient convolutional alignment module, the framework sets a new standard for accuracy and semantic depth in environmental sound recognition.

Summary updated

BibTeX
@inproceedings{xiao2023semanticac,
  author = {Yicheng Xiao and Yue Ma and Shuyan Li and Hantao Zhou and Ran Liao and Xiu Li},
  title = {{SemanticAC: Semantics-Assisted Framework for Audio Classification}},
  booktitle = {IEEE International Conference on Acoustics, Speech and Signal Processing},
  year = {2023},
  doi = {10.1109/icassp49357.2023.10096319},
}
Figure