Manuscript Offprint
arXiv:2610.28806SAIL: A Learnable Generalisation of Spatial Autocorrelation over Graph-Structured Data
Piotr Keller and Fayyaz Minhas
Abstract—In vision and scientific domains involving spatial data, a key question is whether node feature values vary independently across space or form coherent spatial structures. Classical spatial autocorrelation statistics such as Moran's I and Geary's C quantify this phenomenon but operate on a single scalar variable with fixed neighbourhood weights, limiting their use for high-dimensional graph-like data. We introduce SAIL (Spatial Autocorrelation Index Learner), a differentiable framework that generalises spatial autocorrelation into a learnable operator by jointly learning feature projections defining candidate scalar fields and inter-node neighbourhood affinities. SAIL produces interpretable local and global spatial coherence descriptors, enabling supervised prediction and unsupervised discovery of spatial autocorrelation modes and hotspots. We show that SAIL exactly recovers classical spatial statistics under appropriate parametrisations and, for tasks driven by latent spatial autocorrelation, can approximate the Bayes-optimal predictor with an inductive bias matched to such tasks. Experiments on synthetic data and large-scale biomedical graphs demonstrate statistical correctness and discovery of spatial coherence with applications across vision, geospatial analysis, and biomedicine. The code repository is available at: https://github.com/pkeller00/SAIL.
Index Terms—Graph algorithms, Learning, Machine learning, Multivariate statistics, Biology and genetics, Algorithms
I. INTRODUCTION
A RE tumour and immune cells intermixed within a tissue sample, or do they form distinct spatial niches associated with patient outcomes? Do neighbouring regions of a tissue section express similar gene programmes, or do these programmes change sharply across space? Are economic indicators geospatially coherent across neighbouring countries?
Such questions arise across many domains involving spatially structured data, including pathobiological imaging, geospatial analysis, and computer vision, and are fundamentally about spatial self-similarity: whether observations resemble, or differ from, their neighbours. Quantifying this dependence allows us to ask not only if spatial structure is present, but also how strongly it is expressed, where it occurs, and if similar patterns recur across samples. Spatial autocorrelation (SAC) provides the formal framework for measuring such spatial self-similarity at local and global scales [1]-[3].
Existing formulations for quantifying SAC, however, are poorly suited to modern high-dimensional, learned representations. Classical statistics such as Moran's I and Geary's C [4]-[8] operate on a single scalar variable under fixed, handcrafted spatial weights, and their multivariate extensions [9]-[11] largely aggregate these univariate statistics rather than jointly learning which feature combinations carry spatial signal. Graph Neural Networks (GNNs) can implicitly encode spatial dependence via message passing [12]-[14], but they do not provide an explicit, quantitative measure of spatial clustering or dispersion that can be optimised, discovered in an unsupervised manner, or subjected to statistical significance testing. This reveals a methodological gap: there is currently no scalable formulation of SAC that learns the feature projection and neighbourhood structure for irregular, high-dimensional graph data and can be automatically optimised.
To address this, we introduce Spatial Autocorrelation Index Learner (SAIL), a neural framework that learns spatial autocorrelation descriptors directly from high-dimensional node features in spatial graphs or point sets. Unlike fixed metrics or post-hoc statistics, SAIL formulates SAC as a learnable, high-dimensional operator that jointly learns feature projections defining candidate scalar fields and inter-node neighbourhood affinities, adapting to multi-feature representations. This provides an explicit, task-aware measure of SAC, bridging classical spatial statistics and deep representation learning.
Our key contributions are as follows:
-
We introduce SAIL, a differentiable, multivariate generalisation of spatial autocorrelation that jointly learns feature projections defining scalar fields and spatial affinity weights governing neighbourhood interactions, yielding interpretable local and graph-level SAC maps.
-
We demonstrate that SAIL supports supervised learning of predictive spatial patterns and unsupervised discovery of feature combinations exhibiting maximal spatial coherence or contrast, termed SAC modes and anti-modes, respectively, while enabling statistically significant detection of spatial hotspots, coldspots, and outliers.
-
We establish theoretical guarantees showing that SAIL (i) exactly recovers classical spatial statistics (Moran's I, Geary's C, Getis–Ord , and Morisita–Horn) under appropriate configurations and (ii) provides an inductive bias suited to SAC-driven prediction by approximating Bayes-optimal predictors under stated assumptions, representing quadratic spatial interactions that linear T-hop graph filters cannot capture, and having no greater Rademacher complexity than broader hypothesis classes.
-
We demonstrate SAIL’s broad applicability across histology, spatial omics, and geospatial data, and its scalability to multi-graph datasets containing millions of nodes. SAIL uncovers meaningful and prognostically relevant
This work has been submitted to the IEEE for possible publication. Copyright may be transferred without notice, after which this version may no longer be accessible.
P. Keller and F. Minhas are with the Predictive Systems in Biomedicine (PRISM) Lab, Department of Computer Science, University of Warwick, Coventry CV4 7AL, United Kingdom (e-mail: piotr.keller@warwick.ac.uk) i)
Graph
Structured Data
SAIL Module

Feature Projection

Neighbourhood Affinity

Strong Affinity
Weak Affinity
Local Spatial
Autocorrelation (SAC)
Global
SAC

h Modes
ii) Unsupervised Mode Discovery

Goal: Identify modes with maximal SAC
Supervised Mode Discovery

Goal: Identity if a target is associated with SAC
Interpretable Mode Definitions

Use: Understand what drives SAC per mode
Hot/Cold Spot Detection

Use: Localise spatial clusters and outliers per mode
Fig. 1. Overview of the SAIL framework. (i) SAIL takes graph-structured data whose nodes carry d-dimensional features. Inside the SAIL module, a learnable feature projection maps node features to h scalar fields (modes), and a learnable neighbourhood affinity assigns strong or weak weights to node pairs. Each projected field is combined with these affinities to give node-wise local spatial autocorrelation (SAC) scores for every mode, which can also be aggregated into an h-dimensional global SAC descriptor per graph. (ii) SAIL modes can be learned through supervised or unsupervised optimisation. In the unsupervised setting, SAIL identifies feature projections that maximise spatial autocorrelation (SAC), revealing which combinations of features exhibit the strongest spatial coherence across the dataset. Conversely, in supervised learning, global SAC descriptors are used to train a downstream predictor, enabling SAIL to identify spatial autocorrelation patterns associated with the target. In both settings, the learned feature projections provide interpretable combinations of features that define each mode. Finally, a formal statistical framework enables the detection of significant hot and cold spots on the learned modes.
spatial patterns without supervision, establishing it as a scalable, interpretable framework for learning spatial autocorrelation in high-dimensional graph-structured data.
A. Classical Spatial Autocorrelation Statistics
Consider a spatial graph containing nodes. For a scalar feature , let denote the value of that feature at node , and let denote its mean across the graph. Classical SAC statistics quantify whether similar or dissimilar values of tend to occur at spatially neighbouring nodes. The spatial relationship between nodes and is encoded by a predefined non-negative weight , typically derived from distance or adjacency.
- Moran’s I: Moran’s I [4], [6] measures how similar the value of feature k, after centring by its global mean , is to the mean-centred values at its spatially weighted neighbours, relative to the global variance. Positive values indicate spatial clustering, whereas negative values indicate spatial contrast:
- Geary’s C: Geary’s C [5], [7] instead penalises local squared differences directly. Values of C < 1 suggest spatial clustering of similar values (positive spatial autocorrelation), whereas C > 1 indicates spatial dispersion (negative spatial autocorrelation):
Other widely used classical SAC statistics include the Getis–Ord statistic, which measures local hotspot concentration, and the Morisita–Horn index, which quantifies compositional overlap between spatial neighbourhoods. Their formulations are provided in Supplementary Section B.
Despite their widespread use, the above classical SAC statistics assume a predefined scalar feature and spatial weighting scheme, limiting their use with high-dimensional data where informative feature combinations or neighbourhood relationships may need to be learned. Moreover, different SAC statistics are typically applied as separate fixed formulations rather than within a unified learnable framework. These limitations motivate the more general formulation introduced in SAIL.
B. Multivariate Extensions and Their Limitations
To move beyond a single scalar feature, several multivariate generalisations have been proposed [9]–[11]. The approach by Yamada et al. [10] standardises each feature channel to , where is the standard deviation of feature in graph , and defines the multivariate Moran's as an average of pairwise inner products between standardised feature vectors over the graph:
Because , it can be shown that this multivariate index is exactly the mean of the per-feature Moran's values, [10].
An analogous construction extends Geary’s C to the multivariate case [11] by replacing the scalar squared difference with the squared Euclidean norm between standardised feature vectors at neighbouring nodes:
Similarly to Moran’s I, is exactly the mean of the per-feature Geary’s C values, [11].
A second strategy avoids the aggregation problem via dimensionality reduction, computing classical univariate statistics on the resulting components. The simplest variant applies Principal Component Analysis (PCA), which lets a single component absorb variance across many correlated channels, but chooses the projection to maximise explained variance in the feature space alone, with no reference to the spatial coordinates or the neighbourhood structure. The component that best summarises feature variability therefore need not be the one that best expresses spatial coherence. MULTISPATI-PCA [15] addresses this by optimising the product of the variance and Moran's I. Its axes are thus spatially informed, but the objective still rewards variance as well as coherence, so a weakly varying yet highly coherent direction can be ranked below a high-variance, moderately coherent one.
However, these strategies remain fundamentally handcrafted and linear: the feature projection is either fixed as an unweighted average across all channels or fixed by an objective (variance) unrelated to spatial structure, rather than learned to maximise spatial coherence directly. They require a predefined spatial weight matrix, operate on a fixed feature transformation, and are non-differentiable with respect to any learned representation. Because they rely on linear summaries of high-dimensional data, they cannot capture non-linear interactions between features or automatically identify feature subsets that jointly define a spatial niche. This limits their applicability in domains such as spatial omics, where the relevant spatial structure is often carried by a non-linear combination of many correlated channels rather than any single one, or by a projection chosen for an unrelated criterion.
C. Graph Neural Networks
Graph Neural Networks (GNNs) partly address the need for modelling high-dimensional spatial dependence by aggregating information across spatial neighbourhoods through message passing, and have shown strong performance across a range of spatially structured prediction tasks [12]–[14]. However, GNNs encode spatial dependence only implicitly, through the aggregation and update rules, without ever computing an explicit SAC statistic. As a result, standard GNNs do not directly provide an explicit or interpretable measure of how strongly a feature or learned representation is clustered or dispersed in space, nor do they support statistically testing the importance of spatial structure for an observed target without an associated supervised objective.
D. Integration of Spatial Autocorrelation into Deep Learning
Unlike GNNs, a separate line of work explicitly incorporates spatial autocorrelation into deep learning pipelines, for example as an auxiliary prediction target for geographic GNNs [16] or, in Spatial Autocorrelation Token Analysis (SATA) [17], as a robustness mechanism for Vision Transformers. While these demonstrate that an explicit SAC statistic can be useful for deep learning, the underlying computation remains a fixed, predefined index evaluated on a predefined variable under a hand-crafted, non-adaptive spatial weight matrix, rather than a jointly learned feature projection and affinity structure. Consequently, these methods cannot adapt which feature combination is evaluated, nor how neighbourhood influence is defined, offering no mechanism for unsupervised discovery of task-relevant spatial modes.
III. METHODS
The core idea of SAIL is to overcome the limitations of existing approaches outlined in the previous section by making the feature representation and spatial weighting scheme learnable, differentiable components of a modular spatial autocorrelation operator over graphs, providing a common formulation for diverse spatial data modalities that can be represented as graphs, including images, spatial omics, point sets, and geospatial data.
Formally, let denote a dataset of spatial graphs. Each graph is represented as , with the node set
Here, denotes the number of nodes in graph , is the -dimensional feature vector associated with node , and denotes its coordinate in a physical or abstract spatial domain. The scalar feature value used in the classical formulation corresponds here to the th component of the feature vector for a particular graph .
The edge set specifies any available topological relationships between nodes. Self-connections are excluded so that spatial autocorrelation is evaluated only between distinct nodes. For point sets without an explicit topology, may be empty and neighbourhood relationships may instead be inferred directly from the spatial coordinates.
Spatial proximity between nodes and is quantified using a user-specified distance function , such that . For example, may be the Euclidean, graph-geodesic or a masked distance that assigns infinity to node pairs that cannot interact.
Below, we describe the various components of the SAIL framework, how it can be used for supervised learning, and how it can discover spatial autocorrelation modes in unsupervised settings and statistically significant spatial hotspots.
A. Learning Multivariate Spatial Autocorrelation with SAIL
SAIL generalises classical SAC from a fixed scalar variable and predefined spatial weighting scheme to a learnable graph operator with modular components for feature transformation, neighbourhood construction, and spatial autocorrelation measurement. Specifically, for a spatial graph G with node features X and spatial coordinates C, SAIL produces a transformed graph whose node attributes describe the local spatial autocorrelation of learned feature signals. The framework comprises four key components (Fig. 1):
-
A learnable feature mapping that transforms the node features into scalar fields on which SAC is evaluated.
-
An inter-node affinity matrix A that defines the effective neighbourhood of each node as a linear combination of spatial distance and a feature-based inter-node affinity function , with controlling their relative contribution. The feature-based term may be omitted, and may be fixed or learned.
-
A local SAC operator that computes a node-level SAC score for each projected scalar field by comparing each node with its affinity-weighted neighbourhood, thereby quantifying local spatial coherence or contrast across the graph.
-
An order-invariant reduction operator that aggregates node-level SAC scores into graph-level descriptors. Together, these components define the transformation
where retains the structure of , but its node features are replaced by, or augmented with, the learned local SAC descriptors . Thus, after the SAIL transformation, each node is represented by the vector , which contains its spatial autocorrelation scores across the learned scalar fields.
The decomposition above highlights the modular nature of SAIL. By varying the feature mapping, affinity construction, local SAC statistic, activation, and reduction, the same framework can instantiate different flavours or notions of spatial autocorrelation within a common computational structure. The learnable parameters are contained primarily within and , together with the weighting parameter when it is optimised, and are learned jointly from the dataset. In a learning problem involving multiple graphs, the full SAIL configuration is shared across all graphs, including the chosen forms of , , , and and any associated hyperparameters. SAC itself, however, is evaluated independently within each graph. Algorithm 1 makes this
Algorithm 1 SAIL Forward Pass
Input: Graph
Parameters:
Operators:
Return:
function SAIL_FORWARD( )
for do
for do
end for
end for
for do
end for
return
end function
computation explicit, showing the forward pass through feature projection and standardisation, affinity construction, local SAC evaluation, and graph-level reduction for an individual graph.
We next describe each component in detail.
- Input Feature Space Mapping: To evaluate SAC in high-dimensional data, SAIL first constructs candidate scalar fields from the node features. Let denote the node-feature matrix for a graph with nodes. A learnable mapping produces
where each column of Z defines a scalar field on which SAC can be evaluated. In its simplest form, is linear,
although non-linear, sparse, or orthogonalised mappings may also be used (Supplementary Section C). Non-linear mappings allow SAIL to capture more complex combinations of the original features, sparse mappings can encourage compact and interpretable feature combinations, and orthogonalised mappings, for example through optimisation on the Stiefel manifold, can promote diverse and non-redundant projected scalar fields. Unlike classical SAC operators, which are typically applied to predefined scalar variables, SAIL is therefore not restricted to the original feature space and can learn task-relevant scalar fields on which spatial autocorrelation is evaluated.
Because the scale of the learned projections is arbitrary, each projected scalar field is standardised using . This centres and scales the projected signals so that the resulting
SAC scores reflect spatial coherence rather than differences in magnitude or variance. The standardised scalar fields are collected in .
- Learnable Spatial Affinities: SAIL next defines how nodes influence one another through an inter-node affinity matrix. Classical SAC methods typically use a predefined spatial weighting scheme, such as adjacency or inverse distance. SAIL instead allows neighbourhood influence to depend on spatial proximity and, optionally, learned feature relationships.
For each pair of nodes in the graph, their spatial separation is given by , and an unnormalised affinity score is defined as
where controls the contribution of spatial distance and models feature-dependent dissimilarity. Larger dissimilarity thus decreases the affinity between two nodes.
The resulting scores are converted into non-negative neighbourhood weights through row-wise softmax normalisation:
By optimising and , SAIL can adapt the effective neighbourhood structure to the data and learning objective. Purely spatial affinities are obtained by omitting the feature-dependent term. Self-connections are excluded by default by setting , so that SAC is evaluated with respect to neighbouring nodes rather than the node itself, but they may be retained when required by the chosen SAC formulation.
- Local and Graph-Level SAIL Outputs: Given the standardised projected fields and affinity matrix , the local SAC operator computes a node-level spatial statistic for each projected scalar field. Here, , where denotes the th standardised scalar field across all nodes and is its value at node . For each field, compares the value at a node with the values of other nodes according to the affinities in , thereby quantifying the local spatial relationship around that node. Different choices of instantiate different notions of spatial structure within the same SAIL framework.
For example, a Moran-style operator measures local agreement between the value at node j and the affinity-weighted values of its neighbourhood:
where is the spatial lag of the th scalar field at node . Positive values indicate that the node and its neighbourhood have similar signed deviations from the field mean, whereas negative values indicate local spatial contrast.
In contrast, a Geary-style operator measures local dissimilarity directly through affinity-weighted differences between the node and its neighbours:
Here, smaller values indicate greater local similarity, while larger values indicate stronger local heterogeneity.
SAIL also supports Getis–Ord -type hotspot measures and Morisita–Horn-type neighbourhood-overlap statistics via alternative choices of . The precise form of the local operator, together with any associated preprocessing or affinity conventions, depends on the statistic being instantiated.
An optional elementwise transformation , such as ReLU or ELU, may then be applied,
yielding the node-level SAC descriptor matrix .
Graph-level descriptors are obtained by applying an order-invariant reduction operator to the local scores:
Thus, describes where spatial structure occurs within the graph, while summarises the overall degree of spatial coherence or heterogeneity for each learned scalar field.
B. Supervised Learning with SAIL
A key question in spatial learning is whether the spatial autocorrelation of node-level feature signals is predictive of a target of interest. Two spatial samples, such as graphs, may have similar overall feature distributions yet differ substantially in how those features are organised across neighbouring nodes. For example, two images may contain similar visual features but differ in how those features are distributed across adjacent regions, while two tissue samples may contain similar cell populations or molecular programmes but differ in whether they are spatially clustered, dispersed, or organised into coherent niches.
Because SAIL transforms node-level features into learnable SAC descriptors, it is naturally suited to supervised tasks in which the target depends on SAC. These descriptors can be used directly for classification, regression, survival modelling, or other predictive objectives, allowing the model to learn which patterns of spatial autocorrelation are most informative for the target.
Formally, given a dataset , where each is a spatial graph and is a graph-level target label, SAIL transforms node features into SAC descriptors, either at the node or graph level . These descriptors are passed to a prediction head , and the full parameter set is optimised end-to-end by minimising a task-specific loss:
Since the predictor uses only SAIL outputs, performance reflects how much the target depends on SAC. High accuracy indicates informative SAC; near-chance accuracy indicates little dependence. Pseudocode can be found in Supplementary Algorithm 2.
C. Unsupervised Learning of Spatial Autocorrelation Modes
Classical SAC statistics quantify the spatial coherence of a fixed scalar variable. In high-dimensional settings, however, spatial structure may only emerge through combinations of features. SAIL addresses this by learning projections that maximise or minimise spatial coherence across a graph dataset. We refer to these as SAIL Modes and SAIL Anti-Modes, respectively.
Formally, let denote a graph dataset, each with node features . A projection vector defines a scalar field on each graph. We quantify its expected spatial coherence as
where ensures that larger values indicate stronger spatial coherence, for example, for Moran-style operators and for Geary-style operators. SAIL Modes and Anti-Modes are then defined as
Thus, Modes identify feature combinations exhibiting maximal spatial clustering, whereas Anti-Modes capture maximal spatial contrast.
To discover multiple patterns, we jointly optimise projection directions collected in . The multi-mode objective promotes spatial coherence while encouraging diversity and sparsity:
Anti-Modes are learned by reversing the sign of the first term. The correlation penalty encourages distinct spatial patterns, while sparsity favours interpretable feature combinations. Optionally, the orthogonality constraint can further promote diversity. Pseudocode is provided in Supplementary Algorithm 3.
D. Statistically Significant Spatial Hotspot Discovery
While supervised learning with SAIL evaluates whether SAC carries a predictive signal, and unsupervised SAIL Modes identify directions of maximal SAC, both operate at a global level. They quantify or discover whether spatial structure exists, but do not localise where it occurs within the graph.
To address this, we adapt SAIL's local scores to a Local Indicators of Spatial Association (LISA) style test [18]. This categorisation requires a signed local statistic, since the High–High/Low–Low/High–Low/Low–High classification depends on the sign of the node value and the sign of its spatial lag. We therefore use the Moran-style local score, Eq. (7), as its formulation naturally decomposes into these four regions.
For a scalar field , we define the spatial lag at node j as the affinity-weighted neighbourhood average,
so that the Moran-style local score, , serves as the test statistic for node-level significance. Under the null hypothesis of spatial independence, we generate a reference distribution by randomly permuting across nodes, recomputing the lag and the resulting statistic for each permutation, holding the affinity matrix A fixed. Empirical p-values for each node are obtained by comparing the observed statistic to this permutation null, with either false-discovery-rate (Benjamini–Hochberg) or max-T [19] correction applied across nodes.
Nodes whose local statistic is deemed significant are then categorised according to the signs of and its spatial lag considered separately: High–High (a high-value node surrounded by high-value neighbours), Low–Low (coldspots), and the discordant categories High–Low and Low–High (spatial outliers). Non-significant nodes remain unclassified. This procedure transforms SAIL's learned local scores into statistically validated spatial structure maps, enabling rigorous localisation of coherent and heterogeneous regions.
IV. THEORETICAL ANALYSIS
This section establishes SAIL as a principled generalisation of classical spatial autocorrelation (SAC) to learnable graph representations. Theorem IV.1 shows that SAIL exactly recovers classical SAC statistics under appropriate configurations, preserving their statistical interpretation. Theorem IV.2 establishes that SAIL is well suited to SAC-driven prediction: it can approximate Bayes-optimal predictors under stated assumptions, explicitly represents quadratic spatial interactions beyond the capacity of linear T-hop graph filters, and has no greater Rademacher complexity than broader hypothesis classes containing SAIL. Together, these results show that SAIL combines the interpretability of classical spatial statistics with the representational capacity and inductive bias needed for learning from spatial structure.
Theorem IV.1 (Classical spatial statistics as exact special cases of SAIL). Let be a fixed row-stochastic spatial weight matrix, i.e., , and let . Then, under appropriate fixed choices of the SAIL mapping, local-scoring, standardisation, and reduction operators, SAIL (Eq. (6)) exactly recovers:
(i) Moran’s I for a non-constant scalar mapped field, using population standardisation, , and mean reduction;
(ii) Geary’s C for a non-constant scalar mapped field, using sample standardisation, , and mean reduction;
(iii) the standardised Getis–Ord statistic for a non-constant scalar mapped field, using population standardisation and allowing self-weights as in the starred statistic, whenever its null variance is non-zero; and
(iv) the Morisita–Horn similarity between a non-negative, unstandardised multichannel mapped representation at a node and its affinity-weighted neighbourhood composition, provided that is allowed to act jointly on the corresponding mapped channels.
Specifically, the resulting SAIL outputs are respectively , , , and , where is the mapped representation at node and is its affinity-weighted neighbourhood composition.
Theorem IV.2 (Inductive Bias of SAIL for SAC-Driven Learning). Let P be a distribution over spatial graphs , with an optional associated target variable , and population risk
and Bayes-optimal predictor with risk .
Let denote the class of problems whose Bayes-optimal predictor depends on one or more spatial-autocorrelation (SAC) descriptors of node signals. For clarity, consider a single global descriptor,
where is a spatial-affinity operator, is a SAC functional formed from local spatial interactions followed by an order-invariant reduction, and maps the SAC descriptor to the prediction target.
Let
denote the supervised SAIL hypothesis class, where is obtained from the feature mapping , learned affinity A, local SAC operator , optional activation , and reduction of Eq. (6).
Assume that the admissible SAIL component families are sufficiently expressive to approximate , , and , and that the chosen local and reduction operators implement . Assume also that and that is L-Lipschitz in its prediction argument. Define
and let denote the Rademacher complexity of a hypothesis class with respect to m i.i.d. samples from P.
Then:
(i) Sufficiency. For every and every , there exists such that
and therefore
If is an -approximate empirical-risk minimiser from m i.i.d. examples, then with probability at least ,
(ii) Necessity of higher-order interaction for quadratic SAC. Consider the quadratic SAC subclass
with A fixed with respect to z and
Then
Let
denote the class of finite T-hop linear graph filters followed by linear pooling and readout. This includes, for example, Simple Graph Convolution (SGC), linearised Graph Convolution Networks (GCNs), polynomial graph filters, and linear message-passing models with linear pooling/readout. Every is affine in z and hence satisfies . Thus cannot in general represent the quadratic SAC subclass, whereas SAIL explicitly contains the interaction
(iii) Comparison with broader classes. More general non-linear graph neural networks (GNNs) may also represent the higher-order interactions required by SAC, but only as one possibility within a broader function class. Let denote such a broader SAC-capable hypothesis class satisfying
Then
Hence, once the SAC structure is already representable by SAIL, additional generic expressivity cannot, by itself, yield a smaller Rademacher-complexity term in the corresponding standard generalisation bound. If the two classes attain the same approximation and optimisation errors on a SAC-driven problem, the resulting excess-risk bound for SAIL is no larger.
Thus SAIL provides a matched inductive bias for : it contains the interactions required by SAC-driven prediction, simpler linear-interaction classes may fail to represent them, while broader enclosing classes provide no smaller complexity-dependent learning guarantee solely through their additional expressivity.
V. EXPERIMENTAL RESULTS AND APPLICATIONS
We evaluate SAIL through a series of experiments designed to assess its statistical correctness, predictive capabilities, scalability, and applicability across diverse spatial data. We first validate its ability to recover classical spatial autocorrelation statistics and examine its advantages over conventional graph neural networks on synthetic tasks. We then investigate its ability to discover meaningful spatial patterns in real-world datasets spanning histology, spatial transcriptomics, spatial proteomics, and geospatial analysis, including large-scale
Random Graph
Moran I: -0.01 Geary C: 1.12
Homogeneous Graph
Moran I: 0.99 Geary C: 0.13

