Where to cut, how deep: BPE and Unigram-LM on chemistry SMILES

📅 2026-07-06
📈 Citations: 0
Influential: 0
📄 PDF
🤖 AI Summary
This study addresses the lack of systematic comparison among subword tokenization algorithms in SMILES-based chemical language modeling, where unvalidated default schemes are commonly adopted. Under a fixed 165-token base vocabulary, controlled experiments across diverse chemical corpora and pre-tokenization strategies compare Byte Pair Encoding (BPE) and Unigram Language Modeling (Unigram-LM). The work reveals, for the first time, that the subword vocabularies generated by these two methods exhibit minimal overlap—Jaccard coefficients ≤0.161 overall and ≤0.05 among high-frequency tokens—and display systematic differences in segmentation granularity: Unigram-LM produces 29–41% more tokens on average, while BPE acts effectively as a coarsened variant of Unigram-LM for 80–99% of molecules. These findings demonstrate that the choice of tokenization algorithm is a critical design decision rather than a negligible default setting in molecular sequence modeling.
📝 Abstract
Every chemical language model reading SMILES begins with a tokenizer, yet the field has inherited byte-pair encoding (BPE) from natural language with little scrutiny. In natural language, BPE's principal alternative, Unigram-LM, is known to build structurally different vocabularies. Whether that contrast survives in chemistry was open. We report a controlled comparison of BPE and Unigram-LM over a fixed 165-token chemistry base, at the small vocabulary sizes where token embeddings are learnable, across three corpus typologies (diverse, drug-like, natural-products) and both pre-tokenization boundary policies. The two do not converge. In all 22 matched conditions they build near-disjoint subword vocabularies: cross-algorithm Jaccard overlap on the learned pieces never exceeds 0.161, and at most 0.05 once weighted toward the high-frequency pieces a model updates most. Unigram-LM also segments held-out molecules into 29-41% more tokens; the arms largely agree on where to cut but not how deeply, so BPE's segmentation is a strict coarsening of Unigram-LM's on 80-99% of molecules. The separation holds across corpus, boundary, and vocabulary size, persisting even at eight times that scale. The subword algorithm is therefore a modeling decision, not a free default. The study trains no language models.
Problem

Research questions and friction points this paper is trying to address.

SMILES
tokenization
BPE
Unigram-LM
subword segmentation
Innovation

Methods, ideas, or system contributions that make the work stand out.

subword tokenization
SMILES
Unigram-LM
BPE
chemical language modeling
💼 Related Jobs
No related jobs found.
H
Hunter Heidenreich
Independent Researcher