Transformer-based DNA motif search method, device, electronic device, and storage medium
Through the transformer-based reinforcement learning network model to process DNA sequences, the problem of time-consuming search of traditional DNA motifs is solved, and efficient DNA motifs is achieved.
Patent Information
- Application Number
- CN202310271154.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-03-15
- Publication Date
- 2025-08-19
- Estimated Expiration
- 2043-03-15
AI Technical Summary
Traditional DNA model search methods take a long time and cannot guarantee the optimization of search results.
Using a reinforcement learning network model based on transformer, the DNA sequence is obtained, tensorization is performed and input into the pre-trained transformer strategy and evaluation network model is performed to obtain the DNA model search results.
The search process of DNA model is simplified and the search efficiency is improved.
Smart Images

Figure CN116312773B_ABST
Abstract
Description
Technical Field
[0001] The embodiments of the present application relate to, but are not limited to, the field of artificial intelligence technology, and in particular to a transformer-based DNA motif search method, device, electronic device, and computer-readable storage medium. Background Art
[0002] Searching for potential DNA motifs within deoxyribonucleic acid (DNA) fragments with the same biological function helps identify the underlying mechanisms regulating these functions and is crucial for the study of transcriptional regulation. DNA motif searches typically involve inputting thousands of DNA fragments, each tens to hundreds of base pairs long and unlabeled. Traditional DNA motif searches typically use heuristic search algorithms, but these algorithms are time-consuming and cannot guarantee optimal search results. Summary of the Invention
[0003] The following is a summary of the subject matter described in detail herein. This summary is not intended to limit the scope of the claims.
[0004] In order to solve the problems mentioned in the above background technology, the embodiments of the present application provide a transformer-based DNA motif search method, device, electronic device and computer-readable storage medium, which can improve the efficiency of DNA motif search.
[0005] In a first aspect, embodiments of the present application provide a transformer-based DNA motif search method, the method comprising:
[0006] Obtaining the DNA sequence to be searched;
[0007] Performing tensorization processing on the DNA sequence to obtain DNA state information;
[0008] Inputting the DNA state information into a pre-trained reinforcement learning network model for search processing to obtain a DNA motif search result;
[0009] The reinforcement network model includes a transformer policy network model and a transformer evaluation network model. The training process of the reinforcement learning network model is as follows:
[0010] Obtaining DNA training sequences;
[0011] Performing tensor quantization on the DNA training sequence to obtain sequence state information;
[0012] Inputting the sequence state information into the transformer strategy network model for prediction processing to obtain motif prediction information;
[0013] Performing a first calculation on the sequence state information and the motif prediction information based on a preset evaluation algorithm to obtain an original evaluation parameter;
[0014] Inputting the sequence state information and the motif prediction information into the transformer evaluation network model for evaluation processing to obtain prediction evaluation parameters;
[0015] Based on the predicted evaluation parameters, network parameter adjustment processing is performed on the transformer policy network model and the transformer evaluation network model.
[0016] According to the transformer-based DNA motif search method of the embodiment provided in the present application, there are at least the following beneficial effects: first, the DNA sequence to be searched is obtained; then, the DNA sequence is tensorized to obtain the DNA state information; then, the DNA state information is input into the pre-trained reinforcement learning network model for search processing to obtain the DNA motif search result; through the above technical solution, the process of DNA motif search can be greatly simplified and the efficiency of DNA motif search can be improved.
[0017] According to some embodiments of the present application, inputting the sequence state information and the motif prediction information into the transformer evaluation network model for evaluation processing to obtain prediction evaluation parameters includes:
[0018] Building an experience pool based on the sequence state information, the motif prediction information and the original evaluation parameters;
[0019] Extracting historical motif prediction information from the experience pool;
[0020] The sequence state information and the historical motif prediction information are input into the transformer evaluation network model for evaluation processing to obtain the prediction evaluation parameters.
[0021] According to some embodiments of the present application, the performing network parameter adjustment processing on the transformer policy network model and the transformer evaluation network model based on the predicted evaluation parameters includes:
[0022] Comparing the predicted evaluation parameter with the original evaluation parameter to obtain a difference parameter;
[0023] Performing a first network parameter update process on the transformer evaluation network model according to the difference parameter;
[0024] The second network parameter update processing is performed on the transformer policy network model according to the predicted evaluation parameters and the preset policy gradient algorithm.
[0025] According to some embodiments of the present application, performing tensor processing on the DNA sequence to obtain DNA state information includes:
[0026] Performing base discrimination processing on the DNA sequence to obtain base information, wherein the base information includes base type information and base position information;
[0027] The DNA sequence is marked based on the base type information and the base position information to obtain the DNA state information.
[0028] According to some embodiments of the present application, inputting the DNA state information into a pre-trained reinforcement learning network model for search processing to obtain a DNA motif search result includes:
[0029] The DNA state information is input into the pre-trained transformer strategy network model for prediction processing to obtain the DNA motif search result.
[0030] According to some embodiments of the present application, the evaluation algorithm is expressed as follows:
[0031]
[0032] Among them, KDIC represents the original evaluation parameter, N represents the number of fragments in the DNA training sequence, k represents the types of bases contained in the DNA training sequence, and x i represents the number of times the i-th base appears in the selected fragment of the DNA training sequence, q i represents the proportion of the i-th base in the entire DNA training sequence.
[0033] According to some embodiments of the present application, the policy gradient algorithm is expressed as follows:
[0034]
[0035]
[0036] Where θ represents the network parameters in the transformer policy network model; π(θ) represents the motif prediction information; G0 represents the subsequent total reward value based on the motif prediction information; E π(θ) [G0] represents the expected total reward value based on the motif prediction information; γ represents the discount value set based on the sequence state information; G trepresents the return value of each prediction; t represents the number of predictions; A t represents a predicted value of the motif prediction information; S t A state parameter representing the sequence state information; E represents the mathematical expectation symbol; Represents the expected gradient value of the subsequent total reward value based on the motif prediction information.
[0037] In a second aspect, embodiments of the present application further provide a transformer-based DNA motif search device, comprising:
[0038] A first processing module is used to obtain a DNA sequence to be searched;
[0039] A second processing module is used to perform tensor quantization processing on the DNA sequence to obtain DNA state information;
[0040] A third processing module is used to input the DNA state information into a pre-trained reinforcement learning network model for search processing to obtain a DNA motif search result;
[0041] The reinforcement network model includes a transformer policy network model and a transformer evaluation network model. The training process of the reinforcement learning network model is as follows:
[0042] Obtaining DNA training sequences;
[0043] Performing tensor quantization on the DNA training sequence to obtain sequence state information;
[0044] Inputting the sequence state information into the transformer strategy network model for prediction processing to obtain motif prediction information;
[0045] Performing a first calculation on the sequence state information and the motif prediction information based on a preset evaluation algorithm to obtain an original evaluation parameter;
[0046] Inputting the sequence state information and the motif prediction information into the transformer evaluation network model for evaluation processing to obtain prediction evaluation parameters;
[0047] Based on the predicted evaluation parameters, network parameter adjustment processing is performed on the transformer policy network model and the transformer evaluation network model.
[0048] In a third aspect, an embodiment of the present application further provides an electronic device comprising: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the computer program, the transformer-based DNA motif search method as described in the first aspect above is implemented.
[0049] In a fourth aspect, an embodiment of the present application further provides a computer-readable storage medium storing computer-executable instructions, wherein the computer-executable instructions are used to execute the transformer-based DNA motif search method as described in the first aspect above.
[0050] Other features and advantages of the present application will be described in the following description, and in part will become apparent from the description, or will be understood by practicing the present application. The purposes and other advantages of the present application can be achieved and obtained through the structures particularly pointed out in the description, claims and drawings. BRIEF DESCRIPTION OF THE DRAWINGS
[0051] The accompanying drawings are used to provide a further understanding of the technical solution of the present application and constitute a part of the specification. Together with the embodiments of the present application, they are used to explain the technical solution of the present application and do not constitute a limitation on the technical solution of the present application.
[0052] Figure 1 is a flowchart of a transformer-based DNA motif search method provided in one embodiment of the present application;
[0053] Figure 2 This is a flowchart of a reinforcement learning network model training provided by an embodiment of the present application;
[0054] Figure 3 This is a flowchart for calculating prediction evaluation parameters during the reinforcement learning network model training process provided by an embodiment of the present application;
[0055] Figure 4 This is a flow chart of parameter updating during the reinforcement learning network model training process provided by one embodiment of the present application;
[0056] Figure 5 This is a flowchart of performing tensor processing on a DNA sequence in a transformer-based DNA motif search method provided in one embodiment of the present application;
[0057] Figure 6 This is a flowchart of processing DNA motif search results in a transformer-based DNA motif search method provided in one embodiment of the present application;
[0058] Figure 7is a schematic diagram of a transformer-based DNA motif search device provided in one embodiment of the present application;
[0059] Figure 8 This is a schematic diagram of an electronic device provided by an embodiment of the present application. DETAILED DESCRIPTION
[0060] In order to make the purpose, technical solutions and advantages of this application more clear, the following further describes this application in detail with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain this application and are not intended to limit this application.
[0061] It should be noted that although the device schematics illustrate functional module divisions and the flowcharts illustrate logical sequences, in certain circumstances, the steps shown or described may be performed in a sequence that differs from the module divisions in the device or the sequence in the flowcharts. The terms "first," "second," and so on, used in the specification, claims, and drawings, are used to distinguish similar items and are not necessarily used to describe a specific sequence or precedence.
[0062] It should be noted that, unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by those skilled in the art to which this application belongs. The terms used herein are only for the purpose of describing the embodiments of this application and are not intended to limit this application.
[0063] The embodiments of the present application can acquire and process relevant data based on artificial intelligence technology. Artificial Intelligence (AI) is the theory, method, technology, and application system that uses digital computers or machines controlled by digital computers to simulate, extend, and expand human intelligence, perceive the environment, acquire knowledge, and use knowledge to achieve optimal results.
[0064] AI is a new technical discipline that studies and develops theories, methods, technologies, and application systems for simulating, extending, and expanding human intelligence. Artificial intelligence is a branch of computer science that seeks to understand the essence of intelligence and produce new intelligent machines that can respond in a manner similar to human intelligence. Research in this field includes robotics, speech recognition, image recognition, natural language processing, and expert systems. Artificial intelligence can simulate the information processes of human consciousness and thinking. It also 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 achieve optimal results.
[0065] Fundamental AI technologies generally include sensors, dedicated AI chips, cloud computing, distributed storage, big data processing, operating / interaction systems, and mechatronics. AI software technologies primarily encompass computer vision, robotics, biometrics, speech processing, natural language processing, and machine learning / deep learning.
[0066] Artificial intelligence, or AI, is a theory, method, technology, and application system that uses digital computers or machines controlled by digital computers to simulate, extend, and expand human intelligence, perceive the environment, acquire knowledge, and use knowledge to achieve optimal results.
[0067] The servers involved in artificial intelligence technology can be independent servers or cloud servers that provide basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, content delivery networks (CDNs), as well as big data and artificial intelligence platforms.
[0068] The present application provides a transformer-based DNA motif search method, device, electronic device and computer-readable storage medium. First, the DNA sequence to be searched is obtained; then, the DNA sequence is tensorized to obtain DNA state information; then, the DNA state information is input into a pre-trained reinforcement learning network model for search processing to obtain the DNA motif search result; through the above technical solution, the DNA motif search process can be greatly simplified and the DNA motif search efficiency can be improved.
[0069] The transformer-based DNA motif search method provided in the embodiment of the present application relates to the field of artificial intelligence technology. The transformer-based DNA motif search method provided in the embodiment of the present application can be applied to a terminal, can be applied to a server side, or can be software running in a terminal or a server side. In some embodiments, the terminal can be a smart phone, a tablet computer, a laptop computer, a desktop computer, etc.; the server side can 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 communications, middleware services, domain name services, security services, CDN, and big data and artificial intelligence platforms; the software can be an application that implements the transformer-based DNA motif search method, etc., but is not limited to the above forms.
[0070] The present application can be used in many general or special computer system environments or configurations. For example: 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, distributed computing environments including any of the above systems or devices, and the like. The present 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, and the like that perform specific tasks or implement specific abstract data types. The present application can also be practiced in distributed computing environments in which tasks are performed by remote processing devices connected via a communication network. In a distributed computing environment, program modules can be located in local and remote computer storage media, including storage devices.
[0071] It should be noted that in each specific embodiment of the present application, when it comes to the need to perform relevant processing based on data related to the user's identity or characteristics, such as user information, user behavior data, user historical data, and user location information, the user's permission or consent will be obtained first, and the collection, use, and processing of such data will comply with the relevant laws, regulations, and standards of the relevant countries and regions. In addition, when the embodiment of the present application needs to obtain the user's sensitive personal information, the user's separate permission or consent will be obtained through a pop-up window or by jumping to a confirmation page. After clearly obtaining the user's separate permission or consent, the necessary user-related data for the normal operation of the embodiment of the present application will be obtained.
[0072] The embodiments of the present application are further described below with reference to the accompanying drawings.
[0073] like Figure 1 As shown, Figure 1 This is a flowchart of a transformer-based DNA motif search method provided by one embodiment of the present application. The transformer-based DNA motif search method includes but is not limited to steps S100 to S300.
[0074] Step S100, obtaining a DNA sequence to be searched;
[0075] Step S200, performing tensor quantization processing on the DNA sequence to obtain DNA state information;
[0076] In step S300 , the DNA state information is input into a pre-trained reinforcement learning network model for search processing to obtain a DNA motif search result.
[0077] Among them, the reinforcement network model includes the transformer policy network model and the transformer evaluation network model, such as Figure 2 As shown, the training process of the reinforcement learning network model may include but is not limited to the following steps:
[0078] Step S410, obtaining a DNA training sequence;
[0079] Step S420, performing tensor quantization processing on the DNA training sequence to obtain sequence state information;
[0080] Step S430: inputting the sequence state information into the transformer strategy network model for prediction processing to obtain motif prediction information;
[0081] Step S440: performing a first calculation on the sequence state information and the motif prediction information based on a preset evaluation algorithm to obtain original evaluation parameters;
[0082] Step S450: Inputting the sequence state information and the motif prediction information into the transformer evaluation network model for evaluation processing to obtain prediction evaluation parameters;
[0083] Step S460: Adjust the network parameters of the transformer policy network model and the transformer evaluation network model based on the predicted evaluation parameters.
[0084] It should be noted that, first, the DNA sequence to be searched is obtained; then, the DNA sequence is tensorized to obtain the DNA state information; then, the DNA state information is input into the pre-trained reinforcement learning network model for search processing to obtain the DNA motif search result; through the above technical solution, the DNA motif search process can be greatly simplified and the DNA motif search efficiency can be improved.
[0085] It is worth noting that reinforcement learning is a type of machine learning method independent of supervised learning and unsupervised learning. Its idea comes from behaviorism, which is to imitate human learning behavior and gain experience and improve behavior through continuous trial and error. Its biggest difference from supervised learning is that it does not require samples to be labeled.
[0086] It should be noted that DNA motifs are short fragments of the genome. These short sequences are enriched in DNA fragments with the same biological function, such as gene promoter regions and around transcription factor binding sites. DNA motif search involves searching for potential motifs within a specific collection of DNA fragments, typically fragments with the same biological function, such as gene promoter regions or experimentally identified transcription factor binding sites.
[0087] It should be noted that a DNA sequence or gene sequence is a string of letters representing the actual or hypothetical primary structure of a DNA molecule that carries genetic information. A partial DNA sequence or gene sequence is a string of letters representing the actual or hypothetical primary structure of a DNA molecule that carries genetic information. A DNA sequence consists of four nucleotides: adenine, cytosine, guanine, and thymine.
[0088] It should be noted that the transformer network model is a deep learning algorithm framework based on the multi-head attention mechanism; it was originally designed to solve natural language processing problems, and was later widely used in various fields such as image and speech processing.
[0089] It should be noted that in some embodiments, the reinforcement learning framework may include the following major elements: environment, state, agent, action, and reward. The environment is the defining condition of the entire task. In the DNA motif search task, the input DNA sequence is the entire environment, which defines the scope of the entire task. In reinforcement learning, the state refers to the parameters of the environment that can be accessed by the agent. In the motif search task, the various parameters of the input DNA sequence are the state here. This includes the length of each DNA sequence and the specific type of base at each position. The action is the output given by the agent in each attempt. In the motif search task, the output here is the possible motif given. The reward is the evaluation given by the environment for each action and can be a continuous value or a discrete value. In the motif search task, it is the score given by the environment to the possible motifs given by the agent. The agent can include a transformer policy network model and a transformer evaluation network model.
[0090] It should be noted that the acquisition of DNA sequences will first obtain the user's permission or consent, and the collection, use and processing of such data will comply with the relevant laws, regulations and standards of the relevant countries and regions. In addition, when the embodiment of the present application needs to obtain the user's sensitive personal information, the user's separate permission or consent will be obtained through a pop-up window or by jumping to a confirmation page. After the user's separate permission or consent is clearly obtained, the necessary user-related data for the normal operation of the embodiment of the present application will be obtained.
[0091] It should be noted that the DNA state information can be obtained by performing tensor processing on the DNA sequence to be searched; and the tensor processing on the DNA sequence can prepare the prerequisite for subsequent search processing.
[0092] It is worth noting that during the training of the reinforcement learning network model, a DNA training sequence can be first obtained; the DNA training sequence is then tensorized to obtain sequence state information; the sequence state information is then input into the transformer policy network model for prediction processing to obtain motif prediction information; the sequence state information and motif prediction information are input into a preset evaluation algorithm for a first calculation to obtain original evaluation parameters; the sequence state information and motif prediction information are then input into the transformer evaluation network model for evaluation processing to obtain predicted evaluation parameters; and finally, the network parameters of the transformer policy network model and the transformer evaluation network model are adjusted based on the predicted evaluation parameters. The transformer policy network model uses the environment, i.e., the specific base arrangement in the DNA sequence, as input to obtain motif prediction information, and then learns according to the predicted evaluation parameters given by the transformer evaluation network model. Unlike supervised learning, reinforcement learning does not rely on the labels of the input data. By continuously proposing new motif prediction information and adjusting it based on the guessed feedback, the DNA motif search results can be finally obtained.
[0093] In some embodiments, as Figure 3 As shown, the above step S450 may include but is not limited to steps S451 to S453.
[0094] Step S451, constructing an experience pool based on sequence state information, motif prediction information and original evaluation parameters;
[0095] Step S452: extracting historical motif prediction information from the experience pool;
[0096] In step S453, the sequence state information and the historical motif prediction information are input into the transformer evaluation network model for evaluation processing to obtain prediction evaluation parameters.
[0097] It should be noted that in the process of calculating the prediction evaluation parameters, an experience pool is first constructed based on the sequence state information, motif prediction information and original evaluation parameters; then the historical motif prediction information is extracted from the experience pool; finally, the sequence state information and historical motif prediction information are input into the transformer evaluation network model for evaluation processing to obtain the prediction evaluation parameters.
[0098] It is worth noting that the experience pool can be constructed using sequence state information, motif prediction information and original evaluation parameters; then the historical motif prediction information can be extracted from the experience pool; finally, the sequence state information and historical motif prediction information are input into the transformer evaluation network model for evaluation processing to obtain the predicted evaluation parameters.
[0099] In some embodiments, as Figure 4 As shown, the above step S460 may include but is not limited to steps S461 to S463.
[0100] Step S461, comparing the predicted evaluation parameters with the original evaluation parameters to obtain difference parameters;
[0101] Step S462, performing a first network parameter update process on the transformer evaluation network model according to the difference parameter;
[0102] Step S463: Perform a second network parameter update process on the transformer policy network model according to the predicted evaluation parameters and the preset policy gradient algorithm.
[0103] It should be noted that in the process of updating the network parameters, the predicted evaluation parameters are first compared with the original evaluation parameters to obtain the difference parameters; then the first network parameter update processing is performed on the transformer evaluation network model based on the difference parameters; finally, the second network parameter update processing is performed on the transformer policy network model based on the predicted evaluation parameters and the preset policy gradient algorithm.
[0104] It is worth noting that by comparing the predicted evaluation parameters with the original evaluation parameters, the difference parameters can be obtained; then, the first network parameter update processing is performed on the transformer evaluation network model according to the difference parameters to realize the training processing of the transformer evaluation network model; finally, the second network parameter update processing is performed on the transformer policy network model according to the predicted evaluation parameters and the preset policy gradient algorithm to realize the parameter update processing of the transformer policy network model.
[0105] In some embodiments, as Figure 5 As shown, the above step S200 may include but is not limited to step S210 and step S220.
[0106] Step S210, performing base discrimination processing on the DNA sequence to obtain base information, wherein the base information includes base type information and base position information;
[0107] Step S220 : Marking the DNA sequence based on the base type information and the base position information to obtain DNA state information.
[0108] It should be noted that, first, the base information can be obtained by performing base discrimination processing on the DNA sequence, wherein the base information includes base type information and base position information; then, the DNA sequence is marked based on the base type information and base position information to obtain the DNA status information.
[0109] It is worth noting that the base information includes base type information and base position information. The base type information is the base type of the bases arranged in the DNA sequence; the base position information is the base position of the corresponding base in the DNA sequence.
[0110] It is worth noting that in order to facilitate computer equipment to process DNA sequences, the input sequence will first be tensorized and converted into digital bits to facilitate subsequent DNA motif search processing.
[0111] In some embodiments, as Figure 6 As shown, the above step S300 may include but is not limited to step S310.
[0112] In step S310 , the DNA state information is input into the pre-trained transformer strategy network model for prediction processing to obtain a DNA motif search result.
[0113] It should be noted that by inputting the DNA state information into the trained transformer strategy network model for prediction processing, the DNA motif search results can be obtained.
[0114] It can be understood that the parameters of the pre-trained transformer policy network model, that is, the transformer policy network model, have been adjusted. It is only necessary to input the DNA state information into the trained transformer policy network model to obtain the corresponding DNA motif search results.
[0115] In some embodiments, the evaluation algorithm is expressed as follows:
[0116]
[0117] Among them, KDIC represents the original evaluation parameter, N represents the number of fragments in the DNA training sequence, k represents the types of bases contained in the DNA training sequence, and x i represents the number of times the i-th base appears in the selected fragment of the DNA training sequence, q i represents the proportion of the i-th base in the entire DNA training sequence.
[0118] In some embodiments, the policy gradient algorithm is expressed as follows:
[0119]
[0120]
[0121] Among them, θ represents the network parameters in the transformer policy network model; π(θ) represents the motif prediction information; G0 represents the subsequent total reward value based on the motif prediction information; E π(θ) [G0] represents the expected total reward value based on the motif prediction information; γ represents the discount value set based on the sequence state information; G t represents the return value of each prediction; t represents the number of predictions; A t Represents a predicted value of the motif prediction information; S t A state parameter representing sequence state information; E represents the mathematical expectation symbol; Represents the expected gradient value of the subsequent total reward value based on the motif prediction information.
[0122] Through the above technical solution, the DNA sequence to be searched is first obtained; then the DNA sequence is tensorized to obtain the DNA state information; then the DNA state information is input into the pre-trained reinforcement learning network model for search processing to obtain the DNA motif search result; through the above technical solution, the DNA motif search process can be greatly simplified and the DNA motif search efficiency can be improved.
[0123] In addition, if Figure 7 As shown, one embodiment of the present application further provides a transformer-based DNA motif search device 10, comprising:
[0124] The first processing module 100 is used to obtain the DNA sequence to be searched;
[0125] The second processing module 200 is used to perform tensor quantization processing on the DNA sequence to obtain DNA state information;
[0126] The third processing module 300 is used to input the DNA state information into the pre-trained reinforcement learning network model for search processing to obtain DNA motif search results;
[0127] Among them, the reinforcement network model includes the transformer policy network model and the transformer evaluation network model. The training process of the reinforcement learning network model is as follows:
[0128] Obtaining DNA training sequences;
[0129] Perform tensor quantization on the DNA training sequence to obtain sequence state information;
[0130] Input the sequence state information into the transformer strategy network model for prediction processing to obtain the motif prediction information;
[0131] Performing a first calculation on the sequence state information and the motif prediction information based on a preset evaluation algorithm to obtain an original evaluation parameter;
[0132] The sequence state information and motif prediction information are input into the transformer evaluation network model for evaluation processing to obtain the prediction evaluation parameters;
[0133] Based on the predicted evaluation parameters, the network parameters of the transformer policy network model and the transformer evaluation network model are adjusted.
[0134] It should be noted that, first, the DNA sequence to be searched is obtained; then, the DNA sequence is tensorized to obtain the DNA state information; then, the DNA state information is input into the pre-trained reinforcement learning network model for search processing to obtain the DNA motif search result; through the above technical solution, the DNA motif search process can be greatly simplified and the DNA motif search efficiency can be improved.
[0135] It is worth noting that reinforcement learning is a type of machine learning method independent of supervised learning and unsupervised learning. Its idea comes from behaviorism, which is to imitate human learning behavior and gain experience and improve behavior through continuous trial and error. Its biggest difference from supervised learning is that it does not require samples to be labeled.
[0136] It should be noted that DNA motifs are short fragments of the genome. These short sequences are enriched in DNA fragments with the same biological function, such as gene promoter regions and around transcription factor binding sites. DNA motif search involves searching for potential motifs within a specific collection of DNA fragments, typically fragments with the same biological function, such as gene promoter regions or experimentally identified transcription factor binding sites.
[0137] It should be noted that a DNA sequence or gene sequence is a string of letters representing the actual or hypothetical primary structure of a DNA molecule that carries genetic information. A partial DNA sequence or gene sequence is a string of letters representing the actual or hypothetical primary structure of a DNA molecule that carries genetic information. A DNA sequence consists of four nucleotides: adenine, cytosine, guanine, and thymine.
[0138] It should be noted that the transformer network model is a deep learning algorithm framework based on the multi-head attention mechanism; it was originally designed to solve natural language processing problems, and was later widely used in various fields such as image and speech processing.
[0139] It should be noted that in some embodiments, the reinforcement learning framework may include the following major elements: environment, state, agent, action, and reward. The environment is the defining condition of the entire task. In the DNA motif search task, the input DNA sequence is the entire environment, which defines the scope of the entire task. In reinforcement learning, the state refers to the parameters of the environment that can be accessed by the agent. In the motif search task, the various parameters of the input DNA sequence are the state here. This includes the length of each DNA sequence and the specific type of base at each position. The action is the output given by the agent in each attempt. In the motif search task, the output here is the possible motif given. The reward is the evaluation given by the environment for each action and can be a continuous value or a discrete value. In the motif search task, it is the score given by the environment to the possible motifs given by the agent. The agent can include a transformer policy network model and a transformer evaluation network model.
[0140] It should be noted that the acquisition of DNA sequences will first obtain the user's permission or consent, and the collection, use and processing of such data will comply with the relevant laws, regulations and standards of the relevant countries and regions. In addition, when the embodiment of the present application needs to obtain the user's sensitive personal information, the user's separate permission or consent will be obtained through a pop-up window or by jumping to a confirmation page. After the user's separate permission or consent is clearly obtained, the necessary user-related data for the normal operation of the embodiment of the present application will be obtained.
[0141] It should be noted that the DNA state information can be obtained by performing tensor processing on the DNA sequence to be searched; and the tensor processing on the DNA sequence can prepare the prerequisite for subsequent search processing.
[0142] It is worth noting that during the training of the reinforcement learning network model, a DNA training sequence can be first obtained; the DNA training sequence is then tensorized to obtain sequence state information; the sequence state information is then input into the transformer policy network model for prediction processing to obtain motif prediction information; the sequence state information and motif prediction information are input into a preset evaluation algorithm for a first calculation to obtain original evaluation parameters; the sequence state information and motif prediction information are then input into the transformer evaluation network model for evaluation processing to obtain predicted evaluation parameters; and finally, the network parameters of the transformer policy network model and the transformer evaluation network model are adjusted based on the predicted evaluation parameters. The transformer policy network model uses the environment, i.e., the specific base arrangement in the DNA sequence, as input to obtain motif prediction information, and then learns according to the predicted evaluation parameters given by the transformer evaluation network model. Unlike supervised learning, reinforcement learning does not rely on the labels of the input data. By continuously proposing new motif prediction information and adjusting it based on the guessed feedback, the DNA motif search results can be finally obtained.
[0143] The specific implementation of the transformer-based DNA motif search device is basically the same as the specific embodiment of the transformer-based DNA motif search method described above, and will not be repeated here.
[0144] In addition, if Figure 8 As shown, an embodiment of the present application further provides an electronic device 700 , which includes: a memory 710 , a processor 720 , and a computer program stored in the memory 710 and executable on the processor 720 .
[0145] The processor 720 and the memory 710 may be connected via a bus or other means.
[0146] The non-transient software program and instructions required to implement the transformer-based DNA motif search method of the above embodiments are stored in the memory 710. When executed by the processor 720, the transformer-based DNA motif search method of each embodiment is executed, for example, the above-described Figure 1 Method steps S100 to S300, Figure 2 Method steps S410 to S460, Figure 3 Steps S451 to S453 of the method, Figure 4 Steps S461 to S463 of the method, Figure 5 Steps S210 to S220 of the method, Figure 6 Method step S310 in .
[0147] The device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate, i.e., they may be located in one place or distributed across multiple network units. Some or all of the modules may be selected based on actual needs to achieve the objectives of this embodiment.
[0148] In addition, an embodiment of the present application further provides a computer-readable storage medium, which stores computer-executable instructions. The computer-executable instructions are executed by a processor 720 or a controller, for example, by a processor 720 in the above-mentioned device embodiment, so that the processor 720 can execute the transformer-based DNA motif search method in the above-mentioned embodiment, for example, to execute the above-described Figure 1 Method steps S100 to S300, Figure 2 Method steps S410 to S460, Figure 3 Steps S451 to S453 of the method, Figure 4 Steps S461 to S463 of the method, Figure 5 Steps S210 to S220 of the method, Figure 6 Method step S310 in .
[0149] The above embodiments may be used in combination, and modules with the same name in different embodiments may be the same or different.
[0150] The foregoing description describes specific embodiments of the present application, and other embodiments are within the scope of the appended claims. In some cases, the actions or steps recited in the claims may be performed in an order different from that described in the embodiments and still achieve the desired results. In addition, the processes depicted in the accompanying drawings do not necessarily require the specific order shown or the sequential order to achieve the desired results. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.
[0151] The various embodiments in this application are described in a progressive manner. Similar portions between the various embodiments can be referenced to each other, and each embodiment focuses on the differences from the other embodiments. In particular, the device, equipment, and computer-readable storage medium embodiments are generally similar to the method embodiments, so their descriptions are relatively simple. For relevant portions, refer to the descriptions of the method embodiments.
[0152] The apparatus, device, computer-readable storage medium and method provided in the embodiments of the present application correspond to each other. Therefore, the apparatus, device and non-volatile computer storage medium also have similar beneficial technical effects as the corresponding method. Since the beneficial technical effects of the method have been described in detail above, the beneficial technical effects of the corresponding apparatus, device and computer storage medium will not be repeated here.
[0153] In the 1990s, technological improvements could be clearly distinguished as either hardware improvements (for example, improvements to circuit structures like diodes, transistors, and switches) or software improvements (improvements to process flows). However, with the advancement of technology, many process flow improvements today can now be considered direct improvements to hardware circuit structures. Designers almost always create the corresponding hardware circuit structure by programming the improved process flow into the hardware circuit. Therefore, it cannot be said that a process flow improvement cannot be implemented using hardware modules. For example, a programmable logic device (PLD), such as a field programmable gate array (FPGA), is an integrated circuit whose logical function is determined by user programming. Designers can "integrate" a digital system on a PLD through their own programming, without having to hire a chip manufacturer to design and manufacture a dedicated integrated circuit chip. Moreover, nowadays, instead of manually fabricating integrated circuit chips, this programming is mostly done using "logic compiler" software. This is similar to the software compiler used when developing programs. Before compilation, the original code must also be written in a specific programming language, called a hardware description language (HDL). There is not just one HDL, but many, such as ABEL (Advanced Boolean Expression Language), AHDL (Altera Hardware Description Language), Confluence, CUPL (Cornell University Programming Language), HDCal, JHDL (Java Hardware Description Language), Lava, Lola, MyHDL, PALASM, RHDL (Ruby Hardware Description Language), etc. Currently, the most commonly used are VHDL (Very-High-Speed Integrated Circuit Hardware Description Language) and Verilog. Those skilled in the art will also understand that by simply programming the method flow in one of these hardware description languages and then programming it into an integrated circuit, a hardware circuit that implements the logic method flow can be easily obtained.
[0154] The controller can be implemented in any suitable manner. For example, the controller can take the form of a microprocessor or processor and a computer-readable medium storing computer-readable program code (e.g., software or firmware) executable by the (micro)processor, logic gates, switches, application-specific integrated circuits (ASICs), programmable logic controllers, and embedded microcontrollers. Examples of controllers include, but are not limited to, the following microcontrollers: ARC 625D, Atmel AT91SAM, Microchip PIC18F26K20, and Silicone Labs C8051F320. The memory controller can also be implemented as part of the control logic of the memory. Those skilled in the art will also know that in addition to implementing the controller in a purely computer-readable program code format, the controller can be implemented in the form of logic gates, switches, application-specific integrated circuits, programmable logic controllers, and embedded microcontrollers by logically programming the method steps. Therefore, such a controller can be considered a hardware component, and the devices included therein for implementing various functions can also be considered as structures within the hardware component. Or even, the devices for implementing various functions can be considered as both software modules that implement the method and structures within the hardware component.
[0155] The systems, devices, modules, or units described in the above embodiments may be implemented by computer chips or entities, or by products having certain functions. A typical implementation device is a computer. Specifically, the computer may be, for example, a personal computer, a laptop computer, a cellular phone, a camera phone, a smartphone, a personal digital assistant, a media player, a navigation device, an email device, a game console, a tablet computer, a wearable device, or a combination of any of these devices.
[0156] For the convenience of description, the above devices are described as being divided into various units according to their functions. Of course, when implementing the embodiments of the present application, the functions of each unit can be implemented in the same or multiple software and / or hardware.
[0157] Those skilled in the art will appreciate that the embodiments of the present application can be provided as methods, systems, or computer program products. Therefore, the embodiments of the present application can adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, the embodiments of the present application can adopt the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to magnetic disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0158] This specification is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the steps in the flowchart and / or block diagram. Figure 1 a process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0159] These computer program instructions may also be stored in a computer readable memory that can direct a computer or other programmable data processing device to work in a specific manner, so that the instructions stored in the computer readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 a process or multiple processes and / or boxes Figure 1 The function specified in one or more boxes.
[0160] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operational steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing the instructions executed on the computer or other programmable device for implementing the process. Figure 1 a process or multiple processes and / or boxes Figure 1 A step that specifies a function in one or more boxes.
[0161] In a typical configuration, a computing device includes one or more processors (CPUs), input / output interfaces, network interfaces, and memory.
[0162] Memory may include non-permanent storage in a computer-readable medium, random access memory (RAM) and / or non-volatile memory in the form of read-only memory (ROM) or flash RAM. Memory is an example of a computer-readable medium.
[0163] Computer-readable media includes permanent and non-permanent, removable and non-removable media that can be implemented by any method or technology to store information. Information can be computer-readable instructions, data structures, program modules, or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, compact disc read-only memory (CD-ROM), digital versatile disc (DVD) or other optical storage, magnetic cassettes, magnetic disk storage or other magnetic storage devices, or any other non-transmission media that can be used to store information that can be accessed by a computing device. As defined herein, computer-readable media does not include transitory computer-readable media (transitory media), such as modulated data signals and carrier waves.
[0164] It should also be noted that the terms "comprises," "includes," or any other variations thereof are intended to encompass non-exclusive inclusion, such that a process, method, commodity, or apparatus that includes a series of elements includes not only those elements but also other elements not explicitly listed, or includes elements inherent to such process, method, commodity, or apparatus. In the absence of further limitations, an element defined by the phrase "comprises a ..." does not exclude the presence of other identical elements in the process, method, commodity, or apparatus that includes the element.
[0165] In the embodiments of the present application, "at least one" refers to one or more, and "more" refers to two or more. "And / or" describes the association relationship of associated objects, indicating that three relationships may exist. For example, A and / or B can represent the existence of A alone, the existence of A and B at the same time, and the existence of B alone. Among them, A and B can be singular or plural. The character " / " generally indicates that the previous and next associated objects are in an "or" relationship. "At least one of the following" and similar expressions refer to any combination of these items, including any combination of single or plural items. For example, at least one of a, b and c can represent: a, b, c, a and b, a and c, b and c or a and b and c, where a, b, c can be single or multiple.
[0166] Embodiments of the present application may 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, and the like that perform specific tasks or implement specific abstract data types. Embodiments of the present application may also be practiced in distributed computing environments where tasks are performed by remote processing devices connected via a communications network. In a distributed computing environment, program modules may be located in local and remote computer storage media, including storage devices.
[0167] The various embodiments in this application are described in a progressive manner. Similar parts between the various embodiments can be referred to in conjunction with each other. Each embodiment focuses on the differences between the other embodiments. In particular, the system embodiment is generally similar to the method embodiment, so the description is relatively simple. For relevant parts, refer to the partial description of the method embodiment.
[0168] The foregoing is merely an embodiment of the present application and is not intended to limit the present application. For those skilled in the art, the present application may have various modifications and variations. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present application should be included within the scope of the claims of the present application.
Claims
1. A transformer-based DNA motif search method, characterized in that: The method comprises: Obtaining the DNA sequence to be searched; Performing tensor processing on the DNA sequence to obtain DNA state information; Inputting the DNA state information into a pre-trained reinforcement learning network model for search processing to obtain a DNA motif search result; The reinforcement learning network model includes a transformer policy network model and a transformer evaluation network model. The training process of the reinforcement learning network model is as follows: Obtaining DNA training sequences; Performing tensor quantization on the DNA training sequence to obtain sequence state information; Inputting the sequence state information into the transformer strategy network model for prediction processing to obtain motif prediction information; Performing a first calculation on the sequence state information and the motif prediction information based on a preset evaluation algorithm to obtain an original evaluation parameter; Inputting the sequence state information and the motif prediction information into the transformer evaluation network model for evaluation processing to obtain prediction evaluation parameters; Performing network parameter adjustment processing on the transformer policy network model and the transformer evaluation network model based on the predicted evaluation parameters; The step of inputting the sequence state information and the motif prediction information into the transformer evaluation network model for evaluation processing to obtain prediction evaluation parameters includes: Building an experience pool based on the sequence state information, the motif prediction information and the original evaluation parameters; Extracting historical motif prediction information from the experience pool; The sequence state information and the historical motif prediction information are input into the transformer evaluation network model for evaluation processing to obtain the prediction evaluation parameters.
2. The transformer-based DNA motif search method according to claim 1, characterized in that: The performing network parameter adjustment processing on the transformer policy network model and the transformer evaluation network model based on the predicted evaluation parameters includes: Comparing the predicted evaluation parameter with the original evaluation parameter to obtain a difference parameter; Performing a first network parameter update process on the transformer evaluation network model according to the difference parameter; The second network parameter update processing is performed on the transformer policy network model according to the predicted evaluation parameters and the preset policy gradient algorithm.
3. The transformer-based DNA motif search method according to claim 1, wherein: The performing tensorization processing on the DNA sequence to obtain DNA state information includes: Performing base discrimination processing on the DNA sequence to obtain base information, wherein the base information includes base type information and base position information; The DNA sequence is marked based on the base type information and the base position information to obtain the DNA state information.
4. The transformer-based DNA motif search method according to claim 1, wherein: Inputting the DNA state information into a pre-trained reinforcement learning network model for search processing to obtain a DNA motif search result includes: The DNA state information is input into the pre-trained transformer strategy network model for prediction processing to obtain the DNA motif search result.
5. The transformer-based DNA motif search method according to claim 1, wherein: The evaluation algorithm is expressed as follows: Among them, KDIC represents the original evaluation parameter, N represents the number of fragments in the DNA training sequence, k represents the types of bases contained in the DNA training sequence, and x i represents the number of times the i-th base appears in the selected fragment of the DNA training sequence, q i represents the proportion of the i-th base in the entire DNA training sequence.
6. The transformer-based DNA motif search method according to claim 2, wherein: The policy gradient algorithm is expressed as follows: in, Represents the network parameters in the transformer strategy network model; Representing the motif prediction information; Represents the subsequent total reward value based on the motif prediction information; represents the expectation of the subsequent total reward value based on the motif prediction information; represents the discount value set based on the sequence status information; G t represents the return value of each prediction; t represents the number of predictions; A t represents a predicted value of the motif prediction information; S t A state parameter representing the sequence state information; E represents the mathematical expectation symbol; Represents the expected gradient value of the subsequent total reward value based on the motif prediction information.
7. A transformer-based DNA motif search device, characterized in that: The device comprises: A first processing module is used to obtain a DNA sequence to be searched; A second processing module is used to perform tensor quantization processing on the DNA sequence to obtain DNA state information; A third processing module is used to input the DNA state information into a pre-trained reinforcement learning network model for search processing to obtain a DNA motif search result; The reinforcement learning network model includes a transformer policy network model and a transformer evaluation network model. The training process of the reinforcement learning network model is as follows: Obtaining DNA training sequences; Performing tensor quantization on the DNA training sequence to obtain sequence state information; Inputting the sequence state information into the transformer strategy network model for prediction processing to obtain motif prediction information; Performing a first calculation on the sequence state information and the motif prediction information based on a preset evaluation algorithm to obtain an original evaluation parameter; Inputting the sequence state information and the motif prediction information into the transformer evaluation network model for evaluation processing to obtain prediction evaluation parameters; Performing network parameter adjustment processing on the transformer policy network model and the transformer evaluation network model based on the predicted evaluation parameters; The step of inputting the sequence state information and the motif prediction information into the transformer evaluation network model for evaluation processing to obtain prediction evaluation parameters includes: Building an experience pool based on the sequence state information, the motif prediction information and the original evaluation parameters; Extracting historical motif prediction information from the experience pool; The sequence state information and the historical motif prediction information are input into the transformer evaluation network model for evaluation processing to obtain the prediction evaluation parameters.
8. An electronic device comprising: A memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the computer program, the transformer-based DNA motif search method according to any one of claims 1 to 6 is implemented.
9. A computer-readable storage medium storing computer-executable instructions, characterized in that: The computer-executable instructions are used to execute the transformer-based deoxyribonucleic acid (DNA) motif search method according to any one of claims 1 to 6.
Citation Information
Patent Citations
Model training method and device based on reinforcement learning, electronic equipment and medium
CN114974423A
Model training method and device based on reinforcement learning, electronic equipment and medium
CN114974424A