Course learning based shared parameter neural architecture search method, device and product

By calculating the uncertainty of data samples and setting weights, the supernetwork is optimized, solving the problem that potential architectures are difficult to train sufficiently in shared parameter neural architecture search, and improving the efficiency and accuracy of neural architecture search.

CN115358388BActive Publication Date: 2026-11-20TSINGHUA UNIVERSITY
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202211011321.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-08-23
Publication Date
2026-11-20
Estimated Expiration
2042-08-23

AI Technical Summary

Technical Problem

Existing shared-parameter neural architecture search methods ignore the influence of training data distribution, making it difficult for promising architectures to stand out during the validation phase, while architectures with mediocre performance have an advantage.

Method used

By using a course-based learning approach, the uncertainty of data samples is calculated and data weights are set. The supernetwork is optimized to determine the optimal architecture, and the weights of data samples are dynamically adjusted during the training process, focusing on learning architectures with potential.

Benefits of technology

It increases the probability of finding architectures with potential but currently poor performance, achieves two-layer optimization of models and data, and improves the efficiency and accuracy of neural architecture search.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115358388B_ABST
    Figure CN115358388B_ABST
Patent Text Reader

Abstract

The embodiment of the application relates to the field of deep learning, and provides a shared parameter neural architecture search method, device and product based on curriculum learning, comprising the following steps: searching multiple sampling sub-networks to calculate the uncertainty of each data sample in the training process of a super network, setting data weights of the data samples based on the uncertainty, and then optimizing the super network and determining an optimal architecture. The embodiment of the application improves the data weights of data samples that need to be focused on learning by dynamically adjusting the data weights of the data samples, so that the architecture of a sub-network with potential but temporarily poor effect can be focused on learning on the data samples with high data weights, and the sub-network is fully trained to improve the searched probability, so that the data plays a full role in the neural architecture search process. After the super network is optimized, the optimal architecture is searched, and double-layer optimization of a model and data in a search process is realized.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of deep learning, and more specifically, to a method, apparatus, and product for searching shared parameter neural architectures based on course learning. Background Technology

[0002] Neural architecture search is an important research direction in deep learning, used to automatically generate neural network model architectures. Among these, shared-parameter neural architecture search methods significantly improve search efficiency by sharing the trainable weight parameters of all architectures within the search space, thus avoiding retraining for each architecture parameter.

[0003] Current shared-parameter neural architecture search methods neglect the impact of training data distribution on architecture search, simply treating each data sample equally. However, because different architectures have varying fitting abilities to different data samples, some mediocre architectures may maintain an advantage due to their good performance in the early stages of training, while other promising architectures may not receive sufficient training and fail to stand out during the validation phase. Therefore, how to ensure that promising but currently underperforming architectures are adequately trained and have a higher probability of being found is a pressing problem that needs to be solved. Summary of the Invention

[0004] This application provides a method, apparatus, and product for searching shared parameter neural architectures based on course learning, aiming to solve the problem of enabling architectures with potential but currently poor performance to be fully trained and increasing the probability of being searched.

[0005] The first aspect of this application provides a shared parameter neural architecture search method based on course learning, including:

[0006] The hypernetwork is sampled according to the search strategy to obtain multiple sampled subnetworks, which are used to evaluate the uncertainty of the data samples;

[0007] Multiple sets of data samples are input into each sampling sub-network to obtain a set of data sample measurement values ​​output by each sampling sub-network for the multiple sets of data samples;

[0008] Based on the set of measurement values ​​of multiple data samples output by each sampling sub-network for the multiple sets of data samples, the uncertainty of each set of data samples is calculated, and data weights are set for the data samples based on the uncertainty, thereby optimizing the supernetwork and determining the optimal architecture.

[0009] Optionally, after calculating the uncertainty of each set of data samples, the method further includes:

[0010] The learnable parameters of the hypernetwork are updated based on the uncertainty to obtain updated learnable parameters, and the search strategy of the hypernetwork is updated based on the updated learnable parameters to obtain an updated search strategy.

[0011] The updated learnable parameters and the updated search strategy are applied to the hypernetwork, and the above steps of sampling, input, uncertainty calculation and updating are repeated until convergence is achieved to obtain the optimal learnable parameters.

[0012] The optimal architecture is searched from the hypernetworks with the optimal learnable parameters.

[0013] Optionally, the uncertainty of each set of data samples is calculated based on the set of data sample measurements output by each sampling sub-network for the plurality of data samples, including:

[0014] Take out the data sample measurement values ​​with the same label from the data sample measurement value set corresponding to each data sample group, and use them as the distribution set of each data sample group;

[0015] The distribution set is assumed to be a Gaussian distribution;

[0016] Calculate the product of the multiple Gaussian distributions corresponding to the multiple distribution sets and optimize it to obtain the optimized Gaussian distribution;

[0017] The standard deviation of the Gaussian distribution is calculated by performing calculations on the optimized Gaussian distribution.

[0018] The standard deviation of the Gaussian distribution corresponding to the distribution set of each set of data samples is used as the uncertainty of each set of data samples.

[0019] Optionally, the learnable parameters of the hypernetwork are updated based on the uncertainty to obtain the updated learnable parameters, including:

