A sequence data analysis method, device and storage medium for biological system state modeling

By employing nonlinear gain correction and combined preference feature extraction in deep learning models, combined with Transformer architecture and adversarial training, the problems of feature coupling and task interference in immune repertoire data analysis in existing technologies are solved. This enables highly sensitive modeling and quantitative analysis of the state of biological systems, thereby enhancing the application value of immune repertoire data.

CN120823883BActive Publication Date: 2026-01-27BEIJING SUBENYUANHE BIOTECHNOLOGY CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

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

AI Technical Summary

Technical Problem

Existing methods for analyzing immune repertoire data struggle to effectively extract, amplify, and decouple complex immune signals, leading to difficulties in identifying key response signals and feature confusion. They also lack systematic modeling and quantification capabilities. Deep learning models face issues of feature coupling and task interference when processing high-dimensional sparse sequence data.

Method used

A deep learning model is used for immune signal amplification. Structured feature nodes are constructed through nonlinear gain correction and combined preference feature extraction. The shared encoder and specific decoder of the Transformer architecture are used in combination with the adversarial training mechanism to generate system state vectors, thereby achieving feature decoupling and multi-task evaluation.

Benefits of technology

It enhances the characterization weight of low-abundance clonal types, strengthens the ability to capture weak immune response signals, and achieves highly sensitive and systematic modeling and quantitative analysis of multidimensional states of biological systems, supporting parallel identification and independent evaluation of multiple signals.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120823883B_ABST
    Figure CN120823883B_ABST
Patent Text Reader

Abstract

The present application relates to the technical field of immune repertoire sequencing, and in particular to a sequence data analysis method and device for biological system state modeling and a storage medium. The present application obtains high-throughput sequencing data of B / T cell receptors, performs nonlinear gain correction and V-J gene combination preference feature extraction, constructs a structured feature node, encodes the features using a Transformer model, generates a system state vector by combining weighted average pooling, introduces adversarial training to realize feature decoupling, suppresses signal interference between functional categories, calculates a multi-dimensional immune intensity score based on the system state vector, and quantifies the activity level of immune responses of different functional categories. The method realizes high-sensitivity, multi-dimensional parallel modeling and dynamic evaluation of the immune system state, is suitable for large-scale population immune monitoring and systems biology research, and significantly improves the analysis capability and application value of immune repertoire data.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of immune repertoire sequencing technology, and more specifically to a sequence data analysis method, apparatus, and storage medium for biological system state modeling. Background Technology

[0002] The adaptive immune system plays a central role in maintaining homeostasis and responding to external disturbances. B cell receptors and T cell receptors, as key molecules of adaptive immunity, constitute a unique immune repertoire with their diverse sequence sets, recording the dynamic response of the immune system 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. Deep sequencing of the complementarity-determining regions (BCRs) or total clonal ...

[0004] Immune response signals are characterized by high heterogeneity and a wide dynamic range. In complex biological systems, different types of physiological or pathological disturbances (such as infection exposure, tissue damage, chronic stimulation, etc.) can trigger specific immune clonal amplification. However, these signals are often masked by high-abundance background clones, and the biological significance of low-frequency clones is easily ignored, making it difficult to effectively amplify and identify key response signals.

[0005] Immune repertoire data exhibits structural complexity and multi-source confounding. An individual may simultaneously experience multiple immune perturbations, resulting in an immune repertoire displaying a superposition of multiple response patterns. Traditional single-task or single-dimensional analysis methods struggle to decouple signals from different perturbation sources, easily leading to feature confusion and decreased interpretability.

[0006] Existing analytical methods generally lack the ability to systematically model and quantify immune signals. 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 combinatorial preferences, making it difficult to generate a unified and comparable system state characterization.

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

[0008] 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 highly sensitive and specific modeling and quantitative evaluation of the multidimensional states of biological systems, and improve the analytical capabilities and application value of immune repertoire data in systems biology research. Summary of the Invention

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

[0010] According to a first aspect of this disclosure, a sequence data analysis method for state modeling of biological systems is provided, comprising the following steps:

[0011] Step 1: Obtain high-throughput sequencing data of the immune repertoire of B cell receptor or T cell receptor in biological samples. The sequencing data includes sequencing reads, total sequencing reads of all clones in the sample, CDR3 amino acid sequence of each clone, annotation results of V gene fragment and annotation results of J gene fragment.

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

[0013] Step 3: Encode all feature nodes using a deep learning model, and generate a system state vector H representing the overall state of the biological system through a weighted average pooling operation. shared ;

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

[0015] Step 5: Based on the system state vector H shared Calculate the ImmunScore for each functional category to quantify the activity of the immune response;

[0016] The deep learning model employs a multi-task learning framework, which includes:

[0017] A shared encoder contextually encodes multiple clonal features and generates a shared feature vector characterizing the overall state of the biological system.

[0018] 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.

[0019] The shared encoder consists of 6 stacked Transformer blocks;

[0020] Each Transformer block includes a multi-head self-attention sub-layer and a feedforward network sub-layer connected in sequence, and each sub-layer is followed by a residual connection and a layer normalization structure;

[0021] The multi-head self-attention sublayer contains eight parallel attention heads, which are used to establish global dependencies between different positions of the CDR3 sequence and to model the correlation between local amino acid patterns, long-range structural dependencies, functional motif recognition, and amino acid physicochemical properties in parallel through a multi-head mechanism.

[0022] The feedforward network sublayer is set after the multi-head self-attention sublayer and includes a dimension-up linear transformation layer, a non-linear activation layer, and a dimension-down linear transformation layer, which are used to perform non-linear transformation and feature dimension up / down operations on the intermediate representation vector at each position.

[0023] In each sub-layer, the output of the corresponding sub-layer is added to its input vector to achieve a residual connection, and then processed by layer normalization: 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.

[0024] The Transformer blocks are stacked 6 times in a loop to form the shared encoder, in order to maintain training stability and mitigate gradient vanishing.

[0025] The multi-task learning framework further includes a domain discriminator module, which is applied in the adversarial training. The domain discriminator module shares the system state vector H output by the encoder. shared As input, the domain discriminator module's task is to analyze the system state vector H. shared The data domain category is classified and identified. The data domain category corresponds to multiple preset functional association categories, and each functional association category represents a specific type of biological system perturbation pattern.

[0026] According to some possible implementations of the first aspect of this disclosure, the nonlinear gain correction is to enhance the original frequency of the clone, suppress the high-abundance background, and increase the representation weight of the low-abundance clone, and the calculation formula is as follows:

[0027] ,

[0028] in, The corrected frequency of clone i. The original frequency of clone i, which is based on the sequencing reads of clone i. Total sequencing reads of all clones in the sample The relative abundance is calculated by the ratio;

[0029] This is the gain coefficient, with a value ranging from 0.1 to 0.5; gain coefficient It is configured to be adjustable in the range of 0.1 to 0.5 to balance the signal amplification strength with the risk of noise introduction;

[0030] The gain coefficient, as an adjustable hyperparameter, is optimally determined by performing a grid search on independent validation datasets before model training. A series of tests are conducted. Values, ranging from 0.1 to 0.5, with a step size of 0.1, are selected to achieve the optimal performance metric for the model on the validation set, such as the area under the curve (AUC) or the F1 score. value.

[0031] The combination preference feature extraction is based on the annotation results of genes V and J, and the combination frequency of each VJ gene pair is counted. The formula for calculating the preference score is as follows: ,in, The observed frequency of VJ gene pairs. The desired frequency of the VJ gene pair;

[0032] All clones in the sample are iterated through. For each clone, the VJ gene pair to which it belongs is determined based on the annotation results of its V and J genes. Then, the total number of occurrences of each specific VJ gene pair, such as "TRBV5-1" and "TRBJ2-7", in the sample is counted, and divided by the total number of clones in the sample to obtain the observed frequency O of that VJ gene pair. vj .

[0033] Desired frequency E vj The calculations are based on the assumption that V and J genes rearrange independently. The marginal frequencies (F0) of each V and J gene in the sample are calculated separately. v = Total number of times the V gene was used / Total number of clones and F j = Total number of times the J gene is used / Total number of clones. Therefore, the expected frequency E of the VJ gene pair is... vj = F v ×F j .

[0034] Based on the corrected frequency of clone i, rare clones with frequencies below a preset threshold are weighted and enriched to generate weighted frequencies, which are used to characterize the abundance dynamics of clones.

[0035] The weighted frequency is used to enrich the clonal weights. With the corrected frequency Multiplying them together, we get:

[0036] ,

[0037] Weighted frequency for clone i; The enrichment weights for clone i;

[0038] Will and The fusion of these features as independent features aims to enable deep learning models to learn clonal abundance information and the specific contributions of their rare states separately, thereby providing richer input information. This decoupling of abundance information and rare states allows the model to more flexibly capture the contributions of rare clonal types in different biological scenarios.

[0039] Enrichment weights The calculation formula is:

[0040] ;

[0041] The corrected frequency of clone i; The attenuation parameter ranges from 100 to 500; the threshold is a preset frequency threshold, ranging from 0.001% to 0.01%. This is an indicator function that takes the value 1 when the condition is true and 0 otherwise.

[0042] The attenuation parameter The weight gradient used to adjust the weights within rare clones is determined through hyperparameter optimization on independent validation datasets. A grid search method is used to iteratively test a series of candidate values ​​for β, from 100 to 500, with a step size of 50, to select the β value that optimizes the performance metrics (AUC or F1 score) of the downstream deep learning model on the validation set. The proposed range of 100 to 500 is an empirical interval ensuring that the enriched weight function has a reasonable decay slope in this technical scenario: if β is below 100, the weight discrimination is insufficient; if β is above 500, it leads to excessive attenuation of the useful signal.

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

