Automatic search method, automatic search performance prediction model training method and device

By combining a performance prediction model with a differentiable ranking loss function and a regression loss function, the problem of high search costs in automated machine learning is solved, achieving more efficient and accurate automated search and improving the performance of search results.

CN116805384BActive Publication Date: 2025-12-05HUAWEI TECH CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202210249999.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-03-14
Publication Date
2025-12-05
Estimated Expiration
2042-03-14

AI Technical Summary

Technical Problem

Existing automated machine learning methods have high search costs, low automated search efficiency, and difficulty in effectively exploring the search space.

Method used

A performance prediction model based on differentiable ranking loss function and regression loss function is adopted, and the search efficiency and accuracy are improved by agent task evaluation and population data update.

Benefits of technology

It improves the efficiency and accuracy of automatic search, enhances the ability to explore the search space, and improves the performance of search results.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116805384B_ABST
    Figure CN116805384B_ABST
Patent Text Reader

Abstract

The application provides an automatic search method and a performance prediction model training method and device for automatic search. It relates to the field of artificial intelligence, and specifically to the field of computer vision. The method comprises a potential data selection module based on a performance prediction model, training and updating the performance prediction model during the process of automatic search data and using the trained performance prediction model for inference to assist in the selection of potential data, wherein the loss function of the performance prediction model comprises a differentiable ranking loss function L K and a regression loss function. The application can improve the prediction accuracy of the performance prediction model, and the trained performance prediction model added to the automatic search can improve the efficiency, accuracy and data exploration of the automatic search.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the field of artificial intelligence, and more particularly, to an automatic search method, a performance prediction model training method and device for automatic search. BACKGROUND

[0002] Artificial intelligence (AI) is the use of digital computers or digital computer-controlled machines to simulate, extend and expand human intelligence, perceive the environment, acquire knowledge and use knowledge to obtain the best results. In other words, artificial intelligence is a branch of computer science that attempts to understand the essence of intelligence and produce a new intelligent machine that can react in a similar way to human intelligence. Artificial intelligence is the design principle and implementation method of various intelligent machines, so that machines have the functions of perception, reasoning and decision-making. The research in the field of artificial intelligence includes robots, natural language processing, computer vision, decision-making and reasoning, human-computer interaction, recommendation and search, AI basic theory, etc.

[0003] With the development of deep learning (DL), deep neural network (DNN) is one of the representative algorithms of deep learning, which is a kind of feedforward neural network with deep structure. It has achieved remarkable results in computer vision fields such as face recognition and pedestrian re-identification. Usually, the performance of the model in computer vision is improved by the hand-designed deep neural network architecture, or the performance of the model in computer vision is improved based on the hand-designed loss function. Whether it is based on the hand-designed loss function or the hand-designed deep neural network architecture, it often needs more expert knowledge and consumes a lot of time.

[0004] Therefore, with the rise of automated machine learning (AutoML), loss function search (LFS), network architecture search or hyperparameter search have become possible. Because the search cost of these automatic search methods is relatively large at present. Therefore, how to improve the efficiency of automatic search has become a problem to be solved. SUMMARY

[0005] The present application provides an automatic search method, a performance prediction model training method and device for automatic search, which can improve the search efficiency, search more data, and the performance of the search results obtained by the method is better.

[0006] In a first aspect, an automatic search method is provided. The method comprises: obtaining at least two candidate data, the at least two candidate data being data to be evaluated for a proxy task; inputting the at least two candidate data into a target performance prediction model to obtain a predicted indicator corresponding to the at least two candidate data, wherein the target performance prediction model is obtained by training a performance prediction model based on a first training data set, a loss function of the performance prediction model comprising a differentiable ranking loss function L K and a regression loss function, the first training data set comprising sample data and an evaluation score corresponding to the sample data; and performing proxy task evaluation on part of the at least two candidate data according to the predicted indicator corresponding to the at least two candidate data.

[0007] Optionally, the part of the data after the proxy task evaluation is added to a population data set.

[0008] It should be understood that the population data set comprises sample data and an evaluation score corresponding to the sample data.

[0009] It should be understood that the proxy task evaluation can be a face recognition task, a pedestrian re-identification task, a classification task, or a metric learning, and the embodiments of the present application do not limit the proxy task evaluation.

[0010] It should also be understood that the type of candidate data can be a loss function, a neural network architecture, a hyperparameter, and the embodiments of the present application do not limit the type of candidate data.

[0011] In the embodiments of the present application, the loss function of the performance prediction model obtained by combining the differentiable ranking loss function and the regression loss function is more flexible than the regression loss function which only includes the ability to accurately predict the absolute performance indicator of the candidate, and the prediction accuracy of the performance prediction model obtained by training is also improved. Therefore, adding the trained performance prediction model to the automatic search can improve the efficiency, accuracy and exploration data amount of the automatic search.

[0012] In some possible implementation manners, performing proxy task evaluation on part of the at least two candidate data according to the predicted indicator corresponding to the at least two candidate data comprises: performing proxy task evaluation on the candidate data with the best predicted indicator in the at least two candidate data.

[0013] In some possible implementation manners, the part of the candidate data that has undergone the agent task evaluation is added to the first training data set to obtain an updated first training data set; at least two updated candidate data are obtained, and the at least two updated candidate data are different from the at least two candidate data; the at least two updated candidate data are input into the updated target performance prediction model to obtain a predicted index corresponding to the at least two updated candidate data, where the updated target performance prediction model is obtained according to the updated first training data set; and part of the at least two updated candidate data is evaluated according to the predicted index corresponding to the at least two updated candidate data.

[0014] Optionally, the part of the candidate data that has undergone the agent task evaluation is added to the population data set.

[0015] It should be understood that the population data set includes sample data and an evaluation score corresponding to the sample data.

[0016] In the embodiments of the present application, in the inference process of the target performance prediction model, the first training data set is constantly updated by using the selected part of the candidate data, and the target performance prediction model is constantly updated, which can improve the performance of the search result and improve the exploration ability of the search space.

[0017] In some possible implementation manners, the regression loss function is a mean square error loss function L MSE .

[0018] In some possible implementation manners, the at least two candidate data are at least two candidate loss functions, and the population data set is a population loss function set.

[0019] In the embodiments of the present application, by adding the trained performance prediction model to the automatic search, the search efficiency can be improved, the performance of the potential candidate data selected by the performance prediction model is better, and the performance of the target search result is improved. For example, in the loss function automatic search, the performance prediction model is added to the automatic search process, which can improve the exploration of the search space and improve the performance of the target loss function.

[0020] In some possible implementation manners, when the loss function type in the candidate loss function is a generalized interval softmax loss function (GMS loss function), obtaining the at least two candidate loss functions includes: obtaining a current population loss function set, and the current population loss function set includes M population loss functions, where the m th population loss function is obtained by a first calculation graph a second calculation graph and a constant s, where M is a positive integer, 1≤m≤M; performing initial screening on the current population loss function set to obtain K first initial loss functions after screening, K is a positive integer greater than or equal to 2; performing cross screening on the K first initial loss functions with a preset probability to obtain a second loss function; if the second loss function passes the loss function rejection criterion, performing equivalence verification on the second loss function; if the second loss function is not equivalent to the mth current population loss function in the current population loss function set, the second loss function is determined as a candidate loss function.

[0021] In the embodiments of the present application, according to the number of functions and the number of constants included in the loss function, the search space of the loss function is constructed using the calculation graph corresponding to the number of functions and the constants. Compared with the traditional method of constructing the search space according to the calculation graph corresponding to the entire loss function, the method of constructing the search space in the embodiments of the present application is more detailed and more helpful to search for a target loss function with good performance.

[0022] In some possible implementation manners, if the second loss function passes the loss function rejection criterion, the equivalence verification on the second loss function includes: the loss function rejection criterion includes a loss function basic attribute criterion and a target task index, and if the loss function basic attribute criterion and the target task index are satisfied, the equivalence verification on the second loss function is performed; wherein the second loss function satisfies the loss function basic attribute criterion, the first calculation graph The corresponding first function t(x) and the second calculation graph The corresponding second function n(x) satisfies the following formula:

[0023]

[0024] The second loss function satisfies the target task index, that is, the output index obtained by training the task data through the second loss function reaches a preset value.

[0025] In the embodiments of the present application, the loss function rejection criterion including the basic attribute criterion and the target task index can quickly screen the second loss function, and early exclude the second loss function that does not meet the requirements. Compared with the traditional loss function rejection criterion based on only the basic attribute criterion or the loss function rejection criterion based on only the target task index, the loss function rejection criterion in the embodiments of the present application considers more comprehensive factors, and can more comprehensively exclude the second loss function that does not meet the requirements, thereby improving the search efficiency of the overall loss function.

[0026] In some possible implementation manners, the second loss function is determined as a candidate loss function includes: according to the first calculation graph The corresponding first function t(x), the second calculation graph The first feature vector is obtained according to the corresponding second function n(x) and constant s, the second feature vector set is obtained according to the population loss function in the current population loss function set, and the second feature vector set includes the second feature vector corresponding to each population loss function; if the first feature vector and the second feature vector corresponding to each population loss function are not equivalent, the second loss function is determined as a candidate loss function.

[0027] In the embodiment of the present application, the equivalence verification based on the feature vector effectively selects equivalent loss functions, avoids repeated proxy task evaluation on the loss functions in the current population loss function set, and thus effectively improves the search efficiency of the loss function.

[0028] In a second aspect, a training method of an automatically searched performance prediction model is provided, including: obtaining a first training data set, the first training data including sample data and an evaluation score corresponding to the sample data; training a performance prediction model according to the first training data set to obtain a target performance prediction model, wherein the loss function of the performance prediction model includes a differentiable ranking loss function L K and a regression loss function.

[0029] In the embodiment of the present application, the loss function of the performance prediction model obtained by combining the differentiable ranking loss function and the regression loss function is more flexible compared to the need for the ability to have an accurate prediction candidate absolute performance indicator, and the prediction accuracy of the performance prediction model obtained by training is also improved, and thus adding the trained performance prediction model to the automatic search can improve the efficiency and accuracy of the automatic search.

[0030] In some possible implementation manners, the regression loss function is a mean square error loss function L MSE .

[0031] In some possible implementation manners, the first training data set is updated; when the increment of the first training data set reaches a first threshold, the target performance prediction model is trained according to the updated first training data set to obtain an updated target performance prediction model.

[0032] In the embodiment of the present application, in the training process of the target performance prediction model, the first training data set is updated by using the potential data obtained in the inference process of the target performance prediction model, and the target performance prediction model is continuously trained and updated, which can improve the performance of the search result and improve the exploration ability of the search space.

[0033] In a third aspect, an automatic search apparatus is provided, which includes an obtaining unit and a processing unit. The obtaining unit is configured to obtain at least two candidate data, which are data to be evaluated for a proxy task. The processing unit is configured to: input the at least two candidate data into a target performance prediction model to obtain predicted indexes corresponding to the at least two candidate data, wherein the target performance prediction model is obtained by training a performance prediction model based on a first training data set, a loss function of the performance prediction model includes a differentiable ranking loss function L K and a regression loss function, and the first training data set includes sample data and evaluation scores corresponding to the sample data; and perform proxy task evaluation on part of the at least two candidate data according to the predicted indexes corresponding to the at least two candidate data.

[0034] Optionally, the part of the data after the proxy task evaluation is added to a population data set.

[0035] It should be understood that the population data set includes the sample data and the evaluation scores corresponding to the sample data.

[0036] It should be understood that the proxy task evaluation can be a face recognition task, a pedestrian re-identification task, a classification task, or metric learning, and the embodiments of the present application do not limit the proxy task evaluation.

[0037] It should also be understood that the type of candidate data can be a loss function, a neural network architecture, a hyperparameter, and the embodiments of the present application do not limit the type of candidate data.

[0038] In the embodiments of the present application, the loss function of the performance prediction model obtained by combining the differentiable ranking loss function and the regression loss function is more flexible than the regression loss function that only includes the ability to accurately predict the absolute performance index of the candidate, and the prediction accuracy of the performance prediction model obtained by training is also improved. Therefore, adding the trained performance prediction model to the automatic search can improve the efficiency, accuracy, and data exploration of the automatic search.

