Performance and Complexity Trade-off Optimization of Speech Models During Training
Esteban Gómez, Tom Bäckström
TL;DR
This work tackles the problem of balancing model performance with computational cost during training by introducing differentiable feature noise injection and dynamic complexity layers that adjust network capacity in real time. By defining Dynamic, Adaptive, and Fixed Complexity Layers, the method enables SGD-based optimization to jointly tune accuracy and resource usage, consolidating to compact architectures for inference. Three case studies—synthetic filter banks, voice activity detection, and audio anti-spoofing—demonstrate substantial complexity reductions (up to ~84%) with minimal to substantial performance changes, including notable EER improvements in anti-spoofing. The approach yields practical benefits for on-device speech processing and can be combined with other efficiency techniques, with code openly available for further research.
Abstract
In speech machine learning, neural network models are typically designed by choosing an architecture with fixed layer sizes and structure. These models are then trained to maximize performance on metrics aligned with the task's objective. While the overall architecture is usually guided by prior knowledge of the task, the sizes of individual layers are often chosen heuristically. However, this approach does not guarantee an optimal trade-off between performance and computational complexity; consequently, post hoc methods such as weight quantization or model pruning are typically employed to reduce computational cost. This occurs because stochastic gradient descent (SGD) methods can only optimize differentiable functions, while factors influencing computational complexity, such as layer sizes and floating-point operations per second (FLOP/s), are non-differentiable and require modifying the model structure during training. We propose a reparameterization technique based on feature noise injection that enables joint optimization of performance and computational complexity during training using SGD-based methods. Unlike traditional pruning methods, our approach allows the model size to be dynamically optimized for a target performance-complexity trade-off, without relying on heuristic criteria to select which weights or structures to remove. We demonstrate the effectiveness of our method through three case studies, including a synthetic example and two practical real-world applications: voice activity detection and audio anti-spoofing. The code related to our work is publicly available to encourage further research.
