Endometrial biological age assessment method, device and equipment and storage medium
By constructing an age assessment model with a multi-head attention mechanism, we can quantitatively assess the biological age of the endometrium, solve the problem of assessing the physiological status of the endometrium in artificial assisted reproduction, and improve the success rate and treatment effect of embryo transplantation.
Patent Information
- Application Number
- CN202410592716.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-05-14
- Publication Date
- 2024-08-23
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
Existing technology cannot effectively quantitatively evaluate the physiological state of the endometrium of subjects, leading to problems such as reduced embryo transfer success rates and repeated implantation failures in artificial assisted reproduction.
By obtaining the RNA transcriptome information of the endometrium and matching the preset gene data, an age assessment model of the multi-head attention mechanism is constructed, the biological age assessment value of the endometrium is calculated, and the physiological state of the endometrium is quantitatively evaluated.
It achieves quantitative assessment of the physiological state of the endometrium, helps solve the technical problems of artificial assisted reproduction and treatment of repeated implantation failure, and improves prediction accuracy and auxiliary treatment effects.
Smart Images

Figure CN118538286A
Abstract
Description
Technical Field
[0001] The present invention relates to the field of medical care information, and in particular to a method, device, equipment and storage medium for assessing the biological age of endometrium. Background Art
[0002] With the aging of my country's population, the age of women of childbearing age is gradually increasing. The average childbearing age has exceeded 30 years old and is showing an increasing trend. In the clinical practice of artificial assisted reproductive technology, it is found that the fertility of women in adulthood will gradually decline with age, which directly affects the success rate of embryo transplantation. After excluding embryo factors, the success rate of embryo implantation shows a significant downward trend after the subjects are 35 years old, and some subjects will also experience recurrent implantation failure (RIF).
[0003] Among them, recurrent implantation failure (RIF) usually refers to the failure of women under 40 years old to achieve clinical pregnancy after transplanting at least four high-quality embryos in at least three fresh or frozen cycles. Clinically, maternal endocrine abnormalities, blood hypercoagulability, some known immune factors, uterine malformations, uterine fibroids and intrauterine adhesions are all direct factors leading to RIF, but a large proportion of patients still cannot have a normal pregnancy after excluding the above factors. Therefore, correctly evaluating the biological age of the subject's endometrium is of great significance for evaluating the causes of recurrent implantation failure. Summary of the invention
[0004] The main purpose of the present invention is to solve the technical problem in the prior art that the physiological state of the endometrium of a subject cannot be quantitatively evaluated.
[0005] The first aspect of the present invention provides a method for assessing the biological age of the endometrium, comprising:
[0006] In response to a biological age assessment request, obtaining RNA transcriptome information of an endometrial sample to be assessed;
[0007] Matching the RNA transcriptome information with the gene information contained in a preset gene data set to obtain a feature matrix of gene expression;
[0008] The feature matrix is input into an age assessment model constructed based on a multi-head attention mechanism for calculation to obtain a biological age assessment value of the endometrium.
[0009] Optionally, in a first implementation of the first aspect of the present invention, matching the RNA transcriptome information with gene information contained in a preset gene data set to obtain a feature matrix of gene expression includes:
[0010] Obtaining gene probes corresponding to standard gene information contained in a preset gene data set;
[0011] The expression information of each standard gene in the RNA transcriptome is screened out according to the gene probe matching, and a feature matrix is generated based on the expression information of the standard genes whose expression amounts are not 0.
[0012] Optionally, in a second implementation of the first aspect of the present invention, the age assessment model includes a multi-head attention structure, a fully connected layer and an output layer;
[0013] The feature matrix is input into the age assessment model constructed based on the multi-head attention mechanism for calculation, and the biological age assessment value of the endometrium is obtained, which includes:
[0014] Obtain a weight matrix in the age assessment model, input the weight matrix and the feature matrix into a multi-head attention structure head, perform calculations based on the attention mechanism of each attention head, and obtain output results of each attention head;
[0015] The output results of each attention head are input into multiple fully connected layers for splicing to obtain the output of the fully connected layer, wherein the multiple fully connected layers are connected via residual connections;
[0016] The output result of the fully connected layer is input into the output layer, and the age assessment value is obtained by mapping according to a preset mapping rule.
[0017] Optionally, in a third implementation of the first aspect of the present invention, the age assessment model is pre-optimized and trained; before the step of obtaining RNA transcriptome information of the endometrial sample to be assessed in response to the biological age assessment request, further comprising:
[0018] Acquire a sample data set required for optimization training and preprocess the information in the sample data set, wherein the sample data set includes RNA transcriptome information samples of endometrial samples of sample personnel of various ages;
[0019] Matching the information contained in the preprocessed RNA transcriptome information sample with the gene information contained in a preset gene data set to generate a sample feature matrix of the training sample;
[0020] Input the sample feature matrix into the initial evaluation model constructed based on the multi-head attention mechanism for calculation to obtain an initial prediction value;
[0021] The loss is calculated based on the initial prediction value and the actual age corresponding to the RNA transcriptome information sample, and the obtained loss value is gradient-backed to optimize the parameters of the initial evaluation model to obtain an optimized and trained age evaluation model.
[0022] Optionally, in a fourth implementation of the first aspect of the present invention, the parameters of the optimized initial evaluation model include:
[0023] The normalization scale and offset parameters during preprocessing, the weight matrix in the attention mechanism, and the weight parameters and bias parameters of the fully connected layer.
[0024] Optionally, in a fifth implementation of the first aspect of the present invention, the optimizing the parameters of the initial evaluation model includes:
[0025] Calling the Adam optimizer to maintain a separate learning rate for the parameters of the initial evaluation model, and gradually reducing the learning rate in combination with the cosine annealing learning rate dynamic algorithm;
[0026] Optimizing the parameters of the initial evaluation model based on the learning rate optimization parameters.
[0027] Optionally, in a sixth implementation of the first aspect of the present invention, after obtaining the optimized and trained age assessment model, the method further includes:
[0028] Calculating the prediction accuracy of the age assessment model based on a number of rating indicators, and evaluating the prediction ability of the age assessment model according to the prediction accuracy;
[0029] When the predictive ability of the age assessment model reaches a preset standard, the model optimization training is completed.
[0030] A second aspect of the present invention provides an endometrial biological age assessment device, comprising:
[0031] An acquisition module, for acquiring RNA transcriptome information of an endometrial sample to be evaluated in response to a biological age evaluation request;
[0032] A matching module, used to match the RNA transcriptome information with the gene information contained in a preset gene data set to obtain a feature matrix of gene expression;
[0033] An evaluation module is used to input the feature matrix into an age evaluation model constructed based on a multi-head attention mechanism for calculation, so as to obtain a biological age evaluation value of the endometrium.
[0034] The third aspect of the present invention provides an endometrial biological age assessment device, comprising: a memory and at least one processor, wherein the memory stores instructions; the at least one processor calls the instructions in the memory so that the endometrial biological age assessment device performs the steps of the above-mentioned endometrial biological age assessment method.
[0035] A fourth aspect of the present invention provides a computer-readable storage medium, wherein the computer-readable storage medium stores instructions, which, when executed on a computer, enable the computer to execute the steps of the above-mentioned method for assessing the biological age of the endometrium.
[0036] In the technical solution provided by the present invention, in response to a biological age assessment request, the RNA transcriptome information of the endometrial sample to be assessed is obtained; the RNA transcriptome information is matched with the gene information contained in the preset gene data set to obtain a feature matrix of gene expression; the feature matrix is input into an age assessment model constructed based on a multi-head attention mechanism for calculation to obtain a biological age assessment value of the endometrium. This method can quantitatively assess the physiological state of the subject's endometrium, thereby providing effective technical assistance in the fields of artificial assisted reproduction and treatment of repeated implantation failure. BRIEF DESCRIPTION OF THE DRAWINGS
[0037] The drawings described herein are used to provide a further understanding of the present application and constitute a part of the present application. The illustrative embodiments of the present application and their descriptions are used to explain the present application and do not constitute an improper limitation on the present application. In the drawings:
[0038] Figure 1 It is a flow chart of a first embodiment of a method for assessing biological age of endometrium according to an embodiment of the present invention;
[0039] Figure 2 This is a flow chart of a second embodiment of the method for assessing biological age of endometrium according to an embodiment of the present invention;
[0040] Figure 3 A schematic diagram of the structure and optimization training process of an age assessment model in the endometrial biological age assessment method according to an embodiment of the present invention;
[0041] Figure 4 This is an example of a residual scatter plot of the endometrial biological age and the actual age of the sample during an actual training process of the endometrial biological age assessment method in an embodiment of the present invention;
[0042] Figure 5 This is an example of a mixed matrix diagram of the biological age of the endometrium and the actual age of the sample in an actual training process of the method for assessing the biological age of the endometrium in an embodiment of the present invention;
[0043] Figure 6 This is an example of a two-dimensional sample space embedding graph in an actual training process of the endometrial biological age assessment method in an embodiment of the present invention;
[0044] Figure 7 A schematic diagram of an embodiment of a method for assessing biological age of endometrium according to an embodiment of the present invention;
[0045] Figure 8 It is a schematic diagram of another embodiment of the endometrial biological age assessment device in an embodiment of the present invention;
[0046] Fig. 9 It is a schematic diagram of an embodiment of a device for assessing biological age of endometrium in an embodiment of the present invention;
[0047] Fig.10 The figure is a schematic diagram of a computer-readable medium in an embodiment of the present invention. DETAILED DESCRIPTION
[0048] Exemplary embodiments of the present invention will now be described more fully with reference to the accompanying drawings. However, exemplary embodiments can be implemented in a variety of forms, and should not be construed as limiting the present invention to the embodiments set forth herein. On the contrary, providing these exemplary embodiments enables the present invention to be more comprehensive and complete, and is more convenient for fully conveying the inventive concept to those skilled in the art. The same reference numerals in the figures represent the same or similar elements, components or parts, and thus their repeated description will be omitted.
[0049] Under the premise of being consistent with the technical concept of the present invention, the features, structures, characteristics or other details described in a specific embodiment do not exclude that they can be combined in one or more other embodiments in a suitable manner.
[0050] In the description of specific embodiments, the features, structures, characteristics or other details described in the present invention are intended to enable those skilled in the art to fully understand the embodiments. However, it does not exclude that those skilled in the art can practice the technical solutions of the present invention without one or more of the specific features, structures, characteristics or other details.
[0051] The flowcharts shown in the accompanying drawings are only exemplary and do not necessarily include all the contents and operations / steps, nor must they be executed in the order described. For example, some operations / steps can be decomposed, and some operations / steps can be combined or partially combined, so the actual execution order may change according to actual conditions.
[0052] The block diagrams shown in the accompanying drawings are merely functional entities and do not necessarily correspond to physically independent entities. That is, these functional entities may be implemented in software form, or in one or more hardware modules or integrated circuits, or in different networks and / or processor devices and / or microcontroller devices.
[0053] The term "and / or" or "and / or" includes all combinations of any one or more of the associated listed items.
[0054] See also Figure 1 The first embodiment of the method for assessing the biological age of the endometrium in the embodiment of the present invention comprises:
[0055] S101, in response to a biological age assessment request, obtaining RNA transcriptome information of an endometrial sample to be assessed;
[0056] It is understandable that the execution subject of the present invention may be an endometrial biological age assessment method device, or a terminal or a server, which is not limited here. The embodiment of the present invention is described by taking a server as the execution subject as an example.
[0057] After receiving the biological age assessment request, the server parses the biological age assessment request and obtains the RNA transcriptome information of the endometrial sample to be evaluated, wherein the RNA transcriptome information of the endometrial sample to be evaluated includes the expression level information of the genes corresponding to various gene IDs in the RNA transcriptome of the sample.
[0058] S102, matching the RNA transcriptome information with the gene information contained in the preset gene data set to obtain a feature matrix of gene expression;
[0059] Obtain gene probes corresponding to the standard gene information contained in a preset gene data set, screen and match various gene IDs in the RNA transcriptome in the sample and the IDs of the standard genes contained in the preset gene data set according to the gene probes, screen out the expression information corresponding to each standard gene in the RNA transcriptome, and generate a feature matrix based on the expression information of the standard genes whose expression levels are not 0.
[0060] S103. Input the feature matrix into an age assessment model constructed based on a multi-head attention mechanism for calculation to obtain a biological age assessment value of the endometrium.
[0061] The weight matrix in the age assessment model is obtained, and the weight matrix and the feature matrix are input into the multi-head attention structure head, and the output result of each attention head is obtained based on the attention mechanism of each attention head. When each attention head performs the self-attention mechanism operation, its model parameters are the optimal parameters obtained after pre-training.
[0062] The output results of each attention head are input into multiple fully connected layers for splicing to obtain the output of the fully connected layer, wherein the multiple fully connected layers are connected via residual connections; the output results of the fully connected layer are input into the output layer, and the age assessment value is obtained by mapping according to a preset mapping rule; wherein, when the data is calculated through the fully connected layer and the output layer, the parameters in each layer are the optimal parameters obtained after pre-training.
[0063] The embodiments of the present invention can quantitatively evaluate the physiological state of the endometrium of a subject, thereby providing effective technical assistance in the fields of artificial assisted reproduction and treatment of repeated implantation failure.
[0064] Please see Figure 2-6 The second embodiment of the method for assessing biological age of endometrium in the embodiment of the present invention comprises:
[0065] S201, obtaining a sample data set required for optimization training and preprocessing information in the sample data set;
[0066] In this embodiment, before performing specific age assessment, an age assessment model is first constructed and optimized and trained. After the assessment accuracy of the optimized and trained age assessment model reaches a preset standard, the trained age assessment model can be used to perform endometrial biological age assessment prediction. Figure 3 , Figure 3 A schematic diagram showing the structure of a specific age assessment model and an optimized training process.
[0067] First, the original sample data is obtained, wherein the original data may be multiple donor samples and n genes, these data are combined into a sample data set, and the information in the data set is preprocessed, wherein the preprocessing step may include cleaning the data and removing bad values, and may also include normalizing the gene expression amount and removing duplicate genes; specifically, the sample data set includes RNA transcriptome information samples of a total of L donor samples of various ages.
[0068] S202, matching the information contained in the preprocessed RNA transcriptome information sample with the gene information contained in the preset gene data set to generate a sample feature matrix of the training sample;
[0069] The probe or gene ID in the data set is converted to a standard ID. When multiple probes or IDs match a single standard ID, the probe with the largest average value of the entire sample is sorted and selected for retention; the probes that do not match the standard ID and the probes with expression values of all 0 are deleted, and the expression values of n genes in each sample are constructed into a feature matrix with 1 column and n rows to obtain the feature matrix X, where Among them, the feature matrix X represents the input of the entire genome, x i Represents the expression level of gene i in the genome (i=1, 2, 3, ..., n).
[0070] S203, inputting the sample feature matrix into the initial evaluation model constructed based on the multi-head attention mechanism for calculation to obtain an initial prediction value;
[0071] In this embodiment, the age assessment model is obtained through optimization training based on the initial assessment model. Before training, the initial assessment model is constructed based on a multi-layer attention mechanism, wherein multiple attention heads are constructed for each layer of the attention mechanism; and the initial assessment model also includes a fully connected layer and an output layer connected by residual connections.
[0072] The feature matrix X of each sample is input into the initial evaluation model in batches. First, based on the multi-layer attention mechanism and the initial weight matrix W, the gene expression query matrix Q, the gene expression key matrix K and the gene expression value matrix V are calculated in each layer, where the weight matrix W includes the gene expression query parameter weights W q , gene expression key parameter weight W k and gene expression value parameter weight W v ; In this step, the gene expression query matrix Q is used to compare with each gene key (Key) to determine the degree of attention to each gene expression value (Value), the gene expression key matrix K is matched with the gene expression query (Query) and is used to generate the weight of each gene expression value, and the gene expression value matrix V contains the actual information to be retrieved. Once the degree of match between the gene expression key (Key) and the gene expression query (Query) is determined, these gene expression values can be weighted according to these weights.
[0073] The specific calculation expression is:
[0074] Q=W q X;
[0075] K=W k X;
[0076] V=W v X;
[0077] Among them, the weight matrix W described in this embodiment is initially randomly initialized to a weight matrix of a specified size, which can be constructed through the parameter method of the pytorch library; during the gradient backpropagation step during subsequent model training, it can be updated synchronously with the parameters of other parts of the model.
[0078] In a specific implementation, the attention mechanism uses a scaled dot product mechanism. Denotes the scaling factor, Y denotes the output result, and A′ denotes the attention weight. The specific expression of the scaling dot product mechanism is:
[0079] A′=softmax(A);
[0080] Y = VA';
[0081] In this embodiment, when performing specific calculations, the data will be processed through multiple attention layers, and the gene expression query matrix, gene expression key matrix and gene expression value matrix will be calculated for each layer. The expression for the self-attention calculation of the lth layer can be:
[0082]
[0083]
[0084]
[0085] Among them, Y (l-1) Represents the output of the previous layer. For the first layer, the previous layer is layer 0, Y (0) That is the input feature matrix X; the specific expression for calculating the attention weight and output result of the lth layer is:
[0086]
[0087] Y (l) =A l V (l) ;
[0088] For each layer of attention mechanism, the multi-head attention mechanism captures the semantic relationship between transcriptome and physiological information at multiple levels. The output of each head is calculated by its own attention mechanism. In a specific implementation, its expression is:
[0089]
[0090] Then concatenate the outputs of all heads and obtain the final output of multiple heads through a linear transformation. The expression is:
[0091] MultiHead(Q,K,V)=Concat(Head1 ,…,Head h )W O ;
[0092] Among them, W O represents the parameter matrix, which can be learned in subsequent optimization training steps, d k / h Represents the dimension of each head. The multi-head attention mechanism enables the model to take into account different types of gene interactions and associations when processing gene expression sequences. Each attention head may focus on capturing different features and patterns in the sequence. For example, some heads may focus on capturing key age-related gene expression changes, while other heads may identify genes that interact with these changes. The multi-head attention mechanism can more accurately predict the age of the sample.
[0093] Furthermore, after obtaining the output of the multi-head attention mechanism, it is input into the fully connected layer; when processing gene expression data, the fully connected layer aims to convert the complex features extracted from the multi-head attention mechanism into outputs related to the prediction target (i.e., the predicted age value). mh represents the final output of the multi-layer multi-head attention mechanism, then after being processed by the first fully connected layer, it can be expressed as:
[0094] H 1 =SELU(W 1 ·Y mh +b 1 )
[0095] Among them, H 1 is the output of the fully connected layer, W 1 and b 1 are the weight matrix and bias term of this layer respectively, and SELU is used as an activation function to increase the nonlinear processing capability of the model.
[0096] In order to make the model more stable while increasing its depth, especially when processing long sequences of gene expression data, the initial evaluation model contains multiple fully connected layers, and residual connections are added between the fully connected layers to help information flow more efficiently in the model and avoid the gradient vanishing problem. A fully connected layer with residual connections can be expressed as:
[0097] Y res =H 1 +SELU(W 2 ·H 1 )+b 2 ;
[0098] Among them, Y res represents the output of the fully connected layer after residual connection, W 2 and b 2are the weights and biases of this layer, H 1 It is not only directly added to the output of this layer, but also participates in the nonlinear transformation of this layer.
[0099] After a series of fully connected layers and residual connections, the output of the model can be mapped to the predicted age through an output layer:
[0100] Age predicted =W output ·Y final +b output ;
[0101] Among them, Y final is the output of the last residual connection or fully connected layer, W output and b output are the weights and biases of the output layer, Age predicted is the initial age value predicted by the model.
[0102] S204, performing loss calculation based on the initial prediction value and the actual age corresponding to the RNA transcriptome information sample, and performing gradient backpropagation on the obtained loss value, optimizing the parameters of the initial evaluation model, and obtaining an optimized and trained age evaluation model;
[0103] After obtaining the output and the true age label in the above step, the loss is calculated for the output and the true age label, and the gradient is passed back to optimize the model parameters. The specific parameters to be optimized include the normalization scale and offset parameters during preprocessing, the weight matrix in the attention mechanism, and the weight parameters and bias parameters of the fully connected layer.
[0104] In a preferred embodiment, the Adam (Adaptive Moment Estimation) optimizer is called to maintain a separate learning rate for the parameters of the initial evaluation model, and the learning rate is gradually reduced in combination with the cosine annealing learning rate dynamic algorithm; the parameters of the initial evaluation model are optimized based on the learning rate optimization parameters.
[0105] Among them, the Adam optimizer combines the advantages of the momentum method (Momentum) and the adaptive learning rate (RMSprop). Specifically, the optimizer can maintain a separate learning rate for each parameter, which will be automatically adjusted according to the update history of the parameter. In addition, it uses estimates of the first-order moment (i.e., the mean of the gradient, similar to the momentum method) and the second-order moment (i.e., the unrooted variance of the gradient), which helps to use smooth gradients and make the learning process more stable. Compared with other optimizers that only use stochastic gradient descent (SGD optimizer) or only use adaptive learning rates (RMSprop), the Adam optimizer reduces the burden of parameter adjustment and usually converges faster. The basic idea of cosine annealing is to gradually reduce the learning rate in the form of a cosine function as training progresses. When training deep learning models, adding this strategy usually has the following benefits: (1) Avoid local minima. By using simulated annealing (i.e., high-first-low-later learning rate), cosine annealing helps the algorithm jump out of local minima or saddle points early, thereby potentially finding a better global minimum. (2) The automatic restart mechanism, i.e., resetting the learning rate to a higher value at the end of each cycle and then annealing again, can help the model explore the solution space multiple times throughout the training process, increasing the chance of finding a better global minimum. (3) Improve the generalization ability of the model. By gradually reducing the learning rate during the training process, the model can adjust parameters more carefully in the later stages of training, which helps improve the generalization ability of the model. In tasks that require long-term training and large amounts of data, cosine annealing often requires a shorter training cycle to achieve better test performance. In the application of this model, since the input RNA transcription matrix presents too many types of features (genes) and complex expression patterns, it is very challenging to set the learning rate. After adding the cosine annealing strategy, the impact of the learning rate setting on the model can be reduced, which is of great help to the training efficiency and generalization.
[0106] In a preferred embodiment, after the specific optimization training step, it also includes calculating several rating indicators for supervising model training, supervising the model training through the rating indicators, determining the prediction accuracy of the age assessment model, and evaluating the prediction ability of the age assessment model based on the prediction accuracy; when the prediction ability of the age assessment model reaches the preset standard, the model optimization training is completed.
[0107] Specifically, a variety of evaluation indicators and spatial embedding visualization methods are used to evaluate the predictive ability. In a specific example, the evaluation indicators include: accuracy, F1 score (F1Score), confusion matrix and residual graph, which can be implemented by using sklearn and numpy libraries.
[0108] Among them, accuracy is the most intuitive performance indicator, which indicates the proportion of samples predicted correctly by the model to the total number of samples. Its formula is:
[0109]
[0110] Among them, Accuracy represents accuracy, TP represents true positive examples, TN represents true negative examples, FP represents false positive examples, and FN represents false negative examples.
[0111] In addition to accuracy, you can also calculate the F1 score, which is the harmonic mean of precision and recall. It better reflects the model's capabilities in data imbalance scenarios because it considers both the accuracy and completeness of positive class predictions. The calculation formula is:
[0112]
[0113] The confusion matrix is an N×N matrix, where N is the number of categories, each row represents the actual category, and each column represents the predicted category. It shows the relationship between the actual category and the model predicted category;
[0114] The residual scatter plot can be used to check whether the model is suitable for the data, whether there are any violations of the model assumptions, and whether there are any data points. The horizontal axis usually represents the actual observed value, while the vertical axis represents the difference between the predicted value and the actual value. That is, the color of each point in the residual plot represents the standardized value of the residual, namely the Z-score, which represents the ratio of the standard deviation of the residual to the residual mean. The calculation formula is:
[0115] Residual value=Real value-Predict value;
[0116]
[0117] Among them, Residual value represents the residual, Real value represents the actual value, Predict value represents the predicted value, Average Residual value represents the average residual value, and Standard deviation represents the standard deviation; the Z score can be used to specify the exact position of each observation in the distribution.
[0118] Also, see Figure 4 , Figure 5 and Figure 6 In this embodiment, a visualization image can also be generated based on the above evaluation indicators to evaluate the prediction ability of the model, where Figure 4This is an example of a residual scatter plot of the biological age of the endometrium and the actual age of the sample during actual training. The horizontal axis represents the actual age of each sample, and the vertical axis represents the age value predicted by the model. The color of the scatter points indicates that the darker the color of the Z score point, the greater the deviation; the lighter the color, the smaller the deviation; according to Figure 4 The distribution of the midpoint Z-score points and the angle of the trend line determine the training prediction results of the model. Figure 5 This is an example of a mixed matrix diagram of the biological age of the endometrium and the actual age of the sample during actual training. The matrix shows the difference between the actual age and the predicted age. One row represents the actual category and each column represents the predicted category. The values on the diagonal represent the number of matches between the prediction and the actual age. Figure 5 The values on the mid-diagonal determine the model's training predictions. Figure 6 This is an example of a two-dimensional sample space embedding diagram in an actual training process. In this embodiment, the output of the last layer of the model can be visualized by two-dimensional dimensionality reduction. The horizontal axis and the vertical axis respectively represent the characteristic coordinates of the potential two-dimensional space. It can be seen that the younger the age, the closer to the left side of the potential space, and the older the age, the closer to the right side of the potential space. There are large linear interruptions at 30-32 years old and 36-38 years old, which shows that the gene transcriptome in this age group is highly diverse. Therefore, in these age ranges, the evaluation effect of evaluating biological age based on gene transcriptome provided in this embodiment is more accurate.
[0119] S205, in response to the biological age assessment request, obtaining RNA transcriptome information of the endometrial sample to be assessed;
[0120] S206, obtaining a gene probe corresponding to the standard gene information contained in a preset gene data set;
[0121] S207, screening out the expression information of each standard gene in the RNA transcriptome according to the gene probe, and generating a feature matrix based on the expression information of the standard genes whose expression is not 0;
[0122] After obtaining the optimized and trained age assessment model, the server responds to the biological age assessment request, parses the biological age assessment request, and obtains the RNA transcriptome information of the endometrial sample to be evaluated. And obtains the gene probe corresponding to the standard gene information contained in the preset gene data set, wherein the preset gene data set can be an existing data set. The gene probe corresponding to the standard gene information contained in the preset gene data set and the gene in the RNA transcriptome information of the endometrial sample to be evaluated are matched and screened to obtain the expression information of each standard gene in the RNA transcriptome, and generate a feature matrix according to the expression information of the standard gene whose expression is not 0.
[0123] Among them, when this embodiment makes a prediction, the feature matrix may include the information of a single sample. When the feature matrix is the information of a single sample, a single-column and multi-row matrix can be generated. It may also include the information of multiple samples to be predicted. Multiple samples to be predicted can generate a multi-column and multi-row matrix.
[0124] In addition, in this embodiment, the biological age assessment request may include expression value data of each gene in various endometrial samples to be assessed. After responding to the biological age assessment request, the biological age assessment request may be parsed to directly obtain the expression value data of each gene in the endometrial sample to be assessed, and the expression value data of each gene obtained by parsing may be used to generate a feature matrix.
[0125] Among them, the feature matrix can be expressed as Among them, the feature matrix X represents the input of the entire genome, x i Represents the expression level of gene i in the genome (i=1, 2, 3, ..., n).
[0126] S208, obtaining a weight matrix in the age assessment model, inputting the weight matrix and the feature matrix into the multi-head attention structure head, performing calculations based on the attention mechanism of each attention head, and obtaining output results of each attention head;
[0127] In this embodiment, the age assessment model is obtained by optimizing and training the initial assessment model based on the attention mechanism, and various parameter values are adjusted in the above-mentioned specific optimization training process. In this step, the weight matrix adjusted after the optimization training is obtained, and the gene expression query matrix Q, gene expression key matrix K and gene expression value matrix V of each layer are calculated according to the weight matrix and the feature matrix of the endometrial sample to be evaluated input in the above-mentioned step. The specific calculation expression is:
[0128] Q=W q X;
[0129] K=W k X;
[0130] V=W v X;
[0131] Among them, the gene expression query parameter weight W described in the above formula is q , gene expression key parameter weight W k and gene expression value parameter weight W v These are parameters obtained after training optimization.
[0132] According to the calculation expressions of the above gene expression query matrix Q, gene expression key matrix K and gene expression value matrix V, the data is processed and calculated through multiple attention layers, and the expression of the self-attention calculation of the lth layer can be obtained as follows:
[0133]
[0134]
[0135]
[0136] Among them, Y (-1) Represents the output of the previous layer. For the first layer, the previous layer is layer 0, Y () That is, the input feature matrix X; calculate the attention weight and output result of the lth layer. The specific expression is:
[0137]
[0138] U () = l V () ;
[0139] For each layer of attention mechanism, the multi-head attention mechanism captures the semantic relationship between transcriptome and physiological information at multiple levels. The output of each head is weighted by its own attention mechanism and weights. In a specific implementation, the expression is:
[0140]
[0141] Then concatenate the outputs of all heads and obtain the final output of multiple heads through a linear transformation. The expression is:
[0142]
[0143] Among them, W O represents the parameter matrix, the specific values of which are learned in the above optimization training steps, d k / h Indicates the dimensions of each head.
[0144] S209, input the output results of each attention head into multiple fully connected layers for splicing to obtain the output of the fully connected layer;
[0145] The multiple fully connected layers described in this embodiment are also connected through residual connections; after obtaining the output result of the multi-head attention mechanism, it is input into the fully connected layer; when the fully connected layer processes gene expression data, the purpose is to convert the complex features extracted from the multi-head attention mechanism into outputs related to the prediction target (i.e., the predicted age value).
[0146] Y mh represents the final output of the multi-layer multi-head attention mechanism, then after being processed by the first fully connected layer, it can be expressed as:
[0147] H 1 =SELU(W 1 ·Y mh +b 1 );
[0148] Among them, H 1 is the output of the fully connected layer, W 1 and b 1 are the weight matrix and bias term of this layer respectively, and SELU is used as an activation function to increase the nonlinear processing capability of the model.
[0149] Specifically, a fully connected layer with residual connection can be expressed as:
[0150] Y res =H 1 +SELU(W 2 ·H 1 )+b 2 ;
[0151] Among them, Y res represents the output of the fully connected layer after residual connection, W 2 and b 2 are the weights and biases of this layer, H 1 It is not only directly added to the output of this layer, but also participates in the nonlinear transformation of this layer.
[0152] S210, input the output result of the fully connected layer into the output layer, and map it according to a preset mapping rule to obtain an age assessment value.
[0153] After a series of fully connected layers and residual connections, the output of the model can be mapped to the estimated value of the biological age of the sample through an output layer:
[0154] Age predicted ′=W output ·Y final +b output ;
[0155] Among them, Y final is the output of the last residual connection or fully connected layer, W output and b output are the weights and biases of the output layer, Age predicted ′ is the physiological age estimation value predicted by the model.
[0156] In a preferred embodiment, when obtaining samples to be evaluated, multiple samples to be evaluated in different physiological periods can be selected to form a multi-row and multi-column feature matrix and then input into the optimized trained age evaluation model to evaluate the physiological age, and multiple evaluation values are obtained. After obtaining multiple evaluation values of the biological age of the sample, a visual chart can be generated for the multiple evaluation value results to provide reference and assistance for scholars or doctors.
[0157] The scheme in this embodiment can quantitatively evaluate the physiological state of the subject's endometrium, thereby providing effective technical assistance in the fields of artificial assisted reproduction and treatment of repeated implantation failure. In addition, a multi-layer multi-head attention mechanism is used when making predictions. Due to the complex interactions between genes, the mutual influence of various factors is identified through a multi-layer, multi-head self-attention mechanism. These long-distance dependencies can be directly modeled by calculating the relative importance of each position in the sequence, thereby better capturing and explaining these various biological functions, thereby improving the accuracy and efficiency of the analysis; it can be expanded to data sets of different sizes, and can output more accurate age assessment prediction results under different complexities.
[0158] The above describes the endometrial biological age assessment method in the embodiment of the present invention. The following describes the endometrial biological age assessment device in the embodiment of the present invention. Figure 7 , an embodiment of the endometrial biological age assessment device in the embodiment of the present invention comprises:
[0159] An acquisition module 701 is used to obtain RNA transcriptome information of an endometrial sample to be evaluated in response to a biological age evaluation request;
[0160] A matching module 702 is used to match the RNA transcriptome information with the gene information contained in a preset gene data set to obtain a feature matrix of gene expression;
[0161] The evaluation module 703 is used to input the feature matrix into the age evaluation model constructed based on the multi-head attention mechanism for calculation, so as to obtain the biological age evaluation value of the endometrium.
[0162] The method provided in the embodiment of the present invention can quantitatively evaluate the physiological state of the subject's endometrium, thereby providing effective technical assistance in the fields of artificial assisted reproduction and treatment of recurrent implantation failure.
[0163] Please continue reading Figure 8 In another embodiment of the present application, the matching module 702 includes:
[0164] A matching and screening unit 7021 is used to obtain gene probes corresponding to the standard gene information contained in the preset gene data set, and screen the expression amount information of each standard gene in the RNA transcriptome according to the matching of the gene probes;
[0165] The matrix generating unit 7022 is used to generate a feature matrix based on the expression information of the standard genes whose expression is not zero.
[0166] In another embodiment of the present application, the age assessment model includes a multi-head attention structure, a fully connected layer and an output layer;
[0167] The evaluation module 703 includes:
[0168] The attention operation unit 7031 is used to obtain the weight matrix in the age assessment model, input the weight matrix and the feature matrix into the multi-head attention structure head, perform calculation based on the attention mechanism of each attention head, and obtain the output result of each attention head;
[0169] A result concatenation unit 7032 is used to input the output results of each attention head into multiple fully connected layers for concatenation to obtain the output of the fully connected layer, wherein the multiple fully connected layers are connected via residual connections;
[0170] The result mapping unit 7033 is used to input the output result of the fully connected layer into the output layer, and map it according to a preset mapping rule to obtain an age assessment value.
[0171] In another embodiment of the present application, the age assessment model is pre-optimized and trained, and the endometrial biological age assessment device further includes a model training module 704, and the model training module 704 includes:
[0172] The sample acquisition unit 7041 is used to acquire a sample data set required for optimization training and pre-process the information in the sample data set, wherein the sample data set includes RNA transcriptome information samples of endometrial samples of sample personnel of various ages;
[0173] A matrix generating unit 7042 is used to match the information contained in the pre-processed RNA transcriptome information sample with the gene information contained in the preset gene data set to generate a sample feature matrix of the training sample;
[0174] An initial prediction unit 7043 is used to input the sample feature matrix into an initial evaluation model constructed based on a multi-head attention mechanism for calculation to obtain an initial prediction value;
[0175] The optimization training unit 7044 is used to calculate the loss according to the initial prediction value and the actual age corresponding to the RNA transcriptome information sample, and to perform gradient feedback on the obtained loss value, thereby optimizing the parameters of the initial evaluation model and obtaining an optimized and trained age evaluation model.
[0176] In another embodiment of the present application, the parameters of the optimized initial evaluation model include:
[0177] The normalization scale and offset parameters during preprocessing, the weight matrix in the attention mechanism, and the weight parameters and bias parameters of the fully connected layer.
[0178] In another embodiment of the present application, the optimization training unit 7044 is further specifically used to: call the Adam optimizer to maintain a separate learning rate for the parameters of the initial evaluation model, and gradually reduce the learning rate in combination with the cosine annealing learning rate dynamic algorithm;
[0179] Optimizing the parameters of the initial evaluation model based on the learning rate optimization parameters.
[0180] In another embodiment of the present application, the model training module further includes a prediction capability evaluation unit 7045, and the prediction capability evaluation unit 7045 is specifically used to:
[0181] Calculating the prediction accuracy of the age assessment model based on a number of rating indicators, and evaluating the prediction ability of the age assessment model according to the prediction accuracy;
[0182] When the predictive ability of the age assessment model reaches a preset standard, the model optimization training is completed.
[0183] The scheme in this embodiment can quantitatively evaluate the physiological state of the subject's endometrium, thereby providing effective technical assistance in the fields of artificial assisted reproduction and treatment of repeated implantation failure. In addition, a multi-layer multi-head attention mechanism is used when making predictions. Due to the complex interactions between genes, the mutual influence of various factors is identified through a multi-layer, multi-head self-attention mechanism. These long-distance dependencies can be directly modeled by calculating the relative importance of each position in the sequence, thereby better capturing and explaining these various biological functions, thereby improving the accuracy and efficiency of the analysis; it can be expanded to data sets of different sizes, and can output more accurate age assessment prediction results under different complexities.
[0184] above Figure 7 and Figure 8The endometrial biological age assessment device in the embodiment of the present invention is described in detail from the perspective of modular functional entities. Based on the same inventive concept, the embodiment of this specification also provides an endometrial biological age assessment device. The endometrial biological age assessment device in the embodiment of the present invention is described in detail from the perspective of hardware processing.
[0185] Fig. 9 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this specification. Fig. 9 The electronic device 900 according to this embodiment of the present invention is described. Fig. 9 The electronic device 900 shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present invention.
[0186] like Fig. 9 As shown, the electronic device 900 is in the form of a general computing device. The components of the electronic device 900 may include, but are not limited to: at least one processing unit 910, at least one storage unit 920, a bus 930 connecting different system components (including the storage unit 920 and the processing unit 910), a display unit 940, etc.
[0187] The storage unit stores program codes, which can be executed by the processing unit 910, so that the processing unit 910 performs the steps according to various exemplary embodiments of the present invention described in the above processing method section of this specification. For example, the processing unit 910 can perform the following steps: Figure 1 or Figure 2 Steps shown.
[0188] The storage unit 920 may include a readable medium in the form of a volatile storage unit, such as a random access memory unit (RAM) 9201 and / or a cache memory unit 9202 , and may further include a read-only memory unit (ROM) 9203 .
[0189] The storage unit 920 may also include a program / utility 9204 having a set (at least one) of program modules 9205, such program modules 9205 including but not limited to: an operating system, one or more application programs, other program modules and program data, each of which or some combination may include the implementation of a network environment.
[0190] Bus 930 may represent one or more of several types of bus structures, including a memory unit bus or memory unit controller, a peripheral bus, an accelerated graphics port, a processing unit, or a local bus using any of a variety of bus architectures.
[0191] The electronic device 900 may also communicate with one or more external devices 100 (e.g., keyboards, pointing devices, Bluetooth devices, etc.), one or more devices that enable a user to interact with the electronic device 900, and / or any device that enables the electronic device 900 to communicate with one or more other computing devices (e.g., routers, modems, etc.). Such communication may be performed through an input / output (I / O) interface 950. Furthermore, the electronic device 900 may also communicate with one or more networks (e.g., a local area network (LAN), a wide area network (WAN), and / or a public network, such as the Internet) through a network adapter 960. The network adapter 960 may communicate with other modules of the electronic device 900 through the bus 930. It should be understood that although Fig. 9 Not shown, other hardware and / or software modules may be used in conjunction with electronic device 900, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data backup storage systems.
[0192] Through the description of the above implementation methods, it is easy for those skilled in the art to understand that the exemplary embodiments described in the present invention can be implemented by software, or by software combined with necessary hardware. Therefore, the technical solution according to the implementation method of the present invention can be embodied in the form of a software product, which can be stored in a computer-readable storage medium (which can be a CD-ROM, USB flash drive, mobile hard disk, etc.) or on a network, including a number of instructions to enable a computing device (which can be a personal computer, server, or network device, etc.) to execute the above method according to the present invention. When the computer program is executed by a data processing device, the computer-readable medium can implement the above method of the present invention, that is: Figure 1 or Figure 2 The method shown.
[0193] Fig.10 A schematic diagram of a computer-readable medium provided for an embodiment of this specification.
[0194] accomplish Figure 1 or Figure 2The computer program of the method shown can be stored on one or more computer readable media. The computer readable medium can be a readable signal medium or a readable storage medium. The readable storage medium can be, for example, but not limited to, a system, device or device of electricity, magnetism, light, electromagnetic, infrared, or semiconductor, or any combination of the above. More specific examples (non-exhaustive list) of readable storage media include: an electrical connection with one or more wires, a portable disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above.
[0195] The computer readable storage medium may include a data signal propagated in a baseband or as part of a carrier wave, wherein a readable program code is carried. This propagated data signal may take a variety of forms, including but not limited to an electromagnetic signal, an optical signal, or any suitable combination of the above. The readable storage medium may also be any readable medium other than a readable storage medium, which may send, propagate, or transmit a program for use by an instruction execution system, an apparatus, or a device or used in combination with it. The program code contained on the readable storage medium may be transmitted with any appropriate medium, including but not limited to wireless, wired, optical cable, RF, etc., or any suitable combination of the above.
[0196] Program code for performing the operations of the present invention may be written in any combination of one or more programming languages, including object-oriented programming languages such as Java, C++, etc., and conventional procedural programming languages such as "C" or similar programming languages. The program code may be executed entirely on the user computing device, partially on the user device, as a separate software package, partially on the user computing device and partially on a remote computing device, or entirely on a remote computing device or server. In cases involving a remote computing device, the remote computing device may be connected to the user computing device through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computing device (e.g., through the Internet using an Internet service provider).
[0197] In summary, the present invention can be implemented in hardware, or in a software module running on one or more processors, or in a combination thereof. It should be understood by those skilled in the art that general data processing devices such as microprocessors or digital signal processors (DSPs) can be used in practice to implement some or all of the functions of some or all of the components in the embodiments of the present invention. The present invention can also be implemented as a device or apparatus program (e.g., a computer program and a computer program product) for executing part or all of the methods described herein. Such a program implementing the present invention can be stored on a computer-readable medium, or can have the form of one or more signals. Such a signal can be downloaded from an Internet website, or provided on a carrier signal, or provided in any other form.
[0198] The specific embodiments described above further describe the purpose, technical solutions and beneficial effects of the present invention in detail. It should be understood that the present invention is not inherently related to any specific computer, virtual device or electronic device, and various general devices can also implement the present invention. The above description is only a specific embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present invention should be included in the protection scope of the present invention.
[0199] The various embodiments in this specification are described in a progressive manner, and the same or similar parts between the various embodiments can be referenced to each other, and each embodiment focuses on the differences from other embodiments.
[0200] The above is only an embodiment of the present application and is not intended to limit the present application. For those skilled in the art, the present application may have various changes and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application should be included in the scope of the claims of the present application.
Claims
1. A method for assessing the biological age of the endometrium, characterized in that: include: In response to a biological age assessment request, obtaining RNA transcriptome information of an endometrial sample to be assessed; Matching the RNA transcriptome information with the gene information contained in a preset gene data set to obtain a feature matrix of gene expression; The feature matrix is input into an age assessment model constructed based on a multi-head attention mechanism for calculation to obtain a biological age assessment value of the endometrium.
2. The method for assessing endometrial biological age according to claim 1, characterized in that: The RNA transcriptome information is matched with the gene information contained in the preset gene data set to obtain the feature matrix of gene expression, including: Obtaining gene probes corresponding to the standard gene information contained in a preset gene data set, and screening the expression amount information of each standard gene in the RNA transcriptome according to the matching of the gene probes; Generate a feature matrix based on the expression information of standard genes whose expression levels are not 0.
3. The method for assessing endometrial biological age according to claim 2, characterized in that: The age assessment model includes a multi-head attention structure, a fully connected layer and an output layer; The feature matrix is input into the age assessment model constructed based on the multi-head attention mechanism for calculation, and the biological age assessment value of the endometrium is obtained, which includes: Obtain a weight matrix in the age assessment model, input the weight matrix and the feature matrix into a multi-head attention structure head, perform calculations based on the attention mechanism of each attention head, and obtain output results of each attention head; The output results of each attention head are input into multiple fully connected layers for splicing to obtain the output of the fully connected layer, wherein the multiple fully connected layers are connected via residual connections; The output result of the fully connected layer is input into the output layer, and the age assessment value is obtained by mapping according to a preset mapping rule.
4. The method for assessing the biological age of the endometrium according to any one of claims 1 to 3, characterized in that: The age assessment model is optimized and trained in advance; Before obtaining RNA transcriptome information of the endometrial sample to be evaluated in response to the biological age evaluation request, the method further includes: Acquire a sample data set required for optimization training and preprocess the information in the sample data set, wherein the sample data set includes RNA transcriptome information samples of endometrial samples of sample personnel of various ages; Matching the information contained in the preprocessed RNA transcriptome information sample with the gene information contained in a preset gene data set to generate a sample feature matrix of the training sample; Input the sample feature matrix into the initial evaluation model constructed based on the multi-head attention mechanism for calculation to obtain an initial prediction value; The loss is calculated based on the initial prediction value and the actual age corresponding to the RNA transcriptome information sample, and the obtained loss value is gradient-backed to optimize the parameters of the initial evaluation model to obtain an optimized and trained age evaluation model.
5. The method for assessing endometrial biological age according to claim 4, characterized in that: The parameters of the optimized initial evaluation model include: The normalization scale and offset parameters during preprocessing, the weight matrix in the attention mechanism, and the weight parameters and bias parameters of the fully connected layer.
6. The method for assessing endometrial biological age according to claim 5, characterized in that: The optimizing of the parameters of the initial evaluation model comprises: Calling the Adam optimizer to maintain a separate learning rate for the parameters of the initial evaluation model, and gradually reducing the learning rate in combination with the cosine annealing learning rate dynamic algorithm; Optimizing the parameters of the initial evaluation model based on the learning rate optimization parameters.
7. The method for assessing endometrial biological age according to claim 6, further comprising, after obtaining the optimized and trained age assessment model: Calculating the prediction accuracy of the age assessment model based on a number of rating indicators, and evaluating the prediction ability of the age assessment model according to the prediction accuracy; When the predictive ability of the age assessment model reaches a preset standard, the model optimization training is completed.
8. An endometrial biological age assessment device, characterized in that: The endometrial biological age assessment device comprises: An acquisition module, for acquiring RNA transcriptome information of an endometrial sample to be evaluated in response to a biological age evaluation request; A matching module, used to match the RNA transcriptome information with the gene information contained in a preset gene data set to obtain a feature matrix of gene expression; An evaluation module is used to input the feature matrix into an age evaluation model constructed based on a multi-head attention mechanism for calculation, so as to obtain a biological age evaluation value of the endometrium.
9. An endometrial biological age assessment device, characterized in that: The endometrial biological age assessment device comprises: a memory and at least one processor, wherein instructions are stored in the memory; The at least one processor calls the instructions in the memory to enable the endometrial biological age assessment device to perform the steps of the endometrial biological age assessment method according to any one of claims 1 to 7.
10. A computer-readable storage medium having instructions stored thereon, characterized in that: When the instructions are executed by a processor, the steps of the method for assessing the biological age of the endometrium as described in any one of claims 1 to 7 are implemented.
Citation Information
Patent Citations
Fetal brain age estimation and anomaly detection method and device based on deep learning
CN111415361A
Gene marker combination for evaluating receptivity of uterine endometrium and application of gene marker combination
CN111778326A
Ovarian function age assessment method and device based on generalized linear model
CN113223712A
Face age estimation method and device based on attention mechanism
CN115862119A
Single-cell RNA (Ribonucleic Acid) sequence gene regulation and control inference method based on deep learning
CN116825204A