[0039] In some possible implementations, the processing unit is configured to: perform proxy task evaluation on the candidate data with the best predicted index among the at least two candidate data.

[0040] In some possible implementation manners, the apparatus further includes an updating unit: the updating unit is configured to add the part of the candidate data that has passed the agent task evaluation to the first training data set to obtain an updated first training data set; the obtaining unit is configured to obtain at least two updated candidate data, the at least two updated candidate data being different from the at least two candidate data; and the processing unit is configured to: input the at least two updated candidate data into the updated target performance prediction model to obtain a predicted index corresponding to the at least two updated candidate data, where the updated target performance prediction model is obtained according to the updated first training data set; and perform agent task evaluation on part of the at least two updated candidate data according to the predicted index corresponding to the at least two updated candidate data.

[0041] Optionally, the part of the candidate data that has passed the agent task evaluation is added to the population data set.

[0042] It should be understood that the population data set includes sample data and an evaluation score corresponding to the sample data.

[0043] In the embodiments of the present application, in the inference process of the target performance prediction model, the first training data set is constantly updated by using the selected part of the candidate data, and the target performance prediction model is constantly updated, which can improve the performance of the search result and improve the exploration ability of the search space.

[0044] In some possible implementation manners, the regression loss function is a mean square error loss function L MSE .

[0045] In some possible implementation manners, the at least two candidate data are at least two candidate loss functions, and the population data set is a population loss function set.

[0046] In the embodiments of the present application, by adding the trained performance prediction model to the automatic search, the search efficiency can be improved, the performance of the potential candidate data selected by the performance prediction model is better, and the performance of the target search result is improved. For example, in the loss function automatic search, the performance prediction model is added to the automatic search process, which can improve the exploration of the search space and improve the performance of the target loss function.

[0047] In some possible implementation manners, when the loss function type in the candidate loss function is a generalized interval softmax loss function (GMS loss function), the obtaining unit is configured to obtain a current population loss function set, the current population loss function set including M population loss functions, where the m th population loss function is obtained by a first calculation graph a second calculation graph and a constant s, where M is a positive integer, 1≤m≤M; the processing unit is configured to: perform initial screening on the current population loss function set to obtain K first initial loss functions after screening, K being a positive integer greater than or equal to 2; perform cross screening on the K first initial loss functions at a preset probability to obtain a second loss function; if the second loss function passes the loss function rejection criterion, performing equivalence verification on the second loss function; if the second loss function is not equivalent to the mth current population loss function in the current population loss function set, the second loss function is determined as a candidate loss function.

[0048] In the embodiments of the present application, according to the number of functions and the number of constants included in the loss function, the search space of the loss function is constructed using the calculation graph corresponding to the number of functions and the constants. Compared with the traditional method of constructing the search space according to the calculation graph corresponding to the entire loss function, the method of constructing the search space in the embodiments of the present application is more detailed and more helpful to search for a target loss function with good performance.

[0049] In some possible implementation manners, if the second loss function passes the loss function rejection criterion, the equivalence verification on the second loss function includes: the loss function rejection criterion includes a loss function basic attribute criterion and a target task index, and the processing unit is configured to: if the loss function basic attribute criterion and the target task index are satisfied, perform equivalence verification on the second loss function; wherein the second loss function satisfies the loss function basic attribute criterion, that is, the first calculation graph corresponding to the first function t(x) and the second calculation graph corresponding to the second function n(x) satisfy the following formula:

[0050]

[0051] The second loss function satisfies the target task index, that is, the output index obtained by training the task data through the second loss function reaches a preset value.

[0052] In the embodiments of the present application, the loss function rejection criterion including the basic attribute criterion and the target task index can quickly screen the second loss function, and early exclude the second loss function that does not meet the requirements. Compared with the traditional loss function rejection criterion based on only the basic attribute criterion or the loss function rejection criterion based on only the target task index, the loss function rejection criterion in the embodiments of the present application considers more comprehensive factors, and can more comprehensively exclude the second loss function that does not meet the requirements, thereby improving the search efficiency of the overall loss function.

[0053] In some possible implementation manners, the processing unit is configured to: according to the first calculation graph corresponding to the first function t(x) and the second calculation graph The first feature vector is obtained according to the corresponding second function n(x) and constant s, the second feature vector set is obtained according to the population loss function in the current population loss function set, and the second feature vector set includes the second feature vector corresponding to each population loss function; if the first feature vector and the second feature vector corresponding to each population loss function are not equivalent, the second loss function is determined as a candidate loss function.

[0054] In the embodiment of the present application, the equivalence verification based on the feature vector effectively selects equivalent loss functions, avoids repeated proxy task evaluation on the loss functions in the current population loss function set, and thus effectively improves the search efficiency of the loss function.

[0055] In a fourth aspect, a training device of an automatically searched performance prediction model is provided. The device includes an acquisition unit and a processing unit. The acquisition unit is configured to acquire a first training data set, the first training data including sample data and an evaluation score corresponding to the sample data. The processing unit is configured to train a performance prediction model according to the first training data set to obtain a target performance prediction model, wherein a loss function of the performance prediction model includes a differentiable ranking loss function L K and a regression loss function.

[0056] In the embodiment of the present application, the loss function of the performance prediction model obtained by combining the differentiable ranking loss function and the regression loss function is more flexible compared to the need for the ability to have an accurate prediction of the absolute performance indicator of the candidate, and the prediction accuracy of the performance prediction model obtained by training is also improved, and thus adding the trained performance prediction model to the automatic search can improve the efficiency and accuracy of the automatic search.

[0057] In some possible implementation manners, the regression loss function is a mean square error loss function L MSE .

[0058] In some possible implementation manners, the device further includes an updating unit. The updating unit is configured to update the first training data set. The processing unit is configured to train the target performance prediction model according to the updated first training data set to obtain an updated target performance prediction model when an increment of the first training data set reaches a first threshold.

[0059] In the embodiment of the present application, in the training process of the target performance prediction model, the potential data obtained in the inference process of the target performance prediction model is used to update the first training data set, and the target performance prediction model is continuously trained and updated, which can improve the performance of the search result and improve the exploration ability of the search space.

[0060] In a fifth aspect, an automatic search device is provided, which includes a memory configured to store a program, and a processor configured to execute the program stored in the memory, and when the program stored in the memory is executed, the processor is configured to execute the method in the first aspect and any one of the implementation manners in the first aspect.

[0061] The processor in the fifth aspect can be a central processing unit (CPU) or a combination of a CPU and a neural network operation processor. The neural network operation processor can include a graphics processing unit (GPU), a neural-network processing unit (NPU), a tensor processing unit (TPU), and the like. The TPU is a fully customized artificial intelligence accelerator application-specific integrated circuit (ASIC) for machine learning by Google.

[0062] In a sixth aspect, a performance prediction model training device for automatic search is provided, which includes a memory configured to store a program, and a processor configured to execute the program stored in the memory, and when the program stored in the memory is executed, the processor is configured to execute the method in the second aspect and any one of the implementation manners in the second aspect.

[0063] The processor in the sixth aspect can be a central processing unit or a combination of a CPU and a neural network operation processor. The neural network operation processor can include a graphics processing unit, a neural-network processing unit, a tensor processing unit, and the like. The TPU is a fully customized artificial intelligence accelerator ASIC for machine learning by Google.

[0064] In a seventh aspect, a computer readable medium is provided, which stores program code for execution by a device, and the program code includes code for executing the method in the first aspect or any one of the implementation manners in the second aspect.

[0065] In an eighth aspect, a computer program product including instructions is provided, and when the computer program product is run on a computer, the computer is caused to execute the method in the first aspect or any one of the implementation manners in the second aspect.

[0066] In a ninth aspect, a chip is provided, which includes a processor and a data interface, and the processor reads instructions stored on a memory through the data interface and executes the method in the first aspect or any one of the implementation manners in the second aspect.

[0067] Optionally, as an implementation form, the chip can further include a memory, and the memory stores instructions, and the processor is configured to execute the instructions stored in the memory, and when the instructions are executed, the processor is configured to execute the method in any implementation form of the first aspect or the second aspect.

[0068] The chip can be a field-programmable gate array (FPGA) or an application-specific integrated circuit (ASIC). BRIEF DESCRIPTION OF DRAWINGS

[0069] Figure 1 is a schematic diagram of an artificial intelligence main body framework provided by an embodiment of the present application;

[0070] Figure 2 is a system architecture 100 provided by an embodiment of the present application;

[0071] Figure 3 is a schematic diagram of a training device deployment provided by an embodiment of the present application;

[0072] Figure 4 is a schematic diagram of a processing flow on an AutoML service platform provided by an embodiment of the present application;

[0073] Figure 5 is a schematic diagram of a training method flow of an automatically searched performance prediction model provided by an embodiment of the present application;

[0074] Figure 6 is a schematic diagram of a visualization comparison of a tanh(·) function curve and a sign(·) function curve provided by an embodiment of the present application;

[0075] Figure 7 is a schematic diagram of a flow of an automatic search method provided by an embodiment of the present application;

[0076] Figure 8 is a schematic diagram of an overall flow of training and inference of a performance prediction model provided by an embodiment of the present application;

[0077] Figure 9 is a schematic diagram of a first calculation graph in a loss function provided by an embodiment of the present application;

[0078] Figure 10 is a schematic diagram of a flow of obtaining a candidate loss function provided by an embodiment of the present application;

[0079] Figure 11 ​is a flowchart of a GMS loss function search method provided by an embodiment of the present application;

[0080] Figure 12 is a schematic diagram of a variation mode of a calculation graph provided by an embodiment of the present application;

[0081] Figure 13 is an effect comparison schematic diagram of whether a differentiable ranking loss function is included in a loss function in a performance prediction model training process provided by an embodiment of the present application;

[0082] Figure 14 is an effect comparison schematic diagram of whether a potential loss function selection module is added in automatic loss function search provided by an embodiment of the present application;

[0083] Figure 15 is a schematic block diagram of an automatic search performance prediction model training device provided by an embodiment of the present application;

[0084] Figure 16 is a schematic block diagram of an automatic search device provided by an embodiment of the present application;

[0085] Figure 17 is a schematic block diagram of an automatic search performance prediction model training device provided by an embodiment of the present application;

[0086] Figure 18 is a schematic block diagram of an automatic search device provided by an embodiment of the present application. DETAILED DESCRIPTION

[0087] The technical solutions in the present application will be described below with reference to the drawings.

[0088] Figure 1 An artificial intelligence main body framework schematic diagram is shown, which describes the overall workflow of an artificial intelligence system and is suitable for general artificial intelligence field requirements.

[0089] The above artificial intelligence theme framework will be described in detail from two dimensions of "intelligent information chain" (horizontal axis) and "information technology (IT) value chain" (vertical axis).

[0090] The "intelligent information chain" reflects a series of processes from data acquisition to processing. For example, it can be a general process of intelligent information perception, intelligent information representation and formation, intelligent reasoning, intelligent decision-making, intelligent execution and output. In this process, data undergoes a condensation process of "data-information-knowledge-wisdom".

[0091] The "IT value chain" reflects the value brought by artificial intelligence to the information technology industry, from the underlying infrastructure of human intelligence, information (provision and processing technology implementation) to the industrial ecological process of the system.

[0092] (1) Infrastructure:

[0093] Infrastructure provides computing power support for artificial intelligence systems, enables communication with the outside world, and realizes support through the underlying platform.

[0094] Infrastructure can communicate with the outside world through sensors, and the computing power of infrastructure can be provided by intelligent chips.

[0095] The intelligent chip here can be a central processing unit (CPU), a neural-network processing unit (NPU), a graphics processing unit (GPU), an application specific integrated circuit (ASIC), and a field programmable gate array (FPGA) hardware acceleration chip, etc.

[0096] The underlying platform of the infrastructure can include distributed computing frameworks and related platform guarantees and support for networks, including cloud storage and computing, and interconnected networks.

