Graph neural network counting recurring cell-type neighborhood motifs in spatial transcriptomics and proteomics, linking topology to phenotype.
No providers recorded yet. Browse all providers
Spatial omics assays report where every cell sits and what type it is, but most analyses of that data stop at clustering: group cells into neighborhoods, then describe each as a percentage breakdown of cell types. Composition discards geometry. Two tissue regions with identical cell-type proportions can differ entirely in how those cells are arranged, and it is the arrangement — which cell touches which — that encodes cell–cell communication. Clustering-based methods are also unstable across samples and prone to tracking batch covariates rather than biology.
TrimNN, the triangulation cellular community motif neural network, works bottom-up instead. It builds a graph by Delaunay triangulation of cell coordinates, labels nodes by cell type, and asks how often each small labeled subgraph — a cellular community motif — is overrepresented. That question is subgraph matching, which is NP-complete, and the reason the field has largely restricted itself to motifs of size 1 to 3: single cell types, pairs, and triangles. TrimNN comes from Juexin Wang's group at Indiana University with collaborators at the University of Missouri, Ohio State, and Vanderbilt.
Its contribution is turning the counting problem into something a fixed network can approximate. Rather than enumerating matches, TrimNN decomposes the count into per-node binary classification: does the query motif exist within this node's enclosed subgraph? Summing those decisions estimates abundance. A semi-divide-and-conquer strategy then grows motifs incrementally, using the most overrepresented size-k motifs to seed the search at size k+1, so sizes up to nine become reachable on ordinary tissue graphs.
The network is a graph isomorphism network augmented with shortest-distance-based positional encoding, which breaks symmetries message passing alone cannot resolve; ablations confirm both choices matter at larger motif sizes. On simulated spatial omics graphs, TrimNN improved root mean square error over the regression-based baseline NSIC by roughly 20- to 60-fold, and where the classical VF2 enumeration algorithm scales exponentially with motif size, TrimNN's runtime stays flat — seconds on tissue with thousands of cells and dozens of cell types.
The biological validation is where the case rests. In a CODEX colorectal cancer cohort of 17 low-risk and 18 high-risk patients across 140 tissue regions and 29 cell types, logistic regression on the top 29 motif occurrences classified patient group at ROC-AUC 0.77, 0.76, 0.79, and 0.76 for motif sizes 1 through 4, rising to 0.81 with the top 100 size-3 motifs — against 0.71 for a 512-dimensional embedding baseline. Motif size mattered for prognosis in a specific way: a size-2 motif pairing CD68+CD163+ macrophages with smooth muscle did not stratify survival (Cox PH p = 0.63), but the size-3 and size-4 extensions of the same pairing did (p = 0.016 and p = 0.0093).
TrimNN suits any spatial omics study asking whether tissue architecture, not just composition, tracks a phenotype: tumor microenvironment stratification, prognostic biomarker discovery, and neurodegeneration studies where glial–neuronal contact patterns are the hypothesis — on STARmap PLUS data from an Alzheimer's mouse model it recovered triangle motifs of cortical excitatory neurons and microglia differing significantly between disease and control. Because the motifs are named cell types in a named arrangement, they connect directly to cell–cell communication analysis, differential expression, and survival curves.
The practical result is that sizable cellular community motifs became computable on real spatial omics data, and that they carry prognostic information the size-1 and size-2 analyses in wide use do not. That reframes a methodological limit as a biological one: the field restricted itself to pairs and triangles because larger patterns were intractable, and the survival analyses here suggest that restriction was discarding signal. The model is narrow — one task, applied to graphs the user supplies — and its checkpoint is committed to the repository rather than published to a versioned registry, so there is no release history and the training corpus behind the shipped weights is undocumented. The code is MIT licensed and peer reviewed; the underlying preprint carries a more restrictive CC BY-NC-ND license.
Much of this page is generated or calculated automatically. Flag anything that looks off and we will re-run it.