All models

DeepMicrobes

Reads DNA fragments as k-mer words through a BiLSTM with self-attention to name the microbe they came from.

Molecules, proteins and genomics · 5,597 operations Checked

100%

Showing the top corner; full diagram not loaded yetShowing a small copy; full diagram not loaded yetLarge diagram, not loaded yet

Open SVG

This diagram has 5,597 operations (1.1 MB) and is drawn when you ask.

Open in a new tab

Click or tap a spot to read it up close. Scroll or drag inside the diagram to move through it. Zoom with + and − or Ctrl and scroll. Press 0 for the whole graph. Swipe inside the diagram to move through it. Use + and − to zoom.

At a glance

Parameters
910.5M
Operations
5,597
Framework
PyTorch
Recurrent
Yes
Published
2019, NAR Genomics and Bioinformatics
Cited by
188 (as of 17 October 2026)
Authors
Qiaoxing Liang, Paul W Bible, Yu Liu and others
License
Apache-2.0
Checked
Passed: the trace was replayed operation by operation and matched the model's own output for this input.

Files

The diagram is a drawing of a TorchLens trace of the source code. It contains no code or weights.

Details
Stable ID
m685
Graph hash
131dfd0dc56c40ee030e2a30cd95ae156e952a34b0e65fd7d2c8550f21dcf57a
Skeleton hash
2524c046c7adb17022d91255302ab188b728036dc02fbe6113a3676fe8f1d19d
Architecture hash
3d1bc654682b8779fa3378fd620063f2242dc2c8ebfce835ee490a3817966944
Diagram SHA-256
be83298cb6b1fc16b9f90f3dc8536298bbc3866c38657ab4c4a7c5de80334c9b
TorchLens version
2.36.0
Renderer
graphviz 2.43.0+pyvips 3.2.0+libvips 8.18.7+render-opts@06c1f0d3
Check
Forward pass replayed in PyTorch

What it is

DeepMicrobes is a deep learning-based computational framework for taxonomic classification of short metagenomics sequencing reads. It exists to get around a bottleneck: adding newly assembled genomes to a reference database is hindered by the lack of a well-curated taxonomic tree for newly discovered species, which is required by current metagenomics tools. Instead of a tree, a model can be trained to classify metagenomic reads at any taxonomic rank provided with any collection of training genomes representing different categories.

The captured member is the paper's final architecture, the embedding-based recurrent self-attention model. A read is split into substrings of length K with a stride of one, each mapped to a dense embedding vector by analogy between k-mers and words. The paper uses 12-mers unless otherwise stated. A bidirectional LSTM processes the embedding matrix, and a self-attention mechanism sits between the LSTM and the fully connected layers. Several rows of attention let the model focus on multiple components in a DNA sequence, and the pooled matrix has a shape that is irrelevant to the input sequence length. A three layer fully connected classifier and softmax then convert the output to class probabilities. The species model was trained on a human gut repertoire composed of 2505 species, most of which are identified by metagenome assembly of human gut microbiomes.

The design came out of a systematic sweep: a baseline whose only trainable weights were the k-mer embedding already outperformed the previous one-hot encoded deep networks. Adding self-attention lifted mean read-level precision to 0.942 and recall to 0.428, against 0.893 and 0.155 for the LSTM-only variant. A bonus of the attention pooling is that it encodes variable-length DNA sequences into a fixed-size representation, so longer reads can be classified without changing the architecture. The authors also used the species model to classify reads from 106 gut metagenomes sequenced as part of the iHMP. Most of the candidate biomarkers it surfaced were unclassified metagenomic species.

Key idea. DeepMicrobes couples k-mer embedding with a bidirectional LSTM and self-attention to classify short metagenomic reads without a curated taxonomic tree, and the paper describes it as the first deep learning architecture that incorporates self-attention mechanisms for DNA sequence analysis.

  • DeepMicrobes
  • deepmicrobes-bilstm
  • taxonomic classification
  • metagenomics
  • metagenomic reads
  • k-mer embedding
  • BiLSTM
  • bidirectional LSTM
  • self-attention
  • DNA sequence classification
  • gut microbiome
  • species identification
  • MicrobeLab

AI-written summary, based on the paper and checked automatically against it; not reviewed by a person. Corrections welcome.

Cite the paper

@article{Liang_2020, title={DeepMicrobes: taxonomic classification for metagenomics with deep learning}, volume={2}, ISSN={2631-9268}, url={http://dx.doi.org/10.1093/nargab/lqaa009}, DOI={10.1093/nargab/lqaa009}, number={1}, journal={NAR Genomics and Bioinformatics}, publisher={Oxford University Press (OUP)}, author={Liang, Qiaoxing and Bible, Paul W and Liu, Yu and Zou, Bin and Wei, Lai}, year={2020}, month=Feb }