Parity-Aware Byte-Pair Encoding: Improving Cross-lingual Fairness in Tokenization

Negar Foroutan, Clara Meister, Debjit Paul, Joel Niklaus, Sina Ahmadi +2 more
8/6/2025
cs.CLcs.AIcs.LG

No official code found. Best implementation: swiss-ai/parity-aware-bpe (20 stars, MIT, last commit 2026-04-18).

Abstract

Tokenization is the first -- and often least scrutinized -- step of most NLP pipelines. Standard algorithms for learning tokenizers rely on frequency-based objectives, which favor languages dominant in the training data and consequently leave lower-resource languages with tokenizations that are disproportionately longer, morphologically implausible, or even riddled with <UNK> placeholders. This phenomenon ultimately amplifies computational and financial inequalities between users from different language backgrounds. To remedy this, we introduce Parity-aware Byte Pair Encoding (BPE), a variant of the widely-used BPE algorithm. At every merge step, Parity-aware BPE maximizes the compression gain of the currently worst-compressed language, trading a small amount of global compression for cross-lingual parity. We find empirically that Parity-aware BPE leads to more equitable token counts across languages, with negligible impact on global compression rate and no substantial effect on language-model performance in downstream tasks.

View on arXivView PDF

Code Implementations(1)

MIT

Parity-Aware Byte-Pair Encoding: Improving Cross-lingual Fairness in Tokenization [ACL 2026]

208PythonJul 29, 20256 months agoMIT
bpellmsmultilingual-nlpmultilingual-tokenizationtokenization

Similar Papers

Cite this paper

@article{foroutan2025parityaware,
  title  = {Parity-Aware Byte-Pair Encoding: Improving Cross-lingual Fairness in Tokenization},
  author = {Negar Foroutan and Clara Meister and Debjit Paul and Joel Niklaus and Sina Ahmadi and Antoine Bosselut and Rico Sennrich},
  year   = {2025},
  eprint = {2508.04796},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2508.04796v2}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2508.04796.svg)](https://codeofpaper.com/paper/2508.04796)

Discussion