SpatialMAGIC: A Hybrid Framework Integrating Graph Diffusion and Spatial Attention for Spatial Transcriptomics Imputation

Sayeem Bin Zaman, Fahim Hafiz, Riasat Azim
3/6/2026
cs.LGcs.AI

No confident code implementation found for this paper. 2 possible matches can be shown below.

Abstract

Spatial transcriptomics (ST) enables mapping gene expression with spatial context but is severely affected by high sparsity and technical noise, which conceals true biological signals and hinders downstream analyses. To address these challenges, SpatialMagic was proposed, which is a hybrid imputation model combining MAGIC-based graph diffusion with transformer-based spatial self-attention. The long-range dependencies in the gene expression are captured by graph diffusion, and local neighborhood structure is captured by spatial attention models, which allow for recovering the missing expression values, retaining spatial consistency. Across multiple platforms, SpatialMagic consistently outperforms existing baselines, including MAGIC and attention-based models, achieving peak Adjusted Rand Index (ARI) scores in clustering accuracy of 0.3301 on high-resolution Stereo-Seq data, 0.3074 on Slide-Seq, and 0.4216 on the Sci-Space dataset. Beyond quantitative improvements, SpatialMagic substantially enhances downstream biological analyses by improving the detection of both up- and down-regulated genes while maintaining regulatory consistency across datasets. The pathway enrichment analysis of the recovered genes indicates that they are involved in consistent processes across key metabolic, transport, and neural signaling pathways, suggesting that the framework improves data quality while preserving biological interpretability. Overall, SpatialMagic's hybrid diffusion attention strategy and refinement module outperform state-of-the-art baselines on quantitative metrics and provide a better understanding of the imputed data by preserving tissue architecture and uncovering biologically relevant genes. The source code and datasets are provided in the following link: https://github.com/sayeemzzaman/SpatialMAGIC

View on arXivView PDF

Code Implementations

No confident code match yet

We couldn't find an author-owned or strongly-evidenced community implementation for this paper. 2 weaker matches are hidden by default — verify before relying on them.

No code implementations found yet.

Know of an implementation? Let us know in the comments below!

Similar Papers

Cite this paper

@article{zaman2026spatialmagic,
  title  = {SpatialMAGIC: A Hybrid Framework Integrating Graph Diffusion and Spatial Attention for Spatial Transcriptomics Imputation},
  author = {Sayeem Bin Zaman and Fahim Hafiz and Riasat Azim},
  year   = {2026},
  eprint = {2603.06780},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2603.06780v1}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2603.06780.svg)](https://codeofpaper.com/paper/2603.06780)

Discussion