Pathway-Aligned Regulator Tokens for Interpretable Spatial Gene Expression Prediction from Histologyatial Transcriptomics Prediction from Histology

Hyun Namgung, Sang Hyun ParkNeurIPS 2026

TL;DR

Looking at a standard tissue slide and predicting which genes are switched on where is a holy grail for digital pathology, unlocking massive archives of clinical tissue samples without expensive lab tests. By building a neural network that mimics real cellular biology—grouping hundreds of genes under a handful of dynamic "regulator" tokens—researchers achieved more accurate, interpretable, and memory-efficient gene expression predictions across diverse tissues and species.

What Problem Does This Paper Address?

Spatial transcriptomics lets biologists map gene activity across a slice of tissue while keeping its physical layout intact. The catch? It is expensive and technically grueling. Meanwhile, hospitals have millions of cheap, routine H&E-stained histology slides sitting in archives. Predicting spatial gene expression directly from these images would be transformative.

However, existing AI models stumble over two fundamental biological realities:

  1. Transcriptional stochasticity: Two tissue spots that look virtually identical under a microscope can have wildly different gene activity. Standard regression models predict a single average value, smoothing out the sharpest, most interesting biological signals.
  2. Co-regulated modules: Genes don't act alone. In a real cell, a few master transcription factor complexes coordinate hundreds of downstream target genes simultaneously. Yet current AI architectures treat the gene panel as an unstructured, flat list of numbers—or rely on full gene-to-gene self-attention whose memory cost explodes quadratically as you add more genes.
Figure 1: Motivation for distributional and structural modeling. (a) Morphologically similar regions exhibit heterogeneous gene expression profiles. (b) Aggregated distributions show substantial variance that point-prediction methods cannot capture. (c) Gene expression follows a regulatory hierar- chy: a small number of transcription factor complexes (e.g., ISGF3, comprising STAT1/STAT2/IRF9 subunits) coordinate the co-expression of hundreds of target genes (interferon-stimulated genes, ISGs) [23, 35, 36], motivating an architecture that respects this structure.

Methods

The authors weave biological structure into a generative architecture through three design choices:

  • Regulator Attention (Novel Core): Instead of letting every gene attend to every other gene ($\mathcal{O}(G^2)$ cost), or using static, randomly initialized bottleneck tokens (like Perceiver), the model dynamically generates $M=64$ content-dependent regulator tokens directly from the current gene representations via an MLP selector. In a two-stage pass (genes → regulators → genes), tokens pool soft subsets of genes and broadcast coordinated updates back. Because tokens are built on-the-fly from the input, active gene programs can shift from spot to spot and layer to layer, cutting attention cost to $\mathcal{O}(GM)$.
  • Dual Conditioning (Novel Routing): Image patches are encoded using frozen pathology foundation models (UNI + CONCH). Rather than picking between global layer modulation (AdaLN) and selective feature retrieval (cross-attention), each transformer block routes the same image embedding through both pathways simultaneously, capturing tissue-wide context alongside gene-specific visual cues.
  • Flow Matching Backbone (Standard): Everything sits inside a flow matching framework, learning straight transport trajectories from Gaussian noise to the true distribution of gene expression—capturing natural biological variance rather than collapsing to a blurry average.
Flow matching architecture showing dual conditioning from frozen UNI and CONCH encoders alongside the Regulator Attention block.

Datasets

The authors evaluate on five 10x Visium spatial transcriptomics datasets paired with H&E slides from the HEST-1K benchmark (no new datasets introduced), testing panels of ~195–218 highly variable genes:

  • Human Cancer: Breast Cancer I, Breast Cancer II, and Squamous Cell Carcinoma (SCC).
  • Human Normal Tissue: Human Bowel.
  • Cross-Species: Mouse Brain.

Evaluation primarily uses a leave-one-slide-out (LOSO) split, supplemented by stricter leave-one-patient-out (LOPO) tests where multi-section patient data exists.