[0020] The uncertainty of each set of data samples is regularized, and the regularization result of the uncertainty of each set of data samples is used as the data weight of each set of data samples.

[0021] The data weights of each group of data samples are weighted and applied to the loss function of the hypernetwork to obtain a weighted loss function;

[0022] Based on the weighted loss function, learnable parameters that minimize the weighted loss function are calculated and used as updated learnable parameters.

[0023] Optionally, the product of the multiple Gaussian distributions corresponding to the multiple distribution sets is calculated and optimized to obtain an optimized Gaussian distribution, specifically:

[0024] By the assumption of independent and identically distributed distributions, k Gaussian distributions p(f k The product of (x)|y) is:

[0025]

[0026] Based on the maximum likelihood criterion, the following optimization is obtained:

[0027]

[0028] Wherein, p(f k (x)|y) represents the Gaussian distribution corresponding to the k-th distribution set; K is the number of Gaussian distributions corresponding to the distribution set, 1≤k≤K; sample x and label y constitute the set of data samples.

[0029] Optionally, the standard deviation of the Gaussian distribution is calculated by performing a calculation on the optimized Gaussian distribution, specifically:

[0030] For regression problems, the loss function is L(f(x),y)=(yf(x)). 2 The optimal formula for the regression problem is:

[0031]

[0032] Wherein, p(f k (x)|y) represents the Gaussian distribution corresponding to the k-th distribution set; K is the number of Gaussian distributions corresponding to the distribution set, 1≤k≤K; σ is the standard deviation of the Gaussian distribution; L is the loss function of the regression problem; sample x and label y constitute the set of data samples;

[0033] Minimize and differentiate the regression problem to obtain the standard deviation of the Gaussian distribution.

[0034] Optionally, the standard deviation of the Gaussian distribution is calculated by performing a calculation on the optimized Gaussian distribution, specifically:

[0035] For the loss function L(f(x),y)=-ylogSoftmaxf(x) for the classification problem, the optimization formula for the classification problem is as follows:

[0036]

[0037] The equality holds when σ→1;

[0038] Where Softmax is the normalized exponential function; p(f k(x)|y) represents the Gaussian distribution corresponding to the k-th distribution set; K is the number of Gaussian distributions corresponding to the distribution set, 1≤k≤K; σ is the standard deviation of the Gaussian distribution; L is the loss function of the classification problem; sample x and label y constitute the set of data samples;

[0039] Minimize and differentiate the optimization formula for the classification problem to obtain the standard deviation of the Gaussian distribution.

[0040] A second aspect of this application provides a shared parameter neural architecture search device based on course learning, comprising:

[0041] The sampling module is used to sample the hypernetwork according to the search strategy to obtain multiple sampling subnetworks, which are used to evaluate the uncertainty of the data samples.

[0042] The measurement module is used to input multiple sets of data samples into each sampling sub-network to obtain a set of data sample measurement values ​​output by each sampling sub-network for the multiple sets of data samples;

[0043] The uncertainty calculation module is used to calculate the uncertainty of each data sample based on the set of measurement values ​​of multiple data samples output by each sampling sub-network for the multiple data samples, set data weights for the data samples based on the uncertainty, and then optimize the supernetwork and determine the optimal architecture.

[0044] Optionally, after calculating the uncertainty of each set of data samples, the apparatus further includes:

[0045] An update module is configured to update the learnable parameters of the hypernetwork based on the uncertainty to obtain updated learnable parameters, and to update the search strategy of the hypernetwork based on the updated learnable parameters to obtain an updated search strategy.

[0046] An iterative module is used to apply the updated learnable parameters and the updated search strategy to the hypernetwork, and repeatedly execute the above steps of sampling, input, uncertainty calculation and updating until convergence, so as to obtain the optimal learnable parameters.

[0047] The search module is used to search for the optimal architecture from the hypernetworks with the optimal learnable parameters.

[0048] The uncertainty calculation module includes:

[0049] The data classification submodule is used to extract the data sample measurement values ​​with the same label from the data sample measurement value set corresponding to each group of data samples, and use them as the distribution set of each group of data samples;

[0050] A transformation submodule is used to assume that the distribution set is a Gaussian distribution;

[0051] The optimization submodule is used to calculate and optimize the product of the multiple Gaussian distributions corresponding to the multiple distribution sets to obtain the optimized Gaussian distribution.

[0052] The standard deviation calculation submodule is used to calculate the standard deviation of the Gaussian distribution after optimization.

[0053] The uncertainty confirmation submodule is used to take the standard deviation of the Gaussian distribution corresponding to the distribution set of each set of data samples as the uncertainty of each set of data samples.

[0054] The update module includes:

[0055] The regularization submodule is used to regularize the uncertainty of each group of data samples and use the regularization result of the uncertainty of each group of data samples as the data weight of each group of data samples.

[0056] The weighting submodule is used to weight the data weights of each group of data samples onto the loss function of the hypernetwork to obtain a weighted loss function;

[0057] The update submodule is used to calculate learnable parameters that minimize the weighted loss function based on the weighted loss function, and use these learnable parameters as updated learnable parameters.

[0058] The standard deviation calculation submodule includes:

[0059] The regression problem calculation subunit is used to calculate the standard deviation of the Gaussian distribution when the loss function of the regression problem is used;

