CellMSA: Context Modeling for Single-Cell Representation Learning

Suyuan Zhao, Minghao Liu, Yizhen Luo, Zaiqing Nie
9/30/2026
q-bio.GNcs.AIcs.LG

Official code: PharMolix/CellMSA (0 stars, last commit 2026-09-29).

Abstract

Single-cell transcriptomics enables profiling of cellular states at unprecedented resolution, but its high dimensionality, sparsity, and technical batch effects pose significant challenges for representation learning. Existing single-cell foundation models typically encode each cell independently or only model cells from the same batch for denoising, thereby underutilizing the rich relational information across batches and cell types to model gene expression patterns. We argue that single-cell models can benefit from more informative cell-context modeling. By comparing consistency and variation across cells, models can capture fine-grained gene-gene dependencies associated with cell states, which are essential for learning high-quality representations. Inspired by the use of multiple sequence alignment (MSA) context in protein modeling, we propose CellMSA, a single-cell representation learning framework that introduces an MSA-inspired inductive bias into transcriptomic modeling. For each target cell, CellMSA retrieves relevant cells from different batches and biologically related cell types as context, and summarizes cross-cell patterns into a context-dependent gene-pair representation. This representation is then injected into a pair-aware target-cell encoder for fine-grained representation learning. We pretrain CellMSA on a large-scale human single-cell corpus of approximately 109 million cell observations, including 65.6 million primary observations. Experiments show that our framework consistently outperforms existing methods across multiple benchmarks. Code is available at the following repository: https://github.com/PharMolix/CellMSA.

View on arXivView PDF

Code Implementations(1)

PharMolix/CellMSAOfficial100%
00Shell, PythonSep 29, 20263 weeks agoNOASSERTION

Similar Papers

Cite this paper

@article{zhao2026cellmsa,
  title  = {CellMSA: Context Modeling for Single-Cell Representation Learning},
  author = {Suyuan Zhao and Minghao Liu and Yizhen Luo and Zaiqing Nie},
  year   = {2026},
  eprint = {2609.38908},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2609.38908v1}
}

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

Discussion