[0044] According to some possible implementations of the first aspect of this disclosure, the process of fusing corrected parameters and combined preference features to construct structured feature nodes is as follows:

[0045] For each clone i in the immune repertoire, construct a fusion feature vector. fusion of feature vectors Contains the CDR3 amino acid sequence of clone i itself; frequency after nonlinear gain correction. ;

[0046] The weights obtained by weighted enrichment of rare clones The preference score of the VJ gene pair used in this clone. ;

[0047] All cloned fusion feature vectors Let X be an N×512 input matrix, where N is the total number of clones detected in the samples, and each row xi represents the fused feature vector of the i-th clone. ;

[0048] The fusion process includes:

[0049] Step S1

[0050] The key information for each independent clone is organized into a structured data record unit to achieve alignment and encapsulation of sequence information and various enhancement signals. The structured data record includes CDR3. Sequence , , and ;

[0051] Step S2

[0052] By using sequence embedding and feature concatenation, various features in structured records are transformed into a unified vector representation, and multimodal fusion is performed.

[0053] The sequence embedding is transformed into a fixed-dimensional vector using an embedding matrix. ,

[0054] Embedding() indicates the embedding operation;

[0055] The sequence embedding vector and the enhanced signal are concatenated to form the initial fusion vector. ,

[0056]

[0057] Concat(.) represents a vector concatenation operation;

[0058] Step S3

[0059] The concatenated initial fusion vector is mapped to a unified dimension that meets the fixed input dimension requirements of the deep learning model. This dimension mapping is performed through a learnable linear transformation layer.

[0060]

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

[0062] The sequence embedding (.) method maps each amino acid in the CDR3 amino acid sequence to a fixed-dimensional vector through a learnable embedding matrix lookup operation. The resulting sequence vector E is obtained by processing the vectors of all amino acids in the sequence. seq(i) Embedding(.) converts amino acid symbols into vectors, enabling the digital representation of biological sequences.

[0063] The `Concat(.)` function performs a vector concatenation operation, embedding a sequence into a vector `E`. seq(i) Other numerical features Connecting them directly in dimension forms a longer vector. .

[0064] Linear(.) is a fully connected linear transformation layer that maps input vectors of different dimensions to output vectors of a uniform dimension. This layer contains a set of parameters learned during model training: a weight matrix W. linear and a bias vector b linear Weight matrix W linear The dimension of the vector is determined by the input and output: its number of rows is related to the input vector V. fused(i) The dimensions match, and the number of columns is fixed at the target output dimension of 512. Bias vector b linear The dimension of the transformation is consistent with the target output dimension, which is 512 dimensions. The transformation process follows the standard formula: V ector (i) = V fused (i)×W linear +b linear, This operation ensures that any input V fused(i) Ultimately, they are all uniformly mapped to a 512-dimensional output vector V. ector (i), thus providing a dimensionally consistent standardized input for subsequent model processing.

[0065] According to some possible implementations of the first aspect of this disclosure

[0066] The processing procedure for each Transformer block includes the following steps:

[0067] (a) Generate the query matrix Q, the key matrix K, and the value matrix V through linear transformation;

[0068] (b) Divide 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 vector; (c) Concatenate the weighted vectors output by each attention head according to the feature dimension, and map them to 512 dimensions through a learnable linear transformation to obtain the multi-head attention output;

[0069] (d) Add the multi-head attention output to the input and then perform layer normalization to obtain the intermediate result;

[0070] (e) Input the intermediate results into the feedforward neural network, which includes a linear layer that increases the dimension to 2048, a ReLU activation function, and a linear layer that reduces the dimension back to 512; (f) Add the output of the feedforward network to the intermediate results and then perform layer normalization again to obtain the output of the corresponding layer.

[0071] After six layers of stacking processing, the final output clone vectors are weighted and averaged according to their corrected frequencies to obtain the system state vector H representing the state of the entire biological system. shared .

[0072] According to some possible implementations of the first aspect of this disclosure, the specific decoder is a plurality of decoders with identical structures, each specific decoder being used to process the system state vector H output by the shared encoder. shared Conduct a mission-related risk assessment;

[0073] The decoder includes at least two fully connected hidden layers for processing the input system state vector H. shared Multi-level nonlinear transformations are performed to extract specific features related to the current task step by step, and key signals are focused by reducing the feature dimension.

[0074] A single-neuron output layer is used to map the low-dimensional features of the final hidden layer output to an unconstrained raw output value;

[0075] The decoder further includes an activation processing unit configured to apply a non-linear activation function in each hidden layer and a Sigmoid activation function after the output layer, converting the original output value into a scalar evaluation score between 0 and 1.

[0076] All specific decoders share the same network structure, but each has independent trainable parameters and is independently optimized during training based on the label data of their respective tasks to achieve comprehensive assessment of multi-class immune risks.

[0077] Based on some possible implementations of the first aspect of this 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 ability to distinguish between preset functional categories reduces interference of immune signals between multiple tasks, and improves the universality and robustness of shared characterization.

[0078] According to some possible implementations of the first aspect of this disclosure, it further includes: establishing a quantitative assessment system for immune signal intensity, and calculating an immune intensity score ImmunScore for each preset functional category based on a functional correlation vector after feature decoupling processing; the formula for calculating the immune intensity score ImmunScore is:

[0079] ,

[0080] Where D is the clonal diversity index, calculated using the following formula:

[0081] N is the total number of clones detected in the sample;

[0082] E is the clonal expansion index, calculated using the following formula:

[0083] ;

[0084] A represents the intensity of immune activation, calculated using the following formula:

[0085] , For the enrichment weights of clone i, For clone i, the corrected frequency is s. i The sequence specificity score for clone i is given. Disease-specific scores are provided by a deep learning decoder;

[0086] α1, α2, α3, and α4 are preset weighting coefficients.

[0087] Sequence specificity score s i The calculation method is as follows: For a sample containing N clones, it is first processed by a Transformer-based encoder, and its last layer self-attention weight matrix (with dimensions N×N) is extracted. Then, by summing the rows of this matrix and outputting a scalar value between 0 and 1 by a Sigmoid activation function, s is obtained. i Its range is [0, 1]. s i This reflects the relative importance of each clone in the global context.

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

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

[0090] According to some possible implementations of the first aspect of this 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 training and adjusting hyperparameters based on the monitoring results to prevent overfitting; and using the test subset to independently assess the generalization ability of the model after model training and hyperparameter tuning are completed.

[0091] According to a second aspect of this disclosure, a sequence data analysis apparatus for state modeling of biological systems is provided, comprising:

[0092] The data acquisition module is configured to acquire high-throughput sequencing data of the immune repertoire of B cell receptors or T cell receptors in biological samples. The sequencing data includes sequencing reads, total sequencing reads, CDR3 amino acid sequences, and annotation results of V and J gene fragments.

[0093] The signal enhancement processing module is configured to perform immune signal amplification processing on the sequencing data, including nonlinear gain correction, combined preference feature extraction and rare clonal weighted enrichment, and to fuse the correction parameters with the preference features to construct structured feature nodes;

[0094] The shared encoding module is 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 ;

[0095] The feature decoupling module is configured to introduce an adversarial training mechanism to suppress the distinguishability between the system state vector and the preset functional category, so as to reduce the interference of immune signals between multiple tasks.

[0096] The multi-task decoding module is configured to perform risk assessments related to multiple tasks in parallel based on the system state vector, and output confidence scores for each functional category.

[0097] 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 distribution characteristics, which is used to quantify the level of immune response activity.

[0098] According to a third aspect of this disclosure, an immune status analysis system is provided, comprising:

[0099] Such as the sequence data analysis device described above;

[0100] The storage device is used to store immune repertoire sequencing data and model parameters.

[0101] A processor for running the various modules of the device;

[0102] The user interface is used to output the ImmunScore (immunity strength score), risk assessment results, and visual reports.

[0103] According to a third aspect of this disclosure, a computer-readable storage medium storing a program is provided, the program including instructions that, when executed by one or more processors of a computing device, cause the computing device to perform the method described above.

[0104] Beneficial effects:

[0105] This application provides a sequence data analysis method, apparatus, and storage medium for modeling the state of biological systems. Its core lies in extracting, amplifying, and decoupling complex immune signals from high-throughput sequencing data of immune repertoires, achieving highly sensitive and systematic modeling and quantitative analysis of the multidimensional states of biological systems. This method effectively enhances the representational weight of low-abundance clonal types by constructing a multi-level immune signal enhancement mechanism, including nonlinear gain correction, VJ gene combinatorial preference analysis, and rare clonal type weighted enrichment. This strengthens the ability to capture weak immune response signals, thereby revealing the dynamic characteristics of the immune system more comprehensively.

[0106] Building upon this foundation, a deep learning model based on the Transformer architecture is employed to contextually encode 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 signaling pathways and improving the model's robustness and generalization ability when handling multi-source mixed signals. This framework supports the identification and independent evaluation of various parallel signals.

[0107] Furthermore, this application constructs a comprehensive quantitative assessment system for immune intensity, integrating multidimensional indicators such as clonal diversity, amplification index, immune activation intensity, and sequence specificity. This enables comparable quantification of the activity of immune responses under different functional categories, supporting hierarchical characterization and dynamic trend analysis of biological system states. This application achieves in-depth analysis and systematic modeling of immune repertoire data, possessing advantages such as ultra-high sensitivity, multidimensional parallel analysis, precise quantification, and non-invasive convenience. It is suitable for large-scale population immune status assessment, long-term health monitoring, and systems biology research, significantly enhancing the application value of immune repertoire data in the functional analysis of biological systems. Attached Figure Description

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

[0109] Figure 1 This is a diagram of the sequence data analysis device disclosed herein for state modeling of biological systems;

[0110] Figure 2 This disclosure provides a sequence data analysis method for state modeling of biological systems.

