Sequence data analysis method and device for biological system state modeling and storage medium

By using deep learning models to amplify immune signals and decouple features, the signal recognition and decoupling problems in immune repertoire data analysis in existing technologies are solved, high-sensitivity modeling and quantitative analysis of the state of biological systems are achieved, and the application value of immune repertoire data is enhanced.

CN120823883AActive Publication Date: 2025-10-21BEIJING SUBENYUANHE BIOTECHNOLOGY CO LTD

Patent Information

Application Number
CN202511309128.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-09-15
Publication Date
2025-10-21
Estimated Expiration
2045-09-15

AI Technical Summary

Technical Problem

Existing immune repertoire data analysis methods are unable to effectively extract high-order biological state information. They face problems such as signal heterogeneity, wide dynamic range, structural complexity and multi-source hybridity, and lack systematic modeling and quantification capabilities, making it difficult to identify and decouple key immune response signals.

Method used

A deep learning model is used for immune signal amplification and feature decoupling. Through nonlinear gain correction, combination preference feature extraction and weighted enrichment of rare clonal types, structured feature nodes are constructed. A multi-task learning framework and adversarial training mechanism are introduced to generate the system state vector and immune strength score.

Benefits of technology

It has achieved high-sensitivity modeling and quantitative analysis of the multi-dimensional states of biological systems, improved the ability to capture weak immune response signals, and supported immune status assessment and systems biology research in large-scale populations.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120823883A_ABST
    Figure CN120823883A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of immune repertoire sequencing, in particular to a sequence data analysis method and device for biological system state modeling and a storage medium. According to the method, high-throughput sequencing data of B / T cell receptors are acquired, nonlinear gain correction and V-J gene combination preference feature extraction are performed, structured feature nodes are constructed, features are coded by using a Transform model, a system state vector is generated in combination with weighted average pooling, adversarial training is introduced to realize feature decoupling, and signal interference among functional categories is inhibited. And calculating a multi-dimensional immune intensity score based on the system state vector, and quantifying immune response active degrees of different function categories. According to the method, high-sensitivity and multi-dimensional parallel modeling and dynamic evaluation of the immune system state are achieved, the method is suitable for large-scale population immune monitoring and system biological research, and the analysis capacity and application value of immune group library data are remarkably improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of immune repertoire sequencing, and in particular to a sequence data analysis method, device and storage medium for biological system state modeling. Background Art

[0002] The adaptive immune system plays a central role in maintaining homeostasis and responding to external disturbances. B cell receptors and T cell receptors, key molecules in adaptive immunity, form a unique immune repertoire with diverse sequences that record the immune system's dynamic response to changes in the internal and external environment.

[0003] With the development of high-throughput sequencing technology, immune repertoire sequencing has become an important tool for studying the state of the immune system. By deep sequencing the complementary determining region sequences of BCR or TCR, molecular-level characterization of the individual immune system can be obtained, including information such as clonal composition, frequency distribution, and V / D / J gene usage preferences. These data contain rich information about the state of the biological system and can be used to characterize the activation level, clonal expansion pattern, and long-term memory characteristics of the immune system. However, existing immune repertoire data analysis methods still face multiple technical challenges in extracting high-level biological state information from raw sequencing data: Immune response signals are characterized by high heterogeneity and a wide dynamic range. In complex biological systems, different types of physiological or pathological perturbations (such as infection exposure, tissue damage, and chronic stimulation) can trigger the expansion of specific immune clones. However, these signals are often masked by high-abundance background clones, and the biological significance of low-frequency clones is easily overlooked, making it difficult to effectively amplify and identify key response signals.

[0004] Immune repertoire data are structurally complex and multi-source heterogeneous. An individual may experience multiple immune perturbations simultaneously, with their immune repertoire manifesting as a superposition of multiple response patterns. Traditional single-task or single-dimensional analysis methods struggle to decouple signals from different perturbation sources, leading to feature confusion and reduced interpretability.

[0005] Existing analytical methods generally lack the ability to systematically model and quantify immune signaling. Most methods remain at the level of clonal frequency statistics or VJ gene usage analysis, failing to integrate multidimensional information such as sequence characteristics, frequency dynamics, and combination preferences, making it difficult to generate a unified and comparable representation of system status.

[0006] Deep learning models often face the problems of feature coupling and task interference when processing such high-dimensional, sparse sequence data. When multiple immune status assessment tasks share the same encoding space, a strong response signal may dominate the shared feature representation, reducing the sensitivity of other tasks and limiting the effectiveness of multi-task joint modeling.

[0007] Therefore, there is an urgent need for an analytical method that can effectively extract, amplify and decouple complex immune signals from immune repertoire sequencing data, so as to achieve high-sensitivity, high-specificity modeling and quantitative evaluation of the multidimensional state of biological systems, and enhance the analytical ability and application value of immune repertoire data in systems biology research. Summary of the Invention

[0008] In view of this, the present disclosure provides a sequence data analysis method, apparatus, and storage medium for biological system state modeling.

[0009] According to a first aspect of the present disclosure, a sequence data analysis method for biological system state modeling is provided, comprising the following steps: Step 1: Obtain high-throughput sequencing data of the immune repertoire of B cell receptors or T cell receptors in a biological sample, wherein the sequencing data includes sequencing reads, total sequencing reads of all clonotypes in the sample, CDR3 amino acid sequences of each clonotype, V gene segment annotation results, and J gene segment annotation results; Step 2: performing immune signal amplification processing on the immune library sequencing data, wherein the immune signal amplification processing includes nonlinear gain correction and combination preference feature extraction, fusing the corrected parameters and combination preference features to construct a structured feature node; Step 3: Use the deep learning model to encode all feature nodes and generate the system state vector H representing the overall state of the biological system through weighted average pooling operation. shared ; Step 4: Introduce a feature decoupling mechanism into the deep learning model. Through adversarial training, the distinguishability between the system state vector and the preset functional category is suppressed, thereby reducing the interference between different signals. Step 5: Based on the system state vector H shared Calculate the ImmunScore of each functional category to quantify the activity of the immune response; The deep learning model adopts a multi-task learning framework, which includes: A shared encoder that contextually encodes multiple clonotype features and generates a shared feature vector that represents the overall state of the biological system; Multiple parallel specific decoders are used to perform task-related decoding in multi-task learning on the shared feature vector and output the confidence score or prediction result of the corresponding task; The shared encoder consists of 6 stacked Transformer blocks; Each Transformer block consists of a multi-head self-attention sublayer and a feedforward network sublayer connected in sequence, and each sublayer is followed by a residual connection and layer normalization structure. The multi-head self-attention sublayer contains 8 parallel attention heads, which are used to establish global dependencies between different positions in the CDR3 sequence and parallelly model the relationship between local amino acid patterns, long-range structural dependencies, functional motif recognition, and amino acid physicochemical properties through a multi-head mechanism; The feedforward network sublayer is set after the multi-head self-attention sublayer, and includes a dimensionality-increasing linear transformation layer, a nonlinear activation layer, and a dimensionality-reducing linear transformation layer, which is used to perform nonlinear transformation and feature dimension-increasing operations on the intermediate representation vector of each position; In each sub-layer, the output of the corresponding sub-layer is added to its input vector to achieve residual connection, and then layer normalization is performed: the output of the multi-head self-attention sub-layer is used as the input of the feed-forward network sub-layer after residual connection and layer normalization; the output of the feed-forward network sub-layer is used as the final output of the Transformer block after residual connection and layer normalization; The Transformer blocks are cyclically stacked 6 times to form the shared encoder to maintain training stability and alleviate gradient vanishing; The multi-task learning framework further includes a domain discriminator module, which is applied to the adversarial training. The domain discriminator module uses the system state vector H output by the shared encoder. shared As input, the domain discriminator module is tasked with evaluating the system state vector H shared The data domain category to which it belongs is classified and identified, and the data domain category corresponds to a plurality of preset functional association categories, and each functional association category represents a specific type of biological system disturbance pattern.

[0010] According to some possible implementations of the first aspect of the present disclosure, the nonlinear gain correction is to enhance the original frequency of clonotypes, suppress high-abundance background, and increase the representation weight of low-abundance clonotypes. The calculation formula is: , in, is the corrected frequency of clonotype i, is the raw frequency of clonotype i, which is the number of sequencing reads of clonotype i. Total sequencing reads for all clonotypes in the sample The relative abundance was calculated by the ratio of is the gain coefficient, ranging from 0.1 to 0.5; the gain coefficient It is configured to be adjustable within the range of 0.1 to 0.5 to balance the signal amplification strength and the risk of noise introduction; The gain factor is a tunable hyperparameter, and its optimal value is determined by grid search on an independent validation dataset before model training. The value ranges from 0.1 to 0.5 with a step size of 0.1, and the model is selected to achieve the best performance indicator on the validation set, such as the area under the curve AUC or F1 score. value. The combination preference feature extraction is based on the annotation results of V genes and J genes, and the combination frequency of each VJ gene pair is counted. The formula for calculating the preference score is: ,in, is the observed frequency of the VJ gene pair, is the expected frequency of VJ gene pairs; Traverse all clonotypes in the sample and, for each clonotype, determine the VJ gene pair to which it belongs based on the annotation results of its V and J genes. Then, count the total number of times each specific VJ gene pair, such as "TRBV5-1" and "TRBJ2-7", appears in the sample and divide it by the total number of clonotypes in the sample to obtain the observed frequency of the VJ gene pair. vj .

[0011] Expected frequency E vj The calculation is based on the assumption that V genes and J genes are independently rearranged. The marginal frequencies of each V gene and each J gene in the sample are calculated separately, that is, F v = Total number of times V gene is used / Total number of clonotypes and F j = Total number of times the J gene is used / Total number of clonal types. Then the expected frequency of the VJ gene pair E vj = F v ×F j .

[0012] Based on the corrected frequency of clonotype i, rare clonotypes with frequencies below a preset threshold are weightedly enriched to generate weighted frequencies, which are used to characterize the abundance dynamics of clonotypes; The weighted frequencies are obtained by clonotype enrichment weights With the corrected frequency Multiplying them together, we get: , is the weighted frequency of clonotype i; is the enrichment weight of clonotype i; Will and Fusion as independent features aims to enable the deep learning model to separately learn the abundance information of clonotypes and the specific contribution of their rarity status, thereby providing richer input information and achieving feature decoupling of abundance information and rarity status, allowing the model to more flexibly capture the contribution of rare clonotypes in different biological scenarios.

[0013] Enrichment weight The calculation formula is: ; is the corrected frequency of clonotype i; is the attenuation parameter, ranging from 100 to 500; threshold is the preset frequency threshold, ranging from 0.001% to 0.01%; It is an indicator function, which takes the value 1 when the condition is met and 0 otherwise.

[0014] The attenuation parameter The specific value of the β gradient used to adjust the internal weights of rare clonotypes was determined through hyperparameter optimization on an independent validation dataset. A grid search was performed, iteratively testing a range of candidate β values ​​from 100 to 500 in steps of 50, to select the β value that optimizes the performance of the downstream deep learning model on the validation dataset, such as AUC or F1 score. The proposed range of 100 to 500 is an empirically determined range to ensure a reasonable attenuation slope for the enrichment weight function in this technical scenario: if β is less than 100, the weights are insufficiently discriminatory; if β is greater than 500, the useful signal is excessively attenuated.

