Gene sequencing model training method and device, electronic device, and storage medium

By augmenting and reconstructing the data of the gene sequencing model, the problem of poor sample data balance was solved, the training effect and detection capability of the model were improved, and more efficient gene sequence detection was achieved.

CN115148278BActive Publication Date: 2026-02-17PING AN TECH (SHENZHEN) CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202210860328.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-07-21
Publication Date
2026-02-17
Estimated Expiration
2042-07-21

AI Technical Summary

Technical Problem

In the training process of existing gene sequencing models, the balance of sample data is not high, which affects the training effect of the model.

Method used

By acquiring the original training data, data augmentation and reconstruction processing are performed, including data permutation and noise addition. Encoder-decoder operations are performed using the encoder and decoder of the neural network model. Reconstruction error and contrast error are calculated, model parameters are optimized, and the balance of sample data and the encoding capability of the model are improved.

Benefits of technology

It effectively improved the training effect of the model, enhanced the detection capability of the gene sequencing model, and was able to better mine the common feature information of the training data, thereby improving the detection accuracy and efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115148278B_ABST
    Figure CN115148278B_ABST
Patent Text Reader

Abstract

Embodiments of the present application provide a gene sequencing model training method and device, an electronic device and a storage medium, belonging to the field of artificial intelligence. The training method comprises: obtaining original training data, wherein the original training data comprises first gene sequencing data and second gene sequencing data; performing enhancement processing on the first gene sequencing data to obtain enhanced training data; performing reconstruction processing on the enhanced training data to obtain first training data; training a preset neural network model according to the first training data and the second gene sequencing data to obtain a model loss value of the neural network model; and performing parameter optimization on the neural network model according to the model loss value to obtain a gene sequencing model, which is used for detecting target gene data to be detected to obtain a gene category of the target gene data. The embodiments of the present application can improve the training effect of the model.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of artificial intelligence technology, and in particular to a training method and apparatus for a gene sequencing model, an electronic device, and a storage medium. Background Technology

[0002] Currently, in the training process of common gene sequencing models, the commonly used sample data suffers from poor balance, which often affects the training effect of the model. Therefore, how to improve the training effect of the model has become an urgent technical problem to be solved. Summary of the Invention

[0003] The main objective of this application is to provide a training method, apparatus, electronic device, and storage medium for a gene sequencing model, aiming to improve the training effect of the model.

[0004] To achieve the above objectives, a first aspect of this application proposes a method for training a gene sequencing model, the training method comprising:

[0005] Obtain raw training data, wherein the raw training data includes first gene sequencing data and second gene sequencing data;

[0006] The first gene sequencing data is augmented to obtain augmented training data.

[0007] The enhanced training data is reconstructed to obtain the first training data;

[0008] The preset neural network model is trained based on the first training data and the second gene sequencing data to obtain the model loss value of the neural network model;

[0009] The neural network model is optimized based on the model loss value to obtain a gene sequencing model. The gene sequencing model is used to detect and process the target gene data to obtain the gene category of the target gene data.

[0010] In some embodiments, the enhanced training data includes first enhanced data and second enhanced data, and the step of enhancing the first gene sequencing data to obtain the enhanced training data includes:

[0011] The first gene sequencing data is permuted to obtain the first enhanced data;

[0012] The first gene sequencing data is subjected to noise processing based on pre-acquired noise data to obtain the second enhanced data.

[0013] In some embodiments, the step of training a preset neural network model based on the first training data and the second gene sequencing data to obtain the model loss value of the neural network model includes:

[0014] The first training data and the second gene sequencing data are fused to obtain the target training data.

[0015] The target training data is encoded by the encoder of the neural network model to obtain the first reconstructed data;

[0016] The first reconstructed data is decoded by the decoder of the neural network model to obtain the second reconstructed data;

[0017] The difference between the target training data and the second reconstructed data is calculated to obtain the reconstruction error value;

[0018] The distance between the first training data and the enhanced training data is calculated to obtain the comparison error value;

[0019] The model loss value is obtained based on the comparison error value and the reconstruction error value.

[0020] In some embodiments, the step of reconstructing the enhanced training data to obtain the first training data includes:

[0021] The enhanced training data is encoded to obtain intermediate training data;

[0022] The intermediate training data is decoded to obtain the first training data.

[0023] To achieve the above objectives, a second aspect of this application provides a gene sequencing method, the gene sequencing method comprising:

[0024] Acquire the target gene data to be detected;

[0025] The target gene data is input into a gene sequencing model for detection and processing to obtain the gene category of the target gene data; the gene sequencing model is trained according to the gene sequencing model training method described in the first aspect.

[0026] In some embodiments, the step of inputting the target gene data into a gene sequencing model for detection and processing to obtain the gene category of the target gene data includes:

[0027] The gene loss value is obtained by calculating the loss of the target gene data using the gene sequencing model.

[0028] The difference between the gene loss value and the model loss value of the gene sequencing model is calculated to obtain the gene sequencing error value;

[0029] If the gene sequencing error value is greater than or equal to a preset error threshold, then the gene category of the target gene data is an abnormal gene.

[0030] To achieve the above objectives, a third aspect of this application provides a training device for a gene sequencing model, the training device comprising:

[0031] The first data acquisition module is used to acquire raw training data, wherein the raw training data includes first gene sequencing data and second gene sequencing data.

[0032] The data augmentation module is used to augment the first gene sequencing data to obtain augmented training data;

[0033] The reconstruction module is used to reconstruct the enhanced training data to obtain the first training data;

[0034] The training module is used to train a preset neural network model based on the first training data and the second gene sequencing data to obtain the model loss value of the neural network model.

[0035] An optimization module is used to optimize the parameters of the neural network model based on the model loss value to obtain a gene sequencing model. The gene sequencing model is used to detect and process the target gene data to be detected, and to obtain the gene category of the target gene data.

