A method for constructing an immune single-cell state prediction model and application thereof

CN122991253APending Publication Date: 2026-10-27YUNNAN UNIV
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611311564.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-08-27
Publication Date
2026-10-27

AI Technical Summary

Benefits of technology

1、本发明在免疫单细胞分析场景中引入具备线性计算复杂度的双向状态空间模型(Bi-Mamba)作为骨干网络,针对免疫学研究中需同时处理大量免疫细胞(如T细胞、B细胞及骨髓系细胞)以揭示疫苗接种响应或肿瘤免疫微环境演变的需求,本发明通过正向与反向双方向状态空间扫描,以O(N)的线性复杂度捕获全基因组尺度基因间的长程双向调控依赖关系,有效解决现有Transformer模型因二次方计算瓶颈而被迫截断序列或仅能处理部分高变基因(HVGs)的缺陷,完整保留远端增强子-启动子相互作用及跨染色质协同表达等长程生物学调控信息。更重要的是,该架构大幅降低显存开销;经实测,在相同硬件环境下、输入序列长度统一为2048时,基线模型(如scFoundation)因显存限制仅能支持大小为8的批次(Batch size=8),而本发明通过Bi-Mamba的显存优化机制,成功将单卡训练批次大小提升至24,模型训练吞吐量提升近3倍。这一性能突破使得在有限计算资源下处理百万级单细胞免疫数据成为可能,为大规模免疫血液系统数据的深度挖掘提供高效可行的工程化方案。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure FT_1
    Figure FT_1
  • Figure FT_2
    Figure FT_2
  • Figure FT_3
    Figure FT_3
Patent Text Reader

Abstract

The present application relates to the technical field of bioinformatics, and discloses a method for constructing an immune single-cell state prediction model and application thereof. The method comprises the following steps: obtaining single-cell transcriptome sequencing data and cell context metadata of an immune cell sample; obtaining a fusion feature vector of an output embedding vector carrying cell context information and a gene static complete embedding vector by using a double embedding layer of multi-source heterogeneous biological prior knowledge and cell context; inputting the fusion feature vector into a bidirectional state space model backbone network, combining a multi-loss function framework, training a model to learn immune single-cell features under different cell contexts, and obtaining an immune single-cell state prediction model for predicting the health status of immune single cells, pathogen types, vaccination states, and vaccine types. The model has the advantages of high calculation efficiency, accurate immune context perception, and strong generalization ability.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of bioinformatics technology, and in particular to a method for constructing an immune single-cell state prediction model and its application. Background Technology

[0002] With the rapid development of single-cell transcriptome sequencing (scRNA-seq) technology, biomedical research has entered the era of massive single-cell data. In the field of immunology, heterogeneity analysis of large-scale immune cells (such as T cells, B cells, and bone marrow cells) can reveal in depth the dynamic evolution of vaccine responses, autoimmune diseases, and the tumor immune microenvironment. However, current technologies still face the following significant bottlenecks in processing and analyzing these highly complex and specialized immune single-cell data: First, traditional statistical analysis tools have limitations when dealing with ultra-large-scale data. Traditional bioinformatics analysis tools, such as Scanpy and Seurat (see: Wolf, F., Angerer, P. & Theis, F. SCANPY: large-scale single-cell gene expression data analysis. Genome Biol 19, 15(2018), Hao, Y., Stuart, T., Kowalski, MH et al. Dictionary learning for integrative, multimodal and scalable single-cell analysis. Nat Biotechnol 42,293–304 (2024).), mainly rely on linear dimensionality reduction, cluster analysis, and differential expression analysis. As single-cell data volumes exceed the million-level threshold, these tools face severe challenges in computational efficiency. More importantly, traditional methods often struggle to capture deep, non-linear regulatory relationships between genes, failing to uncover the evolution of immune cell functional states under different physiological or pathological conditions from a global perspective.

