티스토리 뷰

반응형

BigVGAN: A Universal Neural Vocoder with Large-Scale Training


  • Generative Adversarial Network (GAN) 기반의 vocoder는 우수한 품질을 보이고 있지만, 다양한 recording 환경과 speaker에 대한 audio를 합성하는 것에는 어려움이 있음
  • BigVGAN
    • Fine-tuning 없이 다양한 out-of-distribution scenario에 generalize 할 수 있는 universal vocoder
    • GAN generator에 periodic activation function과 anti-aliased representation을 도입하여 inductive bias를 제공하고 합성 성능을 향상
    • 결과적으로 over-regularization 없이 high-fidelity output을 유지하면서 large-scale GAN의 학습 문제를 해결함
  • 논문 (ICLR 2023) : Paper Link

1. Introduction

  • Generative Adversarial Network (GAN) 기반의 vocoder는 real-time 보다 훨씬 빠른 합성과 고품질의 raw audio를 생성할 수 있음
    • BUT, 기존 GAN-based vocoder는 제한된 capacity로 인해 clean 환경에서 얻어진 recording으로만 학습됨
      - 다양한 환경에 대한 unseen speaker의 mel-spectrogram을 기준으로 사용하면 audio 품질이 크게 저하됨
    • 따라서 out-of-distribution (OOD) sample에 대해 zero-shot 합성을 수행하는 universal vocoder를 위해서는, 다양한 condition에 대해 모델이 잘 generalize 될 수 있어야 함
      - Zero-shot 성능을 향상하기 위해 모델 size를 확장하는 것은 일반적인 방법이지만, 기존의 neural vocoder에서는 적용되지 않았음
    • 특히 GAN-based vocoder는 아래의 장점으로 인해 large-scale training에 적합함
      1. Autoregressive, diffusion 모델과 달리 fully parallel 하고, high-dimensional waveform 생성을 위해 한 번의 forward pass만 필요함
      2. Flow-based 모델과 달리 latent와 data 간의 bijection을 유지하는 architectural constraint가 없음
        - 해당 architectural constraint는 동일한 수의 parameter에 대해 모델 capacity를 제한할 수 있음

-> 그래서 OOD 합성을 위해 large-scale training을 활용한 GAN-based vocoder인 BigVGAN을 제안

 

  • BigVGAN
    • Audio 합성에 대한 desired inductive bias를 제공하기 위해 generator에 periodic activation을 도입
    • Complex audio waveform을 모델링하기 위해 Anti-aliased Multi-Periodicity (AMP) composition module을 도입
      - AMP는 learnable periodicity로 multiple signal compnent를 구성하고 low-pass filter를 사용하여 high-frequency artifact를 줄임
    • Generator, discriminator를 regularizing 하지 않고 large-scale GAN training의 문제를 해결하여 최대 112M의 parameter를 가지는 대규모 모델로 BigVGAN을 확장
      - 이때 14M의 parameter를 가지는 BigVGAN-base 만으로도 in-distribution, out-of-distribution 모두에 대해 더 우수한 성능을 달성함

< Overall of BigVGAN >

  • Fine-tuning 없이 다양한 out-of-distribution scenario에 generalize 할 수 있는 universal vocoder
  • GAN generator에 periodic activation function과 anti-aliased representation을 도입하여 inductive bias를 제공하고 합성 성능을 향상
  • 결과적으로 over-regularization 없이 high-fidelity output을 유지하면서 large-scale GAN의 학습 문제를 해결함

2. Method