[0036] To achieve the above objectives, a fourth aspect of this application provides a gene sequencing device, the gene sequencing device comprising:

[0037] The second data acquisition module is used to acquire the target gene data to be detected.

[0038] The detection module is used to input the target gene data into a gene sequencing model for detection processing to obtain the gene category of the target gene data; the gene sequencing model is trained according to the gene sequencing model training method as described in any one of the first aspects.

[0039] To achieve the above objectives, a fifth aspect of the present application provides an electronic device, the electronic device including a memory, a processor, a program stored in the memory and executable on the processor, and a data bus for implementing communication between the processor and the memory, wherein the program, when executed by the processor, implements the method described in the first or second aspect above.

[0040] To achieve the above objectives, a sixth aspect of the present application provides a storage medium, which is a computer-readable storage medium for computer-readable storage, wherein the storage medium stores one or more programs that can be executed by one or more processors to implement the method described in the first or second aspect above.

[0041] This application proposes a training method for a gene sequencing model, a gene sequencing method, a training device for a gene sequencing model, a gene sequencing device, electronic equipment, and a storage medium. It acquires raw training data, including first gene sequencing data and second gene sequencing data; enhances the first gene sequencing data to obtain enhanced training data; reconstructs the enhanced training data to obtain the first training data. Data augmentation improves the data characteristics of the training data and enhances the balance of the sample data. Further, a pre-defined neural network model is trained using the first training data and the second gene sequencing data to obtain the model loss value; the parameters of the neural network model are optimized based on the model loss value to obtain the gene sequencing model. The gene sequencing model is used to detect the target gene data to obtain the gene category of the target gene data. This method effectively solves the problem of low sample data balance. By using data augmentation to assist model training, it promotes the model's encoding ability, enabling the neural network model to better focus on mining common feature information in the training data, effectively improving the model's training effect and enhancing the detection capability of the gene sequencing model. Attached Figure Description

[0042] Figure 1 This is a flowchart of the training method for the gene sequencing model provided in the embodiments of this application;

[0043] Figure 2 yes Figure 1 The flowchart of step S102 in the document;

[0044] Figure 3 yes Figure 1 The flowchart of step S103 in the process;

[0045] Figure 4 yes Figure 1 The flowchart of step S104 in the process;

[0046] Figure 5 This is a flowchart of the gene sequencing method provided in the embodiments of this application;

[0047] Figure 6 yes Figure 5 The flowchart of step S502 in the document;

[0048] Figure 7This is a schematic diagram of the structure of the training device for the gene sequencing model provided in the embodiments of this application;

[0049] Figure 8 This is a schematic diagram of the structure of the gene sequencing device provided in the embodiments of this application;

[0050] Figure 9 This is a schematic diagram of the hardware structure of the electronic device provided in the embodiments of this application. Detailed Implementation

[0051] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the scope of this application.

[0052] It should be noted that although functional modules are divided in the device schematic diagram and a logical order is shown in the flowchart, in some cases, the steps shown or described may be performed in a different order than the module division in the device or the order in the flowchart. The terms "first," "second," etc., in the specification, claims, and the aforementioned drawings are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence.

[0053] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this application belongs. The terminology used herein is for the purpose of describing embodiments of this application only and is not intended to limit this application.

[0054] First, let's analyze some of the terms used in this application:

[0055] Artificial intelligence (AI) is a new branch of computer science that studies, develops, and applies theories, methods, technologies, and systems to simulate, extend, and expand human intelligence. It aims to understand the essence of intelligence and produce intelligent machines that can react in a way similar to human intelligence. Research in this field includes robotics, speech recognition, image recognition, natural language processing, and expert systems. AI can simulate the information processes of human consciousness and thought. Furthermore, AI utilizes digital computers or machines controlled by digital computers to simulate, extend, and expand human intelligence, perceiving the environment, acquiring knowledge, and using that knowledge to achieve optimal results.

[0056] Natural Language Processing (NLP): NLP uses computers to process, understand, and utilize human language (such as Chinese and English). NLP is a branch of artificial intelligence and an interdisciplinary field of computer science and linguistics, often referred to as computational linguistics. NLP includes syntactic analysis, semantic analysis, and discourse understanding. It is commonly used in machine translation, handwritten and printed character recognition, speech recognition and text-to-speech conversion, intent recognition, information extraction and filtering, text classification and clustering, sentiment analysis, and opinion mining. It involves data mining, machine learning, knowledge acquisition, knowledge engineering, artificial intelligence research, and linguistic research related to language computation.

[0057] Information Extraction (NER) is a text processing technique that extracts factual information such as entities, relationships, and events from natural language text and outputs it as structured data. Information extraction is a technique for extracting specific information from text data. Text data is composed of specific units, such as sentences, paragraphs, and chapters. Text information is composed of smaller, specific units, such as characters, words, phrases, sentences, paragraphs, or combinations of these units. Extracting noun phrases, names of people, and place names from text data is an example of text information extraction. Of course, text information extraction techniques can extract information of various types.

[0058] Gene sequencing: a new type of gene detection technology that can analyze and determine the full gene sequence from blood or saliva to predict an individual's behavioral characteristics and the rationality of their behavior.

[0059] DNA sequencing: DNA sequencing refers to the analysis of the base sequence of a specific DNA fragment, that is, the arrangement of adenine (A), thymine (T), cytosine (C) and guanine (G).

