Data feature analysis method based on quantum computing and related device
By using quantum computing-based methods in data feature analysis, using quantum processing networks and quantum convolutional neural networks for feature analysis, the problem of inefficiency in existing large models when processing big data or multi-feature data is solved, and the problem of inefficiency in existing large models is achieved. Efficient and accurate data processing.
Patent Information
- Application Number
- CN202411172377.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-26
- Publication Date
- 2025-02-18
AI Technical Summary
When dealing with application scenarios with large amount of data or large amount of features, existing large models need to consume a lot of computing resources and time in the process of data analysis and inference, resulting in inefficiency.
Using a data feature analysis method based on quantum computing, feature analysis is performed by obtaining the to-process data set and inputting it to a pre-trained quantum processing network, and using a gated network and multiple feature analysis networks, including quantum convolutional neural networks. This method improves the efficiency and accuracy of data processing through shunt processing and the use of quantum convolutional neural networks.
It realizes efficient and accurate training and data set processing of quantum large models, improving processing efficiency and accuracy, especially showing stronger processing capabilities and higher processing efficiency when processing implicit features.
Smart Images

Figure CN119476515A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of big data analysis and processing, and in particular to a data set feature analysis method based on quantum computing and related devices. Background Art
[0002] Large neural network models, also known as large language models (LLM), are an important development trend in the current field of artificial intelligence. They can demonstrate powerful capabilities in multiple fields such as natural language processing and computer vision by combining huge parameters, deep network structures and large-scale training data.
[0003] As the processing capabilities of large models increase, more and more application scenarios may need to be processed with the help of large models. In some scenarios, the amount of data processing may be large (for example, drug property reasoning, weather forecasting, geological surveys, etc.). In the process of using large models for data analysis and / or reasoning, a large amount of computing resources and computing time may be consumed. Summary of the invention
[0004] The embodiments of the present application provide a data feature analysis method and related devices based on quantum computing, so that a quantum big model can be trained more efficiently and accurately. At the same time, the trained quantum big model can process data sets more efficiently and accurately.
[0005] In a first aspect, an embodiment of the present application provides a data feature analysis method based on quantum computing, comprising: obtaining a data set to be processed; inputting the data set to be processed into a pre-trained quantum processing network to obtain a feature analysis result corresponding to the data set to be processed; wherein the quantum processing network comprises: a gating network and multiple feature analysis networks, and the multiple feature analysis networks comprise a quantum convolutional neural network; the gating network is used to determine the feature analysis network corresponding to each data to be processed, and transmit the data set to be processed to the corresponding feature analysis network; the feature analysis network is used to perform feature analysis on the data to be processed.
[0006] Optionally, the above-mentioned data set to be processed includes multiple types of data to be processed;
[0007] The gating network is used to allocate a feature analysis network to each data to be processed based on the type of each data to be processed.
[0008] Optionally, the data to be processed in the data set to be processed includes various drug molecular structure data, wherein different types of drug molecular structure data correspond to different feature analysis networks.
[0009] Optionally, the above feature analysis results are used to indicate new drug molecules for interaction prediction.
[0010] Optionally, before obtaining the data set to be processed, the method further includes: training the quantum processing network to obtain a trained quantum processing network; wherein the step of training the quantum processing network includes: obtaining a training data set; dividing the training data set into a first data set and a second data set; using the first data set to perform a first-stage training on the plurality of feature analysis networks, so that the gating network determines the data type that matches each feature analysis network according to the processing results corresponding to the plurality of feature analysis networks, wherein the feature analysis network processes data of the matching data type that satisfies at least any of the following conditions: the processing rate is greater than a preset rate threshold, and the processing accuracy is greater than a preset accuracy threshold; using the second data set to perform a second-stage training on the plurality of feature analysis networks, so that the gating network inputs each training data in the second data set into the corresponding feature analysis network according to the data type that matches each feature analysis network for second-stage training; in response to detecting that the second-stage training is completed, a trained quantum processing network is obtained.
[0011] Optionally, dividing the training data set into a first data set and a second data set includes:
[0012] If the plurality of feature analysis networks include a feature analysis network carrying a processing type label, determining to randomly select a first number of training data from the training data set to form the first data set, and determining the remaining data from the training data set to be the second data set;
[0013] If the multiple feature analysis networks do not include a feature analysis network carrying a processing type label, it is determined that a second number of training data is randomly selected from the training data set to form the first data set, and the remaining data selected from the training data set is determined as the second data set, wherein the first number is smaller than the second number.
[0014] Optionally, the plurality of feature analysis networks include variational quantum circuits and fully connected neural networks, and the first-stage training and the second-stage training for the plurality of feature analysis networks include the following steps:
[0015] Jointly train the above variational quantum circuit and fully connected neural network using the training dataset and VQNet framework; and,
[0016] The Adam optimizer is used to optimize and update the first stage training and the second stage training process.
[0017] A second aspect of the embodiments of the present application provides a data feature analysis device based on quantum computing, comprising: an acquisition unit, configured to acquire a data set to be processed;
[0018] A processing unit, used to input the data set to be processed into a pre-trained quantum processing network to obtain an analysis result corresponding to the data set to be processed;
[0019] Among them, the above-mentioned quantum processing network includes: a gating network and multiple feature analysis networks, and the above-mentioned multiple feature analysis networks include a quantum convolutional neural network; the above-mentioned gating network is used to determine the feature analysis network corresponding to each data to be processed, and transmit the data set to be processed to the corresponding feature analysis network; the above-mentioned feature analysis network is used to perform feature analysis on the data to be processed.
[0020] A third aspect of the embodiments of the present application provides an electronic device, including: a processor and a memory;
[0021] The processor is connected to the memory, wherein the memory is used to store a computer program, and the processor is used to call the computer program to execute the method in the first aspect of the embodiment of the present application.
[0022] A fourth aspect of an embodiment of the present application provides a computer-readable storage medium, which stores a computer program. The computer program includes program instructions. When the program instructions are executed by a processor, the method in the first aspect of the embodiment of the present application is executed.
[0023] The present application provides a data feature analysis method and related devices based on quantum computing. In the process of processing a data set, the feature analysis network corresponding to each data to be processed will be first determined, and each data to be processed will be processed using a specific feature analysis network. In this way, since each data to be processed in the data set to be processed is shunted, the processing efficiency of the data to be processed can be improved. Moreover, the feature analysis network disclosed in the present application also includes a quantum convolutional neural network, and the quantum convolutional neural network has stronger processing capabilities and higher processing efficiency when processing implicit features. Therefore, the addition of the convolutional neural network can further improve the efficiency and accuracy of the data set processing process disclosed in the present application. BRIEF DESCRIPTION OF THE DRAWINGS
[0024] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0025] Figure 1 An example system block diagram of a data feature analysis method based on quantum computing provided by one embodiment of the present application is shown;
[0026] Figure 2 A schematic diagram of a data feature analysis method based on quantum computing provided by an embodiment of the present application is shown;
[0027] Figure 3 A schematic diagram of the structure of a quantum processing model provided by an embodiment of the present application is shown;
[0028] Figure 4 A schematic diagram of the structure of a data set processing device based on quantum computing provided by one embodiment of the present application is shown;
[0029] Figure 5 A schematic diagram of the structure of a computer device provided in one embodiment of the present application is shown. DETAILED DESCRIPTION
[0030] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.
[0031] Classical computers use transistors to encode information in binary data, such as bits, where each bit can represent a value of 1 or 0. These 1s and 0s act as switches that drive the functions of a classical computer. If there are n bits of data, there are 2n possible classical states, and one state is represented at a time.
[0032] Quantum computers use quantum processors that operate on data represented by quantum bits, also known as qubits. A qubit can represent the classical binary state "0", "1", or a superposition of "0" and "1". Because it can represent a superposition of "0" and "1", a qubit can represent both the "0" and "1" states at the same time. For example, if there are n bits of data, then 2 n Quantum states can be represented simultaneously. Further, qubits in superposition can be related to each other, known as entanglement, where the state of one qubit (whether it is 1 or 0 or both) can depend on the state of another qubit, and more information can be encoded within the two entangled qubits. Based on the principles of superposition and entanglement, qubits can enable quantum computers to perform functions that may be relatively complex and time-consuming for classical computers.
[0033] Please refer to Figure 1, which shows an example system block diagram for implementing a data feature analysis method based on quantum computing provided by an embodiment of the present application. System 100 may be a hybrid computing system including a combination of one or more quantum computers, quantum systems and / or classical computers. Figure 1 In the example shown, system 100 may include a quantum system 110 and a classical computer 120. In one embodiment, quantum system 110 and classical computer 120 may be configured to communicate via one or more of a wired connection and / or a wireless connection (e.g., a wireless network). Quantum system 110 may include a quantum chipset consisting of one or more quantum chips, which includes various hardware components for processing data encoded in quantum bits. The quantum chipset may be a quantum computing core surrounded by infrastructure to protect the quantum chip from electromagnetic noise sources, mechanical vibration sources, heat sources, and other noise sources that may degrade the performance of the quantum chip. Classical computer 120 may be electronically integrated with quantum system 110 via any suitable wired and / or wireless electronic connection.
[0034] exist Figure 1 In the example shown, quantum system 110 can be any suitable set of components capable of performing quantum operations on a physical system. Quantum operations, such as quantum gate operations, manipulate the quantum states of quantum bits to evolve and / or entangle. Figure 1 In the example embodiment shown, the quantum system 110 may include a measurement and control integrated machine 111, an interface 112, and a quantum chip 113. In some embodiments, all or part of each of the measurement and control integrated machine 111, the interface 112, and the quantum chip 113 may be located in a cryogenic environment to help perform quantum operations. The quantum chip 113 may be any hardware capable of processing information using quantum states. The hardware may include a plurality of qubits and a device for coupling or entanglement of the qubits so as to process information using quantum states. Qubits may include, but are not limited to, charge qubits, flux qubits, phase qubits, spin qubits, and ion qubits. The quantum chip may include a set of quantum logic gates configured to perform quantum logic operations on qubits stored in a quantum register. The quantum gate may include one or more single-qubit gates, dual-qubit gates, and / or other multi-qubit gates.
[0035] The measurement and control integrated machine 111 can be any combination of digital computing devices capable of performing quantum computing (e.g., executing quantum circuits) in combination with the interface 112. The digital computing device may include a digital processor and memory for storing and executing quantum instructions using the interface 112. The digital computing device may also include a communication protocol device for receiving instructions and sending the results of the quantum computing performed to a classical computer. In addition, the digital computing device may also include a communication interface with an interface 112. In one embodiment, the measurement and control integrated machine 111 may be configured to receive classical instructions (e.g., from a classical computer 120) and convert the classical instructions into measurement and control instructions for the interface 112. The measurement and control instructions provided to the interface 112 by the measurement and control integrated machine 111 may be, for example, digital signals indicating which quantum gates in the quantum gate need to act on the quantum bit to perform a specific function. The interface 112 may be configured to convert these digital signals into analog signals (e.g., analog pulses of microwave pulses), which may be used to apply quantum gates on the quantum bit to manipulate the interaction between the quantum bits.
[0036] The interface 112 may be a classical-quantum interface, including a device combination capable of receiving instructions from the measurement and control integrated machine 111 and converting the instructions into a device for implementing quantum operations. In one embodiment, the interface 112 may convert instructions from the measurement and control integrated machine 111 into a drive signal that can drive or manipulate a quantum bit, and / or act on a quantum gate on the quantum bit. In addition, the interface 112 may be configured to convert a signal received from the quantum chip 113 into a digital signal that can be processed and transmitted by the measurement and control integrated machine 111. The devices included in the interface 112 may include, but are not limited to, a digital-to-analog converter, an analog-to-digital converter, a waveform generator, an attenuator, an amplifier, an optical fiber, a laser, and a filter. The interface 112 may further include a circuit component configured to measure a plurality of quantum bits after the quantum gate acts, wherein the measurement may produce a result represented by a classical bit. Each measurement performed by the interface 112 may be read out to a device connected to the quantum system 110, such as a classical computer 120. The plurality of measurement results provided by the interface 112 may represent a probabilistic result.
[0037] The classical computer 120 can include hardware components such as a processor and a storage device (e.g., including a memory device and a classical register) for processing data encoded in classical bits. In one embodiment, the classical computer 120 can be configured to provide various control signals, instructions, and data encoded in classical bits to the quantum system 110. Further, the quantum state measured by the quantum system 110 can be read out by the classical computer 120, and the classical computer 120 can store the measured quantum state as a classical bit in a classical register. In one embodiment, the classical computer 120 can be any suitable combination of computer executable hardware and / or computer executable software capable of executing a preparation module 121 to perform quantum computing using data stored in a data storage module 122 as part of the construction and calculation. The data storage module 122 can be a repository for data to be analyzed using a quantum computing algorithm and the results of the analysis. The preparation module 121 can be a program or module capable of preparing classical data from the data storage module 122 as part of a quantum circuit implementation. The preparation module 121 can be instantiated as part of a larger algorithm, such as a function call of an application programming interface (API), or by parsing hybrid classical-quantum computing into aspects of quantum and classical computing. For example, the preparation module 121 can generate instructions for creating a quantum circuit using quantum gates. In an embodiment, such instructions can be stored by the measurement and control integrated machine 111, and components of the interface 112 can be instantiated to execute, so that the quantum operation of the quantum gate can be performed on the quantum chip 113.
[0038] The classical computer 120 may be a laptop computer, a desktop computer, a vehicle integrated computer, a smart mobile device, a tablet device, and / or any other suitable classical computing device. Additionally or alternatively, the classical computer 120 may also be operated as part of a cloud computing service model, such as software as a service (SaaS), platform as a service (PaaS), or infrastructure as a service (IaaS). The classical computer 120 may also be located in a cloud computing deployment model, such as a private cloud, a community cloud, a public cloud, or a hybrid cloud.
[0039] It can be seen from the above-mentioned background technology that in application scenarios where large amounts of data are involved in processing using large models, or in application scenarios where a large amount of features need to be processed, due to the large amount of data and / or features that need to be processed, the large model needs to consume more computing resources during the data processing process, thereby wasting time for data processing.
[0040] The data feature analysis method and related devices based on quantum computing provided by the present disclosure will first determine the feature analysis network corresponding to each data to be processed during the process of processing the data set, and use the specific feature analysis network to process each data to be processed. In this way, since each data to be processed in the data set to be processed is shunted, the processing efficiency of the data to be processed can be improved. Moreover, the feature analysis network of the present disclosure also includes a quantum convolutional neural network, and the quantum convolutional neural network has stronger processing capabilities and higher processing efficiency when processing implicit features. Therefore, the addition of the convolutional neural network can further improve the efficiency and accuracy of the data set processing process of the present disclosure.
[0041] Please refer to Figure 2 , which shows a flow chart of a data feature analysis method based on quantum computing provided by an embodiment of the present application. The method can be applied to a computer device, which refers to an electronic device with data computing and processing capabilities. For example, the execution subject of each step can be Figure 1 The quantum computer or classical computer shown (can be selected as needed). The method may include the following steps:
[0042] Step 201: Obtain a data set to be processed;
[0043] Step 202: Input the data set to be processed into a pre-trained quantum processing network to obtain analysis results corresponding to the data set to be processed.
[0044] Here, the quantum processing network includes: a gate control network and multiple feature analysis networks, and the multiple feature analysis networks include a quantum convolutional neural network;
[0045] The gating network is used to determine the feature analysis network corresponding to each data to be processed, and transmit the data set to be processed to the corresponding feature analysis network; the feature analysis network is used to perform feature analysis on the data to be processed.
[0046] As an example, the data set to be processed may include multiple types of data. For example, if the data set to be processed is drug molecules and their interaction data, then the data set to be processed may include drug molecule data for cardiovascular treatment, drug molecule data for hypertension treatment, drug molecule data for analyzing antibiotics, and interaction data of various types of drug molecule data. For another example, if the data to be processed is user portrait data, then it may include user age data, user personality data, user height data, and the like.
[0047] It is understandable that in the present disclosure, the amount of data in the data set to be processed may be large and may contain many features. Therefore, using conventional classic large models for processing may take a lot of time.
[0048] As an example, the gating network is mainly used to perform preliminary recognition processing on the data to be processed to determine the feature analysis network used to process the data to be processed, while the feature analysis network can be used to perform feature analysis on the data to be processed.
[0049] The feature analysis results of the data to be processed can more accurately replace the data to be processed. For example, the feature analysis results of a drug molecule data can include drug action characteristics (which can indicate the target population, action time, effect, etc.), molecular characteristics, etc., that is, the interaction between drugs can be predicted based on the feature analysis results. For another example, in the user portrait scenario, the user's character portrait can be portrayed based on the feature analysis results.
[0050] As an example, quantum convolutional neural networks have obvious advantages in processing efficiency compared to classical convolutional neural networks. At the same time, because in quantum convolutional neural networks, data will be encoded on quantum bits, the entanglement between quantum bits can more accurately determine the implicit features between the data.
[0051] However, since the quantum convolutional neural network needs to encode data into quantum bits, the quantum logic gates on the quantum chip act on the quantum bits and observe the state of the quantum bits to obtain the feature analysis results. This process consumes quantum resources. Since the existing quantum resources are limited, only some of the multiple feature analysis networks can use quantum convolutional networks, while other feature analysis networks can be classical networks.
[0052] In some possible implementations, the feature analysis network corresponding to data including more implicit features can be a quantum convolutional network, so that the feature analysis results of such data can be obtained more efficiently and accurately.
[0053] As an example, the number of quantum convolutional neural networks in multiple feature analysis networks can be limited according to actual conditions. The specific number of quantum convolutional neural networks is not limited here. It only needs to be reasonably selected according to actual conditions. For example, the number of quantum convolutional neural networks can be 5, 10, etc.
[0054] Of course, the specific number of multiple feature analysis networks can also be processed according to actual conditions. Since multiple feature analysis networks are set up, the data that each feature analysis network is good at processing may be different. For example, some feature analysis networks can focus on analyzing the interactions of antibiotics, and some feature analysis networks can focus on analyzing the interactions of cardiovascular drugs, etc. By setting up multiple feature analysis networks, it is possible to determine which feature analysis network to use for processing based on the specific data meaning of each data to be processed, thereby making the obtained feature analysis results more accurate.
[0055] At the same time, since multiple feature analysis networks are set up, multiple data to be processed can also be processed in parallel, thereby speeding up the processing efficiency of the data to be processed.
[0056] It can be seen that in the present disclosure, the quantum processing network may include a gated network and multiple feature analysis networks, and some of the multiple feature analysis networks may be quantum convolutional neural networks. In this way, some of the data to be processed may also be feature analyzed by the quantum convolutional neural network, and the quantum convolutional neural network can efficiently perform feature analysis on the data set to be processed that may contain more features. Since multiple feature analysis networks are set up, multiple different data to be processed can be processed by multiple feature analysis networks at the same time, thereby further improving the processing efficiency of the data set to be processed. That is, after obtaining the data set to be processed, the data set to be processed is input into the quantum processing network, which helps to efficiently and accurately obtain the feature analysis results for the data set to be processed.
[0057] In some embodiments, the data set to be processed includes multiple types of data to be processed; and the gating network can be used to assign a feature analysis network to each data to be processed based on the type of each data to be processed.
[0058] As an example, different types of data to be processed may correspond to different types. Taking the data set to be processed as a drug data set as an example, some data to be processed may be molecular data of antibiotics, and some data to be processed may be molecular data of cardiovascular drugs.
[0059] That is, here, the different types of data to be processed can be understood as the data to be processed being data corresponding to different objects.
[0060] As an example, different feature analysis networks can be used to process different types of data to be processed, which helps to make the final feature analysis results more accurate.
[0061] In some embodiments, the data to be processed in the data set to be processed includes molecular structure data of each drug.
[0062] Here, the feature analysis networks corresponding to different types of drug molecular structure data may be different.
[0063] That is, a feature analysis network can focus on the molecular structure data for a certain type of drug.
[0064] In some embodiments, the feature analysis results can be used to indicate new drug molecule pairs for interaction prediction results.
[0065] In some embodiments, before inputting the data set to be processed into multiple quantum processing networks, the model can also be used to perform feature extraction processing on the data to be processed to obtain a feature vector suitable for the quantum processing network, and then the quantum processing network is used to analyze the feature vector to obtain a feature analysis result.
[0066] Of course, during the training process, the training data can also be processed through feature extraction and converted into feature vectors suitable for the quantum processing network before training the quantum processing network.
[0067] To understand quantum processing networks, we can combine Figure 3 To explain, Figure 3 It can be understood as a structural schematic diagram of a possible quantum processing network provided by the present disclosure, consisting of Figure 3 It can be seen that after passing through the gating network, the gating network can determine which specific one or more of the multiple feature analysis networks are to perform feature analysis processing according to the properties of the data set to be processed, so as to obtain more accurate features.
[0068] Further, in Figure 3 In the embodiment, some of the multiple feature analysis networks can be quantum convolutional networks. Of course, the specific feature analysis networks that are quantum convolutional networks can be limited according to actual conditions.
[0069] In some implementations, the gated network can determine that a certain data to be processed corresponds to at least one feature analysis network, so that the feature analysis results of the at least one feature analysis network for the data to be processed can be sorted and summarized, so that the feature analysis results of the data to be processed that are finally determined are more accurate. For example, at least one feature analysis network is a quantum convolutional neural network, so that the quantum recognition results can be compared with the classical recognition results, which helps to obtain the feature analysis results more accurately.
[0070] In the related art, when training a large model containing quantum circuits, it is usually more difficult to train than a classical large model. For example, more training samples may be required to achieve a better effect. It can also be understood that more computing resources may be required to train a large model containing quantum circuits to a better effect. The training method for the quantum processing network disclosed in the present invention utilizes the classification idea, that is, there will be targeted classification of training data, so that part of the data can be dedicated to training a certain feature analysis model. In this way, the consumption of computing resources in the training process is greatly reduced, and the training efficiency for the quantum processing model can be improved. Specifically:
[0071] In some embodiments, before step 201 (obtaining a data set to be processed), the method may further include: training the quantum processing network to obtain a trained quantum processing network;
[0072] The steps of training the quantum processing network include:
[0073] Get the training data set;
[0074] The first stage training is performed on the plurality of feature analysis networks using the first data set, so that the gating network determines the data type that matches each feature analysis network according to the analysis results corresponding to the plurality of feature analysis networks, wherein the analysis network processes the data of the matching data type to meet at least one of the following conditions: the processing rate is greater than a preset rate threshold, and the processing accuracy is greater than a preset accuracy threshold;
[0075] Performing second-stage training on multiple feature analysis networks using the second data set, so that the gating network inputs each training data in the second data set into the corresponding feature analysis network for second-stage training according to the data type matched by each feature analysis network;
[0076] In response to detecting that the second stage of training is completed, a trained quantum processing network is obtained.
[0077] As an example, the first stage of training can be understood as overall recognition training, while the second stage of training can be understood as special training. That is, the first stage of training can determine the characteristics of each feature analysis network data for data processing. For example, feature analysis network A may be slightly faster in processing the molecular structure data of drug molecule A, feature analysis network B may be slightly faster in processing the molecular structure data of drug molecule B, and feature analysis network C may be more accurate in processing the molecular structure data of drug molecule C.
[0078] In the first stage of training, the gated network is mainly used to record and count the processing status of each feature analysis network on the training data in the first data set; thereby, the processing characteristics of the feature analysis network on the data can be determined, and thus, what type of data each feature analysis network is good at processing can be determined.
[0079] As an example, during the second stage training process, a loss function may be set, and when the loss value calculated by the loss function is less than a preset threshold, it may indicate that the second stage training is finished.
[0080] Of course, the specific selection of the loss function and the specific value of the preset threshold can be limited according to actual conditions.
[0081] It should be noted here that during the first stage of training, each data in the first data set will be processed by each feature analysis network, so that the gating unit can better analyze the characteristics of each feature analysis network for the data processing process.
[0082] At the same time, during the first stage of training, adjustments can be made to some networks based on the results to make the output results more accurate. During the training process, how to adjust the network structure and / or parameters based on the results can be reasonably set according to the actual situation. The specific method of adjusting the model parameters and / or structure based on the output results during the training process is not limited here.
[0083] During the second stage of training, since the gating network has recorded the data processing characteristics of each feature analysis network in the first stage, each feature analysis network can be specially trained in the second stage of training. For example, if feature analysis network A is good at processing the molecular structure data of drug A molecules, the data related to drug A can be used to train feature analysis network A. In this way, the training time for the feature analysis network can be greatly reduced.
[0084] It can be seen that the method disclosed in the present invention divides the training data set into a first data set and a second data set. The first data set is used to overall determine the characteristics of each feature analysis network for data analysis, while the second data set is used to perform in-depth special training for each feature analysis network. In this way, each feature analysis network does not need to process each training data in the training data set to obtain an accuracy that meets the requirements, thereby greatly reducing the time to obtain a trained quantum processing network.
[0085] In some embodiments, if the plurality of feature analysis networks include a feature analysis network carrying a processing type label, determining to randomly select a first number of training data from the training data set to form a first data set, and determining the remaining data from the training data set to be a second data set;
[0086] If the plurality of feature analysis networks does not include a feature analysis network carrying a processing type label, it is determined that a second number of training data is randomly selected from the training data set to form a first data set, and the remaining data selected from the training data set is determined as a second data set.
[0087] Here, the first number may be smaller than the second number
[0088] As an example, when the user configures the feature analysis network in the initial quantum network, the corresponding processing type labels can be configured for certain feature analysis networks to indicate the type of data that the feature analysis network is good at processing. In this way, the number of training sample data required in the first stage of training can be further reduced, thereby further improving the training efficiency of the quantum processing network.
[0089] As an example, when all feature analysis networks correspond to corresponding processing type labels, the first number may be 0.
[0090] Of course, in a specific implementation, the specific values of the first number and the second number can be reasonably set according to actual conditions. For example, the first number is not greater than one-fourth of the total number of training data sets, and the second number is not greater than one-half of the total number of training data sets. Of course, the specific values of the first number and the second number are not limited here.
[0091] In some implementations, the number of training data in the first data set can be smaller than the number of training data in the second data set. The reason is that the first data set is mainly used to determine the characteristics of each feature analysis network processing data, while the second data set is more focused on training the accuracy of each feature analysis network processing data. This setting method can more efficiently obtain a trained quantum processing network.
[0092] It should be understood that the combination of classical networks and gated networks in multiple feature analysis networks can also be understood as a mixture of experts (MoE). Since multiple feature analysis networks also include quantum convolutional networks, the composed networks can be understood as quantum graph neural networks (QGNNs). In quantum graph neural networks, the expert model (each feature analysis network can be understood as an expert network) selection mechanism of the mixture of expert models is utilized. In this way, training can be completed efficiently in the training phase, and data sets can also be processed efficiently in the application phase.
[0093] In order to better understand the idea of the present disclosure, the effect of the present disclosure is further explained below in combination with related technologies. For example, in the field of drug prediction, specifically, in the prediction scheme of drug interactions, the consumption of hardware resources in the model training process may increase dramatically due to the continuous expansion of the data set size. The ogbl-ddi data set (Open GraphBenchmark for Drug-Drug Interaction, a public graph data set) has stored approximately 1,067,911 pairs of relationships between 4,267 drug molecules. When training the model, in order to balance the number of positive and negative samples, it is usually necessary to generate the same number of negative samples. Therefore, the model may need to process 2,135,822 pieces of data in each cycle; when using a quantum convolutional neural network model to predict drug interactions, each cycle may need to run 2,135,822 quantum circuits, which will consume a huge amount of quantum computing resources.
[0094] In addition, the interactions between the 1,067,911 pairs of drug molecules mentioned above involve a variety of complex mechanisms. Traditional methods are difficult to accurately model different types of drug molecules, which can easily lead to inaccurate predictions. For example, some expert networks focus on analyzing the interactions of antibiotics, while others focus on the interactions of cardiovascular drugs.
[0095] In the present disclosure, since the training sample set is divided into two data sets and the training process is divided into two stages, only in the first stage of training is it necessary to process all the data in the first data set, and in the second stage of training, only part of the data in the second data set needs to be processed. In this way, the computing resources required in the training process are greatly reduced, and accordingly, the efficiency of the training process can be improved.
[0096] In some embodiments, the plurality of feature analysis networks include variational quantum circuits and fully connected neural networks. The following steps may be included in the process of performing the first stage training and the second stage training on the plurality of feature analysis networks:
[0097] Jointly train variational quantum circuits and fully connected neural networks using training datasets and the VQNet framework; and,
[0098] The Adam optimizer is used to optimize and update the first stage training and the second stage training process.
[0099] As an example, since multiple feature analysis networks include variational quantum circuits and fully connected neural networks, using the VQNet framework to jointly train variational quantum circuits and fully connected neural networks can better combine quantum computing and classical computing in quantum circuits for training and speed up training efficiency.
[0100] Furthermore, by using the Adam optimizer to optimize and update the first-stage training and the second-stage training processes, the efficiency of the first-stage training and the second-stage processes can be further improved.
[0101] As an example, the classical network in the feature analysis network can be a fully connected neural network, and the fully connected neural network can also help reduce the model complexity of the quantum processing network due to its relatively simple overall structure.
[0102] Figure 4 The schematic diagram of the structure of a data feature analysis device 400 based on quantum computing provided by one embodiment of the present application is shown. The device 400 includes:
[0103] An acquisition unit 401 is used to acquire a data set to be processed;
[0104] The processing unit 402 is used to input the data set to be processed into a pre-trained quantum processing network to obtain an analysis result corresponding to the data set to be processed; wherein the quantum processing network includes: a gated network and a plurality of feature analysis networks, and the plurality of feature analysis networks include a quantum convolutional neural network;
[0105] The above-mentioned gating network is used to determine the feature analysis network corresponding to each data to be processed, and transmit the data set to be processed to the corresponding feature analysis network; the above-mentioned feature analysis network is used to perform feature analysis on the data to be processed.
[0106] In some embodiments, the above-mentioned data set to be processed includes multiple types of data to be processed;
[0107] The gating network is used to allocate a feature analysis network to each data to be processed based on the type of each data to be processed.
[0108] In some embodiments, the data to be processed in the data set to be processed includes various drug molecular structure data, wherein different types of drug molecular structure data correspond to different feature analysis networks.
[0109] In some embodiments, the above feature analysis results are used to indicate new drug molecules for interaction prediction.
[0110] In some embodiments, the apparatus 400 is further used to train the quantum processing network to obtain a trained quantum processing network;
[0111] The steps of training the quantum processing network include:
[0112] Get the training data set;
[0113] Dividing the training data set into a first data set and a second data set;
[0114] The first stage training of the plurality of feature analysis networks is performed using the first data set, so that the gating network determines the data type matched by each feature analysis network according to the processing results corresponding to the plurality of feature analysis networks, wherein the feature analysis network processes data of the matching data type to meet at least one of the following conditions: the processing rate is greater than a preset rate threshold, and the processing accuracy is greater than a preset accuracy threshold;
[0115] The plurality of feature analysis networks are trained in the second stage using the second data set, so that the gating network inputs each training data in the second data set into the corresponding feature analysis network for the second stage training according to the data type matched by each feature analysis network;
[0116] In response to detecting that the second stage of training is completed, a trained quantum processing network is obtained.
[0117] In some embodiments, the device 400 is further used to: if the plurality of feature analysis networks include a feature analysis network carrying a processing type label, determine to randomly select a first number of training data from the training data set to form the first data set, and determine the remaining data from the training data set as the second data set;
[0118] If the multiple feature analysis networks do not include a feature analysis network carrying a processing type label, it is determined that a second number of training data is randomly selected from the training data set to form the first data set, and the remaining data selected from the training data set is determined as the second data set, wherein the first number is smaller than the second number.
[0119] In some embodiments, the plurality of feature analysis networks include variational quantum circuits and fully connected neural networks, and the first stage training and the second stage training for the plurality of feature analysis networks include the following steps:
[0120] Jointly train the above variational quantum circuit and fully connected neural network using the training dataset and VQNet framework; and,
[0121] The Adam optimizer is used to optimize and update the first stage training and the second stage training process.
[0122] Figure 5A schematic diagram of the structure of a computer device provided by an embodiment of the present application is shown, including a memory and a processor, the memory stores a computer program, and the processor implements the functions of the computer system of the data feature analysis method based on quantum computing in any of the above-mentioned embodiments when executing the computer program.
[0123] An embodiment of the present application also provides a computer-readable storage medium having a computer program stored thereon. When the computer program is executed by a computer, the computer executes the functions of the computer system of the data feature analysis method based on quantum computing in any of the above embodiments.
[0124] The embodiments of the present application also provide a computer program product comprising instructions, which, when executed by a computer, enables the computer to perform the functions of a computer system of the data feature analysis method based on quantum computing in any of the above embodiments.
[0125] It should be understood that the specific examples in this application are only intended to help those skilled in the art to better understand the implementation methods of this application, rather than to limit the scope of the present invention.
[0126] It can be understood that in the various implementations of the present application, the size of the serial number of each process does not mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the implementation methods of the present application.
[0127] It can be understood that the various embodiments described in this application can be implemented individually or in combination, and the embodiments of this application are not limited to this.
[0128] Unless otherwise stated, all technical and scientific terms used in the embodiments of the present application have the same meaning as those generally understood by those skilled in the art of the technical field of the present application. The terms used in the present application are only for the purpose of describing specific embodiments and are not intended to limit the scope of the present application. The term "and / or" used in the present application includes any and all combinations of one or more related listed items. The singular forms of "a kind of", "above" and "the" used in the embodiments of the present application and the appended claims are also intended to include plural forms, unless the context clearly indicates other meanings.
[0129] It can be understood that the processor of the embodiment of the present application can be an integrated circuit chip with signal processing capabilities. In the implementation process, each step of the above method implementation can be completed by the hardware integrated logic circuit or software instructions in the processor. The above processor can be a general processor, a digital signal processor (DigitalSignal Processor, DSP), an application-specific integrated circuit (Application Specific Integrated Circuit, ASIC), a field programmable gate array (Field Programmable Gate Array, FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components. The methods, steps and logic block diagrams disclosed in the embodiment of the present application can be implemented or executed. The general processor can be a microprocessor or the processor can also be any conventional processor, etc. The steps of the method disclosed in the embodiment of the present application can be directly embodied as a hardware decoding processor to perform, or the hardware and software modules in the decoding processor are combined and executed. The software module can be located in a mature storage medium in the field such as a random access memory, a flash memory, a read-only memory, a programmable read-only memory or an electrically erasable programmable memory, a register, etc. The storage medium is located in the memory, and the processor reads the information in the memory and completes the steps of the above method in combination with its hardware.
[0130] It is understood that the memory in the embodiments of the present application may be a volatile memory or a non-volatile memory, or may include both volatile and non-volatile memory. Among them, the non-volatile memory may be a read-only memory (ROM), a programmable read-only memory (programmable ROM, PROM), an erasable programmable read-only memory (erasable PROM, EPROM), an electrically erasable programmable read-only memory (EEPROM) or a flash memory. The volatile memory may be a random access memory (RAM). It should be noted that the memory of the systems and methods described herein is intended to include, but is not limited to, these and any other suitable types of memory.
[0131] Those of ordinary skill in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.
[0132] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the systems, devices and units described above can refer to the corresponding processes in the aforementioned method implementation methods and will not be repeated here.
[0133] In the several embodiments provided in the present application, it should be understood that the disclosed systems, devices and methods can be implemented in other ways. For example, the device implementation described above is only schematic. For example, the division of units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.
[0134] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the present embodiment.
[0135] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.
[0136] If the function is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application, or the part that contributes to the prior art or the part of the technical solution, can be embodied in the form of a software product. The computer software product is stored in a storage medium, including a number of instructions for a computer device (which can be a personal computer, server, or network device, etc.) to perform all or part of the steps of each implementation method of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM), random access memory (RAM), disk or optical disk, etc., various media that can store program codes.
[0137] The above are only specific embodiments of the present application, but the protection scope of the present invention is not limited thereto. Any person skilled in the art who is familiar with the present technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application. Therefore, the protection scope of the present invention shall be subject to the protection scope of the claims.
Claims
1. A data feature analysis method based on quantum computing, characterized in that: include: Get the data set to be processed; Inputting the data set to be processed into a pre-trained quantum processing network to obtain a feature analysis result corresponding to the data set to be processed; Wherein, the quantum processing network includes: a gated network and a plurality of feature analysis networks, and the plurality of feature analysis networks include a quantum convolutional neural network; The gating network is used to determine the feature analysis network corresponding to each data to be processed, and transmit the data set to be processed to the corresponding feature analysis network; the feature analysis network is used to perform feature analysis on the data to be processed.
2. The method according to claim 1, characterized in that The data set to be processed includes multiple types of data to be processed; The gating network is used to allocate a feature analysis network to each data to be processed based on the type of each data to be processed.
3. The method according to claim 2, characterized in that The data to be processed in the data set to be processed includes various drug molecular structure data, wherein different types of drug molecular structure data correspond to different feature analysis networks.
4. The method according to claim 3, characterized in that The characteristic analysis results are used to indicate new drug molecules for interaction prediction.
5. The method according to claim 1, characterized in that Before obtaining the data set to be processed, the method further includes: training the quantum processing network to obtain a trained quantum processing network; The steps of training the quantum processing network include: Get the training data set; Dividing the training data set into a first data set and a second data set; The first stage training of the plurality of feature analysis networks is performed using the first data set, so that the gating network determines the data type matched by each feature analysis network according to the processing results corresponding to the plurality of feature analysis networks, wherein the feature analysis network processes data of the matching data type to meet at least one of the following conditions: the processing rate is greater than a preset rate threshold, and the processing accuracy is greater than a preset accuracy threshold; Performing second-stage training on the plurality of feature analysis networks using the second data set, so that the gating network inputs each training data in the second data set into the corresponding feature analysis network for second-stage training according to the data type matched by each feature analysis network; In response to detecting that the second stage of training is completed, a trained quantum processing network is obtained.
6. The method according to claim 5, characterized in that The step of dividing the training data set into a first data set and a second data set comprises: If the plurality of feature analysis networks include a feature analysis network carrying a processing type label, determining to randomly select a first number of training data from the training data set to form the first data set, and determining the remaining data from the training data set to be the second data set; If the multiple feature analysis networks do not include a feature analysis network carrying a processing type label, determine to randomly select a second number of training data from the training data set to form the first data set, and determine the remaining data selected from the training data set as the second data set, wherein the first number is smaller than the second number.
7. The method according to claim 5, characterized in that The multiple feature analysis networks include variational quantum circuits and fully connected neural networks. The first stage training and the second stage training of the multiple feature analysis networks both include the following steps: Jointly training the variational quantum circuit and the fully connected neural network using a training dataset and a VQNet framework; and, The Adam optimizer is used to optimize and update the first-stage training and the second-stage training processes.
8. A data feature analysis device based on quantum computing, characterized in that: include: An acquisition unit, used for acquiring a data set to be processed; A processing unit, used to input the data set to be processed into a pre-trained quantum processing network to obtain an analysis result corresponding to the data set to be processed; Wherein, the quantum processing network includes: a gated network and a plurality of feature analysis networks, and the plurality of feature analysis networks include a quantum convolutional neural network; The gating network is used to determine the feature analysis network corresponding to each data to be processed, and transmit the data set to be processed to the corresponding feature analysis network; the feature analysis network is used to perform feature analysis on the data to be processed.
9. An electronic device, characterized in that: include: Processor and memory; The processor is connected to a memory, wherein the memory is used to store a computer program, and the processor is used to call the computer program to execute the method according to any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, wherein the computer program includes program instructions, and when the program instructions are executed by a processor, the method according to any one of claims 1 to 7 is executed.
Citation Information
Patent Citations
Quantum and classic hybrid cloud platform and task execution method
CN112465146A
Method for predicting ligand-protein interaction based on quantum calculation
CN114446383A
Method for predicting properties of chemical molecules based on quantum graph neural network
CN114550849A
Drug binding energy prediction method based on quantum convolutional neural network
CN116153390A
Task processing method and device using molecular data
CN117875370A