- Preliminaries of GAN Vocoder

  • Generator
    • Generator는 mel-spectrogram이나 다른 feature를 input으로 사용하여 해당하는 raw waveform을 output 함
    • BigVGAN은 HiFi-GAN을 baseline architecture로 사용함
  • Discriminator
    • GAN-based vocoder는 perceptual artifact를 최소화하면서 coherent waveform을 합성하도록 generator를 guide 하는 여러 discriminator들로 구성됨
      - 이때 각 discriminator에는 waveform의 서로 다른 resolution window에서 동작하는 multiple sub-discriminator가 포함되어 있음
    • 대표적으로 HiFi-GAN은 Multi-Period Discriminator (MPD)와 Multi-Scale Discriminator (MSD)로 구성됨
      1. MPD에서 1D signal은 다양한 height, width의 2D representation으로 reshape 되어 2D convolution을 통해 multiple periodic structure를 개별적으로 capture 함
      2. MSD에서 각 sub-discriminator는 time-domain에서 average pooling을 통해 서로 다른 frequency에서 down-sampling 된 1D signal을 얻음
    • UnivNet의 경우, 서로 다른 STFT resolution을 가지는 multiple 2D linear spectrogram에서 동작하는 Multi-Resolution Discriminator (MRD)를 사용함
      - 특히 MSD를 MRD로 대체하면 pitch/periodicity artifact가 감소하여 audio 품질이 향상
  • Training Objective
    • BigVGAN의 training objective는 MSD를 MRD로 대체하는 것을 제외하면 HiFi-GAN과 동일함
    • 이때 objective는 least-square adversarial loss, feature matching loss, mel-spectrogram의 spectral $\ell_{1}$ loss로 구성됨
      1. 구체적으로 BigVGAN generator에 대해 $\mathcal{L}_{G}$, discriminator에 대해 $\mathcal{L}_{D}$의 objective를 적용함:
        (Eq. 1) $\mathcal{L}_{G}=\sum_{k=1}^{K}\left[ \mathcal{L}_{adv}(G;D_{k})+\lambda_{fm}\mathcal{L}_{fm}(G;D_{k})\right]+\lambda_{mel}\mathcal{L}_{mel}(G), \,\,\, \mathcal{L}_{D}=\sum_{k=1}^{K}\left[ \mathcal{L}_{adv}(D_{k};G)\right]$
        - $D_{k}$ : $k$-th MPD/MRD sub-discriminator
      2. 여기서 $\mathcal{L}_{adv}$는 least-square loss로써:
        (Eq. 2) $\mathcal{L}_{adv}(G;D_{k})=\mathbb{E}_{s}\left[(D_{k}(G(s))-1)^{2}\right],\,\,\, \mathcal{L}_{adv}(D_{k};G)=\mathbb{E}_{(x,s)}\left[ (D_{k}(x)-1)^{2}+(D_{k}(G(s)))^{2}\right]$

        - $x$ : ground-truth waveform, $s$ : input mel-spectrogram
      3. Feature matching loss $\mathcal{L}_{fm}$은 discriminator layer의 모든 intermediate feature에 대한 $\ell_{1}$ distance를 최소화함:
        (Eq. 3) $\mathcal{L}_{fm}(G;D_{k})=\mathbb{E}_{(x,s)}\left[\sum_{i=1}^{T}\frac{1}{N}||D_{k}^{i}(x)-D_{k}^{i}(G(s)) ||_{1} \right]$
        - $T$ : sub-discriminator $D_{k}$의 layer 수
      4. Generator loss $\mathcal{L}_{G}$는 ground-truth와 합성된 sample의 mel-spectrogram에 대한 spectral $\ell_{1}$ loss로써:
        (Eq. 4) $\mathcal{L}_{mel}(G)=\mathbb{E}_{(x,s)}\left[|| \phi(x)-\phi(G(s)) ||_{1} \right]$
        - $\phi$ : STFT function
        - 논문에서는 $\lambda_{fm} =2, \lambda_{mel}=45$로 설정

Overall of BigVGAN