[0060] Transcriptome sequencing (RNA-seq): Transcriptome sequencing uses high-throughput sequencing technology to analyze mRNA, small RNA, noncoding RNA, and some of these genes. RNA sequencing is most frequently used to analyze differentially expressed genes (DEGs). The process begins with extracting RNA from the lab, enriching or removing ribosomal RNA from mRNA, reverse transcribing cDNA, and preparing a sequencing library ligated with adapters. This library is then sequenced using a high-throughput sequencing platform. Finally, the experimental data is aligned or assembled from the sequenced reads to the transcriptome, quantifying the read lengths covering the transcripts. After filtering and inter-sample normalization, statistical models are used to describe the differences in expression levels of each gene across different sample groups.

[0061] Encoder: Transforms an input sequence into a fixed-length vector.

[0062] Decoding: Transforms the previously generated fixed vector into an output sequence; where the input sequence can be text, speech, image, or video; and the output sequence can be text or image.

[0063] Data augmentation: Data augmentation generates more data from limited data, increasing the number and diversity of training samples (noisy data), thus improving model robustness. It is generally used on the training set. Neural networks require a large number of parameters; many neural networks have millions of parameters. For these parameters to function correctly, a large amount of data is needed for training. However, in many real-world projects, it is difficult to find sufficient data to complete the task. Randomly changing the training samples can reduce the model's dependence on certain attributes, thereby improving the model's generalization ability. Data augmentation can be divided into two categories: offline augmentation and online augmentation. Offline augmentation directly processes the dataset; the number of data points becomes the augmentation factor multiplied by the original dataset size. This method is often used when the dataset is small. Online augmentation is used to augment batches of data, such as through rotation, translation, or flipping. Since some datasets cannot accept linear growth, this method is often used for large datasets. Many machine learning frameworks support this data augmentation method and can utilize GPUs for computational optimization.

[0064] Normal distribution: also known as the Gaussian distribution, the normal curve is bell-shaped, low at both ends and high in the middle, and symmetrical. Because of its bell-shaped curve, it is often called a bell curve. If a random variable X follows a normal distribution with expected value μ and variance σ... 2 The normal distribution is denoted as N(μ, σ). 2 Its probability density function is a normal distribution. The expected value μ determines its location, and its standard deviation σ determines the amplitude of the distribution. The normal distribution when μ = 0 and σ = 1 is the standard normal distribution.

[0065] Currently, in the training process of common gene sequencing models, the commonly used sample data suffers from poor balance, which often affects the training effect of the model. Therefore, how to improve the training effect of the model has become an urgent technical problem to be solved.

[0066] Based on this, embodiments of this application provide a method for training a gene sequencing model, a gene sequencing method, a training device for a gene sequencing model, a gene sequencing device, an electronic device, and a storage medium, aiming to improve the training effect of the model.

[0067] The gene sequencing model training method, gene sequencing method, gene sequencing model training device, gene sequencing device, electronic device and storage medium provided in this application embodiment are specifically described through the following embodiments. First, the gene sequencing model training method in this application embodiment is described.

[0068] The embodiments of this application can acquire and process relevant data based on artificial intelligence technology. Artificial intelligence (AI) refers to the theories, methods, technologies, and application systems that use digital computers or machines controlled by digital computers to simulate, extend, and expand human intelligence, perceive the environment, acquire knowledge, and use that knowledge to obtain optimal results.

[0069] Foundational technologies for artificial intelligence generally include sensors, dedicated AI chips, cloud computing, distributed storage, big data processing, operating / interactive systems, and mechatronics. AI software technologies mainly encompass computer vision, robotics, biometrics, speech processing, natural language processing, and machine learning / deep learning.

[0070] The gene sequencing model training method provided in this application relates to the field of artificial intelligence technology. The gene sequencing model training method provided in this application can be applied to a terminal, a server, or software running on either a terminal or a server.

[0071] In some embodiments, the terminal may be a smartphone, tablet computer, laptop computer, desktop computer, etc.; the server may be configured as an independent physical server, or as a server cluster or distributed system composed of multiple physical servers, or as a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, CDN, and big data and artificial intelligence platforms; the software may be an application that implements model update methods, etc., but is not limited to the above forms.

[0072] This application can be used in a wide variety of general-purpose or special-purpose computer system environments or configurations. Examples include: personal computers, server computers, handheld or portable devices, tablet devices, multiprocessor systems, microprocessor-based systems, set-top boxes, programmable consumer electronics, network PCs, minicomputers, mainframe computers, and distributed computing environments including any of the above systems or devices. This application can be described in the general context of computer-executable instructions executed by a computer, such as program modules. Generally, program modules include routines, programs, objects, components, data structures, etc., that perform specific tasks or implement specific abstract data types. This application can also be practiced in distributed computing environments where tasks are performed by remote processing devices connected via a communication network. In distributed computing environments, program modules can reside in local and remote computer storage media, including storage devices.

[0073] Figure 1 This is an optional flowchart of the training method for the gene sequencing model provided in the embodiments of this application. Figure 1 The method may include, but is not limited to, steps S101 to S105.

[0074] Step S101: Obtain the original training data, wherein the original training data includes the first gene sequencing data and the second gene sequencing data;

[0075] Step S102: Enhance the first gene sequencing data to obtain enhanced training data;

[0076] Step S103: Reconstruct the enhanced training data to obtain the first training data;

[0077] Step S104: Train the preset neural network model based on the first training data and the second gene sequencing data to obtain the model loss value of the neural network model;

[0078] Step S105: Optimize the parameters of the neural network model based on the model loss value to obtain the gene sequencing model. The gene sequencing model is used to detect and process the target gene data to obtain the gene category of the target gene data.