[0015] Threshold is a preset frequency threshold, ranging from 0.001% to 0.01%. This threshold is set to distinguish high-frequency background clones from low-frequency signal clones in the immune repertoire. This range is based on statistical analysis of large-scale healthy population immune repertoire data and the general understanding of the biological significance of rare clones in immunology, such as nascent or memory T cells.

[0016] According to some possible implementations of the first aspect of the present disclosure, the process of fusing the corrected parameters and the combined preference features to construct a structured feature node is as follows: For each clonotype i in the immune repertoire, a fusion feature vector is constructed , fused feature vector The CDR3 amino acid sequence of clonotype i itself; the frequency after nonlinear gain correction ; Weights obtained by weighted enrichment of rare clonotypes ; Preference score of the VJ gene pair used by this clonotype ; All clonotypes are merged into a feature vector It is represented as an N×512 input matrix X, where N is the total number of clonotypes detected in the sample, and each row xi represents the fusion feature vector of the i-th clonotype ; The fusion process includes: Step S1: The key information of each independent clonotype is organized into a structured data record unit to achieve alignment and packaging of sequence information and multiple enhancement signals. The structured data record includes CDR3 Sequence 、 、 and ; Step S2: Through sequence embedding and feature concatenation, various features in structured records are converted into a unified vector representation and multimodal fusion is performed; The sequence is embedded as a vector of fixed dimension converted through an embedding matrix , ; Embedding (.) indicates embedding operation; Concatenate the sequence embedding vector and the enhanced signal to form the initial fusion vector ,

[0017] Concat(.) represents vector concatenation operation; Step S3, Mapping the concatenated initial fusion vector to a unified dimension is to adapt to the fixed input dimension requirements of the deep learning model, and dimension mapping is performed through a learnable linear transformation layer:

[0018] Linear (.) represents the operation of weighted summation and dimension transformation.

[0019] Sequence embedding (.) maps each amino acid in the CDR3 amino acid sequence into a fixed-dimensional vector through a learnable embedding matrix lookup operation, and then processes the vector sequences of all amino acids in the sequence to obtain a comprehensive sequence vector E seq(i) Embedding(.) converts amino acid symbols into vectors to achieve digital representation of biological sequences.

[0020] Concat(.) represents the vector concatenation operation, which embeds the sequence into the vector E seq(i) With other numerical features Directly concatenate across dimensions to form a longer vector .

[0021] Linear(.) is a fully connected linear transformation layer that maps input vectors of different dimensions to output vectors of uniform dimensions. This layer contains a set of parameters learned during model training: a weight matrix W linear and a bias vector b linear The weight matrix W linear The dimensions of the input and output are determined by the number of rows and the number of rows of the input vector V fused(i) The dimension of the bias vector b is matched, and the number of columns is fixed to the target output dimension 512. linear The dimension of is consistent with the target output dimension, that is, 512 dimensions. The transformation process follows the following standard formula: ector (i) = V fused (i)×W linear +b linear, By doing this, it is ensured that any input V fused(i) Finally, they are all uniformly mapped into a 512-dimensional output vector V ector (i), thus providing dimensionally consistent standardized input for subsequent model processing.

[0022] Some possible implementations of the first aspect of the present disclosure The processing of each layer of Transformer block includes the following steps: (a) Generate query matrix Q, key matrix K and value matrix V through linear transformation; (b) Split the query matrix Q, key matrix K, and value matrix V into 8 attention heads, calculate the attention weight for each head, and output the weighted value vector; (c) Concatenate the weighted value vectors output by each attention head and map them to 512 dimensions through a learnable linear transformation to obtain the multi-head attention output; (d) Add the multi-head attention output to the input and perform layer normalization to obtain the intermediate result; (e) The intermediate result is input into a feedforward neural network, which includes a linear layer that scales the dimension to 2048, a ReLU activation function, and a linear layer that scales the dimension back to 512. (f) The output of the feedforward network is added to the intermediate result and then layer normalized again to obtain the corresponding layer output. After 6 layers of stacking, all the clonal type vectors outputted are weighted averaged according to their corrected frequencies to obtain the system state vector H representing the state of the entire biological system. shared .

[0023] According to some possible implementations of the first aspect of the present disclosure, the specific decoders are multiple decoders with the same structure, each of which is used to decode the system state vector H output by the shared encoder. shared Conduct mission-related risk assessments; The decoder includes at least two fully connected hidden layers for inputting the system state vector H shared Perform multi-layer nonlinear transformations to extract specific features related to the current task step by step, and focus on key signals by reducing feature dimensions; A single-neuron output layer, used to map the low-dimensional features output by the final hidden layer to an unconstrained raw output value; The decoder further comprises an activation processing unit configured to apply a nonlinear activation function in each level of hidden layer and a Sigmoid activation function after the output layer to convert the original output value into a scalar evaluation score between 0 and 1; All specific decoders share the same network structure, but each has independent trainable parameters and is independently optimized during training based on the labeled data of its respective task to achieve well-rounded assessment of multi-class immune risks.

[0024] According to some possible implementations of the first aspect of the present disclosure, a feature decoupling mechanism based on adversarial training is introduced into the deep learning model, by suppressing the system state vector H shared The distinguishability between the pre-set functional categories can reduce the interference of immune signals between multiple tasks and improve the versatility and robustness of shared representations.

[0025] According to some possible implementations of the first aspect of the present disclosure, the method further includes: establishing a quantitative evaluation system for immune signal strength, and calculating an ImmunScore for each preset functional category based on the functional association vector after feature decoupling processing; the ImmunScore is calculated using the following formula: , Where D is the clonal diversity index, and the calculation formula is ,N is the total number of clonotypes detected in the sample; E is the clonal expansion index, and the calculation formula is: ; A is the immune activation intensity, and the calculation formula is: , is the enrichment weight of clonotype i, is the corrected frequency of clonotype i, s i is the sequence specificity score of clonotype i, is the disease-specific score given by the deep learning decoder; α1, α2, α3, and α4 are preset weight coefficients.

[0026] Sequence specificity score i The calculation method of s is as follows: for a sample containing N clonotypes, it is first processed through a Transformer-based encoder and its last layer self-attention weight matrix (dimension N×N) is extracted. Then, by summing the rows of this matrix and using a Sigmoid activation function to output a scalar value between 0 and 1, s is obtained. i Its value range is [0, 1]. i Reflects the relative importance of each clonotype in the global context.

[0027] α1, α2, α3, and α4 are preset weight coefficients, which are used to balance the contribution of different immunological indicators in the final ImmunScore.

[0028] Each coefficient ranges from [0 to 1], and their sum is set to 1, forming a weighted average. These coefficients are preset based on expert knowledge and empirical data. The importance of each indicator varies for different types of immune responses (such as acute infection, tumors, and autoimmune diseases). For example, in acute infection, the weight of the "clonotype expansion index" (α2) may be higher. The final value can be fine-tuned on the validation set to maximize the correlation of the ImmunScore with clinical gold standards (such as disease severity grading).

[0029] According to some possible implementations of the first aspect of the present disclosure, the training process of the deep learning model includes: constructing an immune repertoire dataset containing clinically diagnosed individuals and healthy control individuals, wherein the samples in the dataset have label information related to the state of the biological system; dividing the dataset into non-overlapping training subsets, validation subsets and test subsets; using the training subset to learn the parameters of the model; using the validation subset to monitor the model performance during the training process, and adjusting the hyperparameters based on the monitoring results to prevent overfitting; after the model training and hyperparameter tuning are completed, using the test subset to independently test the generalization ability of the model.

[0030] According to a second aspect of the present disclosure, there is provided a sequence data analysis apparatus for biological system state modeling, comprising: a data acquisition module configured to acquire high-throughput sequencing data of the immune repertoire of B cell receptors or T cell receptors in a biological sample, wherein the sequencing data includes sequencing reads, total sequencing reads, CDR3 amino acid sequences, and V gene and J gene segment annotation results; a signal enhancement processing module configured to perform immune signal amplification processing on the sequencing data, including nonlinear gain correction, combined preference feature extraction, and weighted enrichment of rare clonal types, and fuse the correction parameters with the preference features to construct a structured feature node; The shared encoding module is configured to use the deep learning model to contextually encode all feature nodes and generate a system state vector H representing the overall state of the biological system through weighted average pooling. shared ; a feature decoupling module configured to introduce an adversarial training mechanism to suppress the distinguishability between the system state vector and the preset function category to reduce the interference of immune signals between multiple tasks; a multi-task decoding module configured to perform risk assessments related to multiple tasks in parallel based on the system state vector and output a confidence score for each functional category; The immune strength assessment module is configured to calculate the immune strength score ImmunScore for each preset functional category based on the decoding results and clonal type distribution characteristics, which is used to quantify the activity of the immune response.

[0031] According to a third aspect of the present disclosure, there is provided an immune status analysis system, comprising: The sequence data analysis device as described above; Memory, used to store immune repertoire sequencing data and model parameters; A processor, configured to execute each module of the device; User interface, used to output the immune strength score ImmunScore, risk assessment results and visualization reports.

[0032] According to a third aspect of the present disclosure, a computer-readable storage medium storing a program is provided, wherein the program includes instructions, which, when executed by one or more processors of a computing device, cause the computing device to perform the above-mentioned method.

[0033] Beneficial effects: This application provides a sequence data analysis method, device, and storage medium for modeling the state of biological systems. Its core is to extract, amplify, and decouple complex immune signals from high-throughput sequencing data of immune repertoires, enabling highly sensitive, systematic modeling and quantitative analysis of the multidimensional state of biological systems. By constructing a multi-layered immune signal enhancement mechanism, including nonlinear gain correction, VJ gene combination preference analysis, and weighted enrichment of rare clonal types, this method effectively enhances the representation weight of low-abundance clonal types and strengthens the ability to capture weak immune response signals, thereby more comprehensively revealing the dynamic characteristics of the immune system.

[0034] Building on this foundation, a deep learning model based on the Transformer architecture contextually encodes structured data that integrates sequence and functional features, generating a shared vector representing the overall state of the biological system. By introducing adversarial training and feature decoupling mechanisms, the distinguishability between the shared representation and the predefined functional categories is suppressed, reducing interference between different signal pathways and improving the model's robustness and generalization when processing mixed signals from multiple sources. This framework supports the recognition and independent evaluation of multiple signals in parallel.

[0035] Furthermore, this application has constructed a comprehensive immune strength quantitative assessment system that integrates multidimensional indicators such as clonal diversity, amplification index, immune activation intensity, and sequence specificity to achieve comparable quantification of the degree of immune response activity under different functional categories, and support hierarchical characterization and dynamic trend analysis of the state of biological systems. This application has achieved in-depth analysis and systematic modeling of immune repertoire data, with the advantages of ultra-high sensitivity, multi-dimensional parallel analysis, precise quantification, and non-invasive convenience. It is suitable for immune status assessment, long-term health monitoring, and systems biology research in large-scale populations, significantly improving the application value of immune repertoire data in the functional analysis of biological systems. BRIEF DESCRIPTION OF THE DRAWINGS