[0111] Figure 3 This is a diagram illustrating the immune signal amplification and processing procedure disclosed in this publication;

[0112] Figure 4 This is a diagram of the deep learning model structure. Detailed Implementation

[0113] The technical solutions of the embodiments of this disclosure will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this disclosure, and not all embodiments. Based on the embodiments of this disclosure, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this disclosure.

[0114] The terminology used in the embodiments of this disclosure is for the purpose of describing particular embodiments only and is not intended to be limiting of this disclosure. The singular forms “a,” “the,” and “the” as used in the embodiments of this disclosure and the appended claims are also intended to include the plural forms unless the context clearly indicates otherwise.

[0115] In this application, the biological system state 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 abnormalities, or immunosuppression.

[0116] Figure 1 This disclosure illustrates a sequence data analysis apparatus for state modeling of biological systems. See also Figure 1 As shown, a sequence data analysis device for modeling the state of biological systems is provided, comprising: a data acquisition module configured to acquire high-throughput sequencing data of an immune repertoire of B cell receptors or T cell receptors in biological samples, wherein the sequencing data includes sequencing reads, total sequencing reads, CDR3 amino acid sequences, and annotation results of V and J gene fragments; 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 weighted enrichment, and to fuse the correction parameters with the preference features to construct structured feature nodes; and a shared encoding module configured to perform context encoding on all feature nodes using a deep learning model, and to generate a system state vector H representing the overall state of the biological system through weighted average pooling. shared The 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 the interference of immune signals between multiple tasks; the multi-task decoding module is configured to perform risk assessments related to multiple tasks in parallel based on the system state vector and output the confidence score of each functional category; the immune strength assessment module is configured to calculate the ImmunScore of each preset functional category based on the decoding results and clonal distribution characteristics, which is used to quantify the activity of the immune response.

[0117] 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 repertoire sequencing data and model parameters; a processor for running the various modules of the device; and a user interface for outputting immune strength score (ImmunScore), risk assessment results, and visualization reports.

[0118] Figure 2 This disclosure illustrates a sequence data analysis method for state modeling of biological systems. The analysis method does not involve disease diagnosis or treatment. See also... Figure 2 A sequence data analysis method for modeling the state of biological systems includes the following steps: Step 1: Obtain high-throughput sequencing data of the immune repertoire of B cell receptors or T cell receptors in biological samples. The sequencing data includes sequencing reads, total sequencing reads of all clones in the sample, CDR3 amino acid sequence of each clone, annotation results of V gene fragments, and annotation results of J gene fragments.

[0119] 5-10 mL of peripheral blood was collected from the subject, peripheral blood mononuclear cells (PBMCs) were isolated, RNA was extracted, and the CDR3 region of the BCR heavy chain (IgH) and TCR β chain was amplified by 5' RACE technology. High-throughput sequencing was then performed to obtain raw sequencing data.

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

[0121] This step utilizes a multi-level signal enhancement strategy to effectively amplify weak early tumor immune signals.

[0122] Step 3: Encode all feature nodes using a deep learning model, and generate a system state vector H representing the overall state of the biological system through a weighted average pooling operation. shared .

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

[0124] Step 5: Based on the system state vector H shared ImmunScore is calculated for each functional category to quantify the activity of the immune response.

[0125] Figure 3 A diagram illustrating the immune signal amplification processing procedure of this disclosure is shown. See also... Figure 3 The nonlinear gain correction involves enhancing the original frequencies of the clones to suppress high-abundance background and increase the representation weight of low-abundance clones. The calculation formula is as follows:

[0126] ,

[0127] in, The corrected frequency of clone i. The original frequency of clone i, which is based on the sequencing reads of clone i. Total sequencing reads of all clones in the sample The relative abundance is calculated by the ratio;

[0128] This is the gain coefficient, with a value ranging from 0.1 to 0.5; gain coefficient It is configured to be adjustable in the range of 0.1 to 0.5 to balance the signal amplification strength with the risk of noise introduction;

[0129] The combination preference feature extraction is based on the annotation results of genes V and J, and the combination frequency of each VJ gene pair is counted. The formula for calculating the preference score is as follows: ,in, The observed frequency of VJ gene pairs. The desired frequency of the VJ gene pair;

[0130] Based on the corrected frequency of clone i, rare clones with frequencies below a preset threshold are weighted and enriched to generate weighted frequencies, which are used to characterize the abundance dynamics of clones.

[0131] The weighted frequency is used to enrich the clonal weights. With the corrected frequency Multiplying them together, we get:

[0132] ,

[0133] Weighted frequency for clone i; The enrichment weights for clone i;

[0134] Enrichment weights The calculation formula is:

[0135] ;

[0136] The corrected frequency of clone i; The attenuation parameter ranges from 100 to 500; the threshold is a preset frequency threshold, ranging from 0.001% to 0.01%. This is an indicator function that takes the value 1 when the condition is true and 0 otherwise.

[0137] Clonal frequency correction: Corrects the original clonal frequency to reduce the influence of high-abundance clonals and improve the signal-to-noise ratio of medium- and low-abundance clonals.

[0138] Rare clonal enrichment: For rare clonal types with a frequency below a certain threshold (e.g., 0.01%), enrichment is performed by applying exponential weights to highlight their potential importance in early diagnosis.

[0139] VJ gene usage preference analysis: By analyzing the deviation between the frequency of VJ gene pairing and the expected frequency, the preference selection caused by specific antigen stimulation is identified, which serves as another dimension of signal amplification.

[0140] According to some possible implementations of the first aspect of this disclosure, the process of fusing corrected parameters and combined preference features to construct structured feature nodes is as follows:

[0141] For each clone i in the immune repertoire, construct a fusion feature vector. fusion of feature vectors Contains the CDR3 amino acid sequence of clone i itself; frequency after nonlinear gain correction. ;

[0142] The weights obtained by weighted enrichment of rare clones The preference score of the VJ gene pair used in this clone. ;

[0143] All cloned fusion feature vectors Let X be an N×512 input matrix, where N is the total number of clones detected in the samples, and each row xi represents the fused feature vector of the i-th clone. ;

[0144] The fusion process includes:

[0145] Step S1

[0146] The key information for each independent clone is organized into a structured data record unit to achieve alignment and encapsulation of sequence information and various enhancement signals. The structured data record includes CDR3. Sequence , , and ;

[0147] Step S2

[0148] By using sequence embedding and feature concatenation, various features in structured records are transformed into a unified vector representation, and multimodal fusion is performed.

[0149] The sequence embedding is transformed into a fixed-dimensional vector using an embedding matrix. ,

[0150] Embedding() indicates the embedding operation;

[0151] The sequence embedding vector and the enhanced signal are concatenated to form the initial fusion vector. ,

[0152]

[0153] Concat(.) represents the vector concatenation operation.

[0154] Step S3

[0155] The concatenated initial fusion vector is mapped to a unified dimension that meets the fixed input dimension requirements of the deep learning model. This dimension mapping is performed through a learnable linear transformation layer.

[0156]

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

[0158] In adaptive immune responses, exposure to specific antigens can drive the selective amplification of BCR / TCR VJ gene rearrangement combinations. The rearrangement bias can be assessed by comparing the observed frequency of VJ combinations with the expected frequency calculated based on a random rearrangement model: a significantly higher frequency than the expected frequency suggests positive selection (i.e., positive bias), potentially reflecting antigen-specific activation; a significantly lower frequency than the expected frequency suggests negative selection or a state of suppression (i.e., negative bias); and frequencies close to the expected value are considered to have no significant bias, representing the background homeostasis of the immune system. This bias analysis provides important clues for identifying antigen-driven immune responses.

[0159] "Rare clonal types" are an operational category defined based on a preset frequency threshold (e.g., 0.001% to 0.01%), referring to clonal types in the immune repertoire with a frequency below that threshold. These clonal types undergo specific weighting in subsequent analyses to enhance their contribution to the characterization of the overall immune response.

[0160] In deep learning analysis of immune repertoires, the CDR3 region of T-cell or B-cell receptors exists as an amino acid sequence string, such as "CASSLGTGNEQYF". Essentially, it is a discrete symbolic sequence that cannot be directly processed by neural networks. Since all computations in deep learning models are based on continuous numerical vectors, the original sequence must be transformed into a fixed-dimensional vector representation—a process called sequence embedding. By introducing a learnable embedding matrix, each amino acid is mapped to a low-dimensional vector. The entire CDR3 sequence is encoded to generate a fixed-length context-aware vector, thus achieving the transformation from "biological symbols" to "mathematical representations". This embedding not only solves the data type mismatch problem but, more importantly, captures the physicochemical similarities between amino acids (such as hydrophobicity, charge, and volume) and the functional semantics of sequence patterns. Furthermore, the fixed-dimensional output ensures that CDR3 sequences of different lengths can be uniformly input into subsequent model structures such as Transformers, meeting the requirements of batch processing and parallel computing. Therefore, sequence embedding is not only a necessary step in technical implementation but also crucial for constructing high-order immune feature spaces and mining clonal functional correlations.

[0161] The core of data fusion lies in creating a comprehensive feature vector for each clone, containing its sequence information and all amplified signals. This process is accomplished through feature concatenation, which is then input into the model's embedding and linear layers, ultimately transforming it into a uniformly dimensional input vector that the deep learning model can process. A patient's complete input consists of all (or the Top N) clones within their body. A set or sequence of components.

[0162] See Figure 4 , Figure 4 This is a diagram of the deep learning model structure. The deep learning model employs a multi-task learning framework, which includes:

[0163] A shared encoder contextually encodes multiple clonal features and generates a shared feature vector characterizing the overall state of the biological system.

[0164] 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.

[0165] The shared encoder consists of 6 stacked Transformer blocks;