Hotspot Clusters
High-High Low-Low Non-Sig
Fig. 2. SAIL recovers classical SAC on synthetic graphs with known structure. Left: a graph with unstructured, independently sampled node values (colour bar shows feature value), for which SAIL correctly reports near-zero global SAC (Moran's , Geary's ) and classifies most nodes as non-significant under hotspot analysis. Right: a spatially homogeneous graph with a smooth imposed gradient, for which SAIL correctly detects strong positive autocorrelation (Moran's , Geary's ) and hotspot analysis correctly localises High–High and Low–Low clusters matching the imposed gradient.

Fig. 3. Results demonstrating distinction of SAIL from traditional message-passing architectures. In a regression benchmark where models predict Moran's I of heterogeneous test graphs, SAIL achieves significantly higher Pearson correlation between predicted and true values than classical message-passing networks with comparable or larger parameter counts (p < 0.0001, box plots over 1000 train–validation–test runs).
graphs with millions of nodes. Together, these experiments demonstrate how learnable spatial autocorrelation supports both predictive modelling and unsupervised discovery of spatial structure. For readers less familiar with the biomedical setting, Supplementary Section A summarises the relevant terminology, including spatial omics modalities, whole-slide images, the Dice overlap score and the survival-analysis metrics used throughout.
A. Recovering classical spatial autocorrelation with SAIL
We begin by empirically validating that SAIL recovers classical SAC statistics on graphs with known spatial structure, confirming Theorem IV.1. We construct toy graphs with controlled spatial properties (Fig. 2). First, we generate a random graph with unstructured scalar node values. As node values are sampled independently of spatial location, the expected global SAC is near zero. Second, we construct a spatially homogeneous graph with a smooth spatial gradient, inducing strong positive SAC. For both graphs, we compute Moran-style and Geary-style SAIL scores and visualise these local statistics alongside LISA-style maps.
For the random graph (Fig. 2), SAIL detects negligible global SAC (Moran's , Geary's ). The associated LISA map classifies most nodes as non-significant (NS), consistent with expectations. In contrast, for the spatially homogeneous graph (Fig. 2), SAIL reports Moran's and Geary's , reflecting strong global coherence. LISA decomposition reveals clear High–High clusters in high-value regions and Low–Low clusters in low-value regions, accurately recovering the imposed gradient structure. These results empirically confirm that SAIL reproduces classical SAC indices, confirming Theorem IV.1
B. Learning spatial autocorrelation beyond message passing
We next evaluate whether SAIL’s spatial coherence operator provides an advantage in prediction tasks where the label is explicitly defined by a global SAC functional. This experiment tests the inductive bias characterised in Theorem IV.2: when labels depend on the SAC of a latent signal, SAIL contains the required quadratic interactions by construction (part (ii)), whereas message-passing architectures must learn them implicitly within a broader hypothesis class (part (iii)).
To this end, we generate graphs from two-dimensional point clouds with spatially correlated features and define the regression target as Moran's I of a latent feature projection; full details are provided in Supplementary Section F.
We train SAIL to predict this target and compare it against a diverse set of models, including Graph Convolution (GCN) and Graph Attention (GAT) Networks operating on complete graphs. Edges are either distance-weighted or unweighted. All models receive identical node feature channels, and when applicable, the 2D coordinates are provided as additional positional features. Models are trained under matched optimisation settings with early stopping, and experiments are repeated across multiple random seeds to assess statistical reliability.
In Fig. 3, SAIL ( ) achieves the highest Pearson correlation across runs. Among message-passing comparisons, the strongest performance is obtained by GCN operating on a complete graph ( ), while augmenting the node features with spatial coordinates yields similar performance ( ). A paired Wilcoxon signed-rank test confirms SAIL's improvement is statistically significant relative to all models (FDR-corrected ).
These results provide empirical support for Theorem IV.2(i): when labels depend on the SAC of a latent signal, SAIL can approximate the Bayes-optimal predictor. The performance gap relative to GCN and GAT is consistent with Theorem IV.2(iii): although non-linear message-passing networks may in principle represent the quadratic interactions underlying SAC, they must discover them within a broader hypothesis class, whereas SAIL encodes them explicitly and incurs no larger complexity term. Together, these experiments demonstrate that SAIL is not merely a flexible neural module, but a principled generalisation of classical spatial statistics with an inductive bias that is well matched to SAC-driven problems.
C. Unsupervised discovery of Spatially Coherent Structures in Spatial Omics
Having verified statistical correctness in synthetic settings, we next test if SAIL can discover biologically meaningful spatial niches in spatial omics data. Here, biologically relevant compartments arise from spatially coherent patterns of gene or protein expression rather than from individual feature values. Classical analyses typically operate on individual markers or clustering of feature vectors and therefore do not directly test if a feature combination forms a spatially coherent field. Likewise, standard GNNs are designed for supervised representation learning through message passing and do not provide an explicit unsupervised objective for discovering feature directions that maximise SAC. SAIL addresses this by explicitly learning feature projections that maximise SAC. If biologically meaningful niches correspond to coherent SAC of molecular programs, then unsupervised SAIL Modes should align with known compartments. We thus evaluate if SAIL Modes correspond to expert-annotated biological structures.
- Datasets and Setup: We analyse the preprocessed Iterative Indirect Immunofluorescence Imaging (4i) spatial proteomics dataset [20], which measures the expression levels of 43 proteins at spatial measurement locations for one sample. Each location is annotated with the subcellular compartment it belongs to (such as the nucleolus).
The task is to test whether protein combinations that SAIL identifies as spatially autocorrelated, without supervision to prevent overfitting with one sample, correspond to these annotated compartments. SAIL is applied in the unsupervised mode-learning configuration (Section III-C), learning SAIL Modes by minimising a Geary-style objective. For each mode, LISA-style hotspot analysis (Section III-D) identifies locations belonging to significant High-High or Low-Low clusters, which form High-High or Low-Low masks respectively. Each mask is compared with each annotated compartment using the Dice score, which ranges from 0 (no overlap) to 1 (perfect agreement).
We compare SAIL against four alternative ways of obtaining spatially autocorrelated fields, each followed by the same LISA-style hotspot analysis and Dice evaluation: (i) Univariate: local Moran's on individual proteins, taking the best of the 20 proteins with the highest global Moran's ; (ii) Mean: the multivariate Moran's obtained by averaging univariate statistics across all proteins [10]; (iii) MULTISPATI-PCA [15]: local Moran's on axes that maximise the product of variance and Moran's ; and (iv) Hotspot [21]: local Moran's on the scores of spatially autocorrelated protein modules. Additional implementation details are given in Supplementary Section G.
- Results: In the 4i dataset (Table I), SAIL Modes capture distinct compartments and outperform univariate , mean , MULTISPATI-PCA and Hotspot comparisons across compartments (one-sided paired Wilcoxon signed-rank tests; Supplementary Table VI). In Fig. 4 (a), SAIL Mode 8, whose Low-Low hotspots achieve a Dice score of 0.84 with the Nucleolus, contrasts negative weights on FBL, PCNA with positive weights on GSK3A/B and CAV1. Because this is a Low-Low region, the mask comprises locations with low projected values, i.e. high expression of the negatively weighted proteins, that are surrounded by similarly scoring locations. These include fibrillarin (FBL), a canonical nucleolar marker, together with the nuclear proteins PCNA and CCNE1, whereas the positively weighted proteins mark cytoplasmic, endosomal (SARA), caveolar (CAV1) and mitochondrial (HSP60) compartments [20]. SAIL Mode 1, whose Low-Low hotspots achieve a Dice score of 0.59 with Cell periphery 2, places positive weights on p-MEK and TSG101 and a negative weight on ISG15, corresponding to the cell periphery (Fig. 4 (b)) [20].
TABLE I SAIL SEGMENTATION PERFORMANCE ON THE 4I DATASET. WE COMPARE SAIL AGAINST CLASSICAL MORAN'S I COMPUTED ON THE BEST-PERFORMING INDIVIDUAL PROTEIN AMONG THE 20 PROTEINS WITH THE HIGHEST GLOBAL MORAN'S I (UNIVARIATE), THE MULTIVARIATE EXTENSION OF MORAN'S I OBTAINED BY AVERAGING THE UNIVARIATE MORAN'S I STATISTIC ACROSS ALL PROTEINS (MEAN), MULTISPATI-PCA [15] AND HOTSPOT [21]. FOR EACH COMPARTMENT, WE REPORT THE DICE SCORE BETWEEN LISA-STYLE HOTSPOT MASK AND REGION ANNOTATION.
| Region/DICE Score | SAIL | Univariate | Mean | MULTISPATI | Hotspot |
|---|---|---|---|---|---|
| Nucleolus | 0.84 | 0.75 | 0.50 | 0.79 | 0.71 |
| Endosomes/Golgi 1 | 0.58 | 0.38 | 0.34 | 0.38 | 0.56 |
| Cell periphery 1 | 0.53 | 0.51 | 0.51 | 0.50 | 0.50 |
| Cell periphery 2 | 0.59 | 0.49 | 0.50 | 0.49 | 0.50 |
TABLE II PREDICTION OF RESPONSE TO PD-1/PD-L1 BLOCKADE IN THE cSCC COHORT. WE REPORT DISCRIMINATIVE PERFORMANCE AS THE AREA UNDER THE ROC CURVE (AUC) WITH 95% CONFIDENCE INTERVAL, TOGETHER WITH THE TWO-SIDED MANN–WHITNEY U P-VALUE FOR SEPARATING RESPONDERS FROM NON-RESPONDERS. SAIL IS COMPARED AGAINST THE FAVOURABLE NICHES CLASSIFIER AND PRE-TREATMENT PD-L1 STATUS [22].
| Model | AUC(95% CI) | Mann-Whitney U(p-value) |
|---|---|---|
| SAIL (Mode 18) | 0.86 (0.64–1.00) | 0.005 |
| Favourable Niches | 0.78 (0.55–0.95) | 0.021 |
| PD-L1+ (untreated slide) | 0.78 (0.49–1.00) | 0.072 |
| PD-L1+ (all slides) | 0.69 (0.42–0.92) | 0.19 |
Overall, these results show that unsupervised SAIL Modes recover spatially coherent molecular programs that correspond closely to known subcellular compartments. This demonstrates that learning SAC directly from high-dimensional molecular measurements can reveal biologically meaningful spatial coherence without supervision.
D. Discovering spatial coherence biomarkers of treatment response
Response to PD-1/PD-L1 immune checkpoint blockade in cutaneous squamous cell carcinoma (cSCC) is highly heterogeneous, and reliable pre-treatment predictors of which patients will respond remain limited. PD-L1 expression, the standard clinical biomarker, is only weakly associated with
SAIL Mode 1 (Geary C = 0.10)

SAIL Mode 8 (Geary C = 0.20)
(a)
SAIL Mode 1 (LISA)
SAIL Mode 8 (LISA)

