Deep Convolutional and Recurrent Networks for Polyphonic Instrument Classification from Monophonic Raw Audio Waveforms

Kleanthis Avramidis, Agelos Kratimenos, Christos Garoufis, Athanasia Zlatintsi, Petros Maragos

This paper, recently published by researchers at the National Technical University of Athens, explores a shift in how AI "listens" to music. Instead of converting sound into visual spectrograms—the standard approach for decades—the authors demonstrate that deep learning models can identify musical instruments by looking directly at the raw, wiggly lines of audio waveforms.

TL;DR

Researchers developed a lightweight "CRNN" (Convolutional Recurrent Neural Network) that classifies musical instruments in polyphonic recordings using only raw audio waveforms. Their model achieves state-of-the-art results on the IRMAS dataset while using 20 times fewer parameters than previous top-performing models.

What Problem Does This Paper Address?

Traditionally, Audio Signal Processing relies on time-frequency representations like spectrograms or Constant-Q Transforms (CQT). These act as "visual maps" of sound, making it easier for standard image-recognition AI to process audio. However, creating these representations is computationally expensive and requires manual "feature engineering"—deciding beforehand which frequencies matter most.

The challenge is even greater in polyphonic music, where multiple instruments play simultaneously. Overlapping frequencies make it difficult to distinguish a violin from a cello or a flute. This paper asks: Can we skip the spectrogram step and let a neural network learn the features directly from the raw, high-dimensional, and noisy 1D waveform?

Methods

The authors experimented with several architectures to find the optimal balance between accuracy and efficiency:

  • 1D Convolutional Neural Networks (CNN): Unlike 2D CNNs used for images, these use 1D filters to slide across the audio signal, capturing local patterns like the "attack" of a note.
  • Fully Convolutional Networks (FCN): By replacing traditional "Dense" (fully connected) layers with Global Average Pooling, they drastically reduced the number of trainable parameters while preserving the spatial locality of audio features.
  • Residual Connections (RFCN): They added "skip connections" (similar to ResNet) to allow low-level signal information to flow deeper into the network without being lost.
  • The Hybrid CRNN: Their best-performing model (CRNN) combines the spatial feature extraction of CNNs with Bidirectional Gated Recurrent Units (BiGRU). The BiGRU layers are specifically designed to handle the long-term temporal dependencies in music—essentially "remembering" the context of a melody over time.

Datasets

The study utilized the IRMAS (Instrument Recognition in Musical Audio Signals) dataset:

  • Training: 6,705 three-second snippets of monophonic (single instrument) audio.
  • Testing: 2,355 polyphonic tracks (multiple instruments) ranging from 5 to 20 seconds.
  • Classes: 11 predominant instruments, including cello, flute, piano, saxophone, and human voice.

Key Insights and Ideas

  • The "Brass" Advantage: One of the most surprising findings was that raw waveforms significantly outperformed spectrograms for brass and woodwind instruments. For example, the F1-score for the clarinet improved by 14% when using waveforms. The authors suggest that waveforms better capture the specific temporal "signature" of wind instruments that gets blurred in frequency-domain representations.
  • Less is More: Moving from a standard Deep CNN (DCNN) to a Fully Convolutional Network (FCN) reduced parameters from 1.14M to just 81.8K while actually increasing accuracy. This suggests that dense layers often introduce unnecessary noise or overfit when dealing with raw audio.
  • Optimal Integration: They found that the best place to "inject" the recurrent (BiGRU) units was after the third convolutional cell. This allows the CNN to first simplify the high-dimensional waveform into meaningful mid-level features before the RNN attempts to model the temporal sequence.

Key Results

The proposed Residual FCN-BiGRU model set a new benchmark for waveform-based classification:

  • Performance: Achieved an F1-macro score of 0.543, surpassing previous state-of-the-art models (which scored around 0.506).
  • Efficiency: The model uses only 1.07 million parameters. For comparison, the authors' previous top-performing model used 24.3 million parameters.
  • Robustness: The model maintained high Label Ranking Average Precision (LRAP) of ~74.7%, proving it is highly effective at ranking the correct instruments even in complex mixes.

Limitations and Future Work

Despite the success with brass instruments, the model still struggles with percussive and harmonic instruments like the piano and acoustic guitar. These instruments are currently better served by CQT spectrograms, likely because their identity is more tied to specific frequency relationships than temporal wave shapes.

Future directions include: * Exploring better ways to fuse waveform and spectrogram data (multi-modal learning). * Improving the model's robustness to background noise, which is heavily present in raw recordings. * Investigating "Attention" mechanisms to help the model focus on specific instruments within a dense polyphonic mix.

Summary updated

BibTeX
@inproceedings{avramidis2021deep,
  author = {Kleanthis Avramidis and Agelos Kratimenos and Christos Garoufis and Athanasia Zlatintsi and Petros Maragos},
  title = {{Deep Convolutional and Recurrent Networks for Polyphonic Instrument Classification from Monophonic Raw Audio Waveforms}},
  booktitle = {IEEE International Conference on Acoustics, Speech and Signal Processing},
  year = {2021},
  url = {https://openreview.net/forum?id=eNtLKqYFYV},
}

Loading related content...

Figure