Barrier-Aware Gaussian Processes for Immune Exclusion in Desmoplastic Tumors

Many solid tumors, such as pancreatic cancer, keep killer T cells out by surrounding themselves with dense scar-like tissue. This tissue, the stroma, is rich in fibroblasts, macrophages and hyaluronic acid. Spatial transcriptomics measures gene expression at thousands of locations across a tissue slice, so in principle it can show how far immune activity reaches into a tumor nest and what stops it. The statistical tools used to smooth and interpolate these maps are mostly Gaussian processes. A Gaussian process (GP) is a Bayesian model that treats an unknown spatial pattern as a random function. A covariance function, the kernel, says how strongly any two locations are expected to resemble each other. Almost every kernel in use measures resemblance by straight-line distance. That is the wrong geometry for a tissue where a 50 µm band of dense matrix may separate two cells that are close in space but cut off from each other.

We propose a spatial GP whose kernel is the response of a diffusion process running through the tissue. The local "conductivity" of that process is predicted from histology: high in loose tissue, low in dense stroma. Two spots on opposite sides of a thick fibrotic ring are therefore weakly correlated, while two spots the same distance apart inside a nest are strongly correlated. Because the barrier strength is a fitted, interpretable parameter, the model does more than predict better. It turns a biological question into a statistical test: is immune exclusion explained by how much matrix lies in the way, or simply by which side of the tumor margin a cell sits on?

Core Claim

Our hypothesis is that the right spatial covariance for the immunosuppressive tumor microenvironment is a transport covariance, not a Euclidean one. We build it by defining the latent expression field $f$ as the solution of a stochastic diffusion equation with spatially varying conductivity:

$$\left(\kappa^2 - \nabla\cdot D(\mathbf{x})\nabla\right) f(\mathbf{x}) = W(\mathbf{x}), \qquad \log D(\mathbf{x}) = \boldsymbol{\beta}^\top \mathbf{h}(\mathbf{x}).$$

The terms are as follows. $W$ is spatial white noise. $\kappa$ sets the baseline correlation length. $D(\mathbf{x})$ is the conductivity at location $\mathbf{x}$. $\mathbf{h}(\mathbf{x})$ is a small vector of histology features at $\mathbf{x}$, such as stroma density segmented from the paired H&E image. $\boldsymbol{\beta}$ holds a few weights that the model learns.

When $D$ is constant, this reduces to an ordinary Matérn GP, a standard smooth stationary kernel. When $D$ is low inside dense stroma, correlation must travel around or through the barrier. That correlation weakens in proportion to the barrier's thickness and density.

Read-out counts at spot $s$ for gene $g$ follow a negative binomial distribution, an over-dispersed count model. Its log-mean is a size factor plus gene loadings on a few such latent fields. We keep the count likelihood because GPcounts showed that Gaussian noise models on spatial counts lose power and inflate false discoveries.

What would be new is precise. Spatial GPs have used stationary kernels, and physics-informed GPs have embedded linear operators. Nobody has used histology to set the coefficients of the operator that defines the spatial prior over tumor tissue. Nobody has then tested whether that learned barrier explains immune exclusion better than a sharp compartment boundary does.

Relation to Prior Work

Two GP methods for spatial transcriptomics motivate the gap. CONCERT is a GP variational autoencoder that predicts how genetic perturbations propagate through tissue. It includes an explicit "border" task on Perturb-map lung tumors, but it uses stationary kernels within a slice. Its authors acknowledge that this cannot represent sharp histological barriers. stVGP uses a variational GP to align serial slices and interpolate 3D expression, also with homogeneous spatial covariance. Our model keeps the GP machinery both papers rely on and changes only the geometry the kernel encodes.

The method's principle comes from Physics-Informed Gaussian Process Regression Generalizes Linear PDE Solvers. That paper shows that conditioning a GP on linear differential operators is well defined and generalizes finite-element solvers, though it is demonstrated only on heat conduction in a CPU die. Our operator is linear in $f$, so that theory applies directly. It does not apply to the joint fit of $f$ and $D$, and we handle that part by ordinary marginal-likelihood or variational optimization over the few parameters in $\boldsymbol{\beta}$.