High-High
Low-Low
Not Sig.
p-MEK (Expression)
GSK3A/B (Expression)
Reference Labels
Cell periphery 1
Cell periphery 2
Endosomes/Golgi 1
Nucleolus
(b)
Fig. 4. Unsupervised SAIL Modes recover known subcellular compartments in the 4i spatial proteomics dataset. (a) Two data-driven SAIL Modes are visualised over the field of view. SAIL Mode 1 (showing the highest Dice score with Cell periphery 2) is defined by positive weights on p-MEK, TSG101 and Climp63 and a negative weight on ISG15. SAIL Mode 8 (showing the highest Dice score with the Nucleolus) is defined by positive weights on GSK3A/B, CAV1 and SARA and negative weights on PCNA, FBL and LC3B. (b) Visualisations of LISA High–High and Low–Low scoring locations for both SAIL Modes, which were used for defining spatial regions. We also show the expression of the most important proteins for each SAIL Mode and the reference annotation mask.
response. Recent work has instead shown that the spatial organisation of the tumour microenvironment, such as how tumour, stromal and immune cells are arranged relative to one another, predicts pathologic response more strongly than PD-L1 status [22]. This suggests that response may depend not only on which cell states are present, but on how coherently or heterogeneously they are spatially arranged. This is precisely the property that SAC quantifies. We therefore test whether SAIL can be used to determine if a SAC mode of gene expression is predictive of response to PD-1/PD-L1 blockade.
- Dataset and Setup: We analyse the publicly available dataset of Lee et al. [22], comprising single-cell spatial transcriptomic profiles of cSCC tumour biopsies from patients treated with neoadjuvant PD-1/PD-L1 blockade (cemiplimab or atezolizumab), profiled using the NanoString CosMx spatial molecular imaging platform with a 1000-plex gene panel. Tissue microarrays were generated, with each core containing on average 4,500 cells, resulting in a total of 140,633 cells from 11 responder and 10 non-responder patients. Following the original study, patients are classified as responders (pathologic complete response or major pathologic response, i.e. < 10%

Gene Weight
NonResponder Responder
(a)
(b)
Fmap Score

High
Fmap
Low
Fmap
Local Geary C

High
Geary C
Low
Geary C
Non Responder
Geary C = 0.610
(c)
Responder
Geary C = 0.745
Fig. 5. Association of an unsupervised SAIL Mode with response to PD-1/PD-L1 blockade. (a) Per-patient global Geary-style dissimilarity SAIL score for SAIL Mode 18, compared between responders and non-responders. Each dot represents a patient; responders show a higher score (p = 0.005), suggesting greater local cell heterogeneity. (b) Gene weights defining SAIL Mode 18. (c) Visualisation of responder and non-responder patients. We show the local and Geary-style dissimilarity score per cell.
residual tumour cells) or non-responders (all other patients).
We construct one spatial graph per patient, in which nodes are segmented cells, coordinates are cell centroids, and node features are the 1000-gene expression profiles. Each of a patient's tissue cores forms a separate k-nearest-neighbour component, with no edges between cores.
SAIL is applied in the unsupervised mode-learning configuration (Section III-C), minimising a Geary-style objective over 28 pre-treatment biopsies from N = 21 patients. Response labels are not used during training. We use unsupervised rather than supervised learning as with only 21 patients and 1000 genes, a supervised model would be highly prone to overfitting. For each of the 20 learned modes, we compute a per-patient global SAIL score and compare it between responders and non-responders using a two-sided Mann–Whitney U test, with discriminative performance summarised by the area under the receiver operating characteristic curve (AUC).
We compare SAIL against the two predictors reported in the original study [22]. The first is the niche-based classifier of
Lee et al. (Favourable Niches), which predicts response from the composition of six spatial niches identified by clustering cells according to their neighbourhood cell-type composition. These niches therefore describe which cell types co-occur, but are not optimised with respect to SAC. The second is pretreatment PD-L1 positivity, the standard clinical biomarker, evaluated both on the untreated slide alone and on all slides.
- Results: As shown in Table II, the most discriminative SAIL Mode (Mode 18) separates responders from non-responders with AUC=0.86 (95% CI 0.64–1.00; p=0.005). This exceeds both the Favourable Niches classifier (AUC=0.78, p=0.021) and pre-treatment PD-L1 status (untreated slide: AUC=0.78, p=0.072; all slides: AUC=0.69, p=0.19). Responders exhibit higher Mode 18 scores than non-responders (Fig. 5(a)). Because the global score is a Geary-style dissimilarity, a higher score corresponds to greater local contrast between neighbouring cells. Responders' tumours are therefore more spatially heterogeneous along this mode.
Mode 18 (Fig. 5(b)) contrasts genes associated with squamous tumour and cancer-associated-fibroblast/extracellular-matrix states (KRT17, FN1, THBS1, MT2A) [23] with genes associated with interferon signalling and MHC class I antigen presentation (B2M, IFITM1, IFITM3) [24] and with basal epidermal or basement-membrane programs (KRT5, COL4A1, CXCL14) [25]. The higher scores in responders thus indicate sharper spatial juxtaposition of interferon-associated and tumour-stromal programs (Fig. 5(c)).
These findings align with, and extend, existing work. They support the conclusion of Lee et al. [22] that spatial organisation is more informative of response than PD-L1 status, and are compatible with the established association between an inflamed, spatially intermixed immune microenvironment and response to immunotherapy [26]. Unlike the niche-based approach, however, SAIL does not require a predefined clustering pipeline. A single, interpretable gene projection discovered without labels, whose SAC is directly quantified, provides stronger discrimination than both existing predictors.
E. Unsupervised SAC modes for prediction of patient survival
A further question to study is whether SAC carries prognostic information about patient outcome. In cancer tissue, disease progression is often governed not only by the presence of specific cellular or molecular programs but also by how these programs are spatially organised in the tissue. For example, spatially coherent immune infiltration or tumour–stroma interactions are known to influence patient outcome [27]. SAIL provides a direct way to analyse such structure by learning feature projections that extremise SAC. Unlike the prevailing use of supervised approaches for survival prediction, SAIL Modes are learned without access to survival outcomes [28], [29]. If SAC contains a prognostic signal, then SAIL Modes should correlate with patient survival despite being unsupervised.
-
Datasets and Graph Construction: We evaluate SAIL on two spatial biomedical modalities: cellular spatial proteomics and histological whole-slide images (WSIs). Each sample is represented as a spatial graph where nodes correspond to spatial measurement units, and edges capture neighbourhood structure. We analyse the ORION-CRC cohort [30], consisting of N = 36 patient slides with approximately 1.8 million cells per slide. Each slide is represented as a cellular spatial graph where nodes are segmented cells with 2D spatial coordinates. Node features consist of 17 multiplex immunofluorescence (mIF) marker intensities. Graph edges are constructed using a k-nearest-neighbour graph in coordinate space ( ). Across the dataset this yields nodes. We further analyse WSIs from TCGA breast cancer (BRCA; N = 498 patients) and colorectal cancer (CRC; N = 558 patients) cohorts [31]. Each WSI is converted into a spatial graph by extracting image patches at 0.5 microns per pixel and representing each patch as a node with spatial coordinates given by its centroid. Node features correspond to deep patch embeddings of dimensionality (ShuffleNet and UNI features for BRCA and CRC, respectively) [12], [32]. Each WSI contains on average nodes, yielding nodes across both datasets. For each cohort, SAIL is applied in an unsupervised configuration by minimising a Geary-style objective, without access to survival outcomes or clinical labels. For each graph, we compute a global SAIL score that summarises each mode's strength across the tissue. Patients are then stratified into high- and low-SAC groups using a median split, and differences are assessed via Kaplan–Meier analysis, concordance index (C-Index), hazard ratio (HR), and the difference in restricted mean survival time ( ). Additional implementation details are given in Supplementary Section I
-
Results: Across cohorts, SAC captured by SAIL Modes is associated with outcome (Fig. 6; all modes in Supplementary Table IX). In the ORION cohort (Table III; all modes in Supplementary Table VIII), the best-performing SAIL Mode (Mode 17) stratifies patients by overall survival with the highest C-Index (C-Index = 0.74, log-rank p = 0.005, HR (95% CI) 5.23 (1.45–18.89), days), exceeding univariate Geary's C on the best individual protein (C-Index = 0.69, p = 0.13), the mean-aggregation baseline (C-Index = 0.68, p = 0.04), MULTISPATI-PCA (C-Index = 0.70, p = 0.03) and Hotspot (C-Index = 0.60, p = 0.007) [21]. The gap to the univariate and mean baselines suggests that the prognostic signal is not carried by the SAC of any single marker, nor by an unweighted combination of all markers, but by a learned combination of markers whose joint SAC SAIL can isolate. Interpreting the learned projection (Fig. 6(a)) reveals that this mode contrasts SMA and CD68 (positive weights) with CD163 (negative weight). It thus separates signal from SMA stroma (myofibroblasts and cancer-associated fibroblasts) and CD68 macrophages from signal associated with CD163-expressing, M2-like macrophages. Because the SAIL score is a Geary-style dissimilarity, high-risk patients are those in whom these stromal and macrophage-associated signals are spatially intermixed rather than organised into coherent regions. This is consistent with reports that cancer-associated fibroblasts promote the recruitment and M2 polarisation of tumour-associated macrophages in colorectal cancer [33], and that infiltration by CD163 tumour-associated macrophages is an independent adverse prognostic factor [34].
A similar prognostic association holds in histological imag-
TABLE III PROGNOSTIC PERFORMANCE OF SAIL ON THE ORION COHORT. WE COMPARE SAIL AGAINST CLASSICAL GEARY'S COMPUTED ON INDIVIDUAL PROTEIN MARKERS (UNIVARIATE) AND THE MULTIVARIATE EXTENSION OF GEARY'S OBTAINED BY AVERAGING THE UNIVARIATE GEARY'S (MEAN), MULTISPATI-PCA [15], AND HOTSPOT [21]. PATIENTS ARE STRATIFIED INTO GROUPS VIA A MEDIAN SPLIT ON EACH SCORE; C-INDEX, HAZARD RATIO (HR) WITH 95% CI, RESTRICTED MEAN SURVIVAL TIME DIFFERENCE (RMST), AND LOG-RANK -VALUE ARE REPORTED.
| Metric | SAIL | Univariate | Mean | MULTISPATI | Hotspot |
|---|---|---|---|---|---|
| C-Index | 0.74 | 0.69 | 0.68 | 0.70 | 0.60 |
| ΔRMST (days) | 782 | 385 | 362 | 617 | 777 |
| HR (95% CI) | 5.23 (1.45–18.89) | 0.44 (0.15–1.31) | 3.15 (0.98–10.08) | 3.30 (1.03–10.56) | 4.89 (1.36–17.59) |
| Log-rank p-value | 0.005 | 0.13 | 0.04 | 0.03 | 0.007 |
ORION-CRC

TCGA-BRCA
TCGA-CRC
(a)
(b)
(c)
Fig. 6. Unsupervised SAIL Modes link spatial coherence to outcome. (a) A SAIL Mode discovered in ORION-CRC (mIF). Bar chart shows weights. The corresponding projected scalar field is overlaid on a tissue section to visualise its spatial pattern, and the associated global SAIL scores stratify patients into distinct survival groups. (b) SAIL learns a scalar field on TCGA-BRCA WSI deep-feature patch graphs (Mode 1); slides are visualised by alongside hotspot clusters. The corresponding global SAIL score (median split) defines risk groups with significant Kaplan–Meier separation in disease-specific survival. (c) Similarly to (b), we analyse the TCGA-CRC cohort.
ing. In TCGA-BRCA, the best-performing mode (Mode 1) separates patients by disease-specific survival (C-Index = 0.64, log-rank p = 0.005, HR (95% CI) 2.39(1.28–4.46), RMST = 386 days), with high SAIL scores associated with worse prognosis. Since the SAIL score is a Geary-style dissimilarity, high scores correspond to patients with spatially heterogeneous tissue. In TCGA-CRC, Mode 17 gives the strongest separation in overall survival (C-Index = 0.59, log-rank , HR (95% CI) 2.37 (1.47–3.84), RMST = 791 days).
Together, these results indicate that patient outcome is linked not only to the presence of morphological or molecular patterns captured by imaging or omics measurements, but also to how coherently these patterns are spatially organised across the tissue [27]. In ORION, this signal is considerably weaker when examining individual features or their aggregate.
F. Supervised classification of mesothelioma subtypes with SAIL
We have shown that unsupervised SAIL Modes recover biologically meaningful signals. Beyond unsupervised discovery, SAIL also lets us ask a supervised question: for a given label, how much of the discriminative information lies in the SAC of features rather than in the features themselves?
A natural setting for this question is histological subtyping, where tissue classes are associated with cellular spatial coherence. One example is malignant mesothelioma which is classified into epithelioid (E) and non-epithelioid (NE) subtypes. These subtypes are clinically important as epithelioid tumours carry a substantially better prognosis and influence eligibility for surgery and immunotherapy benefit [35]. Yet subtyping from small biopsies is difficult and shows only moderate inter-observer agreement [36].
There are strong morphological reasons to expect SAC to be informative for this task. Epithelioid mesothelioma typically grows as cohesive sheets of morphologically similar cells, so neighbouring cells tend to resemble one another, whereas non-epithelioid tumours show less organised growth, with greater variation between neighbouring cells. The subtypes may therefore differ not only in which cell states are present, but in how coherently they are spatially organised. We hypothesise that this second-order property, which SAIL quantifies explicitly, carries a substantial part of the subtype signal.
- Dataset and Setup: To test this hypothesis, we use the publicly available St. George's Hospital (SGH) mesothelioma cohort [37]. It comprises 234 tissue microarray (TMA) samples from 90 patients (148 epithelioid, 86 non-epithelioid). Each sample is represented as a cell graph whose nodes are segmented cells, with node features comprising 23 morphological, 43 haematoxylin and eosin (H&E) intensity, 39 texture and 512 ResNet-derived descriptors. We evaluate two feature sets: all features (617 descriptors) and interpretable features only, which excludes the ResNet descriptors and keeps the 105 hand-crafted morphological, intensity and texture features.
SAIL is trained in the supervised configuration. It learns feature projections and affinities, and the resulting global SAC descriptors are passed to prediction head trained end-to-end against subtype labels. Because only sees SAC descriptors, predictive performance measures how much subtype information is carried by SAC. Implementation details are given in Supplementary Section J.
To quantify this, we compare SAIL against predictors that do not model SAC explicitly but operate on the same cell graphs and, in each setting, the same features. These are MesoGraph [37], a graph neural network, and two multiple-instance learning baselines (PINS and Max-MIL). If SAC is a major driver of subtype, an SAC-only predictor should match or exceed these models.
We use leave-one-slide-out cross-validation, in which all samples from one slide are held out as the test set in each fold, and split the remaining samples 75%–25% into training and validation sets. AUC and average precision (AP) are computed with non-epithelioid samples as the positive class.
- Results: Table IV shows that SAIL achieves the strongest discriminative performance with both feature sets. With all features, SAIL (AUC= , AP= ) exceeds MesoGraph (AUC= ), PINS (AUC= ) and Max-MIL (AUC= ), and a paired bootstrap test on the difference in AUC (10,000 resamples) confirms that these improvements are significant (MesoGraph and PINS: p = 0.011; Max-MIL: p = 0.0002). With interpretable features only, SAIL (AUC= , AP= ) again ranks first, ahead of MesoGraph (AUC= ), PINS (AUC= ) and Max-MIL (AUC= ). In this setting the improvement over Max-MIL is significant (p = 0.0002), whereas the differences from MesoGraph and PINS are not.
Fig. 7(a) shows the two SAIL Modes with the largest weights in the prediction head for the model trained on interpretable features: Mode 11 (weight +0.57) and Mode 12 (weight +0.46). Mode 11 loads positively on texture entropy and eosin heterogeneity and negatively on nuclear and cellular solidity (convexity). Mode 12 contrasts solid cells with small nuclei and homogeneous haematoxylin texture against cells with larger nuclei, rounder neighbouring nuclei and more variable eosin texture. Because the local operator is Geary-style, a high score indicates that neighbouring cells take markedly different values along the mode. Since both weights are positive, greater local dissimilarity along either mode is evidence for the non-epithelioid subtype. Consistent with
TABLE IV PERFORMANCE OF SUPERVISED SAIL FOR MESOTHELIOMA SUBTYPE PREDICTION [37], USING ALL 617 CELL FEATURES (TOP) OR ONLY THE 105 INTERPRETABLE FEATURES (BOTTOM). WE REPORT AUC AND AVERAGE PRECISION (AP) WITH THEIR STANDARD DEVIATION () ACROSS CROSS-VALIDATION FOLDS. COMPARISONS INCLUDE GRAPH-BASED STATE OF THE ART (MESOGRAPH) AND STANDARD MULTIPLE-INSTANCE LEARNING PIPELINES (PINS, MAX-MIL).
| Model | AUC | AP |
|---|---|---|
| All features (d = 617) | ||
| SAIL | ||
| MesoGraph | ||
| PINS | ||
| Max-MIL | ||
| Interpretable features only (d = 105) | ||
| SAIL | ||
| MesoGraph | ||
| PINS | ||
| Max-MIL | ||
this, Fig. 7(b) shows that the non-epithelioid sample contains many scattered cells with high local dissimilarity, where cells differing in shape and texture are intermixed. Conversely, the epithelioid sample is largely uniform, matching the cohesive sheets of similar cells characteristic of epithelioid growth.
These results support our hypothesis. A predictor restricted to SAC descriptors matches or outperforms models with direct access to the same cell-level features, with or without deep image features. This indicates that a substantial part of the signal separating epithelioid from non-epithelioid mesothelioma is second-order: it depends on how similar neighbouring cells are, not merely on which cell states are present.
G. Additional Results
For brevity, proofs and further experiments are reported in the Supplementary Material:
-
Proofs. Full proofs of Theorems IV.1 and IV.2 are given in Supplementary Section E.
-
Computational complexity. In Supplementary Section K, we analyse the time and memory cost of SAIL. With a sparse graph, a training step costs time and memory, which is linear in the number of nodes . The Stiefel constraint adds term.
-
Synthetic signals and 3D point clouds. In Supplementary Section L, we apply SAIL to structured synthetic signals (smooth noise fields, checkerboards, step boundaries and concentric rings) and to a 3D point cloud. In each case, SAIL recovers the expected pattern of positive or negative spatial autocorrelation.
-
Ablation study. In Supplementary Section M, we ablate the components of SAIL (, , , , and ) and of its loss (decorrelation and sparsity) on four datasets. SAIL is robust to most choices. Strong decorrelation degrades performance, Geary's and Moran's consistently outperform Getis–Ord , and a learnable spatial temperature helps when many graphs are analysed jointly.
SAIL Head 11 (Weight=0.57)
H texture diff. entropy
H+E texture correlation
Cell solidity
Nucleus solidity

SAIL Head 12 (Weight=+0.46)
Cell solidity
H texture homogeneity
E texture diff. variance
Nucleus min diameter
Positive Weight
Negative Weight
(a)
Local
F_map (Head 11)
F_map (Head 12)
Epithelioid

