# Pairwise Attention: Leveraging Mass Differences to Enhance De Novo Sequencing of Mass Spectra

**Authors:** Joel Lapin, Alfred Nilsson, Mathias Wilhelm, Lukas Käll

PMC · DOI: 10.1021/acs.jproteome.5c00063 · Journal of Proteome Research · 2025-06-02

## TL;DR

This paper introduces a new transformer-based method for de novo peptide sequencing from mass spectra, improving accuracy by incorporating pairwise mass differences into the attention mechanism.

## Contribution

The novel Pairwise Attention mechanism enhances de novo sequencing by integrating domain-specific knowledge into the transformer architecture.

## Key findings

- Pairwise Attention improves average peptide precision by 12.7% over the base transformer on the nine-species benchmark.
- The method outperforms Casanovo by 7.4% in peptide sequencing accuracy.
- The MS2 encoding strategy is compatible with existing transformer-based models.

## Abstract

A fundamental challenge in mass spectrometry-based proteomics
is
determining which peptide generated a given MS2 spectrum. Peptide
sequencing typically relies on matching spectra against a known sequence
database, which in some applications is not available. Deep learning-based
de novo sequencing can address this limitation by directly predicting
peptide sequences from MS2 data. We have seen the application of the
transformer architecture to de novo sequencing produce state-of-the-art
results on the so-called nine-species benchmark. In this study, we
propose an improved transformer encoder inspired by the heuristics
used in the manual interpretation of spectra. We modify the attention
mechanism with a learned bias based on pairwise mass differences,
termed Pairwise Attention (PA). Adding PA improves average peptide
precision at 100% coverage by 12.7% (5.9 percentage points) over our
base transformer on the original nine-species benchmark. We have also
achieved a 7.4% increase over the previously published model Casanovo.
Our MS2 encoding strategy is largely orthogonal to other transformer-based
models encoding MS2 spectra, enabling straightforward integration
into existing deep-learning approaches. Our results show that integrating
domain-specific knowledge into transformers boosts de novo sequencing
performance.

## Full-text entities

- **Diseases:** MS2 (MESH:D009103), PA (MESH:D001289)
- **Chemicals:** methionine (MESH:D008715), MassIVE-KB (-), peptide (MESH:D010455), amino acid (MESH:D000596)
- **Species:** Homo sapiens (human, species) [taxon 9606], Apis mellifera (bee, species) [taxon 7460], Bacillus subtilis (species) [taxon 1423], Mus musculus (house mouse, species) [taxon 10090], Methanosarcina mazei (species) [taxon 2209], Saccharomyces cerevisiae (baker's yeast, species) [taxon 4932], Solanum lycopersicum (tomato, species) [taxon 4081]
- **Cell lines:** KB — Homo sapiens (Human), Human papillomavirus-related endocervical adenocarcinoma, Cancer cell line (CVCL_0372)

## Full text

_Full body text omitted from this summary view._ Fetch the complete paper as Markdown: https://tomesphere.com/paper/PMC12235698/full.md

## Figures

2 figures with captions in the complete paper: https://tomesphere.com/paper/PMC12235698/full.md

## References

26 references — full list in the complete paper: https://tomesphere.com/paper/PMC12235698/full.md

---
Source: https://tomesphere.com/paper/PMC12235698