For years, scientists have been able to map where immune cells sit inside a tumor or an inflamed heart with remarkable precision. Spatially resolved transcriptomics, a family of technologies that measures gene activity while preserving the physical layout of tissue, has produced dazzling atlases of cellular neighborhoods. Yet these atlases share a frustrating limitation: they show where cells are, but they stay silent on the question that matters most for biology and medicine—why are they there? What molecular signals convinced a T cell to push into one region of a tumor while its sibling cells clustered uselessly at the margin? A new study published in Nature Biomedical Engineering offers the most ambitious answer yet to that question, and it comes not from a new microscope but from a new way of thinking about artificial intelligence.
The tool, called SPACER, was developed by a large multi-institutional team led by researchers at UT Southwestern Medical Center, Baylor College of Medicine and UT MD Anderson Cancer Center. Its central innovation is a commitment to interpretability at a level that most machine learning systems abandon. Rather than burying its reasoning inside millions of opaque parameters, SPACER is built as a multi-instance learning framework that outputs gene-level recruitment rules directly from spatial transcriptomics data. In practical terms, a researcher can point the model at a tissue slide and receive back a ranked list of genes that either attract or repel a given cell type, with the logic connecting each gene to each cellular encounter laid bare for inspection and experimental testing.
The technical challenge the team confronted is worth appreciating. Cell recruitment in tissue is governed by an interplay of chemoattractants, adhesion molecules, extracellular matrix barriers, antigen presentation and countless other cues, all acting across microscopic distances. Standard computational approaches to spatial data tend to describe correlations between cell types and their surroundings, or to infer ligand–receptor communication from bulk expression patterns, but they rarely recover the causal grammar of recruitment. SPACER reframes the problem as one of learning from many small spatial instances—local patches of tissue in which a target cell either engaged with or was excluded from a particular neighborhood—and extracting the gene programs that consistently distinguish successful recruitment from exclusion. The result is a model whose internal logic maps onto biological mechanisms that experimenters can actually interrogate.
To establish credibility, the researchers benchmarked SPACER against existing methods across an unusually broad foundation of evidence: 37 spatially resolved transcriptomics datasets spanning multiple human tumor types as well as mouse heart tissue. Across a range of tasks designed to test whether a method can recover biologically meaningful recruitment signals, SPACER delivered improvements of fourfold to twenty-one-fold over prior approaches. That margin is not a marginal tuning gain; it reflects a qualitative difference in what the model can extract. The team also validated the framework against complementary data types, including single-cell RNA sequencing paired with T cell receptor sequencing, immunopeptidomics datasets cataloguing the peptide fragments displayed on cell surfaces, and newly generated Visium HD maps of mouse heart tissue.
The first major biological finding concerns mucins, the large, heavily glycosylated proteins best known for forming the protective mucus layer of airways and gut. SPACER’s analysis indicated that mucins expressed by tumor cells are associated with physical barriers that prevent T cells from engaging with the cancer cells around them. This is a mechanistically plausible picture: mucins can dramatically alter the biophysical properties of a cell’s surface and its surrounding matrix, and prior work has implicated them in shielding tumor cells from immune surveillance. What SPACER adds is a systematic, data-driven link between tumor mucin expression and the spatial exclusion of T cells across cancer types—a link that had been suspected but never decoded at this scale from spatial data.
The clinical implications of that finding are immediate. When the team examined cohorts of patients treated with immune checkpoint inhibitors—the blockbuster immunotherapy drugs that unleash T cells against tumors—mucin-associated recruitment barriers predicted resistance to treatment. The same signal also correlated with patient prognosis in pan-cancer analyses of The Cancer Genome Atlas, including in mesothelioma and kidney renal clear cell carcinoma. In other words, a computational readout of why T cells fail to reach tumor cells, derived purely from spatial gene expression maps, carries information that could in principle stratify patients before they embark on a course of therapy. That is precisely the kind of translational bridge that spatial biology has promised but rarely delivered.
The second headline discovery concerns what actually draws T cells into productive contact with tumor cells. Across cancer types, SPACER identified local antigen presentation as the dominant correlate of T cell engagement. This finding resonates with a core principle of immunology—T cells recognize their targets through peptide fragments displayed on major histocompatibility molecules—but seeing it emerge as the strongest spatial signal, outcompeting chemokine gradients and other candidate attractants, gives the principle new quantitative weight. The team reinforced the point with immunopeptidomics data, confirming that the peptides presented by tumor cells align with the T cell specificities inferred from receptor sequencing. Recruitment, in this view, is not a generic homing process but a antigen-informed negotiation between the immune cell and its immediate environment.
The third application took the team out of oncology and into a dangerous side effect of cancer therapy. Immune checkpoint inhibitors occasionally trigger myocarditis, a potentially fatal inflammation of the heart muscle, and which immune cells drive the damage has been debated. Applying SPACER to spatial maps of mouse heart tissue from a model of checkpoint inhibitor–induced myocarditis, together with single-cell RNA and T cell receptor sequencing, the researchers found that CD4-positive T cells—helper T cells more often associated with coordination than killing—are the dominant functional effectors in the severe form of the disease. Heart-infiltrating T cell clonotypes, expanded and largely distinct from those circulating in the blood, pointed to a local antigen-driven response within the myocardium, sharpening a picture previously suggested by work on α-myosin–reactive T cells.
Beyond these specific discoveries, the study sketches a broader vision for how interpretable machine learning could reshape tissue biology. The authors and their collaborators have made SPACER freely available through GitHub, and the underlying datasets—including human Visium and Visium HD data, gastric cancer CosMx maps, Xenium data paired with T cell receptor sequencing, and the mouse heart resources—are deposited in public repositories such as NIH GEO and Zenodo. That openness matters. A discovery engine for recruitment biology only earns trust if its rules can be independently tested, and the interpretability that defines SPACER is designed exactly for that cycle of computational prediction and experimental verification. The framework also proved computationally efficient, an unglamorous but essential quality for a tool intended to be applied across the rapidly growing volume of spatial datasets now being generated worldwide.
What makes the work resonate beyond its immediate findings is the way it reframes the relationship between artificial intelligence and biology. Foundation models for spatial omics are proliferating, and they are impressive at prediction, but their black-box character limits their scientific usefulness when the goal is mechanism. SPACER demonstrates the opposite philosophy: build interpretability in from the ground up, and the model becomes a hypothesis generator that hands experimenters concrete, testable molecular rules. The mucin barrier hypothesis, the centrality of local antigen presentation, and the CD4-driven pathology of immunotherapy myocarditis are all claims that can now be pursued in the laboratory—and, if they hold up, translated into biomarkers and therapeutic strategies. In decoding the spatial codes of cell recruitment, the study suggests that the most valuable AI in biomedicine may be the kind that shows its work.
Subject of Research: Interpretable machine learning for decoding cell recruitment rules from spatially resolved transcriptomics data
Article Title: Interpretable AI model reveals spatial codes of cell recruitment in tissues
Article References: Interpretable AI model reveals spatial codes of cell recruitment in tissues. (n.d.). https://doi.org/10.1038/s41551-026-01804-6
Image Credits: AI Generated
DOI: 10.1038/s41551-026-01804-6
Keywords: spatial transcriptomics, interpretable AI, SPACER, T cell recruitment, tumor microenvironment, mucins, immune checkpoint inhibitors, antigen presentation, myocarditis, CD4 T cells, multi-instance learning, cancer immunotherapy
Cite Scienmag News
Nathaniel Bowman. (October 13, 2026). AI Deciphers the Hidden Spatial Rules That Guide Immune Cells Through Tissues. Scienmag. https://scienmag.com/ai-deciphers-the-hidden-spatial-rules-that-guide-immune-cells-through-tissues/
Nathaniel Bowman. "AI Deciphers the Hidden Spatial Rules That Guide Immune Cells Through Tissues." Scienmag, 13 October 2026, https://scienmag.com/ai-deciphers-the-hidden-spatial-rules-that-guide-immune-cells-through-tissues/. Accessed 13 October 2026.
Nathaniel Bowman. "AI Deciphers the Hidden Spatial Rules That Guide Immune Cells Through Tissues." Scienmag. October 13, 2026. https://scienmag.com/ai-deciphers-the-hidden-spatial-rules-that-guide-immune-cells-through-tissues/