Non-Epithelioid
(b)
Fig. 7. Supervised SAIL discriminates mesothelioma subtype from the spatial coherence of interpretable cell features (model trained on the 105 interpretable features only). (a) loadings of the two SAIL Modes with the largest weights in the prediction head (Mode 11, weight +0.57; Mode 12, weight +0.46; both towards non-epithelioid), shown for the 12 features with the largest absolute loading. (b) Local predicted value and local Geary-style SAIL scores for these modes, shown for a representative epithelioid and non-epithelioid sample.
• BRAF-mutant CRC prognosis. In Supplementary Section I, we analyse an additional colorectal cancer cohort with cell-type labels [38]. An unsupervised SAIL Mode contrasting stromal cells (myocytes, fibroblasts and endothelial cells) with immune cells (lymphocytes and neutrophils) stratifies patients by overall survival (log-rank p = 0.002, HR = 1.83). It outperforms all univariate cell-type baselines.
• Macroeconomic geospatial data. In Supplementary Section N, we apply SAIL to the Global Macro Database [39]. It discovers modes of cross-country spatial coherence among economic indicators and tracks how they evolve from 2000 to 2023.
• COVID-19. In Supplementary Section O, we use SAIL to track the spatial coherence of weekly COVID-19 case rates across countries. This reveals recurring periods of regional synchronisation, with hotspots concentrated in Western and Central Europe.
• Mixing gases. In Supplementary Section P, we use SAIL to follow the mixing of two simulated gases by diffusion. Without supervision, it learns a mode based on species identity whose score decays as the gases mix, faster when the partition is removed than through a small hole, and stays constant when the partition is closed.
• Scope and limitations. In Supplementary Section Q, we vary how strongly the target depends on SAC. This empirically delineates the problem class of Theorem IV.2. SAIL outperforms message-passing architectures when the target is driven by spatial autocorrelation, but not when it is driven by feature content.
VI. Conclusion
We presented SAIL, a learnable formulation of SAC for high-dimensional spatial graphs. By jointly learning feature projections and spatial affinities, SAIL makes SAC an explicit quantity that can be analysed, optimised, and interpreted within modern learning pipelines. Across synthetic and real-world datasets, we observed that modelling SAC directly reveals structure that is difficult to capture through feature aggregation alone. In particular, unsupervised SAIL Modes recover spatially coherent biological niches, show a consistent association with response to PD-1/PD-L1 blockade, and expose prognostically relevant organisation in large biomedical datasets, while SAIL's supervised descriptors alone are sufficient to discriminate mesothelioma subtype, suggesting that SAC itself carries meaningful signal. More broadly, SAIL provides a practical bridge between classical spatial statistics and modern representation learning for cross-domain applications from geospatial analysis to biomedicine. Future work will explore generalisation to cross-channel coherence statistics.
REFERENCES
[1] N. Manap, M. N. Borhan, M. R. M. Yazid, M. K. A. Hambali, and A. Rohan, “Identification of hotspot segments with a risk of heavy-vehicle accidents based on spatial analysis at controlled-access highway,” Sustainability, vol. 13, no. 3, p. 1487, 2021.
[2] W. D. Koenig, “Global patterns of environmental synchrony and the moran effect,” Ecography, vol. 25, no. 3, pp. 283–288, 2002.
[3] R. Castro et al., “Spatial dynamics of the covid-19 pandemic in brazil,” Epidemiology & Infection, vol. 149, p. e60, 2021.
[4] P. A. P. MORAN, “NOTES ON CONTINUOUS STOCHASTIC PHE-NOMENA,” Biometrika, vol. 37, no. 1-2, pp. 17–23, Jun. 1950.
[5] R. C. Geary, “The Contiguity Ratio and Statistical Mapping,” The Incorporated Statistician, vol. 5, no. 3, pp. 115–146, 1954.
[6] A. Getis, “Spatial autocorrelation,” in Handbook of applied spatial analysis: Software tools, methods and applications. Springer, 2009, pp. 255–278.
[7] O. E. Ospina et al., “spatialge is a user-friendly web application that facilitates spatial transcriptomics data analysis,” Cancer research, vol. 85, no. 5, pp. 848–858, 2025.
[8] K. Al-Ahmadi and A. Al-Zahrani, “Spatial autocorrelation of cancer incidence in saudi arabia,” International journal of environmental research and public health, vol. 10, no. 12, pp. 7207–7228, 2013.
[9] J. Lin, “Comparison of moran’s i and geary’s c in multivariate spatial pattern analysis,” Geographical analysis, vol. 55, no. 4, pp. 685–702, 2023.
[10] H. Yamada, “Moran’s i for multivariate spatial data,” Mathematics, vol. 12, no. 17, p. 2746, 2024.
[11] ___,“Geary’sc for multivariate spatial data,” Mathematics, vol. 12, no. 12, p. 1820, 2024.
[12] C. C. Mackenzie, M. Dawood, S. Graham, M. Eastwood et al., “Neural graph modelling of whole slide images for survival ranking,” in Learning on Graphs Conference. PMLR, 2022, pp. 48–1.
[13] M. Pizurica et al., “Whole slide imaging-based prediction of tp53 mutations identifies an aggressive disease phenotype in prostate cancer,” Cancer Research, vol. 83, no. 17, pp. 2970–2984, 2023.
[14] M. Ali, S. Richter, A. Ertürk, D. S. Fischer, and F. J. Theis, “Graph neural networks learn emergent tissue properties from spatial molecular profiles,” Nature Communications, vol. 16, no. 1, p. 8419, 2025.
[15] S. Dray, S. Saïd, and F. Débias, “Spatial ordination of vegetation data using a generalization of wartenberg’s multivariate spatial correlation,” Journal of vegetation science, vol. 19, no. 1, pp. 45–56, 2008.
[16] K. Klemmer, N. S. Safir, and D. B. Neill, “Positional encoder graph neural networks for geographic data,” in International conference on artificial intelligence and statistics. PMLR, 2023, pp. 1379–1389.
[17] N. Nikzad, Y. Liao, Y. Gao, and J. Zhou, “Sata: spatial autocorrelation token analysis for enhancing the robustness of vision transformers,” in Proceedings of the Computer Vision and Pattern Recognition Conference, 2025, pp. 9730–9739.
[18] L. Anselin, “Local indicators of spatial association—lisa,” Geographical analysis, vol. 27, no. 2, pp. 93–115, 1995.
[19] P. H. Westfall and S. S. Young, Resampling-based multiple testing: Examples and methods for p-value adjustment. John Wiley & Sons, 1993.
[20] G. Gut, M. D. Herrmann, and L. Pelkmans, “Multiplexed protein maps link subcellular organization to cellular states,” Science, vol. 361, no. 6401, p. eaar7042, 2018.
[21] D. DeTomaso and N. Yosef, “Hotspot identifies informative gene modules across modalities of single-cell genomics,” Cell systems, vol. 12, no. 5, pp. 446–456, 2021.
[22] M. Y. Lee et al., “Single-cell spatial transcriptomics uncovers niches that govern response to pd-1/pd-11 blockade in cutaneous squamous cell carcinoma,” Journal for Immunotherapy of Cancer, vol. 14, no. 1, p. e014067, 2026.
[23] J. L. García-Rodríguez et al., “Cancer-associated fibroblasts shape the formation of budding cancer cells at the invasive front of human colorectal cancer,” Communications Biology, vol. 8, no. 1, p. 1345, 2025.
[24] H.-N. Jeong et al., “Transcriptome analysis of skeletal muscle in dermatomyositis, polymyositis, and dysferlinopathy, using a bioinformatics approach,” Frontiers in neurology, vol. 14, p. 1328547, 2023.
[25] L. Szabo et al., “Statistically based splicing detection reveals neural enrichment and tissue-specific induction of circular rna during human fetal development,” Genome biology, vol. 16, no. 1, p. 126, 2015.
[26] J. Galon and D. Bruni, “Approaches to treat immune hot, altered and cold tumours with combination immunotherapies,” Nature reviews Drug discovery, vol. 18, no. 3, pp. 197–218, 2019.
[27] A. Valdeolivas et al., “Profiling the heterogeneity of colorectal cancer consensus molecular subtypes using spatial transcriptomics,” NPJ precision oncology, vol. 8, no. 1, p. 10, 2024.
[28] P. Keller, M. Dawood, B. S. Chohan et al., “Histokernel: Whole slide image level maximum mean discrepancy kernels for pan-cancer predictive modelling,” Medical Image Analysis, vol. 101, p. 103491, 2025.
[29] P. Keller et al., “Insight: Spatially resolved survival modelling from routine histology crosslinked with molecular profiling reveals prognostic epithelial-immune axes in stage ii/iii colorectal cancer,” arXiv preprint arXiv:2512.22262, 2025.
[30] J.-R. Lin et al., “High-plex immunofluorescence imaging and traditional histology of the same tissue section for discovering image-based biomarkers,” Nature cancer, vol. 4, no. 7, pp. 1036–1052, 2023.
[31] J. N. Weinstein et al., “The cancer genome atlas pan-cancer analysis project,” Nature genetics, vol. 45, no. 10, pp. 1113–1120, 2013.
[32] R. J. Chen et al., “Towards a general-purpose foundation model for computational pathology,” Nature medicine, vol. 30, no. 3, pp. 850–862, 2024.
[33] R. Zhang et al., “Cancer-associated fibroblasts enhance tumor-associated macrophages enrichment and suppress nk cells function in colorectal cancer,” Cell death & disease, vol. 10, no. 4, p. 273, 2019.
[34] T. Xue et al., “Prognostic significance of cd163+ tumor-associated macrophages in colorectal cancer,” World journal of surgical oncology, vol. 19, no. 1, p. 186, 2021.
[35] M. D. Neilly, J. Pearson, A. W. Thu, C. MacRae, and K. G. Blyth, "Contemporary management of mesothelioma," Breathe, vol. 20, no. 2, p. 230175, 2024.
[36] L. Brčić et al., “Reproducibility of histological subtyping of malignant pleural mesothelioma,” Virchows archiv, vol. 465, no. 6, pp. 679–685, 2014.
[37] M. Eastwood et al., “Mesograph: Automatic profiling of mesothelioma subtypes from histological images,” Cell Reports Medicine, vol. 4, no. 10, 2023.
[38] N. Trahearn et al., “Computational pathology applied to clinical colorectal cancer cohorts identifies immune and endothelial cell spatial patterns predictive of outcome,” The Journal of Pathology, vol. 265, no. 2, pp. 198–210, 2025.
[39] K. Müller, C. Xu, M. Lehbib, and Z. Chen, “The global macro database: A new international macroeconomic dataset,” National Bureau of Economic Research, Tech. Rep., 2025.
Supplementary Material for: SAIL: A Learnable Generalisation of Spatial Autocorrelation over Graph-Structured Data
Piotr Keller and Fayyaz Minhas
CONTENTS
I Introduction 1
II Related Work 2
II-A Classical Spatial Autocorrelation Statistics 2
II-B Multivariate Extensions and Their Limitations 3
II-C Graph Neural Networks 3
II-D Integration of Spatial Autocorrelation into Deep Learning 3
III Methods 3
III-A Learning Multivariate Spatial Autocorrelation with SAIL 4
III-B Supervised Learning with SAIL 5
III-C Unsupervised Learning of Spatial Autocorrelation Modes 6
III-D Statistically Significant Spatial Hotspot Discovery 6
IV Theoretical Analysis 6
V Experimental Results and Applications 7
V-A Recovering classical spatial autocorrelation with SAIL 8
V-B Learning spatial autocorrelation beyond message passing 8
V-C Unsupervised discovery of Spatially Coherent Structures in Spatial Omics 9
V-D Discovering spatial coherence biomarkers of treatment response 9
V-E Unsupervised SAC modes for prediction of patient survival 11
V-F Supervised classification of mesothelioma subtypes with SAIL 12
V-G Additional Results 13
VI Conclusion 14
References 14
Appendix A: Biological and Clinical Background 17
A-A Spatial Omics Modalities 17
A-B Tissue Structure and Spatial Niches 17
A-C Histology and Whole-Slide Images 17
A-D Reference Annotations and Overlap (Dice) 17
A-E Survival Analysis 17
Appendix B: Additional Classical Spatial Statistics 17
B-A Getis–Ord 18
B-B Morisita–Horn Index 18
Appendix C: Additional Input Feature Space Mapping 18
C-A Linear Projection 18
C-B Orthogonal Projection 18
C-C Gumbel-Softmax Relaxation 18
C-D Concept-Based (One-Hot) Projection 18
Appendix D: Training Algorithms 18
Appendix E: Additional Theoretical Analysis 18
Appendix F: Additional implementation details on learning spatial autocorrelation beyond message passing 22
F-A Dataset Construction 22
F-B Neighbourhood Condition 23
F-C Models and Architectural Choices 23
F-D Two-Stage Selection and Evaluation 23
Appendix G: Additional details on unsupervised discovery of Spatially Coherent Structures in spatial omics 23
Appendix H: Additional details on Discovering spatial coherence biomarkers of treatment response 23
Appendix I: Additional details on Unsupervised SAC modes for prediction of patient survival 24
I-A ORION-CRC 24
I-B TCGA-BRCA and TCGA-CRC 25
I-C BRAF-Mutant Metastatic Colorectal Cancer (BRAF-CRC) 25
Appendix J: Additional details on Supervised classification of mesothelioma subtypes with SAIL 26
J-A Cross-Validation Protocol 26
J-B Model Architecture 26
J-C Training and Model Selection 26
J-D Statistical Comparison 26
Appendix K: Computational Complexity Analysis 27
K-A Empirical Computational Complexity Analysis 27
K-B Benchmark Design 27
K-C Measurement Protocol 28
K-D Results 28
Appendix L: Recovering classical spatial autocorrelation with SAIL in additional synthetic datasets 28
Appendix M: Ablation Study 29
M-A 4i Spatial Proteomics 29
M-B cSCC PD-1/PD-L1 Blockade Response 29
M-C TCGA-BRCA Survival 30
M-D TCGA-CRC Survival 30
M-E Summary 30
Appendix N: Analysis of spatial coherence of macroeconomic temporal geospatial data 30
N-A Data Source and Cleaning 30
N-B Feature Set 31
N-C Graph Construction 31
N-D Training Configuration 31
N-E Results 32
Appendix O: Geospatial Temporal Analysis: COVID-19 Case Trends 32
O-A Data Source and Preprocessing 32
O-B Graph Construction 32
O-C Results 32
Appendix P: Spatial coherence of mixing gases 33
P-A Dataset Setup 33
P-B Graph Construction and SAIL Model 33
P-C Results 33
Appendix Q: SAIL limitations 33
Q-A Problem class where SAIL is optimal 33
Q-B Results 34
References 34
APPENDIX A
BIOLOGICAL AND CLINICAL BACKGROUND
Since this work applies SAIL to biomedical data, we briefly summarise the main domain concepts and terminology.
A. Spatial Omics Modalities
Omics refers to the large-scale measurement of molecular features within a biological sample. Spatial omics technologies additionally record where each measurement was taken, producing molecular readouts paired with coordinates.
• Spatial transcriptomics measures gene expression (the abundance of RNA transcripts, i.e. how “active” each gene is) at many locations across a tissue.
• Spatial proteomics measures protein abundance rather than gene expression. We utilise fluorescent markers whose presence indicates a particular cell type or state (e.g., CD8a marks cytotoxic T cells, CD31 marks endothelial/blood-vessel cells).
B. Tissue Structure and Spatial Niches
Biological tissue is spatially organised: cells of similar type and function tend to cluster into coherent regions. A spatial niche (or compartment) is such a region, defined by a characteristic molecular or cellular composition, for example a subcellular compartment such as the nucleolus, nucleus, endoplasmic reticulum or cell periphery. Identifying niches is a core goal of spatial biology because tissue function depends not only on which cells are present but on how they are spatially arranged.
C. Histology and Whole-Slide Images
A whole-slide image (WSI) is a high-resolution digital scan of a stained tissue slide, often 100,000 px by 100,000 px. Because a WSI is too large to process directly, it is tiled into small patches; each patch is passed through a pretrained neural network or model to obtain a feature representation for each patch.
D. Reference Annotations and Overlap (Dice)
Biologically informed annotations provide reference masks. To measure how well a discovered SAIL Mode matches an annotated region, we use the Dice score, an overlap score between two regions equal to twice their intersection divided by the sum of their sizes, ranging from 0 (no overlap) to 1 (perfect overlap).
E. Survival Analysis
A central clinical question is whether a measured quantity predicts patient outcome, most commonly survival time (time from diagnosis or surgery until a particular event such as death or disease progression). Survival data are censored: for patients still alive at the end of the study, the true survival time is unknown, only that it exceeds the observation window. Standard classification metrics cannot handle censoring, so specialised tools are used:
• Median split. To test whether a continuous score (here, a global SAIL score) is prognostic, patients are divided into two groups by thresholding at the median value, giving a “high” and a “low” group. Outcomes are then compared between groups.
• Kaplan–Meier analysis. A method to estimate and visualise the fraction of patients surviving over time from censored data. Plotted as a step curve per group; well-separated curves indicate the groups have different prognoses.
• Log-rank test. A statistical hypothesis test for whether two Kaplan–Meier survival curves differ significantly.
• Concordance index (C-Index). The survival analogue of the AUC: the probability that, for a random pair of patients, the model correctly orders who survives longer. A value of 0.5 is random; values > 0.5 indicate better discrimination.
• Hazard ratio (HR). From a Cox proportional-hazards model, the relative instantaneous risk of the event in one group versus another. HR > 1 means higher risk; HR = 1 means no difference.
• Restricted mean survival time (RMST). The average event-free time over a fixed follow-up window; is the difference between groups, giving an interpretable “extra months/days survived” quantity.
APPENDIX B
ADDITIONAL CLASSICAL SPATIAL STATISTICS
Below we summarise two further indices used in this work: Getis–Ord , which measures local hotspot concentration, and the Morisita–Horn index, which measures neighbourhood compositional overlap.
A. Getis-Ord
Getis–Ord identifies local “hotspots” and “coldspots”. For a scalar feature with values (dropping the graph index and feature index for readability), let denote its mean and its population standard deviation. The standardised statistic at node is
where the sums over include , i.e. self-weights are allowed, as in the starred statistic. is a z-score: large positive values indicate that node and its neighbours collectively take high values (a potential hotspot), while large negative values indicate a coldspot.
B. Morisita–Horn Index
The Morisita–Horn index measures compositional similarity between two distributions and is commonly used in ecology to quantify overlap between species abundance profiles. In spatial settings, it can be used to compare the feature composition of a node with that of its spatial neighbourhood, providing a measure of neighbourhood compositional overlap.
Let denote the non-zero, non-negative feature vector of node , and let
be its relative-abundance vector. We define the affinity-weighted neighbourhood composition as
which, for row-stochastic weights ( ), is itself a relative-abundance vector describing the composition of the neighbourhood of node . The Morisita–Horn similarity between node and its neighbourhood is then
This score lies in , with larger values indicating greater compositional similarity between the node and its neighbourhood, and smaller values indicating compositional heterogeneity. In the context of spatial analysis, high Morisita–Horn values indicate regions where neighbouring nodes share similar feature compositions, whereas low values indicate spatial transitions between distinct compositions.
APPENDIX C
ADDITIONAL INPUT FEATURE SPACE MAPPING
A. Linear Projection
The most basic choice is a dense linear layer,
which learns spatial scalar fields as weighted combinations of input features.
B. Orthogonal Projection
To encourage decorrelated and diverse spatial directions, we can constrain the projection matrix to lie on the Stiefel manifold:
This orthogonality ensures that each column of Z captures an independent spatial signal.
C. Gumbel-Softmax Relaxation
To enable continuous relaxation of the discrete concept assignment while preserving differentiability, SAIL also supports the Gumbel-Softmax trick:
where and . As the temperature (distinct from the spatial temperature ), this approximation converges to a true one-hot vector.
D. Concept-Based (One-Hot) Projection
For discrete, interpretable representations, each feature vector is assigned to one of m learned “concepts” via a classification-style projection:
This hard assignment is implemented using a straight-through estimator:
where gradients during backpropagation flow through H while the forward pass uses the discrete one-hot encoding.
APPENDIX D TRAINING ALGORITHMS
Supplementary Algorithm 2 details supervised training of SAIL with a general task loss, and Supplementary Algorithm 3 details unsupervised discovery of SAIL Modes; both call the SAIL forward pass of Algorithm 1 of the main paper.
APPENDIX E
ADDITIONAL THEORETICAL ANALYSIS
We restate the theorems of the main text and provide their proofs.
Theorem IV.1 (Classical spatial statistics as exact special cases of SAIL).
Let be a fixed row-stochastic spatial weight matrix, i.e., , and let . Then, under appropriate fixed choices of the SAIL mapping, local-scoring, standardisation, and reduction operators, SAIL (Eq. (6)) exactly recovers:
Algorithm 2 Supervised Training of SAIL with a General Task Loss
Input: Labelled dataset ; prediction head ; task loss ; learning rate ; epochs ; and batch size
Parameters: SAIL parameters , , and prediction parameters
Return: optimised parameters , , , and
Initialise , , , and
for do
for each mini-batch , do
for each do
{Algorithm 1 of the main paper}
end for
,
end for
end for
return , , ,
Algorithm 3 Unsupervised Discovery of SAIL Modes
Input: Dataset ; number of modes ; learning rate ; epochs ; batch size ; regularisation weights ; and operator sign
Parameters:
Return: optimised and for modes
Initialise , and
for do
for each mini-batch , do
for each do
end for
end for
end for
return
(i) Moran’s I for a non-constant scalar mapped field, using population standardisation, , and mean reduction;
(ii) Geary's C for a non-constant scalar mapped field, using sample standardisation, , and mean reduction;
(iii) the standardised Getis–Ord statistic for a non-constant scalar mapped field, using population standardisation and allowing self-weights as in the starred statistic, whenever its null variance is non-zero; and
(iv) the Morisita–Horn similarity between a non-negative, unstandardised multichannel mapped representation at a node and its affinity-weighted neighbourhood composition, provided that is allowed to act jointly on the corresponding mapped channels.
Specifically, the resulting SAIL outputs are respectively , , , and , where is the mapped representation at node and is its affinity-weighted neighbourhood composition.
Proof. Since A is row-stochastic, for every j. Consequently,
We consider each statistic in turn.
(i) Moran’s I. Let and define the population mean and variance by and . Population standardisation gives , and therefore and .
The classical Moran statistic computed with weights A is
Substituting , , and yields
Now choose the SAIL local operator
and let be the mean. Then
Hence Moran's I is an exact SAIL special case.
(ii) Geary's C. Again let , but now define the sample variance and standardise as . It follows that and .
The classical Geary statistic under A is
Substituting , , and gives
Choose the SAIL local operator
and again let be the mean. Then
Hence Geary's C is also an exact SAIL special case.
(iii) Getis–Ord . Let and denote the population mean and standard deviation defined above, and let . The standardised Getis–Ord statistic under A is
Since A is row-stochastic, . Substitution gives
Moreover,
Substituting this expression and cancelling yields
Therefore, choosing
gives exactly. The denominator is well-defined whenever . No reduction is required, since is itself a local statistic.
(iv) Morisita–Horn similarity. Let be a non-zero compositional feature vector and choose the (unstandardised) mapping , so that and .
Let denote the affinity-weighted neighbourhood composition. Since A is non-negative and row-stochastic,
Thus both and are relative-abundance vectors. The Morisita–Horn similarity between them is therefore
Choosing gives
which is exactly the Morisita–Horn similarity between node j and its spatial neighbourhood.
Hence all four statistics are recovered as fixed instances of the SAIL mapping, local-scoring, activation, and reduction operators.
Theorem IV.2 (Inductive Bias of SAIL for SAC-Driven Learning).
Let be a distribution over spatial graphs , with an optional associated target variable , and population risk
and Bayes-optimal predictor with risk .
Let denote the class of problems whose Bayes-optimal predictor depends on one or more spatial-autocorrelation (SAC) descriptors of node signals. For clarity, consider a single global descriptor,
where is a spatial-affinity operator, is a SAC functional formed from local spatial interactions followed by an order-invariant reduction, and maps the SAC descriptor to the prediction target.
Let
denote the supervised SAIL hypothesis class, where is obtained from the feature mapping , learned affinity A, local SAC operator , optional activation , and reduction of Eq. (6).
Assume that the admissible SAIL component families are sufficiently expressive to approximate , , and , and that the chosen local and reduction operators implement . Assume also that and that is L-Lipschitz in its prediction argument. Define
and let denote the Rademacher complexity of a hypothesis class with respect to m i.i.d. samples from P.
Then:
(i) Sufficiency. For every and every , there exists such that
and therefore
If is an -approximate empirical-risk minimiser from m i.i.d. examples, then with probability at least ,
(ii) Necessity of higher-order interaction for quadratic SAC. Consider the quadratic SAC subclass
with A fixed with respect to z and
Then
Let
denote the class of finite T-hop linear graph filters followed by linear pooling and readout. This includes, for example, Simple Graph Convolution (SGC), linearised Graph Convolution Networks (GCNs), polynomial graph filters, and linear message-passing models with linear pooling/readout. Every is affine in z and hence satisfies . Thus cannot in general represent the quadratic SAC subclass, whereas SAIL explicitly contains the interaction
(iii) Comparison with broader classes. More general non-linear graph neural networks (GNNs) may also represent the higher-order interactions required by SAC, but only as one possibility within a broader function class. Let denote such a broader SAC-capable hypothesis class satisfying
Then
Hence, once the SAC structure is already representable by SAIL, additional generic expressivity cannot, by itself, yield a smaller Rademacher-complexity term in the corresponding standard generalisation bound. If the two classes attain the same approximation and optimisation errors on a SAC-driven problem, the resulting excess-risk bound for SAIL is no larger.
Thus SAIL provides a matched inductive bias for : it contains the interactions required by SAC-driven prediction, simpler linear-interaction classes may fail to represent them, while broader enclosing classes provide no smaller complexity-dependent learning guarantee solely through their additional expressivity.
Proof. Part (i). Consider a problem with
The argument extends componentwise to multiple SAC descriptors and directly to local SAC outputs.
The defining computation has the structure
SAIL has the same structure: constructs scalar node fields, the affinity mechanism constructs A, and compute SAC descriptors, and maps these descriptors to the task output. Thus
Under exact component representation, an appropriate SAIL parametrisation therefore satisfies . More generally, by the assumed expressivity and continuity of the composition, for every there exists such that
Since is L-Lipschitz,
so .
Let
and suppose
Standard Rademacher uniform convergence for a bounded L-Lipschitz loss gives, with probability at least ,
Combining this with the approximation bound proves Part (i).
Part (ii). For
the skew-symmetric part of contributes zero, so
Hence
showing genuine second-order dependence on z.
For any ,
and therefore
No such predictor can equal a non-degenerate quadratic SAC target on an open subset of the signal domain. Under squared-error loss, if the distribution of z has finite fourth moment and support containing a non-empty open set, this implies
for some quadratic SAC-driven problems.
Increasing T changes the spatial range of the graph filter but not its order of dependence on z. SAIL, by contrast, directly evaluates
and global reduction yields the corresponding quadratic SAC statistic. Thus the required second-order interaction is explicit in SAIL. This proves Part (ii).
Part (iii). Let
For a fixed sample and Rademacher variables ,
Taking expectations gives
Therefore, for
we have
Because is larger, it may attain smaller approximation error, so this does not imply worse realised test performance for the broader class. It establishes that once the SAC target is already adequately represented by SAIL, enlarging the hypothesis class alone cannot improve the Rademacher-complexity contribution to the standard generalisation bound. If approximation and optimisation errors are equal, the resulting excess-risk bound for SAIL is therefore no larger. This proves Part (iii).
APPENDIX F
ADDITIONAL IMPLEMENTATION DETAILS ON LEARNING SPATIAL AUTOCORRELATION BEYOND MESSAGE PASSING
This section provides complete implementation details for the synthetic Moran's I regression experiment of Section V-B. We adopt a two-stage approach where each architecture is assessed at its own best configuration under an identical optimisation budget. All models are trained with Adam, learning rate , mean-squared-error loss, and early stopping on validation Pearson correlation with patience 10 and a maximum of 30 epochs. The data splits are 600/250/600 graphs for training/validation/test. Stage 1 selects hyperparameters on a single sweep seed; Stage 2 estimates the performance distribution by retraining each selected model across 1000 independent seeds.
A. Dataset Construction
Each sample is an independently generated spatial graph. The generative process is designed so that the regression target is, by construction, a global spatial autocorrelation functional of a hidden linear projection of the node features evaluated on a hidden neighbourhood, and so that neither the projection nor the spatial scale can be memorised across graphs.
a) Coordinates: For each graph we sample the number of nodes uniformly, , and draw node coordinates independently.
b) Spatially correlated node features: Node features with are drawn from a Gaussian process over the coordinates. We form an RBF kernel with amplitude , add jitter for numerical stability, and take its Cholesky factor . Eight independent Gaussian process draws are generated as with , . The per-graph lengthscale is sampled log-uniformly on , so that spatial smoothness varies across graphs. To introduce inter-feature correlation, the channels are mixed by a random low-rank matrix of rank (with , standard normal entries), giving . Finally each feature channel is standardised to zero mean and unit variance across nodes.
c) Hidden projection and regression target: For each graph a hidden projection is drawn uniformly on the unit sphere and defines the latent scalar field , standardised to zero mean and unit variance. The regression label is:
(18)
where the weights are defined on the true neighbourhood: a symmetric k-nearest-neighbour graph with , and edges weighted by an RBF of the coordinate distance, with . Because , , and the induced neighbourhood vary per graph, the mapping from to cannot be solved by memorising a fixed direction or spatial scale; it requires modelling the spatial autocorrelation functional itself. Crucially, the generating neighbourhood is never exposed to any model.
B. Neighbourhood Condition
Because no model is handed the generating operator, all models must infer spatial structure from a neighbourhood they construct themselves. We adopt an access-matched, fully connected, distance-weighted comparison: every node pair is connected, with edge weights , or raw pairwise distances supplied as edge attributes for attention variants. The baselines see all pairs and must learn the weighting, while SAIL likewise sees all pairwise distances and must learn the spatial temperature .
C. Models and Architectural Choices
All models share a two-stage template: a node-level encoder followed by global mean pooling and a single linear head producing the scalar prediction. They differ only in how the encoder uses graph structure. Each baseline uses a single aggregation layer, matching SAIL's single quadratic operator. The input dimension is for feature-only variants and when node coordinates are concatenated; the hidden width (and, for attention, the number of heads) is selected per model in Stage 1.
-
SAIL (dense). A linear feature map followed by the Moran-style local index under a dense affinity built from full pairwise coordinate distances (no edge list, no self-loops, learnable temperature , mean global reduction), then a linear head Linear().
-
GCN. A single GCNConv() with ReLU, global mean pooling, and Linear(), run on the fully connected distance-weighted graph, evaluated with and without node coordinates.
-
GAT. A single attention layer () with ReLU, global mean pooling, and Linear(). Run on the fully connected graph, evaluated with and without coordinates.
-
MLP (control) Single-hidden-layer MLP () with ReLU, global mean pooling, and Linear().
D. Two-Stage Selection and Evaluation
a) Stage 1: hyperparameter sweep: For each model we grid-search the hidden width over and, for attention models, the number of heads over , on a single sweep seed. Each configuration is trained to convergence and its validation Pearson correlation recorded. The configuration with the highest validation Pearson is selected; ties within are broken toward the smaller model.
b) Stage 2: seeded evaluation: Each model is then re-trained at its selected configuration across 1000 independent seeds, with datasets regenerated per seed, and test metrics (Pearson, MSE) recorded. The evaluation seeds are drawn disjoint from the sweep seed. The resulting distributions define the box plots of Figure 3, with per-model parameter counts and mean ± standard deviation of test Pearson and MSE reported in Supplementary Table XVII; significance is assessed with a paired Wilcoxon signed-rank test with false-discovery-rate correction across models.
APPENDIX G
ADDITIONAL DETAILS ON UNSUPERVISED DISCOVERY OF SPATIALLY COHERENT STRUCTURES IN SPATIAL OMICS
We apply SAIL in a fully unsupervised setting to the 4i multiplexed imaging dataset where subcellular compartment labels are used only for post-hoc evaluation and are never exposed to the model. A -nearest-neighbour spatial graph is built directly from measurement-location coordinates with neighbours, and neighbour distances are log-transformed before being passed to the affinity module. SAIL is trained to jointly discover 20 modes, using a Geary-style local index, a Stiefel-constrained linear projection, no learned feature affinity, and . For each learned mode, LISA cluster maps are computed (Section III-D), and the High-High and Low-Low hotspot masks are compared against each of the 10 expert-annotated compartments via Dice overlap. SAIL attains the highest Dice on 7 of 10 compartments; across compartments it outperforms Univariate (), Mean (), MULTISPATI-PCA () and Hotspot (; one-sided paired Wilcoxon signed-rank tests). For every compartment, we report the single best-matching mode and cluster polarity (Supplementary Table V), and we additionally benchmark against classical univariate and mean-aggregate multivariate Moran's baselines, MULTISPATI-PCA and Hotspot (Supplementary Table VI). The projection weights and LISA cluster maps of all 20 learned modes are shown in Supplementary Figure 8, and the expression of all 43 proteins together with the ground-truth compartment masks is shown in Supplementary Figure 9.
TABLE V BEST-MATCHING UNSUPERVISED SAIL MODE PER ANNOTATED SUBCELLULAR COMPARTMENT ON THE 4I DATASET. FOR EACH COMPARTMENT, WE REPORT THE MODE WHOSE LISA HOTSPOT MASK (HIGH-HIGH OR LOW-LOW) ATTAINS THE HIGHEST DICE OVERLAP WITH THE EXPERT ANNOTATION.
| Compartment | Mode | LISA cluster | Dice |
|---|---|---|---|
| Nucleolus | 8 | Low-Low | 0.839 |
| Cell periphery 2 | 1 | Low-Low | 0.587 |
| Endosomes/Golgi 1 | 3 | High-High | 0.577 |
| Cell periphery 1 | 4 | Low-Low | 0.533 |
| Nucleus | 5 | High-High | 0.529 |
| ER/mitochondria 1 | 14 | High-High | 0.488 |
| ER/mitochondria 2 | 9 | Low-Low | 0.347 |
| Cell periphery 3 | 17 | High-High | 0.316 |
| Nuclear envelope | 16 | High-High | 0.126 |
| Endosomes/Golgi 2 | 11 | High-High | 0.077 |
APPENDIX H
ADDITIONAL DETAILS ON DISCOVERING SPATIAL COHERENCE BIOMARKERS OF TREATMENT RESPONSE
We next test whether unsupervised SAIL niches are predictive of clinical response to PD-1/PD-L1 blockade in a cutaneous squamous cell carcinoma (cSCC) CosMx cohort, comprising baseline (pre-treatment) biopsies from 11 responder and 10 non-responder patients. Response is treated as an unpaired, subject-level label, so association is assessed with a two-sided Mann–Whitney U test and the corresponding ROC AUC per mode. Cells with fewer than 100 total counts and

