FLAG: Foundation model representation with Latent diffusion Alignment via Graph for spatial gene expression prediction

Qi Si, Penglei Wang, Yushuai Wu, Yifeng Jiao, Xuyang Liu, Xin Guo, Yuan Qi, Yuan Cheng

Introduction

Spatial transcriptomics (ST) allows researchers to map gene activity across specific regions of a tissue, offering profound insights into cellular functions. However, ST technology remains expensive and time-consuming. In contrast, standard Hematoxylin and Eosin (H&E) stained slides are ubiquitous in clinical workflows, driving immense interest in using AI to predict gene expression directly from these routine images.

Despite recent advancements, current predictive models suffer from a fundamental flaw: they treat the prediction of each "spot" on a slide as an isolated task. This pointwise approach ignores two critical biological truths:

  1. Gene Coordination: Genes operate within complex regulatory networks, meaning their expression levels are inherently correlated.
  2. Spatial Architecture: Tissues possess distinct structures, and a cell's behavior is heavily influenced by its spatial neighbors.

Consequently, existing regression-based models tend to "over-smooth" predictions, losing the sharp boundaries and intricate correlations characteristic of real biological systems.

The "Gene Dimension Curse"

While some researchers have attempted to use graph diffusion to capture these spatial and genetic relationships, they encountered a severe mathematical roadblock identified in this paper as the Gene Dimension Curse. As models attempt to predict a larger panel of genes simultaneously, the mathematical manifold of valid gene-spatial configurations becomes exceedingly thin. Standard joint node-edge diffusion models fail to converge under these conditions, leading to a catastrophic collapse in performance when scaling to 200 or more genes.

The FLAG Framework

To overcome these limitations, the authors introduce FLAG (Foundation model representation with Latent diffusion Alignment via Graph). FLAG redefines spatial gene expression prediction as a structured distribution modeling task, utilizing three core strategies to bypass the dimensionality problem:

  • Decoupled Spatial Graph Encoder: Instead of generating the graph structure and gene expression levels simultaneously—which triggers the dimension curse—FLAG utilizes a spatial graph as a static conditioning signal. It encodes the physical proximity and visual similarity of tissue spots into a "spatial context" that guides the generation process.
  • Latent Diffusion Backbone: FLAG employs a Diffusion Transformer (DiT) to model the distribution of gene expression. Unlike simple regression, diffusion models naturally capture the stochastic, "one-to-many" relationship between tissue morphology and genetics, preserving natural biological variance.
  • Gene Foundation Model (GFM) Alignment: To ensure biological plausibility, FLAG aligns its internal representations with pretrained Gene Foundation Models (such as Geneformer or scGPT). These GFMs act as "semantic anchors," tethering the model to known biological regulatory patterns and preventing the hallucination of impossible gene combinations.

Evaluation and Novel Metrics

Recognizing that a model can achieve a low Mean Squared Error (MSE) while still producing biologically impossible maps, the authors propose two novel metrics to measure structural fidelity:

  • GSC (Gene Structural Correlation): Evaluates the preservation of gene-gene relationships.
  • SSC (Spatial Structural Correlation): Evaluates the preservation of spatial patterns.

FLAG was evaluated on three representative cohorts from the HEST-1k benchmark (HER2ST, KIDNEY, and PRAD) and validated for downstream utility on the DLPFC (human prefrontal cortex) dataset.

Key Results

FLAG significantly outperformed state-of-the-art models (including HisToGene, STFlow, and Stem) in structural fidelity while remaining highly competitive in traditional pointwise accuracy:

  • Unprecedented Structural Fidelity: On the HER2ST breast cancer dataset, FLAG achieved an SSC of 0.6386, nearly doubling the performance of the next best generative model (Stem at 0.3810).
  • Superior Downstream Utility: In spatial domain clustering tasks (identifying distinct tissue layers in the DLPFC dataset), FLAG achieved an Adjusted Rand Index (ARI) of 0.8451, far surpassing baselines that hovered between 0.47 and 0.67.
  • Robust Scalability: Unlike previous graph-based methods that collapsed as the gene panel grew, FLAG’s performance remained stable even when predicting 800 genes simultaneously.

Limitations and Future Directions

While FLAG represents a significant leap forward, the authors note a few areas for future development:

  • Inference Speed: As a diffusion model, FLAG requires multiple iterative steps to generate predictions, making it slower than single-pass regression models. Future work will explore acceleration techniques like consistency models.
  • 3D Tissue Modeling: Currently, FLAG treats tissue as a 2D plane. Because real biology is three-dimensional, extending the graph backbone to capture volumetric dependencies from serial sections is a logical next step.
  • Cross-Tissue Generalization: The current study focuses on within-tissue cohorts. Testing zero-shot generalization—such as applying a model trained on breast cancer to lung cancer tissues—remains an open challenge for the field.

Summary updated

BibTeX
@inproceedings{si2026flag,
  author = {Qi Si and Penglei Wang and Yushuai Wu and Yifeng Jiao and Xuyang Liu and Xin Guo and Yuan Qi and Yuan Cheng},
  title = {{FLAG: Foundation model representation with Latent diffusion Alignment via Graph for spatial gene expression prediction}},
  booktitle = {International Conference on Machine Learning},
  year = {2026},
  url = {https://openreview.net/forum?id=yY7rywRtlI},
}
Figure