Sparse Autoencoders Reveal Interpretable Features in Single-Cell Foundation Models

Flavia Pedrocchi, Florian Barkmann, Amir Joudaki, Valentina Boeva

TL;DR

By training sparse autoencoders (SAEs) on the intermediate token representations of single-cell foundation models (scGPT and scFoundation), this work reveals that pre-trained models naturally decompose transcriptomic data into distinct biological concepts, cell types, and sequencing artifacts. Furthermore, the authors show these features are causally active: suppressing batch-associated features during inference significantly cleans up technical noise while preserving underlying biology.

What Problem Does This Paper Address?

Single-cell foundation models (scFMs) adapt transformer architectures from natural language processing to model cellular gene expression profiles. Despite their promise for tasks like cell-type classification, perturbation prediction, and batch integration, scFMs remain notoriously opaque "black boxes" that often struggle in zero-shot settings and easily overfit to experimental artifacts.

Prior attempts to interpret scFMs focused primarily on static, pooled cell embeddings. This paper tackles the internal forward pass itself: What biological and technical signals do transformer layers actually compute across individual gene tokens, and can we intervene on these internal states to control model behavior?

Methods

The authors train BatchTopK Sparse Autoencoders (SAEs) directly on the residual stream of transformer blocks:

  • Intermediate Representation Probing: activations are extracted at token level (250 gene tokens sampled per cell, packed into batches of 8,192). Layer 10 (out of 12) is evaluated for representation analysis, while Layer 5 is targeted for steering.
  • Evaluation & Attribution:
  • Cell-level associations: Gene-level SAE activations are max-pooled across each cell to compute Adjusted Mutual Information (AMI) and F1 scores against cell-type and batch annotations.
  • Biological enrichment: Over-representation analysis (ORA) using Gene Ontology (GO) and PanglaoDB marker gene sets.
  • Embedding Recovery Score: A bespoke metric quantifying how well cell embeddings are reconstructed from SAE-compressed tokens relative to zeroed-out baselines.
  • Causal Feature Steering: Features with the highest AMI with respect to batch labels are clamped to $-2$ whenever active during inference, decoding the intervened tokens back into the remaining transformer layers.

Datasets

  • CellXGene Census: Over 37 million healthy cells across diverse tissues, used to analyze foundational feature distributions.
  • COVID-19 PBMC: 422,220 cells spanning 16 annotated cell types across healthy, acute COVID-19, and post-COVID states.
  • Pancreas, Lung, and Immune Integration Benchmarks: Curated benchmark datasets (Luecken et al., 2022) featuring complex cross-batch, donor, and multi-platform sequencing technologies (e.g., SMARTer, Drop-seq, 10x Chromium, CEL-Seq2).

Key Insights and Ideas

  • Dual Feature Decomposition (Gene- vs. Cell-Specific): SAEs split representations into gene-intrinsic properties (expression-level bins, ribosomal/mitochondrial gene families) and emergent cell-state concepts constructed across tokens by self-attention.
  • Latent Disease Signatures from Healthy Pre-training: Even though pre-trained exclusively on healthy cells, scGPT contained latent features that specifically activated in monocytes and dendritic cells from post-COVID-19 patients, highly enriched for persistent inflammatory response pathways ($p = 1.19 \times 10^{-23}$).
  • Cell Types Are Fragmented Across Studies: Pre-trained scFMs often fail to build a single, unified manifold for a given cell type. Instead, SAE features align more strongly with study-specific subsets of cell types than with global annotations ($\Delta\text{AMI} > 0$), explaining why un-fine-tuned scFMs exhibit poor cross-study generalization.
  • Architecture Dictates Learned Concepts: scGPT (which bins expression values) reliably creates high-expression feature detectors, while scFoundation (continuous values + read-depth downsampling) distributes expression signals and concentrates on low-expression features.

Key Results

  • Interpretable Dictionary: Among 100 randomly inspected features from scGPT on CellXGene, 26 captured specific cell types, 29 captured biological processes, 7 mapped to curated gene sets, and 2 captured technical batch artifacts (~36% remained uncharacterized heuristic patterns).
  • Steering Reduces Batch Effects: Clamping batch-correlated features dramatically improved batch mixing on fine-tuned models:
  • On the Pancreas dataset, steering fine-tuned scGPT achieved a total integration score of 0.69 (batch: 0.72, bio: 0.67), outperforming scGPT’s native Domain Adaptive Regularization (DAR) baseline (0.65).
  • On the Lung dataset, fine-tuned steered scGPT reached a total score of 0.82, surpassing native fine-tuned scGPT (0.73).
  • Layer Selectivity: Systematic ablations across layers 1–12 revealed that middle layers (5–8) yield the highest steering efficacy, matching where batch signals peak in mutual information.
Pancreas Batch Integration (Total Score, higher = better)
┌─────────────────────────────────┬──────┐
│ scVI (Specialized Deep Baseline) │ 0.93 │
│ scGPT (Fine-tuned + Steered)    │ 0.69 │
│ scGPT (Fine-tuned + DAR)        │ 0.65 │
│ scGPT (Fine-tuned Unsteered)    │ 0.50 │
│ scFoundation (Zero-shot Steered)│ 0.41 │
│ Unintegrated Baseline           │ 0.45 │
└─────────────────────────────────┴──────┘

Limitations and Future Work

  • Manual Feature Labeling: Roughly one-third of SAE features could not be annotated by existing gene ontologies, showing that automated semantic interpretation in single-cell biology remains challenging.
  • Steering is Not an scVI Replacement: While proof of causal influence is established, feature steering does not yet match state-of-the-art specialized integration frameworks like scVI ($0.93$ total score on Pancreas).
  • Future Directions: Incorporating explicit batch-disentanglement constraints during foundation model pre-training, refining SAE automated labeling pipelines, and scaling intervention-based concept editing without fine-tuning.

Summary updated

BibTeX
@inproceedings{pedrocchi2026sparse,
  author = {Flavia Pedrocchi and Florian Barkmann and Amir Joudaki and Valentina Boeva},
  title = {{Sparse Autoencoders Reveal Interpretable Features in Single-Cell Foundation Models}},
  booktitle = {Gen2 @ ICLR},
  year = {2026},
  url = {https://openreview.net/forum?id=JIQEVnSgG3},
}
Figure