[0166] Each Transformer block includes a multi-head self-attention sub-layer and a feedforward network sub-layer connected in sequence, and each sub-layer is followed by a residual connection and a layer normalization structure;

[0167] The multi-head self-attention sublayer contains eight parallel attention heads, which are used to establish global dependencies between different positions of the CDR3 sequence and to model the correlation between local amino acid patterns, long-range structural dependencies, functional motif recognition, and amino acid physicochemical properties in parallel through a multi-head mechanism.

[0168] The feedforward network sublayer is set after the multi-head self-attention sublayer and includes a dimension-up linear transformation layer, a non-linear activation layer, and a dimension-down linear transformation layer, which are used to perform non-linear transformation and feature dimension up / down operations on the intermediate representation vector at each position.

[0169] In each sub-layer, the output of the corresponding sub-layer is added to its input vector to achieve a residual connection, followed by layer normalization. Specifically, the output of the multi-head self-attention sub-layer, after residual connection and layer normalization, serves as the input of the feedforward network sub-layer; the output of the feedforward network sub-layer, after residual connection and layer normalization, serves as the final output of the Transformer block.

[0170] The Transformer blocks are stacked 6 times in a loop to form the shared encoder, in order to maintain training stability and mitigate gradient vanishing.

[0171] The processing procedure for each Transformer block includes the following steps:

[0172] (a) Generate the query matrix Q, the key matrix K, and the value matrix V through linear transformation;

[0173] (b) Divide 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 vector; (c) Concatenate the weighted vectors output by each attention head according to the feature dimension, and map them to 512 dimensions through a learnable linear transformation to obtain the multi-head attention output;

[0174] (d) Add the multi-head attention output to the input and then perform layer normalization to obtain the intermediate result;

[0175] (e) Input the intermediate results into the feedforward neural network, which includes a linear layer that increases the dimension to 2048, a ReLU activation function, and a linear layer that reduces the dimension back to 512; (f) Add the output of the feedforward network to the intermediate results and then perform layer normalization again to obtain the output of the corresponding layer.

[0176] After six layers of stacking processing, the final output clone vectors are weighted and averaged according to their corrected frequencies to obtain the system state vector H representing the state of the entire biological system. shared .

[0177] The intermediate representation vector refers to the new feature vector containing contextual semantic information obtained after a clone (such as a TCR / BCR sequence) has been processed by a certain layer in a Transformer network. In each Transformer block, the multi-head self-attention sublayer performs context-aware feature aggregation on its input, and the output vector generated by residual connections and layer normalization operations is used as the input of the feedforward network sublayer for further nonlinear transformation.

[0178] The specific processing steps for each Transformer block include the following:

[0179] Multi-head self-attention mechanisms establish global dependencies between different positions in an amino acid sequence by modeling different relational patterns in parallel using multiple attention heads. This mechanism aims to ensure that each clone vector z... in (i) It can focus on all other clone vectors z within an individual. in (j), and updates its own information based on correlation, thereby capturing the synergistic effects and functional patterns among clones, where the clone vector z in (i) = Input matrix X. Input z in (i) Query the matrix through three different linear transformations respectively. ,key matrix Value matrix W Q W K W V W is a learnable parameter. Q W represents the weight of the query matrix Q. K and W V Similarly, these weight matrices have a dimension of 512 x 512. They are used to generate Q, K, and V matrices, which are used to transform the input vector 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 enabling the model to learn how to better capture the dependencies between different positions in the sequence.

[0180] The query matrix Q, key matrix K, and value matrix V are divided into 8 attention heads h. An attention score is calculated for each attention head h. Each element in the matrix, Scores h (i,j) represents the original relevance score of the i-th clone (as a query) to the j-th clone (as a key) in the sequence. The higher the score, the more information from the j-th clone should be referenced when constructing a new representation of the i-th clone. T is a matrix transpose operation. The vector dimension for each head, =512 / 8=64, normalize the scores to obtain the attention weights. Calculate the output of this head. , This represents the value matrix of the h-th attention head. The outputs of the eight heads are concatenated 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 dimensionality. This operation merges eight N x 64 matrices along the feature dimensions into a single N x 512 matrix, which is then transformed by an output linear transformation to obtain the multi-head attention output. Then, residual connections and layer normalization are performed. The output of the multi-head self-attention layer 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 vanishing gradient problem in deep networks and stabilizes the training process. Among other things, The operation independently normalizes the feature vector of each clone to make its mean 0 and variance 1, and then scales and translates it using learnable gain and bias parameters to stabilize the training process.

[0181] Next, we move to the feedforward neural network (FFN) module. This module performs an independent nonlinear transformation on each clone vector to enhance the model's expressive power. The specific calculations are as follows:

[0182] 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 weights (512×2048) and bias (2048) of the first dimension-increasing linear layer. ReLU is the modified linear unit activation function. W2 and b2 are the weights (2048×512) and bias (512) of the second dimension-reducing linear layer.

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

[0184] ,

[0185] The final output of the Transformer block will serve as the input Z to the next block. in .

[0186] After processing through 6 layers of Transformer blocks, the final output matrix X is obtained. final ∈RN×512, its size is still [N,512], each row X final (i) is a clone vector that fully incorporates the contextual information of the entire immune repertoire.

[0187] By performing weighted average pooling on all the final clone vectors, a fixed-dimensional system state vector H is generated. shared This is used to characterize the individual's global immune status at the current time point. This method aligns with biological intuition, using the corrected frequency for each clone. As weights, a weighted average is calculated for all final clone vectors. The calculation formula is:

[0188] 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, used for subsequent immune status classification, disease progression prediction, or treatment response assessment.

[0189] Eight self-attention heads (SAHs) are structurally consistent but randomly assigned different parameters during model initialization. During training, each SSH automatically learns and differentiates through backpropagation to capture features of different levels and types within the sequence. Although the specific function of each head cannot be predefined, visualization and attribution analysis of the trained model reveal that different SSHs tend to focus on different biological characteristics of the CDR3 sequence: some heads focus on recognizing local amino acid patterns (such as consecutive hydrophobic residues); some capture long-distance sequence dependencies (such as potential interactions between N-terminal and C-terminal charged amino acids); some tend to recognize known structural motifs or conserved sequence fragments; and others focus more on the physicochemical properties of integrated amino acids (such as polarity, charge, and volume). This parallel and complementary attention mechanism enables the model to collaboratively resolve the complex immunomodulatory features of the CDR3 sequence from multiple dimensions, significantly enhancing its characterization ability and generalization performance on immune repertoire data.

[0190] The dimensionality increase / decrease design ensures high capacity for feature extraction while avoiding excessive computational overhead, and also enhances the model's fitting ability.

[0191] In the sequence data analysis method for modeling the state of biological systems described in this invention, the shared encoder employs a deep neural network based on the Transformer architecture to perform context-aware encoding of the fusion feature vectors of multiple clonal types in the immune repertoire, ultimately generating a condensed vector representing the overall immune state of the biological system. This process does not directly vectorize a single CDR3 sequence (this step is already completed in the embedding layer), but rather globally models the structured features of all clonal types in the entire immune repertoire. Through layer-by-layer processing by the Transformer, the Transformer block encodes the sequence information (CDR3 sequences at the amino acid or nucleotide level) in the immune repertoire into a high-dimensional continuous vector representation for subsequent use by disease-specific decoders. This step achieves a mapping from the symbol sequence space to the feature vector space. Finally, it is "encoded" into a fixed-length context vector representing the state of the entire immune repertoire, i.e., the system state vector H. shared This is a coding process from "group information" to "condensed summary".

[0192] Following the shared encoder, multiple parallel decoder heads are connected, each targeting a specific disease (such as different types of cancer, autoimmune diseases, or infections). Each decoder head independently outputs the signal strength corresponding to its respective disease.

[0193] Adversarial training and orthogonality constraints are introduced during model training to minimize the information correlation between different decoders, ensuring that the signals output by each decoder are pure and specific, thereby achieving effective signal decoupling.

[0194] According to some possible implementations of the first aspect of this disclosure, the specific decoder is a plurality of decoders with identical structures, each specific decoder being used to process the system state vector H output by the shared encoder. shared Conduct a mission-related risk assessment;

[0195] The decoder includes at least two fully connected hidden layers for processing the input system state vector H. shared Multi-level nonlinear transformations are performed to extract specific features related to the current task step by step, and key signals are focused by reducing the feature dimension.

[0196] A single-neuron output layer is used to map the low-dimensional features of the final hidden layer output to an unconstrained raw output value;

[0197] The decoder further includes an activation processing unit configured to apply a non-linear activation function in each hidden layer and a Sigmoid activation function after the output layer, converting the original output value into a scalar evaluation score between 0 and 1.

[0198] All specific decoders share the same network structure, but each has independent trainable parameters and is independently optimized during training based on the label data of their respective tasks to achieve comprehensive assessment of multi-class immune risks.

[0199] 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 sequentially through multiple fully connected hidden layers, with each layer performing a linear transformation combined with nonlinear activation processing; feeding the output of the final hidden layer into a 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 the output, where the closer the score is to 1, the higher the risk level of the individual in the corresponding task, and the closer it is to 0, the lower the risk level.

[0200] Specifically, the specific decoder set includes at least one infectious disease decoder, at least one autoimmune disease decoder, and at least one tumor disease decoder. This contributes to the generation of shared immune state representations. The vector is then fed in parallel to multiple independent decoders, each corresponding to a specific evaluation task for extracting task-relevant risk signals from a unified immune representation. Each decoder consists of a series of fully connected layers, containing at least two hidden layers and one output layer. (512-dimensional vector) The data is fed into the first hidden layer and undergoes a non-linear mapping using a linear transformation and the ReLU activation function, outputting a 256-dimensional intermediate feature vector. Taking the tumor decoder as an example, the specific calculation is as follows: , and Here are the weight matrix and bias vector for this layer. The weight matrix is ​​512×256, and the bias vector is a vector of length 256.

