PlasMAAG
Contrastive variational autoencoder that embeds contigs for binning plasmids and cellular genomes from metagenomes.
Molecules, proteins and genomics · 26 operations Checked
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
- 682.1K
- Operations
- 26
- Framework
- PyTorch
- Recurrent
- No
- Published
- 2026, Nature Biotechnology
- Cited by
- 7 (as of 3 November 2026)
- Authors
- Pau Piera Líndez, Lasse Schnell Danielsen, Iva Kovačić and others
- License
- MIT
- Checked
- Passed: the trace was replayed operation by operation and matched the model's own output for this input.
Files
The file opened in a new tab. Use your browser's Save command there to keep it.
The diagram is a drawing of a TorchLens trace of the source code. It contains no code or weights.
Details
- Stable ID
- m19359
- Graph hash
- a28b1ee9b7fc076cdb907ee82e15031186ff48da90f8f5d98cc2810d733d3f6e
- Skeleton hash
- 846a0995caa89b64518ea54e425aa0973b4aa4d01508fd86391ff009ca38641f
- Architecture hash
- 1e344e6f2a317915e702f290a7ddc3f2bbd08e7f5a1fcc53d3d324ec38ca7cd2
- Diagram SHA-256
- dc35f0557138ce58f3bb9d6fc7e7ef11d93578e65e6f0a67549722b656157126
- 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
PlasMAAG (plasmid and organism metagenomic binning using assembly-alignment graphs) is a method to recover plasmids and cellular genomes from metagenomic samples. Its neural network is a variational autoencoder (VAE) that embeds contig features, and the embeddings are then used to cluster contigs. What it adds is the assembly-alignment graph, which combines sequence overlaps within a sample from assembly graphs with cross-sample overlaps found by ordinary sequence alignment.
The network, called contrastive-VAMB, is a variation of the authors' earlier VAMB model with a modified loss function. It is composed of an encoder, a latent representation layer μ and a decoder. Each contig enters as the concatenation of its coabundances along samples, its tetranucleotide frequencies and its unnormalized abundance. The loss has three terms: reconstruction, contrastive and regularization. The contrastive term penalizes the cosine distance between the latent representations of contigs that are highly related in the fastnode2vec embedding of the graph, once that distance exceeds a margin.
On synthetic benchmark datasets, the paper reports that PlasMAAG reconstructed 50–121% more near-complete plasmids than competing methods. On hospital sewage samples, it reports 33% more reconstructed plasmid sequences than competing methods. For resource usage on the CAMI2 airways dataset, the paper reports that PlasMAAG took 46 min using 8 threads and 16 GB of RAM.
Key idea. PlasMAAG trains a variational autoencoder with an added contrastive loss so that contigs from the same assembly-alignment graph community embed close together for binning.
- PlasMAAG
- contrastive-VAMB
- assembly-alignment graph
- AAG
- metagenomic binning
- plasmid reconstruction
- plasmid binning
- contrastive VAE
- variational autoencoder
AI-written summary, based on the paper and checked automatically against it; not reviewed by a person. Corrections welcome.
Cite the paper
@article{plasmaag2026,
title = {Accurate plasmid reconstruction from metagenomics data using assembly–alignment graphs and contrastive learning},
author = {Pau Piera Líndez and Lasse Schnell Danielsen and Iva Kovačić and Marc Pielies Avelli and Joseph Nesme and Lars Juhl Jensen and Jakob Nybo Andersen and Søren Johannes Sørensen and Simon Rasmussen},
year = {2026},
journal = {Nature Biotechnology},
doi = {10.1038/s41587-026-03005-7}
}