[0079] Steps S101 to S105 of this embodiment involve acquiring original training data, including first gene sequencing data and second gene sequencing data; enhancing the first gene sequencing data to obtain enhanced training data; and reconstructing the enhanced training data to obtain the first training data. Data augmentation improves the data characteristics of the training data and enhances the balance of the sample data. Further, a preset neural network model is trained using the first training data and the second gene sequencing data to obtain the model loss value; the parameters of the neural network model are optimized based on the model loss value to obtain a gene sequencing model. This gene sequencing model is used to detect the target gene data to obtain the gene category of the target gene data. This approach effectively addresses the problem of low sample data balance by using data augmentation to assist model training, promoting the model's encoding ability, and enabling the neural network model to better focus on mining common feature information in the training data, effectively improving the model's training effect and enhancing the detection capability of the gene sequencing model.

[0080] In step S101 of some embodiments, a web crawler can be written, and after setting up the data source, data can be crawled in a targeted manner to obtain the original training data. The original training data includes first gene sequencing data and second gene sequencing data. Other methods can also be used to obtain the original training data, and are not limited to these. It should be noted that the aforementioned data source can be an existing gene sequence database or a scRNA-seq dataset, etc. The original training data includes gene sequence data with normal gene expression. The original training data is split into two datasets: first gene sequencing data and second gene sequencing data. That is, the first gene sequencing data is one part of the original training data, and the second sequencing data is the other part.

[0081] In some specific embodiments, when acquiring the first gene sequencing data and the second gene sequencing data, it can be done using a scRNA-seq dataset D = {X1, X2, X3, ..., X} consisting of n cells and m gene sequences. n} T Each first gene sequencing data and second gene sequencing data is obtained as a row vector of length m, where the scRNA-seq dataset D = {X1, X2, X3, ..., X...} n} T Specifically, it can be expressed as

[0082]

[0083] Where, x ij Let x be the expression level of the i-th cell on the j-th gene sequence.ij For first-gene sequencing data or second-gene sequencing data, T indicates transposition.

[0084] Please see Figure 2 In some embodiments, the augmented training data includes first augmented data and second augmented data, and step S102 may include, but is not limited to, steps S201 to S202:

[0085] Step S201: Perform data permutation on the first gene sequencing data to obtain the first augmentation data;

[0086] Step S202: Noise is added to the first gene sequencing data based on the pre-acquired noise data to obtain the second enhanced data.

[0087] To enhance the encoding capability of the neural network model's encoder without introducing errors that alter the expression distribution of the first gene sequence data, two perturbation methods are introduced to augment the first gene sequencing data.

[0088] In step S201 of some embodiments, when performing data permutation on the first gene sequencing data, the main focus is on changing the arrangement order of the first gene sequencing data in the cells. That is, only the expression values ​​of the first gene sequencing data in different cells are changed, without altering the overall distribution of the first gene sequencing data in the cellular space. For example, for a series of first gene sequence data, where these first gene sequence data represent the expression levels of the j-th gene sequence in n cells, these first gene sequence data are represented as {x... 1j ,x 2j ,x 3j ,…,x nj The first augmented data obtained after random permutation can be represented as: Where p1, p2, p3, ..., p n It is a full permutation of the preset sequence number.

[0089] In step S202 of some embodiments, when adding noise to the first gene sequencing data, random noise of a one-dimensional standard normal distribution is randomly added to the first gene sequencing data to obtain the second enhanced data. For example, in the j-th gene sequence, 10% of the cell space is extracted and noise n~N(0,1) is added, then the first gene sequence data x with added noise is... ij Transform into second augmented data x′ ij Among them, the second augmented data x′ ij It can be represented as

[0090]

[0091] Among them, std(X) j) represents the gene standard deviation of the first gene sequencing data.

[0092] Steps S201 to S202 above improve the data characteristics of the training data and enhance the balance of the training data through data augmentation. They can also further enhance the encoding ability of the encoder of the neural network model without introducing errors that change the expression distribution of the first gene sequence data.

[0093] Please see Figure 3 In some embodiments, step S103 may include, but is not limited to, steps S301 to S302:

[0094] Step S301: Encode the augmented training data to obtain intermediate training data;

[0095] Step S302: Decode the intermediate training data to obtain the first training data.

[0096] In step S301 of some embodiments, the augmented training data is encoded by a self-assisted encoder to realize the mapping of the augmented training data from cell space to vector space, thereby obtaining intermediate training data.

[0097] In step S302 of some embodiments, the intermediate training data is decoded by a self-assisted decoder to mine the data features of the intermediate training data and obtain the first training data.

[0098] Through the above steps S301 to S302, a self-assisted encoder that shares parameters with the neural network model can be introduced to enhance the encoding capability of the neural network model, thereby improving the model performance of the neural network model.

[0099] Please see Figure 4 In some embodiments, step S104 may include, but is not limited to, steps S401 to S406:

[0100] Step S401: The first training data and the second gene sequencing data are fused to obtain the target training data;

[0101] Step S402: The target training data is encoded by the encoder of the neural network model to obtain the first reconstructed data;

[0102] Step S403: The first reconstructed data is decoded by the decoder of the neural network model to obtain the second reconstructed data;

[0103] Step S404: Calculate the difference between the target training data and the second reconstructed data to obtain the reconstruction error value;

[0104] Step S405: Calculate the distance between the first training data and the enhanced training data to obtain the comparison error value;

[0105] Step S406: Obtain the model loss value based on the comparison error value and the reconstruction error value.

[0106] In step S401 of some embodiments, when fusing the first training data and the second gene sequencing data, the first training data and the second gene sequencing data are incorporated into the same dataset, and this dataset is randomly sorted to obtain the target training data.

[0107] In step S402 of some embodiments, the target training data is encoded by the encoder of the neural network model to realize the mapping of the target training data from the cell data space to the latent space, thereby obtaining the first reconstructed data.

[0108] In step S403 of some embodiments, the first reconstructed data is decoded by the decoder of the neural network model to realize the mapping of the first reconstructed data from the latent space to the cell data space, thereby obtaining the second reconstructed data.

