Genetic text data augmentation method based on generative adversarial network

Through the improved generative adversarial network structure, the problems of scarcity and imbalance of gene data are solved, and the accuracy of data analysis and the generalization ability of the model are improved.

CN119360978BActive Publication Date: 2025-04-25CHANGCHUN UNIV
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411896286.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-12-23
Publication Date
2025-04-25
Estimated Expiration
2044-12-23

AI Technical Summary

Technical Problem

In the field of bioinformatics, insufficient samples of genetic data mutations and imbalanced categories lead to difficulties in deep learning applications.

Method used

The improved gene adversarial network (GAN) structure, including generators, discriminators and feature discriminators, generate high-quality pseudogene data through adversarial training, amplify the gene data set.

Benefits of technology

It improves the quality and diversity of generated data, ensures that the generated data is highly reliable in practical applications, and improves the accuracy of genetic data analysis and the generalization ability of machine learning models.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119360978B_ABST
    Figure CN119360978B_ABST
Patent Text Reader

Abstract

The present invention belongs to the field of biometric identification technology, and relates to a gene text data amplification method based on a generative adversarial network, the method obtains original data, converts the data into a format suitable for GAN processing; then constructs a GAN, inputs the processed data into the GAN for training, and uses the trained GAN to generate a new gene sequence; the GAN includes a generator, a discriminator and a feature discriminator; the generator is used to map random noise to a gene feature space, and generate a new gene sequence similar to the distribution of real data; the discriminator is used to evaluate the authenticity of the generated data, and the feature discriminator is used to evaluate the consistency of the generated data with the original data in base distribution, so that the generated data is consistent with the original gene data in overall characteristics. The data generated by the method is not only close to the real data in overall structure, but also highly consistent in detail features, ensuring the reliability of the amplified data in practical applications.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the technical field of biometric identification, relates to bioinformatics and artificial intelligence, and specifically to a gene text data amplification method based on a generative adversarial network. Background Art

[0002] Nowadays, the research on bioinformatics is very extensive. However, there is a common problem in these studies: lack of sufficient data for research. As the research deepens, the problem of insufficient genetic data variation samples and class imbalance is becoming more and more obvious. Therefore, how to generate more effective genetic data variation samples is the key to the application of deep learning in the field of bioinformatics.

[0003] In the current text data generation task, commonly used models include variational autoencoders (VAE), recurrent neural networks (RNN) and their variants (long short-term memory network LSTM, gated recurrent unit network GRU), and self-attention mechanism driven Transformer model. Each model has its own advantages. VAE can capture the distribution of latent space, RNN and LSTM are good at processing time series characteristics, and Transformer model performs well in understanding contextual relationships. However, these models also have limitations. VAE has poor generation quality, RNN is prone to gradient vanishing problems, and Transformer consumes a lot of computing resources.

[0004] Generative adversarial networks (GANs) have significant advantages in generative tasks. They can generate high-quality and diverse samples through adversarial training of generators and discriminators, especially in image generation. However, when GANs are applied to text data generation, especially genetic text data, they face some challenges, mainly because genetic text data not only needs to conform to grammatical rules, but also needs to meet biological laws and base ratio requirements, which makes it difficult to directly apply traditional GANs. Summary of the invention

[0005] In view of the above-mentioned technical problems and defects, the purpose of the present invention is to provide a gene text data amplification method based on a generative adversarial network. The method improves the generative adversarial network structure, uses the improved generative adversarial network to generate pseudo gene data, amplifies the gene data set, solves the problems of scarcity and imbalance of gene data, and improves the accuracy of gene data analysis.

[0006] To achieve the above object, the present invention adopts the following technical solution:

[0007] A gene text data amplification method based on a generative adversarial network comprises the following steps:

[0008] Step 1: Obtain the original genetic data and convert it into a text format suitable for generative adversarial network processing;

[0009] Step 2: Construct a generative adversarial network, input the data processed in step 1 into the generative adversarial network for training, and use the trained generative adversarial network to generate new gene sequences;

