Segmentation with a Unigram language model is a tokenization method that computes the probability of text by assuming each subword occurs independently, and splits the text into subwords so that this probability is maximized. It was proposed by Kudo in 2018 together with "subword regularization," which deliberately varies the segmentation during training. It is one of the two methods available in SentencePiece.
Even with the same vocabulary, a single piece of text can be segmented in many ways. For example, if the vocabulary contains the Japanese symbols 深層 (shinsō, "deep"), 学習 (gakushū, "learning"), and the single characters 深, 層, 学, and 習, then 深層学習 ("deep learning") can be split as "深層 / 学習" or as "深 / 層 / 学習." BPE and WordPiece settle on a single segmentation through a fixed procedure, so they cannot tell how plausible other segmentations are.
The Unigram language model assigns a probability to each segmentation. This makes two things possible.
- Choosing the most plausible segmentation: the segmentation with the highest probability can be found efficiently.
- Sampling various segmentations according to their probabilities: showing a different segmentation each time during training helps the model learn how words are composed and makes it robust to segmentation variation and noise (subword regularization).
The way the vocabulary is built is also the opposite of BPE. BPE starts from characters and adds symbols, whereas the Unigram language model starts from a large vocabulary and removes unnecessary symbols.