Key Insights and Ideas

  • Content-dependence is the secret sauce, not compression: Compressing genes through static, input-agnostic bottlenecks (like Set Transformer's ISAB or Perceiver-style learned queries) actually hurts performance compared to full self-attention. Generating regulator tokens dynamically from the genes themselves beats full self-attention—proving that anchoring latent tokens to current gene content is what drives the gain.
  • Lower MSE can hide worse biology: Point-estimate baselines often win on Mean Squared Error (MSE) while losing badly on correlation. Why? MSE rewards predicting a safe, blurry average across quiet background spots, washing out sharp, focal disease markers that correlation captures.
  • Emergent biological interpretability: Without ever being shown a biology textbook, the learned regulator tokens specialize into distinct, non-overlapping gene programs (11$\times$ higher uniqueness than static learned queries) that align with known MSigDB Hallmark biological pathways far above matched random nulls.

Key Results

  • Predictive Correlation: Outperforms all deterministic and generative baselines across all four main benchmark tissues. On PCC@200 (Pearson correlation across top 200 variable genes), it beats the strongest reimplemented baselines by +16.0% on Breast Cancer I (0.3418 vs. MERGE's 0.2947) and +7.4% on SCC (0.7932 vs. Gene-DML's 0.7384), and tops Stem by +12.0% on Human Bowel and +28.9% on Mouse Brain.
  • Isolating Regulator Attention: Under the flow matching backbone on Mouse Brain, regulator attention boosts PCC@200 by +0.0676 over full gene–gene self-attention (0.4805 vs. 0.4129).
  • Cross-Patient Generalization: Holding out all six tissue sections of a Breast Cancer patient (LOPO), PCC@200 drops from 0.342 to 0.141—revealing that standard slide-level splits benefit from same-patient continuity—yet still beats cross-patient configurations of super-resolution tools iStar and iSCALE by 1.4$\times$.
  • Memory Scaling: At a 5,000-gene panel scale (Xenium Prime 5K), full self-attention demands a massive 111.8 GiB attention tensor at batch size 200; at batch size 8 where both fit on a GPU, regulator attention cuts peak memory by 5.3$\times$.

Limitations and Future Work

  • Limited Gene Panel Scale: Experiments focus on ~200-gene Visium marker panels. Predictive accuracy on broader genome-wide spatially variable sets and true high-plex platforms (thousands of genes) remains untested in practice.
  • Patient Split Leakage in Standard Benchmarks: As their LOPO drop demonstrates, standard leave-one-slide-out splits inflate scores via same-patient similarity; systematic patient-level splits across all cohorts are still needed.
  • Spot Independence & Dispersion: The model predicts each spatial spot independently from local morphology without modeling spot-to-spot spatial graphs, and shares a common generative limitation of producing slightly under-dispersed predictive intervals.

Summary updated

Abstract

Predicting spatial gene expression from histopathology images enables transcriptomic analysis on archival H\&E samples where matched spatial transcriptomics data is unavailable. Gene expression is organized into co-regulated modules: transcription factor complexes coordinate the co-expression of many downstream targets (e.g., the ISGF3 complex coordinating hundreds of interferon-stimulated genes through shared cis-regulatory elements). Existing approaches to histology-to-expression prediction, both deterministic and generative, employ generic architectures that ignore this structure. We introduce regulator attention, a modular co-expression prior that pools gene representations into a small set of content-dependent tokens via a learned selector and routes them back through cross-attention to modulate gene-level features, in contrast to learnable token arrays whose identity is independent of the input. Within a flow matching framework conditioned on pathology foundation model embeddings, our method outperforms deterministic and generative baselines on correlation-based metrics across four tissue types spanning human cancer, normal tissue, and cross-species samples, with the largest gains on highly variable genes. Isolated under the final flow matching backbone on Mouse Brain, regulator attention improves over full gene--gene self-attention, whereas input-agnostic bottlenecks fall below it, identifying content-dependent token generation as the source of the gain. The learned tokens attend to distinct gene sets, and their pathway alignment exceeds expression-, variance-, and detection-matched null gene sets. The bottleneck also removes the quadratic memory cost of gene--gene attention, reducing peak memory by $5.3\times$ at the Xenium Prime 5K panel size.
BibTeX
@inproceedings{namgung2026pathway,
  author = {Hyun Namgung and Sang Hyun Park},
  title = {{Pathway-Aligned Regulator Tokens for Interpretable Spatial Gene Expression Prediction from Histologyatial Transcriptomics Prediction from Histology}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2026},
  url = {https://openreview.net/forum?id=9gb3vNBdFP},
}
Figure