Performance prediction model training method and device, performance prediction method and device
By masking and extracting hidden space feature of label-free neural network structure data, the performance prediction model is trained, which solves the problems of low prediction accuracy and high training cost caused by limited label data, and achieves more efficient neural network structure performance predict.
Patent Information
- Application Number
- CN202411186366.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-28
- Publication Date
- 2024-12-31
- Estimated Expiration
- 2044-08-28
AI Technical Summary
Existing performance prediction models rely on supervised learning during training, and when the label data is limited, high prediction accuracy cannot be obtained, resulting in high training costs and inefficient.
By masking the structure data of the label-free neural network, the hidden spatial features of the visible node feature matrix and the masked node feature matrix are extracted, and the loss calculation task is performed using the target calculation unit to obtain the first target loss value to train the performance prediction model , reduce dependence on labeled data.
During the training process, better mining of the context information of neural network structure data, reducing the training cost of performance prediction model, and improving prediction accuracy and generalization capabilities.
Smart Images

Figure CN118690824B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of data processing, and more specifically to a performance prediction model training method and device, and a performance prediction method and device. Background Art
[0002] The neural network structure design method lacks complete and effective theoretical guidance. For different tasks, the neural network structure search technology is used to automatically search for high-performance neural network structures for given tasks and data sets.
[0003] In traditional neural network structure search methods, it is usually necessary to actually train the neural network structure on a given task or deploy it on different hardware devices to obtain performance data such as accuracy or latency of different candidate networks, and compare a large number of candidate network structures based on this. In this process, executing a search algorithm usually takes thousands of GPU days to obtain a neural network structure with performance that exceeds that of manually designed ones.
[0004] The related technology aims to improve the traditional neural network structure search method and reduce the evaluation time in the search process based on the performance prediction model, thereby accelerating the entire search process. However, the performance prediction model is trained using the traditional supervised learning method, and the training data needs to be obtained through sampling, resulting in a high training cost for the predictor, and it is impossible to obtain a high prediction accuracy when the label data is limited. Summary of the invention
[0005] In view of the above problems, the present invention provides a performance prediction model training method and device, and a performance prediction method and device.
[0006] According to a first aspect of the present invention, a method for training a performance prediction model is provided, comprising: using a target computing unit to perform a mask processing task on unlabeled neural network structure data to obtain a visible node feature matrix, a mask node feature matrix and a mask identification matrix, wherein the matrix dimensions of the mask node feature matrix and the mask identification matrix are the same; based on the visible node feature matrix, using the target computing unit to perform a prediction task on the mask identification matrix to obtain predicted latent space features of the mask identification matrix; using the target computing unit to perform an encoding task on the mask node feature matrix to obtain latent space features of the mask node feature matrix; using the target computing unit to perform a loss calculation task on the predicted latent space features of the mask identification matrix and the latent space features of the mask node feature matrix to obtain a first target loss value; based on the first target loss value, using the target computing unit to perform a training task on the performance prediction model to obtain a trained performance prediction model.
[0007] According to an embodiment of the present invention, based on the visible node feature matrix, a target computing unit is used to perform a prediction task on a mask identification matrix to obtain predicted latent space features of the mask identification matrix, including: using the target computing unit to perform an encoding processing task on the visible node feature matrix to obtain latent space features of the visible node feature matrix; based on the latent space features of the visible node feature matrix, using the target computing unit to perform a prediction processing task on the mask identification matrix to obtain predicted latent space features of the mask identification matrix.
[0008] According to an embodiment of the present invention, a target computing unit is used to perform an encoding task on a mask node feature matrix to obtain latent space features of the mask node feature matrix, including: determining encoding parameters using the target computing unit; performing an exponential moving average processing task on the encoding parameters using the target computing unit to obtain target encoding parameters; based on the target encoding parameters, performing an encoding processing task on the mask node feature matrix using the target computing unit to obtain latent space features of the mask node feature matrix.
[0009] According to an embodiment of the present invention, a target computing unit is used to perform a loss calculation task on the predicted latent space features of the mask identification matrix and the latent space features of the mask node feature matrix to obtain a first target loss value, including: using the target computing unit to perform a scaled cosine error calculation task on the predicted latent space features of the mask identification matrix and the latent space features of the mask node feature matrix to obtain a first initial loss value; using the target computing unit to determine the operation index corresponding to the predicted latent space features of the mask identification matrix, the operation index characterizing the structural composition corresponding to the mask identification matrix; based on the operation index, using the target computing unit to perform a construction task on the predicted latent space features of the mask identification matrix to obtain intermediate neural network structure data; using the target computing unit to perform a cross entropy calculation task on the intermediate neural network structure data and the unlabeled neural network structure data to obtain a second initial loss value; based on the first preset weight, using the target computing unit to perform a summation task on the first initial loss value and the second initial loss value to obtain a first target loss value.
[0010] According to an embodiment of the present invention, the above method also includes: using the target computing unit to perform an encoding task on the labeled neural network structure data to determine a second target loss value.
[0011] According to an embodiment of the present invention, a target computing unit is used to perform an encoding processing task on labeled neural network structure data to determine a second target loss value, including: using the target computing unit to perform an encoding task on the labeled neural network structure data to obtain latent space features of the labeled neural network structure data; using the target computing unit to perform a performance prediction task on the latent space features of the labeled neural network structure data to determine a predicted performance value; using the target computing unit to determine a label performance value corresponding to the labeled neural network structure data; using the target computing unit to perform a mean square error calculation task on the predicted performance value and the label performance value to obtain a third initial loss value; using the target computing unit to perform a sorting error calculation task on the predicted performance value and the label performance value to obtain a fourth initial loss value; based on a second preset weight, using the target computing unit to perform a summation task on the third initial loss value and the fourth initial loss value to obtain a second target loss value.
[0012] According to an embodiment of the present invention, based on the first target loss value, a target computing unit is used to perform a training task on a neural network prediction model to obtain a trained neural network prediction model, including: based on the first target loss value, a target computing unit is used to perform a training task on a performance prediction model to obtain an intermediate performance prediction model; based on the second target loss value, a target computing unit is used to perform a training task on the intermediate performance prediction model to obtain a trained performance prediction model.
[0013] The second aspect of the present invention provides a performance prediction method, including: using a target prediction unit to obtain the neural network structure data to be predicted; using the target prediction unit to perform a prediction processing task on the neural network structure data to be predicted based on the above-mentioned performance prediction model, and obtaining the target performance corresponding to the neural network structure data to be predicted.
[0014] The third aspect of the present invention provides a training device for a performance prediction model, comprising: a target calculation unit, configured to: perform a mask processing task on unlabeled neural network structure data to obtain a visible node feature matrix, a mask node feature matrix and a mask identification matrix, wherein the mask node feature matrix and the mask identification matrix have the same matrix dimension; based on the visible node feature matrix, perform a prediction task on the mask identification matrix to obtain predicted latent space features of the mask identification matrix; perform an encoding task on the mask node feature matrix to obtain latent space features of the mask node feature matrix; perform a loss calculation task on the predicted latent space features of the mask identification matrix and the latent space features of the mask node feature matrix to obtain a first target loss value; based on the first target loss value, perform a training task on the performance prediction model to obtain a trained performance prediction model.
[0015] The fourth aspect of the present invention provides a target prediction unit configured to: obtain the neural network structure data to be predicted; perform a prediction processing task on the neural network structure data to be predicted based on the above-mentioned performance prediction model to obtain the target performance corresponding to the neural network structure data to be predicted.
[0016] A fifth aspect of the present invention provides an electronic device, comprising: one or more processors; a memory for storing one or more computer programs, wherein the one or more processors execute the one or more computer programs to implement the steps of the above method.
[0017] The sixth aspect of the present invention further provides a computer-readable storage medium on which a computer program or instruction is stored, and the steps of the above method are implemented when the above computer program or instruction is executed by a processor.
[0018] The seventh aspect of the present invention also provides a computer program product, including a computer program or instructions, which implement the steps of the above method when executed by a processor.
[0019] According to an embodiment of the present invention, a target computing unit is used to perform a mask processing task on unlabeled neural network structure data, and a prediction task is performed on the mask identification matrix obtained by the mask processing to obtain the predicted latent space features of the mask identification matrix; an encoding task is performed on the mask node feature matrix obtained by the mask processing to obtain the latent space features of the mask node feature matrix; a loss calculation task is performed on the predicted latent space features of the mask identification matrix and the latent space features of the mask node feature matrix to obtain a first target loss value; based on the first target loss value, a training task is performed on the performance prediction model to obtain a trained performance prediction model. Since a large amount of easily available unlabeled neural network structure data is masked, and the masked data is predicted and encoded, the predicted latent space features and the latent space features of the mask node feature matrix are obtained to determine the technical means of the first target loss value, which avoids the problem of not being able to obtain a high prediction accuracy when the label data is limited, and realizes the technical effect of being able to better mine the context information of the neural network structure data during the training process to reduce the training of labeled neural network structure data and reduce the training cost of the performance prediction model. BRIEF DESCRIPTION OF THE DRAWINGS
[0020] The above contents and other objects, features and advantages of the present invention will become more apparent through the following description of the embodiments of the present invention with reference to the accompanying drawings, in which:
[0021] Figure 1 An application scenario diagram of a training method, apparatus, device, medium, and program product for a performance prediction model according to an embodiment of the present invention is shown;
[0022] Figure 2 A flow chart of a method for training a performance prediction model according to an embodiment of the present invention is shown;
[0023] Figure 3 A schematic diagram showing a method for training a performance prediction model according to an embodiment of the present invention is shown;
[0024] Figure 4 A schematic diagram of a performance prediction model according to an embodiment of the present invention is shown;
[0025] Figure 5 A schematic diagram of a self-attention layer according to an embodiment of the present invention is shown;
[0026] Figure 6 A flow chart of a performance prediction method according to an embodiment of the present invention is shown;
[0027] Figure 7 A structural block diagram of a training device for a performance prediction model according to an embodiment of the present invention is shown;
[0028] Figure 8 It shows a structural block diagram of a performance prediction device according to an embodiment of the present invention;
[0029] Fig. 9 A block diagram of an electronic device suitable for implementing a training method for a performance prediction model according to an embodiment of the present invention is shown. DETAILED DESCRIPTION
[0030] Below, embodiments of the present invention will be described with reference to the accompanying drawings. However, it should be understood that these descriptions are exemplary only and are not intended to limit the scope of the present invention. In the following detailed description, for ease of explanation, many specific details are set forth to provide a comprehensive understanding of embodiments of the present invention. However, it is apparent that one or more embodiments may also be implemented without these specific details. In addition, in the following description, descriptions of known structures and technologies are omitted to avoid unnecessary confusion of concepts of the present invention.
[0031] The terms used herein are only for describing specific embodiments and are not intended to limit the present invention. The terms "comprise", "include", etc. used herein indicate the existence of features, steps, operations and / or components, but do not exclude the existence or addition of one or more other features, steps, operations or components.
[0032] All terms (including technical and scientific terms) used herein have the meanings commonly understood by those skilled in the art unless otherwise defined. It should be noted that the terms used herein should be interpreted as having a meaning consistent with the context of this specification and should not be interpreted in an idealized or overly rigid manner.
[0033] When using expressions such as "at least one of A, B, and C, etc.", they should generally be interpreted according to the meaning of the expression commonly understood by those skilled in the art (for example, "a system having at least one of A, B, and C" should include but is not limited to a system having A alone, B alone, C alone, A and B, A and C, B and C, and / or A, B, C, etc.).
[0034] An embodiment of the present invention provides a training method for a performance prediction model, which uses a target computing unit to perform a mask processing task on unlabeled neural network structure data to obtain a visible node feature matrix, a mask node feature matrix and a mask identification matrix, wherein the mask node feature matrix and the mask identification matrix have the same matrix dimension; based on the visible node feature matrix, the target computing unit is used to perform a prediction task on the mask identification matrix to obtain predicted latent space features of the mask identification matrix; the target computing unit is used to perform an encoding task on the mask node feature matrix to obtain latent space features of the mask node feature matrix; the target computing unit is used to perform a loss calculation task on the predicted latent space features of the mask identification matrix and the latent space features of the mask node feature matrix to obtain a first target loss value; based on the first target loss value, the target computing unit is used to perform a training task on the performance prediction model to obtain a trained performance prediction model.
[0035] Figure 1 An application scenario diagram of a performance prediction model training method, apparatus, device, medium, and program product according to an embodiment of the present invention is shown.
[0036] like Figure 1 As shown, the application scenario 100 according to this embodiment may include a first terminal device 101, a second terminal device 102, a third terminal device 103, a network 104, and a server 105. The network 104 is used to provide a medium for a communication link between the first terminal device 101, the second terminal device 102, the third terminal device 103, and the server 105. The network 104 may include various connection types, such as wired, wireless communication links, or optical fiber cables, etc.
[0037] The user can use the first terminal device 101, the second terminal device 102, and the third terminal device 103 to interact with the server 105 through the network 104 to receive or send messages, etc. Various communication client applications can be installed on the first terminal device 101, the second terminal device 102, and the third terminal device 103, such as shopping applications, web browser applications, search applications, instant messaging tools, email clients, social platform software, etc. (only for example).
[0038] The first terminal device 101, the second terminal device 102, and the third terminal device 103 may be various electronic devices having display screens and supporting web browsing, including but not limited to smart phones, tablet computers, laptop computers, desktop computers, and the like.
[0039] The server 105 may be a server that provides various services, such as a background management server (only as an example) that provides support for websites browsed by users using the first terminal device 101, the second terminal device 102, and the third terminal device 103. The background management server may analyze and process the received data such as user requests, and feed back the processing results (such as web pages, information, or data obtained or generated according to user requests) to the terminal device.
[0040] It should be noted that the training method of the performance prediction model provided in the embodiment of the present invention can generally be executed by the server 105. Accordingly, the training device of the performance prediction model provided in the embodiment of the present invention can generally be set in the server 105. The training method of the performance prediction model provided in the embodiment of the present invention can also be executed by a server or server cluster that is different from the server 105 and can communicate with the first terminal device 101, the second terminal device 102, the third terminal device 103 and / or the server 105. Accordingly, the training device of the performance prediction model provided in the embodiment of the present invention can also be set in a server or server cluster that is different from the server 105 and can communicate with the first terminal device 101, the second terminal device 102, the third terminal device 103 and / or the server 105.
[0041] It should be understood that Figure 1 The number of terminal devices, networks and servers in the embodiment is only for illustration. Any number of terminal devices, networks and servers may be provided according to implementation requirements.
[0042] Figure 2 A flow chart of a method for training a performance prediction model according to an embodiment of the present invention is shown.
[0043] like Figure 2 As shown, the training method of the performance prediction model of this embodiment includes operations S210 to S250.
[0044] In operation S210, a mask processing task is performed on the unlabeled neural network structure data using a target computing unit to obtain a visible node feature matrix, a mask node feature matrix, and a mask identification matrix, wherein the mask node feature matrix and the mask identification matrix have the same matrix dimensions.
[0045] According to an embodiment of the present invention, the target computing unit may include at least one of a central processing unit, a neural network processor, a distributed computing unit, and the like.
[0046] According to an embodiment of the present invention, the unlabeled neural network structure data may be at least one of parameters such as neural network layer type, weight, bias, etc.
[0047] According to an embodiment of the present invention, a target computing unit is used to perform a mask processing task on unlabeled neural network structure data, and some nodes of the unlabeled neural network structure data are selected in a completely random manner according to a certain mask rate as visible node feature matrices, and the rest are mask node feature matrices.
[0048] According to an embodiment of the present invention, a mask identifier is determined, each mask identifier corresponds to each mask node one by one, and the obtained mask identifier matrix has the same matrix dimension as the mask node feature matrix, wherein the mask identifier is a learnable random vector.
[0049] According to an embodiment of the present invention, the node of the above-mentioned unlabeled neural network structure data can be at least one of the input parameters, weights or functions of the unlabeled neural network structure data.
[0050] According to an embodiment of the present invention, when performing a mask processing task, only the nodes of the unlabeled neural network structure data are masked without changing the structural information of the unlabeled neural network structure data.
[0051] In operation S220, based on the visible node feature matrix, a prediction task is performed on the mask identification matrix using a target computing unit to obtain predicted latent space features of the mask identification matrix.
[0052] According to an embodiment of the present invention, the prediction task may be implemented by utilizing a target computing unit to call a cross-attention layer of a performance prediction model.
[0053] According to an embodiment of the present invention, the mask identification matrix is predicted using feature information of the visible node feature matrix to obtain predicted latent space features of the mask identification matrix.
[0054] In operation S230, the target computing unit is used to perform an encoding task on the mask node feature matrix to obtain latent space features of the mask node feature matrix.
[0055] According to an embodiment of the present invention, the encoding task can be implemented by using the target computing unit to call the self-attention layer of the performance prediction model.
[0056] According to an embodiment of the present invention, an encoding task is performed on a mask node feature matrix, and latent space features of the mask node feature matrix are extracted based on similarity relationships between elements in the mask node feature matrix.
[0057] In operation S240, a target calculation unit is used to perform a loss calculation task on the predicted latent space features of the mask identification matrix and the latent space features of the mask node feature matrix to obtain a first target loss value.
[0058] According to an embodiment of the present invention, by determining the first target loss value based on the predicted latent space features of the mask identification matrix and the latent space features of the mask node feature matrix, the performance prediction model can achieve functional decoupling of each network layer during the training process, enhance the feature extraction and learning capabilities of the performance prediction model, and lay a good foundation for downstream task migration.
[0059] In operation S250, based on the first target loss value, a training task is performed on the performance prediction model using a target computing unit to obtain a trained performance prediction model.
[0060] According to an embodiment of the present invention, relevant parameters of the performance prediction model are adjusted based on the first target loss value to obtain a trained performance prediction model.
[0061] According to an embodiment of the present invention, the trained performance prediction model can effectively encode the neural network structure data according to the rules of the neural network structure data itself. Therefore, only a small amount of labeled neural network structure data is needed to fine-tune the performance prediction model through supervised training. This can make the performance prediction model adapt to a variety of downstream performance prediction tasks, thereby reducing the dependence on labeled data during the performance prediction model training process.
[0062] According to an embodiment of the present invention, a target computing unit is used to perform a mask processing task on unlabeled neural network structure data, and a prediction task is performed on the mask identification matrix obtained by the mask processing to obtain the predicted latent space features of the mask identification matrix; an encoding task is performed on the mask node feature matrix obtained by the mask processing to obtain the latent space features of the mask node feature matrix; a loss calculation task is performed on the predicted latent space features of the mask identification matrix and the latent space features of the mask node feature matrix to obtain a first target loss value; based on the first target loss value, a training task is performed on the performance prediction model to obtain a trained performance prediction model. Since a large amount of easily available unlabeled neural network structure data is masked, and the masked data is predicted and encoded, the predicted latent space features and the latent space features of the mask node feature matrix are obtained to determine the technical means of the first target loss value, which avoids the problem of not being able to obtain a high prediction accuracy when the label data is limited, and realizes the technical effect of being able to better mine the context information of the neural network structure data during the training process to reduce the training of labeled neural network structure data and reduce the training cost of the performance prediction model.
[0063] According to an embodiment of the present invention, based on the visible node feature matrix, a target computing unit is used to perform a prediction task on a mask identification matrix to obtain predicted latent space features of the mask identification matrix, including: using the target computing unit to perform an encoding task on the visible node feature matrix to obtain latent space features of the visible node feature matrix; based on the latent space features of the visible node feature matrix, using the target computing unit to perform a prediction task on the mask identification matrix to obtain predicted latent space features of the mask identification matrix.
[0064] According to an embodiment of the present invention, the target computing unit is used to call the self-attention layer of the performance prediction model to encode the visible node feature matrix, and feature extraction is performed on the similarity relationship between each matrix element in the visible node feature matrix to obtain the latent space features of the visible node feature matrix.
[0065] According to an embodiment of the present invention, the cross-attention layer of the performance prediction model is called by the target computing unit to perform cross-attention calculations on the latent space features of the visible node feature matrix and the mask identification matrix. In the cross-attention calculation process, the cross-attention layer is composed of a key matrix K, a value matrix V and a query matrix Q. The query matrix Q is obtained by linear transformation of the mask identification matrix. The feature learning processes of the visible nodes and the mask nodes are decoupled to obtain the predicted latent space features of the mask identification matrix.
[0066] According to an embodiment of the present invention, the mask identifiers may be deleted during the above decoupling process, so that the predicted latent space features of the obtained mask identifier matrix can be used as the predicted latent space features of the mask node feature matrix.
[0067] According to an embodiment of the present invention, a target computing unit is used to perform an encoding task on a mask node feature matrix to obtain latent space features of the mask node feature matrix, including: determining encoding parameters using the target computing unit; performing an exponential moving average processing task on the encoding parameters using the target computing unit to obtain target encoding parameters; based on the target encoding parameters, performing an encoding processing task on the mask node feature matrix using the target computing unit to obtain latent space features of the mask node feature matrix.
[0068] According to an embodiment of the present invention, the encoding task performed on the mask node feature matrix using the target computing unit has the same operation flow as the encoding task performed on the visible node feature matrix, so that the difference in encoding tasks is eliminated, which has a positive impact on achieving efficient task migration.
[0069] According to an embodiment of the present invention, the encoding parameters are used to prevent all nodes from converging to the same features, which would cause the performance prediction model to collapse, so as to maintain the stability of the performance prediction model.
[0070] According to an embodiment of the present invention, the coding parameters are not updated based on the back propagation of the gradient, but the target coding parameters are obtained by calculating the exponential moving average (EMA) of the coding parameters, which can be specifically shown in formula (1).
[0071] (1);
[0072] in, is the target encoding parameter, is the encoding parameter, is a hyperparameter, The value can be set according to actual conditions, and is preferably 0.99.
[0073] According to an embodiment of the present invention, based on the target encoding parameters, the target computing unit is used to call the self-attention layer of the performance prediction model to encode the mask node feature matrix to obtain the latent space features of the mask node feature matrix.
[0074] According to an embodiment of the present invention, a target computing unit is used to perform a loss calculation task on the predicted latent space features of the mask identification matrix and the latent space features of the mask node feature matrix to obtain a first target loss value, including: using the target computing unit to perform a scaled cosine error calculation task on the predicted latent space features of the mask identification matrix and the latent space features of the mask node feature matrix to obtain a first initial loss value; using the target computing unit to determine the operation index corresponding to the predicted latent space features of the mask identification matrix, the operation index characterizing the structural composition corresponding to the mask identification matrix; based on the operation index, using the target computing unit to perform a construction task on the predicted latent space features of the mask identification matrix to obtain intermediate neural network structure data; using the target computing unit to perform a cross entropy calculation task on the intermediate neural network structure data and the unlabeled neural network structure data to obtain a second initial loss value; based on the first preset weight, using the target computing unit to perform a summation task on the first initial loss value and the second initial loss value to obtain a first target loss value.
[0075] According to an embodiment of the present invention, a scaled cosine error calculation is performed on the predicted latent space features of the mask identification matrix and the latent space features of the mask node feature matrix to obtain a first initial loss value, as specifically shown in formula (2).
[0076] (2);
[0077] in, is the first initial loss value, is the mask node feature matrix, is the predicted latent space feature of the i-th mask identification matrix, is the latent space feature of the feature matrix of the i-th mask node, represents the vector inner product operation, is an adjustable scaling parameter.
[0078] According to an embodiment of the present invention, the operation index corresponding to the predicted latent space feature of the mask identification matrix may include at least one of multiple indexing methods such as an assignment index, a slice index or a step index.
[0079] According to an embodiment of the present invention, the predicted latent space features of the mask identification matrix are reconstructed using the operation index as a reconstruction target to obtain intermediate neural network structure data.
[0080] According to an embodiment of the present invention, the intermediate neural network structure data is used as the classification problem of the operation represented by the mask node, and the cross entropy loss between the intermediate neural network structure data and the unlabeled neural network structure data is calculated to obtain a second initial loss value, as specifically shown in formula (3).
[0081] (3);
[0082] in, is the second initial loss value, is the mask node feature matrix, is the number of operable nodes in the unlabeled neural network structure data, c is the operation index, The value of is 0 or 1. When the actual operation index of the i-th mask node is c, the value is 1, otherwise the value is 0. is the predicted probability of the operation index c of the i-th mask node of the intermediate neural network structure data.
[0083] According to an embodiment of the present invention, the first preset weight may be a weight of a corresponding loss ratio.
[0084] According to an embodiment of the present invention, based on the first preset weight, a summing task is performed on the first initial loss value and the second initial loss value to obtain a first target loss value, as specifically shown in formula (4).
[0085] (4);
[0086] in, is the first target loss value, and is the first preset weight, and The value of can be selected according to actual needs, and is preferably 1.
[0087] According to an embodiment of the present invention, by determining the first target loss value, the functional decoupling of different modules of the performance prediction model in the training process is achieved, the feature extraction and learning capabilities of the performance prediction model are enhanced, and a good foundation is laid for downstream task migration.
[0088] According to an embodiment of the present invention, the above method also includes: using the target computing unit to perform an encoding task on the labeled neural network structure data to determine a second target loss value.
[0089] According to an embodiment of the present invention, after the performance prediction model is trained using the first target loss value, a small amount of labeled neural network structure data is encoded to obtain a second target loss value, and the performance prediction model is further trained based on the second target loss value.
[0090] According to an embodiment of the present invention, a target computing unit is used to perform an encoding processing task on labeled neural network structure data to determine a second target loss value, including: using the target computing unit to perform an encoding task on the labeled neural network structure data to obtain latent space features of the labeled neural network structure data; using the target computing unit to perform a performance prediction task on the latent space features of the labeled neural network structure data to determine a predicted performance value; using the target computing unit to determine a label performance value corresponding to the labeled neural network structure data; using the target computing unit to perform a mean square error calculation task on the predicted performance value and the label performance value to obtain a third initial loss value; using the target computing unit to perform a sorting error calculation task on the predicted performance value and the label performance value to obtain a fourth initial loss value; based on a second preset weight, using the target computing unit to perform a summation task on the third initial loss value and the fourth initial loss value to obtain a second target loss value.
[0091] According to an embodiment of the present invention, the target computing unit is used to call the self-attention layer of the performance prediction model to encode the labeled neural network structure data, and feature extraction is performed on the similarity relationship between each matrix element in the labeled neural network structure data to obtain the latent space features of the labeled neural network structure data.
[0092] According to an embodiment of the present invention, a fully connected network of a performance prediction model is called by a target computing unit to predict latent space features of labeled neural network structure data, so as to establish a mapping relationship between each node feature in the latent space features of the labeled neural network structure data and the neural network performance, and obtain a predicted performance value.
[0093] According to an embodiment of the present invention, the label performance value corresponding to the labeled neural network structure data may be the actual performance requirement of the labeled neural network structure data.
[0094] According to an embodiment of the present invention, the mean square error between the predicted performance value and the label performance value is calculated to obtain a third initial loss value, as specifically shown in formula (5).
[0095] (5);
[0096] in, is the third initial loss value, To predict the performance value, is the label performance value.
[0097] According to an embodiment of the present invention, predicting the performance requirements of neural network structure data can essentially be regarded as a regression task. The neural network structure data is input into the performance prediction model and the performance value of the neural network structure data is predicted. Therefore, the most direct way to train the performance prediction model is to use the mean square error of the predicted performance value and the label performance value as the loss value.
[0098] According to an embodiment of the present invention, the ranking error between the predicted performance value and the label performance value is calculated to obtain a fourth initial loss value, as specifically shown in formula (6).
[0099] (6);
[0100] in, is the fourth initial loss value, and m is a hyperparameter.
[0101] According to an embodiment of the present invention, in a neural network structure search task, in order to determine which neural network structure data has a better performance value. When measuring the accuracy of the performance prediction model used in the neural network structure search task, the relative ranking accuracy of the prediction performance between different neural network structure data is often more important than the prediction accuracy of their respective absolute performance values, and the traditional mean square error loss cannot perceive the ranking-related prediction error, so the ranking error between the prediction performance value and the label performance value is further determined.
[0102] According to an embodiment of the present invention, the second preset weight may be a weight parameter of importance between different loss functions.
[0103] According to an embodiment of the present invention, based on the second preset weight, a summing task is performed on the third initial loss value and the fourth initial loss value to obtain a second target loss value, as specifically shown in formula (7).
[0104] (7);
[0105] in, is the second target loss value, and is the second preset weight, and The value of can be selected according to actual needs, and is preferably 1.
[0106] According to an embodiment of the present invention, the second preset weight combines the absolute error and relative error between the predicted performance value and the label performance value, which can help the performance prediction model improve the ranking accuracy of the prediction results while having a certain prediction accuracy, thereby improving the accuracy of the performance prediction model.
[0107] According to an embodiment of the present invention, based on the first target loss value, a target computing unit is used to perform a training task on a neural network prediction model to obtain a trained neural network prediction model, including: based on the first target loss value, a target computing unit is used to perform a training task on a performance prediction model to obtain an intermediate performance prediction model; based on the second target loss value, a target computing unit is used to perform a training task on the intermediate performance prediction model to obtain a trained performance prediction model.
[0108] Figure 3 A schematic diagram of a method for training a performance prediction model according to an embodiment of the present invention is shown.
[0109] like Figure 3 As shown, in operation S310, a mask processing task is performed on the unlabeled neural network structure data to obtain a visible node feature matrix, a mask node feature matrix, and a mask identification matrix. In operation S320, the visible node feature matrix is encoded, and the similarity relationship between each matrix element in the visible node feature matrix is feature extracted to obtain the latent space features of the visible node feature matrix. In operation S330, based on the latent space features of the visible node feature matrix, the mask identification matrix is predicted to obtain the predicted latent space features of the mask identification matrix. In operation S340, the mask node feature matrix is encoded to obtain the latent space features of the mask node feature matrix. In operation S350, a first target loss value is determined based on the predicted latent space features of the mask identification matrix and the latent space features of the mask node feature matrix. In operation S360, an encoding processing task is performed on the labeled neural network structure data to obtain a predicted performance value corresponding to the labeled neural network structure data. In operation S370, a second target loss value is determined based on the predicted performance value and the label performance value. In operation S380, the performance prediction model is trained based on the first target loss value and the second target loss value to obtain a trained performance prediction model.
[0110] According to an embodiment of the present invention, since the performance prediction model is trained based on the first target loss value, during supervised learning, only a small amount of labeled neural network structure data is needed to determine the second target loss value, and the performance prediction model is trained a second time based on the second target loss value. Compared with the performance prediction model obtained by directly training with labeled neural network structure data, adding training based on unlabeled neural network structure data makes the performance prediction model have higher accuracy and stronger generalization. Even if adding training based on unlabeled neural network structure data will introduce additional time and computing resource overhead, for the same search space, only one training process based on the first target loss value needs to be performed, and then multiple training processes based on the second target loss value can be used to obtain a performance prediction model suitable for different performance indicator prediction tasks.
[0111] Figure 4 A schematic diagram of a performance prediction model according to an embodiment of the present invention is shown; Figure 5 A schematic diagram of a self-attention layer according to an embodiment of the present invention is shown.
[0112] According to an embodiment of the present invention, Figure 4 As shown, the performance prediction model includes an encoder 410, a decoder 413, a latent space feature predictor 411, a target encoder 412, and a regression module 414. The encoder 410, the decoder 413, and the target encoder 412 have the same structure.
[0113] According to an embodiment of the present invention, the encoder 410, the decoder 413 and the target encoder 412 all include a self-attention layer, a feedforward neural network and a normalization layer. The encoder 410 and the target encoder 412 are both used to encode the input neural network structure data or latent space features; the decoder 413 is used to perform construction tasks on mask nodes.
[0114] The self-attention layer is used to extract feature information based on the similarity relationship between each element in the input data.
[0115] Among them, the calculation method of the self-attention layer is as follows Figure 5 As shown in the figure, the input key matrix K, value matrix V, query matrix Q and neural network structure data are masked, normalized and multiplied with the weight matrix. The self-attention layer improves the masking mechanism in the classic self-attention calculation process, and constructs a masking matrix based on the adjacency matrix of the input neural network structure data and the shortest path matrix between nodes, thereby enhancing the model's perception of the topological structure information of the input data.
[0116] A feedforward neural network is used to perform nonlinear activation on the output of the self-attention layer. The feedforward neural network includes two fully connected layers and a ReLU activation function.
[0117] The normalization layer is used to convert the input of each layer of the above network into approximately independent and identically distributed data to improve the convergence speed during performance prediction model training.
[0118] According to an embodiment of the present invention, the latent space feature predictor 411 is used to predict the input neural network structure data to obtain the latent space features. The latent space feature predictor 411 includes a cross attention layer, a feedforward neural network and a normalization layer.
[0119] The cross-attention layer is used to predict the feature information of the masked nodes based on the feature information of the visible nodes.
[0120] A feedforward neural network is used to perform nonlinear activation on the output of the cross-attention layer. The feedforward neural network includes two fully connected layers and a ReLU activation function.
[0121] The normalization layer is used to convert the input of each layer of the above network into approximately independent and identically distributed data to improve the convergence speed during performance prediction model training.
[0122] According to an embodiment of the present invention, the regression module 414 is used to perform performance prediction on the input neural network structure data to obtain a predicted performance value. The regression module 414 includes a fully connected network.
[0123] A fully connected network is used to establish a mapping relationship between latent space features and neural network performance.
[0124] According to an embodiment of the present invention, the visible node feature matrix corresponding to the unlabeled neural network structure data in the neural network structure data 401 is input to the encoder 410, and the latent space features 403 of the visible node feature matrix are output; the latent space features 403 of the visible node feature matrix and the mask identification matrix 404 are input to the latent space feature predictor 411, and the predicted latent space features 405 of the mask identification matrix are output; the mask node feature matrix in the neural network structure data 401 is input to the target encoder 412, and the latent space features 402 of the mask node feature matrix are output, and the first initial loss value 415 is determined based on the predicted latent space features 405 of the mask identification matrix and the latent space features 402 of the mask node feature matrix. The predicted latent space features 405 of the mask identification matrix are input to the decoder 413, and the intermediate neural network structure data 406 is output. Based on the intermediate neural network structure data 406 and the unlabeled neural network structure data in the neural network structure data 401, the second initial loss value 416 is determined, and the first target loss value can be determined based on the first initial loss value 415 and the second initial loss value 416. The labeled neural network structure data in the neural network structure data 401 is input to the encoder 410, which outputs the latent space features 407 of the labeled neural network structure data; the latent space features 407 of the labeled neural network structure data are input to the regression module 414, which outputs the predicted performance value 408. Based on the predicted performance value 408 and the labeled performance value 409, the second target loss value can be determined.
[0125] Figure 6 A flow chart of a performance prediction method according to an embodiment of the present invention is shown.
[0126] A second aspect of the present invention provides a performance prediction method, the performance prediction method comprising:
[0127] In operation S610, the target prediction unit is used to obtain the neural network structure data to be predicted.
[0128] In operation S620, a target prediction unit is used to perform a prediction processing task on the neural network structure data to be predicted based on the performance prediction model to obtain a target performance corresponding to the neural network structure data to be predicted.
[0129] According to an embodiment of the present invention, the target prediction unit may include at least one of a central processing unit, a neural network processor, a distributed computing unit, and the like.
[0130] According to an embodiment of the present invention, a prediction processing task is performed on the neural network structure data to be predicted based on the above-mentioned performance prediction model to obtain the target performance corresponding to the neural network structure data to be predicted, so that in the neural network structure search, the system burden can be reduced while the search efficiency can be improved.
[0131] According to an embodiment of the present invention, the performance prediction method of the present invention is tested, and two neural network structure search data sets, NAS-Bench-101 and NAS-Bench-201, are selected for testing experiments. In the training phase based on the first target loss value, the encoding module and the target encoder are both composed of 4 layers of Transformer network layers, and the latent space prediction module and the decoding module respectively include 2 layers of Transformer networks, in which the number of attention heads in the self-attention layer and the cross-attention layer are set to 8. Except for the hidden layer feature dimension size of 512 in the feedforward neural network layer, the hidden layer feature dimension size in the remaining layers is set to 128. During the training process, the training batch size for all data sets is 2048, and 200 rounds are required for pre-training on the NAS-Bench-101 and NAS-Bench-201 data sets. In pre-training, all neural network structure data in the search space of NAS-Bench-101 and NAS-Bench-201 are used as training data. In the experiment, the AdamW optimizer with a maximum learning rate of 0.001 is selected, and the learning rate is adjusted using a cosine decay strategy with preheating. The default mask rate r is 40%, the hyperparameter τ is set to 0.99, and the loss value The first preset weight and Both are set to 1 to achieve a trade-off between different optimization objectives. In addition, to prevent overfitting, Dropout and weight decay are set to 0.1 and 1e^(-3) for all datasets, respectively. The average pre-training time on the NAS-Bench-101 dataset is 9 hours, and the average pre-training time on the NAS-Bench-201 dataset is 0.5 hours.
[0132] During the training phase based on the second objective loss value, the regression module consists of a 2-layer fully connected network with a hidden dimension of 128. The maximum number of training rounds for all datasets is 300 rounds. The training batch size is adjusted according to the number of training samples in different datasets. The rest of the parameter settings are consistent with the training process based on the first objective loss value. During the training process based on the second objective loss value, all model parameters in the encoder and regression modules are updated as the training process progresses. Since only a small amount of labeled neural network structure data is required during fine-tuning, training takes only a few minutes for each dataset.
[0133] For the performance prediction test experiment, the Kendall rank correlation coefficient KTau was selected as the evaluation indicator of the performance prediction model. KTau can effectively measure the strength of the monotonic relationship between two ordered variables. The value range of this indicator is [-1,1]. The closer it is to 1, the stronger the ranking consistency of the two groups of variables. Therefore, in the experimental process, the predicted performance and actual performance of a large number of network structures are regarded as two groups of variables and the KTau value between the two is calculated to evaluate the prediction effect of different predictors. Table 1 shows the performance prediction performance of the performance prediction model of the present invention on the NAS-Bench-101 data set and the comparison results of the existing prediction model.
[0134]
[0135] Table 2 shows the performance prediction performance of the performance prediction model of the present invention and the comparison results of the existing prediction models on the NAS-Bench-201 dataset.
[0136]
[0137] As can be seen from Table 1, compared with other performance prediction models, the performance prediction model of the present invention has achieved higher performance KTau results in all cases, reflecting the significant advantages of the performance prediction model of the present invention for neural network performance prediction tasks, and this advantage is more obvious when there is less training data. On NAS-Bench-101, the performance prediction model of the present invention has achieved a relative improvement of up to 9.5% in KTau compared with the same type of advanced comparison models.
[0138] The experimental results in Table 2 are relatively consistent with those in Table 1. The performance prediction model of the present invention has further widened the gap with other comparison models in a variety of performance prediction tasks, and achieved an average KTau improvement of 4.1%. The above experiments fully demonstrate that the performance prediction model of the present invention uses the information contained in a large amount of original neural network structure data to learn better representations, so that the performance prediction model still has good prediction accuracy and strong generalization ability when the actual training data is limited. In addition, through the task accuracy prediction experiment of the network structure in NAS-Bench-201 on three different classification data sets, it can be seen that the performance prediction model can obtain good prediction results for a variety of accuracy prediction tasks, indicating that it has strong generalization ability.
[0139] Based on the above performance prediction model training method, the present invention also provides a performance prediction model training device. Figure 7 The device is described in detail.
[0140] Figure 7 The structural block diagram of the performance prediction model training device according to an embodiment of the present invention is schematically shown.
[0141] like Figure 7 As shown, the training device 700 of the performance prediction model of this embodiment includes a target calculation unit 710, which is configured to: perform a mask processing task on the unlabeled neural network structure data to obtain a visible node feature matrix, a mask node feature matrix and a mask identification matrix, wherein the matrix dimensions of the mask node feature matrix and the mask identification matrix are the same; based on the visible node feature matrix, perform a prediction task on the mask identification matrix to obtain predicted latent space features of the mask identification matrix; perform an encoding task on the mask node feature matrix to obtain latent space features of the mask node feature matrix; perform a loss calculation task on the predicted latent space features of the mask identification matrix and the latent space features of the mask node feature matrix to obtain a first target loss value; based on the first target loss value, perform a training task on the performance prediction model to obtain a trained performance prediction model.
[0142] According to an embodiment of the present invention, the target computing unit 710 is also configured to perform encoding processing tasks on the visible node feature matrix to obtain latent space features of the visible node feature matrix; based on the latent space features of the visible node feature matrix, perform prediction processing tasks on the mask identification matrix to obtain predicted latent space features of the mask identification matrix.
[0143] According to an embodiment of the present invention, the target calculation unit 710 is also configured to determine the coding parameters; perform an exponential moving average processing task on the coding parameters to obtain target coding parameters; based on the target coding parameters, perform a coding processing task on the mask node feature matrix to obtain the latent space features of the mask node feature matrix.
[0144] According to an embodiment of the present invention, the target calculation unit 710 is also configured to perform a scaled cosine error calculation task on the predicted latent space features of the mask identification matrix and the latent space features of the mask node feature matrix to obtain a first initial loss value; determine the operation index corresponding to the predicted latent space features of the mask identification matrix, the operation index characterizing the structural composition corresponding to the mask identification matrix; based on the operation index, perform a construction task on the predicted latent space features of the mask identification matrix to obtain intermediate neural network structure data; perform a cross entropy calculation task on the intermediate neural network structure data and the unlabeled neural network structure data to obtain a second initial loss value; based on the first preset weight, perform a summation task on the first initial loss value and the second initial loss value to obtain a first target loss value.
[0145] According to an embodiment of the present invention, the target calculation unit 710 is also configured to perform an encoding task on the labeled neural network structure data to determine a second target loss value.
[0146] According to an embodiment of the present invention, the target calculation unit 710 is also configured to perform an encoding task on the labeled neural network structure data to obtain latent space features of the labeled neural network structure data; perform a performance prediction task on the latent space features of the labeled neural network structure data to determine a predicted performance value; determine a label performance value corresponding to the labeled neural network structure data; perform a mean square error calculation task on the predicted performance value and the label performance value to obtain a third initial loss value; perform a sorting error calculation task on the predicted performance value and the label performance value to obtain a fourth initial loss value; based on a second preset weight, perform a summation task on the third initial loss value and the fourth initial loss value to obtain a second target loss value.
[0147] According to an embodiment of the present invention, the target calculation unit 710 is also configured to perform a training task on the performance prediction model based on the first target loss value to obtain an intermediate performance prediction model; and to perform a training task on the intermediate performance prediction model based on the second target loss value to obtain a trained performance prediction model.
[0148] Based on the above performance prediction method, the present invention also provides a performance prediction device. Figure 8 The device is described in detail.
[0149] Figure 8 The structural block diagram of the performance prediction device according to an embodiment of the present invention is schematically shown.
[0150] like Figure 8 As shown, the training device 800 of the performance prediction model of this embodiment includes a target prediction unit 810, which is configured to: obtain the neural network structure data to be predicted; perform a prediction processing task on the neural network structure data to be predicted based on the above-mentioned performance prediction model, and obtain the target performance corresponding to the neural network structure data to be predicted.
[0151] Fig. 9 A block diagram of an electronic device suitable for implementing a training method for a performance prediction model according to an embodiment of the present invention is schematically shown.
[0152] like Fig. 9As shown, the electronic device 900 according to an embodiment of the present invention includes a processor 901, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 902 or a program loaded from a storage part 908 to a random access memory (RAM) 903. The processor 901 may include, for example, a general-purpose microprocessor (e.g., a CPU), an instruction set processor and / or a related chipset and / or a special-purpose microprocessor (e.g., an application-specific integrated circuit (ASIC)), etc. The processor 901 may also include an onboard memory for caching purposes. The processor 901 may include a single processing unit or multiple processing units for performing different actions of the method flow according to an embodiment of the present invention.
[0153] In RAM 903, various programs and data required for the operation of electronic device 900 are stored. Processor 901, ROM 902 and RAM 903 are connected to each other via bus 904. Processor 901 performs various operations of the method flow according to the embodiment of the present invention by executing the program in ROM 902 and / or RAM 903. It should be noted that the program can also be stored in one or more memories other than ROM 902 and RAM 903. Processor 901 can also perform various operations of the method flow according to the embodiment of the present invention by executing the program stored in one or more memories.
[0154] According to an embodiment of the present invention, the electronic device 900 may further include an input / output (I / O) interface 905, which is also connected to the bus 904. The electronic device 900 may further include one or more of the following components connected to the I / O interface 905: an input portion 906 including a keyboard, a mouse, etc.; an output portion 907 including a cathode ray tube (CRT), a liquid crystal display (LCD), etc., and a speaker, etc.; a storage portion 908 including a hard disk, etc.; and a communication portion 909 including a network interface card such as a LAN card, a modem, etc. The communication portion 909 performs communication processing via a network such as the Internet. A drive 910 is also connected to the I / O interface 905 as needed. A removable medium 911, such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, etc., is installed on the drive 910 as needed, so that a computer program read therefrom is installed into the storage portion 908 as needed.
[0155] The present invention also provides a computer-readable storage medium, which may be included in the device / apparatus / system described in the above embodiment; or may exist independently without being assembled into the device / apparatus / system. The above computer-readable storage medium carries one or more programs, and when the above one or more programs are executed, the method according to the embodiment of the present invention is implemented.
[0156] According to an embodiment of the present invention, the computer-readable storage medium may be a non-volatile computer-readable storage medium, for example, it may include but is not limited to: a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination thereof. In the present invention, the computer-readable storage medium may be any tangible medium containing or storing a program, which may be used by or in combination with an instruction execution system, an apparatus or a device. For example, according to an embodiment of the present invention, the computer-readable storage medium may include the ROM 902 and / or RAM 903 described above and / or one or more memories other than ROM 902 and RAM 903.
[0157] The embodiment of the present invention also includes a computer program product, which includes a computer program, and the computer program contains program code for executing the method shown in the flowchart. When the computer program product is run in a computer system, the program code is used to enable the computer system to implement the above method provided by the embodiment of the present invention.
[0158] The computer program executes the above functions defined in the system / device of the embodiment of the present invention when it is executed by the processor 901. According to the embodiment of the present invention, the system, device, module, unit, etc. described above can be implemented by a computer program module.
[0159] In one embodiment, the computer program may be based on a tangible storage medium such as an optical storage device, a magnetic storage device, etc. In another embodiment, the computer program may also be transmitted and distributed in the form of a signal on a network medium, and downloaded and installed through the communication part 909, and / or installed from a removable medium 911. The program code contained in the computer program may be transmitted using any appropriate network medium, including but not limited to: wireless, wired, etc., or any suitable combination of the above.
[0160] In such an embodiment, the computer program can be downloaded and installed from the network through the communication part 909, and / or installed from the removable medium 911. When the computer program is executed by the processor 901, the above functions defined in the system of the embodiment of the present invention are performed. According to the embodiment of the present invention, the system, device, means, module, unit, etc. described above can be implemented by a computer program module.
[0161] According to an embodiment of the present invention, the program code for executing the computer program provided by the embodiment of the present invention can be written in any combination of one or more programming languages. Specifically, these computing programs can be implemented using high-level process and / or object-oriented programming languages, and / or assembly / machine languages. Programming languages include, but are not limited to, Java, C++, python, "C" language or similar programming languages. The program code can be executed entirely on the user computing device, partially on the user device, partially on the remote computing device, or entirely on the remote computing device or server. In the case of a remote computing device, the remote computing device can be connected to the user computing device through any type of network, including a local area network (LAN) or a wide area network (WAN), or can be connected to an external computing device (e.g., using an Internet service provider to connect through the Internet).
[0162] The flow chart and block diagram in the accompanying drawings illustrate the possible architecture, function and operation of the system, method and computer program product according to various embodiments of the present invention. In this regard, each box in the flow chart or block diagram can represent a module, a program segment, or a part of a code, and the above-mentioned module, program segment, or a part of a code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in a different order from the order marked in the accompanying drawings. For example, two boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram or flow chart, and the combination of the boxes in the block diagram or flow chart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.
[0163] It will be appreciated by those skilled in the art that the features described in the various embodiments and / or claims of the present invention may be combined and / or combined in various ways, even if such combinations and / or combinations are not explicitly described in the present invention. In particular, the features described in the various embodiments and / or claims of the present invention may be combined and / or combined in various ways without departing from the spirit and teachings of the present invention. All of these combinations and / or combinations fall within the scope of the present invention.
[0164] The embodiments of the present invention are described above. However, these embodiments are only for the purpose of illustration, and are not intended to limit the scope of the present invention. Although each embodiment is described above, it does not mean that the measures in each embodiment cannot be used in combination. The scope of the present invention is defined by the attached claims and their equivalents. Without departing from the scope of the present invention, those skilled in the art may make various substitutions and modifications, which should all fall within the scope of the present invention.
Claims
1. A training method for a performance prediction model, characterized in that: The method comprises: Using a target computing unit to perform a mask processing task on the unlabeled neural network structure data, a visible node feature matrix, a mask node feature matrix and a mask identification matrix are obtained, wherein the mask node feature matrix and the mask identification matrix have the same matrix dimension, the target computing unit includes at least one of a central processing unit, a neural network processor, and a distributed computing unit, and the unlabeled neural network structure data is determined based on the image data; Based on the visible node feature matrix, using the target computing unit to perform a prediction task on the mask identification matrix to obtain predicted latent space features of the mask identification matrix; Using the target computing unit to perform an encoding task on the mask node feature matrix to obtain latent space features of the mask node feature matrix, where the latent space features of the mask node feature matrix are extracted based on similarity relationships between elements in the mask node feature matrix; Using the target calculation unit, a loss calculation task is performed on the predicted latent space features of the mask identification matrix and the latent space features of the mask node feature matrix to obtain a first target loss value; Based on the first target loss value, using the target calculation unit to perform a training task on the performance prediction model to obtain the trained performance prediction model; The using the target calculation unit to perform a loss calculation task on the predicted latent space features of the mask identification matrix and the latent space features of the mask node feature matrix to obtain a first target loss value includes: Using the target computing unit, a scaled cosine error computing task is performed on the predicted latent space features of the mask identification matrix and the latent space features of the mask node feature matrix to obtain a first initial loss value; Determining, using the target computing unit, an operation index corresponding to a predicted latent space feature of the mask identification matrix, wherein the operation index represents a structural composition corresponding to the mask identification matrix; Based on the operation index, using the target computing unit to perform a construction task on the predicted latent space features of the mask identification matrix to obtain intermediate neural network structure data; Using the target computing unit to perform a cross entropy calculation task on the intermediate neural network structure data and the unlabeled neural network structure data to obtain a second initial loss value; Based on a first preset weight, the target calculation unit is used to perform a summation task on the first initial loss value and the second initial loss value to obtain the first target loss value.
2. The method according to claim 1, characterized in that The step of performing a prediction task on the mask identification matrix using the target computing unit based on the visible node feature matrix to obtain a predicted latent space feature of the mask identification matrix includes: Using the target computing unit to perform encoding processing tasks on the visible node feature matrix to obtain latent space features of the visible node feature matrix; Based on the latent space features of the visible node feature matrix, the target computing unit is used to perform a prediction processing task on the mask identification matrix to obtain the predicted latent space features of the mask identification matrix.
3. The method according to claim 1, characterized in that The using the target computing unit to perform an encoding task on the mask node feature matrix to obtain latent space features of the mask node feature matrix includes: Determining encoding parameters using the target computing unit; Utilizing the target calculation unit to perform an exponential moving average processing task on the coding parameter to obtain a target coding parameter; Based on the target encoding parameters, the target computing unit is used to perform an encoding processing task on the mask node feature matrix to obtain latent space features of the mask node feature matrix.
4. The method according to claim 1, characterized in that The method further comprises: The target computing unit is used to perform an encoding task on the labeled neural network structure data to determine a second target loss value.
5. The method according to claim 4, characterized in that The step of using the target computing unit to perform an encoding processing task on the labeled neural network structure data to determine a second target loss value includes: Using the target computing unit to perform an encoding task on the labeled neural network structure data to obtain latent space features of the labeled neural network structure data; Using the target computing unit to perform a performance prediction task on the latent space features of the labeled neural network structure data to determine a predicted performance value; Determining a label performance value corresponding to the labeled neural network structure data using the target computing unit; Using the target calculation unit to perform a mean square error calculation task on the predicted performance value and the label performance value to obtain a third initial loss value; Using the target calculation unit to perform a sorting error calculation task on the predicted performance value and the label performance value to obtain a fourth initial loss value; Based on the second preset weight, the target calculation unit is used to perform a summation task on the third initial loss value and the fourth initial loss value to obtain the second target loss value.
6. The method according to claim 4, characterized in that The step of performing a training task on the neural network prediction model using the target calculation unit based on the first target loss value to obtain the trained neural network prediction model includes: Based on the first target loss value, using the target calculation unit to perform a training task on the performance prediction model to obtain an intermediate performance prediction model; Based on the second target loss value, the target calculation unit is used to perform a training task on the intermediate performance prediction model to obtain the trained performance prediction model.
7. A performance prediction method, characterized in that: The method comprises: Acquire the neural network structure data to be predicted by using the target prediction unit, the target prediction unit includes at least one of a central processing unit, a neural network processor, and a distributed computing unit, and the neural network structure data to be predicted is determined based on the image data; Utilizing the target prediction unit, a performance prediction model obtained based on the training method of the performance prediction model as described in any one of claims 1 to 6 is used to perform a prediction processing task on the neural network structure data to be predicted, so as to obtain a target performance corresponding to the neural network structure data to be predicted.
8. A training device for a performance prediction model, characterized in that: The device comprises: The target computing unit is configured as: Performing a mask processing task on the unlabeled neural network structure data to obtain a visible node feature matrix, a mask node feature matrix and a mask identification matrix, wherein the mask node feature matrix and the mask identification matrix have the same matrix dimension, the target computing unit includes at least one of a central processing unit, a neural network processor, and a distributed computing unit, and the unlabeled neural network structure data is determined based on the image data; Based on the visible node feature matrix, a prediction task is performed on the mask identification matrix to obtain predicted latent space features of the mask identification matrix, wherein the latent space features of the mask node feature matrix are extracted based on similarity relationships between elements in the mask node feature matrix; Performing an encoding task on the mask node feature matrix to obtain latent space features of the mask node feature matrix; Performing a loss calculation task on the predicted latent space features of the mask identification matrix and the latent space features of the mask node feature matrix to obtain a first target loss value; Based on the first target loss value, performing a training task on the performance prediction model to obtain the trained performance prediction model; The using the target calculation unit to perform a loss calculation task on the predicted latent space features of the mask identification matrix and the latent space features of the mask node feature matrix to obtain a first target loss value includes: Using the target computing unit, a scaled cosine error computing task is performed on the predicted latent space features of the mask identification matrix and the latent space features of the mask node feature matrix to obtain a first initial loss value; Determining, using the target computing unit, an operation index corresponding to a predicted latent space feature of the mask identification matrix, wherein the operation index represents a structural composition corresponding to the mask identification matrix; Based on the operation index, using the target computing unit to perform a construction task on the predicted latent space features of the mask identification matrix to obtain intermediate neural network structure data; Using the target computing unit to perform a cross entropy calculation task on the intermediate neural network structure data and the unlabeled neural network structure data to obtain a second initial loss value; Based on a first preset weight, the target calculation unit is used to perform a summation task on the first initial loss value and the second initial loss value to obtain the first target loss value.
9. A performance prediction device, characterized in that: The device comprises: The target prediction unit is configured as: Acquire neural network structure data to be predicted, the target prediction unit includes at least one of a central processing unit, a neural network processor, and a distributed computing unit, and the neural network structure data to be predicted is determined based on image data; The performance prediction model obtained based on the training method of the performance prediction model as described in any one of claims 1 to 6 performs a prediction processing task on the neural network structure data to be predicted to obtain a target performance corresponding to the neural network structure data to be predicted.