Spatial transcriptomics measures gene expression at thousands of small spots laid over a tissue slice. Most deep models for this data assume that physically neighboring spots should look alike. They build a graph connecting nearby spots and train a network to pull neighbors' representations together. The assumption is usually right, but it fails exactly where biology is most interesting: at the border between two cortical layers, or at the rim of an immune cluster inside a tumor. Treating every neighbor pair as "same kind of tissue" is effectively a noisy label. The noise is concentrated on boundary pairs, and a model that fits it blurs thin structures away.
Research on learning with corrupted labels has a well-documented regularity for this situation. Networks first fit the consistent, shared structure in the data and only later memorize the inconsistent examples. As a result, wrongly labeled examples are recognizable by their high loss early in training. We propose to treat each "neighbors are similar" pair as a label, track how well a graph-free encoder can satisfy it over the first epochs, and fit a two-component mixture to those per-pair losses. That mixture flags likely boundary edges without any annotation. The flagged edges are then down-weighted before spatial smoothing is applied. The central testable claim is temporal. The early losses should separate boundary pairs from within-region pairs better than raw expression similarity does, and better than the similarity of fully trained embeddings, which by construction have already been pulled together across boundaries.
Core Claim
The research file finds no prior work that applies early-learning loss separation to spatial transcriptomics, and the nearest methods each leave the specific gap open. GraphST (Spatially informed clustering, integration, and deconvolution of spatial transcriptomics with GraphST) learns spot embeddings with a graph neural network, a network that updates each spot's representation from its neighbors. Its contrastive objective treats adjacent spots as positive pairs, and it weights every edge uniformly from the first epoch. MAST-Decon (MAST-Decon: Smooth Cell-type Deconvolution Method for Spatial Transcriptomics Data) does adapt neighbor weights, using fixed kernels on distance, histology and expression estimates. Those weights come from an initial deconvolution pass that is itself noisy, not from training dynamics. DUSTED (DUSTED: Dual-Attention Enhanced Spatial Transcriptomics Denoiser) learns attention over neighbors and genes end to end, so its attention weights can themselves be shaped by the memorization the authors want to avoid.
Our claim is that edge reliability is best read off a specific window of training. That window comes after the encoder has captured shared expression programs and before it has used its capacity to force cross-boundary neighbors together. Reading reliability from this window improves recovery of thin and boundary-adjacent structures without giving up the denoising benefit of smoothing elsewhere.
Mechanism
Three papers supply the theory for why the window should exist. Gradients from consistent examples reinforce one another while gradients from inconsistent examples conflict and cancel early (On the Role of Label Noise in the Feature Learning Process). Deep linear networks learn strong singular modes before weak modes and noise (An analytic theory of generalization dynamics and transfer learning in deep linear networks). Fitting of clean versus random labels is empirically separated in time (A Closer Look at Memorization in Deep Networks). In tissue, the strong shared modes are the region-level expression programs, such as the signature of each cortical layer. A cross-boundary neighbor pair asks the encoder to map two different programs to nearby points, which is an inconsistent "label".
The mapping to label noise only holds if the scoring encoder cannot cheat by mixing neighbor features. A graph network averages neighbors from the first layer, so neighbors look similar regardless of their expression. We therefore score edges with a graph-free encoder $f$, a small multilayer perceptron on each spot's own normalized counts. It is trained with GraphST's neighbor-positive contrastive objective, and the per-edge loss for edge $(i,j)$ at epoch $t$ is recorded. Following Unsupervised Label Noise Modeling and Loss Correction, these losses are rescaled to $[0,1]$ and a two-component beta mixture is fit to them. The posterior probability that an edge belongs to the low-loss component is
$$ w_{ij} = p\big(\text{consistent} \mid \tilde{\ell}_{ij}(t^\ast)\big), $$
where $\tilde{\ell}_{ij}(t^\ast)$ is the rescaled loss of edge $(i,j)$ at the scoring epoch $t^\ast$. These posteriors then reweight both the message passing and the positive-pair term of the main graph model.
Without annotations or a clean validation split, $t^\ast$ is chosen as the epoch at which the fitted mixture is most bimodal, for example where the separation between its two component means is largest. A key analysis is whether this label-free choice lands near the epoch where boundary-edge detection, measured against annotations, actually peaks.
Self-scoring can confirm its own early mistakes, as Co-teaching: Robust training of deep neural networks with extremely noisy labels documents for single networks that filter by their own loss. We therefore also test a cross-scored variant. In it, two independently initialized encoders each score edges, and each network's graph is weighted using its peer's scores.
Research Program
The work has three parts.
The first is a measurement study, and it alone could falsify the idea. On the annotated sections, we compute the area under the ROC curve for detecting cross-boundary edges from per-edge loss at every epoch of the graph-free encoder. We plot this curve against three static scores computed on the same edges. The first is cosine similarity of raw expression principal components. The second is histology feature similarity, in the spirit of MAST-Decon's image kernel. The third is the similarity of embeddings from a fully converged GraphST.
The prediction is a curve that rises, peaks early, and then falls as the encoder memorizes cross-boundary pairs. Its peak should exceed the raw-expression score because the early encoder has averaged over gene-level dropout. It should also exceed the converged-embedding score, which has already been smoothed across boundaries. If there is no early peak, or if raw principal-component similarity matches it, the temporal ingredient adds nothing and the project should stop or pivot.
The second part plugs the edge weights into GraphST for clustering. We evaluate both the single-network and the cross-scored variants.
The third part tests robustness when the boundary noise is harder. Spots near borders mix two cell populations, so here the noise is closer to the instance-dependent case. That is where Part-dependent Label Noise: Towards Instance-dependent Label Noise and the beta-mixture paper both report that small-loss separation weakens. We report detection quality separately for sharp boundaries and for broad transitional zones rather than averaging the two together.
Baselines
The naive reference point is clustering on expression alone with no spatial graph. It shows how much spatial smoothing helps at all. We have no reported number for it on Lacuna under our pipeline, so we will compute it.
The strongest existing method on this question is GraphST, which reports a median adjusted Rand index (ARI, agreement between predicted and annotated regions, 1 = perfect) of 0.60 on the twelve DLPFC sections (Spatially informed clustering, integration, and deconvolution of spatial transcriptomics with GraphST). It is the right competitor because our method changes exactly one thing in it: how much each edge is trusted. We will rerun GraphST under our preprocessing, graph construction, cluster-assignment step, and seeds. All of our comparisons are against that rerun, and the published 0.60 serves only as a sanity anchor. Our variant gets the same epoch budget plus the warm-up cost of the scoring encoder, which we report explicitly.
DUSTED denoises counts before analysis and reports a median DLPFC ARI of 0.515 (DUSTED: Dual-Attention Enhanced Spatial Transcriptomics Denoiser). It represents the alternative of fixing the data rather than the graph, and we also run GraphST on DUSTED-denoised counts.
The decisive ablations all down-weight or remove the same number of edges as our method, so that only the choice of edges differs. One ranks edges by raw expression similarity. One ranks them by histology similarity. One uses converged-GraphST embedding similarity, which is a two-pass "train, prune, retrain" approach. One removes edges at random. One uses our scoring read out at the final epoch instead of $t^\ast$.
Beating GraphST means a higher median ARI across the twelve sections, with the gain concentrated in spots within two hops of an annotated boundary and in the thinnest layer of each section. It also means matching or exceeding every matched-budget pruning ablation, assessed by a paired comparison across sections. On the hepatocellular carcinoma tertiary lymphoid structure (TLS) data, MAST-Decon reports a region-dissection ARI of 0.575, against 0.228 for RCTD (MAST-Decon: Smooth Cell-type Deconvolution Method for Spatial Transcriptomics Data). That is the bar there.
Why not just…?
Why not just prune edges whose endpoints have dissimilar raw expression? This is the most serious threat. It is cheap, needs no training, and resembles MAST-Decon's expression kernel. Our argument against it is that single Visium spots are sparse enough that raw similarity confuses dropout with true difference, which is the dropout-versus-true-zero problem raised by Latent Gene Diffusion for Spatial Transcriptomics Completion. That is only an argument, though. The epoch-by-epoch detection curve and the matched-budget pruning ablation settle it directly. If raw similarity ties, we will report that the temporal ingredient is unnecessary.
Why not just train GraphST once, prune by its embedding similarity, and retrain? At convergence the contrastive objective has, by design, pulled cross-boundary neighbors together. The embeddings therefore partly encode the error we are trying to detect. Our prediction is that converged-embedding detection quality sits below the early peak, and the measurement study tests exactly this.
Why not just use fewer neighbors or weaker smoothing? This reduces blur everywhere, at the cost of denoising everywhere. We sweep neighborhood size for the GraphST baseline and report the best setting chosen per dataset. If a tuned neighborhood size matches our method on boundary ARI while keeping within-region ARI, edge-specific weighting is not justified.
Why not just early-stop GraphST? Spatial data has no clean validation slide, because held-out spots carry the same dropout and boundary noise. In addition, stopping early sacrifices smoothing within regions, where it helps. Our method keeps full training on trusted edges and uses the early window only for scoring. The no-graph baseline and a GraphST run stopped at $t^\ast$ quantify this trade-off.
Decisive Checks
The idea stands or falls on three observations. The first is an early, above-baseline peak in boundary-edge detection on DLPFC that disappears by convergence. The second is a label-free choice of $t^\ast$ that lands within a few epochs of the annotation-defined peak across sections. The third is a gain over the rerun GraphST that is concentrated near boundaries and survives the matched-budget comparison against expression-similarity pruning. A secondary check on the hepatocellular carcinoma data asks whether flagged edges trace TLS margins, which are small enough that over-smoothing should visibly erase them under uniform edge weights.
References
- Spatially informed clustering, integration, and deconvolution of spatial transcriptomics with GraphST
- MAST-Decon: Smooth Cell-type Deconvolution Method for Spatial Transcriptomics Data
- DUSTED: Dual-Attention Enhanced Spatial Transcriptomics Denoiser
- On the Role of Label Noise in the Feature Learning Process
- An analytic theory of generalization dynamics and transfer learning in deep linear networks
- A Closer Look at Memorization in Deep Networks
- Unsupervised Label Noise Modeling and Loss Correction
- Co-teaching: Robust training of deep neural networks with extremely noisy labels
- Part-dependent Label Noise: Towards Instance-dependent Label Noise
- Latent Gene Diffusion for Spatial Transcriptomics Completion