티스토리 뷰
Paper/Representation
[Paper 리뷰] SyllableLM: Learning Coarse Semantic Units for Speech Language Models
feVeRin 2025. 6. 8. 06:43반응형
SyllableLM: Learning Coarse Semantic Units for Speech Language Models
- Audio와 같은 continuous data에 대한 tokenization은 fixed size convolution이나 discrete clustering에 의존하므로 data의 semantic structure와 align 되지 않음
- SyllableLM
- Pre-trained encoder loss의 correlation을 analyze 하여 noisy boundary를 추출
- Distillation technique을 통해 model representation을 iteratively improving
- 논문 (ICLR 2025) : Paper Link
1. Introduction
- Spoken language에 대한 language model은 semantically meaningful speech를 output 하는데 어려움이 있음
-> 그래서 syllable-like speech token을 추출하는 SyllableLM을 제안
- SyllableLM
- Pre-trained SSL model에서 다양한 masking span에 대한 loss를 analyze하여, unannotated speech에 대한 noisy syllable-like segmentation을 reveal하는 LossPred를 도입
- LossPred syllable-like segmentation에서 bootstrapping을 통해 SSL model의 feature space를 sharpen하는 SylBoost를 구성
- Quantized SylBoost unit을 tokenization으로 SpeechLM에 해당하는 SyllableLM을 training
< Overall of Paper >
- Semantic information을 preserve하면서 speech representation을 coarser syllable-like unit으로 merge 하는 self-supervised learning model
- 결과적으로 기존보다 뛰어난 성능을 달성
2. Learning Self-Supervised, Syllable-like Representations from Raw Speech
- 논문은 low-bitrate speech unit을 추출하기 위해 bootstrapping process를 도입함
- LossPred: Extracting Syllable-like Segmentation from Relations in HuBERT's Loss
- LossPred는 pretrained HuBERT에서 phone이 아닌 syllable, word-level unit boundary를 automatically extract 하는 것을 목표로 함
- 이는 유사한 loss function을 사용하는 WavLM, Wav2Vec 2.0과 같은 SSL에도 적용될 수 있음
- 특히 해당 speech SSL model은 모두 input token을 randomly masking 하고 unmasked input에 따라 masked input을 predict 하는 Masked Language Modeling (MLM) training objective를 활용함 - 여기서 LossPred는 entire word에 대한 input token이 masked token으로 replace되었을 때, HuBERT model loss가 해당 timestep에서 relatively high 할 것을 expect 함
- 특히 HuBERT는 missing span을 predict 하기 위해 word identity와 underlying acoustic을 jointly predict 해야 함
- BUT, word의 latter portion만 mask out 되는 경우, word prefix가 주어졌을 때 해당 masked region을 infilling 하는 것이 훨씬 쉬움 - 결과적으로 contiguous mask를 token span에 걸쳐 iteratively shift 하여 loss를 비교해 보면, masked semantic unit (word, syllable 등)에 해당하는 span이 strong decrease 하게 됨
- 이는 mask shift를 통해 word의 beginning/end가 partially reveal 되기 때문
- 특히 HuBERT는 missing span을 predict 하기 위해 word identity와 underlying acoustic을 jointly predict 해야 함
- LossPred는 student, teacher model에 해당하는 2개의 frozen off-the-shelf HuBERT를 사용함
- Student model은 teacher model의 $L$ layer에서 quantized representation을 predict 하도록 optimize 되고, teacher model은 기존의 pretrained model을 활용함
- Input waveform $W$가 주어지면, $W$를 teacher model에 전달하여 teacher label을 추출하고 $k$-means를 통해 $L$ layer에서의 representation을 quantize 함
- 이때 teacher label은 timestep $T$에 대해 $Y_{\{1...T\}}$와 같이 주어짐 - HuBERT pretraining과 마찬가지로 논문은 student model에 $W$의 corrputed version을 제공하고, selected timestep에서 student CNN feature extraction output을 mask embedding으로 replace 함
- 이를 통해 얻어지는 student CNN feature는 masked out timestep $M=\{t_{1},...,t_{m}\}$에 대해 $X_{\{1...T\}}^{M}$과 같이 주어짐 - 이후 pretext task를 따라 student는 $X^{M}$ condition 하에서 masked timestep $Y_{t},t\in M$의 teacher label을 predict 하고 Cross-Entropy loss를 통해 evaluate 됨:
(Eq. 1) $\mathcal{L}_{HuBERT}:=-\log p(Y_{t}|X^{M})$
- Loss prediction matrix를 $C$라고 하면, 해당 matrix는 mask 할 $s$ timestep의 contiguous sliding window를 따라 move 하면서 student model loss를 look up 함
- 즉, $C$는 loss의 raw probability를 modeling 하고, 이때 column은 predict 할 timestep, row는 closest unmaksed token을 나타냄:
(Eq. 2) $C_{r,c}\in\mathbb{R}_{+}^{T\times T}=\left\{\begin{matrix}
p(Y_{c}|X^{M})|M=\{r+1,r+2,...,r+s\}\cap[1,T], & \text{if}\,\,r<c,|r-c|\leq\left\lfloor\frac{s}{2}\right\rfloor \\
p(Y_{c}|X^{M})|M=\{r-1,r-2,...,r-s\}\cap[1,T], & \text{if}\,\,r>c,|r-c|\leq\left\lfloor\frac{s}{2}\right\rfloor \\
0, & \text{otherwise} \\
\end{matrix}\right.$ - 한편으로 논문은 $C$의 upper/lower triangle을 separately calculate 하고, 이를 위해 first half의 mask span에 대한 loss가 mask 이후의 information과 uncorrelate 되어 있다고 가정함
- 그러면 upper triangle에서 각 entry $C_{r,c}$는 row $r$, column $c$의 $p(Y_{c}|X^{M})$에 해당하므로 $X^{M}$에서 mask span이 time $r$ 이후부터 start 함을 의미함
- 반대로 lower triangle에서 $C_{r,c}$는 time $r$ 직전에 mask span이 end 하는 경우의 $p(Y_{c}|X^{M})$에 해당함 - 여기서 논문은 대부분의 spoken word를 masking 할 수 있는 long enough duration인 1s에 해당하는 span size $s=50$을 사용함
- Upper triangle은 mask span의 first 25 timestep을 사용하고 lower triangle은 last 25 timestep을 사용하여 calculate 됨
- 즉, $C$는 loss의 raw probability를 modeling 하고, 이때 column은 predict 할 timestep, row는 closest unmaksed token을 나타냄:
- 결과적으로 $C$에서 boundary $B=\{b_{1}=1<b_{2}<...<b_{k+1}=T+1\}$을 가지는 $k$ semantic region을 추출하기 위해, $C$를 input feature-similarity matrix로 취급하고 min-cut algorithm을 적용함:
(Eq. 3) $ B:=\underset{ \{b_{1}=1<b_{2}...<b_{k+1}=T+1\} }{\arg\max}\sum_{t=1}^{k}\frac{\sum_{i,j=b_{t}}^{b_{t+1}-1}C_{i,j}}{\sum_{i=b_{t}}^{b_{t+1}-1}\sum_{j=1}^{T}(C_{i,j}+C_{j,i})- \sum_{i,j=b_{t}}^{b_{t+1}-1}C_{i,j}}$
- 이때 utterance length에 비례하도록 $k$를 choice 하여 boundary의 sample rate를 control 할 수 있음 - LossPred에 의해 추출된 semantic unit은 syllable-like 하지만, 각 sliding window location에 대해 one forward pass를 사용하므로 expensive 함
- 이를 위해 3s의 gap으로 multiple masked span을 simultaneously extract 함
- Arbitrarily-sized audio에서 $C$를 calculate 하기 위해서는 student model에 대해 200 forward pass가 필요함
- BUT, SylBoost training을 initialize 하는데 LossPred는 한 번만 수행되므로 semantic unit extraction speed에는 영향을 주지 않음
- 이는 유사한 loss function을 사용하는 WavLM, Wav2Vec 2.0과 같은 SSL에도 적용될 수 있음
- SylBoost: Bootstrapping Pseudo-Syllabic Units with Iterative Distillation
- LossPred에 의해 predict 된 initial boundary를 기반으로 noisy-student-teacher-learning paradigm을 활용하여 semantic representation을 추출함
- 이때 논문은 input student model의 feature space에서 syllabic organization을 sharpen 하는 것을 목표로 함
- SylBoost student, teacher model을 initialize 하기 위해 pre-trained HuBERT, Data2Vec을 채택함 - SylBoost procedure는:
- 먼저 hypothesized speech segment boundary set $B=\{b_{1}=1<b_{2}<...<b_{k+1}=T+1\}$에 대해, 두 boundary 사이의 모든 temporal token을 disjoint group $G_{i}=\{t|b_{i}\leq t<b_{i+1}\}$로 grouping 함
- $H_{t}$를 $t\in G_{H}$를 포함하는 group의 index라고 할 때, 논문은 syllabic correlation을 따라 select 된 layer $L$의 feature를 modeling 하기 위해 (Eq. 4)의 SylBoost loss를 적용함
- 이를 통해 student feature $X_{\{1...T\}}^{(L)}$과 teacher feature $Y_{\{1...T\}}^{(L)}$을 얻음
- Loss는 각 timestep에서 student feature $X_{t}^{(L)}$과 해당 timestep group 내의 teacher feature 간의 Mean Squared Error로 얻어짐:
(Eq. 4) $ \mathcal{L}_{SylBoost}:=\frac{1}{T}\sum_{t=1}^{T}\left(X_{t}^{(L)}-\frac{1}{|G_{H_{i}}|} \sum_{s\in G_{H_{i}}}Y_{s}^{(L)}\right)^{2}$ - Training 이후 SylBoost는 sharpened latent feature $X_{t}^{(L)}$을 가진 student model을 얻음
- 여기서 논문은 아래 그림과 같이 element $A_{i,j}$가 feature $X_{i}^{(L)},X_{j}^{(L)}$ 간의 $L2$ distance를 나타내는 pairwise frame distance의 matrix $A$를 calculate 함
- 이후 cut algorithm을 사용하여 $A$에서 boundary를 추출함
- 이를 통해 new pseudo-label boundary를 생성할 수 있고, SylBoost를 다시 실행하여 better boundary를 얻을 수 있음 - 최종적으로 각 SylBoost boundary group에 대해 $L$ layer에서 feature를 mean pooling 하여 discrete cluster를 추출하고 $k$-means를 적용하여 cluster를 생성함
- 이후 agglomerative clustering을 통해 desired unit 수로 similar cluster를 merge 함
- 이때 논문은 input student model의 feature space에서 syllabic organization을 sharpen 하는 것을 목표로 함
- Efficient Extraction of Unit Boundaries for SylBoost
- Learned feature representation에서 boundary index를 추출하기 위해 mincut approach를 고려할 수 있음
- BUT, speech의 경우 해당 approach는 느리고 parallelize 하기 어려우므로 downstream language modeling에 대한 bottleneck이 발생함
- 따라서 논문은 efficient approach로써, $k+1$ potential boundary가 주어지면 각각의 unit에서 assigned group의 mean까지의 distance 합을 minimize 하는 group을 choice 함:
(Eq. 5) $ \displaystyle{B:=\underset{\{b_{1}=1<b_{2}...<b_{k+1}=T+1\}}{\arg\min} \sum_{i=1}^{k}\sum_{j=b_{i}}^{b_{i+1}-1}\left( X_{j}^{(L)}-\frac{1}{b_{i+1}-b_{i}}\sum_{l=b_{i}}^{b_{i+1}-1}X_{l}^{(L)}\right)^{2}}$
- 이때 $G$ token의 maximum group length를 choice 하여 setting을 restirct 할 수 있고, 논문은 token의 1s에 해당하는 $G=50$을 사용함 - 이를 통해 얻어지는 efficient extraction algorithm은:
- Token $t$에서 끝나는 length $g$의 group cost $D_{t, g}$에서 distance array $D\in\mathbb{R}^{T\times G}$를 calculate 한 다음,
- Dynamic programming을 통해 해당 distance array에서 minimal interval cover를 solve 함
- 해당 approach는 $\mathcal{O}(k)$의 data-aware sequential step 내에서 수행됨
3. SyllableLM: Speech Language Modeling on Coarse Units
- Raw audio modeling은 Audio-to-Unit tokenization, Tokenized unit에 대한 language modeling, Token-to-Waveform decoding의 3단계로 구성됨
- 이때 unit tokenization은 SylBoost를 통해 수행되고, 나머지는 SyllableLM을 통해 수행됨
- Language Model
- AudioLM을 따라 input token sequence $x_{1},...,x_{T}$가 주어졌을 때, $p(x_{t}|x_{t-1},...,x_{1})$을 approximate 하는 autoregressive Transformer decoder language model을 채택함
- 특히 SylBoost의 discrete cluster output에서 training 된 해당 language model을 main SpeechLM으로 사용함
- 추가적으로 논문은 $\text{<BOS>}$ token을 prepend 함
- Token to Speech Decoding
- SylBoost token을 audio로 변환하기 위해, 논문은 ELLA-V의 interleaved decoding strategy를 채택하여 TWIST unit을 output 하고 해당 output을 vocoder에 cascading 하여 waveform을 얻음
- 해당 interleaving strategy는 VALL-E와 같은 text-to-speech model과 달리 high-difficulty setting에서 우수한 성능을 보이므로 논문은 이를 resynthesis에 활용함
- 이때 training 중에 unit을 interleave 하기 위해서는:
- 먼저 각 SylBoost unit과 TWIST unit의 start-timestep을 ascending order로 sort 함
- 여기서 noisy SylBoost boundary를 고려하여 sorting 이전에 각 SylBoost unit의 start-time에서 2개의 TWIST unit에 해당하는 0.08s를 subtract 함 - 이후 syllable의 phone의 drop-in replacement로 사용하고 greedy decoding을 적용함
- 이를 통해 얻어지는 model을 Interleaved-Vocoder-LM이라고 함
- 먼저 각 SylBoost unit과 TWIST unit의 start-timestep을 ascending order로 sort 함
- 최종적으로 sample에 대한 continuation을 생성하기 위해서는:
- Sample에서 syllable-unit과 TWIST unit을 추출하고, SpeechLM에서 syllable-unit continuation을 sampling 함
- Sample TWIST unit, sample syllable-unit, continued syllable-unit으로 condition 된 interleaved model을 통해 TWIST unit을 continuing 함
- 최종적으로 vocoder를 통해 speech로 resynthesizing 함
4. Experiments
- Settings
- Dataset : LibriSpeech, LibriLight
- Comparisons
- Speech Unit : SD-HuBERT, Feat-Sim
- Language Model : AudioLM, TWIST, GSLM, Moshi
- Results
- Syllable boundary detection 측면에서 SylBoost가 가장 우수한 성능을 보임
- LossPred bootstrapping을 적용하는 경우 SylBoost의 성능을 더욱 향상할 수 있음
- Controllability 측면에서 higher unit rate는 phone과 연관되고, lower unit rate는 syllable, word와 연관됨
- 추가적으로 inference speed 측면에서 SylBoost는 기존보다 빠른 RTF를 달성함
- Unit resynthesis 측면에서 SylBoost는 SD-HuBERT 보다 더 나은 성능을 보임
- Spoken Language Modeling
- SyllableLM은 1.3B parameter의 TWIST, 7B parameter의 Moshi 보다 더 나은 성능을 달성함
- Unit rate, unit frequency를 변경하는 경우에도 우수한 sWUGGY, sBLIMP를 달성함
- 추가적으로 end-to-end continuation 측면에서도 뛰어난 PPX, VERT 결과를 보임
반응형
'Paper > Representation' 카테고리의 다른 글
댓글