[0010] The generative adversarial network includes a generator, a discriminator and a feature discriminator; the generator is a multi-layer perceptron, which is used to map random noise to a gene feature space and generate a new gene sequence similar to the real data distribution, including four first fully connected layers arranged in sequence, each first fully connected layer adopts a LeakyReLU activation function, and the feature dimension is gradually expanded through the four first fully connected layers. Finally, the data dimension is reduced through the output layer, and the generated data feature value is normalized to [-1, 1] using a Tanh activation function to generate an output similar to the gene data;

[0011] The discriminator is used to evaluate the authenticity of the generated data, including three layers of second fully connected layers arranged in sequence, and the feature dimension is gradually expanded through the three layers of second fully connected layers. Each second fully connected layer adopts the LeakyReLU activation function to improve the ability to capture the nonlinear characteristics of the data; finally, a probability value between [0, 1] is output through the Sigmoid activation function, indicating the probability that the input is real data;

[0012] The feature discriminator is used to evaluate the consistency of the generated data and the original data in base distribution, and further constrain the internal features of the generated gene data so that the generated data is consistent with the original gene data in overall features. The input of the feature discriminator is a base ratio vector with a length of 4. The input data passes through two layers of the third fully connected layer, and finally the discrimination result is output through Sigmoid activation.

[0013] As a preferred embodiment of the present invention, the generator input is a 100-dimensional random noise vector, the feature dimension is expanded to 128 after the first fully connected layer of the first layer, the feature dimension is expanded to 256 after the second fully connected layer, the feature dimension is expanded to 512 after the third fully connected layer, and the feature dimension is expanded to 1024 after the fourth fully connected layer. After the data dimension is reduced to 9 by the output layer, the Tanh activation function is used;

[0014] The discriminator input is a 9-dimensional feature, the feature dimension is expanded to 128 after the first second fully connected layer, the feature dimension is expanded to 256 after the second second fully connected layer, and the feature dimension is expanded to 512 after the third second fully connected layer;

[0015] The base ratio vector with a length of 4 is obtained by truncating the original feature vector containing 9-dimensional data. The ratio of A, C, T, and G bases is selected as the core feature. The feature dimension of the base ratio vector with a length of 4 is expanded to 64 after the first third fully connected layer, and the feature dimension is reduced to 1 after the second third fully connected layer.

[0016] As a preferred embodiment of the present invention, the expression of the generator is as follows:

[0017] ;

[0018] in: is the gene sequence generated by the generator, is the weight matrix of the generator, is the noise vector, is the bias term of the generator, is the activation function;

[0019] The expression of the discriminator is as follows:

[0020] ;

[0021] in: is the output of the discriminator, representing the input data Is it real data? is the weight matrix of the discriminator, is the bias term of the discriminator, yes The activation function is defined as:

[0022] ;

[0023] The expression of the feature discriminator is as follows:

[0024]

[0025] in: is the output of the feature discriminator, is the distribution vector of the bases ; is the weight matrix of the feature discriminator; is the bias term of the feature discriminator; yes Activation function.

[0026] As a preferred embodiment of the present invention, step 1 uses a data processing module to process the original genetic data, converts the data format into a text form suitable for generative adversarial network training, and makes each genetic data include a starting position, corresponding genetic features, and base frequency and variation information.

[0027] As a preferred embodiment of the present invention, in the process of training the generative adversarial network, the generator, the discriminator and the feature discriminator are jointly trained by optimizing the loss function; wherein the generator loss function includes the discriminator loss and the feature discriminator loss;

[0028] The generator minimizes its loss function To update the parameters:

[0029]

[0030] in: For a random noise distribution P z The expected value of the noise vector z extracted in (z); is the discriminator for generating data The prediction results; Represents the base distribution of real data; represents the base distribution of the generated data;

[0031] The discriminator minimizes its loss function To update the parameters:

[0032]

[0033] in: Indicates that for the real data distribution The real data extracted from x Expected value; is the fake data output by the generator; is the output of the discriminator, representing the input data Whether it is real data;

[0034] The feature discriminator minimizes its loss function To update the parameters:

[0035]

[0036] in, Represents the base distribution of real data; represents the base distribution of the generated data;

[0037] The loss functions of the generator, discriminator, and feature discriminator are combined by weighted summation and optimized together, and the total loss is ;

[0038] in, , , They are , The weight coefficient of .