Fig. 8. All 20 unsupervised SAIL Modes learned on the 4i dataset. For each mode we show the learned projection weights over the 43 protein markers (bar chart, as in Figure 4), alongside the corresponding High–High and Low–Low LISA cluster maps overlaid on the tissue. Together these define, for every mode, both the molecular program it emphasises and the spatial regions where that program is coherently high (High–High) or low (Low–Low). The best-matching mode per annotated compartment is quantified in Supplementary Table V.
genes detected in fewer than 10 cells are removed prior to analysis, and any tissue core with fewer than 50 surviving cells is dropped. Each patient is represented by a single graph in which every retained core forms an internally connected k-nearest-neighbour block ( ) with no edges between cores.
SAIL is trained fully unsupervised across all patients jointly to learn 20 spatial modes with: a Geary-style local index, a Stiefel-constrained linear projection, , a learnable spatial temperature, and no learned feature affinity. The resulting 20 modes are scored per subject (Supplementary Table VII) and their defining gene weights are shown in Supplementary Figure 10.
APPENDIX I
ADDITIONAL DETAILS ON UNSUPERVISED SAC MODES FOR PREDICTION OF PATIENT SURVIVAL
Implementation details for the prognostic analyses of Section V-E. In all four cohorts, SAIL is applied in the unsupervised mode-learning configuration. Spatial modes are learned by minimising a Geary-style objective ( modes, , , Stiefel-constrained linear projection, no learned feature affinity), unless stated otherwise. For each patient, the resulting global SAIL score(s) are used to evaluate performance.
A. ORION-CRC
In the ORION-CRC cohort, -nearest-neighbour cell graphs are used, with node features given by 17 marker intensities after excluding the autofluorescence (AF1) and ARG550 channels. SAIL learns 20 modes jointly across all slides ( modes, , , , Stiefel-constrained linear projection, no learned feature affinity). We reduce the sparsity penalty from the default because, on this cohort, the default produced modes that each loaded on a single marker, so that the global SAIL score reduced to a univariate SAC statistic. Supplementary Table VIII reports the survival association of every mode. Survival associations of univariate Geary's C on each individual marker, the mean-aggregate multivariate baseline, tumour grade and the immune groups (IFM1–4) of the original ORION study are reported in Supplementary Table X.
TABLE VI FULL PER-COMPARTMENT DICE COMPARISON ON THE 4I DATASET, EXTENDING THE FOUR-COMPARTMENT SUMMARY OF THE MAIN TEXT TO ALL 10 ANNOTATED COMPARTMENTS. SAIL IS THE BEST-MATCHING UNSUPERVISED MODE (SUPPLEMENTARY TABLE V); Univariate (UNIV.) IS CLASSICAL MORAN'S I WITH LISA COMPUTED ON THE SINGLE BEST-PERFORMING INDIVIDUAL PROTEIN (NAMED IN PARENTHESES) AMONG THE 20 PROTEINS WITH THE HIGHEST GLOBAL MORAN'S I; Mean IS THE TRADITIONAL MULTIVARIATE EXTENSION OF MORAN'S I, I.E. THE MEAN OF THE UNIVARIATE MORAN'S I STATISTICS ACROSS ALL 43 PROTEINS; MULTISPATI IS MULTISPATI-PCA [1] WITH LOCAL MORAN'S I LISA COMPUTED ON THE AXES AND Hotspot IS HOTSPOT [2] WITH LOCAL MORAN'S I LISA COMPUTED ON THE SCORES OF ITS PROTEIN MODULES, ALL USING THE SAME LOG-DISTANCE KNN GRAPH. FOR EACH COMPARTMENT WE REPORT THE DICE OVERLAP BETWEEN THE DERIVED HIGH-HIGH/LOW-LOW HOTSPOT MASK AND THE EXPERT ANNOTATION.
| Compartment | SAIL | Univ. | Mean | MULTISPATI | Hotspot |
|---|---|---|---|---|---|
| Nucleolus | 0.84 | 0.75(DAPI) | 0.50 | 0.79 | 0.71 |
| Cell periphery 2 | 0.59 | 0.49(CRT) | 0.50 | 0.49 | 0.50 |
| Endosomes/Golgi 1 | 0.58 | 0.38(SARA) | 0.34 | 0.38 | 0.56 |
| Cell periphery 1 | 0.53 | 0.51(CRT) | 0.51 | 0.50 | 0.50 |
| Nucleus | 0.53 | 0.47(PCNA) | 0.41 | 0.40 | 0.46 |
| ER/mitochondria 1 | 0.49 | 0.45(ABCD3) | 0.24 | 0.50 | 0.47 |
| ER/mitochondria 2 | 0.35 | 0.37(Actin) | 0.38 | 0.38 | 0.37 |
| Cell periphery 3 | 0.32 | 0.31(CTNNB1) | 0.10 | 0.31 | 0.33 |
| Nuclear envelope | 0.13 | 0.06(NUPS) | 0.01 | 0.08 | 0.07 |
| Endosomes/Golgi 2 | 0.08 | 0.03(FBL) | 0.01 | 0.04 | 0.02 |
B. TCGA-BRCA and TCGA-CRC
In the TCGA analysis, patches form graph nodes connected via nearest-neighbour edges. For both cohorts, SAIL learns 20 modes ( , Stiefel-constrained linear projection, no learned feature affinity). Supplementary Table IX reports the survival association of every mode.
C. BRAF-Mutant Metastatic Colorectal Cancer (BRAF-CRC)
We further evaluate SAIL on a cohort of patients with BRAF-mutant metastatic colorectal cancer [3]. Multiplexed tissue images were segmented and each cell assigned one of eight coarse cell-type labels: cancer epithelial (cep), normal epithelial (nep), fibroblast (fib), lymphocyte (lym), neutrophil (neu), macrophage (mac), endothelial (end), and myocyte (myo) cells. Cell type is one-hot encoded as the node feature vector, with 2D cell centroids as node coordinates. Each tissue image is converted into a -nearest-neighbour spatial graph (); where a patient contributes multiple images, per-image SAIL scores are averaged to obtain a single per-patient score. Overall survival is measured from diagnosis of metastatic disease, with death as the event and patients alive at last follow-up treated as censored. SAIL learns 30 modes jointly across all patient graphs (batch size 8) with . The best-performing SAIL Mode contrasts stromal cells (myocytes, fibroblasts and endothelial cells) with immune cells (lymphocytes and neutrophils) and stratifies
TABLE VII SAIL NICHE DISCRIMINATION OF PD-1/PD-L1 BLOCKADE RESPONSE (SEE SUPPLEMENTARY SECTION H). EACH ROW IS ONE SAIL MODE, SCORED AT THE SUBJECT LEVEL ACROSS 11 RESPONDER AND 10 NON-RESPONDER PATIENTS AND RANKED BY DISCRIMINATIVE AUC. Med. R AND Med. NR ARE THE MEDIAN PER-SUBJECT GLOBAL GEARY-STYLE SAIL SCORES AMONG RESPONDER (R) AND NON-RESPONDER (NR) PATIENTS, RESPECTIVELY. AUC IS THE AREA UNDER THE ROC CURVE FOR SEPARATING THE TWO GROUPS BY SAIL SCORE; U AND p ARE THE MANN–WHITNEY–WILCOXON RANK-SUM STATISTIC AND ITS TWO-SIDED p-VALUE.
| Mode | Med. R | Med. NR | AUC | U | p |
|---|---|---|---|---|---|
| 18 | 0.692 | 0.556 | 0.864 | 95 | 0.005 |
| 11 | 0.589 | 0.554 | 0.809 | 89 | 0.018 |
| 4 | 0.588 | 0.513 | 0.791 | 87 | 0.027 |
| 8 | 0.634 | 0.541 | 0.782 | 86 | 0.032 |
| 14 | 0.638 | 0.549 | 0.773 | 85 | 0.038 |
| 7 | 0.611 | 0.519 | 0.764 | 84 | 0.045 |
| 20 | 0.683 | 0.614 | 0.764 | 84 | 0.045 |
| 9 | 0.635 | 0.554 | 0.755 | 83 | 0.053 |
| 16 | 0.673 | 0.563 | 0.745 | 82 | 0.062 |
| 19 | 0.695 | 0.577 | 0.727 | 80 | 0.084 |
| 3 | 0.582 | 0.505 | 0.700 | 77 | 0.130 |
| 10 | 0.641 | 0.537 | 0.691 | 76 | 0.149 |
| 13 | 0.608 | 0.542 | 0.682 | 75 | 0.170 |
| 15 | 0.609 | 0.545 | 0.673 | 74 | 0.193 |
| 6 | 0.596 | 0.534 | 0.655 | 72 | 0.245 |
| 1 | 0.485 | 0.495 | 0.636 | 70 | 0.307 |
| 17 | 0.625 | 0.592 | 0.627 | 69 | 0.342 |
| 12 | 0.612 | 0.542 | 0.618 | 68 | 0.379 |
| 2 | 0.563 | 0.502 | 0.600 | 66 | 0.460 |
| 5 | 0.553 | 0.540 | 0.591 | 65 | 0.504 |
TABLE VIII SURVIVAL ASSOCIATION (OVERALL SURVIVAL) OF ALL 20 UNSUPERVISED SAIL MODES IN ORION-CRC. PATIENTS ARE SPLIT AT THE MEDIAN OF EACH MODE'S GLOBAL SAIL SCORE. C-INDEX, LOG-RANK p-VALUE AND ΔRMST (RESTRICTED MEAN SURVIVAL TIME OF THE LOW- MINUS THE HIGH-SCORE GROUP, IN DAYS) IS REPORTED.
| Mode | C-Index | p | ΔRMST |
|---|---|---|---|
| 1 | 0.68 | 0.403 | 213 |
| 2 | 0.66 | 0.403 | 213 |
| 3 | 0.52 | 0.300 | 288 |
| 4 | 0.72 | 0.040 | 502 |
| 5 | 0.68 | 0.048 | 482 |
| 6 | 0.51 | 0.502 | -153 |
| 7 | 0.57 | 0.527 | 196 |
| 8 | 0.64 | 0.360 | 201 |
| 9 | 0.55 | 0.442 | 342 |
| 10 | 0.57 | 0.193 | 417 |
| 11 | 0.60 | 0.244 | 349 |
| 12 | 0.61 | 0.046 | 602 |
| 13 | 0.63 | 0.261 | 323 |
| 14 | 0.57 | 0.447 | 344 |
| 15 | 0.65 | 0.007 | 660 |
| 16 | 0.58 | 0.275 | 321 |
| 17 | 0.74 | 0.005 | 782 |
| 18 | 0.59 | 0.331 | 345 |
| 19 | 0.60 | 0.138 | 407 |
| 20 | 0.53 | 0.458 | -219 |
patients by overall survival (log-rank , HR = 1.83; Supplementary Figure 11). This exceeds univariate Geary's on every individual cell type and the mean-aggregate baseline (Supplementary Table XI).
Zoomed-in regions of the local SAIL scores and
TABLE IX SURVIVAL ASSOCIATION OF ALL 20 UNSUPERVISED SAIL MODES IN TCGA-BRCA (DISEASE-SPECIFIC SURVIVAL) AND TCGA-CRC (OVERALL SURVIVAL). PATIENTS ARE SPLIT AT THE MEDIAN OF EACH MODE'S GLOBAL SAIL SCORE. C-INDEX IS REPORTED AS ; IS THE LOG-RANK -VALUE; HR (95% CI) COMPARES THE HIGH- WITH THE LOW-SCORE GROUP; RMST IS THE RESTRICTED MEAN SURVIVAL TIME OF THE LOW- MINUS THE HIGH-SCORE GROUP, IN DAYS.
| Mode | TCGA-BRCA | TCGA-CRC | ||||||
|---|---|---|---|---|---|---|---|---|
| C-Index | p | HR (95% CI) | ΔRMST | C-Index | p | HR (95% CI) | ΔRMST | |
| 1 | 0.64 | 0.005 | 2.39 (1.28–4.46) | 386 | 0.59 | 0.117 | 1.45 (0.91–2.30) | 102 |
| 2 | 0.55 | 0.450 | 1.26 (0.69–2.28) | 195 | 0.60 | 0.057 | 1.56 (0.98–2.48) | 653 |
| 3 | 0.58 | 0.288 | 1.37 (0.76–2.47) | 159 | 0.54 | 0.576 | 1.14 (0.72–1.80) | 107 |
| 4 | 0.57 | 0.053 | 1.80 (0.98–3.28) | 302 | 0.56 | 0.059 | 1.55 (0.98–2.47) | 365 |
| 5 | 0.54 | 0.690 | 1.13 (0.62–2.07) | 104 | 0.55 | 0.020 | 1.74 (1.09–2.79) | 689 |
| 6 | 0.57 | 0.105 | 1.63 (0.90–2.97) | 240 | 0.57 | 0.185 | 1.37 (0.86–2.17) | 329 |
| 7 | 0.56 | 0.051 | 1.81 (0.99–3.30) | 270 | 0.53 | 0.510 | 1.17 (0.74–1.85) | 118 |
| 8 | 0.51 | 0.264 | 1.40 (0.78–2.51) | 223 | 0.52 | 0.889 | 1.03 (0.65–1.63) | 0 |
| 9 | 0.53 | 0.271 | 1.39 (0.77–2.53) | 254 | 0.55 | 0.081 | 1.51 (0.95–2.42) | 548 |
| 10 | 0.51 | 0.492 | 0.81 (0.45–1.48) | -13 | 0.53 | 0.258 | 1.30 (0.82–2.05) | 213 |
| 11 | 0.50 | 0.752 | 1.10 (0.61–1.97) | 88 | 0.54 | 0.206 | 1.35 (0.85–2.13) | 432 |
| 12 | 0.63 | 0.010 | 2.18 (1.19–4.00) | 323 | 0.56 | 0.143 | 1.41 (0.89–2.24) | 586 |
| 13 | 0.52 | 0.641 | 1.15 (0.64–2.08) | 67 | 0.52 | 0.646 | 1.11 (0.71–1.75) | 350 |
| 14 | 0.51 | 0.782 | 1.09 (0.61–1.95) | 40 | 0.52 | 0.715 | 1.09 (0.69–1.73) | 156 |
| 15 | 0.55 | 0.580 | 0.85 (0.47–1.53) | 8 | 0.56 | 0.288 | 1.28 (0.81–2.03) | 201 |
| 16 | 0.52 | 0.605 | 1.17 (0.65–2.12) | 53 | 0.54 | 0.137 | 1.42 (0.89–2.24) | 234 |
| 17 | 0.59 | 0.486 | 1.23 (0.69–2.21) | 99 | 0.59 | 2.37 (1.47–3.84) | 791 | |
| 18 | 0.56 | 0.022 | 2.00 (1.09–3.67) | 262 | 0.57 | 0.660 | 1.11 (0.70–1.76) | -137 |
| 19 | 0.52 | 0.420 | 1.28 (0.70–2.31) | 126 | 0.50 | 0.265 | 0.77 (0.48–1.22) | -234 |
| 20 | 0.58 | 0.600 | 1.17 (0.65–2.10) | 43 | 0.50 | 0.907 | 0.97 (0.61–1.54) | 93 |
LISA clusters are shown in Supplementary Figure 12, for TCGA-BRCA and TCGA-CRC patch graphs (Supplementary Figure 12a) and for BRAF-CRC and ORION-CRC cell graphs (Supplementary Figure 12b).
APPENDIX J
ADDITIONAL DETAILS ON SUPERVISED CLASSIFICATION OF MESOTHELIOMA SUBTYPES WITH SAIL
Implementation details for the mesothelioma subtyping analysis of Section V-F.
A. Cross-Validation Protocol
All models are evaluated on a shared, fixed set of splits over the primary St. George's Hospital (SGH) cohort. Following the original MesoGraph protocol, the outer split is a leave-one-slide-out cross-validation: each fold holds out all cores from a single slide as the test set. Within each fold, the remaining cores are further split 75%/25% into training and validation sets via a stratified split on the core-level label.
B. Model Architecture
SAIL is used in a shared-backbone, dual-head configuration: a single SAIL operator (a linear feature map to 16 projection dimensions, a Geary-style local index, mean global reduction, and a learnable softmax temperature over log-transformed kNN distances) is evaluated once per core, and its 16-dimensional global descriptor is read by two separate linear heads, an epithelioid (E) head and a non-epithelioid (NE) head, mirroring MesoGraph's two-head design. In addition to the learnable spatial temperature, a query-key content term (linear query and key projections of width 16 is added to the affinity logits, allowing neighbourhood weighting to depend on cell features as well as spatial distance.
C. Training and Model Selection
Following MesoGraph, both heads are trained jointly using the same pairwise margin ranking loss (margin 0.8): for every pair of cores in a batch with differing labels, the E head is pushed to rank the epithelioid core higher, and the NE head is pushed to rank the non-epithelioid core higher. Models are trained with Adam (learning rate , weight decay 0.02), batch size 16, for up to 300 epochs per fold. The final core-level decision score is the difference between the NE-head and E-head core outputs, , so the effective contribution of SAIL Head is (the per-head weights reported in Fig. 7); non-epithelioid cores are treated as the positive class for AUC/AP, matching the evaluation convention of Section V-F.
D. Statistical Comparison
To test whether SAIL's improvement in AUC is statistically significant, we draw 10,000 paired bootstrap resamples of the test cores. In each resample, the AUC of SAIL and of each comparison model is computed on the same resampled cores, giving a bootstrap distribution of the difference . The -value is the fraction of resamples in which .
TABLE X BASELINE SURVIVAL ASSOCIATIONS IN THE ORION COHORT USING INVERSE-DISTANCE SPATIAL WEIGHTING TO COMPUTE UNIVARIATE GLOBAL SPATIAL AUTOCORRELATION USING GEARY'S . FOR THE MULTIVARIATE CASE, WE REPORT THE MEAN OF THE UNIVARIATE SPATIAL AUTOCORRELATIONS ACROSS PROTEINS (MEAN AGGREGATE). RESULTS ARE ALSO COMPARED WITH IMMUNE GROUPS (IFM1–4) DEFINED IN THE ORIGINAL ORION STUDY.
| Covariate | C-Index | Log-rank -value | HR (high vs low) | RMST (low–high, days) |
|---|---|---|---|---|
| Mean aggregate | 0.68 | 0.04 | 3.15 | 362 |
| CD68 | 0.61 | 0.05 | 3.00 | 643 |
| CD4 | 0.69 | 0.13 | 2.28 | 385 |
| Grade | 0.61 | 0.13 | 2.20 | 393 |
| E-cadherin | 0.59 | 0.14 | 2.22 | 440 |
| CD3e | 0.63 | 0.15 | 2.18 | 460 |
| SMA | 0.63 | 0.21 | 2.00 | 428 |
| IFM4 | 0.58 | 0.24 | 0.51 | -296 |
| CD45RO | 0.61 | 0.25 | 1.88 | 386 |
| CD45 | 0.61 | 0.25 | 1.88 | 339 |
| IFM3 | 0.57 | 0.29 | 1.76 | 265 |
| Hoechst | 0.60 | 0.32 | 1.70 | 245 |
| CD8a | 0.60 | 0.37 | 1.62 | 197 |
| CD20 | 0.69 | 0.38 | 1.60 | 225 |
| Pan-CK | 0.67 | 0.39 | 1.58 | 170 |
| IFM2 | 0.56 | 0.40 | 0.58 | -209 |
| FOXP3 | 0.64 | 0.44 | 1.52 | 190 |
| CD163 | 0.56 | 0.49 | 0.69 | -210 |
| IFM1 | 0.53 | 0.63 | 0.75 | -61 |
| PD-1 | 0.54 | 0.66 | 1.27 | 154 |
| Ki67 | 0.51 | 0.72 | 0.82 | -101 |
| CD31 | 0.58 | 0.84 | 1.12 | 82 |
| PD-L1 | 0.50 | 0.99 | 1.01 | 30 |
TABLE XI BASELINE SURVIVAL ASSOCIATIONS IN THE BRAF-CRC COHORT USING INVERSE-DISTANCE SPATIAL WEIGHTING TO COMPUTE UNIVARIATE GLOBAL SPATIAL AUTOCORRELATION USING GEARY'S ON EACH ONE-HOT CELL-TYPE CHANNEL. THE MULTIVARIATE COVARIATE (MEAN AGGREGATE) CORRESPONDS TO THE MEAN OF THE UNIVARIATE CELL-TYPE SPATIAL AUTOCORRELATIONS.
| Covariate | C-Index | Log-rank -value | HR (high vs low) | RMST (low–high, months) |
|---|---|---|---|---|
| Mean aggregate | 0.59 | 0.01 | 1.58 | 10.4 |
| Endothelial cell | 0.58 | 0.02 | 1.57 | 11.8 |
| Lymphocyte | 0.59 | 0.06 | 1.42 | 7.2 |
| Cancer epithelial cell | 0.57 | 0.06 | 1.42 | 9.2 |
| Fibroblast | 0.57 | 0.07 | 1.41 | 7.5 |
| Normal epithelial cell | 0.55 | 0.26 | 1.23 | 0.9 |
| Neutrophil | 0.56 | 0.27 | 1.23 | 3.7 |
| Myocyte | 0.54 | 0.45 | 0.87 | -2.8 |
| Macrophage | 0.53 | 0.80 | 0.95 | -1.1 |
APPENDIX K
COMPUTATIONAL COMPLEXITY ANALYSIS
A. Empirical Computational Complexity Analysis
We measure the wall-clock time and peak GPU memory of SAIL as a function of: the number of nodes , the input feature dimension , the number of learned modes (projection dimension) , and the neighbourhood size . We further quantify the cost added by two optional components: the orthogonality (Stiefel) constraint on and a learned feature affinity .
B. Benchmark Design
a) Synthetic data: Node coordinates are drawn uniformly in a square of side . Node features are a rank-10 mixture of smooth random spatial fields (64 random Fourier features with length-scale equal to one eighth of the square side), linearly mixed into dimensions, perturbed with Gaussian noise (standard deviation 0.5), and standardised per feature. A -nearest-neighbour graph is built with a -d tree (excluding self-loops), and log-transformed neighbour distances are passed to the affinity module. Data are generated once per pair and shared across model variants and repeats.
b) Model variants: All runs use the unsupervised mode-learning configuration with the Moran-style local index (Eq. (7)), mean global reduction, a learnable spatial temperature , and decorrelation () and sparsity () regularisation, optimised with Adam (learning rate 0.05) on the full graph. To isolate the cost of each component we benchmark all 6 combinations of and :
-
linear : an unconstrained, column-normalised projection ;
-
orthogonal (default): W constrained to the Stiefel manifold, parametrised as the first columns of the matrix exponential of a skew-symmetric matrix; with the feature affinity,
-
none: , so that attention depends on spatial distance only (default);
-
shared-map: , reusing the learned projection;
-
query-key: , with learned 16-dimensional linear query and key projections.
c) Sweeps: Starting from a reference configuration of , , and , we vary one factor at a time with the others held at their reference values: , , and . If a variant exceeds GPU memory, this is recorded and larger values in that sweep are skipped for that variant.
C. Measurement Protocol
A training step comprises one forward pass over the full graph, evaluation of the objective and both regularisers, a backward pass, and an Adam update; since each benchmark uses a single graph, one step corresponds to one epoch. After 3 untimed warm-up steps (CUDA initialisation and kernel selection), we record 5 repeats, each timing 10 consecutive steps and reporting the mean time per step. The GPU is synchronised before and after every timed interval. Inference is timed as a single forward pass. Peak memory is the maximum memory allocated to tensors during the measurement, via torch.cuda.max_memory_allocated. We report means with standard deviation over repeats. Empirical scaling exponents (cost ) are least-squares slopes on log-log axes.
All benchmarks were run on a single NVIDIA A100-SXM4-80GB GPU in a DGX A100 node (AMD EPYC 7742 CPU, 2 TB RAM), using PyTorch 2.5.1 with CUDA 12.4, in FP32 arithmetic (TF32 disabled).
D. Results
For the default configuration (Supplementary Figure 14), time per training step is dominated by a fixed, -independent cost of 33–38 ms up to and reaches 132 ms at ; inference requires 3.9 ms at the reference size and 38 ms at . Peak memory grows linearly with (exponent 0.99), reaching 27 GB at ; exceeds the 80 GB GPU. The fixed cost is the matrix exponential of the orthogonal map: time per step grows approximately cubically with (exponent 2.91; 37 ms at and 30 s at ), whereas the linear map costs 6 ms at and 13 ms at (Supplementary Figure 15 a, d). The number of modes and neighbours have only a minor effect on runtime. Adding a learned affinity increases peak memory by approximately (13.0 versus 0.9 GB at the reference size; Supplementary Table XII), growing linearly with both and , which limits these variants to nodes
TABLE XII COMPUTATIONAL COST OF EACH SAIL VARIANT AT THE REFERENCE CONFIGURATION (, , , ) ON ONE NVIDIA A100-80GB GPU; MEAN STANDARD DEVIATION OVER 5 REPEATS. Max. IS THE LARGEST GRAPH SIZE IN THE SWEEP THAT FITTED IN GPU MEMORY.
| Train step (ms) | Inference (ms) | Peak mem. (GB) | Max. | ||
|---|---|---|---|---|---|
| Linear | none | 0.91 | |||
| Orthogonal | none | 0.92 | |||
| Linear | shared-map | 12.98 | |||
| Orthogonal | shared-map | 13.00 | |||
| Linear | query-key | 13.02 | |||
| Orthogonal | query-key | 13.03 |
on a single 80 GB GPU (Supplementary Figure 15 b, c, e, f). For reference, constructing the -nearest-neighbour graph on the CPU scaled approximately linearly in , taking 0.36 s at and 46 s at , and fitting the default model for 100 epochs at the reference size took 4.4 s.
Thus for the training step, the sparse top- model with a linear requires time for the projection, for the affinity-weighted local index and for the decorrelation penalty, with memory, dominated by the input features and the gathered neighbour projections. The orthogonal constraint adds an -independent term from the matrix exponential and memory. Both learned affinities gather the raw features of every neighbour, adding memory and time, where for the query-key affinity and for the shared-map affinity. All variants are therefore linear in in both time and memory; they differ in their dependence on .
APPENDIX L
RECOVERING CLASSICAL SPATIAL AUTOCORRELATION WITH SAIL IN ADDITIONAL SYNTHETIC DATASETS
Beyond analysis on the graphs with known spatial structure in Section V-A, we provide additional synthetic examples that qualitatively probe SAIL across a wider range of spatial structures.
Each 2D toy graph in Supplementary Figure 16a is built on a regular grid, connected via a 4-neighbour (rook-adjacency) edge set, with a single scalar feature per node designed to induce a specific, known spatial-autocorrelation regime. In each case, SAIL is trained on the single graph to learn mode maximising the mean of the Moran-style local index (Eq. (7)), using Adam with learning rate 0.05 for 50 epochs, an unconstrained (non-Stiefel) linear projection , and no learnable feature affinity (). LISA hotspot maps are computed as in Section III-D with a significance threshold of 0.05. The resulting graphs are shown in Supplementary Figure 16a.
a) Perlin field (top-left): Node values are drawn from a 2D Perlin noise field on a grid. This yields complex but strongly positive local spatial autocorrelation, since neighbouring lattice points inherit similar noise amplitudes.
b) Checkerboard (top-right): On a grid, each node is assigned a binary value based on the parity of its lattice indices, producing a sharply alternating high-contrast pattern in which every edge connects nodes of opposite value. This is the canonical negative-autocorrelation construction: every 4-neighbour pair is maximally dissimilar, so the expected Moran's I is strongly negative.
c) Plateau (bottom-left): On a grid over , node values are a two-level step function, splitting the domain in half along one axis. This produces clustered positive autocorrelation within each half of the domain, together with a sharp discontinuity at the dividing boundary, testing SAIL's ability to localise a hard spatial edge.
d) Concentric rings (bottom-right): On a grid over , node values follow a radial oscillation, , where is the distance from the domain centre. This produces a wave pattern that alternates between locally positive and locally negative spatial dependence as increases, giving concentric High–High and Low–Low rings.
e) 3D point-set terrain: To demonstrate that SAIL applies directly to point sets, we additionally generate a synthetic 3D terrain. A grid is sampled over and a height is assigned to each location via 2D Perlin noise, giving a smooth synthetic elevation surface. The height value is used both as the node's third spatial coordinate (each point is embedded in as , with z the Perlin height) and as the scalar node feature. This yields a point cloud of 40,000 points with no explicit edges: a k-nearest-neighbour graph ( ) is built directly from the 3D coordinates. SAIL is trained with a single mode, Moran-style objective, unconstrained linear projection, Adam, learning rate 0.05, 50 epochs. In Supplementary Figure 16b the resulting mode is visualised by jointly colouring points by their LISA cluster assignment and by the projected scalar field .
APPENDIX M ABLATION STUDY
To assess the contribution of each SAIL component, we perform an ablation study on four datasets: the 4i spatial proteomics dataset (Supplementary Table XIII), the cSCC PD-1/PD-L1 blockade cohort (Supplementary Table XIV), the TCGA-BRCA cohort (Supplementary Table XV), and the TCGA-CRC cohort (Supplementary Table XVI). In every case, 20 SAIL Modes are learned unsupervised as in Section III-C of the main paper, using the same default configuration. Each block of a table varies one component while holding all others at their default (marked ).
A. 4i Spatial Proteomics
For each of the 10 annotated subcellular regions we take the best Dice overlap over all modes and both High–High and Low–Low LISA clusters, and report the mean over regions.
Diversity regularisation ( ). The default gives the highest mean Dice (0.44), slightly above no decorrelation (0.42). Strong decorrelation degrades performance (0.36 at and 0.32 at ), consistent with the penalty over-constraining the projections at the expense of spatial coherence.
Sparsity regularisation ( ). Mean Dice is unchanged for (0.44) and decreases only slightly for stronger sparsity (0.42 and 0.41 at 10 and 100). Sparsity therefore improves the interpretability of the learned weights at little cost to region recovery.
Local activation ( ). Identity and ReLU give identical results (0.44), since local Geary's C values are non-negative and ReLU leaves them unchanged; a sigmoid gives a marginally lower score (0.43). We retain the identity as default to preserve the direct correspondence with classical statistics.
Reduction operator ( ). Mean and max reduction perform equally (0.44) and sum is marginally lower (0.43). Because this analysis uses a single graph, the reduction only rescales the objective and has little effect.
Projection parametrisation ( ). An unconstrained linear projection gives a higher mean Dice than the default Stiefel-constrained projection (0.47 vs. 0.44). Because the evaluation takes the best mode per region, it does not penalise redundant modes, and unconstrained projections can place several similar modes near the same compartment. We retain the orthogonality constraint as default because it yields distinct, non-redundant modes, which are easier to interpret.
Local statistic. Geary’s C and Moran’s I perform equally (0.44), whereas Getis–Ord is substantially lower (0.32). This is consistent with measuring the concentration of high or low values rather than the similarity between neighbouring nodes, which is less suited to delineating compartments.
Feature-based affinity ( ). Adding a learnable feature-based affinity reduces mean Dice, both for the query-key variant (0.33) and for the shared- variant (0.36). In the unsupervised setting, a feature-dependent affinity can increase measured coherence by down-weighting dissimilar neighbours rather than by finding coherent projections.
Temperature, neighbourhood size and learning rate. Learning and fixing give the same mean Dice (0.44), indicating that on this single, densely sampled graph the graph already fixes the relevant spatial scale. Results are also robust to the neighbourhood size (0.43–0.44 for ) and to the learning rate (0.43–0.45 for ).
B. cSCC PD-1/PD-L1 Blockade Response
For each setting we report the mode that best separates responders from non-responders, with a subject-level bootstrap 95% confidence interval and the Mann–Whitney p-value.
The default configuration gives an AUC of 0.86 ( ). As on 4i, strong decorrelation ( : 0.75 and 0.78), a learned feature affinity (query-key 0.80, shared- 0.75) and sum reduction (0.74) give the largest drops. Sum reduction confounds SAC with the number of cells per patient, which varies across patients in this multi-graph setting, whereas mean and max reduction perform equally (0.86). Unlike on 4i, fixing lowers performance (0.79 vs. 0.86), indicating that learning the spatial scale matters when graphs are analysed jointly. All three local statistics perform similarly (0.84–0.86), as do the Stiefel and unconstrained projections (0.86 vs. 0.84). Larger neighbourhoods improve discrimination, from 0.79 at to 0.91 at .
C. TCGA-BRCA Survival
For each setting we report the mode with the highest orientation-free C-Index, , together with the log-rank -value and (10-year horizon) of a median split on that mode's score.
The best-mode C-Index is stable across settings (0.57–0.67), with most configurations between 0.60 and 0.65 and the default at 0.64 (, days). Removing decorrelation () and max reduction give the highest C-Index (0.67), whereas strong decorrelation () loses significant separation ( and 0.12). Consistent with the other datasets, Getis–Ord (0.57, ) and the shared- affinity (0.60, ) are the weakest variants, Geary's and Moran's perform equally (0.64), and fixing removes significant separation (). The query-key affinity matches the default C-Index (0.64) with a slightly stronger split (, days).
D. TCGA-CRC Survival
As for TCGA-BRCA, for each setting we report the mode with the highest orientation-free C-Index, together with the log-rank -value and (10-year horizon) of a median split on that mode's score.
The best-mode C-Index varies little across settings (0.57–0.63), with the default at 0.60 (, days). Consistent with the other cohorts, strong decorrelation lowers the C-Index (0.57 at ) and Getis–Ord is the weakest local statistic (0.58, ), while Geary's and Moran's perform similarly (0.60 and 0.61). Unlike on 4i and the cSCC cohort, both learned feature affinities slightly improve the C-Index (query–key and shared-: 0.63), as do smaller neighbourhoods (: 0.63). Fixing has little effect on this cohort (0.59 vs. 0.60).
E. Summary
Across the cohorts we see that strong decorrelation () degrades performance; Geary's and Moran's perform similarly, whereas Getis–Ord is substantially worse for region recovery and survival. Learning the spatial temperature has little effect on the single 4i graph and on TCGA-CRC, but improves performance on the cSCC and TCGA-BRCA cohorts. The effect of a learned feature affinity is dataset-dependent: it reduces performance on 4i and the cSCC cohort but slightly improves the C-Index on TCGA-CRC.
APPENDIX N
ANALYSIS OF SPATIAL COHERENCE OF MACROECONOMIC TEMPORAL GEOSPATIAL DATA
In this section we illustrate SAIL's generality on multivariate, spatio-temporal macroeconomic data.
TABLE XIII ABLATION STUDY OF SAIL COMPONENTS ON THE 4I DATASET (SUPPLEMENTARY SECTION M). FOR EACH SETTING WE REPORT THE BEST DICE PER SUBCELLULAR REGION (MAXIMUM OVER THE 20 MODES AND HIGH-HIGH/LOW-LOW LISA CLUSTERS), AVERAGED OVER THE 10 REGIONS. EACH BLOCK VARIES ONE COMPONENT WHILE HOLDING ALL OTHERS AT THEIR DEFAULT SETTING (INDICATED VIA ).
| Category | Setting | Mean Dice |
|---|---|---|
| 0 | 0.42 | |
| 0.44 | ||
| 5 | 0.42 | |
| 10 | 0.36 | |
| 100 | 0.32 | |
| 0 | 0.44 | |
| 0.1 | 0.44 | |
| 0.44 | ||
| 10 | 0.42 | |
| 100 | 0.41 | |
| 0.44 | ||
| ReLU | 0.44 | |
| Sigmoid | 0.43 | |
| 0.44 | ||
| Max | 0.44 | |
| Sum | 0.43 | |
| 0.44 | ||
| Unconstrained | 0.47 | |
| Statistic | Geary's | 0.44 |
| Moran's I | 0.44 | |
| Getis-Ord | 0.32 | |
| 0.44 | ||
| Query-key | 0.33 | |
| Shared | 0.36 | |
| 0.44 | ||
| Not learnable (= 1) | 0.44 | |
| 8 | 0.43 | |
| 16 | 0.44 | |
| 0.44 | ||
| 64 | 0.44 | |
| Learning rate | 0.01 | 0.43 |
| 0.44 | ||
| 0.1 | 0.45 |
A. Data Source and Cleaning
We use the Global Macro Database [4], an annual panel of macroeconomic indicators across a wide range of countries (239). Prior to analysis we exclude: (i) forecast-provenance flags, which mark IMF-style projections rather than constituting data themselves; (ii) binary crisis dummies (sovereign debt, currency, and banking crises); (iii) indicators denominated in local-currency levels (nominal/real GDP, consumption, government debt, money aggregates M0–M4), which are not comparable across countries and are further subject to abrupt redenomination jumps (e.g. Venezuela in 2018, Bolivia in 1985); and (iv) the raw exchange-rate level, which is likewise an arbitrary local-currency-per-USD unit. USD-denominated levels, %-of-GDP ratios, rates, and index-based indicators are retained. The panel is restricted to 2000–2023 and balanced on a 32-variable subset selected by greedy forward search to maximise complete country coverage across all years; at this cutoff, 162 countries have complete data for
TABLE XIV ABLATION STUDY OF SAIL COMPONENTS ON THE CSCC PD-1/PD-L1 BLOCKADE COHORT. FOR EACH SETTING, WE REPORT THE MODE THAT BEST SEPARATES RESPONDERS FROM NON-RESPONDERS (HIGHEST AUC OVER THE 20 MODES): ITS AUC WITH A 95% BOOTSTRAP CONFIDENCE INTERVAL (PATIENTS RESAMPLED WITH REPLACEMENT, 10,000 RESAMPLES) AND THE MANN–WHITNEY p-VALUE. EACH BLOCK VARIES ONE COMPONENT WHILE HOLDING ALL OTHERS AT THEIR DEFAULT SETTING (INDICATED VIA †).
| Category | Setting | AUC (95% CI) | p-value |
|---|---|---|---|
| 0 | 0.84 (0.62–1.00) | 0.010 | |
| 0.86 (0.64–1.00) | 0.005 | ||
| 5 | 0.82 (0.60–0.98) | 0.015 | |
| 10 | 0.75 (0.49–0.95) | 0.062 | |
| 100 | 0.78 (0.55–0.96) | 0.032 | |
| 0 | 0.84 (0.63–0.99) | 0.010 | |
| 0.1 | 0.82 (0.60–0.98) | 0.015 | |
| 0.86 (0.64–1.00) | 0.005 | ||
| 10 | 0.82 (0.58–1.00) | 0.015 | |
| 100 | 0.80 (0.55–1.00) | 0.022 | |
| 0.86 (0.64–1.00) | 0.005 | ||
| ReLU | 0.83 (0.61–1.00) | 0.012 | |
| Sigmoid | 0.80 (0.57–0.96) | 0.022 | |
| 0.86 (0.64–1.00) | 0.005 | ||
| Max | 0.86 (0.66–1.00) | 0.005 | |
| Sum | 0.74 (0.49–0.94) | 0.073 | |
| 0.86 (0.64–1.00) | 0.005 | ||
| Unconstrained | 0.84 (0.63–0.98) | 0.010 | |
| Statistic | Geary's | 0.86 (0.64–1.00) | 0.005 |
| Moran's | 0.84 (0.61–1.00) | 0.010 | |
| Getis-Ord | 0.84 (0.62–0.99) | 0.010 | |
| 0.86 (0.64–1.00) | 0.005 | ||
| Query-key | 0.80 (0.57–0.96) | 0.022 | |
| Shared | 0.75 (0.50–0.95) | 0.062 | |
| 0.86 (0.64–1.00) | 0.005 | ||
| Not learnable (= 1) | 0.79 (0.56–0.97) | 0.027 | |
| 8 | 0.79 (0.56–0.96) | 0.027 | |
| 16 | 0.81 (0.56–1.00) | 0.018 | |
| 0.86 (0.64–1.00) | 0.005 | ||
| 64 | 0.91 (0.75–1.00) | 0.002 | |
| Learning rate | 0.01 | 0.83 (0.62–0.98) | 0.012 |
| 0.86 (0.64–1.00) | 0.005 | ||
| 0.1 | 0.84 (0.63–0.98) | 0.010 |
every year in the range.
B. Feature Set
From the cleaned panel we select 25 cross-country-comparable indicators spanning output and prices (nominal/real GDP, GDP per capita, population, inflation), consumption (total, household, and government, as USD levels and % of GDP), investment (total and fixed, USD and % GDP), external accounts (exports, imports, current account, USD and % GDP), and government finance (expenditure, revenue, deficit, and debt, all % GDP). Each feature is z-scored across all country-years in the analysis window prior to modelling.
C. Graph Construction
One spatial graph is constructed per calendar year, with nodes corresponding to countries. Node coordinates are country centroids obtained from Natural Earth (110 m boundaries);
TABLE XV ABLATION STUDY OF SAIL COMPONENTS ON THE TCGA-BRCA COHORT (498 PATIENTS; SUPPLEMENTARY SECTION M). FOR EACH SETTING WE REPORT THE SAIL MODE WITH THE HIGHEST C-INDEX; PATIENTS ARE SPLIT INTO HIGH/LOW GROUPS VIA A MEDIAN SPLIT ON THAT MODE'S SCORE, AND WE REPORT THE LOG-RANK p-VALUE AND RMST (DAYS, 10-YEAR HORIZON) BETWEEN GROUPS. EACH BLOCK VARIES ONE COMPONENT WHILE HOLDING ALL OTHERS AT THEIR DEFAULT SETTING (INDICATED VIA †).
| Category | Setting | C-Index | p-value | RMST |
|---|---|---|---|---|
| 0 | 0.67 | 0.001 | 365 | |
| 0.64 | 0.005 | 386 | ||
| 5 | 0.60 | 0.046 | 243 | |
| 10 | 0.60 | 0.464 | 96 | |
| 100 | 0.60 | 0.123 | 188 | |
| 0 | 0.62 | 0.020 | 347 | |
| 0.1 | 0.65 | 0.032 | 315 | |
| 0.64 | 0.005 | 386 | ||
| 10 | 0.65 | <0.001 | 464 | |
| 100 | 0.64 | 0.044 | 159 | |
| 0.64 | 0.005 | 386 | ||
| ReLU | 0.63 | 0.012 | 369 | |
| Sigmoid | 0.59 | 0.092 | 182 | |
| 0.64 | 0.005 | 386 | ||
| Max | 0.67 | 0.002 | 313 | |
| Sum | 0.64 | 0.008 | 356 | |
| 0.64 | 0.005 | 386 | ||
| Unconstrained | 0.62 | 0.017 | 364 | |
| Statistic | Geary's | 0.64 | 0.005 | 386 |
| Moran's | 0.64 | 0.009 | 379 | |
| Getis-Ord | 0.57 | 0.227 | 182 | |
| 0.64 | 0.005 | 386 | ||
| Query-key | 0.64 | 0.001 | 421 | |
| Shared | 0.60 | 0.312 | 174 | |
| 0.64 | 0.005 | 386 | ||
| Not learnable (= 1) | 0.61 | 0.210 | 220 | |
| 8 | 0.64 | 0.004 | 394 | |
| 16 | 0.62 | 0.090 | 293 | |
| 0.64 | 0.005 | 386 | ||
| 64 | 0.64 | 0.011 | 362 | |
| Learning rate | 0.01 | 0.63 | 0.111 | 256 |
| 0.64 | 0.005 | 386 | ||
| 0.1 | 0.61 | <0.001 | 490 |
joining these to the cleaned panel drops a further 17 countries lacking a matching polygon (small island states, together with Singapore, Malta, Bahrain, and Mauritius), leaving 145 countries in every yearly graph. Edges are defined via great-circle k-nearest-neighbour search () using a haversine-distance ball tree, with raw (non-log-transformed) angular distances passed to SAIL's affinity module.
D. Training Configuration
A single shared set of 8 SAIL Modes is learned jointly across all yearly graphs (batch size 1, iterating over all years per epoch), so that a given mode retains a consistent interpretation across the full 2000–2023 window. Modes are optimised in the unsupervised configuration (Section III-C), minimising a Geary-style global spatial autocorrelation objective under a Stiefel-manifold-constrained linear projection, with decorrelation () and sparsity () regularisation.
TABLE XVI ABLATION STUDY OF SAIL COMPONENTS ON THE TCGA-CRC COHORT (558 PATIENTS; SUPPLEMENTARY SECTION M). FOR EACH SETTING WE REPORT THE SAIL MODE WITH THE HIGHEST C-INDEX; PATIENTS ARE SPLIT INTO HIGH/LOW GROUPS VIA A MEDIAN SPLIT ON THAT MODE'S SCORE, AND WE REPORT THE LOG-RANK -VALUE AND RMST (DAYS, 10-YEAR HORIZON) BETWEEN GROUPS. EACH BLOCK VARIES ONE COMPONENT WHILE HOLDING ALL OTHERS AT THEIR DEFAULT SETTING (INDICATED VIA ).
| Category | Setting | C-Index | p-value | ΔRMST |
|---|---|---|---|---|
| 0 | 0.61 | 0.015 | 474 | |
| 0.60 | 0.057 | 653 | ||
| 5 | 0.60 | 0.091 | 178 | |
| 10 | 0.57 | 0.320 | 112 | |
| 100 | 0.57 | 0.021 | 373 | |
| 0 | 0.60 | 0.002 | 807 | |
| 0.1 | 0.60 | 0.032 | 634 | |
| 0.60 | 0.057 | 653 | ||
| 10 | 0.62 | 0.009 | 389 | |
| 100 | 0.59 | 0.006 | 554 | |
| 0.60 | 0.057 | 653 | ||
| ReLU | 0.60 | 0.057 | 653 | |
| Sigmoid | 0.62 | 0.059 | 184 | |
| 0.60 | 0.057 | 653 | ||
| Max | 0.62 | 0.009 | 313 | |
| Sum | 0.59 | 0.018 | 381 | |
| 0.60 | 0.057 | 653 | ||
| Unconstrained | 0.62 | <0.001 | 870 | |
| Statistic | Geary's | 0.60 | 0.057 | 653 |
| Moran's | 0.61 | 0.012 | 645 | |
| Getis-Ord | 0.58 | 0.203 | 152 | |
| 0.60 | 0.057 | 653 | ||
| Query-key | 0.63 | 0.029 | 367 | |
| Shared | 0.63 | 0.009 | 485 | |
| 0.60 | 0.057 | 653 | ||
| Not learnable (= 1) | 0.59 | 0.034 | 673 | |
| 8 | 0.63 | <0.001 | 218 | |
| 16 | 0.63 | <0.001 | 635 | |
| 0.60 | 0.057 | 653 | ||
| 64 | 0.60 | 0.006 | 591 | |
| Learning rate | 0.01 | 0.61 | 0.001 | 607 |
| 0.60 | 0.057 | 653 | ||
| 0.1 | 0.60 | <0.001 | 820 |
Training uses Adam (learning rate 0.05) for 1000 epochs. For each mode and year we record the global SAIL score (the spatial autocorrelation of that mode's projected field on that year's country graph), the per-country projected field ( score), and per-country LISA cluster assignments, supporting both the cross-sectional (mode loadings and country rankings) and longitudinal (spatio-temporal trend) analyses.
E. Results
SAIL discovers 8 modes of cross-country spatial coherence, each defined by a sparse combination of a few indicators (Supplementary Figure 17). Three broad groups of indicators recur across modes. The first is external trade (exports, imports and the current account; Modes 1, 2, 4 and 8). The second is government finance (expenditure, consumption, revenue and debt as a share of GDP; Modes 3, 5 and 6). The third is overall economic size (real or nominal GDP and GDP per capita; Modes 1, 7 and 8). Several modes contrast two related quantities, for example exports against household consumption (Mode 2), imports against total consumption (Mode 4), government debt against revenue (Mode 5) and government expenditure against government consumption (Mode 6). The learned scalar fields therefore capture relative economic structure rather than any single indicator.
Because one shared set of modes is learned across all years, the global SAIL score of each mode can be tracked from 2000 to 2023 (Supplementary Figure 18); lower values indicate that neighbouring countries are more alike along that mode. Some modes are largely stable over time: Modes 1 and 7 remain close to 0.50 and 0.65, respectively, throughout the period, indicating a persistent level of regional similarity. Others change gradually. For example, Mode 4 declines steadily until 2019 before rising again, and Mode 8, the least spatially coherent mode overall, falls until around 2012 and then rises. A third group shows sharp, short-lived changes. Mode 2 decreases from 0.65 to 0.45 between 2000 and 2008 before rising abruptly in 2009, coinciding with the global financial crisis. Mode 5, which contrasts government debt with revenue, peaks in 2020–2021, coinciding with the COVID-19 pandemic.
APPENDIX O
GEOSPATIAL TEMPORAL ANALYSIS: COVID-19 CASE TRENDS
A. Data Source and Preprocessing
We use the Our World in Data (OWID) COVID-19 dataset [5], taking new confirmed cases per million people as the node feature. Daily records are aggregated to weekly means per country, yielding one value per country per calendar week spanning January 2020 to May 2023. Country codes are matched against Natural Earth (110 m) administrative boundaries to obtain a fixed geographic reference frame; any week for which one or more matched countries have a missing value is dropped.
B. Graph Construction
Nodes correspond to countries, with coordinates given by country polygon centroids (latitude/longitude) from the matched shapefile. For each weekly snapshot, a -nearest-neighbour graph ( ) is built directly from country coordinates using great-circle (haversine) distance via a ball tree. The single node feature per week is the country's weekly per-million case count.
C. Results
In Supplementary Figure 19, tracking the global Moran's I score across all retained weeks reveals substantial temporal variation, with several distinct peaks corresponding to periods of strong spatial synchronisation in case growth across neighbouring countries. Examining the LISA cluster maps over time, Supplementary Figure 20, shows that High–High hotspots recur disproportionately in Western and Central Europe across multiple waves, suggesting a persistent geographic pattern of regionally synchronised outbreaks rather than isolated, one-off events.
This further illustrates that SAIL’s spatial autocorrelation computation extends directly to real-world, non-biological spatio-temporal data.
APPENDIX P
SPATIAL COHERENCE OF MIXING GASES
To show that SAIL applies to physical systems whose state is defined by spatial coherence, we use it to follow the mixing of two gases by diffusion. Their initial separation is a state of maximal spatial autocorrelation in gas identity, and mixing removes it.
A. Dataset Setup
We simulate a two-dimensional hard-disc gas of 600 equal-mass particles (radius 4) in a box, using simulation units for length and seconds for time. At , 300 particles of species A ( ) fill the left half and 300 particles of species B ( ) fill the right half. The two halves are separated by a vertical partition at the centre of the box, and particles are placed on a jittered grid with a 20-unit empty margin at the walls and the partition. Initial velocities follow a two-dimensional Maxwell–Boltzmann distribution with a root-mean-square speed of 100, identical for both species. Particles move ballistically, and all particle–particle, particle–wall and particle–partition collisions are perfectly elastic. The equations of motion are integrated with time step s, sub-stepped so that no particle moves more than 0.75 radii per sub-step, for 80 s. A snapshot is recorded every 0.24 s. We consider three scenarios that differ only in what happens to the partition at :
• Partition closed (control): the partition remains, so the gases cannot mix;
• Small hole: a 120-unit opening is made at the centre of the partition;
• Partition removed: the partition is removed entirely.
The partition is purely geometric and never interacts with species identity. Each scenario is simulated with 5 independent random seeds, and a separate run of the partition-removed scenario, with its own seed, is reserved for training SAIL.
B. Graph Construction and SAIL Model
Each snapshot is a spatial graph whose nodes are particles, connected by nearest-neighbour edges built from particle positions, with log-transformed neighbour distances passed to the affinity module. The node feature vector is , comprising species identity, particle speed and four nuisance features , drawn independently per particle and snapshot. Each feature is standardised within each snapshot. Because both species start at the same temperature, speed carries no spatial information, so species identity is the only spatially autocorrelated feature.
SAIL is trained unsupervised (Section III-C) to learn a single mode that maximises the Moran-style local index (Eq. (7)), using an unconstrained linear , mean global reduction, a learnable spatial temperature , no learned feature affinity, and . The trained mode is then frozen and applied to every snapshot of the 15 evaluation runs. LISA cluster maps are computed as in Section III-D.
C. Results
SAIL learns a mode that loads almost entirely on species identity (loading 1.00), with negligible weight on speed (0.01) and on all four nuisance features ( ; Supplementary Figure 21 i), and a learned spatial temperature of . Without supervision, it therefore identifies the one spatially coherent physical quantity in the system and ignores features that vary across snapshots without spatial structure.
At the gases are fully separated and the score is 0.999 in every run. With the partition closed, it stays close to its initial value throughout at s; mean standard deviation over 5 seeds). When the partition is removed, the score decays rapidly: it reaches at s, halves after 12.2 s and approaches zero by the end of the simulation at s). With a small hole, mixing is limited by the flux through the opening and the decay is slower: the score is at s, halves after 33.4 s and is still at s.
The LISA maps show where the remaining spatial coherence lies (Supplementary Figure 21 iii). At early times, the two halves of the box form large High–High and Low–Low clusters. As mixing proceeds, these clusters shrink back from the partition towards the outer walls, and the intermixed central region becomes non-significant. With a small hole, mixing starts as a localised plume around the opening while the rest of the box stays clustered; with the partition closed, the two clusters persist throughout.
APPENDIX Q SAIL LIMITATIONS
SAIL is designed for problems in which the target depends on spatial autocorrelation, and its inductive bias should not be expected to help when it does not. In this section we characterise both regimes: the class of problems on which SAIL is expected to outperform classical message-passing architectures, and the class on which it is not.
A. Problem class where SAIL is optimal
The synthetic benchmark of Supplementary Section F is, by construction, aligned with spatial autocorrelation. A natural question is therefore how much of the target must be spatially determined for SAIL to retain its advantage. To answer this, we make the alignment an explicit, controllable parameter. We show that SAIL's advantage is confined to the spatial-autocorrelation regime and disappears when the target depends on feature content alone (Supplementary Figure 22).
Specifically, we blend the spatial target with a purely content-based target and sweep the mixing weight . For each graph, we compute two scalars:
• Spatial component : the Moran’s I of the hidden random projection on the hidden neighbourhood, exactly as in Supplementary Section F-A.
TABLE XVII
PER-MODEL RESULTS ON THE SYNTHETIC MORAN'S REGRESSION BENCHMARK. EACH MODEL IS EVALUATED AT ITS STAGE-1-SELECTED CONFIGURATION OVER 1000 SEEDS; WE REPORT THE MEAN STANDARD DEVIATION OF TEST PEARSON AND MSE. ROWS ARE ORDERED BY DESCENDING PEARSON CORRELATION.
| Model | #Params | Pearson | MSE |
|---|---|---|---|
| SAIL (dense) | 82 | ||
| GCN (X, FC) | 81 | ||
| GCN (X+coords, FC) | 193 | ||
| GAT (X, FC) | 353 | ||
| GAT (X+coords, FC) | 785 | ||
| MLP (X) | 321 | ||
| MLP (X+coords) | 97 |
- Content component : a coordinate-free second moment of the features,
where is the per-graph feature covariance and is a fixed unit direction, held constant across all graphs, splits and seeds. Because is permutation-invariant and carries no spatial information, it can be recovered by a node-wise MLP with mean pooling, as well as by GCN and GAT.
Each component is standardised to zero mean and unit variance using statistics from the training split only, so that mixes two quantities on a comparable scale. The regression target is the convex combination
where denotes a train-standardised component. At the target is pure spatial autocorrelation; at it is pure feature content.
We compare SAIL against GCN and GAT on the fully connected graph with node coordinates concatenated to the features, and against a node-wise MLP with coordinates. All models use a hidden width of 32 (with 2 heads for attention) and share the optimiser, learning rate, early-stopping criterion and data splits of Supplementary Section F. We sweep over 10 seeds and report the mean test Pearson correlation as a function of .
B. Results
Supplementary Figure 22 and Supplementary Table XVIII summarise the results. At , SAIL achieves the highest Pearson correlation , ahead of GCN , GAT and the coordinate-augmented MLP . This is consistent with Theorem IV.2: SAIL explicitly contains the quadratic interactions that define the target. As increases, SAIL's correlation declines monotonically to at . At that point the target
TABLE XVIII
SPATIAL-VERSUS-CONTENT BLEND ABLATION. MEAN TEST PEARSON CORRELATION (SUBSCRIPT: STANDARD DEVIATION OVER 10 SEEDS) AS THE TARGET SHIFTS FROM PURE SPATIAL AUTOCORRELATION () TO PURE FEATURE CONTENT (). GCN, GAT AND MLP USE NODE COORDINATES (X+COORDS), AND THE GNNs USE THE FULLY CONNECTED GRAPH (FC). SAIL IS STRONGEST AT AND DEGRADES MONOTONICALLY AS THE TARGET LOSES ITS SPATIAL COMPONENT, WHILE THE CONTENT-RECOVERABLE BASELINES IMPROVE. THE BEST MODEL PER ROW IS IN BOLD, WITH A CLEAR CROSSOVER NEAR .
| SAIL | GCN | GAT | MLP | |
|---|---|---|---|---|
| 0.00 | ||||
| 0.15 | ||||
| 0.30 | ||||
| 0.50 | ||||
| 0.70 | ||||
| 0.85 | ||||
| 1.00 |
: spatial autocorrelation feature content
is fully determined by feature content and is recovered almost perfectly by the MLP and GAT . The models cross over between and 0.5: GCN leads at , and the content-based models dominate thereafter.
These results show that SAIL's advantage comes from its match to targets governed by spatial autocorrelation, rather than from a general modelling benefit. They also give an empirical illustration of the problem class of Theorem IV.2. When the target is driven by spatial autocorrelation, SAIL is the appropriate tool. When it is driven mainly by feature content, standard message passing or node-wise models are preferable.
REFERENCES
[1] S. Dray, S. Saïd, and F. Débias, “Spatial ordination of vegetation data using a generalization of wartenberg’s multivariate spatial correlation,” Journal of vegetation science, vol. 19, no. 1, pp. 45–56, 2008.
[2] D. DeTomaso and N. Yosef, “Hotspot identifies informative gene modules across modalities of single-cell genomics,” Cell systems, vol. 12, no. 5, pp. 446–456, 2021.
[3] N. Trahearn, C. Sakr, A. Banerjee, S. H. Lee, A.-M. Baker, H. M. Kocher, V. Angerilli, F. Morano, F. Bergamo, G. Maddalena et al., “Computational pathology applied to clinical colorectal cancer cohorts identifies immune and endothelial cell spatial patterns predictive of outcome,” The Journal of Pathology, vol. 265, no. 2, pp. 198–210, 2025.
[4] K. Müller, C. Xu, M. Lehbib, and Z. Chen, “The global macro database: A new international macroeconomic dataset,” National Bureau of Economic Research, Tech. Rep., 2025.
[5] B. Dutta, P. Das, S. Mitra et al., “A survey and classification of publicly available covid-19 datasets,” Annals of Library and Information Studies (ALIS), vol. 69, no. 3, pp. 208–220, 2022.

