Multidimensional Byte Pair Encoding: Shortened Sequences for Improved Visual Data Generation

Fuente: arXiv
Saved in:
Bibliographic Details
Main Authors: Elsner, Tim, Usinger, Paula, Nehring-Wirxel, Julius, Kobsik, Gregor, Czech, Victor, He, Yanjiang, Lim, Isaak, Kobbelt, Leif
Format: Preprint
Published: 2024
Subjects:
Online Access:
Tags: Add Tag
No Tags, Be the first to tag this record!
_version_ 1866916482567372800
author Elsner, Tim
Usinger, Paula
Nehring-Wirxel, Julius
Kobsik, Gregor
Czech, Victor
He, Yanjiang
Lim, Isaak
Kobbelt, Leif
author_facet Elsner, Tim
Usinger, Paula
Nehring-Wirxel, Julius
Kobsik, Gregor
Czech, Victor
He, Yanjiang
Lim, Isaak
Kobbelt, Leif
contents In language processing, transformers benefit greatly from text being condensed. This is achieved through a larger vocabulary that captures word fragments instead of plain characters. This is often done with Byte Pair Encoding. In the context of images, tokenisation of visual data is usually limited to regular grids obtained from quantisation methods, without global content awareness. Our work improves tokenisation of visual data by bringing Byte Pair Encoding from 1D to multiple dimensions, as a complementary add-on to existing compression. We achieve this through counting constellations of token pairs and replacing the most frequent token pair with a newly introduced token. The multidimensionality only increases the computation time by a factor of 2 for images, making it applicable even to large datasets like ImageNet within minutes on consumer hardware. This is a lossless preprocessing step. Our evaluation shows improved training and inference performance of transformers on visual data achieved by compressing frequent constellations of tokens: The resulting sequences are shorter, with more uniformly distributed information content, e.g. condensing empty regions in an image into single tokens. As our experiments show, these condensed sequences are easier to process. We additionally introduce a strategy to amplify this compression further by clustering the vocabulary.
format Preprint
id arxiv_https___arxiv_org_abs_2411_10281
institution arXiv
publishDate 2024
record_format arxiv
spellingShingle Multidimensional Byte Pair Encoding: Shortened Sequences for Improved Visual Data Generation
Elsner, Tim
Usinger, Paula
Nehring-Wirxel, Julius
Kobsik, Gregor
Czech, Victor
He, Yanjiang
Lim, Isaak
Kobbelt, Leif
Computer Vision and Pattern Recognition
Machine Learning
In language processing, transformers benefit greatly from text being condensed. This is achieved through a larger vocabulary that captures word fragments instead of plain characters. This is often done with Byte Pair Encoding. In the context of images, tokenisation of visual data is usually limited to regular grids obtained from quantisation methods, without global content awareness. Our work improves tokenisation of visual data by bringing Byte Pair Encoding from 1D to multiple dimensions, as a complementary add-on to existing compression. We achieve this through counting constellations of token pairs and replacing the most frequent token pair with a newly introduced token. The multidimensionality only increases the computation time by a factor of 2 for images, making it applicable even to large datasets like ImageNet within minutes on consumer hardware. This is a lossless preprocessing step. Our evaluation shows improved training and inference performance of transformers on visual data achieved by compressing frequent constellations of tokens: The resulting sequences are shorter, with more uniformly distributed information content, e.g. condensing empty regions in an image into single tokens. As our experiments show, these condensed sequences are easier to process. We additionally introduce a strategy to amplify this compression further by clustering the vocabulary.
title Multidimensional Byte Pair Encoding: Shortened Sequences for Improved Visual Data Generation
topic Computer Vision and Pattern Recognition
Machine Learning
url https://arxiv.org/abs/2411.10281