[0039] As a further preference of the present invention, the data processing module adopts samtools software and pysam software, and the specific processing method is: obtain original gene data from a public genome data set; use samtools software to index the BAM file; then, use pysam software to read the BAM file, traverse each alignment therein, extract the starting position and the ending position, and calculate the base distribution of each position according to the CIGAR string; finally, write the starting position, the ending position and the base count of each alignment into a TXT file line by line to form an output format in which each line contains position and base information; then remove the end position of the data, and normalize the features of each sample to ensure that all input data are on the same scale.

[0040] Advantages and beneficial effects of the present invention:

[0041] (1) The method provided by the present invention improves the existing generative adversarial network structure and uses the improved generative adversarial network to generate pseudogene data, thereby improving the quality of the generated data, avoiding large differences between the generated sequences and the real data, and ensuring the reliability of the amplified data in practical applications.

[0042] (2) In the process of training the improved generative adversarial network, the feature discriminator and the standard discriminator together optimize the performance of the generator, so that the generated data is not only close to the real data in terms of overall structure, but also highly consistent in terms of detailed features. By introducing the collaborative optimization of the feature discriminator and the standard discriminator, the generated data is not only improved in diversity, but also highly consistent with the real data in terms of base distribution, biological validity and sequence structure, which significantly improves the practical application value of the generated data.

[0043] (3) When processing the original genetic data, the present invention removes the end position of the data before inputting it into the GAN model. This method can reduce redundant information, allowing the GAN model to focus on the actual content of the mutation, improve the training efficiency of the model and the quality of the training data, enable the model to generate more diverse samples, and the generated data is closer to the distribution of the original data.

[0044] (4) The method of the present invention can not only effectively increase the sample size and diversity of the data set, but also maintain the consistency of data distribution, which is helpful to improve the generalization ability of the machine learning model, especially in the amplification of text data and gene data, and provides more abundant data support for subsequent model training.

[0045] (5) The present invention uses a support vector machine (SVM) to conduct comparative experiments to verify the performance of the generated data in terms of accuracy, recall, F1-score, ROC curve and confusion matrix, to prove whether the method can effectively generate data that is similar to the original data and has high quality; the results show that the method provided by the present invention can effectively generate genetic data that is similar to the original data and has high quality. The method has significant practical value and can effectively generate more representative training samples in the field of genetic data. BRIEF DESCRIPTION OF THE DRAWINGS

[0046] Figure 1 A schematic diagram of the improved GAN network structure provided by the present invention;

[0047] Figure 2 This is a schematic diagram of the original partial gene text data;

[0048] Figure 3 This is a schematic diagram of some gene text data after amplification;

[0049] Figure 4 Classification accuracy of the original data set;

[0050] Figure 5 Classification accuracy of the augmented dataset. DETAILED DESCRIPTION

[0051] In order to enable those skilled in the art to better understand the technical solution and advantages of the present invention, the present application is described in detail below in conjunction with the accompanying drawings, but it is not intended to limit the protection scope of the present invention.

[0052] like Figure 1 As shown, the present invention provides a gene text data amplification method based on a generative adversarial network (GAN), which aims to generate samples similar to the original gene data through GAN, thereby enhancing the diversity and scale of the data set and improving the training effect of the machine learning model. The method specifically includes the following steps:

[0053] Step 1: Obtain the raw genetic data and preprocess the raw genetic data to ensure that the data format is consistent and meets the GAN input requirements.

[0054] In this embodiment, when processing data, the BAM file format is first converted into the TXT format. Each line of data contains the starting position, ending position and base information of the gene sequence. The base (A, C, T, G, etc.) of each gene sequence will generate a feature vector according to its frequency of occurrence; then the ending position is removed, and only the starting position and the corresponding base frequency data are retained; then the data is normalized to ensure that all input data are on the same scale and meet the model requirements, so as to facilitate the training of the generative adversarial network.

[0055] In this application, Figure 2 The original partial gene text data is shown in the figure. This sample data is a text file processed based on the GIAB (Genome ina Bottle) HG002 dataset. GIAB is a public genomic dataset that provides a wide range of genomic variation information and is often used to verify the accuracy of genomic analysis tools and techniques. HG002 is a sample in the GIAB dataset, representing the genomic data of a human individual. This dataset contains a variety of genomic variations observed in the real world.