[0097] For example, for infrastructure, data can be obtained through sensors and external communication, and then provided to intelligent chips in the distributed computing system provided by the underlying platform for calculation.

[0098] (2) Data:

[0099] The data above the infrastructure is used to represent the data source in the field of artificial intelligence. This data involves graphics, images, speech, text, and also involves Internet of Things data of traditional devices, including business data of existing systems and sensing data such as force, displacement, liquid level, temperature, and humidity.

[0100] (3) Data processing:

[0101] The above data processing usually includes data training, machine learning, deep learning, search, reasoning, decision-making, and other processing methods.

[0102] Among them, machine learning and deep learning can model, extract, preprocess, and train symbolic and formal intelligent information of data.

[0103] Reasoning refers to simulating human intelligent reasoning methods in a computer or intelligent system, using formalized information to perform machine thinking and problem solving according to a reasoning control strategy, and the typical functions are search and matching.

[0104] Decision making refers to the process of decision making after intelligent information is subjected to reasoning, and usually provides functions such as classification, sorting, prediction, etc.

[0105] (4) General capabilities:

[0106] After the data is subjected to the above-mentioned data processing, some general capabilities can be formed based on the results of the data processing, such as algorithms or a general system, for example, translation, text analysis, computer vision processing, speech recognition, image recognition, etc.

[0107] (5) Intelligent products and industry applications:

[0108] Intelligent products and industry applications refer to products and applications of artificial intelligence systems in various fields, which are encapsulations of overall solutions of artificial intelligence, and realize the productization of intelligent information decision making and landing applications. The application fields mainly include intelligent manufacturing, intelligent transportation, smart home, intelligent medical care, intelligent security, autonomous driving, safe city, intelligent terminal, etc.

[0109] The automatic search loss function method in the embodiments of the present application can be applied in many fields of artificial intelligence, for example, intelligent manufacturing, intelligent transportation, smart home, intelligent medical care, intelligent security, autonomous driving, safe city, etc.

[0110] Specifically, the embodiments of the present application can be specifically applied in the fields of face recognition, pedestrian re-identification and metric learning that need to use (deep) neural networks.

[0111] Since the embodiments of the present application involve the application of a large number of neural networks, in order to facilitate understanding, the related terms and concepts of the neural networks that may be involved in the embodiments of the present application will be introduced first.

[0112] (1) Neural network

[0113] The neural network can be composed of neural units, and the neural unit can refer to an operation unit with x s and intercept 1 as input, and the output of the operation unit can be:

[0114]

[0115] Wherein, s = 1, 2, … n, n is a natural number greater than 1, W s is the weight of x s , and b is the bias of the neural unit.

[0116] f is an activation function of a neural unit, used to introduce a non-linear characteristic into the neural network to convert an input signal in the neural unit into an output signal. The output signal of the activation function can be used as an input of the next layer. For example, the activation function can be a ReLU, tanh or sigmoid function.

[0117] A neural network is a network formed by connecting a plurality of the above-described single neural units, i.e., the output of one neural unit can be the input of another neural unit. The input of each neural unit can be connected to a local receptive field of the previous layer to extract features of the local receptive field, which can be a region composed of a plurality of neural units.

[0118] (2) Deep neural network

[0119] A deep neural network (DNN), also referred to as a multi-layer neural network, can be understood as a neural network having multiple hidden layers. According to the position of different layers, the neural network inside the DNN can be divided into three categories: an input layer, a hidden layer and an output layer. Generally, the first layer is the input layer, the last layer is the output layer, and the layers in between are hidden layers. The layers are fully connected, i.e., any neuron of the i-th layer is connected to any neuron of the i+1-th layer.

[0120] Although the DNN looks very complex, it is actually not complex in terms of the work of each layer. In simple terms, it is expressed as the following linear relationship expression: wherein, is an input vector, is an output vector, is a bias vector, W is a weight matrix (also referred to as a coefficient), and a() is an activation function. Each layer only performs the following simple operation on the input vector to obtain the output vector Due to the large number of layers of the DNN, the number of coefficients W and bias vectors is also large. These parameters are defined in the DNN as follows: taking the coefficient W as an example: assuming that in a three-layer DNN, the linear coefficient of the fourth neuron of the second layer to the second neuron of the third layer is defined as The superscript 3 represents the layer number of the coefficient W, and the subscripts correspond to the output third layer index 2 and the input second layer index 4.

[0121] In summary, the coefficient of the k-th neuron of the L-1-th layer to the j-th neuron of the L-th layer is defined as

[0122] Note that the input layer does not have a W parameter. In deep neural networks, more hidden layers allow the network to better capture the complexity of real-world situations. In theory, the more parameters a model has, the higher its complexity, and the greater its "capacity" to perform more complex learning tasks. Training a deep neural network is essentially the process of learning the weight matrices, and the ultimate goal is to obtain the trained weight matrices for all layers of the deep neural network (the weight matrices formed by the vectors W of many layers).

[0123] (3) Loss function

[0124] In the process of training a deep neural network, because the output of the deep neural network is expected to be as close as possible to the value that is truly intended to be predicted, the weight vectors of each layer of the neural network can be updated by comparing the predicted value of the current network and the value that is truly intended to be predicted, and then according to the difference between the two. (Of course, before the first update, there is usually a process of initialization, i.e., pre-configuring parameters for each layer in the deep neural network), for example, if the predicted value of the network is too high, adjust the weight vector to make it predict lower, and keep adjusting until the deep neural network can predict the value that is truly intended to be predicted or a value very close to it. Therefore, it is necessary to define "how to compare the difference between the predicted value and the target value" in advance, which is the loss function or the objective function, which are important equations for measuring the difference between the predicted value and the target value. Among them, taking the loss function as an example, the higher the output value (loss) of the loss function, the greater the difference, and then the training of the deep neural network becomes a process of trying to minimize this loss. Generally, the smaller the loss, the higher the training quality of the deep neural network, and the larger the loss, the lower the training quality of the deep neural network. Similarly, the smaller the loss fluctuation, the more stable the training; the larger the loss fluctuation, the less stable the training.

[0125] There are many types of loss functions at present, which can be roughly divided according to the type of task to which the loss function is applied. For example, regression loss functions applied to regression problems: mean square error (MSE) loss function, mean absolute error (MAE) loss function, mean squared logarithmic error (MSLE) loss function, and mean absolute percentage error (MAPE) loss function; classification loss functions applied to classification problems: logistic loss function, negative log likelihood loss, cross entropy loss, Hinge loss function, and exponential loss function; and triplet loss functions applied to metric learning tasks. It should be understood that the method of automatically searching for a loss function according to an embodiment of the present application can be applied to any type of loss function, and the type of loss function is not limited according to an embodiment of the present application. The method of automatically searching for a loss function according to an embodiment of the present application will be described below with reference to a commonly used cross entropy loss function.

[0126] Exemplarily, the cross entropy loss function can be a margin-based softmax (MS) loss function or a generalized margin-based softmax (GMS) loss function. The specific form of the MS loss function is shown in equation (1), and the specific form of the GMS loss function is shown in equation (2).

[0127]

[0128] wherein, in the MS loss function, t(x) is a function with a domain of [-1, 1]. is the predicted output value of the neural network model, and y is the target value of the neural network model.

[0129]

[0130] wherein, n(x) is also a function with a domain of [-1, 1]. When n(x) = x, the MS loss function is a special case of the GMS loss function. The commonly used specific forms of n(x) and in the GMS loss function are shown in Table 1.

[0131] Table 1. t(x) and n(x) in the GMS loss function

[0132]

[0133] (4)Computational graph

[0134] A computational graph, also known as a dataflow graph, is defined as a directed acyclic graph (DAG). Tensors and operation units are objects in the graph, operation units are nodes of the graph, and tensors are data flowing on edges of the graph. Acyclic means that the graph cannot have cycles, e.g., a tensor x cannot be an input to a layer that generates x. The only allowed cycle (i.e., a cycle connection) is an internal cycle of a recurrent layer.

[0135] Most deep learning frameworks can be described using a directed acyclic graph in which each node represents a neuron, and if the output of one node is used as the input of another node, the two nodes share an edge. That is, the nodes in this computational graph represent operators, and the edges between nodes represent data dependencies between two nodes.

[0136] (5)Edge device

[0137] An edge device refers to any device with computing resources and network resources between a data source and a cloud center. For example, a mobile phone is an edge device between a person and a cloud center, and a gateway is an edge device between a smart home and a cloud center. In an ideal environment, an edge device refers to a device that analyzes or processes data near a data source. As there is no data flow, network traffic and response time are reduced.

[0138] The edge device in the embodiments of the present application can be a mobile phone, a tablet personal computer (TPC), a media player, a smart home, a laptop computer (LC), a personal digital assistant (PDA), a personal computer (PC), a camera, a camcorder, a smart watch, a wearable device (WD), or an autonomous vehicle, etc. It can be understood that the specific form of the edge device is not limited in the embodiments of the present application.

[0139] Figure 2 A system architecture 100 is provided in the embodiments of the present application. In the system architecture 100, an edge device 110 is connected to a cloud center 120 through a network 130. Figure 2In some embodiments, the data collection device 160 is configured to collect training data. For example, for the data processing of the embodiments of the present application, if the data is image data, the training data can include training images and classification results corresponding to the training images. The classification results of the training images can be manually pre-labeled results.

[0140] After the training data is collected, the data collection device 160 stores the training data in the database 130, and the training device 120 trains the target model / rule 101 based on the training data maintained in the database 130.

[0141] The training of the target model / rule 101 by the training device 120 is described below. The training device 120 processes the input raw data and compares the output value with the target value until the difference between the output value of the training device 120 and the target value is less than a certain threshold, thereby completing the training of the target model / rule 101.

[0142] The target model / rule 101 described above can be used to implement the data processing of the embodiments of the present application. The target model / rule 101 in the embodiments of the present application can be a neural network model, for example, a deep neural network. It should be noted that in actual applications, the training data maintained in the database 130 can not all be collected by the data collection device 160, but can also be received from other devices. In addition, it should be noted that the training device 120 can not completely train the target model / rule 101 based on the training data maintained in the database 130, but can also obtain training data from the cloud or other places for model training. The above description should not be considered as a limitation of the embodiments of the present application.

[0143] The target model / rule 101 trained by the training device 120 can be applied to different systems or devices, such as the execution device 110 shown in FIG. 1. Figure 2 The execution device 110 can be a terminal, such as a mobile phone terminal, a tablet computer, a notebook computer, an augmented reality (AR) AR / virtual reality (VR) terminal, a vehicle terminal, etc., and can also be a server or a cloud, etc. In some embodiments, the execution device 110 is configured to execute the target model / rule 101. Figure 2 In some embodiments, the execution device 110 is configured to have an input / output (I / O) interface 112 for data interaction with external devices. A user can input data to the I / O interface 112 through the client device 140. The input data in the embodiments of the present application can include data to be processed input by the client device.

[0144] In the process of pre-processing the input data by the execution device 110, or in the process of performing calculation by the calculation module 111 of the execution device 110, the execution device 110 can call data, code, etc. in the data storage system 150 for the corresponding processing, and can also store the data, instructions, etc. obtained by the corresponding processing in the data storage system 150.

[0145] Finally, the I / O interface 112 returns the processing result, such as the processing result of the data obtained above, to the client device 140, thereby providing the user.

[0146] It is worth noting that the training device 120 can generate a corresponding target model / rule 101 based on different training data for different targets or different tasks, and the corresponding target model / rule 101 can be used to achieve the above-mentioned target or complete the above-mentioned task, thereby providing the user with the required result.

[0147] In the case shown in Figure 2 , the user can manually give the input data, which can be operated through the interface provided by the I / O interface 112. In another case, the client device 140 can automatically send the input data to the I / O interface 112, and if the authorization of the user is required for the client device 140 to automatically send the input data, the user can set the corresponding permission in the client device 140. The user can view the result output by the execution device 110 in the client device 140, and the specific presentation form can be a specific way such as display, sound, action, etc. The client device 140 can also act as a data collection end to collect the input data input into the I / O interface 112 and the output result output from the I / O interface 112 as new sample data and store them into the database 130. Of course, the input data input into the I / O interface 112 and the output result output from the I / O interface 112 can also be directly stored into the database 130 as new sample data by the I / O interface 112 without being collected through the client device 140.