[0201] This intermediate feature is input into the second hidden layer, further mapped to 64 dimensions, and calculated as follows: This enables the layer-by-layer extraction and compression of key immune characteristics. and, Here are the weight matrix and bias vector for the second hidden layer. The weight matrix is ​​256×64, and the bias vector has a length of 64. The ReLU function is expressed as f(x) = max(0, x). After processing in the hidden layer, the final 64-dimensional feature vector is fed into the single-neuron output layer, where a linear transformation generates a scalar value called Logits, which is calculated as follows: H2 is the output of the second hidden layer, with a dimension of 64; W cancerout It is a weight matrix with dimensions 64×1; b cancerout This is a bias term with a dimension of 1. The Logits value is the unnormalized raw output, with no constraints on its range. To transform it into an interpretable risk score, the system applies the Sigmoid activation function to the Logits, obtaining the final output:

[0202] Output value The value is a scalar between 0 and 1, representing the risk level of the corresponding task. The closer the value is to 1, the higher the risk, and the closer it is to 0, the lower the risk.

[0203] All decoders employ the same network structure and computational process, but each possesses independent trainable parameters (including weights and biases). In this application, tumor risk assessment, autoimmune status assessment, and infection risk assessment are performed by independent decoders, whose parameters are independently optimized during training based on their respective task objectives. This design allows different decoders to learn from the same network structure and computational process. The model decodes the specific signals of interest for each task, enabling parallel evaluation of multiple tasks while avoiding parameter interference between tasks, thus improving the flexibility of the model.

[0204] In the aforementioned multi-task learning framework based on a shared encoder and decoders for multiple independent diseases, a key challenge is how to ensure the accuracy of the immune characterization output by the shared encoder. Not dominated or contaminated by strong signals from a particular disease. If If too much task-specific information, such as tumor-specific T-cell clonal expansion signals, is mixed in, other decoders, such as infection or autoimmune decoders, may receive interference signals, resulting in information coupling between tasks and performance degradation.

[0205] To address this issue, this application further introduces an adversarial signal denoising mechanism to actively clean up the shared feature space. The deep learning model also includes a domain discriminator module, whose input is... The task is to identify which downstream decoder the feature vector serves, such as a tumor decoder, an infection decoder, or an autoimmune decoder. The shared encoder is optimized during training to minimize the discriminator's classification accuracy, i.e., to generate a generalized feature representation that makes it difficult for the discriminator to distinguish the source of the task.

[0206] The adversarial process essentially constitutes a game system. The discriminator attempts to learn task-specific patterns, meaning it strives to learn to distinguish between different patterns, while the encoder strives to eliminate these identifiable patterns, meaning it strives to learn to confuse different patterns. After adversarial training, Task-specific information is effectively suppressed, retaining only common immune features shared across diseases ("noise" or "interference"). These stripped-off specific signals (such as tumor-specific T cell signals) are then autonomously learned by each independent decoder (tumor decoder) in its dedicated pathway using trainable parameters.

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

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

[0209] In the multi-task deep learning analysis method based on immune repertoire data described in this invention, to achieve effective decoupling and feature purification of complex biological signals, a composite loss function is introduced during model training to collaboratively optimize the parameters of the shared encoder, multiple task-specific decoders, and the domain discriminator. The loss function expression is: This represents the task-related loss, used to ensure that each decoder can identify the target category, that is, to ensure that each disease-specific decoder in the model can accurately predict its corresponding disease state. This is an adversarial loss used to suppress task-specific components mixed in the shared feature space, prompting the encoder output to have a universal representation consistent across tasks. This is an orthogonal constraint loss, used to enhance the independence of features extracted by different decoding paths and reduce the overlap of their representation spaces. and The adjustable weighting coefficients, whose values ​​are determined through cross-validation or parameter tuning on the validation set, are used to balance the relative impact of various losses. They are typically set in the range [0, 1], and their specific values ​​are determined through grid search hyperparameter optimization on the validation set. All immune repertoire sample data are randomly divided into three non-overlapping subsets according to a predetermined ratio (70% : 15% : 15%): training set, validation set, and test set. 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; the test set is used only in the final stage for independent and 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 epochs (every 5 or 10), training is paused, and the current model is forward-inferred on the validation set to evaluate its overall performance. Evaluation metrics include two aspects: task-related performance metrics and surrogate metrics for decoupling effectiveness. Task-related performance metrics include calculating the predictive performance of each disease-specific decoder on the validation set, typically using the area under the receiver operating characteristic curve (AUC-ROC), and further calculating the average AUC across all tasks to measure the model's multi-task recognition capability. A surrogate metric for decoupling effectiveness is introduced to measure the degree of purification of the shared feature space. A lightweight classifier is trained using the system state vector H output by the shared encoder. shared To predict the task category of a sample, the lower the prediction accuracy, the less task-specific information is mixed in the shared features, and the better the decoupling effect. Subsequently, a grid search method is used to systematically try different combinations of (λ1, λ2) within a preset hyperparameter range (λ1, λ2 ∈ {0.1, 0.5, 1.0, 2.0}). For each set of hyperparameters, the above training and validation process is repeated, and its overall performance on the validation set is recorded. Finally, based on a preset comprehensive scoring criterion (e.g., prioritizing an average AUC not lower than a certain threshold, the combination with the optimal decoupling index is selected. 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 sets (to fully utilize the data), and a unique final performance evaluation is performed on the test set. The AUC, sensitivity, specificity, and other indicators for each task are reported to objectively reflect the model's generalization ability.

[0210] The task loss A binary cross-entropy loss function is used to sum the losses for each disease task, making it suitable for classification tasks with multiple diseases and labels (i.e., an individual may have multiple diseases simultaneously), ensuring the model can correctly identify disease types / risk levels. Its mathematical form is as follows:

[0211] Where K is the total number of task-specific decoders (K=12 in this embodiment), y k ∈{0,1} represents the true label of the k-th category, a binary variable taking the value 0 or 1, derived from the clinical diagnosis results of the individuals corresponding to the training samples, and is objective, predetermined gold standard data. If an individual is clinically diagnosed with the k-th disease, then y k =1; otherwise y k =0, for each sample, its K true labels (y1, y2, ..., y...). K This forms a K-dimensional multi-hotspot label vector, supporting multiple diseases to be positive simultaneously, which aligns with the clinical reality of multiple coexisting diseases and provides supervisory signals for the model's multi-task learning. k The prediction confidence level corresponds to the decoder output, representing the model's judgment that an individual has the k-th disease. This loss term ensures that the model possesses basic discriminative performance in multi-task recognition tasks.

[0212] The resistance loss This is implemented using 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 states, C=3). The discriminator's role is to attempt to identify the feature vector output by the shared encoder. One of the training objectives of the shared encoder is to make the generated H... shared This causes the discriminator's prediction probabilities for all C domains to approach 1 / C, meaning they are completely indistinguishable. The adversarial loss is defined as the negative cross-entropy between the discriminator's output probability distribution and the uniform distribution, used to suppress common / noise features among diseases, allowing each decoder to obtain a purer, more specific signal.

[0213] ,in, The representation domain discriminator D represents the input features H. shared Predict the probability that it belongs to the c-th 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-agnostic general feature representation, thereby effectively suppressing the dominance of strong signals of specific tasks in the shared space and improving the generalization ability of features.

[0214] The orthogonal constraint loss This loss, applied to the intermediate feature layers of each decoder, aims to enhance the specificity of features extracted by different disease decoders, reduce their correlation, and require that the representations of different disease feature spaces be as orthogonal (independent) as possible, minimizing overlap. This invention achieves this by ensuring that the feature vector representations of different disease category decoders are orthogonal before the final output. The orthogonality loss is defined as the sum of the squared cosine similarities between all class pairs: ,in, This operation represents the summation of all distinct disease category pairs (c1, c2), where each pair is an unordered combination of any two distinct categories selected 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 satisfy the condition are: [tumor, autoimmune], [tumor, infection], [autoimmune, infection]. This summation operation aims to measure the interrelationships between the feature representations corresponding to different disease tasks, avoid redundant comparisons of the same category with itself, and ensure that orthogonal constraints only apply between different functional categories, thereby effectively promoting the independence and decoupling of the feature spaces of each decoding path. c1 and h c2 These represent decoders from H that belong to different task categories (diseases), c1 and c2. shared The feature vector extracted from it and located before its final output layer. Let L2 be the L2 norm, i.e., the vector length. Minimizing this loss function forces the feature representations of different decoding paths to tend to be orthogonal in the vector space, significantly reducing feature coupling between tasks, improving the modularity and interpretability of the system, and thus achieving decoupling at the feature level.

[0215] By jointly optimizing the above three loss functions, and using the parameters and By balancing their weights, the model of this invention can learn disease-specific immune signals that are both highly accurate in prediction and pure and free from interference.

[0216] In real-world clinical settings, individuals may simultaneously exhibit multiple immune perturbation states. For example, an early-stage lung cancer patient may also be infected with influenza or have a mild autoimmune predisposition. These different pathological states drive specific immune responses and leave unique molecular signals in the T-cell or B-cell receptor immune repertoire. Because these signals overlap and coexist in sequencing data, traditional single-task analysis methods struggle to effectively distinguish their origins, easily leading to signal cross-interference and consequently affecting the accuracy of disease identification.

[0217] This invention constructs a deep learning model based on a shared encoder and a multi-task decoder, combined with an adversarial feature decoupling mechanism, to achieve precise separation of multi-category pathological features from complex mixed immune signals. The shared encoder first extracts general immune representations across diseases, while each task-specific decoder identifies risk patterns corresponding to its respective disease category in parallel. 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 non-interfering specific signals.

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

