TL;DR
Diffusion models for audio generation are high-quality but slow. This paper introduces InferGrad, a method that integrates the fast inference process directly into the model's training. This allows InferGrad to achieve comparable or better audio quality with significantly fewer inference steps, making diffusion models more practical for real-time applications.
What Problem Does This Paper Address?
Denoising Diffusion Probabilistic Models (DDPMs) have emerged as a powerful class of generative models, achieving state-of-the-art results in high-fidelity audio synthesis (vocoding). However, a major drawback of these models is their slow inference speed. This is because generating an audio sample requires a large number of sequential denoising steps, often matching the number of steps used during training. While previous work has focused on optimizing the inference schedule (i.e., how the noise is removed at each step) to speed up generation, this often comes at the cost of reduced audio quality. The core issue is that the inference process is optimized independently from the training process, leading to a suboptimal trade-off between speed and quality.
Methods
InferGrad tackles this problem by incorporating the inference process directly into the training objective. The key innovation is the introduction of an "infer loss" ($L_1$). During training, instead of just optimizing the standard diffusion loss ($L_D$), InferGrad also generates audio samples using a reduced number of inference steps (N << T, where T is the total diffusion steps) and imposes a loss that minimizes the difference between these generated samples and the ground truth audio.
Specifically, the infer loss ($L_1$) is designed to capture both the amplitude and phase information of the audio waveform. The authors use a multi-resolution Short-Time Fourier Transform (STFT) loss, which is computed on mel-scaled log STFT magnitudes and STFT phase spectra. By minimizing this infer loss, the model is trained to produce high-quality audio even when using a small number of inference steps. The overall training objective becomes $L = L_D + \lambda L_1$, where $\lambda$ is a weighting factor.
Furthermore, InferGrad aims to make the model more robust to the choice of inference schedule. Instead of relying on a single, pre-defined inference schedule, the authors suggest incorporating a range of possible inference schedules into the infer loss during training. This encourages the model to learn to perform well across various fast inference settings.
Datasets
The experiments were conducted on the LJSpeech dataset, a widely used benchmark for text-to-speech synthesis. This dataset contains approximately 24 hours of audio from a single female speaker. The authors used a standard split for training and testing, with a portion of the dataset also used for searching optimal inference schedules for the baseline models.
Key Insights and Ideas
- Joint Optimization is Key: The most significant insight is that decoupling training and inference schedules leads to a quality-speed trade-off. By jointly optimizing for both, InferGrad can achieve high quality with fast inference.
- Inferring during Training: The core idea of "inferring during training" is novel. It directly addresses the bottleneck of slow inference by making the model learn to be fast from the start.
- Phase Information Matters: The ablation study highlights the importance of including phase information in the infer loss. Simply optimizing magnitude loss is insufficient for human-perceived audio quality, as it can lead to artifacts.
- Robustness to Schedules: InferGrad's ability to be trained with a range of inference schedules makes it less sensitive to the specific choice of schedule during inference, simplifying the deployment process.
Key Results
- Improved Quality at Fewer Steps: InferGrad consistently outperforms the baseline WaveGrad in terms of Mean Opinion Score (MOS) when using fewer inference steps. For example, with just 2 inference steps, InferGrad achieves a MOS of 3.69 ± 0.08, compared to WaveGrad's 3.12 ± 0.10 with 2 steps.
- Significant Speedup: InferGrad achieves comparable voice quality to WaveGrad but with a substantial speedup. The paper reports a 3x speedup, achieving the same voice quality as WaveGrad with 6 iterations using only 2 iterations.
- Objective Metrics Improvement: Objective metrics like LS-MSE, MRSTFT, PESQ, and STOI also show improvements for InferGrad across different numbers of inference steps. For instance, with 2 steps, InferGrad's LS-MSE is 0.202, significantly lower than WaveGrad's 0.591.
- Model Sensitivity: InferGrad is shown to be more robust to the choice of inference schedule compared to WaveGrad, especially at very few inference steps. This is demonstrated by the lower standard deviation in L1 loss for InferGrad across different schedules.
Limitations and Future Work
- Training Time: The paper acknowledges that incorporating the inference process into training increases the overall training time.
- General Model Robustness: While the "general model" trained with a range of schedules performed well, it was slightly lower in CMOS score for N=6 compared to a model specifically fine-tuned for 6 steps. However, the difference was not statistically significant.
- Future Directions: The authors suggest several avenues for future research:
- Exploring other sample quality evaluation metrics for the infer loss, such as latent space distances.
- Carefully selecting the training noise schedule, especially when aiming for fast sampling.
- Improving the network architecture to further enhance noise estimation capabilities.
Summary updated