Yu-An Huang, School of Computer Science, Northwestern Polytechnical University, Xi’an 710129, Shaanxi, China. E-mail: yuanhuang@nwpu.edu.cn
Abstract
Aims: Single-cell RNA sequencing (scRNA-seq) has emerged as a cornerstone technology in tumor microenvironment research. Accurate cell-type annotation is fundamental to downstream scRNA-seq analysis. However, automated tools are often highly sensitive to dataset noise and show limited adaptability in cross-patient scenarios. To address these challenges, we propose scAdaptAnno, a graph-based target domain adaptation framework for cross-patient single-cell annotation.
Methods: In the graph construction phase, scAdaptAnno integrates both gene expression similarity and biological prior knowledge to build a more biologically meaningful cell graph. By leveraging cell representations enriched with biological priors to mitigate noise in gene expression data and by implementing a bidirectional adaptation mechanism, the model achieves source-free target domain alignment.
Results: We performed comprehensive benchmarking against nine leading methods across multiple datasets spanning various cancer types. The results demonstrate that scAdaptAnno achieves state-of-the-art performance.
Conclusion: scAdaptAnno is a robust and accurate single-cell annotation tool that excels in cross-patient cell-type annotation transfer. By integrating biologically informed graph construction and bidirectional source-free domain adaptation, it delivers reliable, noise-resistant performance across diverse tumor microenvironments, providing an effective solution for automated cell-type annotation in multi-patient scRNA-seq studies.
Keywords
1. Introduction
The tumor microenvironment (TME) is a complex ecosystem formed by the intricate interactions among tumor cells, immune cells, stromal cells, and the vasculature[1,2]. Its composition and dynamic evolution directly modulate tumorigenesis and progression, immune evasion, and therapeutic response[3-5]. Consequently, in-depth dissection of cellular heterogeneity within the TME has become a cornerstone of contemporary cancer research and precision medicine[6]. With its high-resolution capabilities, single-cell RNA sequencing (scRNA-seq) enables the comprehensive characterization of gene expression profiles, intercellular interaction networks, and functional states of various cell types in the TME at single-cell resolution[7,8]. This technology serves as a powerful tool for elucidating the mechanisms of the tumor immune microenvironment, predicting the efficacy of immunotherapies, and facilitating the development of personalized treatment regimens[9,10].
In scRNA-seq analysis, accurate cell-type annotation is fundamental to subsequent functional interpretation and downstream analysis[11]. Current cell-type annotation methods are primarily divided into two major categories: manual annotation and automated annotation. Traditional manual annotation typically begins with clustering cells to delineate subpopulations, followed by identification of differentially expressed genes within each cluster and annotation based on canonical marker genes of known cell types. This workflow is heavily dependent on the researcher’s biological expertise and experience; it is not only time-consuming and labor-intensive but also highly susceptible to subjective bias, making it particularly difficult to ensure consistency when processing large-scale cross-patient datasets. To overcome the limitations of manual annotation, researchers have developed various automated cell-type annotation tools[12,13]. Based on their underlying algorithmic principles, these tools can be broadly categorized into three classes: (1) marker gene-based methods, such as MarkerCount[14], which rely on predefined marker gene sets for cell-type assignment. However, these methods are highly susceptible to inter-patient variations in marker gene expression and batch effects, resulting in a significant decline in accuracy in cross-patient scenarios; (2) correlation-based methods, such as scRNA-seq by reference to bulk transcriptomes (SingleR)[15], scmap-cell[16], and Characterization of cEll Types Aided by Hierarchical classification (CHETAH)[17], which infer cell types by calculating the similarity between the expression profiles of query cells and reference datasets. However, when substantial distribution shifts exist between cross-patient datasets, correlation matching often fails, leading to annotation bias; (3) supervised learning-based methods, such as sciBet[18], SingleCellNet[19], and scLearn[20], which train classifiers on reference datasets to predict cell types for new cells. Although these methods perform well on intra-batch data, they often exhibit insufficient generalization capability when faced with patient-specific noise and biological variation, resulting in a decrease in cross-patient performance[21]. Recently, domain adaptation methods have been introduced into the field of single-cell annotation in an effort to mitigate cross-patient distribution shifts[22-24]. While these methods have made notable progress, most still employ strategies such as domain adversarial learning, which require the joint input of unlabeled query datasets and reference datasets during the training process. This dependency prevents trained models from being directly transferred to new patient datasets, thereby limiting their practical utility and scalability in clinical settings.
To address the aforementioned challenges, we propose scAdaptAnno, a target graph domain adaptation-based model for cross-patient single-cell annotation transfer. The framework of the scAdaptAnno model is illustrated in Figure 1. To effectively mitigate the high noise inherent in scRNA-seq data and the substantial distribution shifts across patients, our method integrates gene expression similarity with biological prior knowledge[25] during the graph construction phase. This produces a more biologically meaningful cell–cell graph, in which cell representations enriched with biological priors are leveraged to offset noise at the gene expression level. Furthermore, inspired by recent advances in the field of algorithms[26], scAdaptAnno introduces a bidirectional adaptation mechanism to achieve source-free target domain alignment. Unlike conventional graph domain adaptation methods such as unsupervised domain adaptive graph convolutional networks (UDAGCN)[27], adaboosting graph convolutional network (AdaGCN)[28], and domain adaptive network embedding (DANE)[29], which mainly focus on representation alignment or structural consistency between source and target graphs, scAdaptAnno is specifically designed for source-free cross-patient single-cell annotation. It does not require access to source-domain data during target adaptation, but instead relies on target-domain neighborhood information, memory-bank-guided pseudo-labeling, and dynamic graph refinement to progressively improve target-domain alignment. Moreover, by incorporating gene ontology (GO) biological prior knowledge into graph construction, scAdaptAnno provides a biologically informed cell graph that is more suitable for noisy and heterogeneous scRNA-seq data. Specifically, this mechanism operates through a collaborative loop between model adaptation and graph adaptation: the model adaptation phase optimizes model parameters using local neighborhood predictions and global class prototypes of target cells, while the graph adaptation phase dynamically updates the cell graph structure and node representations via neighborhood contrastive learning based on the model’s predictions.
Figure 1. Workflow of scAdaptAnno. scRNA-seq: single-cell RNA sequencing; PCA: principal component analysis; GO: gene ontology; GNN: graph neural network; HVG: highly variable genes; KNN: K-nearest neighbors.
These two phases iteratively promote each other, thereby achieving precise target domain alignment without requiring access to labeled source data. Compared with existing methods, scAdaptAnno eliminates the need for simultaneous access to both source and query datasets during training and fully exploits the complex relationships among cells. Benchmarked on cross-patient datasets spanning multiple cancer types such as breast invasive carcinoma, colorectal cancer, and leukemia, scAdaptAnno demonstrates significant performance advantages. It provides a novel, efficient, robust, and highly transferable tool for automated single-cell annotation in tumor microenvironment research.
2. Methods
2.1 Problem definition
In cross-patient cell-type annotation tasks, datasets derived from different patients are defined as the source domain and the target domain. Specifically, in each cross-patient annotation task, one patient dataset was used as the reference dataset for source-domain training, while another patient dataset from the same cancer type was used as the query dataset for target-domain annotation. In this study, the training set refers to the labeled reference dataset used for source-domain pretraining, while the test set refers to the query dataset used for target-domain adaptation and final evaluation. The query dataset was treated as unlabeled during adaptation, and its labels were used only for performance evaluation. No additional validation subset was split from the reference dataset. We use d∈{s, t} to denote the source domain and target domain, respectively. For each domain, the single-cell dataset contains nd cells and is represented by an original gene expression matrix , where g denotes the number of genes. After preprocessing and dimensionality reduction, the low-dimensional node feature matrix is denoted as . The corresponding cell graph is represented as
| Symbol | Description |
| Domain index | |
| d = s | Source domain |
| d = t | Target domain |
| Xd | Original gene expression matrix of domain d |
| PCA-reduced node feature matrix of domain d | |
| Sd | Cell–gene set score matrix computed by AUCell |
| PCA-reduced biological prior representation | |
| Gd | Cell graph of domain d |
| Vd | Set of cells in domain d |
| Ad | Fused adjacency matrix of domain d |
| AdeXPR | Adjacency matrix constructed from expression similarity |
| AdGO | Adjacency matrix constructed from GO biological prior features |
| α | Graph fusion weight |
| fθ(·) | Feature extractor of the source-pretrained GNN |
| gΦ(·) | Classifier of the source-pretrained GNN |
| Z | Target-domain cell representation matrix |
| zi | Representation of cell i |
| pi | Prediction distribution of cell i |
| Bankf | Representation memory bank |
| BankP | Prediction memory bank |
| γ | Momentum coefficient for memory bank updating |
| N(i) | Neighborhood set of cell i |
| λ | Loss weight balancing LCE and LCO |
PCA: principal component analysis; GO: gene ontology; GNN: graph neural network.
2.2 Data preprocessing
In this study, a preprocessing pipeline was applied to all raw scRNA-seq datasets. First, quality control was performed to filter cells and genes by removing low-quality cells with total Unique Molecular Identifier (UMI) counts below 200 and genes detected in fewer than 3 cells. Subsequently, the filtered expression matrix underwent library-size normalization, in which the total expression count of each cell was scaled to 10,000, followed by a log1p transformation. Next, the top 2,000 highly variable genes were selected. The expression matrix was then centered and scaled, after which dimensionality was reduced to 50 principal components via principal component analysis (PCA). Finally, the Harmony algorithm was applied to correct batch effects between the training and test sets, enabling subsequent cell-graph construction and model training. All the preprocessing steps described above were implemented using the Scanpy[30] package.
2.3 Cell graph construction
scAdaptAnno employs a graph construction strategy that simultaneously incorporates gene expression similarity and biological prior knowledge. For each domain d∈{s, t}, the AUCell[31] algorithm is applied to compute gene set enrichment scores for each cell based on gene ontology[25] biological process gene sets. To ensure the reliability of the functional prior information, GO terms containing fewer than five genes were excluded from the analysis. This yields a cell–gene set score matrix
Two independent cell graphs are then constructed for each domain.
For the gene expression–based cell graph, the low-dimensional matrix
The two adjacency matrices are additively fused to obtain the final adjacency matrix of the cell similarity graph:
Where α is a tunable weighting parameter. The resulting cell graph is represented as
2.4 Target graph domain adaptation
To achieve robust target-domain alignment via iterative optimization without requiring access to the source data, we adopt a collaborative loop mechanism between model adaptation and graph adaptation. Specifically, in each iteration, the cell graph is first fixed while model adaptation is performed; subsequently, the model parameters are fixed while graph adaptation is performed. The updated refined graph then serves as input for the next iteration, thereby forming a closed-loop collaboration.
To make the interaction between the two adaptation stages clearer, the overall procedure of target graph domain adaptation can be summarized as follows. First, the target-domain cell graph is fed into the source-pretrained model to obtain cell representations and prediction distributions. Second, the representation memory bank and prediction memory bank are updated using a momentum strategy to maintain stable target-domain features and predictions. Third, neighborhood-aware pseudo-labels are generated by aggregating the prediction distributions of neighboring cells, and global class prototypes are used to weight these pseudo-labels. The model parameters are then updated by optimizing the model adaptation loss. Fourth, with the adapted model fixed, high-confidence target cells are selected to provide reliable self-training signals, and the graph structure and node features are refined through neighborhood contrastive learning. Finally, the refined graph is used as the input for the next round of model adaptation, forming an iterative closed-loop process between model adaptation and graph adaptation.
In the model adaptation phase, the high noise inherent in single-cell data can easily lead to pseudo-label bias, while relying solely on local neighborhoods is prone to error propagation. To address this, we extract cell representations
In the memory bank construction and update process, we introduce a target representation memory bank and a prediction distribution memory bank. These two memory banks are formulated as
To maintain prediction consistency and stability during the training process, a momentum update mechanism is employed to update the memory banks:
Where γ is the momentum coefficient. Here, Bankf stores the historical cell representations of all target-domain cells, while Bankp stores their historical prediction distributions. Instead of relying only on the current mini-batch predictions, the memory banks provide temporally smoothed representations and predictions through momentum updating. This design helps reduce the instability caused by noisy single-cell measurements and prevents pseudo-labels from changing abruptly during iterative adaptation.
In the neighborhood-aware pseudo-label generation step, pseudo-label distributions are computed by leveraging local neighborhood prediction consistency. For each cell i, the prediction distributions of its neighbors N(i) are aggregated to produce the pseudo-label
This operation means that the pseudo-label of cell i is not determined solely by its own prediction, but by the averaged prediction distributions of its neighboring cells stored in Bankp. In this way, local cell–cell consistency in the target-domain graph is used to reduce the uncertainty of individual predictions. However, because local neighborhoods may also contain noisy or incorrectly connected cells, the subsequent global prototype weighting step is introduced to further evaluate whether the representation of each cell is semantically consistent with its assigned pseudo class.
In the global class prototype weighting step, to mitigate local noise, the global class prototypes μmc are obtained by averaging high-confidence samples from the memory bank. The semantic similarity weight sim(zi, μmc) is then computed accordingly. The final model adaptation loss is formulated as the weighted sum of the cross-entropy loss and the instance-prototype contrastive loss:
where λ is a weighting hyperparameter. This loss enables source-free optimization of the model parameters.
Although the model adaptation phase can alleviate source hypothesis bias to a certain extent through local neighborhood consistency and global prototype alignment, the domain shift in single-cell data fundamentally originates from the intrinsic properties of the target cell graph itself. Therefore, scAdaptAnno further introduces a graph adaptation module that dynamically refines the cell graph structure and node features of the target domain, rendering them better aligned with the current domain distribution and thereby forming a mutually reinforcing collaborative loop with model adaptation.
In the graph adaptation phase, the target-domain cell graph structure and node features are dynamically refined with the adapted model fixed. For the target-domain cell graph
To optimize the above parameters in an unsupervised manner, the model first selects a high-confidence sample set D based on the current model predictions:
where ω is the confidence threshold and pi denotes the predicted probability distribution of cell i. This set relies solely on the model’s own output, thereby avoiding potential noise propagation introduced by local neighborhoods.
Subsequently, we construct neighborhood contrastive learning signals by leveraging the representation information stored in the memory bank Bankf. Specifically, for each high-confidence cell i, we select the top K cells with the highest cosine similarity to its representation from the memory bank as the positive sample set posi, while cells with different predicted categories from cell i are treated as the negative sample set negi. By utilizing the reliable semantic information learned during the model adaptation phase, the local structural information of cells in the representation space is explicitly incorporated into the graph refinement process. Finally, the graph adaptation loss is defined as:
where
2.5 Evaluation metrics
To quantitatively evaluate the performance of cell-type annotation, we used Accuracy, F1 score, and Cohen’s Kappa coefficient as the main evaluation metrics. Among them, Cohen’s Kappa coefficient was calculated using the cohen_kappa_score function in the sklearn.metrics module. Cohen’s Kappa measures the agreement between two label sequences while taking into account the agreement that could occur by chance. In this study, the two label sequences correspond to the ground-truth cell-type labels and the predicted cell-type labels, respectively. Formally, Cohen’s Kappa coefficient is defined as:
Where po denotes the observed agreement between the true and predicted labels, and pe denotes the expected agreement by chance, estimated from the empirical class-label distributions. A larger k value indicates stronger agreement between the predicted annotations and the ground-truth annotations after correcting for chance agreement.
2.6 Implementation details
All experiments were implemented using PyTorch 2.4.0. The models were trained and evaluated on a workstation equipped with an NVIDIA GeForce RTX 4070 graphics processing unit (GPU) and an Intel Core i5-11400F central processing unit (CPU). In the benchmark experiments, the number of training epochs for scAdaptAnno was uniformly set to 500. During training, the source-domain model was first optimized using the labeled source patient dataset, and the pretrained model was then adapted to the target-domain cell graph under the source-free setting. The same implementation environment and training configuration were used for all datasets. For baseline methods, we used the default parameter settings reported in the original publications or official implementations, without additional dataset-specific tuning.
3. Results
3.1 Performance comparison of scAdaptAnno with other methods across multiple cancer datasets
We conducted a comprehensive comparison of scAdaptAnno against nine other state-of-the-art methods across three cancer datasets, encompassing a total of 40 reference–query dataset pairs. We employed three evaluation metrics: accuracy, F1 score, and cohen’s kappa coefficient[32]. As illustrated in Figure 2, scAdaptAnno achieved the highest accuracy of 0.87, outperforming singleCellNet (0.84), CHETAH (0.82), and scLearn (0.78). Similarly, scAdaptAnno attained the best overall performance in both F1 score and kappa coefficient (f1 = 0.86, kappa = 0.82). In comparison, singleCellNet yielded a F1 score of 0.83 and a kappa of 0.78, while CHETAH and scLearn achieved f1/kappa scores of 0.82/0.76 and 0.81/0.71, respectively. These results demonstrate that scAdaptAnno exhibits cross-metric robustness and consistently delivers superior performance compared with existing state-of-the-art methods.
Figure 2. Overall performance comparison of scAdaptAnno and other methods across all experiments under three evaluation metrics. Diamond markers indicate the mean performance achieved by each method.
Box plots visualizing the performance of each method reveal that scAdaptAnno exhibits a higher median and a more compact interquartile range compared with most other methods. This indicates that its predictions are not only superior in accuracy but also more consistent. These trends persist across all three metrics, further confirming the robust cross-dataset performance of scAdaptAnno.
We further compared the performance of scAdaptAnno and other methods across different cancer types. As visualized in the heatmap in Figure 3, scAdaptAnno consistently achieved superior performance across all three cancer datasets. Specifically, it attained the highest accuracy on the leukemia dataset (0.919), followed by colorectal cancer (0.872), whereas the breast invasive carcinoma dataset proved to be the most challenging, with an accuracy of 0.849. Using an average accuracy of 0.8 as a benchmark, only singleCellNet surpassed this threshold on the breast invasive carcinoma dataset alongside scAdaptAnno. On the colorectal cancer dataset, singleCellNet, CHETAH, scClassify, scLearn, and sciBet also exhibited competitive performance. Similarly, scAdaptAnno’s strong performance on the leukemia dataset was followed by methods such as singleCellNet, CHETAH, scClassify, scLearn, Seurat, and sciBet, all of which demonstrated robust results.
Figure 3. Performance comparison of scAdaptAnno and other methods across three cancer types.
3.2 Performance of scAdaptAnno and other methods across different cell types
We further evaluated the classification performance of scAdaptAnno and other state-of-the-art methods on various cell types. As shown in the Sankey diagrams in Figure 4, the left side represents the ground-truth cell labels of the query dataset, while the right side indicates the model-predicted cell types.
Figure 4. Performance comparison of scAdaptAnno and three other methods in cell-type classification across different cell types.
Using AYL050 as the reference and OX1164 as the query, CHETAH misclassified a large proportion of Mono/Macro cells as Plasma cells, scLearn assigned many Mono/Macro and NK cells to the “unassigned” category, and singleCellNet misidentified some Mono/Macro cells as NK cells. In contrast, scAdaptAnno accurately assigned the vast majority of Mono/Macro cells to their correct labels.
Furthermore, using P6 as the reference and P7 as the query, scAdaptAnno occasionally misclassified a small proportion of NK cells as CD8 T cells, whereas CHETAH exhibited substantial errors, misidentifying B cells as Malignant cells, Malignant cells as B cells, and NK cells as Malignant cells. scLearn struggled to distinguish Malignant cells, and singleCellNet failed to reliably identify the Malignant cell type. In comparison, scAdaptAnno successfully identified the majority of Malignant cells with high precision.
3.3 High-quality cell embeddings generated by scAdaptAnno
High-quality cell embeddings are highly valuable for various downstream analyses. We used uniform manifold approximation and projection (UMAP)[33] to visualize the cell embeddings generated by scAdaptAnno across four reference-query pairs: AYL050–OX1164, PBMMC_1–PBMMC_2, PBMMC_1–PBMMC_3, and PBMMC_2–PBMMC_3. As illustrated in Figure 5, scAdaptAnno demonstrates strong feature extraction capabilities. The resulting embeddings yield cell clustering performance that is superior or comparable to that obtained from the raw data. For instance, in the AYL050–OX1164 UMAP plots, Malignant cells are more distinctly separated from other cell types when using model-derived embeddings. Furthermore, while UMAP plots based on raw data exhibit some inter-type cell mixing, such overlapping is virtually absent in the embedding-based visualization. Similarly, in the PBMMC_1–PBMMC_2 experiment, the clustering performance derived from embeddings significantly outperforms that from the raw data, highlighting scAdaptAnno’s robust feature extraction capability.
Figure 5. UMAP visualization of cell embeddings generated by scAdaptAnno and PCA embeddings from the original data. UMAP: uniform manifold approximation and projection; PCA: principal component analysis.
3.4 Ablation studies and parameter sensitivity analysis
To comprehensively evaluate the contribution of different model components and the influence of key parameters, the effects of individual model components and key parameters on scAdaptAnno’s performance were examined.
To assess the contribution of the dual-graph construction strategy in scAdaptAnno, we conducted an ablation experiment on the colorectal cancer dataset by separately removing the GO biological prior graph and the expression similarity graph. As shown in Figure 6A, the full scAdaptAnno model achieved the best performance, with an ACC of 0.872, an F1 score of 0.874, and a Kappa coefficient of 0.848. When the GO biological prior graph was removed, the performance decreased to 0.848, 0.849, and 0.819, respectively. When the expression similarity graph was removed, the performance decreased to 0.856, 0.857, and 0.829, respectively. These results indicate that both the GO biological prior graph and the expression similarity graph make important contributions to the performance of scAdaptAnno.
Figure 6. Ablation studies and parameter sensitivity analysis of scAdaptAnno. (A) Ablation analysis of different graph construction modules in scAdaptAnno on the colorectal cancer dataset; (B) Analysis of the effect of the number of neighboring nodes in the cell graph on model performance; (C) Ablation analysis of core modules in the bidirectional collaborative adaptation framework on the leukemia dataset; (D) Robustness analysis of scAdaptAnno under different functional annotation settings, including alternative gene set databases, noisy GO-BP annotations, and incomplete GO-BP annotations; (E) Parameter sensitivity analysis of the graph fusion weight α; (F) Parameter sensitivity analysis of the loss weight λ; (G) Parameter sensitivity analysis of the momentum coefficient used in the memory bank update; (H) Performance comparison of scAdaptAnno with and without Harmony on the leukemia dataset; (I) Variation of test accuracy with increasing training epochs. GO-BP: gene ontology biological process.
In Figure 6B, we examined the influence of the number of neighboring nodes in the graph. scAdaptAnno reached peak performance when the neighbor count was set to 15, while other configurations resulted in slight performance decreases. Based on this observation, the neighbor number hyperparameter of scAdaptAnno was fixed at 15 in all benchmark experiments.
In addition, we further evaluated the independent contribution of each core module in the bidirectional collaborative adaptation framework on the leukemia dataset, as shown in Figure 6C. The full scAdaptAnno achieved an ACC of 0.919, an F1 score of 0.912, and a Kappa coefficient of 0.877. When the bidirectional loop was removed, the performance decreased to 0.861, 0.849, and 0.799, respectively. When the graph adaptation module was removed, the performance further decreased to 0.852, 0.829, and 0.780, respectively. When the model adaptation module was removed, the performance decreased to 0.844, 0.826, and 0.772, respectively. These results indicate that both model adaptation and graph adaptation effectively improve the quality of target-domain cell representations, while their bidirectional collaborative optimization further promotes pseudo-label refinement and graph structure optimization, leading to the best annotation performance.
We also evaluated the sensitivity of scAdaptAnno to different gene set settings. In addition to the original gene ontology biological process (GO-BP) gene sets, Kyoto Encyclopedia of Genes and Genomes (KEGG) and Reactome were used for functional graph construction. Robustness to imperfect annotations was further assessed by introducing 30% random noise into GO-BP annotations or randomly removing 30% of GO-BP annotation information. The results are shown in Figure 6D. When GO-BP gene sets were used, scAdaptAnno achieved the best performance, with an Accuracy of 0.919. The model still maintained favorable performance when alternative databases were used, achieving Accuracies of 0.909 with Reactome and 0.878 with KEGG. Similar trends were observed for the F1 score and Kappa coefficient. These results suggest that the effectiveness of scAdaptAnno is not dependent on a specific biological knowledge database. After noise was introduced into the GO-BP gene sets, scAdaptAnno still exhibited strong robustness. Under the GO-BP Noise 30% setting, the model achieved an Accuracy of 0.908, an F1 score of 0.896, and a Kappa coefficient of 0.856. Even when 30% of the GO-BP annotation information was randomly removed, the model still achieved an Accuracy of 0.891, an F1 score of 0.884, and a Kappa coefficient of 0.833.
To systematically evaluate the sensitivity of scAdaptAnno to key hyperparameters, we further analyzed the effects of the graph fusion weight α, the loss weight λ, and the momentum coefficient used in the memory bank update on model performance. For the graph fusion weight α, this parameter is used to balance the contributions of the expression similarity graph and the GO biological prior graph during graph construction. As shown in Figure 6E, when α increased from 0.2 to 0.8, the overall performance of the model remained relatively stable, with the best performance achieved at α = 0.6. The corresponding accuracy (ACC), F1 score, and Kappa coefficient were 0.872, 0.874, and 0.848, respectively. Therefore, α = 0.6 was used as the default setting in subsequent experiments to achieve a better balance between the two types of graph structural information. For the loss weight λ, this parameter is used to adjust the contributions of different optimization objectives. As shown in Figure 6F, when λ varied from 0.1 to 0.4, the model maintained stable performance and achieved the best results at λ = 0.2, with an ACC of 0.872, an F1 score of 0.874, and a Kappa coefficient of 0.848. Therefore, λ was set to 0.2. For the momentum coefficient used in the memory bank update, this parameter controls the update ratio between historical and current features. As shown in Figure 6G, the overall model performance increased as the momentum value increased, reaching the best performance at momentum = 0.9. The corresponding ACC, F1 score, and Kappa coefficient were 0.872, 0.874, and 0.848, respectively. Therefore, momentum = 0.9 was adopted as the default parameter.
In the data preprocessing step, Harmony was introduced to correct batch effects. We compared scAdaptAnno with and without Harmony on the leukemia dataset, as shown in Figure 6H. When Harmony was used, the model achieved an ACC of 0.919, an F1 score of 0.912, and a Kappa coefficient of 0.877. Without Harmony, the model still achieved an ACC of 0.910, an F1 score of 0.895, and a Kappa coefficient of 0.856. The results showed that Harmony slightly improved model performance, but the overall improvement was limited.
We also analyzed the relationship between the number of training epochs and model performance, as shown in Figure 6I. The test accuracy increased rapidly during the early training stage, reaching approximately 0.90 at around 50 epochs, after which the growth trend gradually slowed down and the best performance was achieved at around 500 epochs.
We compared the computational efficiency of scAdaptAnno with other methods, as shown in Figure 7A,B. In terms of memory usage, scAdaptAnno showed a memory footprint comparable to that of the baseline methods, indicating that the additional memory bank and graph update procedures did not lead to a pronounced increase in memory usage. In terms of runtime, scAdaptAnno required slightly more time than the baseline methods, mainly due to the additional memory bank update and graph adaptation procedures.
Figure 7. Computational efficiency analysis of scAdaptAnno. (A) Memory usage comparison between scAdaptAnno and baseline methods; (B) Runtime comparison between scAdaptAnno and baseline methods.
4. Discussion
In this study, we proposed scAdaptAnno, a novel target graph domain adaptation framework for source-free cross-patient cell-type annotation in TME scRNA-seq data. Comprehensive experiments across multiple datasets spanning breast invasive carcinoma, colorectal cancer, and leukemia demonstrate that scAdaptAnno consistently achieves state-of-the-art performance in accuracy, F1 score, and kappa coefficient. It significantly outperforms nine state-of-the-art automated annotation methods, underscoring its superior generalization capability and robustness in cross-patient scenarios.
The performance advantages of scAdaptAnno stem primarily from two key innovations. First, during the graph construction phase, the model integrates gene expression similarity with biological prior knowledge derived from GO biological process gene sets. This approach effectively mitigates the technical noise inherent in single-cell data and yields a more stable, biologically meaningful graph for subsequent domain adaptation. Ablation studies confirm that removing the GO-feature-based cell graph leads to notable declines in accuracy, F1 score, and kappa coefficient, highlighting the critical role of biological priors in noise reduction. Second, the bidirectional collaborative loop between model adaptation and graph adaptation enables precise source-free target domain alignment without requiring access to source data during training. This design overcomes the limitations of traditional domain adversarial methods that rely on simultaneous access to reference and query datasets, thereby greatly enhancing cross-patient portability. Furthermore, the cell embeddings generated by scAdaptAnno exhibit clearer cell-type separation in UMAP visualizations, offering high-quality feature representations for downstream analyses[34].
Compared with conventional automated annotation methods, scAdaptAnno is specifically designed for cross-patient transfer scenarios, where substantial inter-patient heterogeneity and batch effects often impair annotation accuracy. Existing classifier-based methods mainly rely on expression similarity or learned decision boundaries, but they usually do not explicitly model target-domain graph structure or adapt the model to patient-specific distribution shifts. In contrast, scAdaptAnno jointly leverages biologically informed graph construction and source-free target adaptation, enabling more robust annotation transfer without requiring access to source-domain data during adaptation. This makes scAdaptAnno particularly suitable for privacy-sensitive clinical single-cell studies, where sharing patient-level source data may be restricted.
Despite these promising results, several limitations remain. First, our experiments focused primarily on three common cancer types; validation on a broader range of tumor types and larger patient cohorts is needed to fully assess generalization. Second, the model relies on predefined GO biological process gene sets, so the choice of gene sets may influence performance on specific cancer subtypes. Finally, extending the framework to spatial transcriptomics and multimodal single-cell data represents an important direction for future exploration. For spatial transcriptomics, spatial proximity can be incorporated into cell graph construction together with transcriptomic similarity, enabling the model to capture both molecular and tissue-structural information. For multimodal single-cell data, modality-specific graphs derived from chromatin accessibility, protein abundance, or other omics layers could be integrated to provide complementary regulatory information. These extensions may further improve the applicability of scAdaptAnno to complex tumor microenvironment analysis.
5. Conclusion
In this study, we present scAdaptAnno, a graph-based target domain adaptation framework that delivers robust and accurate cross-patient cell-type annotation in tumor microenvironment scRNA-seq data. By integrating gene expression similarity with biological prior knowledge for biologically meaningful graph construction and implementing a bidirectional source-free adaptation mechanism, the model effectively mitigates noise and distributional shifts across patients, consistently outperforming nine state-of-the-art methods in accuracy, F1 score, and Cohen’s Kappa across breast invasive carcinoma, colorectal cancer, and leukemia datasets. The high-quality cell embeddings further support downstream analyses, providing a reliable, transferable solution for automated annotation in multi-patient studies.
Authors contribution
Cao XY: Methodology, software, formal analysis, writing-original draft, writing review & editing.
Zeng ZY: Methodology, software, formal analysis, data curation, writing review & editing.
You ZH, Huang YA: Conceptualization, supervision, project administration.
Conflicts of interest
Zhu-Hong You is an Editorial Board Member of Computational Biomedicine. The other authors declare no conflicts of interest.
Ethical approval
Not applicable.
Consent to participate
Not applicable.
Consent for publication
Not applicable.
Availability of data and materials
The datasets used in this study were obtained from the NCBI Gene Expression Omnibus (GEO) and ArrayExpress repositories. For leukemia, three datasets were included: samples from patients AYL050 and OX1164 (GEO accession GSE142213[35]), patients PBMMC_1, PBMMC_2, and PBMMC_3 (GEO accession GSE132509[36]), and patients P6 and P7 (GEO accession GSE154109[37]). Breast cancer data consisted of three datasets sourced from GEO or ArrayExpress, specifically patients tnbc1 and tnbc6k (GEO accession GSE143423[38]), patients sc5rJUQ024, sc5rJUQ026, sc5rJUQ033, sc5rJUQ050, and sc5rJUQ060 (ArrayExpress accession E-MTAB-8107[39]), and patients corresponding to GSM4555888 and GSM4555891 (GEO accession GSE150660[40]). In addition, one colorectal cancer dataset containing samples from patients scrEXT009, scrEXT010, and scrEXT020 was retrieved from ArrayExpress under accession E-MTAB-8107[39]. The source code of scAdaptAnno, together with the scripts used for data preprocessing, model training, and evaluation, is publicly available at: https://github.com/ChrisOliver2345/scAdaptAnno.
Funding
None.
Copyright
© The Author(s) 2026.
References
-
1. de Visser KE, Joyce JA. The evolving tumor microenvironment: From cancer initiation to metastatic outgrowth. Cancer Cell. 2023;41(3):374-403.[DOI]
-
2. Wang M, Song X, Liu X, Ma C, Ma J, Shi L. Engineered oncolytic bacteria for malignant solid tumor treatment. Interdiscip Med. 2024;2(2):e20240005.[DOI]
-
3. Baghban R, Roshangar L, Jahanban-Esfahlan R, Seidi K, Ebrahimi-Kalan A, Jaymand M, et al. Tumor microenvironment complexity and therapeutic implications at a glance. Cell Commun Signal. 2020;18:59.[DOI]
-
4. Zhang Z, Huang D, Feng J, Li W, Wang Z, Lu M, et al. PDE5 inhibitors against cancer via mediating immune cells in tumor microenvironment: AI-based approach for future drug repurposing exploration. Interdiscip Med. 2024;2(3):e20230062.[DOI]
-
5. Zhou T, Yan H, Deng Y, Zhu Y, Xia X, Wu W, et al. The role of long non-coding RNA Maternally Expressed Gene 3 in cancer-associated fibroblasts at single cell pan-cancer level. Interdiscip Med. 2024;2(4):e20240018.[DOI]
-
6. Liu Y, Yu X, Han Z, Wei Q, Niu Q, Yang C, et al. Advanced single-cell RNA sequencing in tumor immunology. Interdiscip Med. 2025;3(5):e20250060.[DOI]
-
7. Tirosh I, Suva ML. Cancer cell states: Lessons from ten years of single-cell RNA-sequencing of human tumors. Cancer Cell. 2024;42(9):1497-1506.[DOI]
-
8. Fan B, Zhang J, Li C, Zhang X. New trend in molecular diagnostics: Insights from the tumor microenvironment. Interdiscip Med. 2025;3(6):e70048.[DOI]
-
9. Kiviaho A, Eerola SK, Kallio HML, Andersen MK, Hoikka M, Tiihonen AM, et al. Single cell and spatial transcriptomics highlight the interaction of club-like cells with immunosuppressive myeloid cells in prostate cancer. Nat Commun. 2024;15(1):9949.[DOI]
-
10. de Oliveira MF, Romero JP, Chung M, Williams SR, Gottscho AD, Gupta A, et al. High-definition spatial transcriptomic profiling of immune cell populations in colorectal cancer. Nat Genet. 2025;57(6):1512-1523.[DOI]
-
11. Cheng C, Chen W, Jin H, Chen X. A review of single-cell RNA-seq annotation, integration, and cell–cell communication. Cells. 2023;12(15):1970.[DOI]
-
12. Crowley G, Quake SR. Benchmarking cell type and gene set annotation by large language models with AnnDictionary. Nat Commun. 2025;16(1):9511.[DOI]
-
13. Xie E, Cheng L, Shireman J, Cai Y, Liu J, Mohanty C, et al. CASSIA: A multi-agent large language model for automated and interpretable cell annotation. Nat Commun. 2026;17:389.[DOI]
-
14. Kim H, Lee J, Kang K, Yoon S. MarkerCount: A stable, count-based cell type identifier for single-cell RNA-seq experiments. Comput Struct Biotechnol J. 2022;20:3120-3132.[DOI]
-
16. Kiselev VY, Yiu A, Hemberg M. Scmap: Projection of single-cell RNA-seq data across data sets. Nat Methods. 2018;15(5):359-362.[DOI]
-
17. de Kanter JK, Lijnzaad P, Candelli T, Margaritis T, Holstege FCP. CHETAH: A selective, hierarchical cell type identification method for single-cell RNA sequencing. Nucleic Acids Res. 2019;47(16):e95.[DOI]
-
18. Li C, Liu B, Kang B, Liu Z, Liu Y, Chen C, et al. SciBet as a portable and fast single cell type identifier. Nat Commun. 2020;11:1818.[DOI]
-
19. Tan Y, Cahan P. SingleCellNet: A computational tool to classify single cell RNA-seq data across platforms and across species. Cell Syst. 2019;9(2):207-213.e2.[DOI]
-
20. Duan B, Zhu C, Chuai G, Tang C, Chen X, Chen S, et al. Learning for single-cell assignment. Sci Adv. 2020;6(44):eabd0855.[DOI]
-
21. Sun X, Lin X, Li Z, Wu H. A comprehensive comparison of supervised and unsupervised methods for cell type identification in single-cell RNA-seq. Brief Bioinform. 2022;23(2):bbab567.[DOI]
-
22. Sun Y, Zhao Y, Shang J, Qin B, Zhang X, Liu JX. scRDAN: A robust domain adaptation network for cell type annotation across single-cell RNA sequencing data. Brief Bioinform. 2025;26(4):bbaf344.[DOI]
-
23. Zeng ZY, Cao XY, Li YC, You HR, You ZH, Huang YA. scTECTA: Asymmetric deep transfer learning for cross-patient tumor microenvironment single-cell annotation. IEEE Trans Comput Biol Bioinform. 2025;22(6):3273-3284.[DOI]
-
24. Shang J, Zhao Y, Qin B, Zhang L, Meng X, Ge D, et al. scCDAN: Constraint domain adaptation network for cell type annotation across single cell RNA sequencing data. Neurocomputing. 2025;630:129708.[DOI]
-
25. Ashburner M, Ball CA, Blake JA, Botstein D, Butler H, Cherry JM, et al. Gene Ontology: Tool for the unification of biology. Nat Genet. 2000;25(1):25-29.[DOI]
-
26. Zhang Z, Liu M, Wang A, Chen H, Li Z, Bu J, et al. Collaborate to adapt: Source-free graph domain adaptation via bi-directional adaptation.In: Proceedings of the ACM Web Conference 2024; 2024 May 13-17; Singapore. New York: Association for Computing Machinery; 2024. p. 664-675.[DOI]
-
27. Wu M, Pan S, Zhou C, Chang X, Zhu X. Unsupervised domain adaptive graph convolutional networks. In: Huang Y, King I, Liu TY, van Steen M, editors. Proceedings of The Web Conference 2020; 2020 Apr 20-24; Taipei, Taiwan. New York: Association for Computing Machinery; 2020. p. 1457-1467.[DOI]
-
28. Dai Q, Wu XM, Xiao J, Shen X, Wang D. Graph transfer learning via adversarial domain adaptation with graph convolution. IEEE Trans Knowl Data Eng. 2022;1.[DOI]
-
29. Zhang Y, Song G, Du L, Yang S, Jin Y. Dane: Domain adaptive network embedding. In: Kraus S, editor. Proceedings of the 28th International Joint Conference on Artificial Intelligence; 2019 Aug 10-16; Macao, China. Palo Alto: AAAI Press; 2019. p. 4362-4368.[DOI]
-
30. Wolf FA, Angerer P, Theis FJ. SCANPY large-scale single-cell gene expression data analysis. Genome Biol. 2018;19(1):15.[DOI]
-
31. Aibar S, González-Blas CB, Moerman T, Huynh-Thu VA, Imrichova H, Hulselmans G, et al. SCENIC: Single-cell regulatory network inference and clustering. Nat Methods. 2017;14(11):1083-1086.[DOI]
-
32. Cohen J. A coefficient of agreement for nominal scales. Educ Psychol Meas. 1960;20(1):37-46.[DOI]
-
33. Becht E, McInnes L, Healy J, Dutertre CA, Kwok IWH, Ng LG, et al. Dimensionality reduction for visualizing single-cell data using UMAP. Nat Biotechnol. 2019;37(1):38-44.[DOI]
-
34. Luecken MD, Büttner M, Chaichoompu K, Danese A, Interlandi M, Mueller MF, et al. Benchmarking atlas-level data integration in single-cell genomics. Nat Methods. 2022;19(1):41-50.[DOI]
-
37. Bailur JK, McCachren SS, Pendleton K, Vasquez JC, Lim HS, Duffy A, et al. Risk-associated alterations in marrow T cells in pediatric leukemia. JCI Insight. 2020;5(16):e140179.[DOI]
-
38. Wang L, Chao M, Han RR, Li L, Dong L, Chen F, et al. Single-cell map of diverse immune phenotypes in the metastatic brain tumor microenvironment of nonsmall-cell lung cancer. Int J Surg. 2025;111(1):1601-1606.[DOI]
Copyright
© The Author(s) 2026. This is an Open Access article licensed under a Creative Commons Attribution 4.0 International License (https://creativecommons.org/licenses/by/4.0/), which permits unrestricted use, sharing, adaptation, distribution and reproduction in any medium or format, for any purpose, even commercially, as long as you give appropriate credit to the original author(s) and the source, provide a link to the Creative Commons license, and indicate if changes were made.
Publisher’s Note
Share And Cite


