DDSP: Differentiable Digital Signal Processing

Jesse H. Engel, Lamtharn Hantrakul, Chenjie Gu, Adam Roberts

TL;DR

DDSP (Differentiable Digital Signal Processing) is a library that integrates classic, interpretable signal processing elements—like oscillators and filters—directly into deep learning architectures. By making these components differentiable, the authors achieve high-fidelity audio synthesis with models that are 10 to 100 times smaller than standard neural vocoders, while offering unprecedented control and interpretability.

What Problem Does This Paper Address?

Generating high-quality audio with neural networks is notoriously difficult. Most current models (like WaveNet or GANs) operate in one of two ways: they either predict raw waveforms sample-by-sample or generate frequency-domain representations (spectrograms).

Limitations of standard audio generation approaches

Both approaches have major "blind spots." Sample-level generation is computationally expensive and ignores the periodic nature of sound, often struggling because waveforms that look different can sound identical to human perception. Spectrogram-based models often struggle with "spectral leakage" and phase alignment, leading to metallic or blurry artifacts. Crucially, these "black box" models ignore decades of knowledge from Digital Signal Processing (DSP) about how sound is physically produced and perceived. They are forced to "re-learn" the laws of acoustics from scratch, requiring massive datasets and parameter counts.

Methods

The core innovation is the DDSP library, which implements standard DSP modules as differentiable functions in a neural network. This allows gradients to flow through the synthesis process, meaning the network can learn to "play" a synthesizer to match a target sound.

DDSP Autoencoder Architecture

The authors demonstrate this using an Autoencoder architecture. An encoder extracts features like fundamental frequency ($f_0$), loudness, and a latent timbre vector ($z$). The decoder then maps these features to the time-varying parameters of the DSP modules (e.g., harmonic amplitudes and filter coefficients). Key components of the synthesis pipeline include:

  • Harmonic Oscillator: Generates a series of sine waves at integer multiples of a fundamental frequency ($f_0$).
  • Filtered Noise Synthesizer: Creates stochastic (unpitched) sounds by passing white noise through a time-varying FIR filter.
  • Differentiable Reverb: Models room acoustics using long impulse responses, implemented efficiently in the frequency domain.
  • Multi-Scale Spectral Loss: Instead of comparing raw waveforms, the model is trained to minimize the difference between spectrograms calculated at multiple time-frequency resolutions.

Datasets

The researchers evaluated DDSP on two primary datasets:

  1. NSynth: A standard large-scale dataset of musical notes from various instrument families (strings, brass, woodwinds, etc.).
  2. Solo Violin: A new, specialized dataset consisting of 13 minutes of expressive solo violin performances, providing a benchmark for high-fidelity, nuanced synthesis.

Key Insights and Ideas

  • Strong Inductive Biases: By forcing the model to use oscillators, the authors give it a "head start." It doesn't have to learn that musical notes are made of harmonics; that knowledge is baked into the architecture.
  • Interpretability by Design: Because the output is generated by a synthesizer, the intermediate parameters (like the loudness curve or harmonic distribution) are physically meaningful. You can look at the model's "internal thoughts" and understand why it sounds the way it does.
  • Disentanglement: The model naturally separates pitch ($f_0$), amplitude (loudness), and timbre ($z$). This allows for independent control—you can change the pitch of a recording without changing its speed or character.
  • Extrapolation: Unlike standard neural networks that fail on data they haven't seen, DDSP can synthesize pitches far outside its training range because it understands the underlying relationship between frequency and sound.

Key Results

  • Efficiency: DDSP models are remarkably tiny. A DDSP autoencoder with only ~6M parameters outperformed a 23M-parameter WaveRNN model. They even demonstrated a "Tiny" version (0.24M parameters) that still produced high-quality results.
  • Quality: In resynthesis tasks, DDSP achieved significantly lower error rates in pitch and loudness tracking compared to state-of-the-art baselines.
  • Timbre Transfer: The paper showcases a stunning application where a singing voice is converted into a violin in real-time. By extracting $f_0$ and loudness from the singer and passing them to a violin-trained DDSP model, the "performance" of the singer is mapped onto the "instrument" of the violin.
  • Blind Dereverberation: Because the reverb is a separate, modular component, the model can learn to "strip away" the room acoustics from a recording, effectively performing de-reverberation without being explicitly trained for it.

Limitations and Future Work

While powerful, the current DDSP implementation has some constraints:

  • Monophonic Focus: The experiments primarily focus on monophonic (single-note) sources. Synthesizing complex polyphonic music (like a full piano chord or an orchestra) remains a challenge.
  • Inharmonicity: The basic harmonic model assumes perfect integer ratios. While the noise component helps, it doesn't perfectly capture the "stiff string" inharmonicity found in instruments like pianos.
  • Pitch Tracking Dependency: The supervised version relies on accurate fundamental frequency estimation. If the pitch tracker fails, the synthesis fails.

The authors suggest that future work could involve more complex physical models (like string or tube models) and extending the framework to polyphonic and speech synthesis.

Summary updated

BibTeX
@inproceedings{engel2020ddsp,
  author = {Jesse H. Engel and Lamtharn Hantrakul and Chenjie Gu and Adam Roberts},
  title = {{DDSP: Differentiable Digital Signal Processing}},
  booktitle = {International Conference on Learning Representations},
  year = {2020},
}
Figure