Demonstration only. Corollary is a non-commercial research demo — no warranty, no support, not for commercial use or clinical decisions. Read the disclaimer

All models

Multi-Modal Foundation · AethronPhantom

NexaMass V3 Struct

A compact tandem mass spectrometry encoder that predicts molecular fingerprints to narrow candidate structures.

What NexaMass V3 Struct is

NexaMass V3 Struct is a compact mass spectrometry encoder designed for structure-aware representation learning and candidate-bank molecular inference in metabolomics. Developed by AethronPhantom as part of the Nexa tandem mass spectrometry (MS/MS) pipeline, it maps tandem mass spectra into learned vector representations and predicts RDKit Morgan fingerprint probability vectors. These predicted fingerprints can subsequently be scored against predefined reference candidate banks to shortlist possible chemical structures.

The model addresses the challenge of identifying small molecules from MS/MS fragmentation data, where exhaustive candidate scoring or de novo structure generation is often computationally prohibitive or unreliable. By learning to project raw fragmentation spectra directly into a 2048-dimensional fingerprint space, the model provides an efficient mechanism for narrowing broad candidate spaces down to a manageable set of chemically plausible hypotheses.

Rather than operating as an autonomous, single-answer identification tool, the model is formulated as an intermediate representation and filtering stage. It enables computational biologists and analytical chemists to conduct nearest-neighbour analyses, explore structural neighbourhoods, and develop downstream reranking or confidence models over fixed spectral representations.

How it works

The architecture is an encoder-only transformer comprising 14,106,690 trainable parameters across 6 transformer layers and 8 attention heads, with a hidden dimension of 384 and a feed-forward dimension of 1536. It accepts up to 256 spectral peak tokens with an input feature width of 8. The backbone is coupled to multiple output heads, including a self-supervised learning projection head, a 2048-dimensional RDKit Morgan fingerprint structure head, and retrieval projections.

Training took place across two main phases. First, a foundation encoder (NexaMass-V3) was trained using a self-supervised contrastive objective across approximately 201 million spectra derived from the public GeMS dataset. Second, the structure-aligned checkpoint (NexaMass-V3-Struct) was fine-tuned on a corrected labelled surface against real RDKit Morgan fingerprint targets, using a combined objective of binary cross-entropy structure loss, fingerprint cosine similarity, retrieval-facing loss, and a self-supervised preservation term.

Key facts

Architecture
Encoder-only spectral transformer
Trainable parameters
14,106,690
Model size
Approximately 54 MB (public model-state weights)
Input context
256 peak tokens (input feature width of 8)
Output targets
Normalized spectral embedding and 2048-dimensional RDKit Morgan fingerprint probabilities
Pretraining data
Approximately 201 million spectra from the GeMS dataset
Benchmark dataset
MassSpecGym

What you can use it for

Candidate-Bank Shortlisting
Predict 2048-dimensional Morgan fingerprint probability vectors from MS/MS spectra to rank and narrow down large candidate compound banks into compact, high-probability shortlists.
Spectral Embedding and Clustering
Transform uncharacterised MS/MS spectra into dense vector embeddings for nearest-neighbour search, spectral clustering, and structural-family neighbourhood exploration.
Ranking and Confidence Model Development
Use the frozen spectral encoder as a feature extractor to train custom downstream ranking layers, calibrated confidence estimators, or abstention filters.

Run it here

We list this model but cannot run it yet: no loader for library: pytorch.

Everything on this page still applies. Running it needs a loader for this repository, not a bigger machine.

Strengths and limits

Good at

  • Demonstrates effective top-k candidate narrowing, achieving a Hit@20 retrieval rate of 0.3505 on the MassSpecGym test evaluation.
  • Successfully integrates self-supervised pretraining with supervised molecular structure targets without representation collapse.

Watch out for

  • It is not a de novo molecule generator and cannot output SMILES strings or molecular graphs directly.
  • Top-1 identification accuracy remains limited (Hit@1 of 0.0627 on MassSpecGym test evaluation), meaning it should not be used as an autonomous identification authority.
  • Raw model scores and confidence gaps are uncalibrated and cannot be interpreted directly as probabilities.
  • The trained retrieval projection head does not reliably resolve fine-grained local ranking compared to the fingerprint decoding path.
  • The labelled structure-alignment corpus is smaller than the broad pretraining data, requiring chemical validation checks (such as adduct compatibility, exact mass, and RDKit sanitisation) on outputs.

Inputs and outputs

You provide

  • Sequence or text

    A protein or nucleotide sequence, or free text — whichever this model was trained on.

You get back

  • Mean-pooled representation, one vector per input.

Licence

Check the licence before commercial use · apache-2.0

The apache-2.0 licence carries terms worth reading before you depend on it.

Questions

Can I use NexaMass V3 Struct commercially?

Check the licence before commercial use. The apache-2.0 licence carries terms worth reading before you depend on it.

Can NexaMass V3 Struct generate novel chemical structures de novo?

No. The model encodes spectra and predicts 2048-dimensional Morgan fingerprint vectors to compare against existing candidate databases; it cannot decode or generate SMILES strings or molecular graphs directly.

What is the recommended method for identifying unknown compounds?

The recommended approach is to generate fingerprint probability vectors from input spectra, query a candidate bank, and output a ranked shortlist enriched with external validation metadata such as exact mass error, precursor adduct compatibility, and RDKit validity.

How does the model compare to existing retrieval benchmarks on MassSpecGym?

Under frozen projected-dot Hit@k evaluation on MassSpecGym test data, it scores Hit@1 of 0.0627, Hit@5 of 0.1753, and Hit@20 of 0.3505. This outperforms simpler baselines like DeepSets or Fingerprint FFN, but trails dedicated retrieval models such as MIST.

Can the output similarity scores be interpreted as confidence probabilities?

No. The raw confidence estimates and score margins are uncalibrated and should only be used as comparative research signals or paired with dedicated abstention curves.

How to cite it

10.57967/hf/8496

Written from NexaMass V3 Struct's own documentation (model card). Statements citing a figure that does not appear there are removed before publication. Licence and running details come from our registry.