[0036] In order to more clearly illustrate the embodiments of the present disclosure or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments. Obviously, the drawings described below are only some embodiments of the present disclosure. For ordinary technicians in this field, other drawings can be obtained based on these drawings without any creative work.

[0037] Figure 1 A diagram of a sequence data analysis apparatus for modeling biological system states disclosed herein; Figure 2 The present invention discloses a sequence data analysis method for modeling the state of a biological system; Figure 3 This is a diagram of the immune signal amplification processing process disclosed herein; Figure 4 This is a structural diagram of the deep learning model. DETAILED DESCRIPTION

[0038] The following will clearly and completely describe the technical solutions in the embodiments of the present disclosure in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present disclosure, not all of the embodiments. All other embodiments obtained by ordinary technicians in this field based on the embodiments of the present disclosure without making any creative efforts shall fall within the scope of protection of the present disclosure.

[0039] The terms used in the embodiments of the present disclosure are for the purpose of describing specific embodiments only and are not intended to limit the present disclosure. The singular forms "a," "an," "the," and "the" used in the embodiments of the present disclosure and the appended claims are also intended to include the plural forms unless the context clearly indicates otherwise.

[0040] In this application, the state of a biological system refers to the current functional state of an individual's immune system as reflected by immune repertoire data, such as health, tumor response, infection, autoimmune abnormality, or immunosuppression.

[0041] Figure 1 The sequence data analysis device disclosed in the present invention for modeling the state of a biological system is shown. Figure 1 As shown, a sequence data analysis device for biological system state modeling is provided, comprising: a data acquisition module configured to acquire high-throughput sequencing data of the immune repertoire of B cell receptors or T cell receptors in a biological sample, wherein the sequencing data includes sequencing reads, total sequencing reads, CDR3 amino acid sequences, and V gene and J gene segment annotation results; a signal enhancement processing module configured to perform immune signal amplification processing on the sequencing data, including nonlinear gain correction, combined preference feature extraction, and rare clonal type weighted enrichment, and fuse the correction parameters with the preference features to construct structured feature nodes; a shared encoding module configured to use a deep learning model to perform context encoding on all feature nodes, and generate a system state vector H representing the overall state of the biological system through weighted average pooling. shared A feature decoupling module is configured to introduce an adversarial training mechanism to suppress the distinguishability between the system state vector and the preset functional categories, thereby reducing interference between immune signals in multiple tasks. A multi-task decoding module is configured to perform risk assessments related to multiple tasks in parallel based on the system state vector and output a confidence score for each functional category. An immune strength assessment module is configured to calculate the ImmunScore for each preset functional category based on the decoding results and clonotype distribution characteristics to quantify the activity of the immune response.

[0042] Based on the above-mentioned analysis device, an immune status analysis system is constructed, including: the above-mentioned sequence data analysis device; a memory for storing immune library sequencing data and model parameters; a processor for running each module of the device; and a user interface for outputting the immune strength score ImmunScore, risk assessment results and visual reports.

[0043] Figure 2 The present disclosure shows a sequence data analysis method for modeling the state of a biological system. The analysis method does not involve disease diagnosis and treatment. Figure 2, a sequence data analysis method for biological system state modeling, comprising the following steps: Step 1, obtaining high-throughput sequencing data of the immune repertoire of B cell receptors or T cell receptors in a biological sample, wherein the sequencing data includes sequencing reads, total sequencing reads of all clonotypes in the sample, CDR3 amino acid sequences of each clonotype, V gene segment annotation results, and J gene segment annotation results.

[0044] 5-10 mL of peripheral blood was collected from the subjects, peripheral blood mononuclear cells (PBMCs) were separated, RNA was extracted, and the CDR3 regions of the BCR heavy chain (IgH) and TCR β chain were amplified using 5'RACE technology. High-throughput sequencing was performed to obtain raw sequencing data.

[0045] Step 2: Perform immune signal amplification processing on the immune library sequencing data. The immune signal amplification processing includes nonlinear gain correction and combination preference feature extraction. The corrected parameters and combination preference features are fused to construct structured feature nodes.

[0046] This step effectively amplifies weak early tumor immune signals through a multi-level signal enhancement strategy.

[0047] Step 3: Use the deep learning model to encode all feature nodes and generate the system state vector H representing the overall state of the biological system through weighted average pooling operation. shared .

[0048] Step 4: Introduce a feature decoupling mechanism into the deep learning model, and suppress the distinguishability between the system state vector and the preset functional category through adversarial training to reduce the interference between different signals.

[0049] Step 5: Based on the system state vector H shared The immune intensity score ImmunScore of each functional category was calculated to quantify the activity of the immune response.

[0050] Figure 3 The immune signal amplification process diagram of the present disclosure is shown. Figure 3 The nonlinear gain correction is to enhance the original frequency of clonotypes, suppress the high-abundance background, and increase the representation weight of low-abundance clonotypes. The calculation formula is: , in, is the corrected frequency of clonotype i, is the raw frequency of clonotype i, which is the number of sequencing reads of clonotype i. Total sequencing reads for all clonotypes in the sample The relative abundance was calculated by the ratio of is the gain coefficient, ranging from 0.1 to 0.5; the gain coefficient It is configured to be adjustable within the range of 0.1 to 0.5 to balance the signal amplification strength and the risk of noise introduction; The combination preference feature extraction is based on the annotation results of V genes and J genes, and the combination frequency of each VJ gene pair is counted. The formula for calculating the preference score is: ,in, is the observed frequency of the VJ gene pair, is the expected frequency of VJ gene pairs; Based on the corrected frequency of clonotype i, rare clonotypes with frequencies below a preset threshold are weightedly enriched to generate weighted frequencies, which are used to characterize the abundance dynamics of clonotypes; The weighted frequencies are obtained by clonotype enrichment weights With the corrected frequency Multiplying them together, we get: , is the weighted frequency of clonotype i; is the enrichment weight of clonotype i; Enrichment weight The calculation formula is: ; is the corrected frequency of clonotype i; is the attenuation parameter, ranging from 100 to 500; threshold is the preset frequency threshold, ranging from 0.001% to 0.01%. It is an indicator function, which takes the value 1 when the condition is met and 0 otherwise.

[0051] Clonotype frequency correction: Corrects the raw clonotype frequencies to reduce the impact of high-abundance clonotypes and improve the signal-to-noise ratio of low- and medium-abundance clonotypes.

[0052] Rare clonotype enrichment: Rare clonotypes with frequencies below a certain threshold (e.g., 0.01%) are enriched by applying exponential weights to highlight their potential importance in early diagnosis.

[0053] VJ gene usage bias analysis: By analyzing the deviation of the frequency of VJ gene pairing from the expected frequency, the preferential selection caused by specific antigen stimulation is identified as another dimension of signal amplification.

[0054] According to some possible implementations of the first aspect of the present disclosure, the process of fusing the corrected parameters and the combined preference features to construct a structured feature node is as follows: For each clonotype i in the immune repertoire, a fusion feature vector is constructed , fused feature vector The CDR3 amino acid sequence of clonotype i itself; the frequency after nonlinear gain correction ; Weights obtained by weighted enrichment of rare clonotypes ; Preference score of the VJ gene pair used by this clonotype ; All clonotypes are merged into a feature vector It is represented as an N×512 input matrix X, where N is the total number of clonotypes detected in the sample, and each row xi represents the fusion feature vector of the i-th clonotype ; The fusion process includes: Step S1: The key information of each independent clonotype is organized into a structured data record unit to achieve alignment and packaging of sequence information and multiple enhancement signals. The structured data record includes CDR3 Sequence 、 、 and ; Step S2: Through sequence embedding and feature concatenation, various features in structured records are converted into a unified vector representation and multimodal fusion is performed; The sequence is embedded as a vector of fixed dimension converted through an embedding matrix , ; Embedding (.) indicates embedding operation; Concatenate the sequence embedding vector and the enhanced signal to form the initial fusion vector ,

[0055] Concat(.) represents the vector concatenation operation. Step S3, Mapping the concatenated initial fusion vector to a unified dimension is to adapt to the fixed input dimension requirements of the deep learning model, and dimension mapping is performed through a learnable linear transformation layer:

[0056] Linear (.) represents the operation of weighted summation and dimension transformation.

[0057] In the adaptive immune response, specific antigen exposure drives the selective expansion of BCR / TCR VJ gene rearrangement combinations. By comparing the observed frequency of VJ combinations with the expected frequency calculated based on a random rearrangement model, the rearrangement bias can be assessed: a frequency significantly higher than the expected frequency indicates positive selection (i.e., positive bias), possibly reflecting antigen-specific activation; a frequency significantly lower than the expected frequency indicates negative selection or suppression (i.e., negative bias); and a frequency close to the expected value is considered to be devoid of significant bias, representing the background homeostasis of the immune system. This bias analysis provides important clues for identifying antigen-driven immune responses.

[0058] "Rare clonotypes" are operationally defined based on a pre-determined frequency threshold (e.g., 0.001% to 0.01%), referring to clonotypes with frequencies below this threshold in the immune repertoire. These clonotypes are specifically weighted in subsequent analyses to enhance their contribution to the overall immune response profile.

[0059] In deep learning analysis of the immune repertoire, the CDR3 region of a T cell receptor or B cell receptor is represented as a string of amino acid sequences, such as "CASSLGTGNEQYF." These sequences are essentially discrete sequences of symbols and cannot be directly processed by neural networks. All computations in deep learning models are based on continuous numerical vectors, necessitating the conversion of the original sequences into fixed-dimensional vector representations. This process is known as sequence embedding. By introducing a learnable embedding matrix, each amino acid is mapped to a low-dimensional vector, and the entire CDR3 sequence is encoded into a fixed-length, context-aware vector, thus achieving the transformation from "biological symbols" to "mathematical representations." This embedding not only resolves the data type mismatch but, more importantly, captures the physicochemical similarities between amino acids (such as hydrophobicity, charge, and volume) as well as the functional semantics of sequence patterns. Furthermore, the fixed-dimensional output ensures that CDR3 sequences of varying lengths can be uniformly input into subsequent models such as the Transformer, meeting the requirements of batch processing and parallel computation. Therefore, sequence embedding is not only a necessary step for technical implementation but also crucial for constructing high-order immune feature spaces and mining functional associations between clonotypes.

[0060] The core of data fusion is to create a comprehensive feature vector for each clonotype that contains its sequence information and all amplification signals. This process is completed by feature concatenation, which is then input into the embedding layer and linear layer of the model, and finally converted into a dimensional unified input vector that can be processed by the deep learning model. The complete input of a patient is composed of all (or top N) clonotypes in the patient. A collection or sequence of components.