[0109] In step S404 of some embodiments, in order to enable the neural network model to better mine the common feature information of the same type of target training data and improve the training effect of the model, the reconstruction error of the cell data space and the latent space needs to be considered when calculating the model loss value of the neural network model.

[0110] Specifically, when calculating the reconstruction error of the cell data space, structural similarity (SSIM) can be used. If the target training data input to the cell data space is X, and the first reconstructed data obtained after encoding and reconstruction by the encoder is X′, then the first reconstruction error value of the cell data space is Loss. sample This can be represented as shown in formula (1):

[0111]

[0112] Where μ and σ are the mean and variance of the target training data, respectively, and C1 and C2 are preset parameters used to maintain data stability.

[0113] When calculating the reconstruction error in the latent space, a distance function can be used. If the target training data input to the encoder is z... input The second reconstructed data output by the decoder is z output Then, the difference between the target training data and the second reconstructed data is calculated using a distance function to obtain the second reconstruction error value Loss in the latent space. latent This can be represented as shown in formula (2):

[0114] Losslatent =||z input -z output ||1 Formula (2)

[0115] In step S405 of some embodiments, in order to enable the neural network model to better mine the common feature information of training data of the same type of target and improve the training effect of the model, the contrast error caused by data augmentation needs to be considered when calculating the model loss value of the neural network model. Specifically, when calculating the contrast error caused by data augmentation, a distance function can be used. If the augmented training data after data augmentation and reconstruction is X... raw The first training data after data augmentation is X. perturb Then, the distance between the first training data and the augmented training data is calculated using a distance function to obtain the comparison error value Loss. self This can be represented as shown in formula (3):

[0116] Loss self =||X perturb -X raw ||1 Formula (3)

[0117] In step S406 of some embodiments, the overall loss of the neural network model consists of reconstruction error and contrast error. Therefore, the model loss value calculated based on the contrast error value and the reconstruction error value can be expressed as LOSS = Loss sample +Loss self +Loss latent .

[0118] Steps S401 to S406 above utilize a cyclic encoding-decoding approach. While focusing on the reconstruction capability of the neural network model in the sample space (i.e., the cell data space), it also constrains the encoding of the latent space, enabling the model to have better encoding-decoding capabilities. This allows the neural network model to better focus on mining the common feature information of the training data, thus improving the training effect of the model.

[0119] In step S105 of some embodiments, when optimizing the parameters of the neural network model based on the model loss value, the training objective is to minimize the sum of the losses of all target training data, that is, to adjust the model parameters of the neural network model and train the neural network model so that min Loss = Loss sample +Loss latent +Loss selfSpecifically, stochastic gradient descent can be used to update the model parameters. Training is stopped when the model loss value during training continuously decreases and tends to stabilize, and the model loss value during testing continuously decreases without rebounding. This yields a gene sequencing model, which is used to process the target gene data to determine its gene category.

[0120] It should be noted that during the testing phase of the neural network model, the test set data includes first test data with normal gene expression and second test data with abnormal gene expression. The loss values ​​of the first and second test data are calculated separately through forward propagation, and the model parameters are adjusted according to the difference in loss values, so that the model loss value during testing continuously decreases without rebounding.

[0121] In some specific embodiments, the aforementioned criterion for the model loss value during training to continuously decrease and tend to stabilize can refer to the model loss value in the current training process remaining within a certain range compared to the error value in the previous training. It should be noted that since the stability of the training process varies for different cell data, the specific range of the error interval needs to be determined based on the actual training situation.

[0122] In some specific embodiments, the criterion for measuring the model loss value during testing can be to detect whether the model loss value increases during k consecutive iterations. If the model loss value increases k times consecutively, the training of the neural network model is stopped. If the model loss value of the current iteration is higher than that of the previous iteration only occasionally, and this phenomenon does not exceed k times consecutively, the training of the neural network model continues. Here, k is a hyperparameter, which is usually 5 or 10.

[0123] The gene sequencing model training method of this application embodiment obtains original training data, including first gene sequencing data and second gene sequencing data; enhances the first gene sequencing data to obtain enhanced training data; reconstructs the enhanced training data to obtain the first training data. Data augmentation improves the data characteristics of the training data and enhances the balance of the sample data. Further, a preset neural network model is trained based on the first training data and the second gene sequencing data to obtain the model loss value; the parameters of the neural network model are optimized based on the model loss value to obtain the gene sequencing model. The gene sequencing model is used to detect the target gene data to obtain the gene category of the target gene data. This method effectively solves the problem of low sample data balance. By using data augmentation to assist model training, it can improve the model's encoding ability without introducing bias. The training method of the gene sequencing model in this application embodiment also utilizes a recurrent encoder-decoder approach. While emphasizing the reconstruction capability of the neural network model in the sample space, it also constrains the encoding of the latent space, enabling the model to have better encoder-decoder capabilities. This allows the neural network model to better focus on mining common feature information in the training data, thereby improving the training effect of the model and enhancing the detection capability of the gene sequencing model.

[0124] Figure 5 This is an optional flowchart of the gene sequencing method provided in the embodiments of this application. Figure 5 The method may include, but is not limited to, steps S501 to S502.

[0125] Step S501: Obtain the target gene data to be detected;

[0126] Step S502: Input the target gene data into the gene sequencing model for detection and processing to obtain the gene category of the target gene data; the gene sequencing model is trained according to the training method of the gene sequencing model as described in the first aspect embodiment.

[0127] In step S501 of some embodiments, the target gene data to be detected can be obtained by writing a web crawler, setting up a data source, and then selectively crawling data. Alternatively, the target gene data can be obtained through other methods, not limited to these. It should be noted that the target gene data to be detected includes gene sequence data with normal gene expression or gene sequence data with abnormal gene expression.

