BigVGAN is a GAN vocoder aiming to be a "universal" vocoder that works for any speaker, language, or recording environment without fine-tuning. It was published in 2022 by Lee et al. at NVIDIA and Seoul National University (ICLR 2023). Like HiFi-GAN, it generates waveforms from mel spectrograms, and it builds on HiFi-GAN's generator.
GAN vocoders such as MelGAN and HiFi-GAN can generate high-quality waveforms on a GPU hundreds of times faster than real time. However, their quality drops sharply outside the speakers heard in training and outside clean recordings. Real-world uses, such as multi-speaker speech synthesis, voice cloning, voice conversion, and decoding for neural audio codecs, require vocoders that remain robust on audio from conditions not seen in training (out-of-distribution).
BigVGAN addresses this challenge with three ideas.
A periodic activation function (Snake): since audio waveforms are superpositions of periodic components, the activation function itself is made periodic, so that the generator can produce periodic patterns more easily.
Anti-aliasing: the high-frequency components produced by Snake that a discrete signal cannot represent are removed with a low-pass filter. The building block that combines these two is called AMP (anti-aliased multi-periodicity composition).
Large-scale training: the generator is scaled up to 112 million parameters, and training collapse is kept in check through the learning rate, batch size, and gradient clipping.
BigVGAN, trained only on LibriTTS speech, was rated closer to the original audio than HiFi-GAN and others across unseen speakers, unseen languages, noisy recordings, singing voices, and musical instruments.
Architecture
BigVGAN consists of a generator in which HiFi-GAN's activation functions are replaced with the "anti-aliased Snake", together with a multi-period discriminator (MPD) and a multi-resolution discriminator (MRD). In the figure at the top of this article, the left shows the generator, the center shows the inside of AMP, and the right shows the anti-aliased Snake.
The Snake function is a periodic activation function proposed by Ziyin et al. for forecasting time series such as temperature and financial data.
fα(x)=x+α1sin2(αx)
α is a learnable parameter that sets the frequency of the periodic component (the larger it is, the higher the frequency). BigVGAN gives each convolution channel its own α, so that each channel can learn a different period. Because it uses sin2, the function is monotonically increasing, which also makes it easy to optimize.
The anti-aliased Snake prevents the high-frequency components produced by Snake from turning into aliasing (folded-back noise).
The signal is upsampled by a factor of 2 along the time axis.
The Snake function is applied.
The signal is downsampled by 1/2 back to its original length.
The upsampling and downsampling use a low-pass filter based on a Kaiser-windowed sinc function. Following the same idea as StyleGAN3, the cutoff frequency is s/(2m) (where s is the sampling rate and m=2 is the upsampling ratio), and the window length is 6m.
AMP is HiFi-GAN's MRF with the Leaky ReLUs replaced by anti-aliased Snakes. Three residual blocks with kernel sizes 3, 7, and 11 run in parallel and their outputs are summed; each residual block stacks [anti-aliased Snake → dilated convolution with dilation d → anti-aliased Snake → convolution with dilation 1 → add the input] three times with d=1,3,5.
The overall generator is as follows.
Input: a 100-band log-mel spectrogram (0–12 kHz) is taken in by a convolution of width 7 with h channels.
Upsampling blocks × N: each block consists of a transposed convolution that halves the channels, followed by AMP.
Output: Snake, a convolution of width 7 with 1 channel, and tanh produce the waveform.
The paper compares two sizes.
Model
Parameters
Channels h
Upsampling factors
AMP kernel sizes
Dilations
BigVGAN-base
14.01 M
512
8, 8, 2, 2 (256× in total)
3, 7, 11
[[1, 1], [3, 1], [5, 1]] in each block
BigVGAN
112.4 M
1,536
4, 4, 2, 2, 2, 2 (256× in total)
3, 7, 11
Same
BigVGAN-base has the same configuration as HiFi-GAN V1, with only the activation functions changed. BigVGAN splits upsampling into six stages that refine the resolution gradually, and increases the channels to 1,536.
For discriminators, BigVGAN uses HiFi-GAN's multi-period discriminator (MPD, periods 2, 3, 5, 7, 11) and replaces the multi-scale discriminator (MSD) with a multi-resolution discriminator (MRD). MRD, proposed in UnivNet, converts the waveform into linear spectrograms with three settings (FFT size, hop, and window length of [1024, 120, 600], [2048, 240, 1200], and [512, 50, 240]) and judges each with 2D convolutions. The paper reports that replacing MSD with MRD reduces pitch and periodicity errors and improves audio quality.
The loss is the same as HiFi-GAN's. The least-squares GAN loss, the discriminator feature-matching loss Lfm, and the mel-spectrogram L1 loss Lmel are summed with λfm=2 and λmel=45 (Dk is each discriminator of MPD and MRD, s is the mel spectrogram, and x is the ground-truth waveform).
The key point of BigVGAN is that it builds the assumption that "audio consists of periodic components" (an inductive bias) into the generator, enabling it to extrapolate to frequencies and timbres not seen in training.
Generators such as HiFi-GAN's could only learn periodic components by stacking dilated convolutions. Their activation function, Leaky ReLU, is piecewise linear and carries no cue for periodicity. The paper reports that generators with Leaky ReLU produce speech well in recording environments heard in training, but their quality drops sharply for unseen recording environments, non-speech sounds, and musical instruments. Snake has a periodic shape in itself, so it can keep producing periodic patterns even outside the training range.
As an analogy, the Snake function is a straight slope (y=x) with small steps (sin2) added at regular intervals. The step interval is set by α, and since each channel learns a different interval, sounds with many different periods can be built by superposing them. Thanks to the slope, the output is not confined to a fixed range even for large inputs, retaining the ease of use of ReLU.
However, Snake also produces very high-frequency components that a discrete signal (a sampled waveform) cannot represent. These become aliasing and create noise in the high range, so Snake is applied at twice the resolution, the high frequencies are removed with a low-pass filter, and the signal is then returned to its original resolution.
The roles of the other techniques are as follows.
Technique
What it does
What it helps with
Snake function
Gives the activation function a periodicity learned per channel
Better extrapolation to unseen audio. Removing it lowers SMOS on MUSDB18-HQ
Low-pass filter
Upsamples 2× around Snake and back, removing high frequencies
Reduces high-range noise caused by aliasing
MRD
Judges spectrograms at three resolutions
Reduces pitch and periodicity errors
Larger model
Scales up to 112M parameters
Makes use of diverse training data and gets closer to the original audio
Diverse training data
Trains on all of LibriTTS (including noisy recordings)
Better robustness to unseen recording environments
To train the large model stably, the paper uses the following techniques.
Halve the learning rate: with HiFi-GAN's learning rate of 2×10−4, the discriminator loss dropped to 0 within a few thousand updates and training collapsed, so it was lowered to 1×10−4.
Double the batch size: increasing it from the usual 16 to 32 made training less prone to collapse.
Gradient clipping: the anti-aliased Snake amplified the gradients from MPD, and the generator's gradients diverged early in training, so the global gradient norm was clipped at 103.
Experimental Results
The paper trains all models, including the baselines, on the full 24 kHz LibriTTS training data (train-clean-100, train-clean-360, and train-other-500, including noisy recordings). The mel spectrogram uses 100 bands over 0–12 kHz rather than the usual 0–8 kHz, with an FFT and window length of 1,024 and a hop of 256. BigVGAN is trained for 1 million steps with a batch size of 32, segments of 8,192 samples, and an initial learning rate of 1×10−4; the other settings (such as AdamW) follow the official HiFi-GAN implementation.
For subjective evaluation, SMOS (a 5-point rating of how similar the audio sounds when compared with the ground-truth recording) is used in addition to MOS. For a universal vocoder, MOS alone can give high scores even to "a natural but average voice that differs from the original speaker."
Model size and speed (24 kHz, RTX 8000 GPU; how many times faster than real time)
Recordings with added noise (Spanish, French, Italian, Portuguese)
Real noisy recordings (Korean)
Ground truth
4.58 ± 0.05
4.36 ± 0.05
4.56 ± 0.05
UnivNet-c32
4.35 ± 0.07
3.95 ± 0.09
4.18 ± 0.08
HiFi-GAN (V1)
4.39 ± 0.07
4.13 ± 0.08
4.21 ± 0.08
BigVGAN-base
4.38 ± 0.07
4.21 ± 0.07
4.36 ± 0.07
BigVGAN
4.41 ± 0.07
4.26 ± 0.07
4.38 ± 0.07
(UnivNet-c32 uses publicly released weights trained on train-clean-360.)
SMOS on music (MUSDB18-HQ)
Model
Vocals
Drums
Bass
Other instruments
Mixture
Average
Ground truth
4.58 ± 0.05
4.57 ± 0.05
4.52 ± 0.05
4.61 ± 0.05
4.56 ± 0.05
4.57 ± 0.02
UnivNet-c32
4.22 ± 0.09
4.23 ± 0.09
3.90 ± 0.11
3.80 ± 0.13
3.80 ± 0.12
3.99 ± 0.05
HiFi-GAN (V1)
4.26 ± 0.08
4.37 ± 0.08
3.95 ± 0.11
3.92 ± 0.12
3.91 ± 0.11
4.08 ± 0.05
BigVGAN-base
4.36 ± 0.08
4.39 ± 0.07
4.00 ± 0.11
4.14 ± 0.09
4.11 ± 0.10
4.20 ± 0.04
BigVGAN-base (no filter)
4.30 ± 0.08
4.32 ± 0.07
3.95 ± 0.11
4.05 ± 0.10
4.11 ± 0.10
4.15 ± 0.04
BigVGAN-base (no filter, no Snake)
4.31 ± 0.08
4.32 ± 0.07
3.94 ± 0.11
4.01 ± 0.11
4.02 ± 0.10
4.12 ± 0.04
BigVGAN
4.37 ± 0.08
4.41 ± 0.07
4.00 ± 0.10
4.25 ± 0.09
4.26 ± 0.08
4.26 ± 0.04
Removing the filter lowers the average from 4.20 to 4.15, and also removing Snake (equivalent to HiFi-GAN with MRD) lowers it to 4.12. The gaps are large for vocals, other instruments, and mixtures, and small for drums and bass.
Diversity of training data (the 112M BigVGAN; objective metrics on LibriTTS dev-other, SMOS on test-other)
In a listening comparison against a HiFi-GAN of the same 112M size (MUSDB18-HQ mixtures), 58% of the ratings preferred BigVGAN.
Practical Considerations
Keep the following points in mind when using BigVGAN.
Match the mel-spectrogram settings: BigVGAN is trained on 100-band mel spectrograms over 0–12 kHz (24 kHz, FFT 1,024, hop 256). The output of the upstream speech synthesis model must match these settings. They differ from the HiFi-GAN settings trained on 80 bands over 0–8 kHz.
Trade-off with speed: the anti-aliased Snake adds computation, so BigVGAN-base (70.18×) is slower than a HiFi-GAN of the same size (93.75×). Even the 112M BigVGAN runs about 45 times faster than real time on a GPU.
Training large models is prone to collapse: the paper recommends three measures: lowering the learning rate to 1×10−4, using a batch size of 32, and clipping the gradient norm at 103.
The paper reports that many techniques commonly used in large-scale GAN training backfired for audio. Spectral Normalization stabilized training but weakened the gradients from MPD too much, increasing phase-mismatch artifacts. SpecAugment produced overly smooth audio, and Mixup produced audio with two voices mixed together. Applying the filter to the upsampling layers as well, using Snake in the discriminators, and increasing the channels to 2,048 also led to training collapse or degraded audio quality.
Comparison with Other Vocoders
Comparing BigVGAN with other vocoders from the same perspective gives the following. The numbers are from the BigVGAN paper's evaluation on LibriTTS (24 kHz, RTX 8000 GPU).
Handling unseen speakers, languages, recording environments, and even singing voices or instruments: BigVGAN fits. Without fine-tuning, it produces waveforms closer to the original audio than HiFi-GAN.
Maximizing speed for speech from fixed speakers only: HiFi-GAN fits. At the same size it is faster than BigVGAN-base, and for speech from fixed speakers the MOS gap is also small.
Keeping the generator small: BigVGAN-base has the same number of parameters as HiFi-GAN V1 and beats HiFi-GAN on every objective metric.
The paper also cites speech synthesis models that use the HiFi-GAN generator as a decoder, such as VITS, and neural audio codecs such as SoundStream and EnCodec, as applications for a universal vocoder.
PyTorch example
▶Show code
python
import math
import torch
import torch.nn as nn
import torch.nn.functional as F
from torch.nn.utils.parametrizations import weight_norm
"""
A small implementation of the core components of the BigVGAN generator (Snake, anti-aliased Snake, AMP), following Sections 3.2 and 3.3 and Appendix A of the paper.
PyTorch has no built-in BigVGAN (the authors' official implementation and pre-trained models are at NVIDIA/BigVGAN on GitHub).
The discriminators (MPD, MRD) and losses are almost the same as the implementation in the HiFi-GAN article (MRD is used instead of MSD).
"""
class Snake(nn.Module):
"""f_α(x) = x + sin²(αx) / α. α is learned per channel"""
def __init__(self, channels):
super().__init__()
self.alpha = nn.Parameter(torch.ones(1, channels, 1))
def forward(self, x):
return x + torch.sin(self.alpha * x) ** 2 / (self.alpha + 1e-9)
def kaiser_sinc_filter(m=2):
"""Low-pass filter from Appendix A: cutoff 1/(2m) (relative to the sampling rate), window length 6m, transition half-width 0.6/m"""
n, cutoff, half_width = 6 * m, 0.5 / m, 0.6 / m
A = 2.285 * (n / 2 - 1) * math.pi * 4 * half_width + 7.95 # maximum attenuation
beta = 0.1102 * (A - 8.7)
window = torch.kaiser_window(n, periodic=False, beta=beta)
t = torch.arange(n) - (n - 1) / 2
filt = 2 * cutoff * torch.sinc(2 * cutoff * t) * window
return (filt / filt.sum()).view(1, 1, n)
class AntiAliasedSnake(nn.Module):
"""2x upsampling (low-pass filter) → Snake → 1/2 downsampling (low-pass filter)"""
def __init__(self, channels, m=2):
super().__init__()
self.m, self.act = m, Snake(channels)
self.register_buffer("filt", kaiser_sinc_filter(m))
def forward(self, x):
C, k = x.shape[1], self.filt.shape[-1]
f = self.filt.expand(C, 1, k)
T = x.shape[-1]
up = F.conv_transpose1d(x, f * self.m, stride=self.m, groups=C) # insert zeros to double the length, then interpolate with the filter
start = (k - self.m) // 2
up = up[..., start:start + T * self.m]
y = self.act(up)
y = F.pad(y, (k // 2 - 1, k // 2), mode="replicate")
return F.conv1d(y, f, stride=self.m, groups=C)[..., :T] # filter, then decimate
class AMPBlock(nn.Module):
"""[anti-aliased Snake → conv with dilation d → anti-aliased Snake → conv with dilation 1 → add input], 3 times with d = 1, 3, 5"""
def __init__(self, ch, k, dilations=(1, 3, 5)):
super().__init__()
pad = lambda d: (k * d - d) // 2
self.c1 = nn.ModuleList(weight_norm(nn.Conv1d(ch, ch, k, dilation=d, padding=pad(d))) for d in dilations)
self.c2 = nn.ModuleList(weight_norm(nn.Conv1d(ch, ch, k, padding=pad(1))) for _ in dilations)
self.a1 = nn.ModuleList(AntiAliasedSnake(ch) for _ in dilations)
self.a2 = nn.ModuleList(AntiAliasedSnake(ch) for _ in dilations)
def forward(self, x):
for c1, c2, a1, a2 in zip(self.c1, self.c2, self.a1, self.a2):
x = x + c2(a2(c1(a1(x))))
return x
class Generator(nn.Module):
def __init__(self, n_mels=100, h=512, ups=(8, 8, 2, 2), kernels=(3, 7, 11)): # BigVGAN-base. The 112M model uses h=1536, ups=(4, 4, 2, 2, 2, 2)
super().__init__()
self.pre = weight_norm(nn.Conv1d(n_mels, h, 7, padding=3))
self.ups, self.amps = nn.ModuleList(), nn.ModuleList()
for i, u in enumerate(ups):
cin, cout = h // 2 ** i, h // 2 ** (i + 1)
self.ups.append(weight_norm(nn.ConvTranspose1d(cin, cout, 2 * u, u, padding=u // 2)))
self.amps.append(nn.ModuleList(AMPBlock(cout, k) for k in kernels))
self.act = AntiAliasedSnake(h // 2 ** len(ups))
self.post = weight_norm(nn.Conv1d(h // 2 ** len(ups), 1, 7, padding=3))
def forward(self, mel):
x = self.pre(mel)
for up, amp in zip(self.ups, self.amps):
x = up(x)
x = sum(b(x) for b in amp) # sum of 3 blocks with different receptive fields
return torch.tanh(self.post(self.act(x)))
G = Generator()
mel = torch.randn(1, 100, 32) # 100-band, 0-12 kHz mel spectrogram
wave = G(mel) # [1, 1, 32 × 256]
print(wave.shape)
# Training settings (Section 3.4 of the paper): learning rate 1e-4, batch 32, clip the global gradient norm at 1e3
opt_g = torch.optim.AdamW(G.parameters(), lr=1e-4, betas=(0.8, 0.99))
loss = wave.abs().mean() # in practice: least-squares GAN + 2 × feature matching + 45 × mel L1
loss.backward()
torch.nn.utils.clip_grad_norm_(G.parameters(), max_norm=1e3)
opt_g.step()
FAQ
Q. What is the difference between BigVGAN and HiFi-GAN?
A.
There are three main differences.
Activation function: the generator's Leaky ReLU is replaced with the "anti-aliased Snake," which combines the periodic Snake function with a low-pass filter
Discriminators: a multi-resolution discriminator (MRD) is used instead of the multi-scale discriminator (MSD)
Size: the model is scaled up to as many as 112M parameters, with training stabilized through the learning rate, batch size, and gradient clipping
The generator layout (transposed convolutions and a block that runs residual blocks with different receptive fields in parallel) and the losses are the same as in HiFi-GAN.
Q. What does α in the Snake function represent?
A.
The frequency of the periodic component. The sin2(αx) term in fα(x)=x+sin2(αx)/α oscillates faster as α grows. BigVGAN learns a separate α for each convolution channel, so each channel handles a pattern with a different period, and superposing them produces a wide range of sounds.
Q. How can it generate singing voices and music when the training data contains none?
A.
Because the periodic activation function gives the generator the property that "audio consists of periodic components." A generator with Leaky ReLU struggles to produce periodic patterns outside the training range, whereas Snake can extrapolate beyond it while preserving periodicity. In the paper's evaluation on music (MUSDB18-HQ), removing both Snake and the filter lowered the average SMOS from 4.20 to 4.12.