Umeå University's logo

umu.sePublications
Change search
Link to record
Permanent link

Direct link
Martens, Willeke
Publications (3 of 3) Show all publications
Berglund, M., Martens, W. & van der Merwe, B. (2026). Constructing a BPE tokenization DFA. Theoretical Computer Science, 1083, Article ID 116131.
Open this publication in new window or tab >>Constructing a BPE tokenization DFA
2026 (English)In: Theoretical Computer Science, ISSN 0304-3975, E-ISSN 1879-2294, Vol. 1083, article id 116131Article in journal (Refereed) Published
Abstract [en]

Many natural language processing systems operate over tokenizations of text to address the open-vocabulary problem. In this paper, we give and analyze an algorithm for the efficient construction of deterministic finite automata (DFA) designed to operate directly on tokenizations produced by the popular byte pair encoding (BPE) technique. This makes it possible to apply many existing techniques and algorithms to the tokenized case, such as pattern matching, equivalence checking of tokenization dictionaries, and composing tokenized languages in various ways. The construction preserves some key properties of the automaton, and we use this to establish asymptotic bounds on the state complexity of the automata that result. Finally, we demonstrate how to construct an input-deterministic (subsequential) string-to-string transducer which precisely describes the relationship between strings and their correct tokenizations.

Place, publisher, year, edition, pages
Elsevier, 2026
Keywords
Automata theory, Byte pair encoding, Tokenization
National Category
Computer Sciences
Identifiers
urn:nbn:se:umu:diva-257600 (URN)10.1016/j.tcs.2026.116131 (DOI)001815056100001 ()2-s2.0-105043575844 (Scopus ID)
Funder
Wallenberg AI, Autonomous Systems and Software Program (WASP)
Available from: 2026-08-14 Created: 2026-08-14 Last updated: 2026-08-14Bibliographically approved
Berglund, M., Jonsson, A., Martens, W. & Merwe, B. v. (2026). Constructing Compact BPE Token DFAs. In: Implementation and Application of Automata: 29th International Conference, CIAA 2025, Palermo, Italy, September 22–25, 2025, Proceedings. Paper presented at 29th International Conference on Implementation and Application of Automata, CIAA 2025, Palermo, Italy, September 22-25, 2025 (pp. 27-40). Cham: Springer
Open this publication in new window or tab >>Constructing Compact BPE Token DFAs
2026 (English)In: Implementation and Application of Automata: 29th International Conference, CIAA 2025, Palermo, Italy, September 22–25, 2025, Proceedings, Cham: Springer, 2026, p. 27-40Conference paper, Published paper (Refereed)
Abstract [en]

Byte pair encoding (BPE) tokenization is a popular technique for subdividing text into relevant subwords and is frequently used in large language model systems. Since the tokenization procedure is deterministic and produces regular languages, it is beneficial to characterize it in terms of finite automata to allow for further automata-aided processing, such as pattern matching. In this paper, we demonstrate how to build such automata efficiently in practice, applying a series of optimization techniques to represent them compactly.

Place, publisher, year, edition, pages
Cham: Springer, 2026
Series
Lecture Notes in Computer Science, ISSN 0302-9743, E-ISSN 1611-3349 ; 15981
National Category
Computer Sciences
Identifiers
urn:nbn:se:umu:diva-243943 (URN)10.1007/978-3-032-02602-6_3 (DOI)2-s2.0-105014493742 (Scopus ID)978-3-032-02601-9 (ISBN)978-3-032-02602-6 (ISBN)
Conference
29th International Conference on Implementation and Application of Automata, CIAA 2025, Palermo, Italy, September 22-25, 2025
Funder
Wallenberg AI, Autonomous Systems and Software Program (WASP)
Available from: 2025-09-09 Created: 2025-09-09 Last updated: 2025-09-09Bibliographically approved
Berglund, M., Martens, W. & van der Merwe, B. (2024). Constructing a BPE Tokenization DFA. In: Szilárd Zsolt Fazekas (Ed.), Implementation and Application of Automata: 28th International Conference, CIAA 2024, Akita, Japan, September 3–6, 2024, Proceedings. Paper presented at Implementation and Application of Automata, CIAA 2024, Akita, Japan, September 3-6, 2024 (pp. 66-78). Springer, 15015
Open this publication in new window or tab >>Constructing a BPE Tokenization DFA
2024 (English)In: Implementation and Application of Automata: 28th International Conference, CIAA 2024, Akita, Japan, September 3–6, 2024, Proceedings / [ed] Szilárd Zsolt Fazekas, Springer, 2024, Vol. 15015, p. 66-78Conference paper, Published paper (Refereed)
Abstract [en]

Many natural language processing systems operate over tokenizations of text to address the open-vocabulary problem. In this paper, we give and analyze an algorithm for the efficient construction of deterministic finite automata (DFA) designed to operate directly on tokenizations produced by the popular byte pair encoding (BPE) technique. This makes it possible to apply many existing techniques and algorithms to the tokenized case, such as pattern matching, equivalence checking of tokenization dictionaries, and composing tokenized languages in various ways.

Place, publisher, year, edition, pages
Springer, 2024
Series
Lecture Notes in Computer Science, ISSN 0302-9743, E-ISSN 1611-3349 ; 15015
National Category
Computer Sciences
Research subject
Computer Science
Identifiers
urn:nbn:se:umu:diva-229437 (URN)10.1007/978-3-031-71112-1_5 (DOI)001339268100005 ()2-s2.0-85204399907 (Scopus ID)978-3-031-71111-4 (ISBN)978-3-031-71112-1 (ISBN)
Conference
Implementation and Application of Automata, CIAA 2024, Akita, Japan, September 3-6, 2024
Available from: 2024-09-09 Created: 2024-09-09 Last updated: 2025-04-24Bibliographically approved
Organisations

Search in DiVA

Show all publications