[0056] In order to process the BAM file of GIAB into the specified TXT file format through samtools and pysam software. First, use samtools to index the BAM file: samtools index sample.bam. Then, use pysam software to read the BAM file, traverse each alignment in it, extract the starting position and ending position, and calculate the base distribution of each position according to the CIGAR string (including A, C, G, T and M, I, D, S and other information). The matching, insertion, deletion and cutting operations in the CIGAR operation will count the corresponding number of bases according to their length. Finally, the starting position, ending position and base count of each alignment are written into the TXT file line by line, forming an output format with position and base information in each line. After this processing, the output TXT file will contain detailed base statistics for each alignment, with a format similar to: starting position, ending position and count of each base.

[0057] In this processed text data, each line represents the variation information of a genome. The first number of each line of data is the starting position of the genome, and the second number is the ending position; the following letters represent specific bases (such as A, C, G, T), and the numbers represent the count or variation frequency of the corresponding position; this information can be used to analyze gene variations and related genetic characteristics at different positions.

[0058] Specifically, the data format includes:

[0059] The start and end positions indicate the genomic interval where the variation occurs;

[0060] A, C, G, and T represent the counts of four nucleotides (adenine, cytosine, guanine, and thymine) at specific genomic positions;

[0061] M, I, D, S are usually used to indicate specific variation types of genomic sequences (e.g., M is match, I is insertion, D is deletion, and S is jump);

[0062] The processed text files can be easily used for data analysis and training of machine learning models, which is especially valuable in applications such as gene data amplification and genome variation prediction.

[0063] When the data is imported into the model (generating a multi-antibody network) for training, this embodiment processes the data and removes the second data (end position) of the data. The end position is removed to simplify the model input, reduce redundant information, and improve the training efficiency of the model. In genomic data, the starting position and the end position usually define a variation interval together, but since the length and the starting position of the variation are fixed, the end position can actually be inferred from these two values. Therefore, after removing the end position, the model can focus on the actual content of the variation without having to process repeated position information, which helps to improve the quality of the training data. By removing the end position, the model can avoid overfitting a specific interval, generate more diverse samples, improve the performance of the generative adversarial network (GAN) in the amplification of gene text data, and make the generated data closer to the distribution of the original data.

[0064] Step 2: Build a generative adversarial network and input the data processed in step 1 into the generative adversarial network for training;

[0065] In this embodiment, a generator, a discriminator, and a feature discriminator model are designed to generate samples that are highly similar to the original data using adversarial training;

[0066] Specifically, the generative adversarial network includes a generator, a discriminator and a feature discriminator; the generator is a multi-layer perceptron (MLP), which is used to map random noise (latent space vector) to gene feature space, generate a new gene sequence similar to the real data distribution, including four first fully connected layers arranged in sequence, each first fully connected layer adopts LeakyReLU activation function, which helps the network capture nonlinear features in the data, gradually expands the feature dimension through the four first fully connected layers, and finally reduces the data dimension through the output layer, and uses the Tanh activation function to normalize the generated data feature value to [-1, 1], so as to generate output similar to the gene data;

[0067] In this embodiment, the generator input is a 100-dimensional random noise vector, the feature dimension is expanded to 128 after the first fully connected layer, the feature dimension is expanded to 256 after the second fully connected layer, the feature dimension is expanded to 512 after the third fully connected layer, and the feature dimension is expanded to 1024 after the fourth fully connected layer. After the data dimension is reduced to 9 by the output layer, the Tanh activation function is used to generate an output similar to the gene data;

[0068] The generator expression is as follows:

[0069] ;

[0070] in: is the gene sequence generated by the generator, is the weight matrix of the generator, is the noise vector, is the bias term of the generator, is the activation function;

[0071] The discriminator is used to evaluate the authenticity of the generated data, including three layers of second fully connected layers arranged in sequence, and the feature dimension is gradually expanded through the three layers of second fully connected layers. Each second fully connected layer adopts the LeakyReLU activation function to improve the ability to capture the nonlinear characteristics of the data; finally, a probability value between [0, 1] is output through the Sigmoid activation function, indicating the probability that the input is real data;

[0072] In this embodiment, the discriminator input is a 9-dimensional feature, the feature dimension is expanded to 128 after the first second fully connected layer, the feature dimension is expanded to 256 after the second second fully connected layer, and the feature dimension is expanded to 512 after the third second fully connected layer;