[0128] In step S502 of some embodiments, the target gene data is input into the gene sequencing model for detection and processing. The loss of the target gene data is calculated using forward propagation to obtain the corresponding gene loss value. The gene loss value is compared with the model loss value of the gene sequencing model. If the difference between the two is too large, the gene category of the target gene data is determined to be an abnormal gene, that is, the gene expression of the target gene data is abnormal. If the difference between the two is small, the gene category of the target gene data is determined to be a normal gene, that is, the gene expression of the target gene data is normal.

[0129] The gene sequencing method of this application acquires the target gene data to be detected, inputs the target gene data into a gene sequencing model for detection and processing, calculates the loss of the target gene data using forward propagation to obtain the corresponding gene loss value, and determines the gene category of the target gene data based on the difference between the gene loss value and the model loss value of the gene sequencing model. This method can efficiently and conveniently detect gene sequences, determine whether gene sequences are abnormally expressed, and improve the accuracy of gene sequence detection.

[0130] Please see Figure 6 In some embodiments, step S502 includes, but is not limited to, steps S601 to S603:

[0131] Step S601: Calculate the loss of the target gene data using a gene sequencing model to obtain the gene loss value.

[0132] Step S602: Calculate the difference between the gene loss value and the model loss value of the gene sequencing model to obtain the gene sequencing error value;

[0133] Step S603: If the gene sequencing error value is greater than or equal to the preset error threshold, then the gene category of the target gene data is an abnormal gene.

[0134] In step S601 of some embodiments, the target gene data is input into the gene sequencing model for detection and processing, and the loss of the target gene data is calculated using forward propagation to obtain the corresponding gene loss value.

[0135] In step S602 of some embodiments, the difference between the gene loss value and the model loss value of the gene sequencing model is calculated, and the gene loss value is compared with the model loss value of the gene sequencing model to obtain the gene sequencing error value. The gene sequencing error value can reflect the gene difference between the target gene data and the training data (i.e., normal genes), so as to determine whether there is an abnormality in the gene expression of the target gene data based on the gene difference.

[0136] In step S603 of some embodiments, the error threshold can be set according to actual conditions and is not limited. For example, the error threshold can be determined based on the value of the original training data. Since the gene sequencing error value can reflect the gene difference between the target gene data and the training data (i.e., normal genes), the gene sequencing error value is compared with the error threshold. If the gene sequencing error value is greater than or equal to the preset error threshold, it indicates that the difference between the target gene data and the training data of the gene sequencing model is too large, and the gene category of the target gene data is determined to be an abnormal gene, that is, the gene expression of the target gene data is abnormal; if the gene sequencing error value is less than the preset error threshold, it indicates that the difference between the target gene data and the training data of the gene sequencing model is small, and the gene category of the target gene data is determined to be a normal gene, that is, the gene expression of the target gene data is normal.

[0137] Steps S601 to S603 above determine whether there are abnormalities in the target gene data by the magnitude of the gene sequencing error value. This can efficiently detect whether there are potential abnormal genes in the target gene data, thus improving detection accuracy and efficiency.

[0138] Please see Figure 7 This application also provides a training device for a gene sequencing model, which can implement the above-mentioned gene sequencing model training method. The device includes:

[0139] The first data acquisition module 701 is used to acquire raw training data, which includes first gene sequencing data and second gene sequencing data.

[0140] The data augmentation module 702 is used to augment the first gene sequencing data to obtain augmented training data;

[0141] The reconstruction module 703 is used to reconstruct the enhanced training data to obtain the first training data;

[0142] The training module 704 is used to train a preset neural network model based on the first training data and the second gene sequencing data to obtain the model loss value of the neural network model.

[0143] The optimization module 705 is used to optimize the parameters of the neural network model based on the model loss value to obtain the gene sequencing model. The gene sequencing model is used to detect and process the target gene data to obtain the gene category of the target gene data.

[0144] In some embodiments, the data enhancement module 702 includes:

[0145] A data replacement unit is used to replace the first gene sequencing data to obtain the first augmented data.

[0146] The noise-adding unit is used to add noise to the first gene sequencing data based on the pre-acquired noise data to obtain the second enhanced data.

[0147] In some embodiments, the reconfiguration module 703 includes:

[0148] The first encoding unit is used to encode the augmented training data to obtain intermediate training data;

[0149] The first decoding unit is used to decode the intermediate training data to obtain the first training data.

[0150] In some embodiments, the training module 704 includes:

[0151] The fusion unit is used to fuse the first training data and the second gene sequencing data to obtain the target training data;

[0152] The second encoding unit is used to encode the target training data through the encoder of the neural network model to obtain the first reconstructed data;

[0153] The second decoding unit is used to decode the first reconstructed data through the decoder of the neural network model to obtain the second reconstructed data;

[0154] The difference calculation unit is used to calculate the difference between the target training data and the second reconstructed data to obtain the reconstruction error value.

[0155] The distance calculation unit is used to calculate the distance between the first training data and the augmented training data to obtain the comparison error value;

[0156] The loss calculation unit is used to obtain the model loss value based on the comparison error value and the reconstruction error value.

[0157] The specific implementation of the training device for this gene sequencing model is basically the same as the specific implementation of the training method for the gene sequencing model described above, and will not be repeated here.

[0158] Please see Figure 8 This application also provides a gene sequencing device that can implement the above-described gene sequencing method. The device includes:

[0159] The second data acquisition module 801 is used to acquire the target gene data to be detected;

[0160] The detection module 802 is used to input the target gene data into the gene sequencing model for detection and processing to obtain the gene category of the target gene data; the gene sequencing model is trained according to the training method of the gene sequencing model as described in the first aspect embodiment.

[0161] In some embodiments, the detection module 802 includes:

[0162] The first computational unit is used to calculate the loss of the target gene data using a gene sequencing model, and obtain the gene loss value.