There is a practical bonus. Discretizing the operator on a mesh gives a sparse inverse covariance matrix. Exact factorization then costs far less than the dense $O(N^3)$ that limits standard GPs, roughly $M^{1.5}$ for $M$ mesh nodes in two dimensions with standard sparse orderings. This addresses the scalability limitation that GPcounts handles with inducing points.

The biology both motivates the model and constrains how its output may be interpreted. Zhao et al. showed that CAR-T cells secreting hyaluronidase penetrate gastric tumors more deeply, which is direct evidence that matrix acts as a physical barrier to effector cells. Wu Jun et al. mapped POSTN⁺ fibroblasts and SPP1⁺ macrophages along PDAC tumor boundaries, set against CCL4⁺ CD8⁺ T-cell niches. They also noted that blanket stromal depletion backfires, so it matters where the barrier actually is, not just whether stroma is present. The PDAC mIHC spatial framework found that CD8⁺ and CD163⁺ cells within a 100 µm stromal "influence area" around K17⁺ nests depart from random placement. This sets the length scale at which our kernel must differ from a Euclidean one.

The chemokine and metabolite axes, MYBL2–CCL2 in ovarian cancer (Pan et al.) and MTAP–MTA in glioblastoma (Hansen et al.), motivate a second latent field that represents suppressive-signal sources. We are explicit that the model sees transcripts, not protein concentrations. The fitted field is a latent "zone of influence," not a measured chemokine gradient. Claims about literal diffusion are out of scope.

Research Program

The work has three stages.

The first stage builds the model. We segment H&E (or mIHC where available) into a stroma-density feature map. We triangulate the tissue at a resolution finer than spot spacing and assemble the discretized operator. We fit the negative binomial likelihood with a Laplace or variational approximation, learning $\kappa$, $\boldsymbol{\beta}$ and gene loadings jointly. We fit two to four latent fields, initialized from known programs: a cytotoxic CD8 program, an SPP1⁺/M2-like macrophage program, and a CCL2/POSTN source program.

The second stage is predictive validation on held-out spots. It focuses on spots within 100 µm of tumor margins, because that is where geometry should matter.

The third stage is the scientific test, which separates three hypotheses. The Euclidean hypothesis says immune programs decay with straight-line distance. The compartment hypothesis says they change sharply at the margin regardless of what lies there. The barrier hypothesis says they decay with transport resistance, so leakage into nests should shrink as the surrounding stromal ring grows thicker or denser. These make different predictions for nests with thin versus thick rings, and only the barrier model ties the size of the drop to measured matrix.

Baselines

The naive reference is a generalized additive model. It regresses each program's counts, with a negative binomial link, on signed distance to the segmented tumor margin, plus a compartment label. It costs almost nothing and captures most of the spatial structure a pathologist would describe. A barrier GP that cannot beat it on held-out border spots is not worth its complexity.

The strongest GP baseline is the same model with constant $D$. This is a stationary Matérn GP with a negative binomial likelihood, in the spirit of GPcounts. It is also the key ablation: it differs from our model only in whether histology sets the conductivity. A second ablation keeps $D$ histology-driven but spatially shuffles $\mathbf{h}(\mathbf{x})$ across the slide. This tests whether gains come from real matrix placement or merely from extra flexibility.

A piecewise baseline fits independent stationary GPs in the tumor and stroma compartments, with correlation cut at the margin. This is the 2D analogue of the changepoint kernels in SegCPGP, and it is the most direct implementation of the compartment hypothesis.

