TL;DR
Differentiating between Crohn’s disease (CD) and ulcerative colitis (UC) is notoriously difficult due to overlapping clinical presentations. This study presents an explainable machine learning pipeline that transforms spatial transcriptomics (ST) data into structured features capturing cellular microenvironments ("niches"). The resulting model achieves strong classification accuracy and reveals a key biological insight: spatial architectural disruption signals general inflammation, whereas localized gene expression inside specific niches distinguishes UC from CD.
What Problem Does This Paper Address?
Inflammatory Bowel Disease (IBD) primarily manifests as either ulcerative colitis (UC) or Crohn’s disease (CD). Although their treatment pathways diverge considerably, clinical and histological presentations often overlap, leading to misdiagnosis or diagnostic ambiguity.
While single-cell RNA sequencing (scRNA-seq) has unraveled significant cellular heterogeneity in the gut, tissue dissociation destroys spatial tissue context. Spatial transcriptomics (ST) preserves cellular coordinates alongside gene expression, but most existing literature uses ST for purely descriptive characterization. The authors set out to bridge this gap by converting descriptive spatial microenvironments into predictive, interpretable machine learning features capable of subtype classification.
Methods
The authors developed an end-to-end computational framework that translates single-cell spatial data into tissue-level predictive features:
Spatial Transcriptomics (CosMx)
→ Cell Typing (cell2location via scRNA-seq reference)
→ Niche Decomposition (NMF, k=4)
→ Multi-Tiered Feature Engineering (44 features / FOV)
→ Multilayer Perceptron (MLP) Classifier
→ Explainability & Causal Discovery (FCI-Stable & Permutation Importance)
- Cell Type Deconvolution: Using
cell2location, the spatial profiles were mapped to 54 cell types derived from a reference scRNA-seq atlas. - Cellular Niche Decomposition: Non-negative Matrix Factorization (NMF, $k=4$) was applied to the cell-type probability matrix to uncover four recurring functional cellular niches (latent microenvironments).
- Multi-Tiered Feature Engineering (44 features per Field of View [FOV]):
- Niche Composition (4 features): The relative proportion of cells assigned to each niche.
- Neighborhood Enrichment (16 features): Quantifying spatial cell–cell interactions. Neighbors within twice the focal cell diameter were identified using KD-trees, and a Laplace-smoothed log-odds ratio compared observed interactions against random mixing.
- Niche–Gene Features (24 features): Mean expression of specific genes within each niche, prioritized using mutual information (MI) against disease classes and filtered for statistical significance using Mann–Whitney U tests with False Discovery Rate (FDR) correction.
- Classification & Explainability: A multilayer perceptron (MLP with architecture 40 $\rightarrow$ 20 $\rightarrow$ 10 $\rightarrow$ 5) was trained with patient-level group-stratified cross-validation. Model predictions were dissected using permutation feature importance, post-hoc statistical comparisons, and constraint-based causal discovery (FCI-Stable algorithm).
Datasets
The study utilized two publicly available datasets from the NCBI Gene Expression Omnibus (GEO):
- GSE234713 (Primary ST dataset): Colonic mucosa profiling using the NanoString CosMx Spatial Molecular Imager (980 genes) across 9 formalin-fixed paraffin-embedded (FFPE) human samples (3 Healthy Controls [HC], 3 UC, and 3 CD), comprising 171 FOVs and 459,095 cells.
- GSE214695 (Reference scRNA-seq dataset): Colonic mucosa single-cell RNA sequencing data used as an external reference to train the
cell2locationcell-type mapping (aligned over 871 filtered genes across 54 cell types).
Key Insights and Ideas
- Architecture Signals Inflammation; Genes Signal Subtype: Permutation importance analysis revealed that distinguishing healthy tissue from IBD relied primarily on spatial neighborhood enrichment scores (i.e., whether niches interact or segregate). In contrast, differentiating between UC and CD depended on niche-specific gene expression signals.
- Causal Hierarchy of Niches: Causal discovery (PAG analysis) suggested that Niches 3 and 4 sit upstream of Niche 1 alterations, pointing to potential early organizational disruptions in the disease cascade.
- Subtype-Specific Signatures:
- UC was characterized by elevated Niche 2 and Niche 3 cell proportions, alongside distinct expression of CASP3, IGKC, and HLA-DQB1.
- CD showed marked expansion of Niche 4 cells and enrichment of collagen- and remodeling-associated genes (COL5A1, COL9A2, FZD1, HDAC5, MZT2A).
Key Results
- Three-Class Problem (HC vs. UC vs. CD):
- Accuracy: $0.774 \pm 0.161$ (Mean $\pm$ SD across cross-validation folds).
- Macro F1-Score: $0.741$ (Mean fold F1: $0.712 \pm 0.209$).
- Subtype Distinction: Healthy controls were classified with 100% precision and recall; misclassifications occurred exclusively between UC and CD due to shared inflammatory profiles.
- Two-Class Problem (Healthy vs. IBD):
- Accuracy: $0.916 \pm 0.118$.
- Precision: $0.927 \pm 0.104$ | Recall: $0.908 \pm 0.129$ | F1-Score: $0.912 \pm 0.125$.
Limitations and Future Work
- Cohort Size: The framework was trained on 9 patients (3 per condition). Although this encompassed 171 FOVs and nearly 460,000 cells, patient-level biological diversity is limited. Validation on larger, multi-center cohorts is essential.
- Targeted Gene Panel: The analysis was restricted to the 980-gene NanoString CosMx panel. A whole-transcriptome spatial platform could uncover additional biomarkers.
- Direct Subtype Benchmark: The authors did not evaluate an isolated binary classifier dedicated solely to UC versus CD.
- Future Directions: Incorporating longitudinal data to test whether these spatial niche features track therapeutic response, and functionally validating top ranking genes (MZT2A, COL5A1, CASP3) in IBD pathogenesis.
Summary updated