The algorithm starts by generating a number of weak learners. Each weak learner consists of a few hash codes (imaginary boxes, i.e., piles of cells). For cells assigned to the same hash code, their pairwise similarity scores are set to be 1s and 0s otherwise. Each weak learner is a voter. The final similarity probabilities between cells are calculated by averaging the corresponding similarity scores from each voter. The calculated probabilities are used in embedding estimation and optimization. The important scores of genes in each weak learner are obtained by averaging the hash codes' entropy values. Details of the algorithm can be found in Methods and Supplementary Information.