[0060] The classification problem calculation subunit is used to calculate the standard deviation of the Gaussian distribution when the loss function for the classification problem is used.

[0061] A third aspect of this application provides an electronic device, including a memory, a processor, and a computer program stored in the memory, wherein the processor executes the computer program to implement the steps in any of the course-based shared parameter neural architecture search methods described in the first aspect.

[0062] A fourth aspect of this application provides a computer-readable storage medium having a computer program / instructions stored thereon, which, when executed by a processor, implements the steps in any of the course-based shared parameter neural architecture search methods described in the first aspect.

[0063] The fifth aspect of this application provides a computer program product, including a computer program / instructions that, when executed by a processor, implement the steps in the course-based shared parameter neural architecture search method described in any of the first aspects.

[0064] Beneficial effects:

[0065] This application provides a shared-parameter neural architecture search method, apparatus, and product based on course learning. During the training process of a supernetwork, multiple sampled subnetworks are searched to calculate the uncertainty of each data sample. Data weights are then assigned to the data samples based on the uncertainties, thereby optimizing the supernetwork and determining the optimal architecture. This application's embodiments dynamically adjust the data weights of data samples, increasing the weights of data samples that require focused learning. This allows subnetwork architectures with potential but currently poor performance to be focused on learning on these high-weight data samples, receiving sufficient training and increasing the probability of being searched. This fully leverages the role of data in the neural architecture search process. Furthermore, by optimizing the supernetwork before searching for the optimal architecture, a two-layer optimization of both the model and data is achieved during the search process. Attached Figure Description

[0066] To more clearly illustrate the technical solutions of the embodiments of this application, the drawings used in the description of the embodiments of this application will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0067] Figure 1 This is a flowchart of a shared parameter neural architecture search method based on course learning proposed in one embodiment of this application;

[0068] Figure 2 This is an example diagram of the iterative process of a shared parameter neural architecture based on course learning proposed in one embodiment of this application;

[0069] Figure 3 This is a schematic diagram of a shared parameter neural architecture search device based on course learning proposed in an embodiment of this application;

[0070] Figure 4 This is a schematic diagram of an electronic device according to an embodiment of this application. Detailed Implementation

[0071] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.

[0072] The existing search scheme is as follows:

[0073] Let A be the architecture search space, and a∈A be a candidate sub-network architecture. In the shared-parameter neural architecture search method, the supernetwork constructed from the architecture search space is a supernetwork A containing all architectures within the search space, and the corresponding a is a sub-network architecture of A. The trainable weights w(a) of each sub-network are derived from the trainable parameters W(A) of the supernetwork A. The optimal architecture a is obtained through the shared-parameter neural architecture search method in the prior art. * The following steps need to be followed:

[0074] a * =argmaxACC val (w * (a),a)

[0075] stw * (a) = argminL train (w,a)

[0076] Among them, L train It's training loss, ACC val It is the validation set accuracy, a * For the optimal architecture, w * These are the optimal learnable parameters.

[0077] As can be seen from the above, existing neural architecture search methods with shared parameters ignore the impact of training data distribution on architecture search, simply treating each data sample equally. However, since different architectures have different fitting abilities to different data samples, some architectures with mediocre performance will maintain an advantage due to their good performance in the early stages of training, while other promising architectures will not be able to get sufficient training and will struggle to stand out in the validation phase.

[0078] In view of this, embodiments of this application propose a shared parameter neural architecture search method based on course learning, which aims to solve the problem of enabling architectures with potential but currently poor performance to be fully trained and increasing the probability of being searched. Figure 1 A flowchart of a shared-parameter neural architecture search method based on curriculum learning is shown, such as... Figure 1 As shown, it includes the following steps:

[0079] S101. The supernetwork is sampled according to the search strategy to obtain multiple sampled subnetworks.

[0080] The hypernetwork is sampled according to the search strategy to obtain multiple sampled subnetworks, which are used to evaluate the uncertainty of the data samples.

[0081] In this embodiment, to ensure that architectures with potential but currently poor performance can be adequately trained, weights are assigned to data samples, and these weights are dynamically adjusted during training iterations. This increases the weights of samples that are worth focusing on during training iterations, allowing them to be used for targeted training of subnetworks with potential but currently poor performance, thereby improving their training effectiveness. The weights of these data samples are determined by calculating the uncertainty of the data samples.

[0082] S102. Input multiple sets of data samples into each sampling sub-network to obtain the set of data sample measurement values ​​output by each sampling sub-network for the multiple sets of data samples.

[0083] The data samples in the training dataset are sequentially input into each sampling sub-network for processing, resulting in the data sample measurement value output by each sampling sub-network for each group of data samples in the training dataset. All data sample measurement values ​​output by each sampling sub-network are clustered into a set of data sample measurement values ​​output by that sampling sub-network.

[0084] S103. Calculate the uncertainty of each data sample based on the set of measurement values ​​of multiple data samples output by each sampling sub-network for multiple data samples.

[0085] Based on the set of measurement values ​​of multiple data samples output by each sampling sub-network for the multiple sets of data samples, the uncertainty of each set of data samples is calculated, and data weights are set for the data samples based on the uncertainty, thereby optimizing the supernetwork and determining the optimal architecture.

