Filling Large Holes in Spatial Transcriptomics with Multi-Scale Graph-Conditioned Diffusion

Spatial transcriptomics measures which genes are active at thousands of locations ("spots") across a tissue slice. The measurements have holes. Some are scattered, where individual genes fail to register at individual spots. Others are contiguous, where a patch of tissue tore, folded, or was never captured. Current generative imputers fill the holes by looking at a spot's immediate neighbors. These imputers are diffusion models, generators that learn to turn random noise into realistic samples by removing the noise step by step. Looking only at immediate neighbors works when the neighbors are present. Inside a large hole, the immediate neighbors are missing too.

We propose a diffusion imputer that is guided by several nested views of the tissue at once. The finest view is the immediate neighbors, the middle view is the surrounding cellular niche, and the coarsest view is the region of the slide. A small attention module, a learned weighting, decides for each missing spot how much to trust each view. It shifts weight toward coarser views when finer ones are empty. The completed slides then serve as augmented training data for downstream models.

Core Claim

The benefit of multi-scale context for generative completion should grow with the spatial extent of the missing region. When dropout is scattered at random, a one-hop conditioned model such as LGDiST should be hard to beat. LGDiST is a latent diffusion transformer conditioned on the six hexagonal neighbors of a Visium spot. When a contiguous disk several spots wide is missing, those six neighbors are themselves unobserved. The one-hop model is then effectively generating without context. This is the regime in which SpatialDiffusion reports that generation collapses when it must extrapolate beyond observed tissue.

Our specific claim has two parts. First, the scale-selection weights must depend on how much of each scale is actually observed. Second, only this mask-aware weighting, and not simply a wider fixed neighborhood, will close the gap. The claim is falsifiable: if a fixed three-hop context matches us at every hole size, the attention is unnecessary and we will say so.

Research Program

The model reuses LGDiST's latent space unchanged. That latent space comes from an autoencoder over expression that keeps LGDiST's "context genes," the genes without spatial autocorrelation that LGDiST uses as a stabilizing background. Reusing it means any gain is attributable to conditioning rather than representation.

Around each target spot we build a three-level graph pyramid. The fine level is the native spot adjacency. The middle level is a radius graph covering roughly two to four hops. The coarse level is a graph over "hyperspots," clusters of spots in the style of the coarse-to-fine grouping in Fast-JADE (JADE). A lightweight graph convolutional network (GCN) runs within each level. A GCN updates each node by averaging transformed features of its graph neighbors. We choose a small GCN because SAGE-FM showed that a small GCN over 15-spot subgraphs is competitive with far heavier models. Message passing uses only observed nodes, which keeps the unobserved spots from feeding garbage into the context.

Each level produces a context vector $c_s$ for scale $s$. The per-spot scale weights are

$$\alpha_s = \mathrm{softmax}_s\big(q^\top k(c_s) + g(m_s)\big),$$

where $q$ is a query derived from the current noisy latent and the diffusion timestep, $k(\cdot)$ is a learned projection, and $m_s$ is the fraction of level-$s$ neighbors that are observed. The function $g$ is a small learned function, so an empty scale can be down-weighted explicitly. The weighted context $\sum_s \alpha_s c_s$ conditions the denoiser through cross-attention.

We train with masks drawn from a mixture of random spot dropout, random contiguous disks, and "transplanted" real hole shapes. The transplanted shapes are copied from the missing regions and tissue tears of other slides. The goal is to make the evaluation holes look like real failures rather than idealized ones.

For augmentation, we draw several completions per slide and use them as stochastic training copies for downstream models. We then ask whether sample diversity helps beyond a single best completion. Rigid augmentations like rotation cannot add unobserved states, as argued in Generative Augmentation for Clinical Deep Learning. Plausible alternative completions of a hole can add such states.

We also test whether the model's multi-scale design duplicates prior work. MagNet fuses bin-, spot-, and region-level histology features with cross-attention and graph attention. stMFG cross-attends spatial and expression graphs after every GCN layer. SToFM injects slide-level "virtual cells" into local sub-slices. All three show that multi-scale context helps encoders and regressors, and they motivate our design. None of them generates. None conditions its choice of scale on which parts of the context are missing, and that conditioning is the ingredient under test here.

Baselines

The naive reference point has two parts. The first is neighbor-mean imputation, which averages the observed spots within the nearest available ring. The second is leaving holes empty and training downstream models on the observed spots only. Any method that fails to beat neighbor averaging inside large holes is not worth its cost. We report both on every mask type.