[0163] The second calculation unit is used to calculate the difference between the gene loss value and the model loss value of the gene sequencing model to obtain the gene sequencing error value.

[0164] The category determination unit is used to classify the gene category of the target gene data as an abnormal gene if the gene sequencing error value is greater than or equal to a preset error threshold.

[0165] The specific implementation of this gene sequencing device is basically the same as the specific implementation of the gene sequencing method described above, and will not be repeated here.

[0166] This application also provides an electronic device, which includes: a memory, a processor, a program stored in the memory and executable on the processor, and a data bus for communication between the processor and the memory. When the program is executed by the processor, it implements the training method or gene sequencing method of the gene sequencing model described above. This electronic device can be any smart terminal, including tablet computers, in-vehicle computers, etc.

[0167] Please see Figure 9 , Figure 9 The hardware structure of an electronic device according to another embodiment is illustrated. The electronic device includes:

[0168] The processor 901 can be implemented using a general-purpose CPU (Central Processing Unit), microprocessor, application-specific integrated circuit (ASIC), or one or more integrated circuits, and is used to execute relevant programs to implement the technical solutions provided in the embodiments of this application.

[0169] The memory 902 can be implemented as a read-only memory (ROM), a static storage device, a dynamic storage device, or a random access memory (RAM). The memory 902 can store the operating system and other application programs. When the technical solutions provided in the embodiments of this specification are implemented through software or firmware, the relevant program code is stored in the memory 902 and is called and executed by the processor 901 to execute the training method or gene sequencing method of the gene sequencing model in the embodiments of this application.

[0170] The input / output interface 903 is used to implement information input and output;

[0171] The communication interface 904 is used to enable communication and interaction between this device and other devices. Communication can be achieved through wired means (such as USB, Ethernet cable, etc.) or wireless means (such as mobile network, WIFI, Bluetooth, etc.).

[0172] Bus 905 transmits information between various components of the device (e.g., processor 901, memory 902, input / output interface 903, and communication interface 904);

[0173] The processor 901, memory 902, input / output interface 903, and communication interface 904 are connected to each other within the device via bus 905.

[0174] This application embodiment also provides a storage medium, which is a computer-readable storage medium for computer-readable storage. The storage medium stores one or more programs, which can be executed by one or more processors to implement the above-mentioned gene sequencing model training method or gene sequencing method.

[0175] Memory, as a non-transitory computer-readable storage medium, can be used to store non-transitory software programs and non-transitory computer-executable programs. Furthermore, memory may include high-speed random access memory, and may also include non-transitory memory, such as at least one disk storage device, flash memory device, or other non-transitory solid-state storage device. In some embodiments, memory may optionally include memory remotely located relative to the processor, and these remote memories can be connected to the processor via a network. Examples of such networks include, but are not limited to, the Internet, intranets, local area networks, mobile communication networks, and combinations thereof.

[0176] The gene sequencing model training method, gene sequencing method, gene sequencing model training device, gene sequencing device, electronic device, and storage medium provided in this application embodiment acquire raw training data, including first gene sequencing data and second gene sequencing data; enhance the first gene sequencing data to obtain enhanced training data; reconstruct the enhanced training data to obtain the first training data, thereby improving the data characteristics of the training data and enhancing the balance of the sample data through data augmentation. Further, a preset neural network model is trained based on the first training data and the second gene sequencing data to obtain the model loss value of the neural network model; the parameters of the neural network model are optimized based on the model loss value to obtain the gene sequencing model, wherein the gene sequencing model is used to detect the target gene data to obtain the gene category of the target gene data. This method can effectively solve the problem of low sample data balance, and by using data augmentation to assist model training, it can promote the model's encoding ability without introducing bias. The training method of the gene sequencing model in this application embodiment also utilizes a recurrent encoder-decoder approach. While emphasizing the reconstruction capability of the neural network model in the sample space, it also constrains the encoding of the latent space, enabling the model to have better encoder-decoder capabilities. This allows the neural network model to better focus on mining common feature information in the training data, thereby improving the training effect of the model and enhancing the detection capability of the gene sequencing model.

[0177] The embodiments described in this application are for the purpose of more clearly illustrating the technical solutions of the embodiments of this application, and do not constitute a limitation on the technical solutions provided by the embodiments of this application. As those skilled in the art will know, with the evolution of technology and the emergence of new application scenarios, the technical solutions provided by the embodiments of this application are also applicable to similar technical problems.

[0178] It will be understood by those skilled in the art that Figure 1-6 The technical solutions shown do not constitute a limitation on the embodiments of this application, and may include more or fewer steps than shown, or combine certain steps, or different steps.

[0179] The device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate; that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs.

[0180] Those skilled in the art will understand that all or some of the steps in the methods disclosed above, as well as the functional modules / units in the systems and devices, can be implemented as software, firmware, hardware, or suitable combinations thereof.

[0181] The terms “first,” “second,” “third,” “fourth,” etc. (if present) in the specification and accompanying drawings of this application are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of this application described herein can be implemented in orders other than those illustrated or described herein. Furthermore, the terms “comprising” and “having,” and any variations thereof, are intended to cover non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.

[0182] It should be understood that in this application, "at least one (item)" means one or more, and "more than" means two or more. "And / or" is used to describe the relationship between related objects, indicating that three relationships can exist. For example, "A and / or B" can represent three cases: only A exists, only B exists, and both A and B exist simultaneously, where A and B can be singular or plural. The character " / " generally indicates that the preceding and following related objects are in an "or" relationship. "At least one (item) of the following" or similar expressions refer to any combination of these items, including any combination of single or plural items. For example, at least one (item) of a, b, or c can represent: a, b, c, "a and b", "a and c", "b and c", or "a and b and c", where a, b, and c can be single or multiple.

