A relay velocity model infers cell-dependent RNA velocity

RNA velocity provides an approach for inferring cellular state transitions from single-cell RNA sequencing (scRNA-seq) data. Conventional RNA velocity models infer universal kinetics from all cells in an scRNA-seq experiment, resulting in unpredictable performance in experiments with multi-stage and/or multi-lineage transition of cell states where the assumption of the same kinetic rates for all cells no longer holds. Here we present cellDancer, a scalable deep neural network that locally infers velocity for each cell from its neighbors and then relays a series of local velocities to provide single-cell resolution inference of velocity kinetics. In the simulation benchmark, cellDancer shows robust performance in multiple kinetic regimes, high dropout ratio datasets and sparse datasets. We show that cellDancer overcomes the limitations of existing RNA velocity models in modeling erythroid maturation and hippocampus development. Moreover, cellDancer provides cell-specific predictions of transcription, splicing and degradation rates, which we identify as potential indicators of cell fate in the mouse pancreas.

Supplementary Fig. 2. RNA velocity estimation for branching genes in the hippocampal neurogenesis dataset.
Comparison among the RNA velocities estimated by cellDancer, scVelo (dynamic model), velocyto (static model), DeepVelo, and VeloVAE in the hippocampal neurogenesis dataset.cellDancer outperforms the other four models for branching genes.First, we build a simplified neural network (Note Figure 1B) which has an input layer, a hidden layer, and an output layer.We separately train a network for each gene.We assume genespecific constant values of , , and .Next, we develop a workflow to solve Eqn.(1) by optimizing the network as follows: (1) For a given gene, the normalized (across all the cells) abundances of the unspliced and spliced mRNA ( $ and  $ ) for one cell  are input to the network (Note Figure 1B).
Weights {} and biases {} are applied to the input through a hidden layer to get ( %  $ +  !,  &  $ +  ' ).Specifically in this simplified demonstration neural network, the weights are analogs of  and  (( % ~  and  & ~−  ), and the biases are 0.
We apply this network model to a simulation dataset for a gene following the dynamics in Eqn.
(1) ( = 5.2,  = 2.0,  = 1.0; see details of the simulation in Methods).The initial guess was set to  = 1.0,  = 1.0,  = 0.5.We applied the adaptive gradient optimization algorithm Adam to minimize the total loss and the learning rate was 0.001.Results show that after each round (epoch) of training, prediction approaches closer to the ground truth (Note Figure 1C).In 1,500 epochs (within a few seconds), the prediction has converged and matches with the background truth, indicating the applicability of neural network to velocity estimation.
In practice, a more sophisticated deep neural network is constructed in cellDancer and trained to predict the reaction rates for a gene in all  cells { < $ ,  ?$ ,  < $ } $7!,',…,6 simultaneously.The network consists of an input layer with abundances of a gene from all the cells, two hidden layers with 100 nodes fully connected to all the input nodes, and an output layer with 3 using a sigmoid activation function (see Methods).

Note Figure 1 .
A model-based neural network for RNA velocity inference.A. The transcriptional dynamics of a gene switching between the "on" and the "off" states are generalized with a Heaviside step function.B. A prototype neural network model demonstrates its suitability to learn the reaction rates."u" and "s" indicate unspliced and spliced reads.C. cellDancer's network quickly converges to the ground truth in 1,500 epochs of training.