Abstract
Traditional audio processing pipelines rely on fixed preprocessing steps, such as Mel-spectrogram conversion, based on human auditory perception. This study explores the benefits of "trainable basis functions," allowing neural networks to optimize the front-end filters for specific tasks. Results demonstrate that trainable front-ends significantly boost performance for shallow models—improving keyword spotting accuracy by up to 14.2 percentage points—and enhance robustness to spectral masking and data corruption.
Introduction
In audio neural networks, the front-end typically converts raw waveforms into time-frequency representations like Mel-spectrograms. These representations are often fixed, assuming that psychoacoustic models like the Mel scale are optimal for machine learning. This paper investigates whether letting the network learn its own basis functions improves performance and what these learned functions reveal about the underlying tasks.
Methods
The researchers evaluated two trainable front-end toolkits: nnAudio, which allows unconstrained updates to Short-Time Fourier Transform (STFT) and Mel basis functions, and FastAudio, which constrains Mel bases to triangular shapes with trainable positions. Four experimental settings were tested:
- A: Fixed Mel and STFT (Baseline).
- B: Trainable Mel bases only.
- C: Trainable STFT kernels only.
- D: Both Mel and STFT are trainable.
These front-ends were paired with a complex BC-ResNet and a Simple model (linear layer or LSTM) and evaluated on the Google Speech Commands v2 (Keyword Spotting - KWS) and TIMIT (Automatic Speech Recognition - ASR) datasets.
Key Results
The study found that trainable basis functions offer substantial gains, particularly for simpler architectures. For the "Simple" model in KWS, moving from fixed features (Setting A) to fully trainable features (Setting D) resulted in a 14.2 percentage point increase in accuracy. In ASR, the Phone Error Rate (PER) was lowered by 9.5 percentage points when using trainable Mel bases with a simple LSTM model.
Interestingly, the performance gap narrows as model complexity increases. Deep models like BC-ResNet are sufficiently expressive to extract necessary information even from suboptimal fixed features, whereas shallow models rely more heavily on optimized input representations.
Insights into Learned Features
Analysis of the trained filters revealed that the models often deviate significantly from the standard Mel scale. While Mel filters prioritize low frequencies, trained models frequently shifted attention toward higher frequency bins (above 125 STFT bins), suggesting these details are crucial for tasks like keyword spotting.
Furthermore, trainable front-ends exhibit "self-healing" properties. When specific frequency bands were masked during testing, trainable models adapted by increasing sensitivity to the remaining spectrum. For instance, when bins 216-240 were masked, a trainable model maintained 49.5% accuracy, compared to just 18.3% for a fixed-feature model.
Conclusion
Trainable basis functions provide a powerful mechanism for improving audio model performance and robustness, especially when using resource-constrained architectures. While the benefits are less pronounced for very deep networks, the learned filters offer valuable insights into the frequency components most relevant for specific audio tasks, potentially informing the design of better fixed features for edge devices.
Summary updated