Incorporating Context into Subword Vocabularies

Shaked Yehezkel, Yuval Pinter
10/13/2022
cs.CL

Official code: MeLeLBGU/SaGe (28 stars, Python, MIT, last commit 2024-11-30).

Abstract

Most current popular subword tokenizers are trained based on word frequency statistics over a corpus, without considering information about co-occurrence or context. Nevertheless, the resulting vocabularies are used in language models' highly contextualized settings.

Show full abstract

We present SaGe, a tokenizer that tailors subwords for their downstream use by baking in the contextualized signal at the vocabulary creation phase. We show that SaGe does a better job than current widespread tokenizers in keeping token contexts cohesive, while not incurring a large price in terms of encoding efficiency or domain robustness. SaGe improves performance on English GLUE classification tasks as well as on NER, and on Inference and NER in Turkish, demonstrating its robustness to language properties such as morphological exponence and agglutination.

View on arXivView PDF

Code Implementations(1)

MeLeLBGU/SaGeOfficial100%
MIT

Code for SaGe subword tokenizer (EACL 2023)

286Python, ShellJan 24, 20232 years agoMIT

Similar Papers

Cite this paper

@article{yehezkel2022incorporating,
  title  = {Incorporating Context into Subword Vocabularies},
  author = {Shaked Yehezkel and Yuval Pinter},
  year   = {2022},
  eprint = {2210.07095},
  archivePrefix = {arXiv},
  url    = {https://arxiv.org/abs/2210.07095}
}

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/2210.07095.svg)](https://codeofpaper.com/paper/2210.07095)

Discussion