[0148] It is worth noting that, Figure 2 The system architecture provided by the embodiments of the present application is only a schematic diagram, and the positional relationship between the devices, components, modules, etc. shown in the diagram does not constitute any limitation. For example, in Figure 2 , the data storage system 150 is an external memory relative to the execution device 110, and in other cases, the data storage system 150 can also be placed in the execution device 110.

[0149] As Figure 2 indicated, the loss function used in the process of training the target model / rule 101 by the training device 120 can be a loss function obtained by the method for automatically searching the loss function provided by the embodiments of the present application.

[0150] Figure 3 is a deployment schematic diagram of the training device provided by an embodiment of the present application, as shown in Figure 3 (a), the training device 310 can be deployed in a cloud environment, which is an entity that provides cloud services to users by utilizing underlying resources in a cloud computing mode. The cloud environment includes a cloud data center and a cloud service platform, the cloud data center includes a large number of underlying resources (including computing resources, storage resources and network resources) owned by a cloud service provider, and the computing resources included in the cloud data center can be a large number of computing devices (such as servers).

[0151] The training device 310 can be a server in the cloud data center for training a neural network model, or can also be a virtual machine for training a neural network model.

[0152] The training device 310 can also be a software device deployed on a server or a virtual machine in the cloud data center, which is used to train a neural network model, and the software device can be distributed on multiple servers, or distributed on multiple virtual machines, or distributed on virtual machines and servers.

[0153] As shown in Figure 3 , the training device 310 can be abstracted by the cloud service provider into a cloud service for training a neural network model on the cloud service platform to provide users, and after the user purchases the cloud service on the cloud service platform, the cloud environment provides the user with a cloud service for training a neural network by using the cloud service.

[0154] For example, as shown in Figure 3 (b), the user can upload a neural network to be trained (and further upload an original training set) to the cloud environment through an application program interface (API) or through a web interface provided by the cloud service platform, the training device 310 receives the neural network to be trained and the original training set, performs automatic search (for example, automatically searches for a loss function) through the automatic search module 311, inputs the search result (for example, the loss function) obtained by the search into the model training module 312 to train the neural network model to be trained, and finally returns the target neural network obtained by the training to the edge device where the user is located. The edge device is described in detail in the foregoing, and will not be repeated here. The automatic search module 311 includes a trained performance prediction model for automatic search.

[0155] For example, the user can upload the type of target task to the cloud environment through an application interface or a webpage interface provided by the cloud service platform, and further upload the original training set. The training device receives the type of target task and the original training set, performs automatic search (for example, automatic search of loss function) through the automatic search module 311, inputs the search result (for example, loss function) obtained by searching into the model training module 312 to train the neural network model corresponding to the type of target task, and finally returns the target neural network trained to the edge device where the user is located.

[0156] For example, the user can upload the type of target task to the cloud environment through an application interface or a webpage interface provided by the cloud service platform, and further upload the original training set. The training device receives the type of target task and the original training set, performs automatic search (for example, automatic search of loss function) through the automatic search module 311, inputs the search result (for example, loss function) obtained by searching into the model training module 312 to train the neural network model corresponding to the type of target task, and finally returns the target neural network trained to the edge device where the user is located.

[0157] The training device 310 described above can be deployed in the cloud environment as shown in (a) of FIG. 1; or the training device 310 described above can also be a terminal device, at this time, the execution device 310 can be deployed on the user terminal side, and the embodiments of the present application are not limited thereto. Figure 3 The training device 310 described above can be deployed in the cloud environment as shown in (a) of FIG. 1; or the training device 310 described above can also be a terminal device, at this time, the execution device 310 can be deployed on the user terminal side, and the embodiments of the present application are not limited thereto.

[0158] The performance of the neural network model is affected by many factors, for example, the architecture of the neural network model, the training process, the regularization method, the hyperparameters and the loss function. At present, most of the methods for improving the performance of the neural network model are to manually design the architecture of the neural network model or manually design the loss function. With the rise of AutoML, it is also possible to automatically search for the loss function, the architecture of the neural network model or the hyperparameters. AutoML can provide corresponding services according to the user input training data and target task.

[0159] Figure 4 is a schematic diagram of a processing flow provided by an AutoML service platform according to an embodiment of the present application. The AutoML service platform provides corresponding services based on the training data and target task provided by the user. As shown in FIG. 1, the AutoML service platform includes a user terminal 100, a cloud service platform 200 and a training device 310. Figure 4As shown, the AutoML service platform obtains a solution satisfying the user's requirement by performing one or more search operations. The search operations that the AutoML service platform can perform include data augmentation strategy search, model structure search, loss function search, and hyperparameter search. Among them, the data augmentation strategy search, the model structure search, the loss function search, and the hyperparameter search are optional operations. For example, if the user provides a model structure, the model structure search does not need to be performed.

[0160] Specifically, the automatic search method can be performed by the method in the embodiments of the present application to obtain a search result satisfying the requirement. The description of the specific loss function automatic search method is detailed in the description of the loss function automatic search method in the embodiments of the present application. Figure 11

[0161] The output of the AutoML service platform is determined according to the user's requirement. In the embodiments of the present application, the output of the AutoML service platform can include a target neural network model and / or a loss function. For example, the user provides sample images as training data, and the target task is a face recognition task, and the AutoML service platform can output a target neural network model that can be used to perform the face recognition task. For another example, the user provides sample images as training data, and the target task is a face recognition task, and the user requires a loss function for training the target neural network model, and the AutoML service platform can output a target neural network model that can be used to perform the face recognition task and a loss function. For another example, the user provides sample images as training data, and the target task is face recognition, and the user also provides the structure of the neural network model, and requires a loss function in the target neural network model, and the AutoML service platform can output a loss function in the training process of the target neural network model that can be used to perform the face recognition task.

[0162] The current automatic search method has a relatively high search cost, and therefore, how to improve the automatic search efficiency becomes a problem to be solved. The embodiments of the present application propose a training method of an automatic search performance prediction model, which can improve the automatic search efficiency and the performance of the search result, thereby improving the performance of the target neural network model.

[0163] The training method of the automatic search performance prediction model in the embodiments of the present application will be described in detail below. Figures 5 to 7

[0164] ​​The training method of the performance prediction model provided in the embodiments of the present application can be applied to an automatic search method of a loss function, a neural network framework, or a hyperparameter, and the like, and can perform intelligent information modeling, extraction, preprocessing, training, and the like on symbolic and formal training data (for example, a loss function training data set in the present application), and finally obtain a trained performance prediction model. In addition, the automatic search method provided in the embodiments of the present application can use the trained performance prediction model, input input data (for example, a candidate loss function in the present application) into the trained performance prediction model, and obtain output data (for example, a prediction index in the present application). It should be noted that the training method of the performance prediction model and the automatic search method provided in the embodiments of the present application are based on the same concept and can be understood as two parts of a system or two stages of an overall process, for example, a model training stage and a model application stage.

[0165] Figure 5 FIG. 1 is a schematic diagram of a training method of an automatic search performance prediction model provided in the embodiments of the present application. It should be understood that the method 500 shown in FIG. 1 can be performed by a training device in a cloud environment or a training device of a terminal device, and the embodiments of the present application do not limit the specific form of the training device. Figure 5

[0166] The method 500 includes steps S510 to S520, which are described in detail below.

[0167] S510, obtaining a first training data set, the first training data including sample data and an evaluation score corresponding to the sample data.

[0168] It should be understood that the first training data is related to the automatic search task. For example, if the automatic search task is to automatically search for a loss function, the first training data is a loss function that has been evaluated in performance; or if the automatic search task is to automatically search for a neural network model structure, the first training data is a neural network model structure that has been evaluated in performance; or if the automatic search task is to automatically search for a hyperparameter, the first training data is a hyperparameter that has been evaluated in performance. The embodiments of the present application do not limit the type of the first training data. The embodiments of the present application are described in detail below with the example of the automatic search task being a loss function.

[0169] S520, training an automatic search performance prediction model according to the first training data, a loss function of the automatic search performance prediction model including a differentiable ranking loss function and a regression loss function.

[0170] ​It should be understood that the performance prediction model for automatic search is used to predict the performance metrics of candidate loss functions, candidate neural network structures, or candidate hyperparameters, and this application embodiment does not impose any limitations on this. The following embodiments of this application will be described in detail using the prediction model for predicting the performance of loss functions as an example.

[0171] As one possible implementation, the loss function of the performance prediction model balances the two parts of the loss function through a balancing factor λ.

[0172] It should be noted that the ranking metric used in the ranking loss function can be the similarity Kendall's Tau ranking metric, as shown in formula (3):

[0173]

[0174] Wherein, P(x n ) represents the output of the performance prediction model, y n The performance accuracy of the proxy task is represented, which is the actual performance accuracy. B represents the batch size. The sign(·) function is a piecewise function as shown in formula (4).

[0175]

[0176] Since the sign(·) function is a piecewise function, Kendall's Tau ranking index is not differentiable, therefore formula (3) cannot be directly used as the loss function. The curve of the tanh(·) function is very similar to the curve of the sign(x) function, such as... Figure 6 As shown, Figure 6 This is a visual comparison diagram of the curves of the tanh(·) function and the sign(x) function provided in an embodiment of this application. Therefore, by replacing the second sign(x) function in formula (3) with the tanh(x / τ) function, a differentiable ranking loss function is obtained, the specific form of which is shown in formula (5), where τ controls the strength of tanh(x / τ) replacing sign(x), and the specific variation law is as follows. Figure 6 As shown.

[0177]

[0178] It should be noted that the similarity ranking loss function such as formula (5) is used in the embodiments of the present application, and a loss function based on other similarity ranking indicators can also be used, for example, a spearman ranking indicator or a pearman ranking indicator, and the embodiments of the present application do not limit this. It should be understood that the spearman ranking indicator and the pearman ranking indicator are both non-differentiable, so if a loss function based on these two ranking indicators is to be used, a differentiable ranking loss function can be obtained in a similar manner as described above, and details are not repeated here.

[0179] It should be understood that the regression loss function can be a mean square error loss function, a mean absolute error loss function, etc., and the embodiments of the present application do not limit this. For example, the regression loss function is a mean square error loss function, as shown in formula (6).

[0180]

[0181] wherein x n is a feature representation of the input data of the prediction model. For example, when the input data of the prediction model is a candidate loss function, x n is a feature vector of the candidate loss function, wherein n is a positive integer in [1, N], and N represents the number of candidate loss functions.

[0182] As a possible implementation manner, the loss function of the performance prediction model is as shown in formula (7):

[0183]

[0184] Since only a regression loss function (for example, a MSE loss function) is used, the performance prediction model must have the ability to accurately predict the absolute performance indicator of the candidate data. However, in the training process of the performance prediction model, a small amount of data is often used for training due to a large search space, and therefore, using only a regression loss function as the loss function of the performance prediction model can easily cause the performance prediction model to overfit and result in weak generalization ability of the performance prediction model. Therefore, in the embodiments of the present application, the loss function of the performance prediction model obtained by combining the differentiable ranking loss function and the regression loss function is more flexible compared to the loss function that only needs to have the ability to accurately predict the absolute performance indicator of the candidate, and the prediction accuracy of the performance prediction model obtained by training is also improved, and therefore, adding the trained performance prediction model to the automatic search can improve the efficiency and accuracy of the automatic search. For example, in the automatic search loss function, the performance prediction model of the embodiments of the present application can improve the search efficiency of the loss function, and the performance of the searched loss function is also better.

[0185] Figure 7This is a flowchart illustrating an automatic search method provided in an embodiment of this application. The following will describe the process through steps S701 to S704. Figure 7 Please provide a detailed explanation.

[0186] S701, Obtain at least two candidate data points, where the at least two candidate data points are data to be evaluated for the proxy task.

[0187] It should be noted that subsequent steps will be combined with Figures 9 to 12 The S701 will be explained in detail using candidate data as the loss function as an example.

