scimilarity.SCimilarity
An MLP encoder that maps a single cell's gene expression profile to a 128-dimensional embedding for cell search.
Molecules, proteins and genomics · 17 operations Checked
Click or tap a spot to read it up close. Scroll or drag inside the diagram to move through it. Zoom with + and − or Ctrl and scroll. Press 0 for the whole graph. Swipe inside the diagram to move through it. Use + and − to zoom.
At a glance
- Parameters
- 31.1M
- Operations
- 17
- Framework
- PyTorch
- Recurrent
- No
- Published
- 2023, Nature
- Cited by
- 137 (as of 22 October 2026)
- Authors
- Graham Heimberg, Tony Kuo, Daryle J. DePianto and others
- License
- Apache-2.0
- Checked
- Passed: the trace was replayed operation by operation and matched the model's own output for this input.
Files
The file opened in a new tab. Use your browser's Save command there to keep it.
The diagram is a drawing of a TorchLens trace of the source code. It contains no code or weights.
Details
- Stable ID
- m9090
- Graph hash
- 5e615e87d68e288beac0f67d8e275a27b5d718dfc307f24ba7eb0e01196b70c9
- Skeleton hash
- 75a62bb25338aaf6fa3435f96dbb9818c62529f5d334b4aa13cb83fff47daba4
- Architecture hash
- 678cbe89dd273af3a3ea165540224cf9b06469b18e373740c70fa48aa9d4971e
- Diagram SHA-256
- a6537cb9b1f9b64e6cbf9193147e8b8fcb8643ec143627eb3a3380665f6a88cf
- TorchLens version
- 2.36.0
- Renderer
- graphviz 2.43.0+pyvips 3.2.0+libvips 8.18.7+render-opts@06c1f0d3
- Check
- Forward pass replayed in PyTorch
What it is
SCimilarity embeds the gene expression profile of a single cell so that transcriptionally similar cells can be found across large collections of single-cell RNA sequencing studies. The paper draws the analogy to metric-learning models for facial recognition, which embed images so that images of the same person are closer than images of different people.
The model consists of one fully connected encoder and one decoder stage. The encoder reduces an expression profile from 28,231 genes through four hidden layers with dimensions 1,024, 1,024, 1,024 and 128. The 128-dimensional outputs are normalized to unit length, so every cell representation lies on the surface of a hypersphere. During training the input layer receives 40% dropout and each hidden layer 50%.
Training optimizes two objectives at once, the first being a supervised triplet loss that embeds expression profiles from matching cell types close together. The second is an unsupervised mean squared error reconstruction loss, which encourages the model to preserve variation from the input expression profiles. The decoder is not part of the conventional triplet loss architecture and is included to compute that reconstruction loss. The authors use SCimilarity to query a 23.4-million-cell atlas of 412 single-cell RNA-sequencing studies. They define the SCimilarity score between two cells as the inverse of the cosine distance of their embeddings.
Key idea. SCimilarity uses metric learning to learn one representation of single-cell expression profiles that supports rapid queries for similar cells across tens of millions of profiles.
- SCimilarity
- single-cell foundation model
- cell atlas
- scRNA-seq
- cell similarity search
- cell embedding
- metric learning
- triplet loss
- cell type annotation
- Human Cell Atlas
AI-written summary, based on the paper and checked automatically against it; not reviewed by a person. Corrections welcome.
Cite the paper
@article{Heimberg_2024, title={A cell atlas foundation model for scalable search of similar human cells}, volume={638}, ISSN={1476-4687}, url={http://dx.doi.org/10.1038/s41586-024-08411-y}, DOI={10.1038/s41586-024-08411-y}, number={8052}, journal={Nature}, publisher={Springer Science and Business Media LLC}, author={Heimberg, Graham and Kuo, Tony and DePianto, Daryle J. and Salem, Omar and Heigl, Tobias and Diamant, Nathaniel and Scalia, Gabriele and Biancalani, Tommaso and Turley, Shannon J. and Rock, Jason R. and Corrada Bravo, Héctor and Kaminker, Josh and Vander Heiden, Jason A. and Regev, Aviv}, year={2024}, month=Nov, pages={1085–1094} }