[0061] See also Figure 4 , Figure 4This is a diagram of the deep learning model structure. The deep learning model adopts a multi-task learning framework, which includes: A shared encoder that contextually encodes multiple clonotype features and generates a shared feature vector that represents the overall state of the biological system; Multiple parallel specific decoders are used to perform task-related decoding in multi-task learning on the shared feature vector and output the confidence score or prediction result of the corresponding task; The shared encoder consists of 6 stacked Transformer blocks; Each Transformer block consists of a multi-head self-attention sublayer and a feedforward network sublayer connected in sequence, and each sublayer is followed by a residual connection and layer normalization structure. The multi-head self-attention sublayer contains 8 parallel attention heads, which are used to establish global dependencies between different positions in the CDR3 sequence and parallelly model the relationship between local amino acid patterns, long-range structural dependencies, functional motif recognition, and amino acid physicochemical properties through a multi-head mechanism; The feedforward network sublayer is set after the multi-head self-attention sublayer, and includes a dimensionality-increasing linear transformation layer, a nonlinear activation layer, and a dimensionality-reducing linear transformation layer, which is used to perform nonlinear transformation and feature dimension-increasing operations on the intermediate representation vector of each position; In each sub-layer, the output of the corresponding sub-layer is added to its input vector to realize residual connection, and then normalized by layer: the output of the multi-head self-attention sub-layer is used as the input of the feedforward network sub-layer after residual connection and layer normalization; the output of the feedforward network sub-layer is used as the final output of the Transformer block after residual connection and layer normalization. The Transformer blocks are cyclically stacked 6 times to form the shared encoder to maintain training stability and alleviate gradient vanishing; The processing of each layer of Transformer block includes the following steps: (a) Generate query matrix Q, key matrix K and value matrix V through linear transformation; (b) Split the query matrix Q, key matrix K, and value matrix V into 8 attention heads, calculate the attention weight for each head, and output the weighted value vector; (c) Concatenate the weighted value vectors output by each attention head and map them to 512 dimensions through a learnable linear transformation to obtain the multi-head attention output; (d) Add the multi-head attention output to the input and perform layer normalization to obtain the intermediate result; (e) The intermediate result is input into a feedforward neural network, which includes a linear layer that scales the dimension to 2048, a ReLU activation function, and a linear layer that scales the dimension back to 512. (f) The output of the feedforward network is added to the intermediate result and then layer normalized again to obtain the corresponding layer output. After 6 layers of stacking, all the clonal type vectors outputted are weighted averaged according to their corrected frequencies to obtain the system state vector H representing the state of the entire biological system. shared .

[0062] An intermediate representation vector (IRV) is a new feature vector containing contextual semantic information obtained after a clonotype (such as a TCR / BCR sequence) is processed by a certain layer in the Transformer network. In each Transformer block, a multi-head self-attention sublayer performs context-aware feature aggregation on its input. The resulting output vector, after residual connections and layer normalization, serves as the input to the feedforward network sublayer for further nonlinear transformations.

[0063] The specific processing process of each layer of Transformer block includes the following steps: The multi-head self-attention mechanism establishes global dependencies between different positions in the amino acid sequence and models different relationship patterns in parallel through multiple attention heads. in (i) Ability to focus on all other clonotype vectors z within an individual in (j), and updates its own information based on the correlation, thereby capturing the synergy and functional patterns between clonotypes, where the clonotype vector z in (i) = input matrix X. Input z in (i) Through three different linear transformations, query the matrix , key matrix , value matrix , W Q 、W K 、W V is a learnable parameter, W Q represents the weight of the query matrix Q, W K and W V Similarly, the dimensions of these weight matrices are 512 x 512. They are the weight matrices used to generate the Q, K, and V matrices, which are used to convert the input vectors into Q, K, and V vectors. They are the core learnable parameters of the model and are automatically learned and updated through backpropagation during training. Their initial values ​​are usually randomly initialized and range from any real number, ultimately allowing the model to learn how to better capture the dependencies between different positions in the sequence.

[0064] The query matrix Q, key matrix K, and value matrix V are evenly divided into 8 attention heads h, and the attention score is calculated for the attention head h , each element in the matrix Scores h (i,j) represents the original correlation score of the i-th clonotype (as query) to the j-th clonotype (as key) in the sequence. The higher the score, the more information about the j-th clonotype should be considered when constructing the new representation of the i-th clonotype. T is the matrix transpose operation. is the vector dimension of each head, =512 / 8=64, normalize the score to get the attention weight , calculate the output of the head , Represents the value matrix of the h-th attention head. The outputs of the 8 heads are spliced ​​together to obtain ,in, The output linear transformation matrix is ​​used to restore the concatenated vector to 512 dimensions. In other words, Wo is a learnable 512 x 512 dimensional weight matrix used to fuse multi-head information and restore dimensions. This operation merges 8 N x 64 matrices along the feature dimension into a large N x 512 matrix, and then obtains the multi-head attention output through an output linear transformation. Then, the residual connection and layer normalization operations are performed. The output of the multi-head self-attention is added to the original input and layer normalization is performed to obtain the output of the first sub-layer: This operation helps alleviate the gradient vanishing problem in deep networks and stabilize the training process. The operation independently normalizes the feature vector of each clonotype to have a mean of 0 and a variance of 1, and then scales and translates it through learnable gain and bias parameters to stabilize the training process.

[0065] Next, we enter the feedforward neural network module (FFN). This module performs independent nonlinear transformations on each clonotype vector to enhance the model's expressive power. The specific calculation is: The network is a two-layer fully connected structure. The first layer increases the dimension from 512 to 2048. After the ReLU activation function, the second layer reduces the dimension back to 512. W1 and b1 are the weight (512×2048) and bias (2048) of the first linear layer. ReLU is the rectified linear unit activation function. W2 and b2 are the weight (2048×512) and bias (512) of the second linear layer.

[0066] Finally, a second residual connection and layer normalization are performed.

[0067] , is the final output of the Transformer block, which will serve as the input Z of the next block in .

[0068] After layer-by-layer processing of the 6-layer Transformer block, the final output matrix X is obtained final ∈RN×512, its size is still [N,512], each row X final (i) is a clonal type vector that fully integrates the contextual information of the entire immune repertoire.

[0069] By performing weighted average pooling on all final clonotype vectors, a fixed-dimensional system state vector H is generated. shared , used to characterize the global immune status of the individual at the current time point. This method is in line with biological intuition and uses the corrected frequency of each clonotype As the weight, all final clonotype vectors are weighted averaged. The calculation formula is: , the final 512-dimensional vector system state vector This vector is a highly condensed, context-aware mathematical representation of the overall state of the patient's immune repertoire, which is used for subsequent immune status classification, disease progression prediction, or treatment response assessment.

[0070] The eight self-attention heads are structurally consistent but are randomly assigned different parameters during model initialization. During training, each attention head automatically learns and differentiates through backpropagation to capture features at different levels and types in the sequence. Although the specific function of each head cannot be predefined, visualization and attribution analysis of the trained model reveal that different attention heads tend to focus on different biological characteristics of the CDR3 sequence: some heads focus on identifying local amino acid patterns (such as consecutive hydrophobic residues); some heads capture long-range sequence dependencies (such as potential interactions between charged amino acids at the N-terminus and C-terminus); some heads tend to identify known structural motifs or conserved sequence segments; and others focus more on integrating the physicochemical properties of amino acids (such as polarity, charge, and volume). This parallel and complementary attention mechanism enables the model to collaboratively analyze the complex immune characteristics of CDR3 sequences from multiple dimensions, significantly enhancing the representation and generalization performance of immune repertoire data.

[0071] The dimension increase / reduction design not only ensures high capacity of feature extraction, but also avoids excessive overhead of subsequent calculations, while also enhancing the model fitting capability.

[0072] In the sequence data analysis method for modeling the state of a biological system described in the present invention, a shared encoder uses a deep neural network based on the Transformer architecture to perform context-aware encoding processing on the fused feature vectors of multiple clonotypes in the immune repertoire, and finally generates a condensed vector that represents the overall immune state of the biological system. This process does not directly vectorize a single CDR3 sequence (this step has been completed in the embedding layer), but rather globally models the structured features of all clonotypes in the entire immune repertoire. Through the layer-by-layer processing of the Transformer, the Transformer block is used to encode the sequence information in the immune repertoire (CDR3 sequences at the amino acid or nucleotide level) into a high-dimensional continuous vector representation for subsequent disease-specific decoder use. This step realizes the mapping from the symbol sequence space to the feature vector space. It is finally "encoded" into a fixed-length context vector representing the state of the entire immune repertoire, that is, the system state vector H shared This is a coding process from "group information" to "condensed summary".

[0073] After the shared encoder, multiple parallel decoding heads are connected, each of which independently outputs the signal strength of the corresponding disease (such as different types of cancer, autoimmune diseases, and infections).

[0074] Adversarial training and orthogonality constraints are introduced during the model training process to minimize the information correlation between different decoding heads and ensure that the signal output by each decoding head is pure and specific, thereby achieving effective signal decoupling.

[0075] According to some possible implementations of the first aspect of the present disclosure, the specific decoders are multiple decoders with the same structure, each of which is used to decode the system state vector H output by the shared encoder. shared Conduct mission-related risk assessments; The decoder includes at least two fully connected hidden layers for inputting the system state vector H shared Perform multi-layer nonlinear transformations to extract specific features related to the current task step by step, and focus on key signals by reducing feature dimensions; A single-neuron output layer, used to map the low-dimensional features output by the final hidden layer to an unconstrained raw output value; The decoder further comprises an activation processing unit configured to apply a nonlinear activation function in each level of hidden layer and a Sigmoid activation function after the output layer to convert the original output value into a scalar evaluation score between 0 and 1; All specific decoders share the same network structure, but each has independent trainable parameters and is independently optimized during training based on the labeled data of its respective task to achieve well-rounded assessment of multi-class immune risks.

[0076] The decoding method based on specific decoders includes: inputting the system state vector generated by the shared encoder into each specific decoder in parallel; in each decoder, performing feature extraction through multiple levels of fully connected hidden layers in sequence, and performing linear transformation and combining nonlinear activation processing on each layer; sending the output of the final hidden layer to the single neuron output layer to generate the original output value; applying the Sigmoid activation function to the original output value to generate a scalar evaluation score as output, where the closer the score is to 1, the higher the risk level of the individual in the corresponding task, and the closer the score is to 0, the lower the risk level.

[0077] Specifically, the specific decoder group includes at least one infectious disease decoder, at least one autoimmune disease decoder, and at least one tumor disease decoder. After that, the vector is fed into multiple independent decoders in parallel, each corresponding to a specific evaluation task, to extract task-related risk signals from the unified immune representation. Each decoder consists of a series of fully connected layers, including at least two hidden layers and one output layer. 512-dimensional vector It is sent to the first hidden layer, and nonlinear mapping is performed through linear transformation and ReLU activation function to output a 256-dimensional intermediate feature vector; taking the tumor decoder as an example, the specific calculation is , and are the weight matrix and bias vector of this layer. The weight matrix is ​​512×256 and the bias vector is a vector of length 256.

[0078] This intermediate feature is input into the second hidden layer and further mapped to 64 dimensions, calculated as , achieving layer-by-layer refinement and compression of key immune features. and, The weight matrix and bias vector of the second hidden layer are 256×64, the bias vector length is 64, and the ReLU function expression is f(x) = max(0, x). After the hidden layer processing is completed, the final 64-dimensional feature vector is sent to the single neuron output layer, and a scalar value called Logits is generated through linear transformation, which is calculated as , H2 is the output of the second hidden layer, with a dimension of 64; W cancerout is the weight matrix, dimension is 64×1; b canceroutis a bias term with a dimension of 1. The Logits value is the raw, unnormalized output with an unconstrained range. To convert it into an interpretable risk score, the system applies a Sigmoid activation function to the Logits, resulting in the final output: Output value It is a scalar between 0 and 1, indicating the risk level of the corresponding task. The closer the value is to 1, the higher the risk, and the closer the value is to 0, the lower the risk.