Fig. 9. All 43 proteins in the 4i dataset. For each protein we show its localised expression, to help understand its expected spatial distribution and how it contributes to SAIL Modes that overlap with known subcellular compartments. We also show the ground-truth annotation masks for all compartments.

Fig. 10. Gene weights defining all 20 unsupervised SAIL Modes learned on the cSCC PD-1/PD-L1 CosMx cohort. For each mode, bars show the top genes by absolute loading in the learned projection, with positively and negatively weighted genes coloured separately; these weights specify the gene combination whose spatial Geary-style dissimilarity each mode minimises.

Fig. 11. Unsupervised SAIL Modes link spatial coherence to clinical outcome. A SAIL Mode was identified in the BRAF-CRC cohort by minimising Geary's C over one-hot encoded cell types (cancer epithelial cells, normal epithelial cells, fibroblasts, lymphocytes, neutrophils, macrophages, endothelial cells, and myocytes). The bar chart shows the learned weights assigned to each cell type. Global SAIL scores derived from this mode stratify patients into distinct survival groups.
TCGA-BRCA

LISA Clusters
High-High
Low-Low
Non-Sig
High-Low
Low-High
Projected
0
1
TCGA-CRC
H&E
LISA
2
3
4
(a)
BRAF-CRC

LISA Clusters
High-High
Low-Low
Non-Sig
High-Low
Low-High
Projected
0
1
ORION-CRC
H&E
LISA
2
3
4
(b)
Fig. 12. Zoomed-in regions of SAIL outputs. (a) Patch graphs for TCGA-BRCA and TCGA-CRC. We show two zoomed-in regions per patient, including the score and LISA clusters for each graph node. (b) Cell graphs for BRAF-CRC and ORION-CRC. We show two zoomed-in regions per patient, including the score and LISA clusters for each graph node.
Head 1 (net weight +0.38)