The strongest published method on a comparable task is CONCERT on the Perturb-map border task. The file reports only relative gains for CONCERT over scGEN, CPA and spatial graph networks: E-distance reduced by up to 33.77% (patch) and 33.74% (niche), MAE reduced by up to 23.28%, and Pearson $r$ improved by up to 9.10%. No border-specific absolute value was found on Lacuna. We will therefore rerun CONCERT ourselves on identical splits rather than quoting a number. We will also test a variant of CONCERT with its stationary kernel replaced by ours.

All methods get the same spots, the same held-out masks, the same histology inputs where they can use them, and equal hyperparameter search budgets. Beating a baseline means improving held-out negative binomial log-likelihood and border-spot MAE on a majority of slides, with paired confidence intervals that exclude zero. Predictive intervals must also stay calibrated, with nominal 90% intervals covering within a few points of 90%.

Why not just…?

Why not just regress on distance to the tumor margin? This is a serious threat, and we include it as the naive baseline. It cannot express the barrier hypothesis, though. Two nests the same distance from stroma, one behind a thin ring and one behind a thick ring, get identical predictions. Adding ring thickness as a covariate gets closer, but it still handles irregular geometry poorly: gaps in the ring, or a nest reached through a channel of loose tissue. The diffusion kernel handles these automatically. If the distance model plus a thickness covariate matches our model on border spots, we will report that the transport geometry adds nothing beyond a scalar summary.

Why not just use a changepoint or piecewise GP? This is the compartment hypothesis in model form, and it may well win. Exclusion might be decided by cell identity at the margin, for example SPP1⁺ macrophages acting as a cellular shield as in Pan et al., rather than by matrix. The decisive comparison is the thin-versus-thick ring stratification. The piecewise model predicts the same drop across all margins, while the barrier model predicts a graded drop. Whichever fits held-out data better answers the biological question, and either answer is publishable.

Why not just use a graph neural network or graph autoencoder like CLARIFY? A k-nearest-neighbor graph could be reweighted by stroma density and achieve something similar. A barrier-weighted graph Laplacian is in fact close to our discretized operator. What graph networks lack is a calibrated posterior and predictions off the measured spots. On the perturbation task, CONCERT already outperformed spatial graph convolutional networks. We therefore treat the graph network as dominated by CONCERT, unless our rerun shows otherwise.

Why not just solve a diffusion PDE numerically? A forward solver needs known sources, rates and boundary conditions, and none of these are measured here. Fitting them by repeated solves is slow and fragile; Macdonald et al. report GP gradient matching about five times faster than explicit integration on a five-species signaling model. Our model uses the PDE only to define a prior and lets the data determine the field. PIGP shows this is a strict generalization of the solver view, and it comes with uncertainty.

Proposed Experiments

The first benchmark is the Perturb-map lung border task from CONCERT. It is the only file-listed benchmark that scores prediction across tumor interfaces. There we compare all baselines and the CONCERT kernel swap.

The main application uses PDAC data of the kind assembled by Wu Jun et al., meaning Visium and Xenium sections with paired H&E. Held-out masks there target border spots within 100 µm. Xenium's finer resolution lets us check whether Visium-scale fits recover cell-level gradients seen on adjacent sections.

The decisive biological check stratifies tumor nests by stromal ring thickness and density, measured from H&E. We then test whether held-out CD8 program leakage into nests follows the barrier model's graded prediction or the piecewise model's step.

A second check ties the learned conductivity to independent evidence. Conductivity is fitted from H&E only and then correlated with matrix measurements not used in fitting. These are hyaluronan synthase and collagen transcripts on held-out genes and, where available, mIHC on the 23-slide PDAC cohort, whose CD8 and CD163 spatial-deviation statistics (MAD 1.36 and 0.99) give a reference effect size.

The model also makes a prediction that could be tested later in a hyaluronidase-treated xenograft of the kind used by Zhao et al.. Treatment should raise the fitted conductivity in treated tissue, and T-cell programs should extend correspondingly further into nests.

The project fails cleanly if the constant-conductivity and shuffled-histology ablations match the full model. That outcome would mean the histology-defined geometry carries no information beyond flexible smoothing.