[0079] All decoders use the same network structure and computational process, but each has independent trainable parameters (including weights and biases). In this application, tumor risk assessment, autoimmune status assessment, and infection risk assessment are each completed by an independent decoder, and their parameters are independently optimized based on their respective task objectives during training. This design allows different decoders to learn from the same The specific signals of each task are decoded to achieve multi-task parallel evaluation, while avoiding parameter interference between tasks and improving the flexibility of the model.

[0080] In the above multi-task learning framework based on a shared encoder and decoders for multiple independent diseases, there is a key challenge, which is how to ensure the immune representation output by the shared encoder. Not dominated or contaminated by a strong signal from a particular disease. If too much task-specific information is mixed into the decoder, such as tumor-specific T cell clone expansion signals, it may cause other decoders, such as infection or autoimmune decoders, to receive interference signals, resulting in information coupling between tasks and performance degradation.

[0081] To solve this problem, this application further introduces an adversarial signal denoising mechanism to actively purify the shared feature space. The deep learning model also sets a domain discriminator module, whose input is The task is to identify which downstream decoder the feature vector serves, such as the tumor decoder, infection decoder, or autoimmune decoder. During training, the shared encoder is optimized to minimize the classification accuracy of the discriminator, generating a generalized feature representation that makes it difficult for the discriminator to distinguish the source of the task.

[0082] The adversarial process essentially constitutes a game system, where the discriminator tries to learn task-specific patterns, that is, the discriminator strives to learn to distinguish, while the encoder strives to eliminate these recognizable patterns, that is, the encoder strives to learn confusion. After adversarial training, The task-specific information in the dataset is effectively suppressed, retaining only the universal immune signatures ("noise" or "interference") shared across diseases. These stripped-away specific signals (such as tumor-specific T cell signatures) are then autonomously learned by each independent decoder (tumor decoder) in its dedicated pathway using trainable parameters.

[0083] The adversarial mechanism is not an isolated module but rather a core regularization mechanism serving the multi-task decoding architecture. It ensures that the input features received by each decoder are highly consistent, that task-specific signals do not crosstalk through shared layers, and that multiple decoders can truly achieve "parallel, independent, and interference-free" risk assessment.

[0084] The domain discriminator module significantly improves the decoupling capability of the multi-task system.

[0085] In the multi-task deep learning analysis method based on immune repertoire data described in the present invention, in order to achieve effective decoupling and feature purification of complex biological signals, a composite loss function is introduced in the model training process to collaboratively optimize the parameters of the shared encoder, multiple task-specific decoders, and domain discriminators. , the loss function expression is: Represents the task-related loss, which is used to ensure the ability of each decoder to recognize the target category, that is, to ensure that each disease-specific decoder of the model can accurately predict its corresponding disease state; It is an adversarial loss used to suppress the task-specific components mixed in the shared feature space, prompting the encoder to output a universal representation with cross-task consistency. It is an orthogonal constraint loss, which is used to enhance the independence of features extracted by different decoding paths and reduce the overlap of their representation spaces. and This is an adjustable weight coefficient, determined through cross-validation or parameter tuning on the validation set. It balances the relative impact of various losses and is typically set in the range [0, 1]. Its specific value is determined through grid search hyperparameter optimization on the validation set. The entire immune repertoire sample data set is randomly divided into three non-overlapping subsets according to a predetermined ratio (70%:15%:15%): training, validation, and test sets. The training set is used for gradient updates and iterative learning of model parameters; the validation set is used to monitor model performance and guide hyperparameter selection during training; and the test set is used only in the final stage for independent, unbiased performance evaluation of the selected model. During the training phase, the model is iteratively trained using the training set data. After a certain number of training rounds (5 or 10 rounds), training is paused and the current model is subjected to forward inference on the validation set to evaluate its overall performance. Evaluation metrics include two aspects: task-related performance metrics and a proxy for decoupling effectiveness. Task-related performance indicators: Calculate the prediction performance of each disease-specific decoder on the validation set. The area under the receiver operating characteristic curve (AUC-ROC) is usually used. The average AUC of all tasks is further calculated to measure the multi-task recognition ability of the model. The proxy indicator of the decoupling effect is used to measure the degree of purification of the shared feature space. Indirect evaluation indicators are introduced to train a lightweight classifier using the system state vector H output by the shared encoder. shared To predict the task category to which a sample belongs, a lower prediction accuracy indicates less task-specific information confounded by the shared features, and thus a better decoupling effect. Subsequently, a grid search method is used to systematically try different (λ1,λ2) combinations within the preset hyperparameter range (λ1,λ2∈{0.1,0.5,1.0,2.0}). For each set of hyperparameters, the training and validation process is repeated, and the overall performance on the validation set is recorded. Finally, the combination with the best decoupling metric is selected based on a preset comprehensive scoring criterion (for example, prioritizing ensuring that the average AUC does not fall below a certain threshold). The hyperparameter combination (λ1,λ2) with the best overall performance on the validation set is selected. After determining the optimal hyperparameters, the final model can be retrained using the combined training and validation data (to fully utilize the data). A single final performance evaluation is then performed on the test set, reporting metrics such as AUC, sensitivity, and specificity for each task to objectively reflect the model's generalization ability.

[0086] The mission loss The binary cross entropy loss function is used to sum the losses of each disease task. It is suitable for multi-disease, multi-label classification tasks (i.e., an individual may suffer from multiple diseases at the same time), ensuring that the model is able to correctly identify the disease type / risk level. Its mathematical form is as follows: , where K is the total number of task-specific decoders (K=12 in this embodiment), y k ∈{0,1} represents the true attribution label of the kth category, which is a binary variable with a value of 0 or 1. It comes from the clinical diagnosis results of the individuals corresponding to the training samples and is an objective, predetermined gold standard data. If the individual is clinically diagnosed with the kth disease, then y k =1; otherwise y k = 0, for each sample, its K true labels (y1, y2, ..., y K ) constitutes a K-dimensional multi-hotspot label vector, which supports multiple diseases to be positive at the same time, conforms to the clinical reality of coexistence of multiple diseases, and provides a supervision signal for multi-task learning for the model. k is the prediction confidence of the corresponding decoder output, indicating the probability that the model determines that the individual has the kth disease. This loss term ensures that the model has basic discriminative performance in multi-task recognition tasks.

[0087] The adversarial loss This is achieved through a domain discriminator. The discriminator uses the feature vector H output by the shared encoder shared As input, the goal is to identify the task category of the feature vector (in this embodiment, it is divided into three categories: tumor, autoimmune, and infection, corresponding to different biological state modes, C=3). The role of the discriminator is to try to identify the feature vector output by the shared encoder. One of the training goals of the shared encoder is to make the generated H shared This makes the discriminator's predicted probability for all C domains approach 1 / C, which means they are completely indistinguishable. This adversarial loss is defined as the negative cross entropy between the discriminator's output probability distribution and the uniform distribution. It is used to suppress the common / noise characteristics between diseases, allowing each decoder to obtain a purer and more exclusive signal: ,in, Denotes the domain discriminator D for the input feature H shared Predict the probability that it belongs to the cth disease domain, It is applied to the shared encoder, and its goal is to maximize the classification confusion of the discriminator. Through this mechanism, the shared encoder is guided to learn a task-independent general feature representation, thereby effectively suppressing the dominant role of strong signals of specific tasks in the shared space and improving the generalization ability of features.

[0088] The orthogonality constraint loss Applied to the intermediate feature layers of each decoder, this loss aims to enhance the specificity of features extracted by different disease decoders and reduce their correlation. It requires that the representations of different disease feature spaces be as orthogonal (independent) as possible, minimizing overlap. This is achieved by forcing the feature vector representations of different disease class decoders to be orthogonal before their final output. The orthogonality loss is defined as the sum of the squared cosine similarities between all class pairs: ,in, represents the summation of all different disease category pairs (c1, c2), randomly selecting two different categories from the K disease categories, and each pair appears only once. For example, when there are three disease categories (tumor, autoimmune disease, infection), all category pairs that meet the conditions are: [tumor, autoimmune], [tumor, infection], [autoimmune, infection]. This summation operation is intended to measure the relationship between the corresponding feature representations of different disease tasks, avoid redundant comparisons of the same category with itself, and ensure that orthogonal constraints only act between different functional categories, thereby effectively promoting the independence and decoupling of the feature space of each decoding path. c1 and h c2 Denotes the decoders of c1 and c2 belonging to different task categories (diseases) from H shared The feature vector extracted from , before its final output layer. represents the L2 norm, i.e., the length of the vector. Minimizing this loss function forces the feature representations of different decoding paths to be orthogonal in the vector space, significantly reducing feature coupling between tasks, improving the modularity and interpretability of the system, and thus achieving feature-level decoupling.

[0089] By jointly optimizing the above three loss functions, and by the parameters and By balancing their weights, the model of the present invention is able to learn disease-specific immune signals that are both highly predictive and pure and free of interference.

[0090] In real-world clinical scenarios, individuals may experience multiple immune disturbances simultaneously. For example, a patient with early-stage lung cancer may also be infected with the influenza virus or have mild autoimmune conditions. These diverse pathological conditions each drive specific immune responses and leave unique molecular signatures within the T cell or B cell receptor repertoire. Because these signals overlap and coexist in sequencing data, traditional single-task analysis methods struggle to effectively distinguish their sources, leading to signal cross-interference and compromising the accuracy of disease identification.

[0091] This paper constructs a deep learning model based on a shared encoder and a multi-task decoder, combined with an adversarial feature decoupling mechanism, to accurately separate multi-category pathological features from complex mixed immune signals. The shared encoder first extracts universal immune representations across diseases, while each task-specific decoder simultaneously identifies risk patterns for the corresponding disease category. By introducing adversarial training and orthogonal constraints, the model actively suppresses task-private information in the shared feature space, forcing different decoding paths to focus on learning specific signals that do not interfere with each other.

[0092] This design effectively decouples different types of immune response signals, such as cancer, infection, and autoimmunity, enabling simultaneous, independent, and highly specific detection of multiple coexisting diseases. It significantly reduces the risk of false positives or misjudgments due to signal confounding, and improves the accuracy and interpretability of immune status analysis in complex clinical settings.

[0093] According to some possible implementations of the first aspect of the present disclosure, the multi-task learning framework further includes a domain discriminator module, wherein the domain discriminator module is a system state vector H output by the shared encoder. shared As input, the domain discriminator module is tasked with evaluating the system state vector H shared Classify and identify the data domain category to which it belongs, wherein the data domain category corresponds to a plurality of preset functional association categories, each functional association category representing a specific type of biological system disturbance pattern; Introducing a feature decoupling mechanism based on adversarial training into the deep learning model, by suppressing the system state vector H shared The distinguishability between the pre-set functional categories can reduce the interference of immune signals between multiple tasks and improve the versatility and robustness of shared representations.

