Hyperparameter neural network ensembles

By using different parameter initializations and hyperparameter settings in neural network ensembles, hyperparameter ensembles are generated, which solves the problem of insufficient prediction diversity and accuracy in existing technologies and achieves more efficient computation and storage.

CN115516466BActive Publication Date: 2026-11-20GOOGLE LLC
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202180033319.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Priority Date
2020-06-05
Filing Date
2021-06-07
Publication Date
2026-11-20
Estimated Expiration
2041-06-07

AI Technical Summary

Technical Problem

Existing neural network ensemble techniques are insufficient in generating predictive diversity and accuracy, and their computational and storage efficiency needs to be improved.

Method used

By using different parameter initializations and hyperparameter settings in neural network ensembles, hyperparameter ensembles are generated, ensuring diversity among neural networks and improving computational and storage efficiency through parameter sharing.

Benefits of technology

It improves the prediction accuracy and uncertainty quantification capabilities of neural network ensembles, while reducing storage requirements and computational latency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115516466B_ABST
    Figure CN115516466B_ABST
Patent Text Reader

Abstract

Methods, systems, and apparatus, including computer programs encoded on computer storage media, for generating a neural network ensemble. In particular, the neural networks in the ensemble are trained using different hyperparameters from one another.
Need to check novelty before this filing date? Find Prior Art

Description

[0001] Cross-reference to related applications

[0002] This application claims priority to U.S. Provisional Application No. 63 / 035,614, filed June 5, 2020, the entire contents of which are incorporated herein by reference. Technical Field

[0003] This manual relates to training neural networks. Background Technology

[0004] A neural network is a machine learning model that uses one or more non-linear units to predict the output of a received input. Some neural networks include one or more hidden layers in addition to the output layer. The output of each hidden layer is used as the input to the next layer in the network (i.e., the next hidden layer or output layer). Each layer of the network generates its output from the received input based on the current values ​​of its corresponding parameter set. Summary of the Invention

[0005] This specification describes a system implemented as a computer program on one or more computers in one or more locations, which generates an ensemble of multiple neural networks to perform a specific machine learning task.

[0006] Specific embodiments of the subject matter described in this specification can be implemented to achieve one or more of the following advantages.

[0007] Conventional techniques for generating ensembles of neural networks ensure diversity in predictions generated by the neural networks in the ensemble by initializing the trained neural networks with different parameters—that is, by initializing the parameter values ​​of the neural networks in the ensemble to different initial values. However, the described technique alters both the initialization of the parameters and hyperparameters used for training the neural networks. By generating ensembles not only in terms of weights but also in terms of hyperparameters, the generated ensembles outperform conventional ensembles in terms of the accuracy of the predictions generated by the ensemble and in providing a metric for quantifying the uncertainty of the predictions generated by the ensemble.

[0008] Furthermore, by generating computationally efficient batch ensembles in a manner that also ensures the diversity of hyperparameters in the generated batch ensembles, the described technique can improve prediction quality and uncertainty quantification in a computationally efficient manner.

[0009] For example, in various exemplary embodiments, the neural networks in the generated ensemble of K neural networks share at least some parameters. Since such shared parameters only need to be stored once, even if used by multiple neural networks, the generated ensemble is suitable for memory-efficient storage. Specifically, because parameters are shared among the neural networks in the ensemble of K neural networks, the amount of memory required to store the ensemble of K neural networks can be the same as or less than the memory available in the constrained memory space for storing the ensemble of K neural networks. Furthermore, in some embodiments where the K neural networks share parameters, the outputs of each of the K neural networks can be generated in parallel for a batch of multiple inputs, thereby reducing the latency of generating predictions for the ensemble compared to conventional techniques.

[0010] Details of one or more embodiments of the subject matter of this specification are set forth in the accompanying drawings and the following description. Other features, aspects, and advantages of the subject matter will become apparent from the description, drawings, and claims. Attached Figure Description

[0011] Figure 1 An example training system is shown.

[0012] Figure 2 This is a flowchart of an example process for generating ultra-deep integration.

[0013] Figure 3 This is a flowchart of an example process for generating ultra-batch integrations.

[0014] Figure 4 The graphs show the performance of deep ensembles and super-batch ensembles on various machine learning tasks.

[0015] The same reference numerals and names in the various figures indicate the same elements. Detailed Implementation

[0016] Figure 1 An example training system 100 is shown. The training system 100 is an example of a system implemented as a computer program on one or more computers in one or more locations, wherein the systems, components and techniques described below can be implemented.

[0017] The training system 100 uses the training dataset 102 and the validation dataset 104 to generate an ensemble 130 of multiple trained neural networks 120A-K that have been trained to perform a specific machine learning task.

[0018] The training dataset 102 includes multiple training examples, and for each training example, it includes a corresponding target output. The target output for a given training example is the output that should be generated by performing a specific machine learning task on the corresponding training input.

[0019] The validation dataset 104 also includes multiple examples, and for each example, includes the corresponding target output, but will typically include examples different from those in the training dataset 102. The examples in the validation dataset 104 will also be referred to as "validation examples".

[0020] Each neural network 120A-K in the ensemble 130 is configured to process network inputs for a specific task and generate outputs for that specific task.

[0021] Due to the way the system generates the ensemble 130 and trains the neural networks 120 within it, each trained neural network 120 in the ensemble 130 will typically have different parameter values ​​than the other trained neural networks 120 in the ensemble 130. Therefore, different neural networks in the neural networks 120A-K can generate different network outputs for different network inputs used for a specific machine learning task.

[0022] It can train the neural network 120A-K in the ensemble 130 to perform any kind of machine learning task, that is, it can be configured to receive any kind of digital data input and generate any kind of score, classification or regression output based on that input.