Head 2 (net weight +0.26)
Head 3 (net weight -0.39)

Head 4 (net weight +0.21)

Head 5 (net weight -0.19)

Head 6 (net weight +0.25)
Head 7 (net weight +0.54)

Head 8 (net weight -0.23)
Head 9 (net weight +0.01)

Head 10 (net weight -0.37)

Head 11 (net weight +0.57)

Head 12 (net weight +0.46)

Head 13 (net weight +0.33)

Head 14 (net weight -0.49)
Head 15 (net weight -0.32)
Head 16 (net weight +0.23)
Positive loading
Negative loading
Fig. 13. 16 learned SAC descriptors (trained using interpretable features) on the mesothelioma dataset used in Section J. For each descriptor we report the three features with the most positive and negative loadings. Here “nbhd” denotes a 50 m neighbourhood average.
a

b

C
d

e

Fig. 14. Computational scaling of SAIL in its default configuration (orthogonal , no learned feature affinity, Moran-style objective with decorrelation and sparsity regularisation) on synthetic spatial data (Supplementary Section K-B). Each panel varies one factor with the others held at nodes, features, modes and neighbours. Train step: one full-graph forward pass, backward pass and Adam update (one epoch); Inference: one forward pass of the trained model. (a) Runtime versus number of nodes : a fixed, -independent cost dominates up to . (b) Runtime versus feature dimension : training time grows approximately as , owing to the matrix exponential of the Stiefel parametrisation, while inference is essentially independent of . (c) Runtime versus number of modes and (d) versus neighbourhood size : both have only a minor effect. (e) Peak GPU memory versus grows linearly. The dashed line marks GPU capacity (NVIDIA A100, 80GB); marks the first size that did not fit, joined by a dotted line to the largest size that did. Points are means over 5 repeats with standard deviation bands; legend exponents are log-log least-squares slopes. All axes are logarithmic.
a

