DiffPhase: Generative Diffusion-Based STFT Phase Retrieval

Tal Peer, Simon Welker, Timo Gerkmann

TL;DR

DiffPhase is a new generative approach that uses diffusion probabilistic models to solve the "phase retrieval" problem in speech processing. By treating the absence of phase information as a data imputation task, the model reconstructs high-quality speech from magnitude-only spectrograms, significantly outperforming both classical iterative methods and recent deep-learning baselines.

What Problem Does This Paper Address?

When we process audio, we usually convert it from a one-dimensional waveform into a two-dimensional "spectrogram" using the Short-Time Fourier Transform (STFT). This representation has two parts: magnitude (how loud each frequency is) and phase (the timing/alignment of those frequencies).

Historically, researchers focused on magnitude because it’s easier to visualize and manipulate. However, to turn a spectrogram back into audible sound, you need both. If the phase is missing or corrupted—a common issue in speech synthesis or enhancement—the resulting audio sounds "robotic" or "blurry." Traditional solutions like the Griffin-Lim Algorithm (GLA) are iterative and often get stuck in local optima, leading to audible artifacts. This paper tackles the challenge of generating a physically "consistent" and perceptually high-quality phase spectrogram given only the magnitude.

Methods

The authors propose DiffPhase, which leverages the power of Score-based Diffusion Models.

  1. The Forward Process: Instead of just adding white noise to an image (as in DALL-E or Midjourney), the authors define a "corruption" process where phase information is gradually lost. They use a specific type of Stochastic Differential Equation (SDE) called the Ornstein-Uhlenbeck Variance Exploding (OUVE) SDE.
  2. The Reverse Process (The "Magic"): A Deep Neural Network (DNN) is trained to estimate the "score function"—essentially a map that points from noisy, phase-less data back toward the distribution of clean, structured speech.
  3. Architecture: They use the NCSN++ architecture, a sophisticated U-Net variant equipped with attention modules. The network takes the current noisy state and the known magnitude spectrogram as inputs.
  4. Magnitude Enforcement: Since the magnitude is known and fixed, the authors perform a final "projection" step after the diffusion process to ensure the generated phase perfectly matches the original magnitude before converting back to audio.

Datasets

  • Training: A subset of the Voice Bank corpus, featuring 28 speakers and approximately 400 utterances each, downsampled to 16 kHz.
  • Evaluation: The WSJ0 (Wall Street Journal) corpus (specifically the si_et_05 test set). This ensures the model is tested on speakers it hasn't heard during training.

Key Insights and Ideas

  • Phase Retrieval as Imputation: The core "aha moment" is reframing phase retrieval not as a mathematical optimization problem, but as a generative imputation task. Diffusion models are world-class at "filling in the blanks," making them a natural fit for missing phase data.
  • Implicit Consistency: STFTs are redundant; not every combination of magnitude and phase corresponds to a real-world signal (a property called "consistency"). While classical methods force consistency through math, DiffPhase learns the underlying structure of consistent speech signals from data.
  • Quality vs. Computation Trade-off: The performance of the model is directly tied to the number of steps ($N$) in the reverse process. The authors show that with as few as 20 steps, the model already surpasses existing state-of-the-art methods.

Key Results

The researchers evaluated the audio using PESQ (a measure of speech quality) and ESTOI (a measure of intelligibility).

  • Superior Quality: DiffPhase achieved a PESQ score of over 4.5 (near-perfect) with $N=20$ steps. For comparison, the classical Griffin-Lim algorithm (GLA) plateaued around 4.4, and the recent deep-learning baseline (DeGLI) stayed below 4.45.
  • Efficiency: While diffusion models are often criticized for being slow, the authors demonstrated that DiffPhase-small (a lighter version) still outperforms the baselines while running near real-time on a modern GPU.
  • Saturation: Unlike some baselines that continue to improve slowly with more iterations, DiffPhase's performance saturates quickly, meaning you don't need hundreds of steps to get excellent results.

Limitations and Future Work

  • SDE Solver: The authors used a simple Euler-Maruyama solver for the SDE. They acknowledge that more advanced numerical solvers could potentially produce even better results or allow for fewer steps.
  • Clean Magnitude Assumption: This study assumed the magnitude spectrogram was perfectly clean. In many real-world applications (like noise reduction), the magnitude itself might be an estimate. Testing how DiffPhase handles "noisy" magnitude inputs is a clear next step.
  • Computational Load: Although "near real-time," the model still requires a capable GPU, which might limit its use in low-power mobile or edge devices compared to simpler mathematical heuristics.

Summary updated

BibTeX
@inproceedings{peer2023diffphase,
  author = {Tal Peer and Simon Welker and Timo Gerkmann},
  title = {{DiffPhase: Generative Diffusion-Based STFT Phase Retrieval}},
  booktitle = {IEEE International Conference on Acoustics, Speech and Signal Processing},
  year = {2023},
  url = {https://openreview.net/forum?id=GdKUeZ3n8j},
}
Figure