Self-supervised deep learning for spatial transcriptomics

Deciphering the
Syntax of Cellular
Interaction

TRINUS learns the triadic grammar of cell-cell communication — separating intrinsic identity from niche pressure to enable in silico tissue engineering.

Presubmission Peking University & UC Irvine

The Problem

Why Mapping Cells
Isn't Enough

Spatial transcriptomics maps coordinates — but we lack the computational logic to decipher the rules of cellular interaction.

Gap 01

Representation Conflation

Graph neural networks fuse a cell with its environment through isotropic smoothing. This mathematical conflation erases the very interaction-induced deviations we seek to measure — denoising data at the cost of biological signal.

Gap 02

Unstructured Niche

Standard GNNs treat the niche as a "bag of neighbors" — missing triadic closure and anisotropic geometry. They cannot distinguish cooperative signaling dependencies from pairwise noise.

Gap 03

No Simulator

Existing tools infer forward correlations only — no framework exists for bidirectional in silico engineering: predicting tissue response and computing the minimal intervention needed.

The Solution

How TRINUS Works

A self-supervised architecture that walks through three innovations — from structured attention to in silico tissue design.

NicheLayer

Triangular Multiplicative Attention

Goes beyond pairwise GNNs to capture cooperative signaling dependencies. Triangle multiplicative updates enforce geometric consistency, distinguishing complex topological motifs invisible to distance-weighted aggregation.

↳ Hover the diagram to see cooperative gating activate

suppress?rescue?exhaust?TumorMacrophageT-cellM↔T DEPENDS ON Tu-M, Tu-T EDGES
Decoupling

VQ Prototype Library

Isolates intrinsic lineage from niche pressure without reference labels. A vector-quantized codebook learns context-free cellular prototypes — discrete anchor points representing pure identity, stripped of environmental noise.

OBSERVEDLIBRARYCONTEXT-FREEPROTOTYPESαβγmapping cells to context-free prototypes
Engineering

Bidirectional In Silico Design

Forward perturbation predicts tissue response to virtual transplants. Inverse design computes the minimal spatial remodeling to rescue a target cell state. A unified differentiable framework for both directions.

↳ Click the diagram to toggle forward / inverse modes

→ FORWARD PERTURBATIONBIDIRECTIONAL IN SILICO ENGINEERING
Loading Figure 1…

Figure 1 — Hover the architecture components to explore the TRINUS pipeline

Downstream Applications

From Mapping to Engineering

Tier 1

Expression Decoupling & Plasticity

Decompose observed expression into intrinsic identity and niche-induced deviation.

2 tasks
hover to explore ↓
Tier 2

Interaction Syntax Discovery

Reveal the grammar and vector fields of tissue-wide cell communication.

3 tasks
hover to explore ↓
Tier 3

In Silico Tissue Engineering

Bidirectional simulation: predict tissue response and compute minimal interventions.

2 tasks
hover to explore ↓

Impact

What TRINUS Reveals

Results and significance — each figure panel tells both what we found and why it matters.

Figure 3 — CRC interaction compass, plasticity scores, and interaction motifs

Figure 3

Decoupling Lineage & Niche Pressure

TRINUS autonomously learns context-free cell prototypes without reference atlases, separating intrinsic baseline expression from interaction-induced deviations. This enables the resolution of complex spatial topologies.

Reference-free decoupling of cellular lineages and quantification of plasticity via niche pressure.

  • Reference-free Decoupling (Fig 3b/c)
  • Plasticity quantified via niche pressure (Fig 3d)
  • Mapping topology with Interaction Compass (Fig 3e)
  • Evaluating Communication Efficacy (Fig 3f)
  • High-Order Spatial Motifs (Fig 3g)
hover to view figure →
Figure 4 — Virtual macrophage transplantation and inverse T-cell rescue design

Figure 4

Bidirectional In Silico Engineering

Moving beyond descriptive mapping, TRINUS models tissue responses to new cellular infiltration (forward) and computes specific molecular edits (inverse) to rescue functions in the ovarian TME.

Unified forward perturbation and inverse design — simulate transplants and compute minimal therapeutic interventions.

  • Virtual Transplants & Latent Rewiring (Fig 4a-d)
  • Predicting Niche Responses (Fig 4e)
  • Tracking Cellular Adaptation (Fig 4f/g)
  • Inverse Design for Immune Rescue (Fig 4h/i)
  • Uncovering Therapeutic Logic (Fig 4j)
hover to view figure →
Figure 6 — GeneFormer + NicheLayer integration results

Figure 6

Contextualizing Foundation Models

Integration of context-agnostic representations from large-scale foundation models (like Geneformer) with TRINUS explicitly endows them with spatial syntax.

Spatial structural context through stacked NicheLayers boosts single-cell foundation model downstream performance.

  • Spatial Refinement via NicheLayers (Fig 6a)
  • Boosting Lineage Identification (Fig 6b/e)
  • Robust Performance Across Parameters (Fig 6c/d)
hover to view figure →

Get Started

Explore TRINUS

Access the code, reproduce the results, and build upon the triadic framework for your own spatial transcriptomics analysis.

View on GitHub