티스토리 뷰

반응형

End-to-End LPCNet: A Neural Vocoder with Fully-Differentiable LPC Estimation


  • Neural vocoder는 여전히 우수한 합성 품질에 비해 높은 computational complexity가 요구됨
  • End-to-End LPCNet
    • Linear prediction에 기반한 autoregressive model을 사용하여 neural vocoding의 complexity를 완화
    • 추가적으로 frame rate network의 input feature에서 linear prediction cofficient를 예측하는 방법을 학습하여 기존 end-to-end version을 구성
  • 논문 (INTERSPEECH 2022) : Paper Link

1. Introduction

  • Vocoder는 acoustic parameter를 기반으로 intelligible speech를 합성하는 것을 목표로 함
    • BUT, WaveNet, WaveRNN과 같은 기존 neural vocoder는 real-time 합성을 위해서는 강력한 GPU/CPU가 요구됨
    • 한편 LPCNet은 WaveRNN을 기반으로 linear prediction (LP)와 source-filter model을 도입하여 고품질의 합성 성능을 유지하면서 3 GFLOPS의 computational cost를 줄일 수 있음
      1. BUT, LPCNet은 추론 시 acoustic feature로부터 LP coefficient를 explicit computation 해야 하는 한계점이 있음
      2. 결과적으로 arbitrary latent feature space를 사용하기 어려우므로 end-to-end coding이나 input이 full clean spectrum을 나타내지 않는 경우 사용하기 어려움

-> 그래서 기존 LPCNet의 explicit LPC computation을 회피하고 fully-differentiable 구성을 적용한 End-to-End LPCNet을 제안

 

  • End-to-End LPCNet
    • 기존 LPCNet을 개선하여 End-to-End differentiable LPCNet을 구성
    • 이후 loss function으로부터 gradient를 backpropagating 하여 input feature를 통해 LPC estimation을 학습

< Overall of End-to-End LPCNet >

  • Explict LPC computation을 회피하는 fully-differentiable LPCNet
  • 결과적으로 LPCNet과 동일한 수준의 품질을 유지하면서 추론 속도를 개선

2. LPCNet Overview

  • WaveRNN은 conditioning information으로부터 time t의 각 sample st에 대한 discrete probability distribution function (PDF) p(st)st1까지의 past sample을 예측함
    • 구조적으로는 GRU를 기반으로 linear layer와 softmax activation을 적용해 distribution을 output 함
      - 이때 GRU의 computational requirement를 줄이기 위해 block-sparse wegith matrix를 사용
    • LPCNet linear prediction을 사용하여 WaveRNN을 simplify 함
      1. 먼저 LP coefficient ai는 Levinson-Durbin Algorithm을 따라 input cepstral feature를 spectrum으로 변환하여 autocorrelation을 얻는 방식으로 explicitly compute 됨
      2. 이후 얻어진 LPC는 previous sample에서 예측 pt를 계산하는 데 사용됨:
        (Eq. 1) pt=Mi=1aisti
        - M : prediction order (16kHz LPCNet의 경우 M=16을 사용)
        - et=stpt : excitation/residual
      3. 그러면 main GRU GRUA는 past signal st1 뿐만 아니라 past excitation et1과 current sample pt의 예측에도 사용할 수 있음
        - 여기서 output은 excitation distribution P(et)를 추정
    • 한편 full 16-bit PDF를 output 할 때 LPCNet은 μ-law scale을 채택하여 WaveRNN의 two-pass coarse-fine strategy를 회피함:
      (Eq. 2) U(x)=sgn(x)Umaxlog(1+μ|x|)log(1+μ)
      - 여기서 μ-law range Umax=128이고 μ=255, U(0)=0
      - μ-law value는 일반적으로 [0,256] range의 양수값을 가지지만, 논문에서는 [128,128]을 가지도록 함
    • μ-law scale은 quantization noise를 signal amplitude와 independent 하도록 만드는 역할
      1. Input에 적용된 pre-emphasis filter E(z)=1αz1는 8-bit μ-law quantization에서 발생하는 audible quantization noise를 방지함
      2. De-emphasis filter D(z)=11αz1는 synthesis output에 적용됨
        - α=0.85를 사용
    • Frame rate network는 cepstral feature로부터 frame conditioning feature f를 학습함
      - Sample rate network는 frame conditioning feature f와 prediction pt, past excitation et1, past signal st1을 기반으로 excitation et에 대한 output probability distribution을 예측