[0219] According to some possible implementations of the first aspect of this disclosure, the multi-task learning framework further includes a domain discriminator module, which uses the system state vector H output by the shared encoder. shared As input, the domain discriminator module's task is to analyze the system state vector H. shared The data domain category is classified and identified. The data domain category corresponds to multiple preset functional association categories. Each functional association category represents a specific type of biological system perturbation pattern.

[0220] Introducing an adversarial training-based feature decoupling mechanism into deep learning models, by suppressing the system state vector H... shared The ability to distinguish between preset functional categories reduces interference of immune signals between multiple tasks, and improves the universality and robustness of shared characterization.

[0221] In a multi-task learning framework, a data domain category refers to a logical classification based on the data distribution characteristics corresponding to different tasks. In machine learning, a "domain" typically refers to a set of data with similar statistical characteristics. In this invention, the data domain category corresponds to multiple preset functional task paths, specifically manifested as the distribution differences of immune response patterns in the feature space under different disease states. The system defines three data domains: the first data domain corresponds to tumor-related immune responses, characterized by persistent amplification of a few clones and enrichment of high-affinity sequences; the second data domain corresponds to infectious disease-related immune responses, characterized by acute polyclonal amplification and transient decrease in diversity; and the third data domain corresponds to autoimmune disease-related immune responses, characterized by long-term activity of low-to-medium frequency self-reactive clones and enhanced sequence conservation. Each data domain represents an identifiable data distribution pattern induced by a specific type of biological system perturbation. During model training, 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.

[0222] In this embodiment, the functional association categories include, but are not limited to, categories associated with tumor-related immune responses, categories associated with infectious immune responses, and categories associated with autoimmune responses. Biological system perturbation patterns refer to detectable changes in the functional state of a biological system (particularly the immune system) caused by specific physiological or pathological processes (such as disease, infection, tissue damage, immune intervention, etc.). These changes leave unique, quantifiable molecular signal patterns in the immune repertoire (such as the set 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 preference caused by corresponding pathological processes. These quantifiable indicators can serve as biomarkers reflecting specific perturbation types.

[0223] More specifically, the "functional association categories" include, but are not limited to, the following three categories: tumor-related immune responses, infectious disease-related immune responses, and autoimmune disease-related immune responses. Correspondingly, the task of the domain discriminator module is to base its work on the system state vector H output by the shared encoder. shared To determine which disease-specific decoder the vector serves, i.e., whether it is more inclined to be used for cancer risk assessment, infection status identification, or autoimmune activity scoring.

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

[0225] During model training, the shared encoder engages in adversarial optimization against the domain discriminator through a gradient inversion layer. Its optimization objective is to minimize the classification accuracy of the domain discriminator, ensuring that the generated H... shared Features should ideally not contain identifiable task-specific biases. If H sharedThe signal contains obvious tumor-specific clonal amplification signals, and 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 them indistinguishable in the feature space.

[0226] Through this adversarial mechanism, the model forces the shared encoder to extract universal immune characteristics across diseases (such as overall diversity and clonal amplification levels), while stripping disease-specific sensitive features (such as high expression of a particular virus-specific TCR sequence) from the shared space, leaving them to be learned independently by the corresponding dedicated decoder. This not only improves H shared Its generalization ability and task independence also significantly reduce signal interference between multiple tasks, thereby supporting simultaneous and accurate analysis of individuals in the presence of multiple immune perturbations (such as early lung cancer combined with influenza infection).

[0227] In this multi-task learning framework, the domain discriminator module and the parallel specific decoder are not executed in a linear sequence, but rather form a special relationship around the shared encoder, characterized by parallel collaboration during training and functional separation during inference. Furthermore, their outputs are completely different: during training, the shared encoder generates the system state vector H. shared Then, it will be input into two parallel branches simultaneously—the domain discriminator module is responsible for judging H. shared The dataset belongs to the biological system perturbation pattern data domain (output domain category classification result / probability), and the error is fed back to the shared encoder through adversarial training to help H. shared Interference information is stripped away; while the parallel specific decoder is based on H shared The system performs actual task decoding (outputting confidence scores or predictions such as disease risk and immune strength) and feeds the task error back to the shared encoder to jointly optimize model performance. During the inference phase involving actual sample analysis, the domain discriminator module no longer participates in the process (it is only a training and optimization tool); only the parallel specific decoder is used based on the optimized H... shared The two outputs are the final analysis results required by the user. One output is an intermediate judgment result used for training, and the other is the final task result used by the user (directly supporting the assessment of the state of biological systems). Their essential functions and output uses are completely independent.

[0228] According to some possible implementations of the first aspect of this disclosure, it further includes: establishing a quantitative assessment system for immune signal intensity, and calculating an immune intensity score ImmunScore for each preset functional category based on a functional correlation vector after feature decoupling processing; the formula for calculating the immune intensity score ImmunScore is:

[0229] ,

[0230] Where D is the clonal diversity index, calculated using the following formula:

[0231] N is the total number of clones detected in the sample;

[0232] E is the clonal expansion index, calculated using the following formula:

[0233] ;

[0234] A represents the intensity of immune activation, calculated using the following formula:

[0235] , For the enrichment weights of clone i, For clone i, the corrected frequency is s. i To score sequence specificity, Disease-specific scores are provided by a deep learning decoder;

[0236] α1, α2, α3, and α4 are preset weighting coefficients.

[0237] This is the disease-specific score, which is the scalar evaluation score of the output of the specific decoder trained for a specific functional category in this method for the current sample. Its generation process is as follows: the system state vector H output by the shared encoder... shared The input is fed into the selected specific decoder, transformed by a fully connected network, and finally output by a sigmoid activation function (the calculation process is the same as that for the specific decoder) that produces a scalar value between 0 and 1. This value is the input. .

[0238] Each disease category receives a corresponding ImmunScore. Based on these ImmunScores and the outputs of disease-specific decoders, disease risk stratification, early diagnosis, and / or dynamic monitoring are performed. For acute infectious diseases, an ImmunScore > 85 indicates a high positivity rate; for chronic infections and autoimmune diseases, an ImmunScore between 60 and 80 indicates an active phase; and for cancer, an ImmunScore > 70 indicates a high risk, enabling accurate detection of multiple important diseases simultaneously.

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

[0240] Dynamic monitoring was performed on a subject diagnosed with an autoimmune disease. During disease remission, baseline monitoring showed a low ImmunScore (<45). Subsequent periodic monitoring revealed a significant increase in ImmunScore to active disease levels (>78), with the corresponding disease decoder outputting a high-risk signal. This result was consistent with the increased disease activity assessed by comprehensive clinical evaluation. This embodiment demonstrates the application value of the present invention in the dynamic monitoring of autoimmune disease activity.

[0241] Screening was conducted on a subject with no clinical symptoms but high-risk factors for tumors. Testing according to the method of this invention showed that the decoder for the specific tumor output a high-risk signal (>0.9), while decoders for other diseases showed low risk, and the ImmunScore was also in the high-risk range for tumors (>74). Based on this high-risk warning, targeted imaging examinations were recommended for the subject, ultimately leading to the discovery of an early-stage tumor lesion. This embodiment demonstrates the significant potential of this invention for screening early-stage tumors in the asymptomatic stage.

[0242] This invention was applied to a subject with complex clinical presentations. The results showed that multiple disease decoders simultaneously output intermediate-to-high-risk signals; for example, both the autoimmune hepatitis decoder and the early breast cancer decoder indicated high risk. These results provided important guidance for clinical diagnosis, and subsequent clinical examinations confirmed the presence of two or more diseases in the subject. This embodiment demonstrates the unique value of this invention in identifying and diagnosing complex comorbidities.

[0243] 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 disease diagnosis or individual health assessment, but rather to extract and process immune-related sequence information from biological samples detached from the human body, generating multidimensional intermediate parameters (such as ImmunScore, clonal amplification index, decoder confidence score, etc.) reflecting the dynamic response of the immune system. These parameters are intermediate results obtained through nonlinear signal enhancement, feature fusion, and deep learning modeling implemented by computer devices. Under current medical knowledge, they cannot directly lead to a diagnosis of a specific disease and require comprehensive judgment in conjunction with other clinical evidence. This method belongs to the information processing flow of in vitro sample data, with all steps automatically executed by the computing system. It aims to improve the sensitivity and systematic nature of immune signal analysis, is applicable to the characterization and monitoring of various biological disturbance states, and meets the criteria for non-diagnostic technical solutions.

[0244] A multi-dimensional immune strength scoring system is established to comprehensively quantify decoupled disease-specific signals: the clonal diversity index is used to assess the diversity and stability of the immune system; the clonal amplification index measures the degree of amplification of dominant clonal types, reflecting the strength of the immune response; the immune activation intensity combines clonal weights, frequencies, and sequence specificity to comprehensively assess the activation level of the immune system; and the specific disease score is obtained by weighting and summing the above multiple indices, based on the specific disease signal score output by a trained deep learning decoder, to obtain the final comprehensive immune strength score (ImmunScore) for a single disease. This score comprehensively reflects the immune response status associated with a specific disease.

[0245] Sequence Specificity Score i The score is one of the key parameters in the immune strength assessment system of this invention, used to quantify the similarity between the CDR3 sequence of the tested clone and the specific recognition pattern of known disease-associated antigens. This score is not directly derived from the raw sequencing data, but is calculated through a pre-trained deep learning-assisted model, aiming to introduce functional-level prior knowledge and improve the model's ability to recognize biologically significant immune response signals.

[0246] S i The calculations are based on a specially constructed disease-related CDR3 sequence database. This database integrates multiple authoritative publicly available resources, such as VDJdb and McPAS-TCR, and supplements them with experimentally validated antigen-specific TCR / BCR sequence data, covering various disease categories including viral infections (such as HIV and influenza), tumor neoantigens, and autoimmune-related antigens, forming a set of tens of thousands of high-quality, well-annotated positive samples. Based on this, non-specific sequences extracted from large-scale healthy population immune repertoire data are used as negative samples to construct positive-negative sample pairs for training. Based on the above dataset, this invention constructs and trains a deep learning model based on a convolutional neural network (CNN) to automatically learn conserved motifs related to antigen binding in CDR3 amino acid sequences. The model takes any CDR3 amino acid sequence as input, processes it through multiple convolutional and pooling layers, and automatically learns and identifies key motifs related to antigen binding in the sequence. Sequences related to specific disease categories (such as viral infections and specific cancers) in the database are used as positive samples, and sequences extracted from large-scale healthy population immune repertoire data are used as negative samples. The system automatically extracts local sequence pattern features and outputs a probability value between 0 and 1, representing the degree of matching between the sequence and a pattern associated with a specific disease category. This output value is defined as the sequence specificity score s. iThe higher the value, the more likely the clonal type is to participate in the immune response against a specific disease. This means the CDR3 sequence has a higher similarity to known disease-related sequence patterns, and the greater the likelihood of functional relevance. In practical applications, for each clonal type i in the immune repertoire of the individual being 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 ImmunScore, serving as one of the important dimensions for measuring the intensity of immune activation, thereby enhancing the biological interpretability and disease identification specificity of the assessment system.

[0247] When the biological sample to be analyzed comes from an individual who has received an organ transplant, the calculated immune strength score is corrected for environmental factors.

[0248] The environmental factor correction is achieved by introducing an immunosuppression correction factor to weight and adjust the baseline immune strength score. The calculation formula is as follows:

[0249]

[0250] Where γ is the correction coefficient, and ImmunosuppressLevel represents a numerical index of the level of immunosuppression. The value of γ ranges from 0 to 1 and is optimized on transplanted samples through regression analysis. For example, γ=0.2 to correct for the downward adjustment of the score due to immunosuppression.

[0251] ImmunScore is used to characterize the activity of a biological system’s specific immune response under a corresponding functional category. ImmunScores from multiple categories constitute a multidimensional immune state strength 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.

[0252] In the process of modeling actual biological systems, the external physiological or interventional environment in which an individual exists may have a significant impact on the structure of the immune repertoire, thereby interfering with the cross-sample consistency of immune status representation. To improve the adaptability of the model in complex clinical contexts and the comparability of output indicators, this invention provides a mechanism for quantifying environmental factors, used for structured modeling and numerical expression of known confounding factors.

[0253] When an individual being analyzed is in an environment of immunomodulatory intervention (e.g., long-term use of immunosuppressants after organ transplantation), the system introduces a comprehensive numerical index—ImmunosuppressLevel—to characterize the overall intensity of the immunosuppressive environment in which the individual is located. This index is not a single measurement value, but a standardized score obtained by fusing and calculating multi-dimensional clinical information, with an optimal range of 0 to 10. A higher value indicates a stronger degree of immunosuppression.

[0254] The ImmunosuppressLevel can be constructed in various ways, including but not limited to linear weighted models, lookup table methods, or nonlinear mapping functions based on machine learning. In a preferred embodiment, the following linear combination formula is used:

[0255]

[0256] in, , and The preset weighting coefficients are each in the range of 0-1 and satisfy the following conditions: + + =1, and its value can be determined in the training queue through regression analysis, expert experience, or cross-validation. The definitions of each sub-score are as follows:

[0257] The Scoredrug score assesses the patient's current immunosuppressant type, dosage, and blood concentration. Different drug combinations are assigned scores based on their varying pharmacological effects.

[0258] High-potency regimens (such as high-concentration tacrolimus + mycophenolate mofetil + glucocorticoids): 8–10 points;

[0259] Standard triple therapy (e.g., standard tacrolimus concentration + mycophenolate mofetil): 6–8 points;

[0260] Reduced-dose regimens (such as low-dose cyclosporine or sirolimus, single or dual therapy): 3–5 points;

[0261] Minimal maintenance regimen (e.g., low-dose monotherapy): 1–2 points.

[0262] Biological indicator score, i.e., Score bio Based on the absolute count of lymphocyte subsets in peripheral blood, especially 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 an exemplary implementation, the following standardized formula is used:

[0263]

[0264] ALC patient The absolute lymphocyte count of the patient was measured. This is the lower limit of the normal value for healthy individuals (1.0 × 10⁻⁶ in this implementation). 9 / L). When a patient's count is below the normal range, the score increases, reflecting an increased degree of suppression of the immune system.