The strongest existing method is LGDiST, run with its released protocol on the 26 SpaRED datasets at 1,024 genes. We use the same train/test spot splits, the same autoencoder, and the same number of diffusion steps and training updates. We also retune it with a hyperparameter budget equal to ours. LGDiST reports an average MSE 18% lower than SpaCKLE across the 26 datasets. It also reports that its completions improve six downstream expression predictors by up to 10% in MSE. No absolute per-dataset MSE value is reported on Lacuna, so we will rerun it ourselves rather than quote a number. Beating LGDiST means two things. On contiguous holes of radius three spots or more, we need at least 10% lower MSE, averaged across datasets, with non-overlapping seed intervals. Under random dropout, we need to stay within seed noise of it. A win only under random dropout would contradict our own claim.

Two ablations isolate the key ingredient. The first is a fixed-context model: the same diffusion backbone conditioned on a single three-hop GCN context, matched in parameter count. The second is the full pyramid with uniform, mask-blind weights, meaning $g$ is removed. If the fixed-context model or the mask-blind pyramid matches the full model, the mask-aware scale selection is not the source of any gain.

A third, deterministic competitor is the same multi-scale GCN trained to regress masked expression directly, in the spirit of SAGE-FM's masked recovery. This isolates whether diffusion sampling adds anything over a point estimate.

For downstream clustering on DLPFC, the published reference is stMFG, which reports an ARI of 0.89 on slice 151671 using intact data. JADE reports a median ARI of about 0.61–0.65 across slices. We do not aim to exceed these numbers on intact data. We aim to recover them on artificially holed slices.

Why not just…?

Why not just widen LGDiST's neighborhood to k hops? This is the most serious threat. A single wide neighborhood has two failure modes. It dilutes the six most informative neighbors when they are present, and it carries no signal about which rings are empty when they are not. We expect the widened model to lose slightly under random dropout and to trail under large holes. The fixed-context ablation settles this directly. If it ties us across hole sizes, we will report the simpler model as the answer.

Why not just regress the missing expression with a multi-scale GCN, without diffusion? Mean-squared error rewards predicting the average. A deterministic regressor may therefore win or tie on MSE inside large holes. It will do so by producing blurred, over-smoothed patches. We therefore also measure two things a regressor tends to destroy: preservation of spatial autocorrelation (Moran's I per gene) and sharpness of the recovered layer boundaries on DLPFC. We also test whether multiple sampled completions improve downstream training more than one regressed completion does. If the regressor matches on all three, the generative part is unjustified for this task.

Why not just add one global slide token, as SToFM's virtual cells do? A single global token supplies region identity but not the niche-level texture that separates, for example, the edge of a cortical layer from its interior. The "fine plus global only" variant of our pyramid tests this. A tie would mean the middle scale is dead weight, and we would drop it.

Why not just pretrain a large encoder on HEST-1k and impute from its embeddings? HEST-1k reports that performance scales logarithmically with parameter count (R=0.81). Scale is a real alternative. We will include a SAGE-FM encoder pretrained on HEST-1k as the conditioning source in one arm. This tells us whether pretraining substitutes for mask-aware scale selection or complements it.

Proposed Experiments

The primary experiment sweeps hole radius from zero, which is pure random dropout, up to roughly eight spots on all 26 SpaRED datasets. For every method we plot MSE and Pearson correlation inside the hole against radius. The decisive signature is a widening gap between our model and LGDiST as the radius grows, together with a near-zero gap at radius zero. We also inspect the learned $\alpha_s$ and expect them to shift toward the coarse scale as $m_s$ at the fine scale drops. If they do not shift, the mechanism is not doing what we claim, even if accuracy improves.

The second experiment tests realism on DLPFC. We transplant real tear shapes into intact slices, complete them, and rerun a fixed downstream clustering method. We report the fraction of the intact-slice ARI that is recovered, alongside boundary F1 on the annotated cortical layers.

The third experiment tests augmentation. We follow LGDiST's downstream protocol and train the same expression predictors on data completed by each imputer. We compare one completion per slide against several sampled completions per slide.

The fourth experiment probes extrapolation, following the failure SpatialDiffusion reports. We hold out entire contiguous spatial domains, such as one cortical layer end to end. We then ask whether coarse-scale context lets the model produce layer-appropriate expression, scored by a classifier trained on intact slices.

The proposal fails cleanly if the fixed-context ablation matches the full model across radii. It also fails if the deterministic regressor matches the full model on autocorrelation and downstream metrics. In either case we would report which simpler model suffices.