Rethinking Genomic Modeling Through Optical Character Recognition

Hongxin Xiang, Pengsen Ma, Yunkang Cao, Di Yu, Haowen Chen, Xinyu Yang, xiangxiang Zeng

Recent genomic foundation models have largely adopted large language model (LLM) architectures, treating DNA as a one-dimensional sequence of tokens. However, DNA is fundamentally different from human speech. To address this, researchers have introduced OpticalDNA, a novel framework that reframes genomic modeling as an Optical Character Recognition (OCR) problem. By rendering DNA sequences into two-dimensional documents, OpticalDNA achieves state-of-the-art performance on long-range tasks with 20x fewer effective tokens and massive parameter efficiency.

The Bottleneck of 1D Genomic Models

Most current genomic foundation models, such as HyenaDNA or the Nucleotide Transformer, process DNA sequentially. This 1D paradigm suffers from two major limitations:

  1. Structural Mismatch: Genomic signals are inherently sparse and discontinuous. A critical regulatory element might be separated from its target gene by thousands of "low-information" base pairs. Sequential reading forces models to spend equal computational effort scanning "junk" DNA as they do functional regions.
  2. Compression Blindness: Standard tokenization strategies (like k-mers) lack an understanding of underlying semantics. This makes it incredibly difficult to scale models to the millions of base pairs required for whole-genome analysis without losing fine-grained, single-nucleotide details.

OpticalDNA: A Vision-Language Approach to Genomics

OpticalDNA abandons the 1D sequence in favor of a vision-based document understanding framework.

  • Rendering DNA as Images: DNA sequences are rasterized into structured 2D visual layouts (640x640 images). This transformation converts long-range 1D dependencies into spatial structures that 2D Convolutional Neural Networks (CNNs) and vision transformers can easily process.
  • Architecture: The system relies on a visual DNA encoder (built on SAM and CLIP) to produce compact, reconstructible visual tokens. These tokens are then processed by a document decoder—a 570M parameter DeepSeek Mixture-of-Experts (MoE) model—for reasoning.
  • OCR-Style Pretraining: Instead of simple next-token prediction, OpticalDNA is trained on six "genomic primitives":
  • Recognition: Transcribing the DNA text.
  • Grounding: Locating specific lines or blocks.
  • ROI Reading: Transcribing specific regions of interest.
  • Masked Completion: Inferring missing DNA segments from visual context.
  • Retrieval: Finding all occurrences of a specific motif.
  • Classification: Identifying the chromosome of origin.

Key Insights and Breakthroughs

Reframing DNA as a visual document yields several powerful advantages:

  • Spatial Inductive Bias (2D > 1D): 2D CNN backbones consistently achieve a better accuracy-efficiency trade-off than 1D CNNs or Transformers when handling sparse genomic signals. The spatial layout allows the model to effectively "jump" across distant but related loci.
  • Understanding-Driven Compression: By utilizing visual tokens, OpticalDNA drastically reduces the effective token budget. It can represent up to 450,000 base pairs using nearly 20x fewer tokens than k-mer-based models, all while retaining the ability to pinpoint single-nucleotide variations.
  • Visual Interpretability: Using Grad-CAM visualizations, researchers demonstrated that the model naturally "attends" to biologically significant areas, such as splice sites, even when they are buried in a dense, multi-page document. This mirrors how a human researcher might visually skim a document for keywords.

Performance and Results

The model was pretrained on the human reference genome (HG38) and a rice telomere-to-telomere genome (T2T-NIP), and evaluated across diverse benchmarks including DNALONGBENCH (eQTL prediction), RiceSubBench (splice-site classification), and RiceWGPB (whole-genome phenotype prediction).

  • State-of-the-Art Accuracy: On the eQTL benchmark, OpticalDNA achieved a 0.852 AUROC, outperforming much larger models like HyenaDNA and JanusDNA.
  • Extreme Efficiency: OpticalDNA surpassed models with up to 985x more activated parameters while tuning only 256k trainable parameters via linear probing.
  • Genome-Scale Speed: For whole-genome phenotype prediction in rice (~400M base pairs), OpticalDNA reduced inference time to just 12.3 minutes, compared to 32.5 minutes for LucaOne and over 5 hours for Evo-2.
  • Cross-Species Transfer: A model pretrained on human DNA demonstrated remarkable "zero-shot" style transfer to rice genomes, suggesting that the OCR-style visual formulation captures universal genomic regularities.

Limitations and Future Directions

While OpticalDNA presents a massive leap forward, it is not without limitations. The model faces a density bottleneck: as rendering resolution increases to pack more DNA onto a single page, the text becomes denser. Performance drops when sequence lengths approach the single-page capacity limit (~1,800-2,000 nucleotides). Additionally, retrieval challenges remain; while the model excels at "reading," exhaustively finding every instance of a short motif across a whole genome is still difficult.

Future work will likely focus on scaling model capacity and exploring more sophisticated "mask-span" curricula during pretraining to further improve base-level reconstruction. Nonetheless, OpticalDNA proves that sometimes, the best way to read a genome is simply to look at it.

Summary updated

BibTeX
@inproceedings{xiang2026rethinking,
  author = {Hongxin Xiang and Pengsen Ma and Yunkang Cao and Di Yu and Haowen Chen and Xinyu Yang and xiangxiang Zeng},
  title = {{Rethinking Genomic Modeling Through Optical Character Recognition}},
  booktitle = {International Conference on Machine Learning},
  year = {2026},
  url = {https://openreview.net/forum?id=nggzekChuU},
}

Loading related content...

Figure