[0023] In some cases, each neural network is configured to perform an image processing task, i.e., to receive an input image and process it, specifically, to process the intensity values ​​of the pixels in the input image to generate a network output for the input image. For example, the task could be image classification, and the output generated by the neural network for a given image could be a score for each of a set of object categories, where each score represents an estimated probability that the image contains an object belonging to that category. As another example, the task could be image embedding generation, and the output generated by the neural network could be a digit embedding of the input image. As yet another example, the task could be object detection, and the output generated by the neural network could identify the location of objects depicting a specific type in the input image. As yet another example, the task could be image segmentation, and the output generated by the neural network could assign each pixel of the input image to a category from a set of categories.

[0024] As another example, if the input to the neural network is an internet resource (e.g., a webpage), a document, or a portion of a document, or features extracted from an internet resource, document, or portion of a document, then the task can be to classify the resource or document. That is, the output generated by the neural network for a given internet resource, document, or portion of a document can be a score for each topic in a topic set, where each score represents an estimated probability that the internet resource, document, or portion of a document is related to the topic.

[0025] As another example, if the input to the neural network is features of the impression context of a particular ad, the output generated by the neural network can be a score representing the estimated probability that the particular ad will be clicked.

[0026] As another example, if the input to the neural network is features for personalized recommendations to a user, such as features characterizing the context of the recommendation, such as features characterizing the user's previous actions, then the output generated by the neural network could be a score for each of the set of content items, where each score represents an estimated probability that the user will make a favorable response to the recommended content item.

[0027] As another example, if the input to a neural network is a sequence of text in one language, the output generated by the neural network can be a score for each text fragment in a set of text fragments in another language, where each score represents an estimated probability that the text fragment in the other language is an appropriate translation of the input text into the other language.

[0028] As another example, the task could be an audio processing task. For instance, if the input to the neural network is a sequence representing spoken utterances, the output generated by the neural network could be for each text segment in a set of text segments, with each score representing an estimated probability that the text segment is a correct transcription of the utterance. As another example, if the input to the neural network is a sequence representing spoken utterances, the output generated by the neural network could indicate whether a particular word or phrase (“hot word”) was spoken in the utterance. As yet another example, if the input to the neural network is a sequence representing spoken utterances, the output generated by the neural network could identify the natural language in which the utterance was spoken.

[0029] As another example, a task can be a natural language processing or understanding task that operates on a sequence of texts in a natural language, such as entailment tasks, paraphrasing tasks, text similarity tasks, sentiment tasks, sentence completion tasks, grammar tasks, etc.

[0030] As another example, the task could be a text-to-speech task, where the input is natural language text or features of natural language text, and the network output is a spectrogram or other data defining the audio of the text spoken in natural language.

[0031] As another example, the task could be a health prediction task, where the input is electronic health record data for the patient, and the output is a prediction related to the patient's future health, such as a predicted treatment that should be prescribed for the patient, the likelihood of the patient experiencing an adverse health event, or a predicted diagnosis for the patient.

[0032] As another example, the task can be an agent-controlled task, where the input is an observation characterizing the state of the environment, and the output is defined by the action to be performed by the agent in response to the observation. The agent can be, for example, a real-world or simulated robot, a control system for an industrial facility, or a control system that controls different types of agents.

[0033] Specifically, system 100 generates an ensemble 130 of neural networks 120A-K in a manner that takes into account the different hyperparameters of the training techniques used to train the neural networks. Therefore, the ensemble 130 can be referred to as a "hyperparameter ensemble" 130.

[0034] Hyperparameters are values ​​or settings that modify how a training technique operates when modified. In other words, given a training dataset containing multiple training examples and the current values ​​of the parameters of a given neural network, different hyperparameters will result in different updates to the current values ​​of the parameters as a result of performing a training technique on the training dataset.

[0035] Examples of hyperparameters include the weights of terms in the loss function, the loss rate of different layers in the neural network, hyperparameters of regularization terms (e.g., L2 penalty terms), label smoothing hyperparameter values ​​that determine the amount of label smoothing to be applied to training examples during training, learning rate values ​​or learning rate decay values ​​or other hyperparameters of the optimizer used by the training technique, batch size, etc.

[0036] System 100 is capable of generating ensemble 130 by taking into account different hyperparameters of any of the training techniques used in several ways.

[0037] In some implementations, system 100 generates a pool of candidate trained neural networks, each of which has been trained using different combinations of hyperparameters and parameter initializations, and then selects an ensemble of neural networks 130 from the pool of candidate trained neural networks.

[0038] Integration 130 generated in this way will be referred to as ultra-deep integration. See below for reference. Figure 2 and Figure 3 A more detailed description of generating ultra-deep ensembles.

[0039] In some other implementations, system 100 generates an ensemble 130 such that each of the neural networks 120A-K shares some parameters among all the neural networks 120A-K in the ensemble, and each neural network has some parameters that are not shared. "Sharing" a parameter between two neural networks means that the parameter takes the same value in both neural networks.

[0040] More specifically, in these embodiments, each of the neural networks 120A-K has at least one “integration layer”. An integration layer is a layer having: (i) shared parameters that have the same values ​​for all neural networks in the plurality of neural networks 120A-K, (ii) specific parameters that have different values ​​for different neural networks in the plurality of neural networks 120A-K, and (iii) embedding parameters that include first embedding parameters that map the current hyperparameters used for training the neural network to modifications of the parameters of the layer.

[0041] As a specific example, for each neural network, the specific parameters of each ensemble layer in the neural network can include (i) a first specific parameter that modifies the shared parameters used for the ensemble layer and (ii) a second specific parameter that defines the specific bias vector used for the ensemble layer in the neural network.