[0183] In the several embodiments provided in this application, it should be understood that the disclosed apparatus and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative; for instance, the division of the units described above is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be through some interfaces; the indirect coupling or communication connection between apparatuses or units may be electrical, mechanical, or other forms.

[0184] The units described above as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.

[0185] Furthermore, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit.

[0186] If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes multiple instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods of the various embodiments of this application. The aforementioned storage medium includes various media capable of storing programs, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.

[0187] The preferred embodiments of the present application have been described above with reference to the accompanying drawings, but this does not limit the scope of the claims of the present application. Any modifications, equivalent substitutions, and improvements made by those skilled in the art without departing from the scope and substance of the embodiments of the present application shall be within the scope of the claims of the present application.

Claims

1. A method for training a gene sequencing model, characterized in that, The training method comprises: obtaining original training data, wherein the original training data comprises first gene sequencing data and second gene sequencing data; performing enhancement processing on the first gene sequencing data to obtain enhanced training data; performing reconstruction processing on the enhanced training data to obtain first training data; training a preset neural network model according to the first training data and the second gene sequencing data to obtain a model loss value of the neural network model; performing parameter optimization on the neural network model according to the model loss value to obtain a gene sequencing model, wherein the gene sequencing model is used for detecting target gene data to be detected to obtain a gene category of the target gene data; the enhanced training data comprises first enhanced data and second enhanced data, and the enhancement processing on the first gene sequencing data to obtain enhanced training data comprises: performing data permutation on the first gene sequencing data to obtain first enhanced data, so as to change the arrangement order of the first gene sequencing data in cells, change the expression value of the first gene sequencing data in different cells, and not change the overall distribution of the first gene sequencing data in cell space; adding random noise of one-dimensional standard normal distribution to the first gene sequencing data to obtain second enhanced data.

2. The training method of claim 1, wherein, The step of training a preset neural network model according to the first training data and the second gene sequencing data to obtain a model loss value of the neural network model comprises: performing fusion processing on the first training data and the second gene sequencing data to obtain target training data; performing encoding processing on the target training data through an encoder of the neural network model to obtain first reconstruction data; performing decoding processing on the first reconstruction data through a decoder of the neural network model to obtain second reconstruction data; performing difference calculation on the target training data and the second reconstruction data to obtain a reconstruction error value; performing distance calculation on the first training data and the enhanced training data to obtain a comparison error value; obtaining the model loss value according to the comparison error value and the reconstruction error value.

3. The training method according to any one of claims 1 to 2, characterized in that, The step of performing reconstruction processing on the enhanced training data to obtain first training data comprises: performing encoding processing on the enhanced training data to obtain intermediate training data; performing decoding processing on the intermediate training data to obtain the first training data.

4. A method of sequencing a gene, characterized by, The gene sequencing method comprises: obtaining target gene data to be detected; inputting the target gene data into a gene sequencing model for detection processing to obtain a gene category of the target gene data; the gene sequencing model is trained according to the gene sequencing model training method of any one of claims 1 to 3.

5. The method of sequencing a gene according to claim 4, wherein, The step of inputting the target gene data into a gene sequencing model for detection processing to obtain a gene category of the target gene data comprises: performing loss calculation on the target gene data through the gene sequencing model to obtain a gene loss value, The gene sequencing error value is obtained by subtracting the gene loss value from the model loss value of the gene sequencing model. If the gene sequencing error value is greater than or equal to a preset error threshold, the gene category of the target gene data is an abnormal gene.

6. A device for training a genetic sequencing model, comprising: The training device comprises: The first data acquisition module is configured to acquire original training data, wherein the original training data comprises first gene sequencing data and second gene sequencing data. The data enhancement module is configured to perform enhancement processing on the first gene sequencing data to obtain enhanced training data. The reconstruction module is configured to perform reconstruction processing on the enhanced training data to obtain first training data. The training module is configured to train a preset neural network model according to the first training data and the second gene sequencing data to obtain a model loss value of the neural network model. The optimization module is configured to perform parameter optimization on the neural network model according to the model loss value to obtain a gene sequencing model, wherein the gene sequencing model is configured to perform detection processing on target gene data to be detected to obtain a gene category of the target gene data. The enhanced training data comprises first enhanced data and second enhanced data, and the enhancement processing on the first gene sequencing data comprises: The first gene sequencing data is subjected to data permutation to obtain the first enhanced data, so as to change the arrangement order of the first gene sequencing data in cells, change the expression value of the first gene sequencing data in different cells, and not change the overall distribution of the first gene sequencing data in the cell space. The first gene sequencing data is added with one-dimensional standard normal distribution random noise to obtain the second enhanced data.

7. A genetic sequencing device, characterized by, The gene sequencing device comprises: The second data acquisition module is configured to acquire target gene data to be detected. The detection module is configured to input the target gene data into a gene sequencing model for detection processing to obtain a gene category of the target gene data, wherein the gene sequencing model is trained according to the training method of the gene sequencing model of any one of claims 1 to 3.

8. An electronic device, comprising: The electronic device comprises a memory, a processor, a program stored on the memory and executable on the processor, and a data bus for realizing connection and communication between the processor and the memory, and the program is executed by the processor to realize the steps of the training method of any one of claims 1 to 3 or the steps of the gene sequencing method of any one of claims 4 to 5.

9. A storage medium, the storage medium being a computer-readable storage medium for computer-readable storage, characterized in that, The storage medium stores one or more programs, and the one or more programs are executable by one or more processors to realize the steps of the training method of any one of claims 1 to 3 or the steps of the gene sequencing method of any one of claims 4 to 5.

Citation Information

Patent Citations

  • Model training method and device, text classification method and device, equipment and medium

    CN114637847A