[0188] It should be understood that the evaluation of the proxy task can be a face recognition task, a pedestrian re-identification task, a classification task, or a metric learning task, etc., and the embodiments of this application do not limit this.

[0189] S702, input at least two candidate data points into the target performance prediction model to obtain the prediction metrics corresponding to at least two candidate data points. The target performance prediction model is trained on the first training dataset, and its loss function includes a differentiable ranking loss function L. K The regression loss function, the first training dataset includes sample data and the corresponding evaluation scores of the sample data.

[0190] It should be understood that the target performance loss function is achieved through... Figure 6 The method described is used to train a good target performance prediction model.

[0191] It should be understood that the prediction metric output by the performance prediction model and the evaluation score corresponding to the sample data in the first training dataset use the same metric. The difference is that the prediction metric is the prediction result of the candidate data, while the evaluation score is the actual result corresponding to the sample data. The prediction metric is related to the actual proxy task. For example, in pedestrian re-identification, the prediction metric is mAP, and in classification tasks, the prediction metric can be accuracy. This application embodiment does not limit this.

[0192] S703, based on the prediction indicators corresponding to at least two candidate data, perform proxy task evaluation on a portion of the candidate data from at least two candidate data.

[0193] It should be understood that partial candidate data in at least two candidate data indicates that the amount of data used for subsequent agent task evaluation is less than the amount of data in at least two candidate data. This partial data can be called potential data. The agent task evaluation is mainly used to obtain the actual evaluation score of the potential data, such as the actual evaluation score of the potential loss function.

[0194] As one possible approach, a proxy task evaluation is performed on the candidate data with the best prediction metric among at least two candidate data sets.

[0195] As a possible implementation, the candidate data with the top P% of the prediction indicators in the at least two candidate data is evaluated by the proxy task, 1≤P<100, and P is a real number.

[0196] Optionally, S704, the part of the data set after the proxy task evaluation is added to the population data set.

[0197] It should be understood that the population data set is used to determine the target search result, and the population data set includes sample data and evaluation scores corresponding to the sample data, that is, the data in the population data set is data that has obtained an actual evaluation score through proxy task evaluation. The amount of data in the population data set is fixed. Optionally, the data ranked first in the current population data set is eliminated.

[0198] In the embodiments of the present application, by adding the trained performance prediction model to the automatic search, not only the search efficiency can be improved, but also the performance of the potential candidate data screened out by the performance prediction model is better, thereby improving the performance of the target search result. For example, in the loss function automatic search, the performance prediction model is added to the automatic search process, which not only improves the exploration of the search space, but also improves the performance of the target loss function.

[0199] The overall flow of training and inference of the performance prediction model will be described below. Figure 8 The overall flow of training and inference of the performance prediction model will be described below. Figure 8 is a schematic diagram of the overall flow of training and inference of the performance prediction model provided by the embodiments of the present application.

[0200] As Figure 8 shown, the training process 8100 and the inference process 8200 of the performance prediction model can be interleaved, Figure 8 The process shown can also be referred to as a potential data selection process.

[0201] It should be noted that the training process 8100 of the performance prediction model can be as Figure 6 shown, which obtains the target performance prediction model after one training, or as Figure 8 shown, which obtains the target performance prediction model after continuous increase and update of the first training data set. The continuous update process of the target performance prediction model will be described below. Figure 8

[0202] First, when the number of training data with evaluation scores in the first training data set reaches E0, the first training data set is input into the performance prediction model to be trained to train the parameters of the performance prediction model, and a parameter-trained performance prediction model, that is, a target performance prediction model, is obtained. When the first training data set is a loss function training set, the first training data set can use​ wherein Θ i is the parameter of each loss function in the loss function dataset pool, p i is the performance corresponding to each loss function. Exemplarily, the performance prediction model can be a one-dimensional ResNet50, or other neural network models, which are not limited by embodiments of the present application.

[0203] Subsequently, the at least two candidate data are input into the target performance prediction model to obtain the predicted indicators corresponding to the at least two candidate data, and the candidate data are determined according to the obtained predicted performance. The at least two candidate data are data to be evaluated by the agent task. The potential data are subjected to the agent task to obtain the evaluation scores of the potential data, and the potential data and the evaluation scores corresponding thereto are added to the first training data set. When the performance prediction of the at least two candidate data is completed, the at least two candidate data are emptied, and the at least two updated candidate data are obtained. The same performance prediction as that of the at least two previous candidate data is used to obtain new potential data, and the new potential data including the evaluation scores are added to the first training data set.

[0204] Finally, after multiple iterations of prediction, as shown in the performance prediction model inference process 8200, multiple potential data are obtained through multiple performance predictions of the target performance prediction model, until the increment ΔE of the first training data set reaches the first threshold, and the target performance prediction model is updated according to the updated first training data set. Figure 8

[0205] Exemplarily, when the first training data set is a loss function training set, the data type in the candidate data is a loss function, and the potential loss function selection process can be as shown in Algorithm 1.

[0206] When the number of loss functions evaluated on the agent task reaches E0, the performance prediction model P to be trained will be trained according to the current evaluated set (the parameters Θ i and the performance p i corresponding thereto) of the loss function) of the performance prediction model P to be trained. After that, whenever the number of the evaluated set |Eva| increases by ΔE, the parameters of the performance prediction model P trained by the parameters will be updated according to the current evaluated set Eva. When the performance prediction model to be trained is trained for the first time, each newly generated loss function verified by the equivalence verification strategy will be added to the candidate set of the selector, until the number of the candidate set reaches the preset N p , the performance prediction model P ​The performance of each loss function in the candidate dataset is predicted, and the one with the highest predicted performance is selected as the most potential loss function to be used in the subsequent proxy task for evaluation. At this time, all loss functions in the selected dataset will be emptied, and the corresponding parameters and indicators will be added to the evaluated set Eva after the evaluation of the loss function is completed.

[0207]

[0208] The above training method and search process can be applied to network architecture search, loss function search, and hyperparameter search of AutoML. The following will be described in detail Figures 9 to 12 The above training method and search process can be applied to network architecture search, loss function search, and hyperparameter search of AutoML. The following will be described in detail

[0209] The current loss function search can be divided into two categories, namely dynamic loss function search and fixed loss function search.

[0210] Among them, the dynamic loss function search is to embed the search process of the loss function in the model training, and a new loss function will be generated for each iteration of the training. When the training based on the fixed model and the dataset is completed, the dynamic loss function search is also completed. The loss function obtained by the search is only applicable to the model and the training dataset in the training process. When any one of the training dataset or the neural network model to be trained changes, the loss function search needs to be performed again to search for the target loss function. Therefore, the target loss function obtained by the dynamic loss function search has poor cross-dataset and model migration ability. For different datasets and neural network models, it is necessary to consume computing power to search for the target loss function in the training process, and the generalization ability of the target loss function searched is weak. For example, the two dynamic loss function search methods of automatic loss function search (AutoML for loss function search, AM-LFS) and searching for softmax (searching for softmax, Search-Softmax).

[0211] Therefore, in order to overcome the weakness of the target loss function obtained by the dynamic loss function search that the generalization ability is weak, the fixed loss function search method is generated. The fixed loss function search is a general search method of searching the loss function from scratch to find a general loss function. The loss function is modeled by a computation graph, and an evolutionary algorithm is used to search for the best loss function form. For example, the convergence simulation driven evolutionary search algorithm (CSE-Autoloss) and the method of searching loss function from scratch (AutoLoss-Zero) can be used to search for the target loss function. The target loss function obtained by the two fixed loss function searches can be migrated to other data sets and neural network models for model training. However, the search cost of the evolutionary algorithm for searching the target loss function is usually large. This search cost not only reflects the fact that a large amount of time is spent to evaluate the candidate loss function to obtain the optimal target loss function, but also reflects the fact that if the candidate loss function to be evaluated is a loss function with poor performance, a large amount of time is spent to evaluate the loss function with poor performance during the evaluation of the candidate loss function. Although there are many methods to improve the search efficiency of the two methods, the improvement of the efficiency is still limited. Therefore, how to improve the search efficiency of the fixed loss function search has become a problem to be solved.

[0212] The potential data selection module based on the performance prediction model (such as Figure 7 ) is applied to the potential loss function of the automatic search loss function. This not only improves the exploration ability of the loss function search algorithm for the loss function search space, but also improves the performance of the target loss function. The improvement of the exploration ability and the improvement of the performance of the target loss function will be explained in detail in combination with Figures 13 to 14 and Tables 3 to 5.

[0213] In order to further improve the efficiency of searching the loss function, further improvement can be made on the first candidate data set obtained in S701. The following will be combined with Figures 9 to 12 to explain in detail how to further improve the efficiency of searching the loss function.

[0214] First, the specific expression form of the GMS loss function is shown in the above formula (2). The search space of the GMS loss function in the embodiment of the application is represented by the first function t(x), the second function n(x), and the constant s. Specifically, the first function t(x) is represented by a first computation graph The second function n(x) is represented by a second computation graph

[0215] It should be understood that other loss functions can also be customized according to the number of functions included in the other loss functions and the number of constants, and the embodiments of the present application do not limit this.

[0216] Exemplarily, in combination with Figure 9 and Table 2, the first calculation graph corresponding to the first function t(x) in the ciecle loss function shown in Table 1 is described. , Figure 9 is a schematic diagram of a first calculation graph provided by an embodiment of the present application.

[0217] As Figure 9 shown, the input nodes of the calculation graph show two types of input nodes, one is a constant node, and the other input node represents the output of the neural network, wherein the constant node c can be one value in the constant set shown in formula (8).

[0218]

[0219] wherein Δ c and N c are preset values, Δ c is a real number, and N c is a positive integer.

[0220] The operator node represents the original mathematical operation, as shown in Table 2. Figure 9 The operator operations shown in formula (7) can be queried from Table 2 for the corresponding expressions.

[0221] Table 2 Original mathematical operation

[0222]

[0223] The output node is used to aggregate the results without subsequent operator nodes.

[0224] and Figure 9 the first calculation graph is similar, each second calculation graph can also be expressed in the same way. For the constant s, the constant s adopts the same discretization manner as the constant node c, and the constant s can be one value in the constant set shown in formula (9).

[0225]

[0226] wherein Δ s and N s are preset values, Δ s is a real number, and N s is a positive integer

[0227] In the embodiments of the present application, the search space of the loss function is constructed using the calculation graph corresponding to the number of functions and the constants included in the loss function and the constants, which is more detailed and more helpful to search for a target loss function with good performance than constructing the search space according to the calculation graph corresponding to the entire loss function.

[0228] The following will be described in combination with Figure 10 and Figure 11 The overall process of searching for a target loss function will be described in detail, Figure 10 is a flowchart of a process for obtaining a candidate loss function provided by the embodiments of the present application. Figure 11 is a flowchart of a GMS loss function searching method provided by the embodiments of the present application.

[0229] S1001, determine a current population loss function set, wherein the current population loss function set includes M current population loss functions and an evaluation score corresponding to each current population loss function, and M is a positive integer.

[0230] If the current population loss function set is an initial population loss function set, then the initial population loss function set is determined according to the search space, and each initial population loss function is obtained according to prior experience.

[0231] It should be understood that the evaluation score of each current population loss function is obtained after each current population loss function is evaluated by a proxy task.

[0232] Exemplarily, as Figure 11 shown, the current potential GMS loss function set is obtained according to the search space, and each potential GMS loss function is represented by a first calculation graph, a second calculation graph and a constant s. Each potential GMS loss function corresponds to an evaluation score.

[0233] S1002, initial screening is performed on the current population loss function set to obtain K first loss functions, wherein K is a positive integer.

[0234] Exemplarily, the specific way of initial screening can be a tournament selection algorithm or a roulette selection algorithm, and the embodiments of the present application do not limit the specific way of initial screening. Taking the tournament selection algorithm as an example, a proportion (for example, T=5%) of loss functions in the current population loss function set is randomly sampled, and the best performance is selected from the randomly sampled loss functions as the first loss function a, and the above process is repeated K times to obtain K first loss functions.