[0073] The expression of the discriminator is as follows:

[0074] ;

[0075] in: is the output of the discriminator, representing the input data Is it real data? is the weight matrix of the discriminator, is the bias term of the discriminator, yes The activation function is defined as:

[0076] ;

[0077] The feature discriminator is used to evaluate the consistency of the base distribution between the generated data and the original data (by calculating the ratio of bases such as A, C, G, T in the gene sequence to ensure the consistency of the base distribution between the generated data and the original data), and further constrain the internal features of the generated gene data so that the generated data is consistent with the original data (real data) in terms of overall features. The input of the feature discriminator is a base ratio vector with a length of 4. The input data passes through two layers of the third fully connected layer, and finally outputs the discrimination result through Sigmoid activation;

[0078] In this embodiment, the required 4 dimensions are cut from the 9-dimensional data (the ratio of A, C, T, and G bases are selected as core features), and the base ratio vector with a length of 4 is expanded to 64 after passing through the first third fully connected layer, and the feature dimension is reduced to 1 after passing through the second third fully connected layer;

[0079] The expression of the feature discriminator is as follows:

[0080]

[0081] in: is the output of the feature discriminator, is the distribution vector of the bases ; is the weight matrix of the feature discriminator; is the bias term of the feature discriminator; yes Activation function.

[0082] When training the generative adversarial network, this embodiment initializes the parameters of the generator, discriminator, and feature discriminator, and optimizes the loss functions of the generator, discriminator, and feature discriminator alternately. The optimizer uses the Adam optimization algorithm and adopts the binary cross entropy loss (BCELoss) to optimize the generator, discriminator, and feature discriminator. The three are jointly trained to improve the authenticity and diversity of generated samples and ensure the authenticity and feature consistency of generated data.

[0083] The generator loss function includes the discriminator loss and the feature discriminator loss to ensure that the generated gene sequence not only looks real under the evaluation of the discriminator, but also conforms to the actual base distribution ratio;

[0084] The generator minimizes its loss function To update the parameters:

[0085]

[0086] in: For a random noise distribution P z The expected value of the noise vector z extracted in (z); is the discriminator for generating data The prediction results; Represents the base distribution of real data; represents the base distribution of the generated data; Represents the goal that the generator wants to maximize, that is, As close to 1 as possible means that the generator wants the discriminator to think that the generated sequence is real;

[0087] The discriminator minimizes its loss function To update the parameters:

[0088]

[0089] in: Indicates that for the real data distribution The real data extracted from x Expected value; For a random noise distribution P z The expected value of the noise vector z extracted in (z); is the fake data output by the generator; is the output of the discriminator, representing the input data Whether it is real data;

[0090] The feature discriminator minimizes its loss function To update the parameters:

[0091]

[0092] in, Represents the base distribution of real data; represents the base distribution of the generated data;

[0093] The generator and discriminator are updated through adversarial training. The goal of the generator is to minimize the difference between the generated data and the real data, while the goal of the discriminator is to maximize its ability to distinguish between the real data and the generated data. During the training process, the loss functions of the generator, discriminator, and feature discriminator are combined by weighted summation and jointly optimized. The total loss is ;

[0094] in, , , They are , The weight coefficient of ,The specific weight coefficient setting can be adjusted according to the task, data set and the focus of the data to be generated. If high authenticity is required, the generator weight coefficient is high. If high feature consistency is required, the weight coefficients of the discriminator and feature discriminator are increased.

[0095] When training the GAN model, the application can save the generated genetic data to a file, and the generated positive samples and secondary samples can be used to expand the training data set. The model is continuously trained to enhance the learning ability of the model, improve the accuracy and generalization ability of the model, and then use the trained generative adversarial network to generate genetic data.

[0096] The data amplified by the method provided in this embodiment is as follows Figure 3 As shown. In order to verify the effectiveness of the text data amplification method based on the generative adversarial network, the generated samples are evaluated. In this embodiment, a comparative experiment is designed and implemented, and an experimental group and a control group are set up, wherein the experimental group uses the amplified data set (samples amplified by GAN based on the original data set), and the control group uses the original gene data set. The amplified data set is verified using a support vector machine (SVM), and the two groups of data are classified by SVM. The differences between the experimental group and the control group in terms of accuracy, recall rate, F1-score, ROC curve, confusion matrix, etc. are compared to prove the effectiveness and credibility of the generated data.