- Periodic Inductive Bias

  • Audio waveform은 high periodicity를 가지고 있고, primitive periodic componet (Dirichlet condition 하의 Fourier seires)로써 represent 될 수 있음
    • 따라서 generator architecture에 desired inducitve bias가 필요하지만, 대부분의 기존 GAN-based vocoder는 periodic component를 학습하기 위해 dilated convolution에만 의존함
      1. 특히 Leaky ReLU와 같은 activation function은 nonlinearity detail을 생성할 수 있지만 periodic inductive bias를 제공하지는 않음
      2. 추가적으로 Leaky ReLU는 waveform domain에서 extrapolation에 대해 제대로 동작하지 않음
        - 결과적으로 unseen recording과 같은 out-of-distribution에 대한 성능 저하로 이어짐
    • 반면 snake activation과 같은 periodic activation은 향상된 extrapolation capability를 제공할 수 있으므로, BigVGAN은 snake acitvation을 활용해 generator에 periodicity inductive bias를 반영함:
      $f_{a}(x)=x+\frac{1}{\alpha}\sin^{2}(\alpha x)$
      - $\alpha$ : signal의 periodic component의 frequency를 control 하는 trainable parameter, $\alpha$가 클수록 높은 frequency를 제공
      - Snake activation은 $\sin^{2}(x)$를 사용하여 monotonicity를 보장하고 쉬운 최적화를 제공함
    • BigVGAN은 각 1D convolution channel의 periodic frequency를 정의하는 channel-wise trainable parameter $\alpha \in \mathbb{R}^{h}$와 함께 snake activation $f_{a}(x)$를 사용함
      1. 해당 periodic functional form을 취하는 learned frequency control을 통해 convolution module은 multi-periodic component를 사용하여 raw waveform을 자연스럽게 fitting 할 수 있음
      2. 아래 그림과 같이 BigVGAN의 snake-based generator는 out-of-distribution sample에 대해 더 robust 함
        - 결과적으로 universal vocoding에 대한 강력한 extrapolation이 가능

Out-of-Distribution Sample에 대한 Mel-spectrogram 비교

- Anti-Aliased Representation

  • Snake activation은 raw waveform 모델링에 필요한 periodic inductive bias를 제공할 수 있음
    • BUT, snake activation은 network의 discrete-time output으로 represent 할 수 없는 continuous-time signal에 대해 arbitrary high frequency detail을 생성하고, 이로 인해 aliasing artifact가 발생함
    • 이러한 aliasing artifact 문제는 low-pass filter의 적용으로 해결할 수 있음
      1. 따라서 anti-aliased nonlinearity는 time-dimension을 따라 signal을 2배로 up-sampling 하고, snake activation을 적용한 다음, signal을 2배로 down-sampling 하는 방식으로 동작함
        - 이는 Nyquist-Shannon sampling theorem을 따르는 방식임
      2. 각각의 up-/down-sampling에는 low-pass filter로써, Kaiser window를 적용한 windowed sinc filter를 사용
    • Discrete-time 1D signal의 anti-aliased representation을 얻기 위해 generator 내의 모든 residual dilated convolution layer에 filtered Snake nonlinearity를 적용함
      - 해당 module을 Anti-aliased Multi-Periodicity (AMP) composition이라고 함
    • 이때 filtered activation을 incorporating 하면 합성된 waveform에서 high-frequency artifact를 줄일 수 있음

(좌) Generator Architecture (우) Discriminator Architecture (주황색-MRD, 노랑색-MPD)

- BigVGAN with Large Scale Training

  • GAN training의 stability와 high-speed vocoder의 특성을 유지하면서, BigVGAN generator의 모델 size를 112M으로 확장함
    • 모델 확장을 위해, 14M의 parameter 수를 가지는 HiFi-GAN의 configuration과 유사한 BigVGAN-base에서 시작
      1. 이후 upsampling block 수와 각 block의 convolution channel 수를 늘려 BigVGAN-base를 확장
        - 이때 BigVGAN-base는 $[8,8,2,2]$ ratio의 4개 upsampling block을 사용하여 signal을 256배로 upsampling 하고,
        - 각 upsampling block에는 dilated convolution이 있는 multiple residual layer인 AMP module이 추가됨
      2. 이때 fine-grained feature refinement를 위해 $256\times$ upsampling을 $[4,4,2,2,2,2]$의 6개 block으로 divide 하고, AMP module의 channel 수를 512에서 1536으로 확장함
      3. 결과적으로 얻어진 1536개의 channel과 112M의 parameter 수를 가지는 모델을 BigVGAN이라고 함
    • HiFi-GAN에서 사용된 $2\times 10^{-4}$의 default learning rate는 BigVGAN의 training 시에 early training collapse를 유발하는 것으로 나타남
      1. 즉, discriminator submodule의 loss가 초기 interation 이후에 곧바로 0으로 수렴함
        - 이때 learning rate를 절반인 $1\times 10^{-4}$로 줄이면 early training collapse 문제를 해결할 수 있음
      2. 추가적으로 large batch size를 활용해 training의 mode collapse 문제를 방지함
        - 이때 BigVGAN의 training 효율성과 stability 간의 trade-off를 만족하기 위해 batch size를 16에서 32로 2배로 늘려서 사용함
    • BUT, 앞선 학습 설정 변경을 적용하더라도 large-scale BigVGAN은 training 초기에 쉽게 collapse 될 수 있음
      1. 이는 training 중에 anti-aliased nonlinearity가 MPD의 gradient norm을 크게 증폭시키기 때문
        - 따라서 BigVGAN은 training 초기에 diverging gradient를 receive 하므로 instability와 collapse 문제가 발생함
      2. 이를 해결하기 위해 gradient의 global norm을 112M BigVGAN generator의 average gradient norm에 가까운 103으로 clipping 하는 방식을 적용함
        - 해당 gradient clipping을 통해 generator의 training collapse 문제를 회피할 수 있음

