Graph Neural Networks as a Substitute for Transformers in Single-Cell Transcriptomics

Jiaxin Qi, Yan Cui, Jinli Ou, Jianqiang Huang, Gaogang Xie
7/5/2025
cs.LGq-bio.GN

No confident code implementation found for this paper.

Abstract

Graph Neural Networks (GNNs) and Transformers share significant similarities in their encoding strategies for interacting with features from nodes of interest, where Transformers use query-key scores and GNNs use edges. Compared to GNNs, which are unable to encode relative positions, Transformers leverage dynamic attention capabilities to better represent relative relationships, thereby becoming the standard backbones in large-scale sequential pre-training. However, the subtle difference prompts us to consider: if positions are no longer crucial, could we substitute Transformers with Graph Neural Networks in some fields such as Single-Cell Transcriptomics? In this paper, we first explore the similarities and differences between GNNs and Transformers, specifically in terms of relative positions. Additionally, we design a synthetic example to illustrate their equivalence where there are no relative positions between tokens in the sample. Finally, we conduct extensive experiments on a large-scale position-agnostic dataset-single-cell transcriptomics-finding that GNNs achieve competitive performance compared to Transformers while consuming fewer computation resources. These findings provide novel insights for researchers in the field of single-cell transcriptomics, challenging the prevailing notion that the Transformer is always the optimum choice.

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. Any repos shown below are weak matches — 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{qi2025graph,
  title  = {Graph Neural Networks as a Substitute for Transformers in Single-Cell Transcriptomics},
  author = {Jiaxin Qi and Yan Cui and Jinli Ou and Jianqiang Huang and Gaogang Xie},
  year   = {2025},
  eprint = {2507.04125},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2507.04125v1}
}

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/2507.04125.svg)](https://codeofpaper.com/paper/2507.04125)

Discussion