Energy-Distance Training in Generative Models
- Energy-distance training is defined as a distribution-matching objective that uses attraction to data and repulsion among samples to establish a strictly proper scoring rule.
- It employs spectral formulations with multi-scale STFT magnitude spectrograms, ensuring perceptually faithful comparisons in waveform speech synthesis.
- The method utilizes unbiased minibatch estimates and repulsive terms to prevent sample collapse, achieving consistency and improved synthesis metrics.
Energy-distance training denotes a family of training objectives for implicit generative models in which learning is driven by a generalized energy distance between the model distribution and the data distribution, rather than by an analytical likelihood or a purely adversarial game. In speech, the approach was introduced for fully parallel waveform synthesis in "A Spectral Energy Distance for Parallel Speech Synthesis" (Gritsenko et al., 2020), where the distance is defined on multi-scale magnitude spectrograms, and later applied to autoregressive continuous-latent speech language modeling in "Efficient Speech Language Modeling via Energy Distance in Continuous Latent Space" (Ma et al., 19 May 2025). Across these instantiations, the central mechanism is the same: a sample-to-data attraction term is balanced by a sample-to-sample repulsive term, yielding a strictly proper scoring rule under the stated conditions and providing a stable objective for training implicit models.
1. Classical generalized energy distance
Let and be two probability distributions over . The generalized energy distance is defined as
Equivalently, if is any negative-definite distance, then
Minimizing this distance drives in expectation (Gritsenko et al., 2020).
The later SLED formulation writes the same construction as a squared generalized energy distance on a metric space :
A common choice is with 0; when 1, this becomes 2 (Ma et al., 19 May 2025).
The defining structural feature of energy-distance training is therefore not a particular architecture, but the use of a distribution-matching objective that depends only on samples from the model. This makes the method naturally compatible with implicit generators for which no tractable density is available.
2. Spectral formulation for waveform speech synthesis
In high-dimensional waveform space, Euclidean distances on raw samples poorly capture perceptual similarity. The spectral formulation replaces raw-sample comparison with a distance on multi-scale STFT magnitude spectrograms. If
3
denotes the 4-th frame of the STFT of 5 with window size 6, the distance between waveforms 7 and 8 is defined as
9
Typical choices are 0 and 1 (Gritsenko et al., 2020).
Inserting this 2 into the generalized energy distance yields the spectral energy distance. The paper characterizes this objective as a proper scoring rule with respect to the distribution over magnitude-spectrograms of the generated waveform audio (Gritsenko et al., 2020).
The construction is explicitly multi-scale. The magnitude term uses an 3 difference on spectrogram frames, while the log-magnitude term uses an 4 difference. The weighting 5 is used to roughly balance gradient magnitudes across scales. The paper also reports that multi-scale spectrograms with window sizes 6 outperform any single scale (Gritsenko et al., 2020).
3. Unbiased minibatch estimation and optimization
For conditional TTS, the training data are pairs 7. An unbiased minibatch estimator of the energy score is obtained by drawing, for each 8, two independent noise vectors 9 and 0, then generating
1
The minibatch loss is
2
Because 3, this estimator is unbiased (Gritsenko et al., 2020).
The training step described in the paper samples a minibatch of 4, samples 5, computes 6 and 7, evaluates the multi-scale spectrogram distances, and updates 8 with Adam. The reported hyper-parameters are Adam with 9, learning rate 0 with 1k-step linear warmup, batch size 2 across 3-way TPU shards, and 4 decay 5 (Gritsenko et al., 2020).
The implementation details are integral to the method’s practical stability. STFTs use Hann windows, 6 overlap, and an 7 overcomplete DCT/DST basis for stable gradients. All sums over time-frequency frames are fused into convolution-style tensor operations for GPU/TPU efficiency. Gradients of 8 backpropagate through the STFT operations and the generator network 9 because all components are differentiable (Gritsenko et al., 2020).
4. Properness, consistency, and the role of repulsion
The theoretical basis for energy-distance training is the energy score
0
By Gneiting and Raftery (2007), Theorem 5.1, this score is a strictly proper scoring rule whenever 1 is a negative-definite distance. In the spectral formulation, each term
2
and
3
is negative-definite, and a weighted sum of proper scoring rules remains strictly proper. The resulting spectral energy distance is therefore guaranteed to uniquely identify the true conditional spectrogram distribution in the infinite-data limit; under mild model-capacity assumptions, minimizing this loss is statistically consistent (Gritsenko et al., 2020).
The repulsive term is not incidental. In both the waveform and continuous-latent formulations, it is the mechanism that distinguishes energy-distance training from plain regression. SLED states this directly: a plain regression loss such as RMSE only matches means and collapses variance, whereas the repulsive 4 term prevents sample collapse (Ma et al., 19 May 2025).
A recurrent misconception is that the objective is merely a sample-to-target reconstruction loss with an auxiliary regularizer. The formulas in both papers do not support that interpretation. The attraction term and the repulsive term are coequal parts of the scoring rule, and removing the latter changes the objective qualitatively rather than marginally. The empirical ablations reported in both papers are consistent with this interpretation (Gritsenko et al., 2020).
5. Empirical behavior in fully parallel speech synthesis
On a single-speaker 5 dataset, the waveform study evaluates four model families with conditional Fréchet Deep Speech Distance (cFDSD), unconditional FDSD, and Mean Opinion Score (MOS). The valid-set values reported in Table 1 are as follows (Gritsenko et al., 2020).
| Model | MOS | cFDSD |
|---|---|---|
| GAN-TTS (published) | – | 0.060 |
| GAN-TTS (re-impl.) | 4.16±0.06 | 0.077 |
| GED (same generator) | 4.03±0.06 | 0.038 |
| GED (no repulsive term) | 3.00±0.07 | 0.048 |
| GED + iSTFT generator | 4.10±0.06 | 0.037 |
| GED + unconditional GAN | 4.25±0.06 | 0.040 |
These results establish several properties of the training method. Adding the repulsive term halves cFDSD versus GAN-TTS alone, indicating a substantially better match to the conditional waveform distribution. Dropping the repulsive term collapses samples and degrades MOS to approximately 6. The fully parallel inverse-STFT generator converges fastest, at approximately 7k steps, and achieves the best FDSD, although its MOS of 8 still lags slightly. Combining GED with an unconditional GAN discriminator yields the best MOS of 9, surpassing prior GAN-TTS (Gritsenko et al., 2020).
The paper’s practical recommendations follow from these findings. The repulsive term is described as essential; without it, the model collapses to the conditional mean or produces spectrally metallic artifacts. The GED loss alone excels at capturing fine-grained local conditional structure but can sound robotic, whereas adding an unconditional GAN loss helps recover naturalness. Training is reported to be rapid, with best cFDSD in 0–1k steps, but the models can overfit if run to 2M steps, so early stopping or regularization is advisable (Gritsenko et al., 2020).
6. Continuous-latent autoregressive modeling
The SLED model extends energy-distance training from waveform or spectrogram space to autoregressive modeling in continuous latent space. Its architecture has two modules: an autoregressive network 3, implemented as a Transformer, which consumes all past latents 4 and text tokens when conditioning on a prompt, and produces
5
and a lightweight implicit generator 6, implemented as an MLP plus AdaLN, which maps 7 to 8 (Ma et al., 19 May 2025).
The per-token loss used in SLED is
9
where 0 is the ground-truth latent vector at step 1, and 2 is the implicit distribution defined by the conditional sampler 3. Operationally, each step runs 4 on the ground-truth prefix, samples two independent Gaussian noise vectors, computes two simulated latents
5
retrieves the true latent 6 from the encoder, and forms
7
Back-propagation flows through both 8 and 9 (Ma et al., 19 May 2025).
The reported hyper-parameters are 0 for the 1 distance, two noise samples per step, batch size 2, 3K steps, AdamW with learning rate 4, weight decay 5, warmup 6K steps, and classifier-free guidance strength 7 at inference. Computational complexity per step is dominated by the Transformer forward on the prefix plus two MLP passes of dimension 8 (Ma et al., 19 May 2025).
The empirical ablation against RMSE is sharp. Replacing the GED loss by simple RMSE causes catastrophic collapse: in zero-shot continuation on LibriSpeech, WER-C jumps from 9 under GED to over 0 under RMSE. Relative to discrete language modeling with residual vector quantization and hierarchical architectures, SLED reports WER-C of approximately 1 and SIM of approximately 2, compared with VALL-E at approximately 3 WER-C. Relative to other continuous models, MELLE reaches approximately 4 WER-C but requires a post-AR network, while FELLE incurs heavy multi-step sampling. SLED is described as purely autoregressive and as supporting streaming synthesis; interleaving text and speech at a 5 or 6 ratio yields WER-C of approximately 7–8 and DNSMOS of approximately 9–00, close to offline performance at WER-C of approximately 01 and DNSMOS of approximately 02 (Ma et al., 19 May 2025).
7. Limitations, scope, and open questions
The spectral formulation has explicit limitations. The scoring rule is strict on spectrogram slices but does not fully enforce long-range time dependencies in the waveform. Improvements in FDSD do not always translate to higher MOS, which motivates the paper’s statement that better perceptual metrics are needed. Combining spectral GED with more advanced GAN architectures or flow-based models is left to future work (Gritsenko et al., 2020).
The empirical record also indicates that energy-distance training alone and energy-distance training augmented with adversarial losses optimize different aspects of synthesis quality. In the waveform study, GED alone produces strong cFDSD and stable, non-adversarial training, but adding an unconditional GAN improves MOS. This does not contradict the consistency result: the strict properness claim is with respect to the chosen distance and representation, whereas MOS is a perceptual evaluation protocol rather than the optimized scoring rule (Gritsenko et al., 2020).
A broader implication suggested by the two papers together is that the method’s effective domain is determined by the choice of representation space and distance. In one case, the relevant space is multi-scale STFT magnitude spectrograms derived from audio waveforms; in the other, it is a sequence of continuous latent vectors generated autoregressively. What remains invariant is the training principle: distributional matching by attraction to data and repulsion among model samples, implemented without requiring an explicit density and without the min–max optimization of GANs (Ma et al., 19 May 2025).