(좌) Generator의 Gradient Norm, (중) MPD module의 Gradient Norm, (우) MRD module의 Gradient Norm

3. Experiments

- Settings

- Results

  • Models
    • 14M의 parameter를 사용하는 BigVGAN-base는 real-time 보다 70.18배 빠르게 audio 합성이 가능
      - Snake fuction 계산으로 인해 HiFi-GAN 보다는 상대적으로 느림
    • BigVGAN은 flow-based 모델보다 더 적은 layer를 사용하고 fully parallel 하게 동작함
    • 112M의 parameter를 가지는 BigVGAN은 real-time 보다 44.72배 빠르게 동작함

Parameter 수와 합성 속도 비교

  • LibriTTS Results
    • LibriTTS에 대한 합성 성능을 비교해 보면 BigVGAN이 가장 뛰어난 성능을 보임
    • 특히 BigVGAN-base는 HiFi-GAN과 동일한 parameter 수를 사용함에도 불구하고 더 향상된 성능을 보임
      - 이는 waveform data에 대한 periodic inductive bias를 사용하는 것이 성능 향상에 유리함을 의미

성능 비교 결과

  • Unseen Languages and Varied Recording Enviroments
    • Unseen language에 대한 zero-shot 성능을 비교해 보면, 마찬가지로 BigVGAN이 가장 우수함
    • 특히 clean dataset의 경우 모델 간의 성능 차이가 크지 않지만, nosiy 한 환경에서는 BigVGAN은 가장 뛰어난 성능을 보임
      - 이는 AMP module을 사용한 generator 설계로 인해 BigVGAN이 unseen 환경에 더 robust 하기 때문

Unseen Language에 대한 합성 성능 비교

  • Out-of-Distribution Robustness
    • BigVGAN의 robustness와 extrapolation 성능을 확인해 보면
    • MUSDB18-HQ dataset에 대해 BigVGAN은 wider frequency band coverage에서 향상된 zero-shot 생성 성능을 보여줌

Out-of-Distribution dataset에 대한 품질 비교

  • Ablation Study
    • Model Architecture
      - Sanke activation과 filter 모두 제거했을 때 성능 저하가 발생함
      - Leaky ReLU는 학습된 frequency range를 뛰어넘어서 extrapolate 할 만큼 robust 하지 않기 때문
    • Big Model
      - 가장 큰 parameter 수를 가진  HiFi-GAN과 BigVGAN을 비교했을 때, 58%가 BigVGAN의 합성 결과를 더 선호하는 것으로 나타남
    • Large Training Data
      - Large training data를 사용하지 않고 clean-speech only dataset만 사용했을 때, BigVGAN의 성능은 모두 저하됨
      - 결과적으로 다양한 training data를 사용하는 것이 중요함

Training Data 별 성능 비교

 

반응형
댓글
최근에 올라온 글
최근에 달린 댓글
«   2024/09   »
1 2 3 4 5 6 7
8 9 10 11 12 13 14
15 16 17 18 19 20 21
22 23 24 25 26 27 28
29 30
Total
Today
Yesterday