[0235] Taking the GMS loss function as an example, as Figure 11As shown in FIG. 1, T proportion of GMS loss functions in the current potential GMS loss function set are randomly sampled, and K first loss functions are randomly selected from the randomly sampled loss functions, where K is a positive integer greater than or equal to 2, for example, 2 first loss functions are selected as shown in FIG. 1. It should be understood that, for the GMS loss function, the embodiments of the present application are represented by two calculation graphs and one constant, and therefore selecting more than or equal to 2 first loss functions from the randomly sampled loss functions is beneficial to improving the randomness of loss function selection. Figure 11 As shown in FIG. 1, T proportion of GMS loss functions in the current potential GMS loss function set are randomly sampled, and K first loss functions are randomly selected from the randomly sampled loss functions, where K is a positive integer greater than or equal to 2, for example, 2 first loss functions are selected as shown in FIG. 1. It should be understood that, for the GMS loss function, the embodiments of the present application are represented by two calculation graphs and one constant, and therefore selecting more than or equal to 2 first loss functions from the randomly sampled loss functions is beneficial to improving the randomness of loss function selection.

[0236] S1003, obtaining a second loss function according to the K first loss functions.

[0237] As a possible implementation manner, if K is equal to 1, the first loss function is directly mutated or copied or randomly initialized again to obtain the second loss function.

[0238] It should be understood that there is a probability A of randomly initializing the first loss function again, which can be understood as randomly selecting a population loss function from the current population loss function set as the second loss function; there is a probability B of copying the first loss function, that is, the second loss function remains unchanged in form; and there is a probability C of mutating the first loss function, that is, mutating the calculation graph representing the first loss function. The specific values of A, B and C are not limited in the present application, for example, A = 40%, B = 10% and C = 50%.

[0239] In the following, the specific implementation manner of mutating the first loss function will be specifically described, Figure 12 Figure 12 is a schematic diagram of a mutation manner of a calculation graph provided by the embodiments of the present application.

[0240] The mutation manner of the calculation graph representing the first loss function mainly includes inserting a new operator node in the calculation graph, deleting an original operator node in the calculation graph or replacing the original operator node in the calculation graph. As shown in FIG. 1, Figure 12 Figure 12 (a) of FIG. 1 is a calculation graph to be mutated, Figure 12 (b) of FIG. 1 is a new Div operator node added, Figure 12 (c) of FIG. 1 is an original Sig operator node, Figure 12 (d) of FIG. 1 is that the original Exp operator node is replaced by a Gd operator node.

[0241] As a possible implementation manner, if K is a positive integer greater than or equal to 2, the K first loss functions are cross-screened to obtain the second loss function.

[0242] ​​The cross-screening can be understood as cross-screening the K first loss functions with a probability of D to select an intermediate loss function from the K first loss functions for generating the second loss function. Embodiments of the present application do not limit the value of D. For example, D can be 60%, 80%, etc.

[0243] For example, taking the GMS loss function as the loss function, the two first loss functions are cross-screened with a probability of 60%. That is, with a probability of 60%, the first loss function a is replaced by the first loss function b, and the replaced first loss function a is taken as the intermediate loss function. The intermediate loss function is reinitialized, copied, or mutated to obtain the second loss function. The specific implementation is similar to the above manner of obtaining the second loss function from the first loss function. To avoid repetition, details are not repeated here.

[0244] In S1004, if the second loss function passes the loss function rejection criterion, the equivalence of the second loss function is verified.

[0245] The loss function rejection criterion can be understood as a judgment criterion for whether the basic properties of the loss function meet the requirements. Taking the GMS loss function as the loss function for specific description.

[0246] The rejection criterion of the GMS loss function includes the basic property criterion and the target task index. The basic property criterion means whether the function t(x) corresponding to the computational graph of the second loss function generated in S1003 satisfies formula (10) on the interval x∈[-1, 1]:

[0247]

[0248] The target task index is an output index obtained by training the task data through the second loss function to reach a preset value. The type of the target task index is related to the output metric of the task. For example, the target task index is the mean average precision (mAP) index. The preset value of the mAP index can be τ toy =0.9. Embodiments of the present application do not limit the type of the target task index and the preset value thereof.

[0249] In embodiments of the present application, the loss function rejection criterion including the basic property criterion and the target task index can quickly screen the second loss function, and early exclude the second loss function that does not meet the requirements. Compared with the traditional loss function rejection criterion based only on the basic property criterion or the loss function rejection criterion based only on the target task index, the loss function rejection criterion of the present application considers more comprehensive factors, and can more comprehensively exclude the second loss function that does not meet the requirements, thereby improving the search efficiency of the overall loss function.

[0250] As a possible implementation manner, if the second loss function does not pass the loss function rejection criterion, the process of mutating, copying or re-random initializing the first loss function or the intermediate loss function is performed again to obtain a new second loss function until the updated second loss function passes the loss function rejection criterion, as shown in the following formula (10). Figure 11

[0251] S1005, if the second loss function is not equivalent to the mth population loss function in the current population loss function set, the second loss function is determined as a candidate loss function.

[0252] As a possible implementation manner, the first feature vector is obtained according to the first calculation graph of the second loss function , the corresponding first function t(x), the second calculation graph , the corresponding second function n(x) and the constant s, wherein the first feature vector satisfies the formula (11) to formula (13).

[0253]

[0254] Wherein, TN min represents the minimum function value of t(x) and n(x) in the interval [-1, 1]; TN max represents the maximum function value of t(x) and n(x) in the interval [-1, 1]; k represents a normalization scale factor; b represents a normalization translation factor; due to the translation scale transformation, Θ0={t(x), n(x), s) and Θ k,a ={t(x) / k+b, n(x) / k+b, ks} are equivalent, wherein Θ0is a feature vector represented according to the first function t(x) and the second function n(x) and the constant s, therefore the equivalence caused by the translation scale transformation is eliminated by formula (11), and the first feature vector is represented by using , and can be specifically represented as shown in formula (12).

[0255]

[0256] Wherein, and are uniformly discrete interpolation on x∈[-1, 1]. Γ is a preset threshold of search space constraint, and t(x), n(x), s of the second loss function satisfy the constraint shown in formula (13).

[0257] log2((TN max -TN min )·s / 2)≤Γ (13)

[0258] ​It should be understood that by referring to the constraints of the search space, it can be guaranteed that the features in the feature vector can be normalized to [-1, 1], which can make the performance prediction model have better results.

[0259] As a possible implementation manner, according to a population loss function in the current population loss function set, a second feature vector set is obtained, and the second feature vector set includes a second feature vector corresponding to each population loss function set; if the first feature vector and the second feature vector corresponding to each population loss function are not equivalent, the second loss function is determined as a candidate loss function.

[0260] As a possible implementation manner, if the second loss function is equivalent to the mth population loss function in the current population loss function set, the evaluation score corresponding to the mth population loss function is assigned to the second loss function, and the population loss function set is updated.

[0261] As a possible implementation manner, the manner of updating the population loss function set can be that the second loss function is added to the population loss function set as a potential loss function and the evaluation score corresponding to the second loss function, and one population loss function is eliminated, wherein the eliminated population loss function can be the earliest population loss function, for example, the population loss function ranked first in the population loss function set, and the application embodiments do not limit the manner of eliminating the population loss function.

[0262] It should be understood that taking the first population loss function in the population loss function set as the elimination target can avoid eliminating the population loss function with the lowest evaluation score, and can avoid the problem of insufficient data diversity, and thus can help to ensure the performance of the search result, that is, the performance of the target loss function.

[0263] Exemplarily, as shown in Figure 11 if the second loss function is equivalent to the mth population GMS loss function in the current population GMS loss function set, the evaluation score corresponding to the mth population GMS loss function in the current population GMS loss function set is assigned to the second loss function, the second loss function and the evaluation score corresponding to the second loss function are directly added to the current population GMS loss function set, and one population loss function is eliminated to obtain an updated population GMS loss function set.

[0264] In the embodiments of the application, the equivalence verification based on the feature vector effectively selects equivalent loss functions, avoids repeated proxy task evaluation on the loss functions in the current population loss function set, and thus effectively improves the search efficiency of the loss function.

[0265] Subsequently, the second loss function can be evaluated according to Figure 7The search mode shown selects a potential loss function from the candidate loss functions through a potential loss function selection module to perform agent task evaluation, thereby updating the current population loss function set. The working principle of the potential loss function selection module is similar to that of the potential data selection module, except that the potential data is a potential loss function. To avoid repetition, details are not described here. The way to update the current population loss function set is also described in detail above. To avoid repetition, details are not described here.

[0266] Finally, a potential loss function with the best evaluation score is selected from the updated population loss function set as the target loss function.

[0267] Through Figures 5 to 12 The automatic search method of the present application is described in detail. When the content of the automatic search is a loss function, the model training module 312 trains the target loss function obtained by searching in the automatic search module 311 in the above manner, the neural network model to be trained obtained from the user and the original training data, to obtain a target neural network model. It should be understood that according to different training tasks of the neural network model to be trained and the original training data, the corresponding target neural network model is obtained, thereby being applied to the corresponding specific task. The training task can be face recognition, pedestrian re-identification, metric learning, etc., and the embodiments of the present application do not limit this.

[0268] The following will be combined Figure 13 and Figure 14 and Tables 3 to 5 to describe in detail the effect of automatically searching for a GMS loss function in the above manner.

[0269] First, combined with Figure 13 The effect of the performance prediction model including the differentiable ranking loss function in the potential loss function selection module is described in detail. Figure 13 is a comparison diagram provided by the embodiments of the present application to compare the effect of whether the loss function in the performance prediction model includes a differentiable ranking loss function during the training process of the performance prediction model.

[0270] As Figure 13 shown, the abscissa is the training data amount of the performance prediction model, and the ordinate is the prediction effect index (Ktau) of the performance prediction model. The higher the prediction effect index, the higher the prediction accuracy of the performance prediction model. From Figure 13As can be seen from FIG. 6, the prediction accuracy of the performance prediction model whose loss function is the MSE loss function is lower than that of the performance prediction model whose loss function is the differentiable ranking loss function. Therefore, the performance prediction model trained by the differentiable ranking loss function and the MSE loss function has better prediction accuracy, which helps the potential loss function selector to select a better potential loss function.

[0271] Secondly, the effect of the potential loss function selection module (PLC) in the loss function search process is described in detail in combination with Figure 14 and Table 3. Figure 14 is a schematic diagram for comparing the effects of whether to add a potential loss function selection module in the automatic loss function search provided by the embodiments of the present application.

[0272] As shown in FIG. 7, the horizontal coordinate is the number of loss functions searched in the loss function search, and the vertical coordinate is the output metric related to the task, for example, the mAP shown in FIG. 8. The higher the value of the mAP is, the better the performance of the searched loss function is. Therefore, from Figure 14 it can be seen that the mAP of the loss function obtained by the loss function search method including the PLC (AutoLoss-MS) is mostly higher than the mAP of the loss function obtained by the loss function search method not including the PLC (AutoLoss-MS w / o PLC). Therefore, the potential loss function based on the loss function search method including the PLC has better overall performance. Figure 14 Figure 14 Table 3 Effect of potential loss function selector

[0273]

[0274]

[0275] In addition, as can be seen from Table 3, the number of loss functions explored based on the loss function search method including the PLC is significantly higher than the number of loss functions explored based on the loss function search method not including the PLC. This is because, through the performance prediction model in the potential loss function selection module, candidate loss functions with poor prediction results can be eliminated in advance, and candidate loss functions with good prediction results are evaluated by proxy tasks, for example, one of two candidate loss functions is selected as a potential loss function, or one of five candidate loss functions is selected as a potential loss function, or one of more candidate loss functions is selected as a potential loss function, and the selected potential loss function is evaluated by proxy tasks. The existing loss function search method not including the PLC needs to evaluate each candidate loss function by proxy tasks. Under the same number of iterations, the number of loss functions explored based on the loss function search method including the PLC is higher. ​​

[0276] The performance effects of the target loss function obtained by the loss function search method in the embodiments of the present application under different models will be described below in combination with Table 4 and Table 5.

