728x90

본 논문의 제목은 Mockingjay: Unsupervised speech representation learning with deep bidirectional transformer encoders [1] 이며, 앞서 소개한 DeCoAR(kaen2891.tistory.com/84) 의 Self-supervised learning 개념을 이용하여 reconstruction task를 Transformer로 진행하면서 representation learning을 진행한 논문임

또한, BERT의 MLM (Masked language model) 개념을 MAM (Masked acoustic model) task로 적용하였음

 

 

Overview

1. Mockingjay라는 새로운 음성 representation learning 방법 제시

- Bidirectional Transformer encoder를 이용하여 대규모 unlabeled 음성을 활용하여 pre-traning 진행

- BERT와 비슷한 Masked Acoustic Model (MAM) 소개

 

2. Pretext (pre-training)

- 음성의 일정 frame에 대해 masking (0값)을 씌우고, pre-training의 모델은 해당 masking된 frame의 original frame을 reconstruction loss를 사용하여 예측

 

3. Downstream task

- 기존 Supervised에서 널리 쓰인 MFCC기반의 phoneme classification, speaker recognition 보다 제안한 Mockingjay의 fine-tuning이 더 좋은 성능을 보임

 

Proposed method

1. MAM pre-training task

- BERT 와 유사함

Masked Acoustic Model

- Input: 80-dimensional mel-spectrogram

- Output: Prediction head를 거친 vector들

 

1) Masking frame에 대한 확률적 policy

Mockingjay's probabilistic policy for masking frames

- BERT와 상당히 유사함

- 전체 frame의 15%에 대하여, 

-- 80%의 확률로 선택된 15%에 대해 0값으로 masking

-- 10%의 확률로 선택된 15%에 대해 다른 frame과 교체

-- 10%의 확률로 선택된 15%에 대해 아무것도 안함

 

2) Input feature: masked spectrogram

Masking 된 spectrogram
Masking 된 spectrogram

 

2. Prediction Head

Prediction head

- 위의 그림 처럼 0값, 즉 masking 된 frame은 Mockingjay를 통과 후 Prediction head를 한 번 더 거침

- Prediction head는 2개의 FFN과 layer-normalization으로 구성되어 있음

- Prediction head의 Input은 마지막 encoder layer가 됨

 

3. Representation learning

Representation learning

- Prediciton head의 output은 masking 된 input의 original frame과의 L1 loss 통해 representation learning이 진행됨

- 즉, Mockingjay의 keypoint는 masking, changing된 input frame이 통과된 output Prediction head와 real frames 들 간의 L1 loss를 사용하여 reconstruction을 배우게 됨

- 이에 대한 visualization은 아래와 같음

Representation learning in Mockingjay

4. Consecutive Masking and Downsampling

Downsampling and consecutive masking

- 해당 논문에서, sequence의 길이를 줄임과 동시에 더 긴 범위에 걸쳐 masking을 하기 위하여 위의 그림과 같이 연속적인 masking을 제안하였음

 

1) Downsampling

- Downsampling의 경우, 연속된 음성 $n$개를 $R_{factor}$계수를 사용하여 $n$개의 frame을 하나로 stack 함

- 즉, (80, 1000)의 shape을 갖는 spectrogram을 $R_{factor}=3$을 사용하면 (240, 334)가 됨

- 수식으로 나타내면, $X\in{\mathbb{R}^l*d}\rightarrow\hat{X}\in{\mathbb{R}^{\frac{l}{a}*ad}}$로 됨

- 여기에서 $l$은 음성 발화 길이이며, $a$는 $R_{factor}$, $d$는 dimension임

 

2) Consecutive masking

- 더 긴 범위에 걸쳐 masking을 진행하기 위해 위의 그림처럼 3개를 진행함

- 기존의 Random masking 15% + consecutive $C_{num}$이 추가되는 방식

- 논문에서는 $C_{num}$에 대해 Base=7, Large=3을 사용

 

5. Final model flow

Mockingjay model flow

1) 무작위 마스킹 15% + Consecutive $C_{num}$ 적용

2) $R_{factor}$를 사용하여 frame length를 줄임 (sub-sampling)

3) Projection layer를 사용하여 240-dimension에서 768-dimension으로 변경 ($H_{dim}=768$)

4) Sinusoidal positional encoding 적용

5) Bidirectional Transformer encoder 통과

- Base ($L=3$), Large ($L=12$)

- 12개의 multi-head attention 사용 ($A_{num}=12$)

- FFN에는 3072-dimension으로 구성 ($F_{dim}=3072$)

6) Prediction head로 representation 추출

