Spatial self-supervised Peak Learning and correlation-based Evaluation of peak picking in Mass Spectrometry Imaging
Authors: Philipp Weigand, Nikolas Ebert, Shad A. Mohammed, Denis Abu Sammour, Carsten Hopf, Oliver Wasenmüller
Organizations: Research and Transfer Center CeMOS, Technical University of Applied Sciences Mannheim, Paul-Wittsack-Straße 10, Mannheim, 68163, Germany · Faculty of Biosciences Heidelberg University, Im Neuenheimer Feld 234, Heidelberg, 69120, Germany · Mannheim Center for Translational Neurosciences (MCTN), Med. Faculty Mannheim, Heidelberg University, Theodor Kutzer-Ufer 1-3, 68167, Mannheim, Germany
Mass spectrometry imaging (MSI) enables label-free visualization of molecular distributions across tissue samples but generates large and complex datasets that require effective peak picking to reduce data size while preserving meaningful biological information. Existing peak picking approaches perform inconsistently across heterogeneous datasets, and their evaluation is often limited to synthetic data or manually selected ion images that do not fully represent real-world challenges in MSI. To address these limitations, we propose an autoencoder-based spatial self-supervised peak learning neural network that selects spatially structured peaks by learning an attention mask leveraging both spatial and spectral information. We further introduce an evaluation procedure based on expert-annotated segmentation masks, allowing a more representative and spatially grounded assessment of peak picking performance. We evaluate our approach on four diverse public MSI datasets using our proposed evaluation procedure. Our approach consistently outperforms state-of-the-art peak picking methods by selecting spatially structured peaks, thus demonstrating its efficacy. These results highlight the value of our spatial self-supervised network in comparison to contemporary state-of-the-art methods. The evaluation procedure can be readily applied to new MSI datasets, thereby providing a consistent and robust framework for the comparison of spatially structured peak picking methods across different datasets.
Figure 1: Our proposed spatial self-supervised peak learning pipeline, S 3 PL, for spatially structured peak picking. The network receives an input comprising a spectral patch x of a complete spectrum and its neighboring spectra. During training, the network learns to identify the most informative peaks by learning an attention mask. In order to identify the peaks, the frozen 3D convolution is applied to the entire dataset, resulting in the filtering of z peaks per spectral patch x . In the final selection, the n most frequent peaks of the peak selection yield the final peak list.
Figure 2: Our proposed evaluation procedure for peak picking of spatially structured peaks. (a) PCC values of all ion images and a corresponding binary mask are computed and sorted. (b) All ion images with a PCC value equal to or greater than TPCC for any annotated class are classified as positive. Steps (a) and (b) are repeated for every class. (c) We calculate F1-scores using thresholds TPCC∈{0.3,0.4,0.5,0.6} and report the mean of these four F1-scores, mSCF1 , as the final metric.
Dataset
Format
# m/z values
# tissues
# classes
Ionization
Analyzer
Mouse glioblastoma [ 2 ]
Profile
85,062
8
2
MALDI
FTICR
Renal cell carcinoma [ 10 ]
Profile
10,200
8
3
DESI
Thermo LTQ Orbitrap
Colorectal adenocarcinoma [ 20 ]
Profile
1,481
8
3
DESI
Thermo Exactive
Gastrointestinal stromal tumor [ 4 ]
Profile
120,000
1
-
MALDI
TOF
Table 2: Overview of public dataset collections [ 2 , 10 , 20 , 4 ] used for the evaluation of spatially structured peak picking methods.
Dataset
Metric
msiPL [ 1 ]
Lieb et al. [ 24 ]
MALDIquant [ 16 ]
SPUTNIK [ 19 ]
S 3 PL (Ours)
GBM [ 2 ]
F1 0.3
45.6
0
29.3
50.8
56.4
F1 0.4
44.4
0
26.8
43.0
55.6
F1 0.5
39.4
0
23.6
34.4
48.8
F1 0.6
31.9
0
18.5
23.8
37.1
mSCF1
40.3
0
24.6
38.1
49.6
95% CI of mSCF1
[33.0, 47.5]
-
[20.4, 28.9]
[28.9, 47.3]
[39.0, 60.2]
Table 3: Comparison of our spatial self-supervised peak learning autoencoder, S 3 PL, with state-of-the-art peak picking methods [ 16 , 24 , 19 , 1 ] using our proposed evaluation procedure. The table shows the F1-scores for TPCC∈{0.3,0.4,0.5,0.6} and the mean of all four F1-scores, mSCF1 . We average the results over all tissue sections in a dataset. Reproducibility Note: We introduce and optimize a threshold for Lieb et al.’s method, considering only m/z values that exceed the threshold as peaks, because this leads to more accurate results.
Figure 3: Detailed comparison of our spatial self-supervised peak learning autoencoder, S 3 PL, with state-of-the-art peak picking methods [ 16 , 24 , 19 , 1 ] using our proposed evaluation procedure. The figures show the mSCF1 scores for each tissue section within each dataset separately.
Figure 4: Visualization of selected peaks by our S 3 PL method on the GIST dataset [ 4 ] in the representative mass range m/z563 to 573 . The depicted mean spectrum contains many distinct peaks, which do not necessarily correspond to spatially structured ion images. S 3 PL only selects peaks with spatial structure.
Figure 8
Figure 7: Ablation study on the best kernel depth d1 and d2 . We selected one tissue section from each of the three public datasets [ 2 , 10 , 20 ] . The heatmap shows the mSCF1 score for different combinations of kernel depths.
Figure 8: Variation of mSCF1 scores with a fine-tuned peak number n on other tissue sections of a dataset collection [ 2 , 10 , 20 ] . The boxplots indicate the best and worst possible results when fine-tuning the number of peaks on one tissue section and using this number for every other tissue section of a dataset collection.
Peak picking is a fundamental preprocessing step in Mass Spectrometry Imaging (MSI), where each sample is represented by hundreds to thousands of ion images. Existing approaches require careful dataset-specific hyperparameter tuning, and often fail to generalize across acquisition protocols. We introduce IonMorphNet, a spatial-structure-aware representation model for ion images that enables fully data-driven peak picking without any task-specific supervision. We curate 53 publicly available MSI datasets and define six structural classes capturing representative spatial patterns in ion images to train standard image backbones for structural pattern classification. Once trained, IonMorphNet can assess ion images and perform peak picking without additional hyperparameter tuning. Using a ConvNeXt V2-Tiny backbone, our approach improves peak picking performance by +7 % mSCF1 compared to state-of-the-art methods across multiple datasets. Beyond peak picking, we demonstrate that spatially informed channel reduction enables a 3D CNN for patch-based tumor classification in MSI. This approach matches or exceeds pixel-wise spectral classifiers by up to +7.3 % Balanced Accuracy on three tumor classification tasks, indicating meaningful ion image selection. The source code and model weights are available at https://github.com/CeMOS-IS/IonMorphNet.
Philipp Weigand, Niels Nawrot, Nikolas Ebert +2
Mannheim University of Applied Sciences, Germany · Faculty of Biosciences, Heidelberg University, Germany
Tandem mass spectrometry (MS/MS) is central to small molecule identification, but current deep learning systems for spectrum prediction still remain difficult to evaluate and deploy in practice. While novel architectures constantly claim state-of-the-art performance, inconsistent metadata conditioning and entangled preprocessing pipelines hinder fair architectural comparisons. Besides, existing evaluations are often restricted to curated datasets, failing to capture the heterogeneity and cross-domain shifts of real-world metabolomics. Furthermore, current benchmarks lack difficulty-aware diagnostics and leave blind to how models behave under specific compute or data constraints. To address this, we present FlexMS, a modular public-data benchmark framework that standardizes MS/MS prediction across public resources while keeping molecular encoders, metadata conditioning, predictor heads, and downstream retrieval under one protocol. FlexMS establishes a fair evaluation playground which significantly lowers the barrier for integrating new predictive tools. Rather than solely optimizing for average scores, FlexMS augments aggregate accuracy with difficulty-aware diagnostics, providing actionable guidance on model selection across different compute constraints, data scales, and downstream retrieval objectives. Ultimately, FlexMS provides the community with a reproducible standard to identify which algorithmic conclusions are stable and which operating points are most viable in practice.
Yunhua Zhong, Yixuan Tang, Yifan Li +5
The Hong Kong University of Science and Technology (Guangzhou). · The University of Hong Kong. · Yangzhou University. +3
Tandem mass spectrometry provides a high-throughput framework for identifying and quantifying proteins in complex biological samples. In computational proteomics, predicting peptide MS/MS spectra is a critical task, enabling downstream applications such as large-scale peptide identification and quantification. While deep learning architectures have substantially improved prediction accuracy, three evaluation challenges obscure the true progress of the field. First, inconsistent data preprocessing and incompatible model output spaces hinder fair model comparison. Second, flawed data splitting strategies can permit hidden sequence leakage and inflate reported performance. Third, existing evaluations typically lack comprehensive cross-species benchmarking and systematic assessment of model robustness to influential experimental conditions. To address these challenges, we propose PepSpecBench, a unified benchmark for peptide MS/MS spectrum prediction. PepSpecBench standardizes data preprocessing across complementary public datasets, enforces a strict backbone-disjoint splitting strategy to eliminate sequence leakage, and evaluates diverse architectures within a shared fragment-ion representation space. It further introduces a comprehensive multi-species evaluation suite and physically grounded metadata perturbation probes to assess model robustness and instrument awareness. We uncover previously unrecognized performance discrepancies and robustness limitations across six representative models, providing actionable insights for future model design, evaluation and practical deployment.
Zhiwen Yang, Pan Liu, Yifan Li +2
The Hong Kong University of Science and Technology (Guangzhou). · Yangzhou University. · The Hong Kong University of Science and Technology.