[0277] Table 4 is a loss function searched by different models (for example, a residual network (ResNet50), an omni-scale network (OSNet) and a multiple granularity network (MGN)) using the same data set (for example, a Market1501 data set).

[0278] Table 4 is a loss function searched by three models on the Market-1501 data set

[0279]

[0280] The experimental results obtained by training the loss function in Table 4 under different data sets are compared with the experimental results obtained by training the advanced algorithm in the traditional fixed loss function search method, and the comparison results are shown in Table 5.

[0281] Table 5 is a comparison of the present application and other methods on four data sets

[0282]

[0283] From Table 5, it can be seen that the target loss function obtained by the embodiments of the present application can be transplanted to other data sets for training, and the training effect is better than that of the loss function obtained by the traditional advanced algorithm.

[0284] The performance prediction model training device 3000 of the automatic search of the embodiments of the present application will be described below. Figures 15 to 18 The device of the embodiments of the present application will be described. It should be understood that the device described below can perform the method of the foregoing embodiments of the present application, and in order to avoid unnecessary repetition, the repeated description will be appropriately omitted when introducing the device of the embodiments of the present application below.

[0285] Figure 15 is a schematic block diagram of the performance prediction model training device 3000 of the automatic search of the embodiments of the present application. Figure 15 The training device 3000 of the neural network model shown includes an acquisition unit 3010 and a processing unit 3020.

[0286] The acquisition unit 3010 is configured to acquire a first training data set, and the first training data includes sample data and an evaluation score corresponding to the sample data.

[0287] The processing unit 3020 is configured to train the performance prediction model according to the first training data set to obtain a target performance prediction model, wherein a loss function of the performance prediction model comprises a differentiable ranking loss function L K and a regression loss function.

[0288] It should be understood that the above is only an example description, and the automatic search device is used to perform the methods or steps mentioned in the foregoing method embodiments, and thus the processing computing task device corresponds to the foregoing method embodiments. Details can be referred to the description of the foregoing method embodiments, which will not be described here.

[0289] Figure 16 FIG. 4 is a schematic block diagram of an automatic search device 4000 provided in an embodiment of the present application. Figure 16 The automatic search device 4000 shown includes an acquisition unit 4010 and a processing unit 4020.

[0290] The acquisition unit 3010 is configured to acquire at least two candidate data, the at least two candidate data being data to be evaluated for a proxy task.

[0291] The processing unit 3020 is configured to input the at least two candidate data into a target performance prediction model to obtain predicted indexes corresponding to the at least two candidate data, wherein the target performance prediction model is obtained by training a performance prediction model based on a first training data set, a loss function of the performance prediction model comprises a differentiable ranking loss function L K and a regression loss function, the first training data set comprises sample data and an evaluation score corresponding to the sample data; and the processing unit 3020 is configured to evaluate part of the at least two candidate data for a proxy task according to the predicted indexes corresponding to the at least two candidate data.

[0292] It should be understood that the above is only an example description, and the automatic search device is used to perform the methods or steps mentioned in the foregoing method embodiments, and thus the processing computing task device corresponds to the foregoing method embodiments. Details can be referred to the description of the foregoing method embodiments, which will not be described here.

[0293] It should be understood that the above is only an example description, and the automatic search device is used to perform the methods or steps mentioned in the foregoing method embodiments, and thus the processing computing task device corresponds to the foregoing method embodiments. Details can be referred to the description of the foregoing method embodiments, which will not be described here.

[0294] For example, the "unit" can be a software program, a hardware circuit, or a combination of both, which implements the above functions. The hardware circuit can include an application specific integrated circuit (ASIC), an electronic circuit, a processor (such as a shared processor, a dedicated processor, or a group processor, etc.) and a memory for executing one or more software or firmware programs, a combination logic circuit, and / or other suitable components that support the described functions.

[0295] Therefore, the units of each example described in the embodiments of the present application can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether the functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. A person skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of the present application.

[0296] Figure 17 FIG. 1 is a schematic diagram of a hardware structure of an automatic search performance prediction model training device provided by an embodiment of the present application. Figure 17 The automatic search performance prediction model training device 5000 shown (which can be a computer device in particular) includes a memory 5001, a processor 5002, a communication interface 5003, and a bus 5004. The memory 5001, the processor 5002, and the communication interface 5003 are communicatively connected to each other through the bus 5004.

[0297] The memory 5001 can be a read only memory (ROM), a static storage device, a dynamic storage device, or a random access memory (RAM). The memory 5001 can store a program, and when the program stored in the memory 5001 is executed by the processor 5002, the processor 5002 is configured to perform each step of the performance prediction model training method of the embodiments of the present application.

[0298] The processor 5002 can be a general purpose central processing unit (CPU), a microprocessor, an application specific integrated circuit (ASIC), a graphics processing unit (GPU), or one or more integrated circuits, configured to execute related programs to implement the performance prediction model training method of the embodiments of the present application.

[0299] The processor 5002 can also be an integrated circuit chip having a processing capability for signals. In implementation, each step of the training method of the performance prediction model of the present application can be completed by integrated logic circuits of hardware or instructions in the form of software in the processor 5002.

[0300] The processor 5002 described above can also be a general-purpose processor, a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field programmable gate array (FPGA) or other programmable logic device, a discrete gate or transistor logic device, a discrete hardware component. The disclosed methods, steps and logic block diagrams in the embodiments of the present application can be implemented or executed. The general-purpose processor can be a microprocessor or the processor can also be any conventional processor. The steps of the method disclosed in combination with the embodiments of the present application can be directly embodied as a hardware coding processor for execution, or a combination of hardware and software modules in the coding processor for execution. The software module can be located in a random access memory, a flash memory, a read-only memory, a programmable read-only memory or an electrically erasable programmable memory, a register, or other mature storage medium in the art. The storage medium is located in the storage 5001, and the processor 5002 reads information in the storage 5001, and combines it with the hardware to complete the functions required by the units included in the training device shown in the embodiments of the present application. Figure 15 The steps of the method disclosed in combination with the embodiments of the present application can be directly embodied as a hardware coding processor for execution, or a combination of hardware and software modules in the coding processor for execution. The software module can be located in a random access memory, a flash memory, a read-only memory, a programmable read-only memory or an electrically erasable programmable memory, a register, or other mature storage medium in the art. The storage medium is located in the storage 5001, and the processor 5002 reads information in the storage 5001, and combines it with the hardware to complete the functions required by the units included in the training device shown in the embodiments of the present application. Figure 5 The training method of the performance prediction model shown in the embodiments of the present application.

[0301] The communication interface 5003 uses a transceiver such as but not limited to a transceiver to realize the communication between the device 5000 and other devices or communication networks. For example, the training data can be obtained through the communication interface 5003.

[0302] The bus 5004 can include a path for transmitting information between each component (for example, the storage 5001, the processor 5002, the communication interface 5003) of the device 5000.

[0303] Figure 18 The hardware structure diagram of the automatic search device of the embodiments of the present application is shown in the figure. Figure 18 The automatic search device 6000 shown in the figure includes a storage 6001, a processor 6002, a communication interface 6003 and a bus 6004. Among them, the storage 6001, the processor 6002, the communication interface 6003 are communicated with each other through the bus 6004.

[0304] The memory 6001 can be a ROM, a static storage device, and a RAM. The memory 6001 can store programs, and when the programs stored in the memory 6001 are executed by the processor 6002, the processor 6002 and the communication interface 6003 are configured to perform the steps of the automatic search method of the embodiments of the present application. Specifically, the processor 6002 can perform the method shown in the above. Figure 7

[0305] The processor 6002 can be a general-purpose CPU, a microprocessor, an ASIC, a GPU, or one or more integrated circuits, configured to execute related programs to implement the functions required by the units in the automatic search device of the embodiments of the present application, or to execute the automatic search method of the method embodiments of the present application.

[0306] The processor 6002 can also be an integrated circuit chip with signal processing capability. In the implementation process, the steps of the automatic search method of the embodiments of the present application can be completed by the integrated logic circuit of hardware in the processor 6002 or the instructions in the form of software.

[0307] The processor 6002 described above can also be a general-purpose processor, a DSP, an ASIC, an FPGA, or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components. The disclosed methods, steps and logic block diagrams in the embodiments of the present application can be implemented or executed. The general-purpose processor can be a microprocessor or the processor can also be any conventional processor. The steps of the method disclosed in combination with the embodiments of the present application can be directly embodied as a hardware coding processor for execution, or a combination of hardware and software modules in the coding processor. The software modules can be located in the random access memory, the flash memory, the read-only memory, the programmable read-only memory, the electrically erasable programmable memory, the register, or other mature storage media in the art. The storage medium is located in the memory 6001, and the processor 6002 reads the information in the memory 6001, and combines the hardware to complete the functions required by the units included in the automatic search device of the embodiments of the present application, or to execute the automatic search method of the method embodiments of the present application.

[0308] The communication interface 6003 uses a transceiver such as but not limited to a transceiver to realize the communication between the device 6000 and other devices or communication networks. For example, the data to be processed can be obtained through the communication interface 6003.

[0309] The bus 6004 can include a path for transmitting information between the components (for example, the memory 6001, the processor 6002, the communication interface 6003) of the device 6000.

[0310] ​It should be noted that although the apparatus 5000 and the apparatus 6000 are only shown as including the memory, the processor, and the communication interface, in actual implementation, those skilled in the art should understand that the apparatus 5000 and the apparatus 6000 can also include other devices necessary for normal operation. Meanwhile, according to specific requirements, those skilled in the art should understand that the apparatus 5000 and the apparatus 6000 can also include hardware devices for implementing other additional functions. In addition, those skilled in the art should understand that the apparatus 5000 and the apparatus 6000 can also only include devices necessary for implementing the embodiments of the present application, and do not have to include all the devices shown in FIGS. 5 and 6. Figure 17 and Figure 18