- Prediction head는 오로직 pre-training (upstream task)에서만 사용됨

- 768-dimension -> 80-dimension

7) L1 loss를 사용하여 선택된 15%의 prediction head와 ground-truth frame간의 reconstruction error를 계산하여 최소화함

 

6. Downstream task

1) Feature extraction

Feature extraction of Mockingjay

- Mockingjay model를 freezing시키고, 마지막 Prediction head를 그대로 사용함

- 이 위에 classifier 1개를 추가하여 ASR 평가

 

2) Weighted sum from all layers

- 마찬가지로 Mockingjay model를 freezing 시킴

- 1)에서는 마지막 layer를 가져다 썼다면, 여기에서는 ELMo [2]에서 제안된 것 처럼 모든 hidden layer의 weighted sum을 하여 사용함

Feature extraction and weighted sum from all layers

 

3) Fine-tuning

- 이 task에서는, pre-trained 된 Mockingjay를 downstream task의 initial weight로 두고 같이 학습 진행

Fine-tuning task

 

Experimental setups

총 3가지의 downstream task 실험에 대해 진행 (즉, pre-train 이후 label 있는 데이터로 진행한 것임)

 

1) Phoneme classification (72 classes)

- Train 셋: LibriSpeech 360-hour, Test 셋: LibriSpeech test-clean

 

2) Speaker recognition (63 classes)

- Train 셋: 90% of LibriSpeech 100-hour, Test 셋: 10% of LibriSpeech 100-hour

 

3) Sentiment classification on spoken content

- 도메인과 상관없음을 보이기 위해 다른 데이터셋을 이용하여 평가 진행: MOSEI [3]

Results

 

1) Phoneme classification

- Mel-spectrogram을 사용한 linear phone classifiers

- Montreal Forced Aligner [4]를 사용하여 label을 얻었으며, 이를 기반으로 평가 진행

Results of phone classification

- Downstream task의 labeled data가 늘어날 수록 전체적인 성능은 올라감

- 적은 양 대비 제안한 Fine-tuning의 결과가 가장 좋았음

- 360시간 모두를 사용하여도 Supervised 및 APC [5]를 능가함

 

2) Speaker recognition

Results of speaker and sentimental accuracy

- 1개의 RNN classifier를 사용하여 downstream task 진행

- Fine-tuning 결과는 98.05%로서 가장 좋은 성능을 얻었음

 

3) Sentiment classification on spoken content

- 1개의 RNN classifier를 사용하여 downstream task 진행

- Mockingjay로 부터 weighted sum 하여 freezing시킨 feature extractor가 가장 높은 성능인 71.05%를 달성함

 

Conclusion

- 이전의 방법들은 과거의 frame에 의존하거나 미래의 frame에 의존하는 Contrastive learning 기반의 방법인 CPC [5](kaen2891.tistory.com/77?category=462780), wav2vec [6](kaen2891.tistory.com/79?category=462780), APC [7]들이었음

- 제안한 Mockingjay는 과거와 미래의 정보를 공동으로 조건화하여 현재 frame을 예측하도록 설계함

- 예측 frame과 Ground-truth frame 간의 MAM을 사용하여 L1 loss 기반의 reconstruction을 통해 representation learning 제안

- 실험 결과는 fine-tuning 결과가 효과가 있음을 보임

 

Reference

[1] Liu, Andy T., et al. "Mockingjay: Unsupervised speech representation learning with deep bidirectional transformer encoders." ICASSP 2020-2020 IEEE International Conference on Acoustics, Speech and Signal Processing (ICASSP). IEEE, 2020.

[2] Peters, Matthew, et al. "Deep Contextualized Word Representations." Proceedings of the 2018 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies, Volume 1 (Long Papers). 2018.

[3] Zadeh, AmirAli Bagher, et al. "Multimodal language analysis in the wild: Cmu-mosei dataset and interpretable dynamic fusion graph." Proceedings of the 56th Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers). 2018.

[4] McAuliffe, Michael, et al. "Montreal Forced Aligner: Trainable Text-Speech Alignment Using Kaldi." Interspeech. Vol. 2017. 2017.

[5] Oord, Aaron van den, Yazhe Li, and Oriol Vinyals. "Representation learning with contrastive predictive coding." arXiv preprint arXiv:1807.03748 (2018).

[6] Schneider, Steffen, et al. "wav2vec: Unsupervised pre-training for speech recognition." arXiv preprint arXiv:1904.05862 (2019).

[7] Chung, Yu-An, et al. "An unsupervised autoregressive model for speech representation learning." arXiv preprint arXiv:1904.03240 (2019).

728x90

+ Recent posts