Skip to main content
    Scalexa — Senior Engineering & AI Solutions
    High-Performance Computing & Bioinformatics

    SimMS: GPU-Accelerated Mass Spectrometry Similarity Engine

    Project Overview

    Pangea Bio needed to overcome a critical computational bottleneck in untargeted metabolomics: comparing fragmentation patterns of unknown compounds against large reference databases. Traditional CPU-based methods were taking tens of CPU-days for repository-scale searches. Scalexa delivered SimMS—a GPU-accelerated cosine similarity engine that achieves up to 1000× speed improvements while maintaining scientific accuracy, enabling large-scale metabolite identification without requiring massive compute clusters.

    SimMS: GPU-Accelerated Mass Spectrometry Similarity Engine project screenshot

    Client and Scientific Context

    Pangea Bio operates at the intersection of computational biology and metabolomics research. Their platform enables researchers to identify unknown compounds by comparing tandem mass spectrometry (MS/MS) fragmentation patterns against reference spectral databases. This capability is foundational for drug discovery, natural product research, and clinical diagnostics. The challenge: as reference databases grow to millions of spectra, the computational cost of similarity matching becomes prohibitive.

    The Computational Challenge

    Untargeted metabolomics relies on cosine similarity algorithms to match experimental spectra against reference libraries. Established tools like MatchMS provide accurate results but execute sequentially on CPU, making large-scale repository searches impractical. For Pangea Bio's workloads—comparing tens of thousands of query spectra against databases containing millions of reference entries—traditional approaches would require tens of CPU-days per analysis run. This bottleneck was blocking their ability to scale.

    • Reference database sizes growing into millions of spectra
    • Traditional CPU methods requiring tens of CPU-days for large workloads
    • Need for both greedy and modified cosine similarity algorithms
    • Accuracy requirements: results must match reference implementations exactly

    Engineering Approach

    Scalexa's approach focused on GPU parallelization without sacrificing algorithmic correctness. We mapped the cosine similarity computation—including both greedy and modified variants—onto GPU architecture, designing kernels that exploit the inherent parallelism of spectral comparison. The implementation preserves tolerance handling and peak matching logic from MatchMS while executing thousands of comparisons simultaneously.

    • Designed parallel GPU kernels for greedy and modified cosine similarity
    • Preserved algorithmic equivalence with MatchMS across all tolerance ranges
    • Implemented efficient memory management for large spectral datasets
    • Built benchmarking infrastructure for validation against reference results

    Solution Architecture

    SimMS consists of a GPU compute layer that accepts batched spectral data, executes parallelized similarity computations, and returns scored matches. The engine integrates into Pangea Bio's existing computational metabolomics pipelines through a clean API. Deployment is containerized for reproducibility, with CI/CD infrastructure ensuring that every release passes regression tests against known reference outputs. The architecture supports both single-GPU workstations and cloud GPU instances for elastic scaling.

    Measured Outcomes

    • ~1000× acceleration over MatchMS on representative metabolomics workloads
    • 99.99% agreement with reference implementation on core similarity computations
    • Reduced repository-scale searches from tens of CPU-days to hours on single GPU
    • Enabled large-scale metabolite identification without cluster compute infrastructure
    • Published in Bioinformatics (Volume 41, Issue 3, March 2025) as peer-reviewed validation

    Why It Matters

    SimMS demonstrates what's possible when senior engineering meets scientific computing: a 1000× speedup without compromising accuracy. For Pangea Bio, this unlocks repository-scale metabolomics searches that were previously impractical, accelerating their research pipeline and reducing infrastructure costs. The peer-reviewed publication is available in Bioinformatics (https://academic.oup.com/bioinformatics/article/41/3/btaf081/8026685). The work exemplifies Scalexa's approach—pragmatic, maintainable, and grounded in measurable outcomes. Experience includes work for Walmart, Coca-Cola, ESPN, UNICEF, and FIFA.

    Get Started

    Ready to Get Started?

    Book a free 30-minute discovery session with our senior engineers to identify quick wins and show you what's possible.

    View Our Work