티스토리 뷰
반응형
VoiceMixer: Adversarial Voice Style Mixup
- Voice conversion은 source speech와 voice style을 충분히 decompose 하지 못해 여전히 한계가 있음
- VoiceMixer
- Self-supervised representation learning을 활용한 information bottleneck을 통해 content와 style을 decompose 함
- 각 information에 대한 adversarial feedback을 통해 더 나은 generalization을 달성
- 논문 (NeurIPS 2021) : Paper Link
1. Introduction
- Voice Conversion (VC)는 source speaker의 content information은 유지하면서 target voice style을 source speaker로 transfer 하는 것을 의미함
- 기존 VC system은 다양한 speaker에 대한 parallel data를 수집하기 어렵기 때문에 many-to-many VC system으로 확장하는데 한계가 있음
- 대표적으로 CycleGAN-VC는 이를 해결하기 위해 Generative Adversarial Network (GAN)-based method를 도입함
- Blow와 같이 flow-based model과 hyperconditioning mechanism을 활용할 수도 있음
- BUT, 해당 방식들은 여전히 source speech에서 content와 style을 효과적으로 disentangle 하지 못함
- AutoVC와 같이 fixed-length information bottleneck을 사용하여 content/style information을 disentangle 할 수 있음
- 특히 AdaIN-VC, AGAIN-VC 등은 instance normalization을 활용하여 global style information을 제거함
- BUT, 해당 방식들은 audio quality와 disentanglement performance 간의 trade-off가 존재함
- 즉, disentanglement 과정에서 content information loss가 발생하고, 적절한 information bottleneck size를 heuristically find 해야 함 - 그 외에도 text transcription을 통해 content embedding을 guide 할 수도 있음
- BUT, linguistic information을 encoding 하기 위해 text-to-speech (TTS) model과 jointly training 되어야 함
- 한편으로 self-supervised representation learning은 important speech representation을 추출하는데 효과적임
- 특히 future latent representation을 예측하면 labeled data 없이도 useful information을 학습할 수 있음
- BUT, 해당 self-supervised representation learning은 아직 VC task에 적용되지 않음
- 기존 VC system은 다양한 speaker에 대한 parallel data를 수집하기 어렵기 때문에 many-to-many VC system으로 확장하는데 한계가 있음
-> 그래서 self-supervised representation learning을 활용한 VC model인 VoiceMixer를 제안
- VoiceMixer
- Self-supervised similarity-based information bottleneck을 통해 적절한 downsampling size를 결정하지 않고도 효과적으로 content/style을 disentangle
- 추가적으로 converted speech의 latent representation을 학습하기 위해 adversarial voice style mixup을 도입
- Discriminator를 content/style discriminator로 disentangle 한 다음,
- Disentangled discriminator의 adversarial feedback을 통해 generator를 converted speech에 generalize 함
< Overall of VoiceMixer >
- Similarity-based information bottleneck과 adversarial feedback을 활용한 VC model
- 결과적으로 기존보다 뛰어난 conversion 성능을 달성
2. Background
- AutoVC는 source speech에서 content/style information을 disentangle 하고 information bottleneck을 통해 target speech의 voice style을 transfer 함
- 먼저 AutoVC는 speaker encoder $f_{s}(\cdot)$, content encoder $f_{c}(\cdot)$, decoder $g(\cdot,\cdot)$으로 구성됨
- Training 중에 AutoVC는 content/style information을 disentangle 하기 위해 fixed-length information bottleneck을 통한 self-reconstruction이 필요함:
(Eq. 1) $\mathbf{S}_{1}=f_{s}(\mathbf{X}_{1,A}),\mathbf{C}_{A}=f_{c}(\mathbf{X}_{1,A}),\hat{\mathbf{X}}_{1\rightarrow 1,A}=g(\mathbf{S}_{1},\mathbf{C}_{A})$
- $\mathbf{X}_{1,A}$ : source speaker $1$의 utterance $A$
- $\mathbf{S}_{1}$ : speaker $1$의 speaker information
- $\mathbf{C}_{A}$ : utterance $A$의 content information
- $\hat{\mathbf{X}}_{1\rightarrow1,A}$ : content information $\mathbf{C}_{A}$는 포함하면서 speaker characteristic $\mathbf{S}_{1}$과 match 되는 self-reconstructed speech - 여기서 각 information을 decompose 하기 위해서는 적절한 information bottleneck size가 필요함:
(Eq. 2) $\mathbf{H}(:,\lfloor t/\tau\rfloor)=\mathbf{C}_{A}(:,t)$
- $\mathbf{H}$ : time index $t\in\{1,...,T\}$에 대한 downsampled feature - Fixed-length infromation bottleneck size가 too narrow 한 경우, 더 나은 reconstruction quality를 달성할 수 있지만 voice style transfer 성능은 나쁨
- Size가 too wide 하면, 더 나은 style transfer를 달성할 수 있지만 reconstruction quality는 저하됨
- BUT, content/style을 disentangle 하는 과정에서 content information은 적절한 bottleneck size를 사용하더라도 여전히 lost 됨
- 따라서 converted voice에서 content information missing 문제는 불가피함
3. Method
- VoiceMixer는 self-supervised representation learning을 통한 similarity-based information bottleneck을 활용함
- Adversarial feedback의 경우, self-supervised guidance를 통해 content/style에 대한 discriminator를 disentangle 함
- 각 information에 대한 discriminator를 disentangle 함으로써 VoiceMixer는 ground-truth가 없는 converted speech도 train 할 수 있음 - Pitch contour, text transcription과 같은 supervised feature를 사용하면 각 information을 disentangle 하는데 도움을 줄 수 있지만, VoiceMixer는 additional feature 없이 self-supervised representation learning 만을 활용함
- Adversarial feedback의 경우, self-supervised guidance를 통해 content/style에 대한 discriminator를 disentangle 함
- Generator
- Generator의 경우 AutoVC의 autoencoder framework를 따름
- 이때 generator $G$는 다음과 같이 구성됨:
- Speech에서 content embedding을 추출하는 content encoder $f_{c}(\cdot)$
- Speech에서 speaker embedding을 추출하는 speaker encoder $f_{s}(\cdot)$
- (Eq. 1)의 content/speaker embedding으로부터 speech를 생성하는 decoder $g(\cdot,\cdot)$
- 이때 generator $G$는 다음과 같이 구성됨:
- Similarity-based Information Bottleneck
- (Eq. 2)의 information bottleneck과 달리 VoiceMixer는 content embedding 간의 similarity에 따라 content embedding을 downsampling 함
- 여기서 content encoder가 similar phoneme에서 similar content embedding을 생성한다고 가정하고, 함께 mapping 될 adjacent phonetic information을 downsample 함
- 먼저 content embedding sequence $\mathbf{C}=(\mathbf{c}_{1},...,\mathbf{c}_{T})$와 shifted content embedding sequence $\mathbf{C}_{shift}=(\mathbf{c}_{2},...,\mathbf{c}_{T+1})$ 간의 similarity $\mathbf{Q}=(\mathbf{q}_{1},...,\mathbf{q}_{T})$는 다음과 같이 계산됨:
(Eq. 3) $ \mathbf{q}_{t}=\text{sig}\left(\frac{\mathbf{c}_{t}\cdot\mathbf{c}_{t+1}}{|| \mathbf{c}_{t}||\, || \mathbf{c}_{t+1}||}/\rho\right)$
- $\text{sig}$ : sigmoid function, $\rho$ : temperature parameter - 이후 similarity-based duration $\mathcal{D}=(d_{1},...,d_{N})$을 추출함
- $d_{n}$ : similarity $\mathbf{q}_{t}$가 average similarity 보다 낮아질 때까지의 누적합
- $d_{n+1}$은 time step $T$까지 $\mathbf{q}_{t+1}$에서부터 다시 계산됨
- Gaussian Down/Up Sampling
- Same content의 center가 content에 대한 largest information을 가지고 있다고 가정하면, Gaussian downsampling을 사용하여 center에 attention 할 수 있음
- Downsampling 할 content embedding $\mathbf{C}$, duration $\mathcal{D}$, learnable range parameter $\sigma=(\sigma_{1},...,\sigma_{N})$이 주어졌을 때, downsampled sequence $\mathbf{H}=(\mathbf{h}_{1},...,\mathbf{h}_{N})$은:
(Eq. 4) $\alpha_{n}=\frac{d_{n}}{2}+\sum_{m=1}^{n-1}d_{m},\,\, w_{t}^{n}=\frac{\mathcal{N}(t;\alpha_{n},\sigma^{2}_{n})}{\sum_{m=1}^{N}\mathcal{N}(t;\alpha_{m},\sigma_{m}^{2})},\,\,\mathbf{h}_{n}=\sum_{t=1}^{T}w_{t}^{n}\mathbf{c}_{t}$ - Gaussian upsampling의 경우:
- $\mathbf{H}$를 $\mathcal{D}$의 duration을 가지는 upsampled content sequence $\tilde{\mathbf{C}}=(\tilde{\mathbf{c}}_{1},...,\tilde{\mathbf{c}}_{T})$로 upscale 하고,
- Upsampling range parameter $\sigma'=(\sigma'_{1},...,\sigma'_{2})$를 생성한 다음,
- $\tilde{\mathbf{C}}$를 $g(\cdot,\cdot)$에 전달하여 다음과 같이 mel-spectrogram을 생성함:
(Eq. 5) $w_{t}^{'n}=\frac{\mathcal{N}(t;\alpha_{n},\sigma_{n}^{'2})}{\sum_{m=1}^{N}\mathcal{N}(t;\alpha_{m},\sigma_{m}^{'2})},\,\, \tilde{\mathbf{c}}_{t}=\sum_{n=1}^{N}w_{t}^{'n}\mathbf{h}_{n},\,\, \hat{\mathbf{X}}_{1\rightarrow 1,A}=g(\mathbf{S}_{1},\tilde{\mathbf{C}}_{A})$
- Auxiliary Losses for Similarity
- Contrastive Loss
- Adjacent content embedding 간의 similarity를 높이기 위해 self-supervised representation learning으로 content encoder를 training 함
- Content embedding은 context network $f_{r}$에 전달되어 content representation을 학습함
- 이때 non-autoregressive manner로 training 하기 위해 masked convolutional block을 사용하여 adjacent content embedding에서 content embedding을 예측함
- Positive sample에 대한 contrastive loss는 predicted content embedding $\hat{\mathbf{C}}=(\hat{\mathbf{c}}_{1},...,\hat{\mathbf{c}}_{T})$와 content embedding $\mathbf{C}$ 간의 distance를 minimize 하도록 함:
(Eq. 6) $\mathcal{L}_{pos}(f_{c},f_{r})=\mathbb{E}\left[-\frac{1}{T}\sum_{i}^{T} \log \text{sig}\left(\frac{\mathbf{c}_{i}\cdot \hat{\mathbf{c}}_{i}}{||\mathbf{c}_{i}|| \,||\hat{\mathbf{c}}_{i}||}/\rho\right)\right]$
- $\text{sig}$ : sigmoid function, $\rho$ : temperature parameter
- Unsupervised manner로 content embedding의 style information을 제거하기 위해서는, context network가 content embedding의 future representation을 예측하는 것을 방지해야 함
- 따라서 논문은 predicted content embedding과 $k$-th future representation 간의 cosine similarity를 maximize 하고, 이때 negative sample에 대한 contrastive loss는:
(Eq. 7) $\mathcal{L}_{neg}(f_{c},f_{r})=\mathbf{E}\left[\frac{1}{T}\sum_{i}^{T}\log \text{sig}\left(\frac{\mathbf{c}_{i+k}\cdot \hat{\mathbf{c}}_{i}}{|| \mathbf{c}_{i+k}||\, || \hat{\mathbf{c}_{i}}||}/\rho\right)\right]$
- Adversarial Speaker Classification
- Content embedding에 대한 speaker disentanglement를 enforce 하기 위해 speaker label $\mathbf{y}_{i}$를 사용하여 supervised manner로 adversarial speaker classification을 적용함:
(Eq. 8) $\mathcal{L}_{advsc}(f_{c})=\mathbb{E}\left[\frac{1}{T}\sum_{i}^{T}\mathbf{y}_{i}\log (f_{cls}(\mathbf{c}_{i}))\right]$
- $f_{cls}$ : speaker classifier - Entire model을 $f_{cls}$와 jointly training 하기 위해, 논문은 content embedding이 $f_{cls}$에 전달되기 전에 gradient reversal layer를 적용함
- Content embedding에 대한 speaker disentanglement를 enforce 하기 위해 speaker label $\mathbf{y}_{i}$를 사용하여 supervised manner로 adversarial speaker classification을 적용함:
- Disentangled Discriminator with Self-Supervised Guidance
- 기존의 GAN-based VC model은 linguistic information을 preserve 하기 위해 cycle-consistency training을 수행하는 반면, VoiceMixer는 autoencoder-baed reconstruction을 사용함
- 이때 adversarial feedback을 위해 discriminator $D$를 content discriminator $D^{c}(\cdot, \cdot)$과 style discriminator $D^{s}(\cdot, \cdot)$으로 나누어 각각 content/style을 disentangle 함
- 추가적으로 각 attribute에 대한 각 discriminator를 guide 하기 위해 self-supervised conditional information으로써 content embedding을 content discriminator에, style embedding을 style discriminator에 conditioning 함
- Training objective로는 다음의 LSGAN objective를 사용함:
(Eq. 9) $\mathcal{L}_{adv}^{D}(D^{c},D^{s};G)=\mathbb{E}\left[|| D^{c}(\mathbf{X}_{1,A},\mathbf{C}_{A})-1||_{2}+|| D^{c}(\hat{\mathbf{X}}_{1\rightarrow 1,A},\mathbf{C}_{A})||_{2}\right.$
$\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\, \left. + ||D^{s}(\mathbf{X}_{1,A},\mathbf{S}_{1})-1||_{2}+|| D^{s}(\hat{\mathbf{X}}_{1\rightarrow 1,A},\mathbf{S}_{1})||_{2}\right]$
(Eq. 10) $\mathcal{L}_{adv}^{G}(G;D^{c},D^{s})=\mathbb{E}\left[|| D^{c}(\hat{\mathbf{X}}_{1\rightarrow 1,A}, \mathbf{C}_{A})-1||_{2}+|| D^{s}(\hat{\mathbf{X}}_{1\rightarrow 1,A},\mathbf{S}_{1})-1||_{2}\right]$
- Feature Matching for Reconstruction
- Generator를 training 하기 위해 feature matching loss를 도입함
- Discriminator의 feature와 ground-truth 간의 distance를 minimize 하는 방식 - 각 discriminator에 대해 content는 content style discriminator의 content feature matching loss $\mathcal{L}^{G}_{content}$를 사용하고 style은 style discriminator의 style feature matching loss $\mathcal{L}^{G}_{style}$를 사용함:
(Eq. 11) $\mathcal{L}_{content}^{G}(G;D^{c})=\mathbb{E}\left[\sum_{i=1}^{K}\frac{1}{N_{i}} || D^{c}_{i}(\mathbf{X}_{1,A},\mathbf{C}_{A})-D^{c}_{i}(\hat{\mathbf{X}}_{1\rightarrow 1,A},\mathbf{C}_{A})||_{1}\right]$
(Eq. 12) $\mathcal{L}_{style}^{G}(G;D^{s})=\mathbb{E}\left[\sum_{i=1}^{K'}\frac{1}{N_{i}}|| D_{i}^{s}(\mathbf{X}_{1,A},\mathbf{S}_{1})-D_{i}^{s}(\hat{\mathbf{X}}_{1\rightarrow 1,A},\mathbf{S}_{1})||_{1}\right]$
- $K,K'$ : 각 discriminator의 block 수, $N_{i}$ : $i$-th discriminator block의 feature 수 - Reconstructed mel-spectrogram의 total loss는:
(Eq. 13) $\mathcal{L}_{rec}=\mathcal{L}_{adv}^{G}(G;D^{c},D^{s})+\lambda_{c}\mathcal{L}_{content}^{G}(G;D^{c})+\lambda_{s}\mathcal{L}_{style}^{G}(G;D^{s})+\lambda_{mel}\mathcal{L}_{mel}$
- $\mathcal{L}_{mel}$ : $\mathbf{X}_{1,A}$와 $\hat{\mathbf{X}}_{1\rightarrow 1, A}$ 간의 mean absolute error
- Generator를 training 하기 위해 feature matching loss를 도입함
- Adversarial Voice Style Mixup
- 각 information에 대해 disentangled discriminator를 도입함으로써, VoiceMixer는 각 disentangled feature에 대해 reconstructed speech를 training 할 수 있음
- 이때 converted speech의 latent representation을 학습하기 위해, self-supervised condition을 가진 disentangled discriminator를 활용하는 Adversarial Voice Style Mixup을 도입함
- Converted speech에는 ground-truth (GT) sample이 없지만, converted mel-spectrogram은 각 discriminator를 통해 adversarial feedback으로 training 됨
- 결과적으로 converted mel-spectrogram에 대한 GAN loss는:
(Eq. 14) $\mathcal{L}_{adv*}^{D}(D^{c},D^{s};G)=\mathbb{E}\left[|| D^{c}(\hat{\mathbf{X}}_{1\rightarrow 2,A},\mathbf{C}_{A})||_{2}+||D^{s}(\hat{\mathbf{X}}_{1\rightarrow 2,A},\mathbf{S}_{2})||_{2}\right]$
(Eq. 15) $\mathcal{L}_{adv*}^{G}(G;D^{c},D^{s})=\mathbb{E}\left[|| D^{c}(\hat{\mathbf{X}}_{1\rightarrow 2,A},\mathbf{C}_{A})-1||_{2}+|| D^{s}(\hat{\mathbf{X}}_{1\rightarrow 2,A},\mathbf{S}_{2})-1||_{2}\right]$
- Feature Matching for Mixup
- Disentangled discriminator로 convert 된 speech에 대해 feature matching loss를 적용할 수 있음
- Content representation의 경우, converted speech와 source speech 간의 content discriminator의 feature distance를 minimize 함:
(Eq. 16) $\mathcal{L}_{content*}^{G}(G;D^{c})=\mathbb{E}\left[\sum_{i=1}^{K}\frac{1}{N_{i}}|| D_{i}^{c}(\mathbf{X}_{1,A},\mathbf{C}_{A})-D_{i}^{c}(\hat{\mathbf{X}}_{1\rightarrow 2,A},\mathbf{C}_{A})||_{1}\right]$ - Style representation의 경우, converted speech와 source speech 간의 style feature distance를 minimize 함:
(Eq. 17) $\mathcal{L}^{G}_{style+}(G;D^{s})=\mathbb{E}\left[\sum_{i=1}^{K'}\frac{1}{N_{i}}|| D_{i}^{s}(\mathbf{X}_{2,B},\mathbf{S}_{2})-D_{i}^{s}(\hat{\mathbf{X}}_{1\rightarrow 2,A},\mathbf{S}_{2})||_{1}\right]$
- 이는 Attractive style loss로써, same speaker의 same style 간 style feature distance를 minimize 함 - 추가적으로 논문은 converted speech와 다른 style의 source speech에 대한 style feature distance를 maximize 하는 Repulsive style loss를 도입함:
(Eq. 18) $\mathcal{L}_{style-}^{G}(G;D^{s})=\mathbb{E}\left[-\sum_{i=1}^{K'}\frac{1}{N_{i}}|| D_{i}^{s}(\mathbf{X}_{1,A},\mathbf{S}_{1})-D_{i}^{s}(\hat{\mathbf{X}}_{1\rightarrow 2,A},\mathbf{S}_{2})||_{1}\right]$
- Content encoder가 source speaker를 disentangle 하지 못하는 경우, converted speech에 source speaker style이 포함될 수 있음
- 따라서 해당 repulsive style loss는 converted speech가 source speaker style을 가지는 것을 제한함
- Content representation의 경우, converted speech와 source speech 간의 content discriminator의 feature distance를 minimize 함:
- 그러면 converted mel-spectrogram의 total loss는:
(Eq. 19) $\mathcal{L}_{con}=\mathcal{L}_{adv*}^{G}(G;D^{c},D^{s})+\lambda_{c}\mathcal{L}_{content*}^{G}(G;D^{c})+\lambda_{s}\mathcal{L}_{style+}^{G}(G;D^{s})+\lambda_{s-}\mathcal{L}_{style-}^{G}(G;D^{s})$ - VoiceMixer의 discriminator와 generator에 대한 final loss는:
(Eq. 20) $\mathcal{L}^{D}=\mathcal{L}_{adv}^{D}(D^{c},D^{s};G)+\lambda_{con}\mathcal{L}_{adv*}^{D}(D^{c},D^{s};G)$
(Eq. 21) $\mathcal{L}^{G}=\mathcal{L}_{rec}+\lambda_{con}\mathcal{L}_{con}+\lambda_{pos}\mathcal{L}_{pos}(f_{c},f_{r})+\lambda_{neg}\mathcal{L}_{neg}(f_{c},f_{r})+\lambda_{advsc}\mathcal{L}_{advsc}(f_{c})$
- Disentangled discriminator로 convert 된 speech에 대해 feature matching loss를 적용할 수 있음
4. Experiments
- Settings
- Dataset : VCTK
- Comparisons : StarGAN-VC, AGAIN-VC, AutoVC, Blow
- Results
- Information Bottleneck Alignment
- Source speech와 downsampled content embedding 간의 alignment를 비교해 보면
- Contrastive loss $\mathcal{L}_{pos},\mathcal{L}_{neg}$가 없는 model은 diagonal alignment가 나타남
- 이는 content embedding이 content information 만을 represent 하지 않는다는 것을 의미 - $\mathcal{L}_{advsc}$가 없는 경우 Tacotron2의 attention alignment에 가깝게 나타남
- 이는 contrastive loss가 $\mathcal{L}_{advsc}$보다 content/speaker information을 disentangle 하는데 중요함을 의미
- Audio Quality and Style Transfer Performance
- 전체적으로 VoiceMixer가 가장 우수한 conversion 품질을 보임
- Zero-Shot 측면에서도 VoiceMixer의 성능이 가장 우수함
- Ablation Study
- Ablation study 측면에서 각 component를 제거하는 경우 성능 저하가 발생함
- Content and Speaker Disentanglement
- Content embedding에 대한 speaker classification 성능을 비교해 보면
- VoiceMixer는 가장 낮은 accuracy를 달성하여 speaker identity를 효과적으로 remove 하는 것으로 나타남
반응형
'Paper > Conversion' 카테고리의 다른 글
댓글