NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

A deep learning approach to pattern recognition for short DNA sequences

Akosua Busia, George E. Dahl, Clara Fannjiang, David H. Alexander, Elizabeth H. Dorfman, Ryan Poplin, Cory Y. McLean, Pi-Chuan Chang, Mark A. DePristobioRxiv 2018

Abstract

Inferring properties of biological sequences—such as determining the species-of-origin of a DNA sequence or the function of an amino-acid sequence—is a core task in many bioinformatics applications. These tasks are often solved using string-matching to map query sequences to labeled database sequences or via Hidden Markov Model-like pattern matching. In the current work, we describe and assess a deep learning approach which trains a deep neural network (DNN) to predict database-derived labels directly from query sequences. We demonstrate this DNN performs at state-of-the-art or above levels on a difficult, practically important problem: predicting species-of-origin from short reads of 16S ribosomal DNA. When trained on 16S sequences of over 13,000 distinct species, our DNN achieves read-level species classification accuracy within 2.0% of perfect memorization of training data, and produces more accurate genus-level assignments for reads from held-out species than k-mer, alignment, and taxonomic binning baselines. Moreover, our models exhibit greater robustness than these existing approaches to increasing noise in the query sequences. Finally, we show that these DNNs perform well on experimental 16S mock community datasets. Overall, our results constitute a first step towards our long-term goal of developing a general-purpose deep learning approach to predicting meaningful labels from short biological sequences.

Introduction

Identifying the taxonomic origin of short DNA fragments is a cornerstone of metagenomics. Traditional methods primarily rely on sequence alignment (e.g., BLAST) or k-mer matching (e.g., Kraken). While alignment is highly accurate, it is computationally intensive and struggles with gaps or high mutation rates. K-mer methods offer speed but sacrifice the positional context inherent in biological sequences. As sequencing technologies evolve, the need for methods that are both computationally efficient and robust to the inherent noise of short-read data (typically 25–200 base pairs) becomes critical. Researchers at Google Brain have proposed a shift from traditional database searching to a "learning" paradigm, where a deep neural network (DNN) is trained to recognize the "biological grammar" of DNA sequences.

Methods

The proposed architecture is a deep neural network designed specifically for sequence labeling. DNA bases (A, C, T, G) and ambiguity codes are first converted into 4D probability distributions. The core of the model utilizes three layers of depthwise separable convolutions, a technique that significantly reduces computational overhead while effectively capturing local spatial patterns—a design choice inspired by efficient computer vision models like MobileNet.

Figure 1: The DNN architecture featuring depthwise separable convolutions, Leaky ReLU activation, and average pooling to handle variable-length inputs.

Following the convolutional layers, an average pooling layer is employed to allow the model to process DNA reads of varying lengths. To enhance robustness, the authors implemented "base-flipping" noise injection during the training phase, forcing the network to learn invariant features of species even when the input sequence contains errors.

Results and Discussion

The DNN was evaluated using the NCBI RefSeq database, comprising nearly 20,000 16S rRNA sequences from over 13,000 species. Performance was tested on synthetic reads of varying lengths and real-world "mock community" datasets.

Accuracy and Positional Context

On known species, the DNN's accuracy was within 2.0% of the theoretical "Bayes optimal" limit. Interestingly, the model's convolutional filters were found to focus on "hypervariable regions" of the 16S gene, aligning with established biological knowledge used for taxonomic classification. Unlike k-mer methods, the DNN preserves the positional context of bases, allowing it to distinguish between closely related taxa more effectively.

Robustness to Noise and Generalization

One of the most significant advantages of the DNN approach is its resilience to sequencing errors. In scenarios with 10% base-flipping noise, traditional alignment tools like BWA saw their accuracy drop below 3%. In contrast, the DNN maintained approximately 76% accuracy. Furthermore, the model demonstrated superior generalization when classifying "held-out" species (organisms not present in the training set). At the genus level, the DNN consistently outperformed Naive Bayes and alignment-based methods across various noise levels and read lengths.

Figure 3: Genus-level accuracy on held-out species. The DNN maintains higher accuracy than Naive Bayes and alignment-based methods as base-flipping noise increases from 0% to 10%.

Computational Throughput

The model is highly optimized for modern hardware. On a single V100 GPU, it can process 13 million reads per second, and this scales to 156 million reads per second on a Cloud TPU. This throughput makes it highly suitable for large-scale metagenomic studies.

Conclusion

This work demonstrates that deep learning can match or exceed the performance of traditional bioinformatics tools for DNA sequence classification while offering significantly better robustness to noise. While the current model lacks a "no-call" mechanism for out-of-distribution sequences and is limited to single-end reads, it represents a promising step toward general-purpose deep learning for biological sequence analysis. Future work will explore extending this architecture to whole-genome shotgun sequencing and protein function prediction.

Availability: TensorFlow training code is available on GitHub. Data is accessible via Google Cloud Storage.

Summary updated

BibTeX
@misc{busia2018deep,
  author = {Akosua Busia and George E. Dahl and Clara Fannjiang and David H. Alexander and Elizabeth H. Dorfman and Ryan Poplin and Cory Y. McLean and Pi-Chuan Chang and Mark A. DePristo},
  title = {{A deep learning approach to pattern recognition for short DNA sequences}},
  year = {2018},
  doi = {10.1101/353474},
  howpublished = {bioRxiv},
}
Figure