[0265] The Scoreclinic is a qualitative and quantitative assessment based on a patient's clinical background information, such as the post-transplant stage, whether they have experienced an acute rejection event, and whether they have recently received intensive treatment. Examples of scores include:

[0266] Within 1 year post-transplantation: 7–10 points;

[0267] Recent rejection and treatment: 8–10 points;

[0268] Transplanted patients with stable immunity for many years: 2–5 points.

[0269] The ImmunosuppressLevel index can be automatically calculated and generated from input data extracted from electronic health records (EHRs), laboratory information systems, or clinical databases. Its output serves as an environmental covariate, used for subsequent adaptive correction of the ImmunScore to compensate for the systematic perturbation of the immune repertoire structure by external interventions, thereby improving the comparability of immune activity indicators among individuals under different physiological states and the stability of the model output.

[0270] Routine monitoring was conducted on a subject receiving long-term immunosuppressive therapy after organ transplantation. During several years of continuous monitoring, all tumor risk indicators were initially low. In one monitoring session, a persistent and significant increase in the risk score of the renal cell carcinoma decoder was observed (e.g., from 0.15 to 0.68). This early warning signal triggered intensive monitoring and imaging examinations, leading to the detection of transplant-related malignancies at a very early stage. This embodiment demonstrates the important application of the present invention in early tumor monitoring in a special immunosuppressed population. The training process of the deep learning model includes: constructing an immune repertoire dataset containing clinically diagnosed individuals and healthy controls, 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 model parameters; using the validation subset to monitor model performance during training and adjusting hyperparameters based on the monitoring results to prevent overfitting; and using the test subset to independently assess the model's generalization ability after model training and hyperparameter tuning.

[0271] To verify the effectiveness and generalization ability of the sequence data analysis method described in this invention, a large-scale, high-quality immune repertoire dataset was constructed during the model development phase. This dataset was provided by multiple collaborating medical institutions and covers individuals with various clinically diagnosed disease states, including patients with various cancers, autoimmune diseases, and infectious diseases, while also including healthy individuals as controls. All samples were derived from peripheral blood, and high-throughput sequencing was used to obtain immune repertoire data for B-cell receptors (BCR) and / or T-cell receptors (TCR).

[0272] Each sample is accompanied by a clear, clinically relevant label associated with the biological system state, used to support the training and evaluation of supervised multi-task deep learning models. To ensure the objectivity and reliability of model performance evaluation, the entire dataset was strictly divided into three non-overlapping subsets.

[0273] Training set (70% of total samples): Used to learn the trainable parameters of the model, such as network weights and biases. Through a large number of samples, the model learns how to map input data (immune repertoire sequencing data) to the correct output labels (biological system states). This process is achieved by optimizing the loss function. Validation set (15% of total samples): Used in real-time to monitor performance during model training, guiding the adjustment of hyperparameters (such as the number of network layers, adversarial loss weights λ, etc.), preventing overfitting through strategies such as early stopping, and determining when to stop training based on the performance of the validation set. Test set (15% of total samples): Used for an independent and unbiased final evaluation of the model's generalization ability after model training and hyperparameter tuning are complete.

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

[0275] The analysis method also includes dynamic monitoring, which analyzes the trend of change of the ImmunScore of the examinee at different time points by longitudinal comparison, that is, calculating the time change rate of the immune strength score (ΔScore / Δt). When the change rate exceeds the preset clinical warning threshold, it can provide an early warning for disease progression, treatment response or relapse.

[0276] This application also includes multi-disease risk assessment and report generation, including risk stratification: based on the calculated ImmunScore, the subject's disease risk is divided into low, medium, and high levels, generating a personalized multi-disease risk assessment report, 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 those who have undergone kidney transplantation, an immunosuppression level correction factor is introduced to adjust the baseline risk score to better reflect the physiological characteristics of this population.

[0277] The sequence data analysis method and device provided by this invention have significant advantages such as ultra-high sensitivity, simultaneous detection of multiple diseases, quantitative assessment, non-invasiveness and convenience, and applicability to special populations. Through ultra-sensitive signal amplification technology, it can detect very early-stage tumors (tumor cell count <10). 4 This test 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 in a single test, improving screening efficiency; it is the first to achieve precise quantification of immune response intensity, which can be used for efficacy monitoring, recurrence early warning, and prognostic assessment; it requires only 5-10 mL of peripheral blood, and results are available in 2-3 days, making it suitable for large-scale non-invasive screening; at the same time, the algorithm has been optimized for immunosuppressed populations such as kidney transplant recipients, filling related technological gaps and having broad application prospects and clinical value.

[0278] In addition, embodiments of this disclosure also provide a computer-readable storage medium having a computer program stored thereon, the program including instructions that, when executed by one or more processors of a computing device, perform the steps of the aforementioned analysis method.

[0279] The aforementioned programs (also known as software, software applications, or code) include the machine instructions of a programmable processor and can be implemented using object-oriented programming languages, assembly language, or machine language.

[0280] With the development of time and technology, the meaning of "medium" has become increasingly broad. The dissemination of computer programs is no longer limited to tangible media; they can also be downloaded directly from the network. Any combination of one or more computer-readable storage media can be used. Computer-readable storage media can be, but is not limited to, electrical, magnetic, optical, electromagnetic, infrared, or semiconductor systems, devices, or any combination thereof. More specific examples of computer-readable storage media (a non-exhaustive list) 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 thereof. In this document, a computer-readable storage medium can be any tangible medium that contains or stores a program that can be used by or in conjunction with an instruction execution system, device, or apparatus.