3. End-to-End LPCNet

  • End-to-End LPCNet은 LPC computation이 cepstral feature의 fixed set으로 hardcode 되지 않고 differentiable computation을 지원하는 것을 목표로 함
    • 구조적으로는 아래 그림과 같이 frame rate network가 LPC를 계산하는데 사용됨
    • 이때 fully-differentiable end-to-end training을 위해서는 다음을 differentiable 하게 구성해야 함:
      1. LPC Computation
      2. Input Embedding
      3. Loss Function Computation

Overall of End-to-End LPCNet

- Learning to Compute LPCs

  • LP coefficient는 error에 민감하고 unstable 하므로 directly quantize 하거나 estimate 할 수 없음
    • Robust representation으로 [1,1] interval 내에서 stability를 보장하는 Reflection Coefficient (RC)나 alternating ordering을 따르는 line spectral frequency를 고려할 수 있음
    • 따라서 논문에서는 representation으로 RC를 채택하여 사용함
      1. [1,1] interval이 tanh activation으로 쉽게 enforce 되고, pre-tanh logit이 RC의 log-area ratio representation과 동일하기 때문
      2. 여기서 RC는 Levinson recursion을 통해 direct-form LP coefficient로 변환됨:
        (Eq. 3) a(i)j={ki,ifj=ia(i1)j+kia(i1)ij,otherwise
        - ki : RC, a(i)j : order ij-th prediction coefficient
      3. 결과적으로 (Eq. 1), (Eq. 3)은 differentiable 하므로 network는 RC를 계산하는 방법을 학습할 수 있음
    • 추가적으로 End-to-End LPCNet은 frame rate network condition vector f의 첫 M element를 RC로 directly use 함
      - 이를 통해 다음 sample rate network가 estimated prediction coefficient를 고려하도록 보장할 수 있음
      - (Eq. 3)과 cepstral-to-LPC conversion은 전체 complexity에 비해 무시할 수 있으므로, 기본적으로 End-to-End LPCNet은 기존 LPCNet과 동일한 complexity를 가짐

- Differentiable Embedding Layer

  • Input pt,st1,et1은 8-bit μ-law value로 quantize 되어 input sample embedding을 학습하는데 사용됨
    • 이때 embedding은 input에 적용되는 non-linear function을 학습하여 singal value를 GRU에 대한 input으로 직접 사용하는 것에 비해 합성 품질을 크게 향상할 수 있음
      - BUT, μ-law quantization은 gradient가 frame rate network의 RC computation까지 loss를 backpropagate 하는 것을 방지함
    • 따라서 논문은 embedding을 differentiable 하게 구성하기 위해, interpolation scheme을 도입함
      1. 먼저 vj를 embedding matrix의 j-th embedding vector라 하고, x를 real-valued (unquantized) μ-law sample value라고 하자
      2. 그러면 interpolated embedding v(i)(x):
        (Eq. 4) f=xx
        (Eq. 5) v(i)(x)=(1f)vx+fvx+1
        - 이를 통해 gradient는 fractional interpolation coefficient f를 통해 propagate 될 수 있음
    • 추론 시에는 interpolation의 extra complexity를 회피하고, v(x)=vx를 계산함
      - : rounding operation

- Loss Function

  • 기존 LPCNet은 DNN training 이전에 excitation을 pre-compute 할 수 있지만, 논문의 End-to-End LPCNet에서 excitation은 DNN architecture의 일부로 계산됨
    • 따라서 cross-entropy loss에 대한 ground-truth target은 constant 하지 않으므로 loss function에서 다음의 문제가 발생함
      1. Target μ-law excitation을 quantize 하면 gradient가 RC computation으로 backpropagate 되지 않음
      2. μ-law scale의 non-linear nature로 인해 large excitation value는 μ-law spacing이 크고 narrow excitation value의 경우 0에 가까운 값을 가짐
        - 결과적으로 동일한 linear uncertainty라도 excitation이 크면 cross-entropy 값이 커질 수 있음
    • 먼저 첫 번째 문제를 해결하기 위해 논문은 interpolated cross-entropy loss를 도입함
      1. e(μ)t를 time t에서의 real-valued μ-law excitation이라고 하고, ˆP(e(μ)t)를 time t에서 추정된 discrete probability라고 하자
      2. 여기서 앞선 interpolated embedding과 같이 standard cross-entropy 대신 nearest integer로 round 하면:
        (Eq. 6) LCE=E[logˆP(e(μ)t)]
      3. 해당 loss는 다음과 같이 time에 따라 distribution의 기댓값을 취하여 probability를 interpolate 함:
        (Eq. 7) f=e(μ)te(μ)t
        (Eq. 8) ˆP(i)(e(μ)t)=(1f)ˆP(e(μ)t)+fˆP(e(μ)t+1)
        (Eq. 9) LICE=E[log(ˆP(i)(e(μ)t))]
        - f : interpolation coefficient
    • 다음으로 두 번째 문제를 해결하기 위해서는 linear-domain excitation sample의 distribution에 해당하는 cross-entropy loss를 최소화해야 함
      1. 이는 ˆP(i)()μ-law value와 1 차이에 해당하는 linear step size로 dividing 하는 것으로 수행될 수 있음
      2. 이때 μ-law expansion function U1()의 derivative로 나누어 compensated loss를 얻음:
        (Eq. 10) LC=E[logˆP(i)(e(μ)t)ddxU1(x)|e(μ)t]
      3. U1()은 piecewise exponential 하므로, contant term을 discard 하여 (Eq. 10)을 단순화하면:
        (Eq. 11) LC=LICE+E[|e(μ)t|log(1+μ)Umax]
        - LICE : (Eq. 9)의 interpolated cross-entropy loss
        - 오른쪽 term : μ-law companded excitation에서 L1 loss로 μ-law scale을 compensate

- Regularization

  • Compensated loss LC만 사용하면 optimization이 발산하므로, training stability를 위해 논문은 다음의 3가지 regularization variant를 고려함
    1. L1 Regularization
      • (Eq. 11)μ-law compensation에는 L1 loss가 이미 포함되어 있으므로 다음과 같이 compensation term을 artificially increase 하는 regularizer를 도입:
        (Eq. 12) LL1=γE[|e(μ)t|log(1+μ)Umax]

        - 여기서 γ=1을 사용해 (Eq. 11)의 compensation term을 두배로 늘림으로써 training을 stabilize 함
      • 실제로 regularization은 standard LPC analysis와 유사한 방식으로 prediction error를 최소화함
        - 특히 μ-law residual에 대한 연산은 regularization이 high-/low-amplitude signal에 거의 동일하게 적용되는 특성을 가짐
    2. Log-Area Ratio Regularization
      • 기존 LPCNet과 같이 ground-truth LPC에 대해 directly match 하는 방식을 고려할 수 있음
        - 해당 regularization에서 LPC는 target speech signal에 대해서만 계산되고, training time에만 사용되므로 End-to-End LPCNet의 complexity를 증가시키지 않음
      • 이때 추정된 RC ki와 ground-truth RC k(g) 간의 distance로써, 두 filter 간의 difference를 나타내는 log-area ratio (LAR)을 사용:
        (Eq. 13) LLAR=E[i(log1ki1+kilog1k(g)i1+k(g)i)2]
    3. Log-Area Ratio Matching
      • (Eq. 6)의 non-compensated standard discrete cross-entropy를 사용하면서 LPC estimation을 adapt 하기 위해 (Eq. 13)을 적용하는 방식
      • 이때 LPC는 output probability estimation을 고려하지 않고 ground-truth LPC와 match 되도록 함
        - Excitation은 예측된 LP coefficient를 기반으로 계산됨

4. Experiments

- Settings

  • Dataset : 9 TTS datasets
  • Comparisons : LPCNet

- Results

  • 여러 end-to-end variant에 대한 성능을 비교해 보면, LAR-regularized model이 ground-truth와 가장 비슷한 것으로 나타남

추정된 LPC와 Ground-Truth LPC 간의 Log-Spectral Distance (LSD)
각 Variant별 LPC Response 비교

  • MOS 측면에서도 LAR-regularized model이 가장 우수한 성능을 달성함

MOS 비교
Baseline LPCNet과의 비교

 

반응형
댓글
최근에 올라온 글
최근에 달린 댓글
«   2025/04   »
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