[0086] By using data samples and the labels carried by the data sample measurements, the data sample measurements in the set of data sample measurements processed by all sampling sub-networks are clustered according to different label types to obtain distribution sets. The uncertainty of each distribution set is solved and used as the uncertainty corresponding to each group of data samples. Data weights are set for the data samples based on the uncertainty, thereby optimizing the supernetwork and determining the optimal architecture.

[0087] S104. Update the learnable parameters of the hypernetwork based on the uncertainty to obtain the updated learnable parameters, and update the search strategy of the hypernetwork based on the updated learnable parameters to obtain the updated search strategy.

[0088] The data weights are determined based on the uncertainty of each data sample, and the loss function is weighted according to the data weights to update the learnable parameters; and the search strategy is updated according to the updated learnable parameters.

[0089] S105. Apply the updated learnable parameters and the updated search strategy to the hypernetwork, and repeat the above steps of sampling, input, uncertainty calculation and updating until convergence, and obtain the optimal learnable parameters.

[0090] S106. Search for the optimal architecture from the supernetwork with the best learnable parameters.

[0091] When executing step S101, the data of the hypernetwork should first be set to initial values ​​to facilitate subsequent iterative optimization and updates. Specifically, the weights of the data samples v = {1} N The trainable parameters W of the hypernetwork, the hypernetwork architecture A, and the search strategy π of the architecture are initialized.

[0092] The first iteration is then performed. Since this embodiment of the application needs to determine the data sample weight by evaluating the uncertainty of the data sample, it is necessary to search out K subnetworks for evaluating the uncertainty of the data sample from multiple subnetworks coupled into a supernetwork in the search space, as sampling subnetworks.

[0093] Obtaining the sampled subnetworks requires a pre-defined search strategy π to search the subnetworks of the supernetwork architecture A, resulting in K sampled subnetworks f. k (w k ,a k ):

[0094] {a}~π k (A)

[0095] Specific search strategies can be based on various neural architecture search algorithms in existing technologies, such as: neural architecture search methods based on reinforcement learning (e.g., ENAS), which generate K sampled subnetworks through a controller to evaluate uncertainty; neural architecture search methods based on differentiable methods (e.g., DARTS), which select the K subnetworks with the highest product of network layer probabilities as sampled subnetworks to evaluate uncertainty; and neural architecture search methods based on evolutionary algorithms (e.g., SPOS), which select the K subnetworks with the highest accuracy on the validation set as sampled subnetworks to evaluate uncertainty. The specific search strategy implemented is not limited to the above three search algorithms; any neural architecture search algorithm in existing technologies can be adopted. The selection of this search strategy can be found in existing technologies, and this application does not impose specific restrictions.

