Table of Contents
Fetching ...

Rethinking Genomic Modeling Through Optical Character Recognition

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

TL;DR

OpticalDNA reframes genomic modeling as OCR-style document understanding, moving from 1D token sequences to structured visual DNA documents. It renders sequences into multi-page DNA documents with coordinate-indexed regions, trained via six prompt-driven tasks that cover reading, grounding, retrieval, and completion. A vision-language backbone with a 2D visual encoder and autoregressive document decoder learns compact, reconstructible visual tokens, enabling efficient long-context modeling that outperforms larger baselines while using far fewer trainable parameters. The approach delivers strong long-range performance on regulatory and phenotype benchmarks and demonstrates robust interpretability and efficiency, highlighting a scalable direction for genome-scale representation learning.

Abstract

Recent genomic foundation models largely adopt large language model architectures that treat DNA as a one-dimensional token sequence. However, exhaustive sequential reading is structurally misaligned with sparse and discontinuous genomic semantics, leading to wasted computation on low-information background and preventing understanding-driven compression for long contexts. Here, we present OpticalDNA, a vision-based framework that reframes genomic modeling as Optical Character Recognition (OCR)-style document understanding. OpticalDNA renders DNA into structured visual layouts and trains an OCR-capable vision--language model with a \emph{visual DNA encoder} and a \emph{document decoder}, where the encoder produces compact, reconstructible visual tokens for high-fidelity compression. Building on this representation, OpticalDNA defines prompt-conditioned objectives over core genomic primitives-reading, region grounding, subsequence retrieval, and masked span completion-thereby learning layout-aware DNA representations that retain fine-grained genomic information under a reduced effective token budget. Across diverse genomic benchmarks, OpticalDNA consistently outperforms recent baselines; on sequences up to 450k bases, it achieves the best overall performance with nearly $20\times$ fewer effective tokens, and surpasses models with up to $985\times$ more activated parameters while tuning only 256k \emph{trainable} parameters.

Rethinking Genomic Modeling Through Optical Character Recognition

TL;DR

OpticalDNA reframes genomic modeling as OCR-style document understanding, moving from 1D token sequences to structured visual DNA documents. It renders sequences into multi-page DNA documents with coordinate-indexed regions, trained via six prompt-driven tasks that cover reading, grounding, retrieval, and completion. A vision-language backbone with a 2D visual encoder and autoregressive document decoder learns compact, reconstructible visual tokens, enabling efficient long-context modeling that outperforms larger baselines while using far fewer trainable parameters. The approach delivers strong long-range performance on regulatory and phenotype benchmarks and demonstrates robust interpretability and efficiency, highlighting a scalable direction for genome-scale representation learning.

Abstract

Recent genomic foundation models largely adopt large language model architectures that treat DNA as a one-dimensional token sequence. However, exhaustive sequential reading is structurally misaligned with sparse and discontinuous genomic semantics, leading to wasted computation on low-information background and preventing understanding-driven compression for long contexts. Here, we present OpticalDNA, a vision-based framework that reframes genomic modeling as Optical Character Recognition (OCR)-style document understanding. OpticalDNA renders DNA into structured visual layouts and trains an OCR-capable vision--language model with a \emph{visual DNA encoder} and a \emph{document decoder}, where the encoder produces compact, reconstructible visual tokens for high-fidelity compression. Building on this representation, OpticalDNA defines prompt-conditioned objectives over core genomic primitives-reading, region grounding, subsequence retrieval, and masked span completion-thereby learning layout-aware DNA representations that retain fine-grained genomic information under a reduced effective token budget. Across diverse genomic benchmarks, OpticalDNA consistently outperforms recent baselines; on sequences up to 450k bases, it achieves the best overall performance with nearly fewer effective tokens, and surpasses models with up to more activated parameters while tuning only 256k \emph{trainable} parameters.
Paper Structure (143 sections, 34 equations, 9 figures, 34 tables)

This paper contains 143 sections, 34 equations, 9 figures, 34 tables.

Figures (9)

  • Figure 1: From sequential reading to selective genomic scanning. (a) Sparse, discontinuous genomic signals make sequential modeling inefficient. (b) OCR-inspired genomic modeling enables efficient, reconstructible visual compression. (c) 2D CNNs outperform 1D CNNs in accuracy--efficiency trade-offs on eQTL prediction. (d) Vision tokens substantially reduce the effective token count.
  • Figure 2: Overview of OpticalDNA. (a) Render a 1D genomic sequence into a multi-page DNA document with bounding-box annotations. (b) Construct six OCR-style prompted genomic tasks. (c) Pretrain a visual encoder--document decoder under prompt supervision.
  • Figure 3: Ablation on DNALONGBENCH (AUROC). Green arrows and numbers denote the relative gain over DeepSeek-OCR.
  • Figure 4: Grad-CAM visualization on multi-page fusion for a donor case (two pages). Purple boxes indicate donor splice sites; numbers denote page-level mean attribution.
  • Figure S1: Label distributions of RiceWGPB phenotypes. Left: leaf rolling index measured in the 2015 SZ environment (LRI-15SZ). Right: thousand grain weight (TGW).
  • ...and 4 more figures