Representing cells as sentences enables natural-language processing for single-cell transcriptomics

Rahul M. DhodapkarbioRxiv 2022 · DOI

TL;DR

This paper introduces "cell2sentence," a novel method that transforms single-cell RNA sequencing (scRNA-seq) data into a format compatible with natural language processing (NLP) tools. By representing cells as "sentences" of genes ordered by abundance, the authors demonstrate that established NLP techniques can be applied to scRNA-seq data for tasks like cell type classification and cross-species integration, opening new avenues for biological discovery.

What Problem Does This Paper Address?

Single-cell transcriptomics generates massive datasets of gene expression levels for individual cells. However, these data are typically represented as gene-by-cell matrices, which are not directly compatible with the powerful tools developed in natural language processing (NLP). NLP tools, such as those used for text analysis and machine translation, require data structured as sequences of words (sentences). This incompatibility limits the application of advanced NLP techniques to scRNA-seq data, hindering the exploration of complex biological systems and cross-species comparisons.

Methods

The core innovation is the cell2sentence method. It transforms a gene expression matrix into "cell sentences" by:

  1. Rank Normalization: Genes within each cell are ranked based on their expression abundance.
  2. Abundance Ordering: Genes are then ordered in a sequence from most to least abundant.
  3. Sentence Representation: This ordered list of genes, with ties broken randomly, forms a "cell sentence." Genes are treated as "words," and cells as "sentences."

This representation allows for the direct application of NLP techniques:

  • Edit Distances: Standard string-matching algorithms (Levenshtein, Damerau-Levenshtein, Jaro, Jaro-Winkler, zlib-NCD) are used to measure similarity between cell sentences, effectively clustering cells.
  • Word Embeddings (word2vec): The cell sentences are used to train word2vec models, generating gene embeddings that capture semantic relationships between genes. These embeddings are then averaged to create cell embeddings.
  • Cross-Species Translation: Fused Gromov-Wasserstein optimal transport, a technique adapted from cross-lingual translation, is employed to map gene embeddings from one species to another, enabling unified analysis of scRNA-seq data across species.

Datasets

The study utilized several publicly available scRNA-seq datasets for evaluation:

  • Peripheral Blood Mononuclear Cells (PBMCs): Used for demonstrating edit distance clustering.
  • Human Retinal Data: Used for training gene embeddings and evaluating cell embeddings.
  • Rhesus Macaque Retinal Data: Used for cross-species integration.
  • Mouse Developmental Retina Data: Used for training gene embeddings and evaluating cell embeddings.
  • Chick Retina Data: Used for training gene embeddings and evaluating cell embeddings.

The paper does not introduce new benchmark datasets but rather applies existing NLP methods to established scRNA-seq datasets.

Key Insights and Ideas

  • Bridging Biology and Language: The fundamental insight is that the relative abundance of genes within a cell can be analogized to the sequence of words in a sentence, allowing powerful NLP tools to be applied to biological data.
  • Robust Cell Clustering: Standard edit distance metrics, when applied to cell sentences, effectively cluster cells into known types, demonstrating that this representation captures biologically relevant information.
  • Meaningful Gene Embeddings: Training word2vec on cell sentences yields gene embeddings that show improved coherence within biological gene sets (hallmark gene sets) compared to traditional dimensionality reduction techniques like PCA and UMAP.
  • Cross-Species Unification: The adaptation of cross-lingual translation techniques allows for the integration of scRNA-seq data across different species, revealing evolutionary conservation patterns in cell types.

Key Results

  • Effective Cell Typing: Edit distance measures applied to cell sentences successfully clustered cells into distinct types, comparable to standard scRNA-seq analysis pipelines (e.g., scanpy).
  • Improved Gene Set Coherence: word2vec-generated gene embeddings showed significantly better separation between genes within the same hallmark gene set versus genes in different sets across multiple species.
  • Cross-Species Alignment: Fused Gromov-Wasserstein optimal transport successfully mapped retinal cell types from mouse, macaque, and chick onto a human gene embedding space, showing that cells of the same type clustered together across species.
  • Evolutionary Patterns: The cross-species analysis revealed that cell-type similarity decreased with increasing evolutionary distance, consistent with known biological relationships.

Limitations and Future Work

  • Loss of Absolute Counts: The cell2sentence transformation is a lossy process, as only the relative ordering of genes is retained, not their absolute expression counts. This means that order-preserving changes in gene expression might not be detected.
  • Robustness to Noise: Conversely, this lossy nature might make cell sentence representations more robust to variations in sequencing depth or RNA recovery, which are common challenges in scRNA-seq.
  • Future Directions: The authors suggest that this framework opens up new possibilities for applying advanced NLP models (like transformers) to scRNA-seq data for more complex analyses. The cross-species integration method could be valuable for understanding conserved biological mechanisms and developing therapeutics for diseases.

Summary updated

Abstract

A bstract Gene expression matrices commonly used in single-cell transcriptomics, cannot be directly analyzed with tools developed for natural languages. By restructuring these matrices as abundance-ordered sequences of genes, we generate cell sentences: rank-normalized, positionally encoded expression data. We show that these cell sentences can be analyzed using existing tools from natural language processing to unify cell and gene representations across species.
BibTeX
@misc{dhodapkar2022representing,
  author = {Rahul M. Dhodapkar},
  title = {{Representing cells as sentences enables natural-language processing for single-cell transcriptomics}},
  year = {2022},
  doi = {10.1101/2022.09.18.508438},
  howpublished = {bioRxiv},
}
Figure