[0094] Data domain categories refer to logical categories divided according to the data distribution characteristics corresponding to different tasks in the multi-task learning framework. In machine learning, "domain" generally refers to a data set with similar statistical characteristics. In the present invention, the data domain categories correspond to multiple preset functional task paths, which are specifically manifested as the distribution differences of immune response patterns under different disease states in the feature space. The system defines three types of data domains: the first data domain corresponds to tumor-related immune responses, which are characterized by the continuous amplification of a few clones and the enrichment of high-affinity sequences; the second data domain corresponds to infectious disease-related immune responses, which are characterized by acute polyclonal amplification and a transient decrease in diversity; the third data domain corresponds to autoimmune disease-related immune responses, which are characterized by long-term activity of medium and low-frequency self-reactive clones and enhanced sequence conservation. Each data domain represents a recognizable data distribution pattern caused by a specific type of biological system perturbation. During the model training process, the domain discriminator identifies the system state vector H output by the shared encoder. sharedThe data domain category to which it belongs participates in the adversarial training mechanism to promote the debiasing and decoupling of the shared feature space.

[0095] In this embodiment, the functional association categories include, but are not limited to, categories associated with tumor immune responses, categories associated with infectious immune responses, and categories associated with autoimmune responses. A biological system perturbation pattern refers to a detectable change in the functional state of a biological system (particularly the immune system) caused by a specific physiological or pathological process (such as disease, infection, tissue damage, immune intervention, etc.). This change leaves a unique, quantifiable pattern of molecular signals in the immune repertoire (such as a collection of T cell or B cell receptor sequences). Biological system perturbation patterns include quantifiable indicators such as changes in T cell receptor repertoire diversity, clonal expansion characteristics, and CDR3 sequence preferences caused by the corresponding pathological process. These quantifiable indicators can serve as biomarkers reflecting specific types of perturbations.

[0096] More specifically, the “functional association categories” include but are not limited to the following three categories: tumor-related immune response, infectious disease-related immune response, and autoimmune disease-related immune response. shared , determine which disease-specific decoder the vector serves, that is, identify whether it is more inclined to be used for cancer risk assessment, infection status recognition or autoimmune activity scoring.

[0097] Disease-specific decoders include: infectious disease decoders for COVID-19, influenza, and HIV; autoimmune disease decoders for systemic lupus erythematosus, type 1 diabetes, and autoimmune hepatitis; and tumor disease decoders for non-small cell lung cancer, colorectal cancer, breast cancer, kidney cancer, ovarian cancer, and pancreatic cancer. The diagnostic accuracy (AUC) of this application's analysis method for different diseases is as follows: COVID-19 reaches 0.99, influenza reaches 0.90, HIV reaches 0.98, systemic lupus erythematosus reaches 0.96, type 1 diabetes reaches 0.96, autoimmune hepatitis reaches 0.94, non-small cell lung cancer reaches 0.98, colorectal cancer reaches 0.82, early breast cancer reaches 0.99, early kidney cancer reaches 0.97, early ovarian cancer reaches 0.96, and early pancreatic cancer reaches 0.98.

[0098] During the model training process, the shared encoder is optimized against the domain discriminator through the gradient reversal layer. The optimization goal is to minimize the classification accuracy of the domain discriminator so that the generated H shared The features should contain as few identifiable task-specific biases as possible. sharedIf there is an obvious tumor-specific clonal expansion signal mixed in, the domain discriminator will tend to classify it as a "tumor domain"; while the shared encoder learns how to "neutralize" such strong signals through adversarial training, making it no longer distinguishable in the feature space.

[0099] Through this adversarial mechanism, the model forces the shared encoder to extract common immune representations across diseases (such as overall diversity, clonal expansion levels, etc.), while separating disease-specific sensitive features (such as the high expression of a certain virus-specific TCR sequence) from the shared space and handing them over to the corresponding dedicated decoder for independent learning. This not only improves H shared The generalization ability is task-independent and significantly reduces signal interference between multiple tasks, thereby supporting the synchronous and accurate analysis of individuals under the coexistence of multiple immune perturbations (such as early lung cancer combined with influenza infection).

[0100] In this multi-task learning framework, the domain discriminator module and the parallel specific decoder are not linearly executed one after another, but form a special association around the shared encoder with parallel collaboration during training and functional separation during inference. The output results of the two are completely different: in the training phase, the shared encoder generates the system state vector H shared After that, it will be input into two parallel branches at the same time - the domain discriminator module is responsible for judging H shared The perturbation pattern data domain of the biological system to which it belongs (output domain category classification result / probability) is fed back to the shared encoder through adversarial training to help H shared Stripping interference information; while the parallel specific decoder is based on H shared Perform actual task decoding (output confidence scores or prediction results such as disease risk and immune strength), and feed the task error back to the shared encoder to jointly optimize model performance. In the inference phase of actual analysis samples, the domain discriminator module is no longer involved (it is only a training optimization tool), and only the parallel specific decoder is based on the optimized H shared Output the final analysis results required by the user. One of the two outputs is an intermediate judgment result for training, and the other is the final task result serving the user (directly supporting the assessment of the status of the biological system). The essential function and output purpose are completely independent.

[0101] According to some possible implementations of the first aspect of the present disclosure, the method further includes: establishing a quantitative evaluation system for immune signal strength, and calculating an ImmunScore for each preset functional category based on the functional association vector after feature decoupling processing; the ImmunScore is calculated using the following formula: , Where D is the clonal diversity index, and the calculation formula is ,N is the total number of clonotypes detected in the sample; E is the clonal expansion index, and the calculation formula is: ; A is the immune activation intensity, and the calculation formula is: , is the enrichment weight of clonotype i, is the corrected frequency of clonotype i, s i is the sequence specificity score, is the disease-specific score given by the deep learning decoder; α1, α2, α3, and α4 are preset weight coefficients.

[0102] is the disease-specific score, which is the scalar evaluation score of the specific decoder trained for a specific functional category in this method for the current sample output. Its generation process is: the system state vector H output by the shared encoder shared It is input into the selected specific decoder, transformed by the fully connected network, and finally activated by a Sigmoid (the calculation process is the same as the calculation of Sigmoid in the specific decoder above) to output a scalar value between 0 and 1, which is .

[0103] Each disease category is assigned a corresponding ImmunScore, which is used for disease risk stratification, early diagnosis, and / or dynamic monitoring based on the ImmunScore and the output of each disease-specific decoder. For acute infectious diseases, an ImmunScore > 85 indicates a high positive score; for chronic infections and autoimmune diseases, an ImmunScore between 60-80 indicates active disease; and for tumors, an ImmunScore > 70 indicates high risk, enabling simultaneous and accurate detection of multiple important diseases.

[0104] A sample from a subject displaying symptoms of acute infection was tested. According to the method of the present invention, the decoder for the corresponding pathogen output a high-risk signal (>0.9), and the calculated ImmunScore was significantly elevated (>85), indicating the presence of acute infection. This result was consistent with the results of subsequent etiological testing. This example demonstrates the application of the present invention for rapid and accurate detection of disease in the very early stages of infection.

[0105] A subject diagnosed with an autoimmune disease was dynamically monitored. A baseline test during remission revealed a low ImmunScore (<45). Subsequent regular monitoring revealed a significant increase in ImmunScore to active levels (>78), and the corresponding disease decoder outputted a high-risk signal. This result was consistent with the elevated disease activity as assessed by a comprehensive clinical assessment. This example demonstrates the utility of the present invention in dynamically monitoring autoimmune disease activity.

[0106] Screening was performed on a patient who was asymptomatic but had high-risk factors for cancer. Testing using the method of the present invention revealed that the decoder for the specific tumor output a high-risk signal (>0.9), while the decoders for all other diseases were low-risk. The patient's ImmunScore was also in the high-risk range for cancer (>74). Based on this high-risk warning, the patient was recommended to undergo targeted imaging examinations, which ultimately revealed early-stage cancer lesions. This example demonstrates the significant potential of the present invention for screening for early-stage cancers in the asymptomatic phase.

[0107] A test was performed on a subject with complex clinical presentations. The test results from the method of the present invention showed that multiple disease decoders simultaneously output medium- and high-risk signals. For example, the decoder for autoimmune hepatitis and the decoder for early breast cancer both indicated high risk. This test result provided important guidance for clinical diagnosis, and subsequent clinical examinations also confirmed that the subject had two or more diseases simultaneously. This example demonstrates the unique value of the present invention in identifying and diagnosing complex comorbidities.

[0108] The method provided in this application is a biological system state modeling and information processing technology based on immune repertoire sequence data. Its direct purpose is not to diagnose diseases or judge individual health status, but to extract and process immune-related sequence information from biological samples separated from the human body to generate multidimensional intermediate parameters (such as ImmunScore, clonal expansion index, decoder confidence score, etc.) that reflect the dynamic response of the immune system. These parameters are intermediate results obtained by nonlinear signal enhancement, feature fusion and deep learning modeling implemented by computer devices. Based on existing medical knowledge, they cannot directly lead to the diagnosis of specific diseases and need to be comprehensively judged in combination with other clinical evidence. This method belongs to the information processing process of in vitro sample data. All steps are automatically executed by the computing system. It aims to improve the analytical sensitivity and systematicity of immune signals. It is suitable for the characterization and monitoring of various biological perturbation states and meets the recognition standards of non-diagnostic technical solutions.

[0109] A multi-dimensional immune strength scoring system was established to comprehensively quantify the decoupled disease-specific signals: the clonotype diversity index is used to assess the diversity and stability of the immune system. The clonotype expansion index is used to measure the expansion of the dominant clonotype, reflecting the strength of the immune response. The immune activation strength is used to comprehensively assess the level of immune system activation by combining clonotype weight, frequency, and sequence specificity. The specific disease score is used to output a specific disease signal score through a trained deep learning decoder. The weighted summation of these multiple indices yields the final comprehensive immune strength score (ImmunScore) for a single disease, which comprehensively reflects the immune response status associated with a specific disease.

[0110] Sequence specificity score S i , a key parameter in the immune strength assessment system of this invention, quantifies the degree of similarity between the CDR3 sequence of the tested clonotype and the specific recognition pattern of known disease-associated antigens. This score is not directly derived from raw sequencing data, but is calculated using a pre-trained deep learning-assisted model. This score aims to incorporate prior functional knowledge to enhance the model's ability to identify biologically meaningful immune response signals.