[0097] Specifically, in the experiment to verify the effectiveness of the gene text data amplification method based on the generative adversarial network, the original gene data set is firstly trained for classification using the support vector machine (SVM) algorithm. Then, the generative adversarial network (GAN) method proposed in this scheme is used to amplify the data to generate new samples, and the amplified data set is applied to the same SVM classification model for training, and finally the classification accuracy is calculated.

[0098] The experimental results show that the classification accuracy of the original gene dataset is 62.380%, while the classification accuracy of the amplified dataset is 63.428%. Figure 4 and Figure 5 As shown ( Figure 4 and Figure 5 The horizontal axis X is the number of samples classified, and the vertical axis Y is the accuracy rate). The difference in classification accuracy is small, which shows that the difference in classification performance between the amplified dataset and the original gene dataset is very small, and the classification accuracy rates are almost the same. Through this experimental result, it can be determined that the generated amplified data can well maintain the characteristics of the original gene data, verifying the consistency of the amplified data in the feature space, thereby proving the effectiveness of the generative adversarial network method in data amplification. More importantly, the amplified dataset not only increases the amount of data, but also maintains a high degree of similarity with the original data, avoiding the overfitting problem, and helping the model's generalization ability on new samples.

[0099] The data augmentation method proposed in the present invention can not only generate new samples with high similarity, but also ensure that these new samples show the same effect as the original samples in the classification task, proving the applicability and effectiveness of the amplified data for the classification model. Therefore, the data augmentation method of the present technical solution has significant practical value and can effectively generate more representative training samples in the fields of genetic data and so on.

[0100] In the comparative experiment, in addition to the traditional accuracy index, the present invention also adds evaluation indicators such as recall rate, F1-score, ROC curve and confusion matrix to comprehensively evaluate the effectiveness of the amplified data. By comprehensively considering these evaluation indicators, the technical solution can more accurately evaluate the generated data, especially when dealing with unbalanced data sets and complex patterns. After multiple comparisons, the similarity between the generated data and the real data is verified, further proving that the method provided in this embodiment can effectively generate high-quality genetic data that is similar to the original data.

[0101] The above specific examples are used to illustrate the present invention, which is only used to help understand the present invention and is not intended to limit the present invention. For those skilled in the art of the present invention, according to the idea of ​​the present invention, some simple deductions, deformations or substitutions can be made. Therefore, the protection scope of the present invention shall be based on the protection scope of the claims.

Claims

1. A gene text data amplification method based on generative adversarial network, characterized in that: The following steps are involved: Step 1: Obtain the original genetic data and convert it into a text format suitable for generative adversarial network processing; Step 2: Construct a generative adversarial network, input the data processed in step 1 into the generative adversarial network for training, and use the trained generative adversarial network to generate new gene sequences; The generative adversarial network includes a generator, a discriminator and a feature discriminator; the generator is a multi-layer perceptron, which is used to map random noise to a gene feature space and generate a new gene sequence similar to the real data distribution, including four first fully connected layers arranged in sequence, each first fully connected layer adopts a LeakyReLU activation function, and the feature dimension is gradually expanded through the four first fully connected layers. Finally, the data dimension is reduced through the output layer, and the generated data feature value is normalized to [-1,1] using the Tanh activation function to generate an output similar to the gene data; The discriminator is used to evaluate the authenticity of the generated data, including three layers of second fully connected layers arranged in sequence, and the feature dimension is gradually expanded through the three layers of second fully connected layers. Each second fully connected layer adopts the LeakyReLU activation function to improve the ability to capture the nonlinear characteristics of the data; finally, a probability value between [0,1] is output through the Sigmoid activation function, indicating the probability that the input is real data; The feature discriminator is used to evaluate the consistency of the generated data and the original data in base distribution, and further constrain the internal features of the generated gene data so that the generated data is consistent with the original gene data in overall features. The input of the feature discriminator is a base ratio vector with a length of 4. The input data passes through two layers of the third fully connected layer, and finally the discrimination result is output through Sigmoid activation.

