during the training phase, we used the following settings: early _ stopping _ metric was set to val _ prototype _ loss; mode was set to min; threshold was set to 0; patience was set to 20; reduce _ lr was enabled, with lr _ patience set to 13 and lr _ factor set to 0. 1; n _ epochs were set to 5; pretraining _ epochs were set to 4; eta was set to 10; alpha _ epoch _ anneal was set to 100. to benchmark and compare how different sample variances affect integration, we selected ten random samples from the dataset as a control and another ten random samples with the same sample variance, such as samples from the same organoid tissue type. each group of selected samples was integrated using the scpoli method with the same settings as in the heoca integration. the scib method was then used to benchmark the different integrations. the difference in scib output between the control and each sample variance pair was calculated to represent the effect of sample variance on integration. for benchmarking the effect of cell number variance, we selected the same ten samples as the control and performed a random subset of each sample to the median or mean number of cells in all the heoca samples. the subsequent comparison followed the same procedure as the other sample variance benchmarks. after integration, we recluster all cells in the atlas based on the scpoli integrated embedding using the leiden method with a resolution of 10 ( heoca and hioca ) and 10 ( hloca ), respectively. annotations were then assigned to each cluster using the dominant cell type per cluster. some clusters of cells were adjusted according to the marker genes expression. we randomly subset 100, 000 cells from the atlas. for each cell type, we used the wilcoxon rank - sum test to identify degs, selecting the top ten genes as marker genes for each cell type. we combined the selected marker genes and performed hierarchical clustering on the resulting gene set. the human fetal endod erm tissue atlas was downloaded. the normal endod erm tissues including the esophagus, lung, liver, intestine, stomach and pancreas were subsetted. the top 3, 000 highly variable genes were subsetted for data integration. the cells in each tissue were integrated using the scpoli method, with the cell _ type serving as the cell - type key for integration and with the same parameters used in the heoca integration. the scpoli model was saved for the downstream comparison. the tabula sapiens multiple - organ adult single - cell transcriptomic atlas of humans was downloaded ( https: / / tabula - sapiens - portal. ds. czbiohub. org / ). the endod erm tissues including the liver, lung, pancreas, small intestine, large intestine, prostate and stomach were subsetted. the endothelial, epithelial and stromal compartments of cells were subsetted. the top 3, 000 highly variable genes were subsetted for data integration. the cells in each tissue were integrated using the scpoli method, with the cell _ ontology _ class serving as the cell - type key for integration and with the same parameters used in the heoca atlas integration. the scpoli model was saved for the downstream comparison. for each organoid sample, the same set of variable genes used in the primary tissue atlas ( adult or fetal ) was chosen, and the scpoli query was executed using identical parameters to those used in the primary tissue atlas training model. the umap embedding was transformed using the primary tissue atlas umap model. for each cell, the system selected its 100 nearest neighbors from the heoca dataset. the predicted tissue for the cell was assigned based on the tissue that was most frequently observed among its 100 nearest neighbors. to compare and correlate cell states in primary tissue and organoid models, the milor method was used to define and construct neighborhood graphs for each data source separately. we computed the transcriptional similarity graph for the primary tissue reference using 30 nearest neighbors and the umap representation of latent representations of integrated primary tissue cells. to compute the transcriptional similarity graph for the organoid reference, we used the 30 nearest neighbors and the umap representation of integrated embedding of organoid cells. single - cell organoid data were integrated using scpoli and 3, 000 highly variable genes as described earlier. we used the default parameters for all the remaining computational steps in building the neighborhood graphs. we then used the r package scrabbitr to compute the correlation between each pair of neighborhoods in the primary tissue and organoid reference and to annotate the results at cell - type or tissue level. the neighborhood correlations were computed using 3, 000 highly variable genes that were found in the highly variable genes in the primary tissue single - cell reference atlases. this step results in two neighborhood correlation matrices: a primary tissue - correlation matrix in which each entry marks correlation of the expression profile of a given neighborhood in the primary tissue with the heoca, and an organoid - correlation matrix that stores the correlation of expression profiles in each neighborhood of the organoid atlas with the primary tissue atlas. this procedure was also repeated for each organoid derivation protocol, that is asc -, fsc - and psc - derived protocols. to compare the correlation between cell states in the primary tissue and between organoid derivation protocols, we subtracted the primary tissue – neighborhood correlation matrices computed with respect to neighborhoods for each derivation protocol. this approach of comparing primary tissue and organoid by correlation of neighborhood graphs is more reliable than the alternative reference mapping strategy, because it removes the dependance of the reliability and accuracy of the conclusions to mapping uncertainty, and allows for computing correlation statistics on graphs that are constructed based on transcriptional similarity of cells in each data source. for rna velocity analysis of the hioca, we first excluded samples missing splicing information. we then applied scvelo to generate a umap representation with stream trajectory visualization. the velocity pseudotime, spanning from stem cells to enterocytes and colonocytes, has been rescaled to a range of 0 to 1. we calculated and displayed the average expression of markers in specific bins. the top 3, 000 highly variable genes were subsetted for data integration. to integrate all the cells, we applied the scpoli method with the same parameters used in the heoca atlas integration. the scpoli model was saved for the downstream comparison. lung organoid single - cell data curate d from different studies was subsetted on top 3, 000 highly variable genes for integration. we applied scpoli to learn 30 - dimensional latent representations of the cells, and 10 - dimensional latent representations of the samples using a neural network with 2 hidden layers each of size 512. the network was trained setting n _ epochs = 12, pretraining epochs to 10, eta = 10, patience = 20, lr _ patience = 13, lr _ factor = 0. 1, alpha _ epoch _ anneal = 100, reduced _ lr = true and prototypical loss of the validation set as the early stopping criteria. the scpoli model was saved for the downstream comparison. the scrna - seq data from both duodenum fetal and adult primary tissues were obtained from two research papers. we focused on epithelial cells and subsetted them for analysis. the top 3, 000 highly variable genes were subsetted for data integration. to integrate all the cells, we applied the scpoli method with the same parameters used in the heoca atlas integration. the scpoli model was saved for the downstream comparison. for each organoid sample, the same set of variable genes used in the primary tissue atlas was chosen, and the scpoli query was executed using identical parameters to those used in the primary tissue atlas training model.