DNA Compression with Genomic Language Models: Tokenization, Benchmarking, and an Information-Content Map

Vojtěch Máčala, Petr Simecek

TL;DR

This paper explores the deep link between lossless compression and generative modeling to evaluate how well Large Language Models (LLMs) actually "understand" DNA. By introducing DNAGPT2, the authors demonstrate that smaller token vocabularies and shorter contexts can surprisingly outperform massive, long-context models in predicting genomic sequences, ultimately producing an unsupervised "information-content map" that identifies biological features like exons and repeats.

What Problem Does This Paper Address?

As genomic sequencing data grows faster than our ability to store it, compression becomes a practical necessity. However, the authors argue that compression is also the ultimate "objective probe" for generative models. If a model can compress a sequence into fewer bits, it has successfully captured the underlying patterns and rules of that data.

The current gap in the field is twofold:

  1. Evaluation: Most genomic LLMs are evaluated on "downstream" tasks (like predicting gene expression), which can be noisy or biased. Compression provides a clean, mathematical metric: bits per base (bpb).
  2. Tokenization: Most genomic models borrow tokenization strategies (like Byte-Pair Encoding or BPE) from Natural Language Processing (NLP). But DNA has a four-letter alphabet ($A, C, G, T$), unlike the thousands of characters in human language. The authors question whether massive NLP-style vocabularies are actually detrimental to modeling DNA.

Methods

The researchers trained DNAGPT2, a family of ten GPT-2-small models (86M parameters). The core experiment was a systematic sweep of BPE vocabulary sizes, ranging from 16 to 8,192 tokens.

To turn these models into compressors, they used Arithmetic Coding. This technique takes the probability distribution predicted by the LLM for the next token and converts it into a bitstream. A model that is "surprised" by a sequence will require more bits to encode it; a model that predicts the sequence perfectly will require almost none.

The pipeline uses a sliding window approach (1024 context length) to process entire genomes and calculate the "Information Content" (IC) at every single nucleotide.

Datasets

  • Training: The DNABERT2 multi-species corpus, containing ~32.5 billion nucleotides from 135 different genomes.
  • Evaluation (The Benchmarks):
    • Human: The T2T-CHM13v2.0 complete human genome.
  • Bacterial: Myxococcus llanfairpwllgwyngyllgogerychwyrndrobwllllantysiliogogogochensis (chosen for its complexity and cross-domain challenge).
  • Plant: Arabidopsis thaliana (Chromosome 1).

Key Insights and Ideas

  • The "Small Vocabulary" Win: In NLP, vocabularies of 50,000+ tokens are standard. For DNA, the authors found that a tiny 32-token vocabulary performed best. Larger vocabularies create "rare" tokens that the model doesn't see enough during training to predict accurately, spreading the probability mass too thin.
  • Context Isn't Everything: Surprisingly, DNAGPT2 (with a short 1k context) outperformed models like HyenaDNA and megaDNA, which boast contexts up to 1 million bases. This suggests that for local prediction (entropy), short-range structures like codons and local repeats are more influential than distant genomic dependencies.
  • Compression as a Biological Sensor: By mapping the "surprise" (Information Content) of the model across the human genome, the authors found that the model naturally distinguishes between exons, introns, and intergenic regions without any supervised labels. For example, Alu repeats are highly predictable (low IC), while exons are more "surprising" (high IC) to the model.

Key Results

  • Performance: DNAGPT2 reached 1.47 bits per base (bpb) on the human genome. This placed it 4th on the Cobilab compression benchmark, outperforming every general-purpose compressor (like gzip or lzma) and several specialized genomic models.
  • The Gap: While DNAGPT2 is impressive, it still trails specialized DNA compressors like JARVIS3 (1.384 bpb). This is because specialized tools use explicit "copy/paste" logic for long repeats, which standard Transformer architectures struggle to emulate efficiently.
  • Speed: LLM-based compression is slow. DNAGPT2 took 728 minutes to process the human genome, whereas the specialized tool MFCompress took only 22 minutes.

Limitations and Future Work

The authors are transparent that this is an evaluation study, not a proposal for a production-ready compressor.

  • Overhead: The reported sizes don't include the 170MB of model weights required to decompress the data.
  • Repeat Handling: Future work should look into "hybrid" models that combine the predictive power of LLMs with the explicit repeat-handling of classical compressors.
  • Ablation: Because the compared models (Hyena, megaDNA, etc.) differ in many ways (data, architecture, params), a more controlled study is needed to definitively isolate why shorter contexts performed better in this specific benchmark.

Summary updated

BibTeX
@inproceedings{macala2026dna,
  author = {Vojtěch Máčala and Petr Simecek},
  title = {{DNA Compression with Genomic Language Models: Tokenization, Benchmarking, and an Information-Content Map}},
  booktitle = {GenBio @ ICML},
  year = {2026},
  url = {https://openreview.net/forum?id=mvErbAl3Ej},
}
Figure