[0003] Second, signal dilution and lack of specificity in general single-cell large language models (scLLMs). Although single-cell representation methods based on pre-trained large language models, such as scGPT and Geneformer, have emerged in recent years (see: Cui, H., Wang, C., Maan, H. et al. scGPT: toward building a foundation model for single-cell multi-omics using generative AI. Nat Methods 21, 1470–1480 (2024). CV Theodoris#, L Xiao, A Chopra, MD Chaffin, ZR Al Sayed, M CHill, H Mantineo, E Brydon, Z Zeng, XS Liu, PT Ellinor#. Transfer learning enables predictions in network biology. Nature, 31 May 2023.), such models are usually trained using heterogeneous data covering multiple species and tissues (such as lung, liver, brain, etc.). Because the immune system is highly dynamic and domain-specific, when general models process purely hematologic data, subtle immune signature signals are often masked by strong signature signals from unrelated tissues (i.e., signal dilution effect). This results in existing models having significantly insufficient accuracy in identifying specific immune cell subtypes, weak transcriptional responses after vaccination, and the direction of functional polarization of immune cells.

[0004] Third, Transformer-based models face computational bottlenecks in long-range modeling. Most mainstream single-cell models are based on the Transformer architecture, whose core self-attention mechanism has a computational complexity that increases quadratically with gene sequence length. This limitation restricts existing models to handling only a subset of highly variable genes (HVGs) or forces them to use truncated sequences. This directly leads to the loss of long-range biological regulatory information (such as interactions between distal enhancers and promoters, and cross-chromatin gene co-expression), making it impossible to achieve complete modeling of genome-wide regulatory networks.

[0005] Fourth, existing models do not adequately utilize information from the "cellular dynamic context." Although some studies (such as GeneCompass) have attempted to introduce prior knowledge such as gene regulatory networks (GRNs) or gene families into the Transformer architecture (see: Yang, X., Liu, G., Feng, G. et al. GeneCompass: deciphering universal gene regulatory mechanisms with a knowledge-informed cross-species foundation model. Cell Res 34, 830–845 (2024).), these attempts are mostly limited to the static properties or interactions of the genes themselves. In practical applications of immunology, the state of immune cells is highly dependent on their biological context, such as whether the body is infected, the specific type of virus, whether a vaccine has been administered, and the type of vaccine.

[0006] In summary, current technologies still lack a systematic solution that can simultaneously address the computational redundancy of the Transformer architecture, achieve long-range modeling at the whole-genome scale, and deeply integrate immunologically specific "cellular dynamics" with prior biological knowledge. Therefore, how to construct a deep learning model that maintains linear computational complexity while accurately perceiving complex immune contexts (such as infection and vaccination status) has become a critical technical problem urgently needing to be solved in the fields of bioinformatics and precision immunology. Summary of the Invention

[0007] This invention provides a method for constructing an immune single-cell status prediction model and its application, in order to overcome the shortcomings of the prior art.

[0008] The present invention provides a method for constructing an immune single-cell status prediction model, comprising: Single-cell transcriptome sequencing data and cell context metadata of immune cell sample collections are obtained. The cell context metadata includes the health status of immune cell samples, the type of infecting pathogen, vaccination status and vaccine type. Based on single-cell transcriptome sequencing data and cell scenario metadata, a fused feature vector is obtained by using a dual embedding layer of multi-source heterogeneous biological prior knowledge and cell scenario, which integrates the output embedding vector carrying cell scenario information and the gene static complete embedding vector. Based on the fused feature vectors, the bidirectional state-space model backbone network is used, combined with a multiple loss function framework, to train the model to learn the immune single-cell features under different cellular scenarios, thus obtaining an immune single-cell state prediction model.

[0009] According to the present invention, a method for constructing an immune single-cell state prediction model is provided, wherein, based on single-cell transcriptome sequencing data and cell scenario metadata, a fused feature vector is obtained by utilizing a dual embedding layer of multi-source heterogeneous biological prior knowledge and cell scenario, which integrates an output embedding vector carrying cell scenario information and a gene static complete embedding vector, including: Based on single-cell transcriptome sequencing data, a feature matrix containing genetic identity features and multi-source biological prior knowledge was constructed. Based on the feature matrix, an adaptive source-specific gating network is used to automatically calculate the contribution weights of prior knowledge from each channel to the current gene representation through an attention mechanism or a multilayer perceptron, and then dynamically weighted and fused to obtain a static and complete gene embedding vector that integrates data-driven and static prior knowledge.

[0010] According to the method for constructing an immune single-cell status prediction model provided by the present invention, the feature matrix includes any one of the following or any combination thereof: Gene ID (gene identifier embedding) and Value (gene expression level binning embedding) are used to provide basic gene identity and transcriptional abundance information; GRN (Gene Regulation Network Prior) can utilize multi-omics data from the ENCODE database to construct causal gene regulation networks using the PECA2 algorithm. These gene pairs with regulatory relationships are then embedded using gene2vec. This embedding aims to inject the causal logic of "who regulates whom" between genes. Promoter (promoter sequence prior): The transcriptional regulation of a gene is largely determined by its promoter sequence. A 2500bp sequence from 500bp upstream to 2000bp downstream of the transcription start site (TSS) of each gene can be extracted and fine-tuned using a pre-trained DNABERT model to extract its hidden layer representation. This embedding represents the cis-regulatory identity of the gene. Gene family (gene family classification prior) Genes from the same family usually share similar functions or evolutionary origins. Gene family annotations from the HUGO Gene Nomenclature Committee can be used to construct a training list of gene pairs belonging to the same family and train them using the gene2vec method to obtain their embedding vectors. This embedding represents the function and evolutionary identity of the gene. Gene co-expression (GRN) theory, represented by GRN, must be supplemented by actual observation. This can be achieved by uniformly sampling the data, calculating the Pearson correlation coefficient (PCC) of genes in large-scale cells, screening for strongly correlated pairs with PCC > 0.8, and embedding them using gene2vec. This embedding represents the actual co-expression pattern between genes in real biological contexts. Gene location (gene chromosomal embedding) refers to the physical location of a gene on a chromosome, especially its relationship with neighboring genes. It contains important regulatory information (such as co-regulatory domains) and can be used to number genomic coordinates in 10,000 bp windows. This embedding represents the chromatin proximity of the gene.

[0011] According to the method for constructing an immune single-cell state prediction model provided by the present invention, the expression for the gene static complete embedding vector is as follows: , In the formula, Represents the static complete embedding vector of a gene. This represents the i-th feature in the feature matrix. This represents the weight of the i-th feature in the feature matrix.

[0012] According to the present invention, a method for constructing an immune single-cell state prediction model is provided, wherein, based on single-cell transcriptome sequencing data and cell scenario metadata, a fused feature vector is obtained by utilizing a dual embedding layer of multi-source heterogeneous biological prior knowledge and cell scenario, which integrates an output embedding vector carrying cell scenario information and a gene static complete embedding vector, including: Based on the cell scenario metadata, the global condition vector of the cell scenario is obtained; The global conditional vector of the cell scene is passed through two independent linear transformation layers to calculate scaling factors for the current cell background. (Scale) and bias coefficient (Shift); Scaling factor and bias coefficient By applying conditional modulation based on cellular context to the static, intact gene embedding vector, an output embedding vector carrying cellular context information is obtained. The output embedding vector carrying cellular context information and the gene static complete embedding vector are added element-wise or concatenated to obtain a fused feature vector.

[0013] According to the method for constructing an immune single-cell state prediction model provided by the present invention, the expression for conditional constraint modulation is as follows: , In the formula, X represents the static complete gene embedding vector, and X' represents the output embedding vector dynamically modulated by the current cell scenario (such as a specific viral infection or a specific vaccination).

[0014] According to the present invention, a method for constructing an immune single-cell state prediction model includes, based on fused feature vectors, using a bidirectional state-space model backbone network, and combining a multiple loss function framework, training the model to learn immune single-cell features under different cell scenarios to obtain the immune single-cell state prediction model, comprising: By inputting the fused feature vectors into the backbone network of the bidirectional state-space model, and for disordered single-cell gene sequences, Bi-Mamba blocks are used to simultaneously initiate forward and reverse state-space scans, capturing bidirectional long-range regulatory dependencies between genes with a linear computational complexity of O(N). Within each Mamba block, the state transition matrix is ​​dynamically adjusted through a selective mechanism to ensure that gene traits highly relevant to the current "cellular context" are amplified.

[0015] According to the present invention, a method for constructing an immune single-cell state prediction model is provided, wherein the multiple loss function framework includes any one or any combination of the following: masked gene modeling loss. Cell contrast learning loss Loss of gene co-expression and cell embedding consistency loss ; The expression for the multiple loss function framework is: In the formula, Indicates the total loss. This represents the weight of the corresponding loss.

[0016] Among them, regarding the loss of masked genes ( ): Masked Language Model (MLM) is a bidirectional, global contextual understanding task whose core objective is to train the model to predict missing values ​​based on context. During training, the model randomly masks parts of the input sequence and uses all information to the left and right of the masked location to accurately reconstruct the original masked gene.

[0017] From a biological perspective, this aligns better with our understanding of complex gene regulatory networks. A gene's function and state are determined by the entire network it belongs to (including upstream regulators and downstream target genes), rather than a simple unidirectional regulatory relationship. (Mask gene loss function) Optimization is performed by calculating the reconstructed cross-entropy loss: , in, Indicates that given the current model parameters Hidden representations of context Under these conditions, the model correctly predicted the original gene. The conditional probability.

[0018] Regarding cell contrast learning loss ( ): This is used to enhance the model's robustness to the same sample under different perturbations. For a batch containing 2N augmented cell samples, the positive sample pair consisting of the i-th cell sample and the j-th homologous augmented cell sample is computationally equivalent to an N-class classification problem, and its cross-entropy form is as follows: , This formula achieves contrastive learning by maximizing the proportion of positive sample pair similarity in the Softmax probability distribution. To ensure training stability, this invention employs symmetric loss, which is the average of the losses in both directions: .

[0019] Regarding gene co-expression loss ( ): To ensure that the gene embedding output by the model implicitly includes known features of the co-expression network of immune genes, the calculation formula is as follows: .

[0020] in It's a gene. The set of positive samples within the batch It is its negative sample set. The final one. It refers to all genes in the batch that have positive sample pairs. The average value.

[0021] Regarding the loss of cell embedding consistency ( ): Regularization loss calculation: The target of loss is the incentive set. Similarity of all cell pairs This will drive it further toward a pre-set high target value. (For example, The loss is defined as the similarity between these similarities and the target value. Mean Squared Error (MSE) between them: .

[0022] This invention also provides a method for predicting the status of immune single cells, comprising: Obtain single-cell transcriptome sequencing data from the immune cell sample to be tested; Based on single-cell transcriptome sequencing data, the state prediction results of the immune cell sample to be tested are obtained by constructing an immune single-cell state prediction model according to any of the above-described methods. The state prediction results include any one or any combination of the following: health status, type of infecting pathogen, vaccination status, and type of vaccine.

[0023] The present invention also provides an immune single-cell status prediction system, comprising: The data receiving module is used to receive single-cell transcriptome sequencing data of an immune cell sample to be tested from at least one terminal. The prediction module is used to: obtain the state prediction result of the immune cell sample to be tested based on the single-cell transcriptome sequencing data and the immune single-cell state prediction model obtained according to the construction method of the immune single-cell state prediction model described above, wherein the state prediction result includes any one of the following or any combination thereof: health status, type of infecting pathogen, vaccination status, and type of vaccine. The data output module is used to send the state prediction results of the immune cell sample to be tested to at least one terminal.

[0024] It should be noted that a terminal refers to an input / output device connected to a computer system. Depending on the function, terminals can be divided into various types: smart terminals or intelligent terminals, dumb terminals, interactive terminals or online terminals. Specifically, a terminal can be various mobile communication devices, such as mobile phones and tablets. This article aims to provide users with the function of inputting data and outputting data.

[0025] The present invention also provides an electronic device, including a processor and a memory storing a computer program, wherein the processor executes the computer program to implement the method for constructing an immune single-cell state prediction model and / or the immune single-cell state prediction method described above.

[0026] The present invention also provides a non-transitory computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the method for constructing the immune single-cell state prediction model described above.

[0027] The present invention also provides a computer program product, the computer program product comprising a computer program that can be stored on a non-transitory computer-readable storage medium, and when the computer program is executed by a processor, the computer is able to execute any of the above-described methods for constructing an immune single-cell state prediction model.

[0028] The present invention provides a method for constructing an immune single-cell status prediction model and its application, which can bring at least the following beneficial effects: 1. This invention introduces a bidirectional state-space model (Bi-Mamba) with linear computational complexity as the backbone network in the scenario of immune single-cell analysis. It addresses the need in immunological research to process a large number of immune cells (such as T cells, B cells, and bone marrow cells) to reveal the vaccine response or the evolution of the tumor immune microenvironment. This invention captures long-range bidirectional regulatory dependencies between genes at the whole genome scale with linear complexity of O(N) through forward and reverse state-space scanning. It effectively solves the defects of existing Transformer models that are forced to truncate sequences or can only process some hypervariable genes (HVGs) due to quadratic computation bottlenecks, and fully preserves long-range biological regulatory information such as distal enhancer-promoter interactions and cross-chromatin co-expression. More importantly, this architecture significantly reduces GPU memory overhead. In actual testing, under the same hardware environment and with a uniform input sequence length of 2048, baseline models (such as scFoundation) can only support batches of 8 due to GPU memory limitations. However, this invention, through Bi-Mamba's GPU memory optimization mechanism, successfully increases the single-card training batch size to 24, resulting in a nearly 3-fold increase in model training throughput. This performance breakthrough makes it possible to process millions of single-cell immune data points with limited computing resources, providing an efficient and feasible engineering solution for the in-depth mining of large-scale immune and hematological system data.

[0029] 2. This invention innovatively constructs a dual embedding layer to achieve deep semantic alignment of knowledge in the field of immunology from both microscopic and macroscopic dimensions.

[0030] First, at the gene level, an adaptive source-specific gating network is used to dynamically weight and fuse multi-source heterogeneous biological prior knowledge, including gene regulatory networks (GRNs), promoter sequences, gene family classifications, gene co-expression networks, and chromosomal locations, to construct a statically complete gene embedding vector rich in biological causal logic and functional evolutionary identity. This mechanism can automatically calculate the contribution weights of prior knowledge from each channel based on the current gene representation, avoiding the noise introduced by static splicing in traditional methods.

[0031] Secondly, and more importantly, this invention introduces cellular scenario metadata as a dynamic conditional constraint into model training. Specifically, by generating scaling and bias coefficients from the global conditional vector of the cellular scenario through linear transformation, the static complete gene embedding vector is linearly modulated based on the immunological background to obtain an output embedding vector carrying real-time cellular scenario information. This design enables the model to accurately perceive highly dynamic immunological biological scenarios such as "whether the organism is in an infected state," "the specific type of virus," or "the type of vaccine administered," fundamentally overcoming the limitations of existing models (such as GeneCompass) that rely solely on static gene attributes while ignoring the dynamic changes in the biological scenario.

[0032] Thanks to this dual-embedding architecture, the model naturally forms a manifold structure in the representation space that resists batch effects, while specifically amplifying the characteristic signals of fine immune cell subtypes. In downstream evaluations on multi-source immune blood system datasets, for cell annotation tasks, this invention outperforms mainstream single-cell basic models in both classification accuracy and F1-Score for fine immune cell subtypes (such as pDCs). For batch integration tasks, this invention implicitly removes technical noise introduced by different experimental batches and sequencing platforms while perfectly preserving the true immunobiological heterogeneity. Its comprehensive evaluation metrics (AvgBio, Avgbatch) significantly outperform existing mainstream models, providing reliable technical support for accurate analysis of immune status across datasets and platforms.

[0033] 3. To address the batch effect and high sparsity dropout problems commonly found in single-cell sequencing data, this invention designs a joint pre-training framework that includes multiple loss functions such as masked gene modeling loss, cell contrastive learning loss, gene co-expression loss, and cell embedding consistency loss.

[0034] Among them, the masked gene modeling loss reconstructs masked genes through bidirectional context, enabling the model to deeply understand the global context in complex gene regulatory networks rather than unidirectional relationships; the gene co-expression loss ensures that the gene representation output by the model conforms to the co-expression pattern observed in real biology by constraining the implicit inclusion of immune gene co-expression network features in gene embedding; and the cell contrast learning loss and cell embedding consistency loss enhance the robustness of homologous samples at the cell level and encourage high consistency of cell embedding under the same scenario, respectively, thus ensuring the structural stability of the model's implicit space from a mathematical perspective.

[0035] Through the aforementioned multi-task joint optimization, the model of this invention not only learns the expression regulation rules within cells at the gene level, but also acquires stable manifold structures across samples at the cellular level, thereby effectively overcoming the interference caused by batch effects and random loss in single-cell sequencing. In practical applications such as predicting weak transcriptional responses after vaccination and identifying specific cellular functional polarization directions related to autoimmune diseases, this model demonstrates excellent cross-dataset transferability and stable predictive performance, fully meeting the urgent need in the field of precision immunology for highly robust and highly generalizable analytical tools. Attached Figure Description

[0036] To more clearly illustrate the technical solutions in this invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of this invention. For those skilled in the art, other drawings can be obtained from these drawings without creative effort.

[0037] Figure 1 This is one of the flowcharts illustrating a method for constructing an immune single-cell status prediction model provided by the present invention.

[0038] Figure 2 This is the second flowchart illustrating the method for constructing an immune single-cell state prediction model provided by the present invention.

[0039] Figure 3 This is a schematic diagram of the multidimensional gene prior knowledge embedding layer of the present invention.

[0040] Figure 4 This is a schematic diagram of the multidimensional cellular contextual information fusion of the present invention.

[0041] Figure 5 This is a diagram of the Bi-Mamba architecture of the present invention.

[0042] Figure 6 This is a schematic diagram of the structure of an immune single-cell status prediction system provided by the present invention.

[0043] Figure 7This is a schematic diagram of the structure of the electronic device provided by the present invention. Detailed Implementation

[0044] To make the objectives, technical solutions, and advantages of this invention clearer, the technical solutions of this invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, embodiments of this invention, and should not be construed as limiting the invention. All other embodiments obtained by those skilled in the art based on the embodiments of this invention without creative effort are within the scope of protection of this invention. In the description of this invention, it should be understood that the terminology used is for descriptive purposes only and should not be construed as indicating or implying relative importance.

[0045] Figure 1 This is a flowchart illustrating a method for constructing an immune single-cell state prediction model provided by the present invention. The execution entity of this method can be any applicable terminal-side device or network-side device, such as a model construction device.

[0046] See Figure 1 The present invention provides a method for constructing an immune single-cell status prediction model, which may include: S110. Obtain single-cell transcriptome sequencing data and cell context metadata from a collection of immune cell samples derived from peripheral blood. The cell context metadata includes the health status of the immune cell samples, the type of infecting pathogen, the vaccination status, and the type of vaccine.

[0047] In one embodiment, single-cell transcriptome (scRNA-seq) data belonging to peripheral blood can be screened from public databases (such as GEO, ArrayExpress, Zenodo) and private clinical sequencing samples to serve as single-cell transcriptome sequencing data for an immune cell sample set.

[0048] The experimental or clinical context corresponding to each cell sample can be collected and encoded into standardized one-hot codes or multidimensional discrete tags as cell context metadata. These tags include: health status, type of infectious pathogen, vaccination status, and type of vaccine.

[0049] S120. Based on single-cell transcriptome sequencing data and cell scenario metadata, a fusion feature vector is obtained by using a dual embedding layer of multi-source heterogeneous biological prior knowledge and cell scenario, which integrates the output embedding vector carrying cell scenario information and the gene static complete embedding vector.

[0050] S120 deeply integrates gene expression information with static biological priors and dynamic cellular scenarios.

[0051] According to the appendix Figure 3 The static initial characterization of each input gene is composed of spliced ​​or superimposed multidimensional heterogeneous biological features. In one embodiment, S120 may include: S1201. Based on single-cell transcriptome sequencing data, construct a feature matrix that includes gene identity features and multi-source biological prior knowledge, wherein the feature matrix includes any one of the following or any combination thereof: Gene ID (gene identifier embedding) and Value (gene expression level binning embedding) are used to provide basic gene identity and transcriptional abundance information; GRN (Gene Regulation Network Prior) can utilize multi-omics data from the ENCODE database to construct causal gene regulation networks using the PECA2 algorithm. These gene pairs with regulatory relationships are then embedded using gene2vec. This embedding aims to inject the causal logic of "who regulates whom" between genes. Promoter (promoter sequence prior): The transcriptional regulation of a gene is largely determined by its promoter sequence. A 2500bp sequence from 500bp upstream to 2000bp downstream of the transcription start site (TSS) of each gene can be extracted and fine-tuned using a pre-trained DNABERT model to extract its hidden layer representation. This embedding represents the cis-regulatory identity of the gene. Gene family (gene family classification prior) Genes from the same family usually share similar functions or evolutionary origins. Gene family annotations from the HUGO Gene Nomenclature Committee can be used to construct a training list of gene pairs belonging to the same family and train them using the gene2vec method to obtain their embedding vectors. This embedding represents the function and evolutionary identity of the gene. Gene co-expression (GRN) theory, represented by GRN, must be supplemented by actual observation. This can be achieved by uniformly sampling the data, calculating the Pearson correlation coefficient (PCC) of genes in large-scale cells, screening for strongly correlated pairs with PCC > 0.8, and embedding them using gene2vec. This embedding represents the actual co-expression pattern between genes in real biological contexts. Gene location (gene chromosomal embedding) refers to the physical location of a gene on a chromosome, especially its relationship with neighboring genes. It contains important regulatory information (such as co-regulatory domains) and can be used to number genomic coordinates in 10,000 bp windows. This embedding represents the chromatin proximity of the gene. S1202. Based on the feature matrix, an adaptive source-specific gating network is used to automatically calculate the contribution weights of prior knowledge from each channel to the current gene representation through an attention mechanism or a multilayer perceptron, and then dynamically weighted and fused to obtain a statically complete gene embedding vector that integrates data-driven and static prior knowledge. The expression for the static complete embedding vector of the gene is: , In the formula, Represents the static complete embedding vector of a gene. This represents the i-th feature in the feature matrix. This represents the weight of the i-th feature in the feature matrix.

[0052] According to the appendix Figure 4 To enable the model to perceive the macroscopic clinical and experimental context behind microscopic expression, this embodiment employs a characteristic linear modulation (FiLM) mechanism to inject cellular-level contextual information into the gene sequence. In one embodiment, S120 may further include: Based on the cell scenario metadata (including health status, infection type, gender, and vaccination status and type), the discrete labels are mapped to 192-dimensional vectors, and after concatenation, high-order semantic cross-interaction is performed through a multilayer perceptron fusion network (MLP Fusion) to generate a cell scenario global condition vector with a total dimension of 768. The global conditional vector of the cell scene is passed through two independent linear transformation layers to calculate scaling factors for the current cell background. (Scale) and bias coefficient (Shift); Scaling factor and bias coefficient The static, intact gene embedding vector is subjected to cellular context-based conditional modulation to obtain an output embedding vector carrying cellular context information. The expression for this conditional modulation is: , In the formula, X represents the static complete gene embedding vector, and X' represents the output embedding vector dynamically modulated by the current cell scenario (such as a specific viral infection or a specific vaccination). The output embedding vector carrying cellular context information and the gene static complete embedding vector are added element-wise or concatenated to obtain a fused feature vector.

[0053] S130. Based on the fused feature vector, using the bidirectional state-space model backbone network and combining it with a multiple loss function framework, the model is trained to learn the immune single-cell features under different cell scenarios, thus obtaining an immune single-cell state prediction model.

[0054] In one embodiment, S130 may include: See Figure 5 The feature vectors (sequences) will be fused. Input bidirectional state-space model backbone network: , In the formula, Indicates the index of the time step in the sequence; Indicates the first The hidden state vector of the step; Indicates the first The hidden state vector of the step; Indicates the first The input feature vector of the step; Indicates the first The output vector of the step; These represent the input from the current input. The state transition parameter function, input transformation parameter function, and output transformation parameter function are dynamically generated through a selective mechanism. This represents the input projection matrix. For disordered single-cell gene sequences, a Bi-Mamba block is used to simultaneously initiate forward and reverse state space scans. The linear computational complexity captures the bidirectional long-range regulatory dependencies between genes: ; In the formula, This represents the layer index of a Bi-Mamba block; Indicates the index of the time step in the sequence; Indicates the first The Bi-Mamba block in the 1st The final output vector after step-by-step fusion; This represents the fusion weight vector generated by the gated network; This indicates that the forward state space scan branch is at the 1st... The hidden state vector output by the step; Indicates the reverse state-space scan branch at the 1st The hidden state vector output by each step. Within each Mamba block, the state transition matrix is ​​dynamically adjusted through a selective mechanism to ensure that gene features highly relevant to the current "cellular context" are amplified.

[0055] In one embodiment, to ensure that the model can learn the biological characteristics of immune cells from multiple dimensions, the multiple loss function framework includes any one of the following or any combination thereof: masked gene modeling loss. Cell contrast learning loss Loss of gene co-expression and cell embedding consistency loss ; The expression for the multiple loss function framework is: In the formula, Indicates the total loss. This represents the weight of the corresponding loss.

[0056] Among them, regarding the loss of masked genes ( ): Masked Language Model (MLM) is a bidirectional, global contextual understanding task whose core objective is to train the model to predict missing values ​​based on context. During training, the model randomly masks parts of the input sequence and uses all information to the left and right of the masked location to accurately reconstruct the original masked gene.

[0057] From a biological perspective, this aligns better with our understanding of complex gene regulatory networks. A gene's function and state are determined by the entire network it belongs to (including upstream regulators and downstream target genes), rather than a simple unidirectional regulatory relationship. (Mask gene loss function) Optimization is performed by calculating the reconstructed cross-entropy loss: , in, Indicates that given the current model parameters Hidden representations of context Under these conditions, the model correctly predicted the original gene. The conditional probability; Regarding cell contrast learning loss ( ): This is used to enhance the model's robustness to the same sample under different perturbations. For a batch containing 2N augmented cell samples, the positive sample pair consisting of the i-th cell sample and the j-th homologous augmented cell sample is computationally equivalent to an N-class classification problem, and its cross-entropy form is as follows: , This formula achieves contrastive learning by maximizing the proportion of positive sample pair similarity in the Softmax probability distribution. To ensure training stability, this invention employs symmetric loss, which is the average of the losses in both directions: .

[0058] Regarding gene co-expression loss ( ): To ensure that the gene embedding output by the model implicitly includes known features of the co-expression network of immune genes, the calculation formula is as follows:

[0059] in It's a gene. The set of positive samples within the batch It is its negative sample set. The final one. It refers to all genes in the batch that have positive sample pairs. The average value.

[0060] Regarding the loss of cell embedding consistency ( ): Regularization loss calculation: The target of loss is the incentive set. Similarity of all cell pairs This will drive it further toward a pre-set high target value. (For example, The loss is defined as the similarity between these similarities and the target value. Mean Squared Error (MSE) between them:

[0061] After training to obtain the immune single-cell status prediction, it can be used to predict the immune single-cell status, forming an immune single-cell status prediction method, which specifically includes: Obtain single-cell transcriptome sequencing data from the immune cell sample to be tested; Based on single-cell transcriptome sequencing data, the state prediction results of the immune cell sample to be tested are obtained by constructing an immune single-cell state prediction model according to any of the above-described methods. The state prediction results include any one or any combination of the following: health status, type of infecting pathogen, vaccination status, and type of vaccine.

[0062] The proposed method for constructing an immune single-cell state prediction model based on the fusion of a bidirectional state-space model and multi-source prior knowledge has the following significant advantages compared to existing general single-cell large models and traditional statistical analysis methods: (1) The computational complexity is greatly reduced, and the utilization rate of video memory and throughput are significantly improved.

[0063] This invention abandons the Transformer self-attention mechanism relied upon by traditional single-cell large models and introduces a bidirectional state-space model (Bi-Mamba) with linear computational complexity into the backbone network.

[0064] It breaks through the bottleneck of traditional models where memory overhead explodes quadratically under long sequences. While maintaining extremely high performance, it significantly optimizes the utilization of hardware resources, enabling it to support larger-scale parallel computing under the same hardware conditions.

[0065] Experimental results show that, under the same hardware testing environment, when the input sequence length is uniformly 2048, compared with the baseline model (scFoundation) which can only support a batch size of 8 due to memory limitations, this invention, through the memory optimization mechanism of Bi-Mamba, successfully increased the batch size of single-card training from 8 to 24, and improved the model training throughput by nearly 3 times.

[0066] (2) The introduction of dual embedding of cell-level scenarios and gene-level priors significantly enhances the downstream immune cell annotation and batch integration capabilities.

[0067] This invention constructs a dual embedding layer by using an adaptive source-specific gating network (for static gene priors) and a FiLM linear modulation mechanism (for dynamic immune context metadata).

[0068] This architecture achieves deep semantic alignment between microscopic gene expression, macroscopic experimental background, and known biological co-expression patterns. By introducing this multi-scale constraint, the model naturally possesses a manifold structure in the representation space that resists batch effects, while amplifying the characteristic signals of specific cell subtypes, thus supporting downstream high-precision general analysis from the underlying mathematical logic.

[0069] Cross-sectional evaluation on downstream tasks of a multi-source immune blood system dataset 1; In the Cell Type Annotation task: thanks to the synergistic guidance of context and prior knowledge, this invention surpasses mainstream single-cell basic models in terms of accuracy and F1-Score for classifying fine immune cell subtypes (such as pDCs). In batch integration tasks: This invention implicitly removes technical noise from different experimental batches and sequencing platforms while perfectly preserving real biological heterogeneity. Its comprehensive evaluation metrics (AvgBio, Avgbatch) significantly outperform mainstream single-cell basic models.

[0070] (3) Multiple loss functions are combined to ensure the model’s robustness and generalization ability in multi-task downstream applications.

[0071] This invention utilizes a loss modeling method incorporating a masked gene. Cell contrast learning loss Loss of gene co-expression and cell embedding consistency loss The framework of multiple loss functions, including multi-task joint pre-training, is used to train the backbone network.

[0072] Multi-task joint pre-training enables the model to learn not only gene-level intracellular expression patterns (through...) and Furthermore, it can learn stable manifold structures across samples at the cellular level (through...). and This effectively overcomes the batch effects and dropout problems commonly found in single-cell sequencing, significantly enhancing the stability of the model when transferring data across datasets.

[0073] In summary, the method for constructing an immune single-cell state prediction model based on the fusion of a bidirectional state space model and multi-source prior knowledge provided by this invention successfully overcomes the problems of computational power explosion and signal dilution in traditional Transformer architecture models when modeling long sequences by introducing the microscopic gene expression profile of the immune blood system, static priors of five heterogeneous biological genes, and dynamic clinical / experimental scenario metadata into a unified deep learning representation space.

[0074] The immune single-cell status prediction system provided by the present invention is described below. The immune single-cell status prediction system described below can be referred to in correspondence with the immune single-cell status prediction method described above.

[0075] See Figure 6 The present invention provides an immune single-cell status prediction system, which may include: The data receiving module is used to receive single-cell transcriptome sequencing data of an immune cell sample to be tested from at least one terminal. The prediction module is used to: obtain the state prediction result of the immune cell sample to be tested based on the single-cell transcriptome sequencing data and the immune single-cell state prediction model obtained according to the construction method of the immune single-cell state prediction model described above, wherein the state prediction result includes any one of the following or any combination thereof: health status, type of infecting pathogen, vaccination status, and type of vaccine. The data output module is used to send the state prediction results of the immune cell sample to be tested to at least one terminal.

[0076] Figure 7 An example is a schematic diagram of the physical structure of an electronic device, such as... Figure 7 As shown, the electronic device may include a processor 810, a communications interface 820, a memory 830, and a communication bus 840, wherein the processor 810, the communications interface 820, and the memory 830 communicate with each other via the communication bus 840. The processor 810 can call logical instructions in the memory 830 to execute the steps of any of the above-described methods for constructing and / or predicting the immune single-cell state.

[0077] Furthermore, the logical instructions in the aforementioned memory 830 can be implemented as software functional units and, when sold or used as independent products, can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, or the part that contributes to the prior art, or a part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.

[0078] On the other hand, the present invention also provides a computer program product, the computer program product comprising a computer program that can be stored on a non-transitory computer-readable storage medium, wherein when the computer program is executed by a processor, the computer is capable of performing the steps of any of the above-described methods for constructing an immune single-cell state prediction model and / or for predicting the immune single-cell state.

[0079] In another aspect, the present invention also provides a non-transitory computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps of the method for constructing and / or predicting the immune single-cell state as described above.

[0080] The device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs. Those skilled in the art can understand and implement this without any creative effort.

[0081] Through the above description of the embodiments, those skilled in the art can clearly understand that each embodiment can be implemented by means of software plus necessary general-purpose hardware platforms, and of course, it can also be implemented by hardware. Based on this understanding, the above technical solutions, in essence or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, magnetic disk, optical disk, etc., and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute the methods described in the various embodiments or some parts of the embodiments.

[0082] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, and not to limit them; although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features; and these modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims

1. A method for constructing an immune single-cell status prediction model, characterized in that, include: Single-cell transcriptome sequencing data and cell context metadata of immune cell sample collections are obtained. The cell context metadata includes the health status of immune cell samples, the type of infecting pathogen, vaccination status and vaccine type. Based on single-cell transcriptome sequencing data and cell scenario metadata, a fused feature vector is obtained by using a dual embedding layer of multi-source heterogeneous biological prior knowledge and cell scenario, which integrates the output embedding vector carrying cell scenario information and the gene static complete embedding vector. Based on the fused feature vectors, the bidirectional state-space model backbone network is used, combined with a multiple loss function framework, to train the model to learn the immune single-cell features under different cellular scenarios, thus obtaining an immune single-cell state prediction model.

2. The method for constructing the immune single-cell status prediction model according to claim 1, characterized in that, Based on single-cell transcriptome sequencing data and cell scenario metadata, and utilizing a dual embedding layer of multi-source heterogeneous biological prior knowledge and cell scenario, a fused feature vector is obtained that integrates an output embedding vector carrying cell scenario information and a gene static complete embedding vector, including: Based on single-cell transcriptome sequencing data, a feature matrix containing genetic identity features and multi-source biological prior knowledge was constructed. Based on the feature matrix, an adaptive source-specific gating network is used to automatically calculate the contribution weights of prior knowledge from each channel to the current gene representation through an attention mechanism or a multilayer perceptron, and then dynamically weighted and fused to obtain a gene static complete embedding vector that integrates data-driven and static prior knowledge. The feature matrix includes any one of the following or any combination thereof: Gene ID, Value, GRN, Promoter, Genefamily, Gene co-expression, and Gene location.

3. The method for constructing the immune single-cell status prediction model according to claim 2, characterized in that, The expression for the static complete embedding vector of a gene is: , In the formula, Represents the static complete embedding vector of a gene. This represents the i-th feature in the feature matrix. This represents the weight of the i-th feature in the feature matrix.

4. The method for constructing the immune single-cell status prediction model according to claim 2, characterized in that, Based on single-cell transcriptome sequencing data and cell scenario metadata, and utilizing a dual embedding layer of multi-source heterogeneous biological prior knowledge and cell scenario, a fused feature vector is obtained that integrates an output embedding vector carrying cell scenario information and a gene static complete embedding vector, including: Based on the cell scenario metadata, the global condition vector of the cell scenario is obtained; The global conditional vector of the cell context is passed through two independent linear transformation layers to calculate scaling factors for the current cell background. and bias coefficient ; Scaling factor and bias coefficient By applying conditional modulation based on cellular context to the static, intact gene embedding vector, an output embedding vector carrying cellular context information is obtained. The output embedding vector carrying cellular context information and the gene static complete embedding vector are added element-wise or concatenated to obtain a fused feature vector. The expression for conditional constraint modulation is: , In the formula, X represents the static complete gene embedding vector, and X' represents the output embedding vector after dynamic modulation by the current cell scenario.

5. The method for constructing the immune single-cell status prediction model according to claim 4, characterized in that, The process involves training a model based on fused feature vectors, utilizing a bidirectional state-space model backbone network, and combining a multiple loss function framework to learn immune single-cell features under different cellular scenarios, thereby obtaining an immune single-cell state prediction model, including: By inputting the fused feature vectors into the backbone network of the bidirectional state-space model, and for disordered single-cell gene sequences, Bi-Mamba blocks are used to simultaneously initiate forward and reverse state-space scans, capturing bidirectional long-range regulatory dependencies between genes with a linear computational complexity of O(N). Within each Mamba block, the state transition matrix is ​​dynamically adjusted through a selective mechanism to ensure that gene features highly relevant to the current cellular context are enhanced.

6. The method for constructing an immune single-cell status prediction model according to any one of claims 1-5, characterized in that, The multiple loss function framework includes any one or any combination of the following: masked gene modeling loss Cell contrast learning loss Loss of gene co-expression and cell embedding consistency loss ; The expression for the multiple loss function framework is: In the formula, Indicates the total loss. This represents the weight of the corresponding loss.

7. A method for predicting the status of immune single cells, characterized in that, include: Obtain single-cell transcriptome sequencing data from the immune cell sample to be tested; Based on single-cell transcriptome sequencing data, the immune single-cell state prediction model obtained by the method of constructing the immune single-cell state prediction model according to any one of claims 1-6 yields the state prediction result of the immune cell sample to be tested, wherein the state prediction result includes any one or any combination of the following: health status, type of infecting pathogen, vaccination status, and type of vaccine.

8. An immune single-cell status prediction system, characterized in that, include: The data receiving module is used to receive single-cell transcriptome sequencing data of an immune cell sample to be tested from at least one terminal. The prediction module is used to: obtain the state prediction result of the immune cell sample to be tested based on the single-cell transcriptome sequencing data and the immune single-cell state prediction model obtained by the construction method of the immune single-cell state prediction model according to any one of claims 1-6, wherein the state prediction result includes any one of the following or any combination thereof: health status, type of infecting pathogen, vaccination status, and type of vaccine. The data output module is used to send the state prediction results of the immune cell sample to be tested to at least one terminal.

9. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the program, it implements the method for constructing the immune single-cell state prediction model as described in any one of claims 1 to 6 and / or the immune single-cell state prediction method as described in claim 7.

10. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by the processor, it implements the method for constructing the immune single-cell state prediction model as described in any one of claims 1 to 6 and / or the immune single-cell state prediction method as described in claim 7.