b
C

d

e
f

out of GPU memory (A100, dotted = last fitting size) --- GPU capacity
Fig. 15. Computational cost of SAIL's optional components. Top row (a–c): linear ; bottom row (d–f): orthogonal (Stiefel) , the default. Colours denote the feature affinity : none (blue; attention from spatial distance only), shared-map (orange) and query-key (green) (Supplementary Section K-B). Other factors are held at , , , . (a, d) Time per training step versus feature dimension : nearly flat with the linear map, approximately cubic with the orthogonal map. (b, e) Peak GPU memory versus number of nodes : linear for all variants, but both learned affinities require approximately more memory, because they gather the -dimensional features of every neighbour ( ), and therefore exceed GPU memory at . (c, f) Peak GPU memory versus neighbourhood size : linear in for the learned affinities. The shared-map and query-key affinities have near-identical memory (and near-identical runtime with the linear map), since both are dominated by the same neighbour-feature gather; the shared-map curve is drawn wider underneath so that both remain visible. marks the first configuration that did not fit in GPU memory. The dashed line marks GPU capacity. Means over 5 repeats with standard deviation bands; all axes are logarithmic.
Perlin Noise
Checkerboard

Plateau
Concentric Rings

(a)

(b)
Fig. 16. Additional synthetic tests of SAIL. (a) Toy graph examples, coloured by both LISA clusters and the projected scalar field . Top-left: a smooth, organically varying spatial field generated with Perlin noise, designed to produce complex but strongly positive local spatial autocorrelation. Top-right: a checkerboard graph with a sharply alternating high-contrast pattern that induces strong negative spatial autocorrelation through repeated adjacent sign flipping. Bottom-left: a plateau graph with a two-level step surface with an abrupt spatial boundary, producing clustered positive autocorrelation within each region and a sharp discontinuity at the divide. Bottom-right: concentric rings with an oscillating radial wave pattern that alternates between positive and negative spatial dependence as distance increases from the centre. (b) A synthetic 3D point set, coloured by both LISA clusters and the projected scalar field . It is generated by sampling a grid and assigning heights using 2D Perlin noise, giving a smooth synthetic terrain; the resulting 40,000 points are used to build a k-nearest-neighbour graph for SAIL analysis.
SAIL Mode 1
loading weight

SAIL Mode 2
loading weight
SAIL Mode 3
loading weight

SAIL Mode 4
loading weight
SAIL Mode 5
loading weight

SAIL Mode 6
loading weight
SAIL Mode 7
loading weight

SAIL Mode 8
loading weight

Fig. 17. All 8 SAIL Modes learned on the Global Macro Database. For each mode, bars show the top macroeconomic indicators by absolute loading in the learned projection, with positively and negatively weighted indicators coloured separately; these weights specify the indicator combination whose spatial Geary-style dissimilarity each mode minimises.
SAIL Mode 1

SAIL Mode 3
SAIL Mode 2

SAIL Mode 4
SAIL Mode 5
SAIL Mode 6
SAIL Mode 7
SAIL Mode 8

year

year
Fig. 18. Temporal trends of all 8 SAIL Modes learned on the Global Macro Database. For each mode, the line shows the global Geary-style SAIL score of the mode's projected field on each yearly country graph from 2000 to 2023; lower values indicate that neighbouring countries are more similar along that mode.
Moran's I of Weekly COVID-19 Cases (per Capita)

Fig. 19. Unsupervised SAIL for COVID-19 trend analysis. Here we show a line graph that reports the global Moran's I of new COVID-19 cases (y-axis) against a given week (x-axis).
LISA Clusters (16/03/2020)

LISA Clusters (22/11/2021)

LISA Clusters (03/10/2022)
Fig. 20. A choropleth map for the world coloured by LISA clustering. Interestingly, we notice that across time, COVID-19 hotspots tend to form in Western and Central European countries, reflecting a consistent pattern of spatially concentrated High–High clusters and regional synchronisation of outbreaks.
i)

ii)
iii)
Fig. 21. SAIL tracks the mixing of two gases. (i) Loadings of the single SAIL Mode learned on a training run, over species identity, particle speed and four nuisance noise features. (ii) SAIL score over time (seconds) for the three scenarios (partition closed, small hole, partition removed); lines show the mean and shaded bands standard deviation over 5 seeds. (iii) Gas states (top) and the corresponding LISA clusters of the learned mode (bottom) at selected time points.

(b)
Fig. 22. Spatial-versus-content blend ablation. Mean Pearson correlation (shaded bands standard deviation over 10 seeds) as a function of the blend weight , interpolating the regression target between pure spatial autocorrelation ( ) and pure feature content ( ). SAIL is strongest at and degrades monotonically as the spatial component is removed, while GCN, GAT, and MLP improve, crossing SAIL near .