Scaling Genomic Language Modeling with Unified Corpus and Evaluation in Bacteria
Abstract
Progress in genomic language modeling depends on pretraining resources that are both diverse and comprehensive, as well as benchmarks that evaluate models across biological scales from genes to whole genomes. This need is especially acute in bacteria, which are extremely abundant, diverse, and central to human health, ecology, and biotechnology. Yet resources for large-scale pretraining and evaluation in bacterial genomics remain limited, with existing frameworks focusing largely on eukaryotic settings. Here, we introduce BacCorpus, a genome-level resource for training genomic LMs comprising 20B proteins, including 4.6B unique sequences, from 7M genomes spanning more than 150,000 species, and BacBench, a comprehensive benchmark spanning 10 datasets and 5 tasks across gene-, system-, and genome-level tasks. We evaluate a diverse suite of genomic LMs on BacBench and additionally develop BacLM, a 350M-parameter model trained jointly on protein sequences and intergenic DNA to further investigate how bacterial genomes are best represented. Across tasks, we find that performance depends strongly on biological scale: methods leveraging protein sequence are competitive on gene-level prediction, whereas models that incorporate wider genomic context excel at problems which involve complex multi-gene interactions. Together, BacCorpus and BacBench provide a practical foundation for training and evaluating robust, genome-aware genomic language models in bacteria at an unprecedented scale.