2. A gene text data amplification method based on a generative adversarial network according to claim 1, characterized in that: The generator input is a 100-dimensional random noise vector, the feature dimension is expanded to 128 after the first fully connected layer, the feature dimension is expanded to 256 after the second fully connected layer, the feature dimension is expanded to 512 after the third fully connected layer, and the feature dimension is expanded to 1024 after the fourth fully connected layer. The data dimension is reduced to 9 after the output layer, and the Tanh activation function is used; The discriminator input is a 9-dimensional feature, the feature dimension is expanded to 128 after the first second fully connected layer, the feature dimension is expanded to 256 after the second second fully connected layer, and the feature dimension is expanded to 512 after the third second fully connected layer; The base ratio vector with a length of 4 is obtained by truncating the original feature vector containing 9-dimensional data. The ratio of A, C, T, and G bases is selected as the core feature. The feature dimension of the base ratio vector with a length of 4 is expanded to 64 after the first third fully connected layer, and the feature dimension is reduced to 1 after the second third fully connected layer.

3. The method for amplifying gene text data based on a generative adversarial network according to claim 1, characterized in that: The generator expression is as follows: G(z)=Tanh(W g z+b g ); Where: G(z) is the gene sequence generated by the generator, W g is the weight matrix of the generator, z is the noise vector, b g is the bias term of the generator, Tanh is the activation function; The expression of the discriminator is as follows: D(x)=σ(W d x+b d ); Where: D(x) is the output of the discriminator, indicating whether the input data x is real data, w d is the weight matrix of the discriminator, b d is the bias term of the discriminator, σ is the Sigmoid activation function, defined as: The expression of the feature discriminator is as follows: F(feat)=σ(W f ·feat+b f ); Where: F(feat) is the output of the feature discriminator, feat is the distribution vector of the base [A, C, T, G]; W f is the weight matrix of the feature discriminator; b f is the bias term of the feature discriminator; σ is the Sigmoid activation function.

4. The method for amplifying gene text data based on a generative adversarial network according to claim 1, characterized in that: Step 1 uses the data processing module to process the original genetic data, converts the data format into a text form suitable for generative adversarial network training, and makes each genetic data include the starting position, corresponding genetic characteristics and base frequency and variation information.

5. The method for amplifying gene text data based on a generative adversarial network according to claim 3, characterized in that: In the process of training the generative adversarial network, the generator, discriminator and feature discriminator are jointly trained by optimizing the loss function; the generator loss function includes the discriminator loss and the feature discriminator loss; The generator minimizes its loss function To update the parameters: in: For a random noise distribution P z (z) is the expected value of the noise vector z extracted from (z); D(G(z)) is the prediction result of the discriminator on the generated data G(z); feat x Represents the base distribution of real data; feat G(z) represents the base distribution of the generated data; The discriminator minimizes its loss function To update the parameters: Where: E x ~p data(x) Indicates that for the real data distribution p data(x) G(z) is the expected value of the real data x extracted from the generator; G(z) is the fake data output by the generator; D(x) is the output of the discriminator, indicating whether the input data x is real data; The feature discriminator minimizes its loss function To update the parameters: Among them, feat. x Represents the base distribution of real data; feat G(z) represents the base distribution of the generated data; The loss functions of the generator, discriminator, and feature discriminator are combined by weighted summation and optimized together, and the total loss is Among them, λ D , G , F They are The weight coefficient of .

6. The method for amplifying gene text data based on a generative adversarial network according to claim 4, characterized in that: The data processing module uses samtools software and pysam software, and the specific processing method is: obtain original gene data from a public genome data set; use samtools software to index BAM files; then, use pysam software to read the BAM files, traverse each alignment therein, extract the starting position and the ending position, and calculate the base distribution of each position according to the CIGAR string; finally, write the starting position, the ending position and the base count of each alignment into a TXT file line by line to form an output format in which each line contains position and base information; then remove the end position of the data, and normalize the features of each sample to ensure that all input data are on the same scale.

Citation Information

Patent Citations

  • Gene expression profile data classification method based on stacked automatic encoders and generative adversarial networks

    CN118262802A

  • Bidirectional generative adversarial network-based small sample data synthesis method

    CN119167091A