[0111] S i The calculations are based on a specially constructed database of disease-related CDR3 sequences. This database integrates multiple authoritative public resources, such as VDJdb and McPAS-TCR, and is supplemented with experimentally validated antigen-specific TCR / BCR sequence data. It covers a variety of disease categories, including viral infections (such as HIV and influenza), neoantigens in tumors, and autoimmune-related antigens, resulting in a collection of tens of thousands of high-quality, well-annotated positive samples. On this basis, nonspecific sequences extracted from a large-scale healthy population immune repertoire were used as negative samples to construct positive and negative sample pairs for training. Based on this dataset, the present invention constructed and trained a deep learning model based on a convolutional neural network (CNN) to automatically learn conserved motifs in CDR3 amino acid sequences that are associated with antigen binding. The model takes an arbitrary CDR3 amino acid sequence as input and, after processing it through multiple convolutional and pooling layers, automatically learns and identifies key motifs within the sequence that are associated with antigen binding. Sequences associated with specific disease categories (such as viral infections and specific cancers) in the database serve as positive samples, while sequences extracted from a large-scale healthy population immune repertoire serve as negative samples. Automatically extract local sequence pattern features and ultimately output a probability value between 0 and 1, indicating the degree of match between the sequence and the recognition pattern associated with a specific disease category. This output value is defined as the sequence-specific score s iThe higher the value, the more likely the clonotype is to participate in the immune response to a specific disease. In other words, the higher the similarity between the CDR3 sequence and the known disease-related sequence pattern, the greater the possibility of its functional relevance. In practical applications, for each clonotype i in the immune repertoire of the individual to be tested, its CDR3 amino acid sequence is input into the pre-trained scoring model to obtain the corresponding s. i This score is further integrated into the calculation formula of the comprehensive immune strength score (ImmunScore). As one of the important dimensions for measuring the intensity of immune activation, it enhances the biological interpretability and disease identification specificity of the evaluation system.

[0112] When the biological samples to be analyzed are derived from individuals who have received organ transplants, the calculated immune strength scores are corrected for environmental factors; The environmental factor correction is performed by introducing an immunosuppression correction factor to perform a weighted adjustment on the basic immune strength score. The calculation formula is:

[0113] Where γ is the correction coefficient, ImmunosuppressLevel represents the numerical indicator of the immunosuppression level, and the value of γ ranges from 0 to 1. It is optimized on transplant samples through regression analysis, for example, γ = 0.2 to correct the downward adjustment of the score due to immunosuppression.

[0114] ImmunScore is used to characterize the activity of the specific immune response of a biological system under the corresponding functional category. ImmunScores of multiple categories constitute a multidimensional immune status intensity vector, which can be used for comparative analysis between different biological states, sample clustering, longitudinal dynamic trend modeling, or as input features for downstream machine learning tasks.

[0115] In the process of modeling actual biological systems, the external physiological or interfering environment of an individual can significantly influence the immune repertoire structure, thereby interfering with the cross-sample consistency of immune status representation. To improve the adaptability of the model and the comparability of output indicators in complex clinical settings, this paper provides an environmental factor quantification mechanism for structured modeling and numerical expression of known interfering factors.

[0116] When the individual being analyzed is experiencing immunomodulatory intervention (e.g., long-term immunosuppressant use after an organ transplant), the system introduces a comprehensive numerical indicator, the Immunosuppress Level, to characterize the overall intensity of the individual's immunosuppressive environment. This indicator is not a single measurement, but rather a standardized score calculated by integrating multiple dimensions of clinical information, preferably ranging from 0 to 10, with higher values ​​indicating greater immunosuppression.

[0117] The ImmunosuppressLevel can be constructed in a variety of ways, including but not limited to a linear weighted model, a table lookup method, or a nonlinear mapping function based on machine learning. In a preferred embodiment, the following linear combination formula is used:

[0118] in, 、 and are preset weight coefficients, each ranging from 0 to 1 and satisfying + + =1, and its value can be determined in the training cohort through regression analysis, expert experience, or cross-validation. The definitions of each sub-score are as follows: The medication factor score, or Scoredrug, is assessed based on the type, dose, and blood concentration of immunosuppressants currently used by the patient. Different drug combinations are assigned scores based on the strength of their pharmacological effects.

[0119] Strong regimen (such as high-concentration tacrolimus + mycophenolic acid + glucocorticoids): 8–10 points; Standard triple therapy (e.g., standard concentration of tacrolimus + mycophenolic acid): 6–8 points; Reduced-dose regimens (e.g., low-dose cyclosporine or sirolimus, monotherapy or dual therapy): 3–5 points; Minimal maintenance regimen (eg, single-dose low-dose): 1–2 points.

[0120] Biological indicator score, namely Score bio , based on the absolute counts of lymphocyte subsets in peripheral blood, particularly CD3 + 、CD4 + 、CD8 + T cell or total absolute lymphocyte count (ALC). This score is inversely proportional to the abundance of immune cells and reflects the biological basis of the body's immune activity. In one exemplary implementation, the following normalization formula is used:

[0121] Among them ALC patient Measure the absolute lymphocyte count for the patient. The lower limit of normal value for healthy people (in this implementation, 1.0×10 9 When a patient's count is below the normal range, the score increases, reflecting an increasing degree of suppression of the immune system.

[0122] The clinical status score, Scoreclinic, is a qualitative and quantitative score based on the patient's clinical background information, such as the post-transplant stage, whether the patient has experienced an acute rejection event, and whether the patient has received intensive treatment recently. Example scores include: Within 1 year after transplantation: 7–10 points; Recent rejection and receiving anti-rejection treatment: 8–10 points; Transplantation for many years and stable immunity: 2–5 points.

[0123] The ImmunosuppressLevel metric can be automatically calculated from input data extracted from electronic health records (EHRs), laboratory information systems, or clinical databases. Its output serves as an environmental covariate, subsequently used to adaptively adjust the ImmunosuppressLevel score (ImmunScore) to compensate for systemic perturbations of the immune repertoire structure caused by external interventions. This improves the comparability of immune activity indicators across individuals under different physiological states and the stability of the model output.

[0124] A patient undergoing long-term immunosuppressive therapy for an organ transplant underwent routine monitoring. During several years of continuous monitoring, all tumor risk indicators were initially low. During one monitoring session, a persistent and significant increase in the risk score for a renal cancer decoder (RCC) was observed (e.g., from 0.15 to 0.68). This early warning signal triggered intensive monitoring and imaging studies, resulting in the detection of transplant-related malignancies at a very early stage. This example demonstrates the important application of the present invention for early tumor monitoring in immunosuppressed populations. The deep learning model training process includes: constructing an immune repertoire dataset containing clinically diagnosed individuals and healthy controls, with samples in the dataset having label information related to the state of the biological system; partitioning the dataset into non-overlapping training, validation, and test subsets; learning the model parameters using the training subset; monitoring model performance during training using the validation subset, and adjusting hyperparameters based on the monitoring results to prevent overfitting; and, after model training and hyperparameter tuning, independently evaluating the model's generalization ability using the test subset.

[0125] To validate the effectiveness and generalizability of the sequence data analysis method described in this paper, a large-scale, high-quality immune repertoire dataset was constructed during the model development phase. This dataset, provided by multiple collaborating medical institutions, covers individuals with clinically confirmed disease states, including various cancers, autoimmune diseases, and infectious diseases, as well as healthy controls. All samples were obtained from peripheral blood and subjected to high-throughput sequencing to obtain immune repertoire data for B cell receptors (BCRs) and / or T cell receptors (TCRs).

[0126] Each sample is assigned a clear clinical label related to the biological system's state, supporting the training and evaluation of supervised multi-task deep learning models. To ensure objectivity and reliability in model performance evaluation, the dataset is strictly divided into three non-overlapping subsets. Training set (accounting for 70% of the total sample size): used to learn the trainable parameters of the model, such as network weights and biases, and to allow the model to learn how to map input data (immune repertoire sequencing data) to the correct output label (biological system state) through a large number of samples. This process is achieved by optimizing the loss function. Validation set (accounting for 15%): used to monitor performance in real time during model training, guide the adjustment of hyperparameters (such as the number of network layers, adversarial loss weight λ, etc.), and prevent model overfitting through strategies such as early stopping. The performance of the validation set can also be used to determine when to stop training. Test set (accounting for 15%): used for an independent and unbiased final evaluation of the model's generalization ability after model training and hyperparameter tuning are completed.

[0127] All model performance indicators (such as AUC, accuracy, sensitivity, and specificity) are calculated based on this independent test set to ensure the credibility and reproducibility of the evaluation results.

[0128] The analysis method also includes dynamic monitoring, which involves longitudinally comparing the ImmunScore of the subjects at different time points and analyzing their changing trends, that is, calculating the time change rate of the immune strength score (ΔScore / Δt). When this change rate exceeds the preset clinical warning threshold, it can provide an early warning of disease progression, treatment response or recurrence.

[0129] This application also includes multi-disease risk assessment and report generation, including risk stratification: Based on the calculated ImmunScore, the patient's disease risk is classified into low, medium, and high levels. A personalized multi-disease risk assessment report is generated, including the risk level, confidence level, and recommended follow-up plan for each disease. Special population assessment: For special populations with suppressed immune function, such as kidney transplant recipients, an immunosuppression level correction factor is introduced to adjust the baseline risk score to better reflect the physiological characteristics of this population.

[0130] The sequence data analysis method and device provided by the present invention have significant advantages such as ultra-high sensitivity, simultaneous detection of multiple diseases, quantitative evaluation, non-invasiveness and convenience, and applicability to special populations. Through ultra-sensitive signal amplification technology, it can achieve the detection of very early tumors (tumor cell count <10 4The technology can detect lesions 2-5 years earlier than traditional imaging; it supports simultaneous screening of multiple cancers and assessment of autoimmune diseases and infection risks with a single test, improving screening efficiency; it achieves the first precise quantification of immune response intensity, which can be used for efficacy monitoring, recurrence warning, and prognosis assessment; it requires only 5-10 mL of peripheral blood and can produce results within 2-3 days, making it suitable for non-invasive screening of large populations; and it has also optimized algorithms for immunosuppressed populations such as kidney transplant recipients, filling a gap in related technologies and possessing broad application prospects and clinical value.

[0131] In addition, an embodiment of the present disclosure further provides a computer-readable storage medium on which a computer program is stored. The program includes instructions, and when the instructions are executed by one or more processors of a computing device, the steps of the aforementioned analysis method are executed.

[0132] The programs (also referred to as software, software applications, or code) described above include machine instructions for a programmable processor and may be implemented using an object-oriented programming language, assembly, or machine language.

[0133] Over time and with the advancement of technology, the meaning of "medium" has become increasingly broad. The dissemination of computer programs is no longer limited to tangible media and can also be directly downloaded from the Internet. Any combination of one or more computer-readable storage media can be used. Computer-readable storage media can be, but are not limited to, electrical, magnetic, optical, electromagnetic, infrared, or semiconductor systems, devices, or components, or any combination thereof. More specific examples (a non-exhaustive list) of computer-readable storage media include: portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination of the foregoing. In this document, a computer-readable storage medium can be any tangible medium containing or storing a program that can be used by or in conjunction with an instruction execution system, device, or component.

[0134] The technical solutions provided by the present disclosure are described in detail above. Specific examples are used herein to illustrate the principles and implementation methods of the present disclosure. The descriptions of the above embodiments are intended only to help understand the methods and core concepts of the present disclosure. Furthermore, those skilled in the art will appreciate that variations in the specific implementation methods and scope of application may occur based on the concepts of the present disclosure. In summary, the contents of this specification should not be construed as limiting the present disclosure.

[0135] The above description is only a preferred embodiment of the present disclosure and is not intended to limit the present disclosure. Any modifications, equivalent substitutions, etc. made within the spirit and principles of the present disclosure should be included in the scope of protection of the present disclosure.

Claims

1. A sequence data analysis method for biological system state modeling, characterized in that: The steps include: Step 1: Obtain high-throughput sequencing data of the immune repertoire of B cell receptors or T cell receptors in a biological sample, wherein the sequencing data includes sequencing reads, total sequencing reads of all clonotypes in the sample, CDR3 amino acid sequences of each clonotype, V gene segment annotation results, and J gene segment annotation results; Step 2: performing immune signal amplification processing on the immune library sequencing data, wherein the immune signal amplification processing includes nonlinear gain correction and combination preference feature extraction, fusing the corrected parameters and combination preference features to construct a structured feature node; Step 3: Use the deep learning model to encode all feature nodes and generate the system state vector H representing the overall state of the biological system through weighted average pooling operation. shared ; Step 4: Introduce a feature decoupling mechanism into the deep learning model. Through adversarial training, the distinguishability between the system state vector and the preset functional category is suppressed, thereby reducing the interference between different signals. Step 5: Based on the system state vector H shared Calculate the ImmunScore of each functional category to quantify the activity of the immune response; The deep learning model adopts a multi-task learning framework, which includes: A shared encoder that contextually encodes multiple clonotype features and generates a shared feature vector that represents the overall state of the biological system; Multiple parallel specific decoders are used to perform task-related decoding in multi-task learning on the shared feature vector and output the confidence score or prediction result of the corresponding task; The shared encoder consists of 6 stacked Transformer blocks; Each Transformer block consists of a multi-head self-attention sublayer and a feedforward network sublayer connected in sequence, and each sublayer is followed by a residual connection and layer normalization structure. The multi-head self-attention sublayer contains 8 parallel attention heads, which are used to establish global dependencies between different positions in the CDR3 sequence and parallelly model the relationship between local amino acid patterns, long-range structural dependencies, functional motif recognition, and amino acid physicochemical properties through a multi-head mechanism; The feedforward network sublayer is set after the multi-head self-attention sublayer, and includes a dimensionality-increasing linear transformation layer, a nonlinear activation layer, and a dimensionality-reducing linear transformation layer, which is used to perform nonlinear transformation and feature dimension-increasing operations on the intermediate representation vector of each position; In each sub-layer, the output of the corresponding sub-layer is added to its input vector to achieve residual connection, and then layer normalization is performed: the output of the multi-head self-attention sub-layer is used as the input of the feed-forward network sub-layer after residual connection and layer normalization; the output of the feed-forward network sub-layer is used as the final output of the Transformer block after residual connection and layer normalization; The Transformer blocks are cyclically stacked 6 times to form the shared encoder to maintain training stability and alleviate gradient vanishing; The multi-task learning framework further includes a domain discriminator module, which is applied to the adversarial training. The domain discriminator module uses the system state vector H output by the shared encoder. shared As input, the domain discriminator module is tasked with evaluating the system state vector H shared The data domain category to which it belongs is classified and identified, and the data domain category corresponds to a plurality of preset functional association categories, and each functional association category represents a specific type of biological system disturbance pattern.

2. The method for analyzing sequence data for biological system state modeling according to claim 1, characterized in that: The nonlinear gain correction is to enhance the original frequency of clonotypes, suppress the high-abundance background, and increase the representation weight of low-abundance clonotypes. The calculation formula is: , in, is the corrected frequency of clonotype i, is the raw frequency of clonotype i, which is the number of sequencing reads of clonotype i. Total sequencing reads for all clonotypes in the sample The relative abundance was calculated by the ratio of is the gain coefficient, ranging from 0.1 to 0.5; the gain coefficient It is configured to be adjustable within the range of 0.1 to 0.5 to balance the signal amplification strength and the risk of noise introduction; The combination preference feature extraction is based on the annotation results of V genes and J genes, and the combination frequency of each VJ gene pair is counted. The formula for calculating the preference score is: ,in, is the observed frequency of the VJ gene pair, is the expected frequency of VJ gene pairs; Based on the corrected frequency of clonotype i, rare clonotypes with frequencies below a preset threshold are weightedly enriched. is the enrichment weight of clonotype i; Enrichment weight The calculation formula is: ; is the corrected frequency of clonotype i; is the attenuation parameter, ranging from 100 to 500; threshold is the preset frequency threshold, ranging from 0.001% to 0.01%; It is an indicator function, which takes the value 1 when the condition is met and 0 otherwise.

3. The method for analyzing sequence data for biological system state modeling according to claim 2, characterized in that: The process of fusing the corrected parameters and combined preference features to construct structured feature nodes is as follows: For each clonotype i in the immune repertoire, a fusion feature vector is constructed , fused feature vector The CDR3 amino acid sequence of clonotype i itself; the frequency after nonlinear gain correction ; Weights obtained by weighted enrichment of rare clonotypes ; Preference score of the VJ gene pair used by this clonotype ; All clonotypes are merged into a feature vector It is represented as an N×512 input matrix X, where N is the total number of clonotypes detected in the sample, and each row xi represents the fusion feature vector of the i-th clonotype ; The fusion process includes: Step S1: The key information of each independent clonotype is organized into a structured data record unit to achieve alignment and packaging of sequence information and multiple enhancement signals. The structured data record includes CDR3 Sequence 、 、 and ; Step S2: Through sequence embedding and feature concatenation, various features in structured records are converted into a unified vector representation and multimodal fusion is performed; The sequence is embedded as a vector of fixed dimension converted through an embedding matrix , ; Embedding (.) indicates embedding operation; Concatenate the sequence embedding vector and the enhanced signal to form the initial fusion vector , Concat(.) represents vector concatenation operation; Step S3, Mapping the concatenated initial fusion vector to a unified dimension is to adapt to the fixed input dimension requirements of the deep learning model, and dimension mapping is performed through a learnable linear transformation layer: Linear (.) represents the operation of weighted summation and dimension transformation.

4. The method for analyzing sequence data for biological system state modeling according to claim 1, characterized in that: The processing of each layer of Transformer block includes the following steps: (a) Generate query matrix Q, key matrix K and value matrix V through linear transformation; (b) Split the query matrix Q, key matrix K, and value matrix V into 8 attention heads, calculate the attention weight for each head, and output the weighted value vector; (c) Concatenate the weighted value vectors output by each attention head and map them to 512 dimensions through a learnable linear transformation to obtain the multi-head attention output; (d) Add the multi-head attention output to the input and perform layer normalization to obtain the intermediate result; (e) The intermediate result is input into a feedforward neural network, which includes a linear layer that scales the dimension to 2048, a ReLU activation function, and a linear layer that scales the dimension back to 512. (f) The output of the feedforward network is added to the intermediate result and then layer normalized again to obtain the corresponding layer output. After 6 layers of stacking, all the clonal type vectors outputted are weighted averaged according to their corrected frequencies to obtain the system state vector H representing the state of the entire biological system. shared .

5. The method for analyzing sequence data for biological system state modeling according to claim 4, characterized in that: The specific decoders are multiple decoders with the same structure, each of which is used to decode the system state vector H output by the shared encoder. shared Conduct mission-related risk assessments; The decoder includes at least two fully connected hidden layers for inputting the system state vector H shared Perform multi-layer nonlinear transformations to extract specific features related to the current task step by step, and focus on key signals by reducing feature dimensions; A single-neuron output layer, used to map the low-dimensional features output by the final hidden layer to an unconstrained raw output value; The decoder further comprises an activation processing unit configured to apply a nonlinear activation function in each level of hidden layer and a Sigmoid activation function after the output layer to convert the original output value into a scalar evaluation score between 0 and 1; All specific decoders share the same network structure, but each has independent trainable parameters and is independently optimized during training based on the labeled data of its respective task to achieve well-rounded assessment of multi-class immune risks.

6. The method for analyzing sequence data for biological system state modeling according to claim 4, characterized in that: Introducing a feature decoupling mechanism based on adversarial training into the deep learning model, by suppressing the system state vector H shared The distinguishability between the pre-set functional categories can reduce the interference of immune signals between multiple tasks and improve the versatility and robustness of shared representations.

7. The method for analyzing sequence data for biological system state modeling according to claim 1, characterized in that: Also includes: A quantitative evaluation system for immune signal strength was established. Based on the functional association vector after feature decoupling, the ImmunScore for each preset functional category was calculated. The ImmunScore was calculated as follows: , Where D is the clonal diversity index, and the calculation formula is ,N is the total number of clonotypes detected in the sample; E is the clonal expansion index, and the calculation formula is: A is the immune activation intensity, and the calculation formula is: , is the enrichment weight of clonotype i, is the corrected frequency of clonotype i, s i is the sequence specificity score, is the disease-specific score given by the deep learning decoder; α1, α2, α3, and α4 are preset weight coefficients.

8. The method for analyzing sequence data for biological system state modeling according to claim 1, characterized in that: The training process of the deep learning model includes: constructing an immune repertoire dataset containing clinically diagnosed individuals and healthy control individuals, wherein the samples in the dataset have label information related to the state of the biological system; dividing the dataset into non-overlapping training subsets, validation subsets and test subsets; using the training subset to learn the parameters of the model; using the validation subset to monitor the model performance during the training process, and adjusting the hyperparameters based on the monitoring results to prevent overfitting; after the model training and hyperparameter tuning are completed, using the test subset to independently test the generalization ability of the model.

9. A sequence data analysis device for biological system state modeling, characterized in that: include: a data acquisition module configured to acquire high-throughput sequencing data of the immune repertoire of B cell receptors or T cell receptors in a biological sample, wherein the sequencing data includes sequencing reads, total sequencing reads, CDR3 amino acid sequences, and V gene and J gene segment annotation results; a signal enhancement processing module configured to perform immune signal amplification processing on the sequencing data, including nonlinear gain correction, combined preference feature extraction, and weighted enrichment of rare clonal types, and fuse the correction parameters with the preference features to construct a structured feature node; The shared encoding module is configured to use the deep learning model to contextually encode all feature nodes and generate a system state vector H representing the overall state of the biological system through weighted average pooling. shared ; a feature decoupling module configured to introduce an adversarial training mechanism to suppress the distinguishability between the system state vector and the preset function category to reduce the interference of immune signals between multiple tasks; a multi-task decoding module configured to perform risk assessments related to multiple tasks in parallel based on the system state vector and output a confidence score for each functional category; The immune strength assessment module is configured to calculate the immune strength score ImmunScore for each preset functional category based on the decoding results and clonal type distribution characteristics, which is used to quantify the activity of the immune response.

10. A computer-readable storage medium storing a program, the program comprising instructions, which, when executed by one or more processors of a computing device, cause the computing device to perform the method according to any one of claims 1 to 8.

Citation Information

Patent Citations

  • Method for analyzing single-cell immune repertoire sequencing data

    CN109979528A

  • Data processing method and device, storage medium and electronic device

    CN118571324A

  • Transform-based unified information extraction method

    CN120407707A

  • Systems and methods for assessment of immune response and applications thereof

    WO2025175065A1

Cited By

  • New variation-oriented pathogenicity prediction method

    CN121483394A

  • Method for pathogenicity prediction of novel variants

    CN121483394B