Benchmarking spatial transcriptomics segmentation: Evaluation as a driver of better methods
Published in Protocols & Methods, Computational Sciences, and Mathematics
Progress in computational biology is often associated with building new methods. But before we can build better methods, we need to understand precisely what existing ones are getting wrong.
This was one of the central motivations behind our study on cell segmentation in spatial transcriptomics.
Segmentation sits remarkably early in the analytical workflow. It determines which transcripts belong to which cells and therefore influences the cellular representation on which almost every subsequent analysis is built. Errors introduced at this stage can propagate into cell-type annotation, spatial organization, expression profiles and cell–cell communication. Yet, despite this central role, segmentation remains one of the less standardized components of spatial transcriptomics analysis.
At first glance, evaluating segmentation might seem straightforward: identify the method that produces the “best” cells. In practice, however, defining best is much harder.
A segmentation can recover many cells while producing noisy molecular profiles. Another method may generate highly coherent cells but leave a substantial fraction of the tissue unsegmented. A method that performs exceptionally well on one technology or tissue architecture may behave very differently on another.
This led us to a broader question:
Can benchmarking be used not simply to rank methods, but to identify the limitations of current computational architectures?
That shift in perspective shaped the study.
We evaluated eleven segmentation approaches across fifteen datasets from five spatial transcriptomics technologies, covering twelve human and mouse tissue types and approximately 2.3 million cells. Importantly, the comparison included image-based, transcript-informed and multimodal strategies rather than treating segmentation as a purely computer-vision task.
But expanding the number of datasets was only part of the challenge. We also needed to expand what we meant by performance.
Instead of relying on a single segmentation score, we evaluated methods using 15 biologically informed measurements spanning cell recovery, transcript assignment, transcriptomic richness, morphology, cellular composition, expression purity and spatial organization. We subsequently organized these measurements into biologically interpretable categories so that the strengths and weaknesses of each method could be examined separately rather than hidden inside one global number.
This turned out to be crucial.
There was no universal winner.
Different methods occupied different regions of the performance landscape. Some recovered richer transcriptomic profiles but fewer cells. Others provided broader coverage while compromising other aspects of biological fidelity. Even metrics that might initially appear related could capture distinct properties of a segmentation. In particular, expression purity revealed information that could not simply be inferred from transcript recovery or segmentation yield.
For us, this is one of the most important messages of the work.
Evaluation should not only tell us which method wins. It should tell us what is still missing.
If an architecture consistently achieves good transcript recovery but poor cellular coverage, that defines one methodological gap. If another captures morphology but allows molecular contamination between neighboring cells, that defines another. If performance changes substantially between platforms, then the solution may require models that explicitly account for technology-specific information rather than assuming a universal input distribution.
In this sense, a good benchmark becomes a map of the unresolved problem space.
This becomes particularly important as spatial transcriptomics moves toward increasingly sophisticated downstream applications. We found that segmentation differences affected cell-type-specific expression and transcript contamination, and these differences propagated into biological analyses such as ligand–receptor inference. In some conditions, negative-marker analyses indicated misassignment affecting roughly 10–15% of cells.
So segmentation cannot be considered merely a preprocessing detail.
The cellular representations produced today will increasingly become the inputs for spatial atlases, models of tissue organization, cell–cell communication analyses and, ultimately, large representation and foundation models. If the segmentation used to create those representations is biased, incomplete or contaminated, increasingly powerful downstream models cannot recover information that was incorrectly assigned at the beginning.
As we discuss in the paper, segmentation quality therefore places an important constraint on the quality of downstream representation learning.
Another goal of the project was consequently to make evaluation reusable rather than static. We implemented the benchmark as a modular Nextflow workflow that harmonizes preprocessing, executes different segmentation approaches and evaluates their outputs under a common framework. The intention is that new datasets, technologies and segmentation methods can be incorporated as the field evolves.
This matters because benchmarks should not be monuments to the state of a field at one moment in time. Ideally, they should become infrastructure for continuous methodological improvement.
Perhaps the most interesting outcome of this study, therefore, is not the ranking itself. It is what the pattern of successes and failures suggests about where segmentation should move next.
Our results indicate that morphology alone is unlikely to provide the complete solution. Image-driven, transcript-informed and multimodal methods each have advantages, but their limitations point toward architectures capable of integrating complementary sources of information while adapting to different tissue structures, technologies and biological objectives. Indeed, the performance of multimodal approaches in our benchmark suggests that future progress may increasingly come from principled integration of morphological and molecular information.
That is why we see benchmarking not as the end of method development, but as its beginning.
Before asking how to build a more sophisticated model, we should first ask what current models systematically fail to capture. A sufficiently broad and biologically grounded evaluation can provide that answer.
And once those gaps become measurable, they also become targets for the next generation of methods.
Follow the Topic
-
Nature Methods
This journal is a forum for the publication of novel methods and significant improvements to tried-and-tested basic research techniques in the life sciences.