[0096] Specifically, in executing S102, after obtaining the K sampled sub-networks used to evaluate the uncertainty, the training dataset is... Multiple sets of data samples (x) i ,y i ) Input to each sampled subnetwork (where x i For the sample, y i (For the label corresponding to the sample), each sampling sub-network processes each set of input data samples to obtain a set of data sample measurement values ​​output by each sampling sub-network for multiple sets of data samples.

[0097] For example, suppose the training dataset contains three training samples (x1, y1), (x2, y2), and (x3, y3); and four sampling subnetworks are used to evaluate uncertainty: sampling subnetwork a, sampling subnetwork b, sampling subnetwork c, and sampling subnetwork d. Then, all three training samples are sequentially input into the four sampling subnetworks. Taking the input of training samples into sampling subnetwork a as an example, (x1, y1), (x2, y2), and (x3, y3) are input into sampling subnetwork a, and after processing by sampling subnetwork a, the corresponding measured values ​​of the data samples (x1, y1), (x2, y2), and (x3, y3) are output. 1a (x2,y) 2a (x3,y) 3a These three sets of data sample measurements form sampling subnetwork a, which combines the output data sample measurements for each input data sample. Sampling subnetworks b, c, and d work similarly.

[0098] The data samples and their measurements each contain a label corresponding to the sample. This label indicates the attribute of the data sample group and is used to cluster the data sample measurements with the same attribute in the future.

[0099] Specifically, in executing S103, based on the set of data sample measurements output by each sampling sub-network for multiple sets of data samples obtained above, according to the label of the data sample measurements in each set of data sample measurements, all data sample measurements with the same type of label are extracted and used as the distribution set of that type of label. For example, in the set of data sample measurements, data sample measurements with label y1 corresponding to data sample (x1, y1) are searched, such as (x1, y ... 1a (x1,y) 1b (x1,y) 1c These data sample measurements are used to construct a distribution set for label y1.

[0100] Next, we will use a Bayesian probability model to assess the uncertainty of the distribution set of the data samples. The specific steps for assessing uncertainty are as follows:

[0101] Let the sampling subnetwork f k For an architecture a consisting of sampling subnetworks kand trainable parameters w k The sampling subnetwork f k (w k ,a k ), where 1 ≤ k ≤ K. For a set of data samples (x, y), where x is the sample and y is the label corresponding to the sample, then the set of data samples (x, y) is input into a sampling subnetwork f. k (w k ,a k The sampling sub-network outputs the measured value f corresponding to the data sample. k (x), whose corresponding label is y.

[0102] Subsequently, as described above, the data sample measurements with the same type of label are extracted from the data sample measurement sets output by different sampling sub-networks to form a distribution set corresponding to that type of label, thus obtaining different distribution sets corresponding to different labels.

[0103] Transform each set of distributions containing data sample measurements with the same type of labels into a corresponding Gaussian distribution:

[0104] p(f(x)|y)=N(μ,σ)

[0105] Where p(f(x)|y) is a distribution set of data sample measurements containing the same type of label y, and N(μ,σ) is a Gaussian distribution converted from the distribution set, with mean μ and standard deviation σ. The standard deviation σ of the Gaussian distribution corresponding to each distribution set is taken as the uncertainty of the data sample corresponding to that distribution set.

[0106] The specific method for calculating the standard deviation of a Gaussian distribution is as follows:

[0107] By the assumption of independent and identically distributed distributions, the Gaussian distribution p(f) corresponding to the k sets of the above distributions k The product of (x)|y) is:

[0108]

[0109] Subsequently, the above equation is optimized according to the maximum likelihood rule to obtain the optimized Gaussian distribution:

[0110]

[0111] Wherein, p(f k (x)|y) represents the Gaussian distribution corresponding to the k-th distribution set; K is the number of Gaussian distributions corresponding to the distribution set, 1≤k≤K; sample x and label y constitute the set of data samples.

[0112] Next, depending on the type of problem the hypernet is handling, two different calculation methods are used to determine the uncertainty.

[0113] When this hypernetwork is used to handle regression problems, according to the properties of the Gaussian distribution, the loss function for the regression problem is L(f(x),y)=(yf(x)). 2 The optimal formula for the regression problem is:

[0114]

[0115] Wherein, p(f k (x)|y) represents the Gaussian distribution corresponding to the k-th distribution set; K is the number of Gaussian distributions corresponding to the distribution set, 1≤k≤K; σ is the standard deviation of the Gaussian distribution; L is the loss function of the regression problem; sample x and label y constitute the set of data samples.

[0116] By minimizing and differentiating the optimization formula for this regression problem, we obtain the standard deviation of the Gaussian distribution, specifically:

[0117]

[0118]

[0119] The obtained Gaussian distribution standard deviation σ is the uncertainty of the evaluation of the K sampled subnetwork.

[0120] When this hypernetwork is used to process classification problems, based on the properties of the Gaussian distribution, a similar conclusion holds for the loss function L(f(x),y)=-ylogSoftmaxf(x) for classification problems, and the optimization formula for the classification problem is:

[0121]

[0122] Among them, [f k (x)] y Represents the y-th element in the input vector f(x), [f k (x)] y′ This represents all elements in the output vector except for the y-th element. For example, in a three-class classification problem with labels ranging from 0, 1, to 2, suppose there is a data sample x corresponding to class 1, meaning its label y = 1. If the output vector of this data after passing through the model is a three-element vector [0.0, 0.1, 0.2], then the first element in this vector, i.e., 0.1, represents all other elements in this vector except for the first element, such as the 0th or 2nd element.

[0123] Furthermore, in the final optimized classification problem formula, it is approximately equal to σ, and the equality can be taken here when σ→1.

[0124] Where Softmax is the normalized exponential function; p(f k (x)|y) represents the Gaussian distribution corresponding to the k-th distribution set; K is the number of Gaussian distributions corresponding to the distribution set, 1≤k≤K; σ is the standard deviation of the Gaussian distribution; L is the loss function of the classification problem; sample x and label y constitute the set of data samples;

[0125] Comparing the optimization formulas for the classification problem and the regression problem described above, we can see that the two formulas differ only by a multiplier of 2. Therefore, the approach for the classification problem optimization formula is also to find the minimum value and then take the derivative to obtain the standard deviation of the Gaussian distribution. The specific process can be found in the regression problem section above, and will not be repeated here.

[0126] Through the above execution process, in this iteration, the uncertainty corresponding to the data sample was obtained through the evaluation of K sampling sub-networks (i.e., the standard deviation converted into a Gaussian distribution).

[0127] In the specific execution of step S104, based on the uncertainty corresponding to each group of training samples, a weight value is assigned to each group of data samples as the data weight. Specifically, to ensure that the weight is not too large or too small during training, thus affecting the training process or even causing training failure, the evaluated uncertainty is first regularized, and the regularized uncertainty is used as the weight of that group of data samples.

[0128]

[0129] Where N is the total number of data samples, v is the data sample weight, σ is the uncertainty, and ||·||1 is the first-order regularization.

[0130] Subsequently, based on the weights of this data sample, the weights v of this data sample are weighted and applied to the loss function, thereby affecting the training process. Specifically, the loss function value obtained when the input structure of the data sample is a and the trainable parameters are w is as follows:

[0131]

[0132] Among them, L train For training loss, l i (w,a) is the loss function value obtained when the input structure of the i-th data sample is a and the trainable parameter is w; v is the data sample weight of the i-th data sample.

[0133] Subsequently, based on the training loss obtained from the data loss weights in this iteration, the trainable parameters of the sub-networks in this iteration are optimized. The trainable parameters w of each sub-network are derived from the trainable parameters W of the super-network A, thereby optimizing the trainable parameters of the super-network.

[0134] Figure 2 An example diagram illustrating the iterative process of a shared-parameter neural architecture based on curriculum learning is shown, such as... Figure 2 As shown in the first part, the three sets of data samples are sequentially input into three pre-acquired sampling sub-networks to obtain the sets of data sample measurements output by the three sampling sub-networks for the three sets of data samples (the sets of three data sample measurements from the same layer of each sampling sub-network). From the sets of data sample measurements output by the three sets of data samples, distribution sets of three label types are obtained according to the label type (the three dashed boxes in the data sample measurements). Then, the data sample measurements in the three distribution sets (the three data sample measurements in the first dashed box) are converted into three Gaussian distributions (corresponding to the first Gaussian distribution curve, the second Gaussian distribution curve, and the third Gaussian distribution curve from top to bottom), and the standard deviations of the corresponding distributions are calculated as uncertainties, which are the uncertainties corresponding to the input data samples (corresponding to the same layer). Finally, the corresponding uncertainties are converted into data weights, and these data weights are applied to the data samples to obtain data samples updated based on the data weights (i.e., reweighted data). These updated data samples are used in the next iteration process.

[0135] Furthermore, based on the trainable parameters w optimized during this iteration, the validation set in the search strategy is also optimized, thereby updating the search strategy. This makes the sampled subnetwork obtained by the search strategy applied to the next iteration more reasonable, thus improving the optimization effect of the next iteration.

[0136] The above description of the embodiment of this application has detailed the iterative process. Next, step S105 is executed, in which the learnable parameters updated in the previous iteration and the updated search strategy are applied to the supernetwork. Then, the above steps of sampling, input, uncertainty calculation and updating are repeated again for iteration until convergence. The learnable parameters obtained at this time are the optimal learnable parameters after dynamic adjustment of the data sample weights. The optimal learnable parameters can enable the subnetworks with potential but poor performance at present to be trained in a focused manner, thereby improving their training effect.

[0137] Still refer to Figure 2 , Figure 2 The lower half shows an example of obtaining the sampled subnetwork during subsequent iterations. For example... Figure 2As shown in the lower part, after obtaining the data samples based on the updated data weights (i.e., reweighted data) in the previous iteration, the data is input into the supernetwork at the beginning of the next iteration to obtain a supernetwork based on the reweighted data. The supernetwork is then searched based on the updated search strategy to obtain a sampled subnetwork. The obtained sampled subnetwork is then used in the current iteration optimization process. The specific iteration process is described above and will not be repeated here.

[0138] Finally, step S106 is executed, using an iterative search strategy that updates upon convergence to search for the hypernetwork with the optimal learnable parameters and determine the optimal architecture a. * :

[0139] a * =arg max ACC val (w * (a,v),a)

[0140] stw * (a,v)=arg min L train (w,a,v)

[0141] Among them, L train It's training loss, ACC val It is the validation set accuracy, a * For the optimal architecture, w * is the optimal learnable parameter, and v is the weight of the data sample.

[0142] For example, in image classification problems, given image information is input into an optimized neural architecture with shared parameters to predict the label corresponding to the image (e.g., the main subject in the image is a cat or a dog). The shared parameter neural architecture search method based on course learning provided in this application assigns different weights to each image during training, thereby searching for the neural network architecture that performs optimally in image classification problems. This optimal neural network architecture is then applied to process the image classification problem, resulting in higher efficiency and accuracy.

[0143] This application provides a shared-parameter neural architecture search method based on curriculum learning. During the training of the supernetwork, multiple sampled subnetworks are searched to calculate the uncertainty of each data sample. The sample weights of different data samples are then determined based on the uncertainty, optimizing the supernetwork and ultimately identifying the optimal architecture. This application dynamically adjusts the data weights of data samples, increasing the weights of data samples that require focused learning. This allows subnetworks with potential but currently poor performance to be trained on these high-weight data samples, increasing their probability of being found. This fully leverages the role of data in the neural architecture search process. Furthermore, by optimizing the supernetwork before searching for the optimal architecture, a two-layer optimization of both the model and data is achieved during the search process.

[0144] Based on the same inventive concept, embodiments of this application disclose a shared parameter neural architecture search device based on course learning. Figure 3 A schematic diagram of a shared-parameter neural architecture search device based on curriculum learning is shown, such as... Figure 3 As shown, it includes:

[0145] The sampling module is used to sample the hypernetwork according to the search strategy to obtain multiple sampling subnetworks, which are used to evaluate the uncertainty of the data samples.

[0146] The measurement module is used to input multiple sets of data samples into each sampling sub-network to obtain a set of data sample measurement values ​​output by each sampling sub-network for the multiple sets of data samples;

[0147] The uncertainty calculation module is used to calculate the uncertainty of each data sample based on the set of measurement values ​​of multiple data samples output by each sampling sub-network for the multiple data samples, set data weights for the data samples based on the uncertainty, and then optimize the supernetwork and determine the optimal architecture.

[0148] Optionally, after calculating the uncertainty of each set of data samples, the apparatus further includes:

[0149] An update module is configured to update the learnable parameters of the hypernetwork based on the uncertainty to obtain updated learnable parameters, and to update the search strategy of the hypernetwork based on the updated learnable parameters to obtain an updated search strategy.

[0150] An iterative module is used to apply the updated learnable parameters and the updated search strategy to the hypernetwork, and repeatedly execute the above steps of sampling, input, uncertainty calculation and updating until convergence, so as to obtain the optimal learnable parameters.

[0151] The search module is used to search for the optimal architecture from the hypernetworks with the optimal learnable parameters.

[0152] The uncertainty calculation module includes:

[0153] The data classification submodule is used to extract the data sample measurement values ​​with the same label from the data sample measurement value set corresponding to each group of data samples, and use them as the distribution set of each group of data samples;

[0154] A transformation submodule is used to assume that the distribution set is a Gaussian distribution;

[0155] The optimization submodule is used to calculate and optimize the product of the multiple Gaussian distributions corresponding to the multiple distribution sets to obtain the optimized Gaussian distribution.

[0156] The standard deviation calculation submodule is used to calculate the standard deviation of the Gaussian distribution after optimization.

[0157] The uncertainty confirmation submodule is used to take the standard deviation of the Gaussian distribution corresponding to the distribution set of each set of data samples as the uncertainty of each set of data samples.

[0158] The update module includes:

[0159] The regularization submodule is used to regularize the uncertainty of each group of data samples and use the regularization result of the uncertainty of each group of data samples as the data weight of each group of data samples.

[0160] The weighting submodule is used to weight the data weights of each group of data samples onto the loss function of the hypernetwork to obtain a weighted loss function;

[0161] The update submodule is used to calculate learnable parameters that minimize the weighted loss function based on the weighted loss function, and use these learnable parameters as updated learnable parameters.

[0162] The standard deviation calculation submodule includes:

[0163] The regression problem calculation subunit is used to calculate the standard deviation of the Gaussian distribution when the loss function of the regression problem is used;

[0164] The classification problem calculation subunit is used to calculate the standard deviation of the Gaussian distribution when the loss function for the classification problem is used.

[0165] Based on the same inventive concept, this application also provides an electronic device. Figure 4 A schematic diagram of the electronic device proposed in an embodiment of this application is shown, such as... Figure 4As shown, the electronic device 100 includes a memory 110 and a processor 120. The memory 110 and the processor 120 are connected via a bus. The memory 110 stores a computer program that can run on the processor 120 to implement the steps in the course-based shared parameter neural architecture search method disclosed in the embodiments of this application.

[0166] Based on the same inventive concept, this application also provides a computer-readable storage medium storing a computer program / instructions thereon, which, when executed by a processor, implements the steps in the course-based shared parameter neural architecture search method disclosed in the embodiments of this application.

[0167] Based on the same inventive concept, this application also provides a computer program product, including a computer program / instructions that, when executed by a processor, implement the steps in the course-based shared parameter neural architecture search method disclosed in the embodiments of this application.

[0168] The various embodiments in this specification are described in a progressive manner, with each embodiment focusing on the differences from other embodiments. The same or similar parts between the various embodiments can be referred to each other.

[0169] Embodiments of the present invention are described with reference to flowchart illustrations and / or block diagrams of methods, apparatuses, electronic devices, and computer program products according to embodiments of the invention. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing terminal device to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing terminal device, generate instructions for implementing the flowchart illustrations and / or block diagrams. Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.

[0170] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing terminal device to operate in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.

[0171] These computer program instructions can also be loaded onto a computer or other programmable data processing terminal equipment, causing a series of operational steps to be performed on the computer or other programmable terminal equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable terminal equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.

[0172] Although preferred embodiments of the present invention have been described, those skilled in the art, upon learning the basic inventive concept, can make other changes and modifications to these embodiments. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments as well as all changes and modifications falling within the scope of the embodiments of the present invention.

[0173] Finally, it should be noted that in this document, relational terms such as "first" and "second" are used only to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or terminal device that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or terminal device. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or terminal device that includes said element.

[0174] The foregoing has provided a detailed description of the shared parameter neural architecture search method, apparatus, and product based on course learning provided by this invention. Specific examples have been used to illustrate the principles and implementation methods of this invention. The descriptions of the above embodiments are only for the purpose of helping to understand the method and core ideas of this invention. At the same time, for those skilled in the art, there will be changes in the specific implementation methods and application scope based on the ideas of this invention. Therefore, the content of this specification should not be construed as a limitation of this invention.

Claims

1. A shared-parameter neural architecture search method based on curriculum learning, characterized in that, include: The hypernetwork is sampled according to the search strategy to obtain multiple sampled subnetworks, which are used to evaluate the uncertainty of the data samples; Multiple sets of data samples are input into each sampling sub-network to obtain a set of data sample measurement values ​​output by each sampling sub-network for the multiple sets of data samples; The uncertainty of each data sample is calculated based on the set of measurement values ​​of multiple data samples output by each sampling sub-network for the multiple data samples. Based on the uncertainty, data weights are set for the data samples, thereby optimizing the hypernetwork and determining the optimal architecture, which is the neural network architecture that performs best in the image classification problem. Given image information, input it into a neural network architecture that performs best in image classification problems to predict the label corresponding to the given image information; Specifically, the process of setting data weights for the data samples based on the uncertainty, thereby optimizing the hypernetwork and determining the optimal architecture, includes: For image classification problems, the neural architecture with shared parameters assigns different weights to each image during training to increase the weight of the data samples that need to be focused on learning. This allows the architecture of subnetworks that have potential but are not performing well at the moment to focus on learning on data samples with high data weights, so as to be fully trained and increase the probability of being searched. The search identified the best-performing neural network architecture for image classification. : in, It is training loss; It is the validation set accuracy; The optimal neural network architecture for image classification problems; a For the architecture search space A Sub-network architecture; The optimal learnable parameters; for image classification problems, the data sample weights v Different weights are assigned to each image during the training process for neural architectures that share parameters; The step of calculating the uncertainty of each data sample based on the set of measurement values ​​of multiple data samples output by each sampling sub-network for the multiple sets of data samples includes: Take out the data sample measurement values ​​with the same label from the data sample measurement value set corresponding to each data sample group, and use them as the distribution set of each data sample group; The distribution set of data sample measurements containing the same type of labels is assumed to be a Gaussian distribution; Calculate the product of the multiple Gaussian distributions corresponding to the multiple distribution sets and optimize it to obtain the optimized Gaussian distribution; The standard deviation of the Gaussian distribution is calculated by performing calculations on the optimized Gaussian distribution. The standard deviation of the Gaussian distribution corresponding to the distribution set of each set of data samples is used as the uncertainty of each set of data samples.

2. The shared parameter neural architecture search method based on course learning according to claim 1, characterized in that, After calculating the uncertainty of each set of data samples, the method further includes: The learnable parameters of the hypernetwork are updated based on the uncertainty to obtain updated learnable parameters, and the search strategy of the hypernetwork is updated based on the updated learnable parameters to obtain an updated search strategy. The updated learnable parameters and the updated search strategy are applied to the hypernetwork, and the above steps of sampling, input, uncertainty calculation and updating are repeated until convergence is achieved to obtain the optimal learnable parameters. The optimal architecture is searched from the hypernetworks with the optimal learnable parameters.

3. The shared parameter neural architecture search method based on course learning according to claim 2, characterized in that, The learnable parameters of the hypernetwork are updated based on the uncertainty to obtain the updated learnable parameters, including: The uncertainty of each set of data samples is regularized, and the regularization result of the uncertainty of each set of data samples is used as the data weight of each set of data samples. The data weights of each group of data samples are weighted and applied to the loss function of the hypernetwork to obtain a weighted loss function; Based on the weighted loss function, learnable parameters that minimize the weighted loss function are calculated and used as updated learnable parameters.

4. A shared-parameter neural architecture search device based on curriculum learning, characterized in that, include: The sampling module is used to sample the hypernetwork according to the search strategy to obtain multiple sampling subnetworks, which are used to evaluate the uncertainty of the data samples. The measurement module is used to input multiple sets of data samples into each sampling sub-network to obtain a set of data sample measurement values ​​output by each sampling sub-network for the multiple sets of data samples; An uncertainty calculation module is used to calculate the uncertainty of each data sample based on the set of measurement values ​​of multiple data samples output by each sampling sub-network for the multiple sets of data samples, set data weights for the data samples based on the uncertainty, and then optimize the supernetwork and determine the optimal architecture, which is the neural network architecture that performs best in the image classification problem; inputting given image information into the neural network architecture that performs best in the image classification problem, and predicting the label corresponding to the given image information; Among them, the uncertainty calculation module is also used for image classification problems. During the training process, the neural architecture with shared parameters assigns different weights to each image to increase the data weight of the data samples that need to be focused on learning. This allows the architecture of sub-networks with potential but poor performance to focus on learning on data samples with high data weights, so as to be fully trained and increase the probability of being searched. The search identified the best-performing neural network architecture for image classification. : in, It is training loss; It is the validation set accuracy; The optimal neural network architecture for image classification problems; a For the architecture search space A Sub-network architecture; The optimal learnable parameters; for image classification problems, the data sample weights v Different weights are assigned to each image during the training process for neural architectures that share parameters; The uncertainty calculation module is further used for: Take out the data sample measurement values ​​with the same label from the data sample measurement value set corresponding to each data sample group, and use them as the distribution set of each data sample group; The distribution set is assumed to be a Gaussian distribution; Calculate the product of the multiple Gaussian distributions corresponding to the multiple distribution sets and optimize it to obtain the optimized Gaussian distribution; The standard deviation of the Gaussian distribution is calculated by performing calculations on the optimized Gaussian distribution. The standard deviation of the Gaussian distribution corresponding to the distribution set of each set of data samples is used as the uncertainty of each set of data samples.

5. An electronic device, characterized in that, It includes a memory, a processor, and a computer program stored on the memory, wherein the processor executes the computer program to implement the steps in the course-based shared parameter neural architecture search method according to any one of claims 1-3.

6. A computer-readable storage medium having a computer program / instructions stored thereon, characterized in that, When the computer program / instruction is executed by the processor, it implements the steps in the shared parameter neural architecture search method based on curriculum learning as described in any of claims 1-3.

7. A computer program product comprising a computer program / instructions, characterized in that, When the computer program / instruction is executed by the processor, it implements the steps in the shared parameter neural architecture search method based on curriculum learning as described in any of claims 1-3.

Citation Information

Patent Citations

  • Joint Architecture And Hyper-Parameter Search For Machine Learning Models

    US20210383223A1