Q: Does message passing over cell–cell spatial graphs improve (task: cell-type classification) over strong non-spatial baselines trained on identical features?
A graph architecture
evaluated under paired superiority/inferiority tests and Two One-Sided Tests (TOST), with Holm-Bonferroni FWER control (
- A positive lift is reported when the paired superiority test supports
$\Delta > \epsilon$ after Holm-Bonferroni adjustment; a negative lift when the paired inferiority test supports$\Delta < -\epsilon$ . - Parity is reported when neither positive nor negative lift is established after Holm-Bonferroni adjustment. It means no resolved lift in this analysis; it does not claim formal equivalence unless TOST supports equivalence within the band.
Across 4 spatial transcriptomics datasets (1,164 benchmark runs, 10 random seeds):
- Cell–cell graphs show no statistically supported positive lift over the MLP baseline across 112 matched comparisons. After global adjustment, 78 show negative lift and 34 are classified as parity. For physical spatial k-NN graphs alone, 20 of 32 comparisons show negative lift and 12 are parity.
- In fine-grained cellular mixtures (MERFISH adult mouse spinal cord), all four architectures show negative lift on the physical k=12 graph. GraphSAGE falls 2.2 percentage points below the MLP baseline.
- Across sharp histological boundaries (Open-ST metastatic carcinoma), GCN, GAT, and GIN show negative lift of 6.3–7.3 percentage points on the physical k=12 graph. GraphSAGE remains close to the MLP baseline and is classified as parity.
- In structurally imbalanced tissues (10x Xenium mouse kidney), spatial message passing shows large performance losses: GCN, GAT, and GIN fall 33.2–39.4 percentage points below the MLP on the ShamL → ShamR split. GraphSAGE limits the loss and is classified as parity.
- Connecting cells to reference cells in gene-expression space does not establish positive lift over the MLP under the global analysis.
All neural models evaluated across
| Platform & Dataset | Biological Context | Evaluated Test Cells (Classes) | Spatially Ignorant MLP Macro-F1 | Parity Band ( |
Spatial GNN | GNN Macro-F1 | Matched Lift ( |
Empirical Verdict |
|---|---|---|---|---|---|---|---|---|
Stereo-seqaxolotl_telencephalon
|
Developing brain (Stage held-out) |
4,209 (15) | GraphSAGE ( |
Parity | ||||
MERFISHmouse_spinal_cord
|
Adult spinal cord (Animal held-out) |
8,507 (60) | GraphSAGE ( |
Negative Lift | ||||
Open-SThuman_lymph_node
|
Metastatic carcinoma (Section held-out) |
34,072 (14) | GraphSAGE ( |
Parity | ||||
10x Xeniummouse_kidney
|
Sham adult kidney (Replicate held-out) |
85,880 (20) | GraphSAGE ( |
Parity |
Model scores show mean
| Platform & Dataset | Spatially Ignorant MLP Baseline | GCN ( |
GAT ( |
GIN ( |
GraphSAGE ( |
Architectural Finding |
|---|---|---|---|---|---|---|
|
Stereo-seq (Axolotl Brain) |
|
|
|
|
GraphSAGE has the highest mean, but every architecture is parity after global adjustment. | |
|
MERFISH (Mouse Spinal Cord) |
|
|
|
|
All four architectures show negative lift. | |
|
Open-ST (Human Lymph Node) |
|
|
|
|
GCN/GAT/GIN show negative lift; GraphSAGE is parity. | |
|
10x Xenium (Mouse Kidney) |
|
|
|
|
GCN/GAT/GIN show large negative lift; GraphSAGE is parity. |
The sweep contains 112 matched comparisons across four datasets, four architectures, and seven graph conditions. Full run instructions: docs/RETRAINING.md. Raw-to-PCA reproduction: docs/reproducibility-v0.3.2.md.
- No tested graph design showed a statistically supported positive lift after global adjustment. GraphSAGE on the Stereo-seq physical k=12 graph had the highest mean lift (+1.6 percentage points), but is classified as parity.
- Connecting cells to a reference set in gene-expression space produced positive mean lifts in some MERFISH runs, but none met the positive-lift criterion after global adjustment.
Possible limitations to test include:
- They can connect cells that are physically close even if there is biological separation.
- They may force every cell to have the same number of neighbors, even when real tissue density might be different.
- Cells near the tissue's outer edge have neighbors on one side only; whether this skews their results remains to be tested.
Yes there are/should be better approaches! [see end]
- This remains a direction to explore; the benchmark did not establish a positive lift for expression-space reference graphs.
- A hypothesis is that expression-similar references could reduce cross-boundary mixing, regardless of physical proximity.
- Physical damage in the tissue may affect location more than the underlying gene expression.
In MERFISH and Xenium, GCN, GAT, and GIN show drops of roughly 33–39 percentage points on the physical k=12 graph. One possible explanation is that neighborhood aggregation mixes in misleading cells; this remains a hypothesis about why these models performed poorly here.
GraphSAGE performed better than the other GNNs in those settings; the verdict is parity for Xenium and negative for MERFISH.
This was not evaluated in the sweep and remains an open question.
- One possibility is that cells near the outer edge have fewer neighbors to draw on, since there's nothing beyond the boundary.
All benchmarks enforce four controlled experimental variables:
- Zero cross-partition edges: Strict donor- and section-held-out splits with section-own subgraphs; test-time message passing operates strictly on internal spatial coordinates within held-out tissue slices (zero cross-section or cross-partition edges).
-
Identical fixed features with audited spatial ignorance: Random Forest, MLP, and all GNNs evaluate on identical 50-dimensional Principal Components fitted strictly on training gene expression. Coordinate-shuffle audits verify zero spatial leakage into features (
$\max |\Delta| = 0.0 \le 10^{-6}$ ). - Controlled model comparison: Standard inductive GNN architectures (GCN, GraphSAGE, GAT, GIN) evaluated against a regularized non-spatial MLP on identical train/val/test partitions across 10 random seeds (42–51). GNN optimization uses training nodes only; checkpoint selection uses fresh post-update validation predictions.
- Topological negative controls: Coordinate shuffling and undirected degree-preserving edge rewiring are performed within each partition and section and benchmarked across every condition.
see - scgraph-bench, my ml_gist
…
The 1,164-run sweep uses frozen PCA features, split definitions, and graph inputs. Re-run it using the setup and GPU instructions in docs/RETRAINING.md. Rebuild raw-to-PCA features with the matching source data versions using docs/reproducibility-v0.3.2.md. Release archives and checksums: Zenodo.
# Synchronize exact dependencies from uv.lock
uv sync --frozen --all-extras
# Run unit tests and invariant validators
uv run pytest -v tests
# Run linter and formatting checks
uv run ruff check src tests scripts
uv run ruff format --check src tests scripts- docs/RETRAINING.md: Strict-inductive training protocol and run instructions.
- docs/reproducibility-v0.3.2.md: Raw-to-PCA reproduction and fitted preprocessing.
- STUDY_PROTOCOL.md: Study protocol and statistical decision rules.
- REPRODUCE.md: Step-by-step manual reproduction handbook.
- TESTING.md: 4-tier testing guide (unit, invariant validators, smoke runs, delivery audits).
- CITATION.md: Academic citation format and BibTeX.
- LICENSE: MIT License.
Extend to relation-specific message passing; Try radius based neighborhood