[0042] In this example, to generate the final values ​​of the parameters of the ensemble layer of a given neural network in neural networks 120A-K at any given time during training, system 100 applies a final modification to shared parameters, which are determined using specific parameters for the given neural network and by applying embedding parameters to the current hyperparameters used to train the given neural network. System 100 then uses the modified shared parameters generated by applying the final modification as the weights of the ensemble layer, such as the weight matrix of the kernel of a linear or convolutional layer, and uses a specific bias vector defined by a second specific parameter as the bias vector of the ensemble layer in the given neural network.

[0043] Additionally, in some cases, the embedding parameters further include a second embedding parameter that maps the current hyperparameters to a modifier of a specific bias vector.

[0044] Therefore, in these examples, the system further applies the modifier generated from the second parameter and the current hyperparameter to a specific bias vector, and uses the modified bias vector as the bias vector of the ensemble layer in the given neural network.

[0045] As a specific example, when the ensemble layer is a linear layer, given the weight matrix W of the ensemble layer of neural network k in the ensemble with current hyperparameter λk. k (λ k It can satisfy:

[0046] W k (λ k )=W⊙(r k s k T )+[△⊙(u k v k T )]⊙e(λ k ) T,

[0047] Here, W and △ are shared kernels composed of shared weights, ⊙ represents element-wise multiplication, and r k s k u k and v k It is a vector specific to the parameters of neural network k, and e(λ) k ) is the embedding of the current hyperparameters generated using the embedding parameters. For example, embeddings can be generated by applying the matrix of the embedding parameters to the vector of the current hyperparameters.

[0048] Additionally, when the linear layer has a bias term, given the current hyperparameter λ k The bias vector b of the ensemble layer of neural network k in the ensemble k (λ k It can satisfy:

[0049] b k (λ k )=b k +δ k ⊙e′(λ k ) T ,

[0050] Among them, b k and δ k It is a bias term specific to neural network k, and e′(λ) k ) is the embedding of the current hyperparameters generated using the second embedding parameter. For example, the embedding can be generated by applying the matrix of the second embedding parameter to the vector of the current hyperparameters.