[0281] The technical solutions provided in this disclosure have been described in detail above. Specific examples have been used to illustrate the principles and implementation methods of this disclosure. The descriptions of the embodiments above are only for the purpose of helping to understand the methods and core ideas of this disclosure. Furthermore, those skilled in the art will recognize that, based on the ideas of this disclosure, there will be changes in the specific implementation methods and application scope. Therefore, the content of this specification should not be construed as a limitation of this disclosure.

[0282] The above description is merely a preferred embodiment of this disclosure and is not intended to limit this disclosure. Any modifications or equivalent substitutions made within the spirit and principles of this disclosure should be included within the scope of protection of this disclosure.

Claims

1. A sequence data analysis method for state modeling of biological systems, characterized in that, Includes the following steps: Step 1: Obtain high-throughput sequencing data of the immune repertoire of B cell receptor or T cell receptor in biological samples. The sequencing data includes sequencing reads, total sequencing reads of all clones in the sample, CDR3 amino acid sequence of each clone, annotation results of V gene fragment and annotation results of J gene fragment. Step 2: Perform immune signal amplification processing on the high-throughput sequencing data of the immune repertoire. The immune signal amplification processing includes nonlinear gain correction and combined preference feature extraction. The corrected parameters and combined preference features are fused to construct structured feature nodes. Step 3: Encode all feature nodes using a deep learning model, and generate a system state vector H representing the overall state of the biological system through a weighted average pooling operation. shared ; Step 4: Introduce a feature decoupling mechanism into the deep learning model. Through adversarial training, suppress the discriminability between the system state vector and the preset functional category, and reduce the interference between different signals. The deep learning model adopts a Transformer-based multi-task learning framework. Step 5: Based on the system state vector H shared Calculate the ImmunScore for each functional category to quantify the activity of the immune response; In step 2, the nonlinear gain correction involves enhancing the original frequency of the clone to suppress high-abundance background and increase the representation weight of low-abundance clones. The calculation formula is as follows: , in, The corrected frequency of clone i. The original frequency of clone i, which is based on the sequencing reads of clone i. Total sequencing reads of all clones in the sample The relative abundance is calculated by the ratio; This is the gain coefficient, with a value ranging from 0.1 to 0.5; The combination preference feature extraction is based on the annotation results of genes V and J, and the combination frequency of each VJ gene pair is counted. The formula for calculating the preference score is as follows: ,in, The observed frequency of VJ gene pairs. The desired frequency of the VJ gene pair; Based on the corrected frequency of clone i, rare clones with frequencies below a preset threshold are weighted and enriched. The enrichment weights for clone i; Enrichment weights The calculation formula is: ; The corrected frequency of clone i; The attenuation parameter ranges from 100 to 500; the threshold is a preset frequency threshold, ranging from 0.001% to 0.01%. This is an indicator function that takes the value 1 when the condition is true and 0 otherwise. The process of fusing the corrected parameters and combined preference features to construct structured feature nodes is as follows: For each clone i in the immune repertoire, construct a fusion feature vector. fusion of feature vectors The frequency of the CDR3 amino acid sequence containing clone i after nonlinear gain correction. The weights obtained by weighted enrichment of rare clones The preference score of the VJ gene pair used in this clone ; All cloned fusion feature vectors Let X be an N×512 input matrix, where N is the total number of clones detected in the samples, and each row xi represents the fused feature vector of the i-th clone. ; The fusion process includes: Step S1 The key information for each independent clone is organized into a structured data record unit to achieve alignment and encapsulation of sequence information and various enhancement signals. The structured data record includes CDR3. Sequence , , and ; Step S2 By using sequence embedding and feature concatenation, various features in structured records are transformed into a unified vector representation, and multimodal fusion is performed. The sequence embedding is transformed into a fixed-dimensional vector using an embedding matrix. , Embedding() indicates the embedding operation; The sequence embedding vector and the enhanced signal are concatenated to form the initial fusion vector. , ; concat(.) represents the vector concatenation operation; Step S3 The concatenated initial fusion vector is mapped to a unified dimension that meets the fixed input dimension requirements of the deep learning model. This dimension mapping is performed through a learnable linear transformation layer. ; Linear() represents the operation of weighted summation and dimension transformation; In step 5, a quantitative assessment system for immune signal intensity is established. Based on the functional correlation vector after feature decoupling, an immune intensity score (ImmunScore) is calculated for each preset functional category. The formula for calculating the immune intensity score (ImmunScore) is as follows: , Where D is the clonal diversity index, calculated using the following formula: N is the total number of clones detected in the sample; E is the clonal expansion index, calculated using the following formula: , A represents the intensity of immune activation, calculated using the following formula: , For the enrichment weights of clone i, For clone i, the corrected frequency is s. i To score sequence specificity, The disease-specific score is given by the deep learning decoder in the deep learning model; α1, α2, α3, and α4 are preset weighting coefficients.

2. The sequence data analysis method for biological system state modeling according to claim 1, characterized in that, The deep learning model employs a multi-task learning framework, which includes: A shared encoder contextually encodes multiple clonal features and generates a shared feature vector characterizing 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 includes a multi-head self-attention sub-layer and a feedforward network sub-layer connected in sequence, and each sub-layer is followed by a residual connection and a layer normalization structure; The multi-head self-attention sublayer contains eight parallel attention heads, which are used to establish global dependencies between different positions of the CDR3 sequence and to model the correlation between local amino acid patterns, long-range structural dependencies, functional motif recognition, and amino acid physicochemical properties in parallel through a multi-head mechanism. The feedforward network sublayer is set after the multi-head self-attention sublayer and includes a dimension-up linear transformation layer, a non-linear activation layer, and a dimension-down linear transformation layer, which are used to perform non-linear transformation and feature dimension up / down operations on the intermediate representation vector at each position. In each sub-layer, the output of the corresponding sub-layer is added to its input vector to achieve a residual connection, and then processed by layer normalization: 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 stacked 6 times in a loop to form the shared encoder, in order to maintain training stability and mitigate gradient vanishing. The multi-task learning framework further includes a domain discriminator module, which is applied in the adversarial training. The domain discriminator module shares the system state vector H output by the encoder. shared As input, the domain discriminator module's task is to analyze the system state vector H. shared The data domain category is classified and identified. The data domain category corresponds to multiple preset functional association categories, and each functional association category represents a specific type of biological system perturbation pattern.

3. The sequence data analysis method for biological system state modeling according to claim 2, characterized in that, The processing procedure for each Transformer block includes the following steps: (a) Generate the query matrix Q, the key matrix K, and the value matrix V through linear transformation; (b) Divide 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 vector; (c) Concatenate the weighted vectors output by each attention head according to the feature dimension, 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 then perform layer normalization to obtain the intermediate result; (e) Input the intermediate results into the feedforward neural network, which includes a linear layer that increases the dimension to 2048, a ReLU activation function, and a linear layer that reduces the dimension back to 512; (f) Add the output of the feedforward network to the intermediate results and then perform layer normalization again to obtain the output of the corresponding layer. After six layers of stacking processing, the final output clone vectors are weighted and averaged according to their corrected frequencies to obtain the system state vector H representing the state of the entire biological system. shared .

4. The sequence data analysis method for biological system state modeling according to claim 3, characterized in that, The specific decoder consists of multiple decoders with identical structures, each used to process the system state vector H output by the shared encoder. shared Conduct a mission-related risk assessment; The decoder includes at least two fully connected hidden layers for processing the input system state vector H. shared Multi-level nonlinear transformations are performed to extract specific features related to the current task step by step, and key signals are focused by reducing the feature dimension. A single-neuron output layer is used to map the low-dimensional features of the final hidden layer output to an unconstrained raw output value; The decoder further includes an activation processing unit configured to apply a non-linear activation function in each hidden layer and a Sigmoid activation function after the output layer, converting 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 label data of their respective tasks to achieve comprehensive assessment of multi-class immune risks.

5. The sequence data analysis method for biological system state modeling according to claim 4, characterized in that, Introducing an adversarial training-based feature decoupling mechanism into deep learning models, by suppressing the system state vector H... shared The ability to distinguish between preset functional categories reduces interference of immune signals between multiple tasks, and improves the universality and robustness of shared characterization.

6. The sequence data analysis method for state modeling of biological systems according to claim 5, 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 model's parameters; using the validation subset to monitor the model's performance during training and adjusting hyperparameters based on the monitoring results to prevent overfitting; and using the test subset to independently assess the model's generalization ability after model training and hyperparameter tuning are completed.

7. A sequence data analysis apparatus for performing the method according to any one of claims 1 to 6, characterized in that, include: The data acquisition module is configured to acquire high-throughput sequencing data of the immune repertoire of B cell receptors or T cell receptors in biological samples. The sequencing data includes sequencing reads, total sequencing reads, CDR3 amino acid sequences, and annotation results of V and J gene fragments. The signal enhancement processing module is configured to perform immune signal amplification processing on the sequencing data, including nonlinear gain correction, combined preference feature extraction and rare clonal weighted enrichment, and to fuse the correction parameters with the preference features to construct structured feature nodes; The shared encoding module is 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 ; The feature decoupling module is configured to introduce an adversarial training mechanism to suppress the distinguishability between the system state vector and the preset functional category, so as to reduce the interference of immune signals between multiple tasks. The multi-task decoding module is configured to perform risk assessments related to multiple tasks in parallel based on the system state vector, and output confidence scores 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 distribution characteristics, which is used to quantify the level of immune response activity.

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

Citation Information

Patent Citations

  • Transform-based unified information extraction method

    CN120407707A

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

    WO2025175065A1