Unsupervised Subtitle Segmentation with Masked Language Models

David Ponce, Thierry Etchegoyhen, Victor Ruiz GómezACL 2023

Introduction

Creating readable subtitles is a complex linguistic task. Beyond simple translation, the placement of line breaks significantly impacts a viewer's "cognitive load." If a line breaks in the middle of a noun phrase or a verb-object pair, the text becomes harder to process. Traditionally, the industry has relied on two extremes: simple character-counting (linguistically "blind" but fast) or supervised machine learning models (linguistically aware but data-hungry). This paper introduces an unsupervised "middle way" that leverages pretrained Masked Language Models (MLMs) to achieve high-quality segmentation without specialized training data.

Methodology: Punctuation as a Proxy

The researchers propose that punctuation serves as a natural signal for syntactic closure. By using a pretrained MLM (such as BERT), the system can evaluate candidate segments by predicting the likelihood of a punctuation mark at a potential break point.

Qualitative comparison between character-counting (CountChars) and the proposed MLM-based segmentation.

Three scoring methods were evaluated:

  1. Substitution: Masking the final word of a segment to see if the model predicts punctuation.
  2. Insertion: Appending a [MASK] token to the end of a segment and measuring the likelihood of a punctuation mark appearing there.
  3. LM-Score: Calculating the average "pseudo-perplexity" of the sequence.

The Insertion method proved most effective. To further enhance performance, the authors introduced Overt Clueing (OC), which boosts scores when original text already contains punctuation. Because the system only considers candidates within a defined character limit, it ensures perfect adherence to industry constraints by design.

Key Results and Portability

The MLM-based approach was tested using the MuST-Cinema corpus across multiple languages, including English, Spanish, German, and Italian. The results demonstrate that the unsupervised method significantly outperforms the standard character-counting baseline and remains competitive with supervised models, particularly in zero-shot scenarios.

Performance metrics across multiple languages, demonstrating the MLM method's competitive Sigma scores and perfect 100% CPL (Characters Per Line) compliance.

Key findings include:

  • Constraint Satisfaction: Unlike supervised neural models, which often fail to respect character limits (CPL), the MLM approach achieved 100% conformity across all tests.
  • Zero-Shot Capability: The method is instantly portable to any language supported by a standard language model, making it a highly scalable solution for low-resource languages where professional subtitle data is scarce.
  • Linguistic Intelligence: By using punctuation as a proxy, the model "knows" the rhythm of language without explicit training on segmentation tasks.

Limitations and Future Directions

While effective, the current model is "audio-blind," ignoring silence or pauses in speech that often dictate subtitle breaks. Future work may involve integrating "forced alignment" to match text with audio timestamps. Additionally, the model does not yet optimize for visual symmetry (e.g., pyramidal layouts). Despite these limitations, the approach offers a low-compute, language-agnostic solution for the global media localization pipeline.

Summary updated

BibTeX
@inproceedings{ponce2023unsupervised,
  author = {David Ponce and Thierry Etchegoyhen and Victor Ruiz Gómez},
  title = {{Unsupervised Subtitle Segmentation with Masked Language Models}},
  booktitle = {Annual Meeting of the Association for Computational Linguistics},
  year = {2023},
  doi = {10.18653/v1/2023.acl-short.67},
}
Figure