[0051] Therefore, in order to compute the output of the ensemble layer for neural network k, the input of this layer is compared with the weight matrix W. k (λ k Multiply by b, and multiply by the bias vector b. k (λ k Add to the product.

[0052] As another specific example, when the ensemble layer is a convolutional layer, given the current hyperparameter λ k The kernel K of the ensemble layer of the neural network k in the ensemble k (λ k It can satisfy:

[0053] K k (λ k )=K⊙(r k s k T )+[△⊙(u k v k T )]⊙e(λk ) T ,

[0054] Here, K and Δ are kernels composed of shared parameters.

[0055] Additionally, when the convolutional layer has a bias term, given the current hyperparameter λ k The bias term b for the ensemble layer of neural network k in the ensemble. k (λ k It can satisfy:

[0056] b k (λ k )=b k +δ k ⊙e′(λ k ) T .

[0057] In the two equations above, the rank-1 factor, i.e., r k s k T and u k v k T This should be understood as broadcasting along the height and width dimensions.

[0058] Therefore, in order to compute the output of the ensemble layer of neural network k, in kernel W k (λ k Convolution is performed between the input of the layer and the input of the layer, and the bias term b is applied. k (λ k Add to the output of the convolution.

[0059] Because ensemble layers share a large number of parameters, and because these shared parameters only need to be stored once for all K neural networks, K neural networks are generally more computationally efficient than other equivalent ultra-deep ensembles, for example, with a much smaller memory footprint. Furthermore, when ensembles are used to process a batch of multiple neural network inputs, due to the structure of the ensemble layers, it is possible to compute the batch of network outputs of all K neural networks in parallel in a single forward pass by flattening the neural network inputs in the batch before the batch of inputs in the batch is processed by the "composite" neural network.

[0060] In some cases, each layer with parameters within the K neural networks is an ensemble layer; that is, each linear layer and / or each convolutional layer is configured as an ensemble layer as described above. In other cases, only a suitable subset of the layers with parameters in the K neural networks is an ensemble layer; that is, one or more linear layers, convolutional layers, or other types of neural network layers do not share any parameters among the K neural networks in the ensemble.

[0061] An ensemble of 130 generated from K neural networks with at least one ensemble layer will be called a superbatch ensemble. See below for reference. Figure 3 A more detailed description of generating ultra-batch integrations.

[0062] After integration 130 is generated (and trained) by system 100, system 100 is able to use integration 130 to process new network inputs to generate new network outputs for machine learning tasks.

[0063] For example, the final output of an ensemble given a new network input can be a measure of the central tendency of the new network outputs generated by networks 120A-K in ensemble 130 for a given network input, such as the average or the average after one or more maximum outliers have been removed. Using the output of ensemble 130 instead of the output of a single network can result in outputs with improved accuracy on machine learning tasks.

[0064] In addition to generating the final output, the outputs of networks 120A-K in ensemble 130 can also be used to measure the uncertainty of the accuracy of the final output, for example, as a measure of the variability of the outputs of the individual networks in the ensemble. The measure of variability can be, for example, an entropy-based measure of variability. As an example, this measure can be equal to the sum of the Kullback-Leibler (KL) divergences between the network outputs generated by each neural network and the final output. As another example, this measure can be equal to the difference between the entropy of the final output and the average of the entropies of the individual network outputs generated by the neural networks in the ensemble. Alternatively, for classification tasks, the measure of variability can be calculated based on a direct comparison of scores assigned to a predetermined subset of the categories for which the network outputs are computed. For example, the measure of variability can be calculated as the difference between the maximum score computed by any ensemble for any category in the subset and the minimum score computed by any ensemble for any category in the subset.

[0065] More specifically, after generating the ensemble 130, that is, after training each of the neural networks 120A-K, and for ultra-deep ensembles, after selecting the neural networks 120A-K to be included in the ensemble, the system 100 is able to receive new network inputs and use each of the K neural networks 120A-K in the ensemble 130 to process the new network inputs to generate K new network outputs for the new network inputs.

[0066] Then, the system is able to generate a final new network output from the K new network outputs for the new network input, for example, as a measure of the central tendency of the K new network outputs.

[0067] The system can also measure the uncertainty of the accuracy of generating the final new network output from K new network outputs.

[0068] When the ensemble is a super-batch ensemble, in order to use each of the K neural networks in the ensemble to process new network inputs, the system determines appropriate hyperparameters for each of the K neural networks, and for each ensemble layer in the K neural networks, the embedding parameters for the neural network are applied to the determined hyperparameters to generate a modifier for the shared parameters, and then the modified shared parameters as described above are used. The following will refer to... Figure 3 The description describes how hyperparameters are determined after training.

[0069] Figure 2 This is a flowchart of an example process 200 for generating ultra-batch ensembles. For convenience, process 200 will be described as being executed by a system of one or more computers located in one or more locations. For example, a training system appropriately programmed according to this specification, such as... Figure 1 The training system 100 is capable of executing process 200.

[0070] Specifically, system execution process 200 performs a machine learning task by generating an ensemble of K neural networks, where K is a fixed integer greater than 1.

[0071] The system identifies a set of N distinct hyperparameters used to train a neural network with parameters that perform a machine learning task (step 202). Like K, N is an integer greater than 1 and can be equal to K or an integer greater than K.

[0072] In some implementations, in order to identify a set of N different hyperparameters, the system applies a hyperparameter search technique to identify the M best-performing hyperparameters for the machine learning task, where M is an integer greater than N.

[0073] The system can apply any appropriate hyperparameter search technique for searching for the optimal set of hyperparameters. As a specific example, the system can use random search and select the M best-performing hyperparameters evaluated as part of a random search technique. Other examples of hyperparameter search techniques that can be used include grid search and automatic hyperparameter tuning techniques, such as Bayesian optimization-based hyperparameter tuning techniques.

[0074] Then, the system uses an integrated selection technique to select N hyperparameters from the M best-performing hyperparameters.

[0075] As a specific example, the system can generate a set of M second candidate neural networks, each of which has been trained using different hyperparameters from the M best-performing hyperparameters. In other words, the system can train the corresponding neural network on the same training dataset or on a corresponding portion of a larger training dataset using each of the M best-performing hyperparameters to generate a set of M second candidate neural networks.

[0076] The system then generates a first ensemble of N candidate neural networks from M second candidate neural networks by repeatedly adding to the first ensemble of N candidate neural networks—that is, by adding a new candidate neural network at each iteration in multiple iterations. At each iteration, the system is able to select from the M candidate neural networks the one that, if added to the first ensemble, would result in the greatest performance improvement of the first ensemble on the machine learning task. The system is able to measure the performance of the ensemble on the machine learning task as the performance of the ensemble on multiple validation examples from the validation dataset of the machine learning task using an appropriate performance measure of the final output of the ensemble, such as the average negative log-likelihood of the final output generated by the ensemble for multiple validation examples.

[0077] Then, the system selects the hyperparameters for training the N candidate neural networks in the first ensemble as the N hyperparameters.

[0078] The system generates a set of first candidate trained neural networks (step 204).

[0079] To generate a set of first candidate trained neural networks, the system can train a set of multiple neural networks for each of N different hyperparameters.

[0080] Specifically, for each of N distinct hyperparameters, the system can choose multiple different initializations for the values ​​of the neural network's parameters. For example, the system can choose a fixed number of different initializations by applying an appropriate random parameter initialization scheme to each parameter of the neural network for each initialization. For instance, the system can generate independent samples from a given probability distribution (e.g., a Gaussian distribution) for each initialization. As another example, the system can generate independent samples from a distribution that assigns a positive sign to the parameter with one probability and a negative sign with another probability. That is, each different initialization is a different random initialization of the values ​​of the neural network's parameters.

[0081] For each of N different hyperparameters and for each of different initializations, the system can use (i) different hyperparameters and (ii) parameter values ​​initialized with different initializations to train the corresponding neural network to generate a trained neural network.

[0082] By doing this for each of the N different hyperparameters, the resulting set of first candidate trained neural networks comprises multiple different neural networks trained using different combinations of parameter initialization and hyperparameters.

[0083] The system generates an ensemble of K neural networks by selecting K neural networks from the first candidate trained neural networks (step 206).

[0084] Specifically, the system can use the same or different ensemble generation techniques as those used to select N hyperparameters to generate ensembles.

[0085] As a specific example, the system is able to generate an ensemble of K neural networks from a set of first candidate trained neural networks by adding a new first candidate trained neural network to the ensemble at each iteration in multiple iterations.

[0086] At each iteration, the system is able to add the first candidate trained neural network to the ensemble by selecting the neural network that, if added to the ensemble, would result in the greatest improvement in the ensemble performance of any neural network in the ensemble from the first candidate trained neural networks in the set.

[0087] In some cases, the system performs the iterative selection without replacement; that is, once a given candidate is added to the set, it is removed from the pool of available candidates in subsequent iterations.

[0088] In some other cases, the system performs this iterative selection without replacement; that is, once a given candidate is added to the ensemble, it is not removed from the available candidate pool in subsequent iterations and can be added to the ensemble again in later iterations. In these cases, the system is able to continue iterating until K unique neural networks have been added to the ensemble, or until a total of K neural networks have been added to the ensemble (even if some of the K are different instances of the same neural network). Because the final output is computed as a measure of central tendency, the final output will be weighted more strongly by the outputs generated by neural networks with more than one instance in the ensemble than by the outputs generated by neural networks with only one instance in the ensemble.

[0089] Figure 3 This is a flowchart of an example process 300 for generating ultra-deep ensembles. For convenience, process 300 will be described as being executed by a system of one or more computers located in one or more locations. For example, a training system appropriately programmed according to this specification (e.g., Figure 1 The training system 100) is capable of executing process 300.

[0090] Specifically, the system execution process 300 trains an ensemble with K neural networks, each configured to perform a machine learning task.

[0091] Each of the K neural networks has multiple neural network layers with corresponding parameters, wherein at least one of those layers is an ensemble layer, and for each of the K neural networks, the ensemble layer has: (i) shared parameters shared among all K neural networks in the ensemble, (ii) specific parameters specific to the neural network, and (iii) embedding parameters including a first embedding parameter of a modifier that maps the current hyperparameter to the shared parameters.

[0092] In some cases, the embedding parameters are specific to the neural network, while in others, the embedding parameters are shared between neural networks in the ensemble.

[0093] Additionally, in some cases, each integration layer also includes a second embedded parameter of a modifier that maps the current hyperparameters to the bias of the integration layer.

[0094] The above is for reference only. Figure 1 The operation of the integration layer is described.

[0095] During the training of the neural networks in the ensemble, each of the K neural networks is trained using hyperparameters repeatedly sampled from a distribution different from the other K neural networks. That is, during training, the system maintains a corresponding set of hyperparameter distribution parameters for each of the K neural networks, which defines the distribution on the hyperparameters used for training the neural networks.

[0096] Specifically, each hyperparameter distribution defines a distribution over the possible values ​​of each hyperparameter during training, and this distribution will vary across the different neural networks in the ensemble. For example, each neural network can be trained with the same batch size, while the dropout rate, regularization rate, or both can vary across the different neural networks in the ensemble.

[0097] As a specific example, the system can represent a given set of hyperparameters, which includes the corresponding value for each hyperparameter that can be transformed as a multidimensional vector. For each neural network, the hyperparameter distribution can be represented as multiple independent distributions; for example, each dimension in the multidimensional vector represents a distribution. The hyperparameter distribution parameters then define each independent distribution. For example, each distribution can be a log-uniform distribution, and the hyperparameter distribution parameters can include two parameters for each dimension, which define the bounds of the range of the corresponding log-uniform distribution.

[0098] Then, the system trains K neural networks by repeatedly performing process 300 on different sets of training examples using the maintained data.

[0099] For each of the K neural networks, the system samples hyperparameters from a distribution defined by the corresponding hyperparameter distribution set of the neural network (step 302). For example, for a given neural network, the system is able to sample the corresponding values ​​of each dimension of a multidimensional vector from an independent distribution of that dimension of the given neural network.

[0100] The system obtains multiple training examples for the machine learning task (step 304). For example, the system can sample a small batch of multiple training examples from the training dataset of the machine learning task. The training data can include multiple training examples, and for each training example, it can include the corresponding target output, that is, the output that should be generated by the neural network by performing the machine learning task on the corresponding training example.

[0101] For each of the K neural networks, the system trains the neural network on multiple training examples based on the hyperparameters sampled for the neural network to determine updates to at least the shared parameters, specific parameters, and embedding parameters of the first neural network layer (step 306).

[0102] In some implementations, the system trains each of the neural networks to minimize a loss function that measures the loss between the network output generated by the neural network for a given training example and the target output for that given training example. The loss between the output and the target output can be any form suitable for the machine learning task, such as cross-entropy loss or negative log-likelihood loss. That is, in these implementations, the loss function includes a corresponding loss term for each of the K neural networks, which measures the loss between the network output generated by the neural network for a given training example and the target output for that given training example. For example, the loss function can measure the average loss of multiple training examples.

[0103] In some other implementations, the system trains each of the neural networks to minimize a loss function that measures the loss between the final output generated from the network outputs of the K neural networks for a given training example and the target output for that given training example. As described above, the final output for a given training example can be a measure of the central tendency of the network outputs generated by the K neural networks.

[0104] In any of these implementations, in addition to one or more terms of the loss between the measured output and the target output, the loss function may also include one or more additional terms, such as regularization terms or auxiliary loss terms or both.

[0105] To perform training on a given neural network, for each ensemble layer, the system applies a first embedding parameter to the hyperparameters sampled for the given neural network to generate a modifier for shared parameters, and processes the input of the given neural network according to the modified shared parameters as described above. When included, the system also applies a second embedding parameter to the hyperparameters sampled for the given neural network to generate a modifier for the bias terms of the ensemble layer.

[0106] To determine the update, for each ensemble layer, the system computes, for example, the gradient of the loss function relative to the shared and embedded parameters of the ensemble layer via backpropagation, and for each neural network, computes the gradient relative to the specific parameters of the ensemble layer of that neural network. The system then maps the gradients to the update using an appropriate optimizer, such as Adam, rmsProp, Adafactor, SGD, etc.

[0107] Similarly, the system also computes updates to the remaining parameters of the ensemble neural network by calculating the gradient of the loss function with respect to those parameters; that is, updates to any layer that is not part of any ensemble layer within the neural network.

[0108] Then, the system applies a specific update for each of the K neural networks to the shared parameters (step 308). For each of the K neural networks, the system also updates the specific parameters of the first neural network layer applied to the neural network. Thus, a single shared update is applied to the shared parameters, while different neural network-specific updates are applied to the specific parameters of each neural network.

[0109] In addition to updating parameters, the system is also able to update the hyperparameter distribution of each neural network during each iteration of process 300.

[0110] Specifically, the system can obtain multiple validation examples and update the corresponding hyperparameter distribution parameter set based on the performance of K neural networks on the validation examples.

[0111] Specifically, the system is able to compute the gradient of the hyperparameter distribution parameters of each neural network relative to the validation loss function, which (i) measures the loss between the network output generated by the neural network for a given validation example and the target output for the given validation example for each neural network, or (ii) measures the loss between the final output generated from the network outputs generated by K neural networks for a given validation example and the target output for the given validation example.

[0112] In some cases, the validation loss function also includes a term that measures the entropy of the hyperparameter distribution, as defined by the current hyperparameter distribution parameters (i.e., the entropy of the overall distribution generated by combining the hyperparameter distributions of all neural networks in the ensemble). Including this entropy term can encourage diversity in the probability distributions of the neural networks in the ensemble.

[0113] As described above, after training, the system needs to select appropriate hyperparameters for each neural network in the ensemble in order to generate outputs for new inputs. As a specific example, after training is complete, for each of the K neural networks, the system can fix the hyperparameters by selecting them using a probability distribution defined by the hyperparameter distribution parameters up to the end of the training process. More specifically, for any given neural network, the system can select the value of each dimension of a multidimensional vector as the average of the distribution of the dimensions defined by the final distribution parameters after training.

[0114] Figure 4 Figures 400 and 450 show the performance of deep ensembles and super-batch ensembles on various machine learning tasks.

[0115] Specifically, Figure 400 illustrates the performance of ultra-deep ensembles configured to perform image classification and training on the CIFAR-100 dataset relative to baseline techniques. These are referred to as “deep ensembles,” where all ensembles in a batch are trained using the same hyperparameters. As can be seen from the figure, ultra-deep ensembles outperform deep ensembles across a range of different ensemble sizes, where the size of the ensemble is the number of neural networks in the ensemble.

[0116] Figure 450 illustrates the performance of a single neural network, techniques based on two baseline deep ensembles (fixed INIT ensemble and deep ensemble), ultra-deep ensemble, two known computationally efficient baseline techniques (batch ensemble, self-tuning network), and ultra-batch ensemble on two image classification tasks: one image classification task trained on the CIFAR-100 dataset and the other image classification task trained on the fashion MNIST dataset. Figure 450 also shows results for two different neural network architectures: Multilayer Perceptron (MLP) and LeNet. That is, Figure 450 shows the results for each neural network as an MLP and for each neural network as a LeNet. The MLP is capable of including multiple linear hidden layers optionally separated from nonlinear activation function layers, and further optionally includes a random dropout layer before the last layer of the neural network. LeNet is a convolutional neural network consisting of a first 2D convolutional layer with max pooling operation, followed by 2D convolutional layers with max pooling operation, and finally two dense layers. Activation functions can be applied after each convolutional layer. Furthermore, a random dropout layer can be included before the last dense layer.

[0117] As can be seen from Figure 450, ultra-deep integration generally outperforms baseline-based deep integration techniques, while ultra-batch integration typically outperforms baseline computationally efficient techniques on various performance measures (negative log-likelihood (“nll”), classification accuracy (“acc”), and expected calibration error (“ece”)).

[0118] This specification uses the term "configured" in conjunction with system and computer program components. For a system of one or more computers to be configured to perform a specific operation or action, this means that software, firmware, hardware, or a combination thereof are already installed on the system, which, in operation, causes the system to perform the operation or action. For one or more computer programs to be configured to perform a specific operation or action, this means that one or more programs include instructions that, when executed by a data processing device, cause the device to perform the operation or action.

[0119] Embodiments of the subject matter and functional operation described in this specification can be implemented in digital electronic circuits, in tangibly embodied computer software or firmware, or in computer hardware, including the structures disclosed in this specification and their structural equivalents, or combinations thereof. Embodiments of the subject matter described in this specification can be implemented as one or more computer programs, i.e., one or more modules of computer program instructions encoded on a tangible, non-transitory storage medium for execution by a data processing apparatus or for controlling the operation of a data processing apparatus. The computer storage medium can be a machine-readable storage device, a machine-readable storage substrate, a random or serial access memory device, or combinations thereof. Alternatively or additionally, program instructions can be encoded on artificially generated propagation signals, such as machine-generated electrical, optical, or electromagnetic signals, which are generated to encode information for transmission to a suitable receiver device for execution by the data processing apparatus.

[0120] The term "data processing device" refers to data processing hardware and encompasses all types of devices, apparatuses, and machines used for processing data, including, for example, programmable processors, computers, or multiple processors or computers. The device may also be or further include special-purpose logic circuitry, such as FPGAs (Field-Programmable Gate Arrays) or ASICs (Application-Specific Integrated Circuits). In addition to hardware, the device may optionally include code that creates an execution environment for computer programs, such as code constituting processor firmware, protocol stacks, database management systems, operating systems, or combinations thereof.

[0121] A computer program, which may also be referred to or described as a program, software, software application, app, module, software module, script, or code, can be written in any form of programming language, including compiled or interpreted languages, or declarative or procedural languages; and it can be deployed in any form, including as a standalone program or as a module, component, subroutine, or other unit suitable for use in a computing environment. A program may, but does not necessarily, correspond to a file in a file system. A program can be stored as a part of a file that holds other programs or data, for example, as one or more scripts stored in a markup language document, as a single file dedicated to the program in question, or as multiple coordinated files, for example, as a file storing one or more modules, subroutines, or code portions. A computer program can be deployed to execute on a single computer or on multiple computers located at a single site or distributed across multiple sites and interconnected via a data communication network.

[0122] In this specification, the term "database" is used broadly to refer to any collection of data: data that does not need to be structured in any particular way, or not at all, and that can be stored on storage devices in one or more locations. Thus, for example, an indexed database can comprise multiple collections of data, each of which can be organized and accessed differently.

[0123] Similarly, in this specification, the term "engine" is used broadly to refer to a software-based system, subsystem, or process programmed to perform one or more specific functions. Typically, an engine will be implemented as one or more software modules or components installed on one or more computers in one or more locations. In some cases, one or more computers will be dedicated to a particular engine; in others, multiple engines can be installed and run on the same one or more computers.

[0124] The processes and logic flows described in this specification can be executed by one or more programmable computers that execute one or more computer programs to perform functions by manipulating input data and generating outputs. The processes and logic flows can also be executed by dedicated logic circuitry, such as FPGAs or ASICs, or by a combination of dedicated logic circuitry and one or more programmable computers.

[0125] A computer suitable for executing computer programs can be based on a general-purpose or special-purpose microprocessor, or both, or any other type of central processing unit. Typically, the central processing unit receives instructions and data from read-only memory or random access memory, or both. The basic components of a computer are the central processing unit for executing or running instructions and one or more memory devices for storing instructions and data. The central processing unit and memory can be supplemented by or incorporated into special-purpose logic circuitry. Typically, a computer will also include one or more mass storage devices for storing data, such as magnetic disks, magneto-optical disks, or optical disks, or operatively coupled to receive data from or transfer data to such mass storage devices, or both. However, a computer does not necessarily have to have such devices. Furthermore, a computer can be embedded in another device, such as a mobile phone, a personal digital assistant (PDA), a mobile audio or video player, a game console, a global positioning system (GPS) receiver, or a portable storage device, such as a universal serial bus (USB) flash drive, to name a few.

[0126] Computer-readable media suitable for storing computer program instructions and data include all forms of non-volatile memory, media, and memory devices, including, for example, semiconductor memory devices, such as EPROM, EEPROM, and flash memory devices; magnetic disks, such as internal hard disks or removable disks; magneto-optical disks; and CD ROMs and DVD-ROMs.

[0127] To provide interaction with the user, embodiments of the subject matter described in this specification can be implemented on a computer having a display device for displaying information to the user, such as a CRT (cathode ray tube) or LCD (liquid crystal display) monitor, and a keyboard and pointing device, such as a mouse or trackball, that the user can use to provide input to the computer. Other types of devices can also be used to provide interaction with the user; for example, feedback provided to the user can be any form of sensory feedback, such as visual, auditory, or tactile feedback; and input from the user can be received in any form, including sound, speech, or tactile input. Additionally, the computer can interact with the user by sending and receiving documents to and from a device used by the user, for example, by sending a webpage to a web browser on the user's device in response to a request received from a web browser. Furthermore, the computer can interact with the user by sending text messages or other forms of messages to a personal device, such as a smartphone running a messaging application, and subsequently receiving response messages from the user.

[0128] The data processing apparatus for implementing machine learning models may also include, for example, a dedicated hardware accelerator unit for processing the common and computationally intensive portions of machine learning training or production, namely inference and workloads.

[0129] It is possible to use machine learning frameworks, such as TensorFlow, Microsoft Cognitive Toolkit, Apache Singa, or Apache MXNet, to implement and deploy machine learning models.

[0130] Embodiments of the subject matter described in this specification can be implemented in a computing system that includes back-end components, such as a data server; or middleware components, such as an application server; or front-end components, such as a client computer having a graphical user interface, web browser, or app that a user can interact with through embodiments of the subject matter described in this specification; or any combination of one or more such back-end, middleware, or front-end components. The components of the system can be interconnected via digital data communication (e.g., a communication network) of any form or medium. Examples of communication networks include local area networks (“LANs”) and wide area networks (“WANs”), such as the Internet.

[0131] A computing system can include clients and servers. Clients and servers are typically geographically separated and usually interact via a communication network. The client-server relationship is established by means of computer programs running on respective computers and having a client-server relationship with each other. In some embodiments, the server transmits data, such as HTML pages, to a user device, for example, for the purpose of displaying data to a user interacting with the device acting as a client and receiving user input from it. It is possible to receive data generated at the user device, such as the results of user interactions, from the device at the server.

[0132] While this specification contains numerous details of specific implementation, these should not be construed as limiting the scope of any invention or the scope that may be claimed, but rather as descriptions of features that may be specific to particular embodiments of a particular invention. Certain features described in the context of separate embodiments in this specification may also be implemented in combination in a single embodiment. Conversely, various features described in the context of a single embodiment may also be implemented separately or in any suitable sub-combination in multiple embodiments. Furthermore, although features may be described above as functioning in certain combinations and even initially claimed in this way, one or more features from a claimed combination may, in some cases, be removed from the combination, and the claimed combination may involve sub-combinations or variations thereof.

[0133] Similarly, although operations are depicted in a specific order in the accompanying drawings and recited in the claims, this should not be construed as requiring these operations to be performed in the specific order shown or sequentially, or to perform all shown operations to achieve the desired result. In some cases, multitasking and parallel processing may be advantageous. Furthermore, the separation of various system modules and components in the above embodiments should not be construed as requiring such separation in all embodiments, and it should be understood that the described program components and systems can generally be integrated together in a single software product or packaged into multiple software products.

[0134] Specific embodiments of the subject matter have been described. Other embodiments are within the scope of the following claims. For example, the actions recited in the claims can be performed in different orders and still achieve the desired result. As an example, the processes depicted in the drawings do not necessarily require the specific order or sequential order shown to achieve the desired result. In some cases, multitasking and parallel processing may be advantageous.

Claims

1. A method for training an ensemble of K neural networks to perform a machine learning task, wherein, K is an integer greater than 1. in: The machine learning task is an image processing task, the input to the neural network is image data, and the output of the neural network is output data associated with the input image data, or... The machine learning task is a classification task. The input to the neural network is an internet resource, a document or a portion of a document, features extracted from the internet resource, features extracted from the document, or features extracted from a portion of a document. The output of the neural network is a score for each topic in a set of topics, where each score represents an estimated probability that the internet resource, document, or portion of a document is related to that topic. The machine learning task is a click prediction task. The input to the neural network is features of the impression context of the advertisement, and the output of the neural network is a score representing the estimated probability that the advertisement will be clicked. The machine learning task is a personalized recommendation evaluation task. The input to the neural network is the features of personalized recommendations for the user, and the output of the neural network is a score for each content item in a set of content items. Each score represents an estimated probability that the user will respond positively to the recommended content item. The machine learning task is a translation task. The input to the neural network is a sequence of texts in one language, and the output of the neural network is a score for each text segment in a set of text segments in another language. Each score represents an estimated probability that the text segment in the set of text segments in the other language is correctly translated into the input text. The machine learning task is an audio processing task, where the input to the neural network is a sequence representing spoken utterances, and the output of the neural network is output data associated with the input sequence, or... The machine learning task is a natural language processing task, where the input to the neural network is a sequence of text representing natural language, and the output of the neural network is output data associated with the input text sequence, or... The machine learning task is a text-to-speech task, where the input to the neural network is natural language text or features of natural language text, and the output of the neural network is audio data defining the text being spoken in the natural language, or... The machine learning task is a health prediction task. The input to the neural network is the user's electronic health record data, and the output of the neural network is a prediction related to the user's future health. The machine learning task is an agent control task, where the input to the neural network is an observation representing the state of the environment, and the output of the neural network is the action the agent is to perform in response to the observation. Each of the K neural networks includes multiple neural network layers with corresponding parameters. The plurality of neural network layers includes a first neural network layer, wherein for each of the K neural networks, the first neural network layer has: (i) Shared parameters shared among all K neural networks in the ensemble. (ii) Specific parameters specific to the neural network, and (iii) An embedding parameter including a first embedding parameter that maps the current hyperparameter to a modifier for the shared parameter. The method includes: For each of the K neural networks, a corresponding hyperparameter distribution parameter set is maintained, wherein the corresponding hyperparameter distribution parameter set defines the distribution on the hyperparameters used for training the neural network; and The K neural networks are trained by repeatedly performing the following operations: For each of the K neural networks, hyperparameters are sampled from the distribution defined by the corresponding hyperparameter distribution parameter set used for the neural network; Obtain multiple training examples; For each of the K neural networks, the neural network is trained on the plurality of training examples based on the hyperparameters sampled for the neural network to determine updates to at least the shared parameters, the specific parameters, and the embedding parameters of the first neural network layer; and The determined update for each of the K neural networks is applied to the shared parameters.

2. The method according to claim 1, wherein, The embedding parameters are shared among the neural networks in the integration.

3. The method according to claim 1, wherein the operation further comprises: For each of the K neural networks, the update is applied to the specific parameter of the first neural network layer of that neural network.

4. The method according to claim 1, wherein, Training each of the neural networks on the training example includes training each of the neural networks to minimize a loss function, which measures the loss between the network output generated by the neural network for a given training example and the target output for the given training example.

5. The method according to claim 1, wherein, Training each of the neural networks on the training example includes training each of the neural networks to minimize a loss function that measures the loss between the final output generated from the network outputs of the K neural networks for the given training example and the target output for the given training example.

6. The method according to claim 1, wherein, For each of the K neural networks, training the neural network on the plurality of training examples based on the sampled hyperparameters includes applying the embedding parameters to the sampled hyperparameters to generate the modifier for the shared parameters.

7. The method according to claim 1, wherein the operation further comprises: Obtain multiple verification examples; as well as The corresponding hyperparameter distribution parameter set is updated based on the performance of the K neural networks on the verification example.

8. The method according to claim 1, wherein, The specific parameters include a first specific parameter that modifies the shared parameters and a second specific parameter that defines a specific bias vector for the first neural network layer.

9. The method according to claim 8, wherein, The embedding parameters further include a second embedding parameter that maps the current hyperparameter to a modifier for the specific bias vector.

10. The method according to any one of claims 1-9, further comprising: After training the ensemble: Receive new network input; The new network input is processed using each of the K neural networks in the ensemble to generate K new network outputs for the new network input; as well as Generate a final new network output from the K new network outputs for the new network input.

11. The method of claim 10, further comprising: A measure of the uncertainty in the accuracy of generating the final new network output from the K new network outputs.

12. The method according to claim 10, wherein, Using each of the K neural networks in the ensemble to process the new network input to generate K new network outputs for the new network input includes: For each of the K neural networks, after the training is completed, hyperparameters are determined based on the corresponding hyperparameter distribution parameter set for the neural network, and the embedding parameters for the neural network are applied to the determined hyperparameters.

13. A system comprising one or more computers and one or more storage devices storing instructions, the instructions, when executed by the one or more computers, causing the one or more computers to perform the method according to any one of claims 1 to 10.

14. One or more computer storage media storing instructions, which, when executed by one or more computers, cause the one or more computers to perform the method according to any one of claims 1 to 10.

Citation Information

Patent Citations

  • Fast hyperparameter search for machine-learning program

    US20190122141A1