How do different tokenizers perform on downstream tasks in scriptio continua languages?: A case study in Japanese

Takuro Fujii, Koki Shibata, Atsuki Yamaguchi, Terufumi Morishita, Yasuhiro Sogawa

Introduction: The Tokenization Challenge in Scriptio Continua

In languages like English, whitespace provides a natural delimiter for tokenization. However, scriptio continua languages—such as Japanese, Chinese, and Thai—lack explicit word boundaries. Traditionally, NLP pipelines for these languages employ a two-step process: first, a morphological analyzer (MA) segments the text into word-level units; second, a subword tokenizer (SWT) further decomposes these units into a fixed vocabulary.

Example of the two-step tokenization process in Japanese: morphological analysis followed by subword tokenization.

While the impact of tokenization is well-documented in English, its effect on pretrained language models (PLMs) in scriptio continua contexts remains under-explored. This study systematically evaluates the interplay between four MAs (MeCab, Juman++, Sudachi, Vaporetto) and three SWTs (BPE, WordPiece, Unigram) across seven downstream tasks.

Methodology

To isolate the effects of tokenization, the researchers pretrained 15 distinct BERT-base models from scratch, each utilizing a unique combination of MA and SWT. These models were trained on a 3.3M sample corpus of Japanese Wikipedia and CC-100 data for 500,000 steps. Evaluation was conducted using the JGLUE benchmark (sentiment analysis, semantic similarity, inference, QA), Named Entity Recognition (NER), and Universal Dependencies (UD) for parsing.

A "Nothing" baseline—applying subword tokenization directly to raw text without prior morphological analysis—was included to test the necessity of MAs.

Comparative Performance Analysis

The experimental results reveal several critical insights regarding the necessity of morphological analysis and the relative performance of subword algorithms.

Performance of various tokenizer combinations across JGLUE and other downstream tasks.

The Necessity of Morphological Analysis

The most striking finding was the failure of WordPiece when applied without an MA. In Japanese, WordPiece often fails to identify subwords in long, unsegmented strings, leading to an excessive number of [UNK] tokens. This resulted in unstable pretraining and a catastrophic performance drop (averaging 33.5 vs. ~86.5 with an MA). Even for BPE, skipping the MA stage led to a significant performance decrease (83.3 vs. 87.1).

Subword Tokenizer and MA Selection

While BPE and Unigram generally outperformed WordPiece, the choice of morphological analyzer proved to be task-dependent. For instance, Vaporetto showed superior performance in semantic similarity (JSTS), while Juman++ excelled in NER, and Sudachi led in dependency parsing (UD). Statistical tests (Kruskal-Wallis) confirmed that these differences are significant, suggesting that specific MAs align better with the linguistic requirements of certain tasks.

Conclusion

This study demonstrates that for scriptio continua languages, morphological analysis is a prerequisite for high-performing PLMs. While BPE and Unigram are robust subword choices, there is no "universal" best morphological analyzer; the optimal choice depends on the specific downstream application. Future research should investigate whether these patterns hold for generative architectures like T5 or GPT and explore automated methods for selecting optimal tokenizer pairs.

Summary updated

BibTeX
@inproceedings{fujii2023how,
  author = {Takuro Fujii and Koki Shibata and Atsuki Yamaguchi and Terufumi Morishita and Yasuhiro Sogawa},
  title = {{How do different tokenizers perform on downstream tasks in scriptio continua languages?: A case study in Japanese}},
  booktitle = {Annual Meeting of the Association for Computational Linguistics},
  year = {2023},
  doi = {10.18653/v1/2023.acl-srw.5},
}
Figure