[0311] It should be understood that the processor in the embodiments of the present application can be a central processing unit (CPU), and can also be other general-purpose processors, digital signal processors (DSP), application specific integrated circuits (ASIC), field programmable gate arrays (FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components, etc. The general-purpose processor can be a microprocessor, or the processor can also be any conventional processor.

[0312] ​It should also be understood that the memory in the embodiments of the present application can be a volatile memory or a nonvolatile memory, or can include both volatile and nonvolatile memory. Among them, the nonvolatile memory can be a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically EPROM (EEPROM), or a flash memory. The volatile memory can be a random access memory (RAM) used as an external cache. By way of example, and not limitation, many forms of random access memory (RAM) are available, such as static random access memory (SRAM), dynamic random access memory (DRAM), synchronous dynamic random access memory (SDRAM), double data rate SDRAM (DDR SDRAM), enhanced SDRAM (ESDRAM), synchlink DRAM (SLDRAM), and direct rambus RAM (DR RAM).

[0313] The above-described embodiments can be implemented in whole or in part by software, hardware, firmware, or any combination thereof. When implemented by software, the above-described embodiments can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions or computer programs. When the computer instructions or computer programs are loaded or executed on a computer, the processes or functions described in the embodiments of the present application are wholly or partially generated. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable devices. The computer instructions can be stored in a computer-readable storage medium or transferred from one computer-readable storage medium to another, for example, the computer instructions can be transferred from one website, computer, server or data center to another via wired (for example, infrared, wireless, microwave, etc.) or wireless means. The computer-readable storage medium can be any available medium accessible by a computer or a data storage device such as a server, data center, etc. containing one or more available medium collections. The available medium can be a magnetic medium (for example, floppy disk, hard disk, magnetic tape), an optical medium (for example, DVD), or a semiconductor medium. The semiconductor medium can be a solid-state disk.

[0314] It should be understood that the term "and / or" herein merely describes an association relationship of associated objects, which means that there can be three relationships, for example, A and / or B can represent the following three cases: A exists alone, A and B exist together, and B exists alone, where A and B can be singular or plural. In addition, the character " / " herein generally represents an "or" relationship between the associated objects before and after it, but it can also represent an "and / or" relationship. The specific meaning can be understood according to the context before and after it.

[0315] In this application, "at least one" means one or more, and "multiple" means two or more. "At least one of the following" or similar expressions means any combination of these items, including any combination of single or multiple items. For example, at least one of a, b, or c can represent a, b, c, a-b, a-c, b-c, or a-b-c, where a, b, and c can be single or multiple.

[0316] It should be understood that in various embodiments of the present application, the size of the sequence number of the above-described processes does not mean the order of execution, and the execution order of the processes should be determined according to their functions and inherent logic, and should not constitute any limitation on the implementation process of the embodiments of the present application.

[0317] Those skilled in the art can clearly understand that the units and algorithm steps of each example described in combination with the embodiments disclosed herein can be realized by electronic hardware or a combination of computer software and electronic hardware. Whether the functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of the present application.

[0318] Those skilled in the art can clearly understand that, for the convenience and brevity of the description, the specific working processes of the above-described system, device and unit can refer to the corresponding processes in the foregoing method embodiments, which will not be repeated here.

[0319] In several embodiments provided in the present application, it should be understood that the disclosed system, device and method can be implemented in other ways. For example, the above-described device embodiments are only schematic, for example, the division of the units is only a logical function division, and actual implementation can have another division manner, for example, a plurality of units or components can be combined or integrated into another system, or some features can be ignored or not executed. In addition, the coupling or direct coupling or communication connection between the units shown or discussed can be indirect coupling or communication connection through some interface, device or unit, and can be electrical, mechanical or other forms.

[0320] The units described as separate components can or can not be physically separated, and the components shown as units can or can not be physical units, that is, they can be located in one place, or can be distributed on a plurality of network units. Part or all of the units can be selected according to actual needs to achieve the purpose of the embodiment.

[0321] In addition, each functional unit in each embodiment of the present application can be integrated into a processing unit, or each unit can exist physically independently, or two or more units can be integrated into one unit.

[0322] If the functions are implemented in the form of software function units and sold or used as independent products, they can be stored in a computer readable storage medium. Based on this understanding, the technical solutions of the present application or the parts of the technical solutions that essentially contribute to the prior art or the parts of the technical solutions can be embodied in the form of a software product. The computer software product is stored in a storage medium and includes a plurality of instructions for causing a computer device (which can be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present application. The aforementioned storage medium includes a U disk, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, and various media that can store program codes.

[0323] The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any person skilled in the art can easily think of changes or replacements within the technical scope disclosed in the present application, which should be covered within the protection scope of the present application. Therefore, the protection scope of the present application should be subject to the protection scope of the claims.

Claims

1. An automatic search method characterized by, The method comprises the following steps: obtaining at least two candidate data, which are data to be evaluated by a proxy task; The at least two candidate data points are input into the target performance prediction model to obtain prediction metrics corresponding to the at least two candidate data points. The target performance prediction model is trained on a first training dataset, and its loss function includes a differentiable ranking loss function. And a regression loss function, wherein the first training dataset includes sample data and evaluation scores corresponding to the sample data; performing proxy task evaluation on part of the at least two candidate data according to the prediction indicators corresponding to the at least two candidate data, wherein the proxy task evaluation comprises at least one of a face recognition task, a pedestrian re-identification task, a classification task, or metric learning; adding the part of the candidate data that has undergone proxy task evaluation to the first training data set to obtain an updated first training data set; obtaining at least two updated candidate data, which are different from the at least two candidate data; inputting the at least two updated candidate data into an updated target performance prediction model to obtain prediction indicators corresponding to the at least two updated candidate data, wherein the updated target performance prediction model is obtained according to the updated first training data set; performing proxy task evaluation on part of the at least two updated candidate data according to the prediction indicators corresponding to the at least two updated candidate data.

2. The method of claim 1, wherein, The proxy task evaluation on part of the at least two candidate data according to the prediction indicators corresponding to the at least two candidate data comprises: performing proxy task evaluation on the candidate data with the best prediction indicator in the at least two candidate data.

3. The method of claim 1, wherein, The regression loss function is a mean squared error loss function .

4. The method according to any one of claims 1 to 3, characterized in that, The at least two candidate data are at least two candidate loss functions, and the first training data set is a population loss function set.

5. The method of claim 4, wherein, When the type of the loss function in the candidate loss function is a generalized margin softmax loss function (GMS loss function), the obtaining of the at least two candidate loss functions comprises: obtaining a current population loss function set, the current population loss function set including M population loss functions, wherein the mth population loss function is represented by a first computational graph , a second computational graph and a constant s, where M is a positive integer, 1≤m≤M; performing initial screening on the current population loss function set to obtain K first initial loss functions after screening, K being a positive integer greater than or equal to 2; performing cross screening on the K first initial loss functions with a preset probability to obtain a second loss function; if the second loss function passes a loss function rejection criterion, performing equivalence verification on the second loss function; if the second loss function is not equivalent to an mth current population loss function in the current population loss function set, the second loss function is determined as the candidate loss function.

6. The method of claim 5, wherein, The equivalence verification on the second loss function if the second loss function passes the loss function rejection criterion comprises that the loss function rejection criterion comprises a loss function basic attribute criterion and a target task indicator, if the loss function basic attribute criterion and the target task indicator are satisfied, performing equivalence verification on the second loss function; wherein the second loss function satisfies the loss function basic property criterion is a first computational graph of the second loss function a corresponding first function and a second computational graph a corresponding second function satisfies the following formula: the second loss function satisfying the target task indicator is that an output indicator obtained by training task data by using the second loss function reaches a preset value.

7. The method of claim 5, wherein, The second loss function is determined as the candidate loss function if the second loss function is not equivalent to the mth current population loss function in the current population loss function set comprises: a first computational graph for the second loss function a corresponding first function a second computational graph a corresponding second function and a constant s, a first feature vector is obtained According to a population loss function in the current population loss function set, a second feature vector set is obtained, and the second feature vector set includes a second feature vector corresponding to each population loss function; If the first feature vector and the second feature vector corresponding to each population loss function are not equivalent, the second loss function is determined as the candidate loss function.

8. A method of training a performance prediction model for automatic search, characterized by, Comprising: Obtaining a first training data set, the first training data including sample data and evaluation scores corresponding to the sample data; training the performance prediction model according to the first training dataset to obtain a target performance prediction model, wherein a loss function of the performance prediction model comprises a differentiable ranking loss function and a regression loss function and a regression loss function Obtaining at least two candidate data in the first training data set, the at least two candidate data being data to be evaluated by the proxy task; Inputting the at least two candidate data into the target performance prediction model to obtain the predicted indicators corresponding to the at least two candidate data; According to the predicted indicators corresponding to the at least two candidate data, performing proxy task evaluation on part of the at least two candidate data, the proxy task evaluation including at least one of a face recognition task, a pedestrian re-identification task, a classification task, or metric learning; Adding the part of the candidate data set after the proxy task evaluation to the first training data set to obtain an updated first training data set; When the increment of the first training data set reaches a first threshold, training the target performance prediction model according to the updated first training data set to obtain an updated target performance prediction model.

9. The training method of claim 8, wherein, The regression loss function is a mean squared error loss function .

10. An automatic search apparatus characterized by comprising: The device includes an acquisition unit, a processing unit, and an update unit: The acquisition unit is configured to obtain at least two candidate data, the at least two candidate data being data to be evaluated by the proxy task; The processing unit is configured to: The at least two candidate data points are input into the target performance prediction model to obtain prediction metrics corresponding to the at least two candidate data points. The target performance prediction model is trained on a first training dataset, and its loss function includes a differentiable ranking loss function. And a regression loss function, wherein the first training dataset includes sample data and evaluation scores corresponding to the sample data; According to the predicted indicators corresponding to the at least two candidate data, performing proxy task evaluation on part of the at least two candidate data, the proxy task evaluation including at least one of a face recognition task, a pedestrian re-identification task, a classification task, or metric learning; The update unit is configured to add the part of the candidate data set after the proxy task evaluation to the first training data set to obtain an updated first training data set; The acquisition unit is further configured to obtain at least two updated candidate data, the at least two updated candidate data being different from the at least two candidate data; The processing unit is further configured to: Input the at least two updated candidate data into the updated target performance prediction model to obtain predicted indicators corresponding to the at least two updated candidate data, wherein the updated target performance prediction model is obtained according to the updated first training data set; According to the predicted indicators corresponding to the at least two updated candidate data, performing proxy task evaluation on part of the at least two updated candidate data.

11. The apparatus of claim 10, wherein, The processing unit is configured to: Performing proxy task evaluation on the candidate data with the best predicted indicator in the at least two candidate data.

12. The apparatus of claim 11, wherein, The regression loss function is a mean squared error loss function .

13. The apparatus of any one of claims 10-12, wherein, The at least two candidate data are at least two candidate loss functions, and the first training data set is a population loss function set.

14. The apparatus of claim 13, wherein, When a loss function type in the candidate loss function is a generalized margin softmax loss function (GMS loss function), The acquisition unit is configured to acquire a current population loss function set, the current population loss function set including M population loss functions, wherein the mth population loss function is represented by a first calculation graph , a second calculation graph , and a constant s, where M is a positive integer, 1≤m≤M. The processing unit is configured to: perform initial screening on the current population loss function set to obtain K first initial loss functions after screening, K being a positive integer greater than or equal to 2; perform cross screening on the K first initial loss functions with a preset probability to obtain a second loss function; if the second loss function passes the loss function rejection criterion, perform equivalence verification on the second loss function; if the second loss function is not equivalent to an mth current population loss function in the current population loss function set, the second loss function is determined as the candidate loss function.

15. The apparatus of claim 14, wherein, The equivalence verification on the second loss function if the second loss function passes the loss function rejection criterion includes that the loss function rejection criterion includes a loss function basic attribute criterion and a target task index, The processing unit is configured to perform equivalence verification on the second loss function if the loss function basic attribute criterion and the target task index are satisfied. wherein the second loss function satisfies the loss function basic property criterion is a first computational graph of the second loss function a corresponding first function and a second computational graph a corresponding second function satisfies the following formula: The second loss function satisfies the target task index, which is that an output index obtained by training task data through the second loss function reaches a preset value.

16. The apparatus of claim 14, wherein, The processing unit is configured to: a first computational graph for the second loss function a corresponding first function a second computational graph a corresponding second function and a constant s, a first feature vector is obtained; obtain a second feature vector set according to a population loss function in the current population loss function set, the second feature vector set including a second feature vector corresponding to each population loss function; if the first feature vector and the second feature vector corresponding to each population loss function are not equivalent, the second loss function is determined as the candidate loss function.

17. An apparatus for training a performance prediction model of an automated search, characterized by: The device includes an acquisition unit, a processing unit and an updating unit: The acquisition unit is configured to acquire a first training data set, the first training data including sample data and an evaluation score corresponding to the sample data; The processing unit is configured to train the performance prediction model according to the first training data set to obtain a target performance prediction model, wherein a loss function of the performance prediction model comprises a differentiable ranking loss function and a regression loss function. and a regression loss function. The updating unit is configured to: acquire at least two candidate data in the first training data set, the at least two candidate data being data to be evaluated for a proxy task; input the at least two candidate data into the target performance prediction model to obtain a prediction index corresponding to the at least two candidate data; perform proxy task evaluation on part of the at least two candidate data according to the prediction index corresponding to the at least two candidate data, the proxy task evaluation including at least one of a face recognition task, a pedestrian re-identification task, a classification task or metric learning; add the part of the candidate data after the proxy task evaluation to the first training data set to obtain an updated first training data set; The processing unit is further configured to, when an increment of the first training data set reaches a first threshold, train the target performance prediction model according to the updated first training data set to obtain an updated target performance prediction model.

18. The exercise device of claim 17, wherein, The regression loss function is a mean squared error loss function .

19. A computer-readable storage medium, characterized in that, The computer readable storage medium stores program code, which includes code for performing the method of any one of claims 1 to 7, or for performing the method of claim 8 or 9.

20. A chip, characterized by The chip comprises a processor and a data interface, the processor reading instructions stored on a memory via the data interface to perform the method of any one of claims 1 to 7 or claim 8 or 9.

Citation Information

Patent Citations

  • Method for training neural network predictor and image processing method and device

    CN111695673A