paper-with-me

Papers

A Formal Perspective on Byte-Pair Encoding

2023-06-29 · Vilém Zouhar, Clara Meister, Juan Luis Gastaldi, Li Du, Tim Vieira, Mrinmaya Sachan, Ryan Cotterell

Byte-Pair Encoding (BPE) is a popular algorithm used for tokenizing data in NLP, despite being devised initially as a compression method. BPE appears to be a greedy algorithm at face value, but the underlying optimization problem that BPE seeks to solve has not yet been laid down. We formalize BPE as a combinatorial optimization problem. Via submodular functions, we prove that the iterative greedy version is a $\frac{1}{{\sigma(\boldsymbol{\mu}^\star)}}(1-e^{-{\sigma(\boldsymbol{\mu}^\star)}})$-approximation of an optimal merge sequence, where ${\sigma(\boldsymbol{\mu}^\star)}$ is the total backward curvature with respect to the optimal merge sequence $\boldsymbol{\mu}^\star$. Empirically the lower bound of the approximation is $\approx 0.37$. We provide a faster implementation of BPE which improves the runtime complexity from $\mathcal{O}\left(N M\right)$ to $\mathcal{O}\left(N \log M\right)$, where $N$ is the sequence length and $M$ is the merge count. Finally, we optimize the brute-force algorithm for optimal BPE using memoization.

📄 PDF Abstract BibTeX arXiv:2306.16837

Code (1)

zouharvi/formal-bpe 공식 구현

Tasks

Combinatorial Optimization

Methods 이 논문이 사용한 방법론

BPE Byte Pair Encoding, or BPE, is a subword segmentation algorithm that encodes rare and unknown words as sequences of subword units. The intuition is that various word…

Similar Papers 제목 키워드 기반

Improving Natural Language Understanding by Reverse Mapping Bytepair Encoding

2019-11-01 · CONLL 2019 11 · Chaodong Tong, Huailiang Peng, Qiong Dai, Lei Jiang 외

We propose a method called reverse mapping bytepair encoding, which maps named-entity information and other word-level linguistic features back to subwords during the encoding procedure of bytepair encoding (BPE). We emp…

Natural Language UnderstandingRTESST-2

Composing Byte-Pair Encodings for Morphological Sequence Classification

2020-12-01 · UDW (COLING) 2020 12 · Adam Ek, Jean-Philippe Bernardy

Byte-pair encodings is a method for splitting a word into sub-word tokens, a language model then assigns contextual representations separately to each of these tokens. In this paper, we evaluate four different methods of…

ClassificationLanguage ModelingLanguage Modelling

Code Completion using Neural Attention and Byte Pair Encoding

2020-04-14 · Youri Arkesteijn, Nikhil Saldanha, Bastijn Kostense

In this paper, we aim to do code completion based on implementing a Neural Network from Li et. al.. Our contribution is that we use an encoding that is in-between character and word encoding called Byte Pair Encoding (BP…

Code Completion

Bilingual End-to-End ASR with Byte-Level Subwords

2022-05-01 · Liuhui Deng, Roger Hsiao, Arnab Ghoshal

In this paper, we investigate how the output representation of an end-to-end neural network affects multilingual automatic speech recognition (ASR). We study different representations including character-level, byte-leve…

Automatic Speech RecognitionAutomatic Speech Recognition (ASR)speech-recognitionSpeech Recognition

Theoretical Analysis of Byte-Pair Encoding

2024-11-13 · László Kozma, Johannes Voderholzer

Byte-Pair Encoding (BPE) is a widely used method for subword tokenization, with origins in grammar-based text compression. It is employed in a variety of language processing tasks such as machine translation or large lan…

Language ModelingLanguage ModellingLarge Language ModelMachine Translation+1