Segmental Contrastive Predictive Coding for Unsupervised Word Segmentation

Saurabhchand Bhati, Jesús Villalba, Piotr Zelasko, Laureano Moro-Velázquez, Najim Dehak

TL;DR

Segmental Contrastive Predictive Coding (SCPC) is a self-supervised speech model that simultaneously learns frame-level and segment-level representations from raw audio. By introducing a differentiable boundary detector, SCPC unifies phoneme and word boundary discovery into a single end-to-end framework, outperforming existing unsupervised baselines on both TIMIT and Buckeye benchmarks.

What Problem Does This Paper Address?

A primary goal of zero-resource speech processing is discovering linguistic units (such as phonemes and words) directly from continuous speech without transcriptions, lexicons, or phonetic alignments.

Recent self-supervised approaches, such as Contrastive Predictive Coding (CPC), successfully learn representations by predicting future audio frames given past context. However, standard CPC operates exclusively at a fixed, local frame level (e.g., every 10–30 ms). Speech, however, is fundamentally hierarchical: phonemes have variable durations, and sequences of phonemes form words. Prior methods usually tackle phoneme and word boundary detection through separate, multi-stage pipelines (e.g., initial subword heuristic segmentation followed by K-Means clustering, or dynamic programming applied to vector-quantized features). These disconnected steps cannot mutually inform one another and often propagate early segmentation errors.

Methods

SCPC addresses this gap by training an end-to-end architecture across two distinct temporal scales:

Raw Waveform ──► Frame Encoder (f_enc) ──► Latent Frames (Z)
                                               │
                        ┌──────────────────────┴──────────────────────┐
                        ▼                                             ▼
             Next Frame Classifier (L_NFC)            Differentiable Boundary Detector
                                                                      │
                                                                      ▼
                                                          Segment Averaging (W)
                                                                      │
                                                                      ▼
             Next Segment Classifier (L_NSC) ◄── RNN Context ◄── Segment Encoder (s_enc)
  1. Next Frame Classifier ($L_{\text{NFC}}$): A CNN encoder maps raw waveforms to 30 ms latent vectors spaced every 10 ms. It is trained via Noise Contrastive Estimation (NCE) to predict the immediate next frame against randomly drawn negative distractors from the same utterance.
  2. Differentiable Boundary Detector: The model measures cosine dissimilarity between adjacent latent frames. High dissimilarity values correspond to potential phonetic transitions. A localized peak detection filter is paired with a straight-through estimator (STE) to produce discrete boundary decisions ($0$ or $1$) in a batched, GPU-friendly, and differentiable manner.
  3. Segment Encoder & Next Segment Classifier ($L_{\text{NSC}}$): The frames belonging to each discovered variable-length segment are averaged via a vectorized matrix multiplication and passed through a segment encoder. An autoregressive RNN aggregates past segment representations into a context vector $c_t$, which is trained via NCE to predict the upcoming segment representation $s_{t+1}$.
  4. Inference for Both Tasks:
  5. Phoneme Segmentation: Directly identifies peaks in frame-to-frame feature dissimilarity.
  6. Word Segmentation: Looks for dips in the RNN's segment-level prediction confidence. Lower transitional probability between consecutive segments suggests a word boundary.

Datasets

The authors evaluate the model on standard English continuous speech corpora:

  • TIMIT: Split into standard train/test subsets (with 10% of train reserved for validation).
  • Buckeye: Split into an 80/10/10 train/val/test split of conversational speech.
  • ZeroSpeech 2019 (English set): ~15 hours of audio across 100+ speakers, used to test cross-corpus generalization when evaluating on Buckeye.
  • (Baseline comparison): The paper compares against CPC models augmented with 100h / 500h of LibriSpeech.

Key Insights and Ideas

  • Hierarchical Synergy: Jointly training frame- and segment-level objectives allows segment context to improve frame representations and vice versa.
  • Unified Segmentation Strategy: Because words are frequent collocations of phonemes, adjacent phonemic segments within a word have high transitional probability. By tracking prediction errors at the segment level, word boundaries emerge naturally without requiring a discrete text vocabulary.
  • Curriculum Scheduling Matters: Experiments revealed that phoneme boundary detection benefits from introducing the segment loss ($L_{\text{NSC}}$) early (epoch 1), whereas word segmentation benefits when segment loss is delayed (epoch 4). Delaying allows the frame encoder to stabilize low-level spectral representations before grouping them into higher-order units.
  • Threshold Trade-offs: Phoneme segmentation achieves optimal performance at a lower boundary peak threshold ($0.04$), matching high-density boundaries. Word segmentation requires a higher threshold ($0.08$–$0.09$) to suppress internal subword transitions.

Key Results

Evaluating boundary detection with a standard 20 ms tolerance window across precision, recall, F1, and R-value (a metric that penalizes over-segmentation):

  • Phoneme Segmentation (Table 1):
  • On TIMIT, SCPC achieves an F1 of 85.33% and R-val of 87.44, outperforming the previous state-of-the-art CPC baseline (83.71% F1 / 86.02 R-val) and even semi-supervised CPC+ trained with 100 hours of extra LibriSpeech data (84.13% F1).
  • On Buckeye, SCPC reaches 77.61% F1 and 80.72 R-val, beating both standard CPC (76.31% F1) and CPC+ (77.09% F1).
  • Word Segmentation (Table 2):
  • On the Buckeye test set, SCPC achieves an R-value of 44.5 (when trained on ZeroSpeech) and 43.4 (trained in-domain), with F1 scores around 31.4%–32.8%.
  • This significantly outperforms non-neural baselines like ES K-Means (R-val 39.7) and BES GMM (R-val 37.9), while avoiding the severe over-segmentation plaguing DP-based VQ models (e.g., VQ-CPC DP produced an over-segmentation rate of 421.4% and an R-val of -266.6).

Limitations and Future Work

  • Hyperparameter Sensitivity: Performance is closely tied to heuristic post-processing parameters, notably peak prominence thresholds and the training epoch at which segmental loss is activated.
  • Simple Segment Aggregation: The segment representation relies on uniform average pooling across all constituent frames, which may dilute temporal order within longer phonetic segments.
  • Language Breadth: Evaluations were restricted to clean and conversational English (TIMIT and Buckeye). Validation on typologically diverse or low-resource languages was not explored.

Summary updated

BibTeX
@inproceedings{bhati2021segmental,
  author = {Saurabhchand Bhati and Jesús Villalba and Piotr Zelasko and Laureano Moro-Velázquez and Najim Dehak},
  title = {{Segmental Contrastive Predictive Coding for Unsupervised Word Segmentation}},
  booktitle = {Interspeech},
  year = {2021},
  url = {https://openreview.net/forum?id=XFUJOZEqrO},
}
Figure