Hardware-optimized Neural Architecture Search
Patent Information
- Application Number
- JP2022552370
- Authority / Receiving Office
- JP · JP
- Patent Type
- Patents
- Current Assignee / Owner
- Priority Date
- 2020-09-30
- Filing Date
- 2021-04-28
- Publication Date
- 2025-03-14
- Estimated Expiration
- 2041-04-28
Smart Images

Figure 0007645896000006 
Figure 0007645896000007 
Figure 0007645896000008
Abstract
Description
[Background technology]
[0001] CROSS-REFERENCE TO RELATED APPLICATIONS This application claims priority to U.S. Application No. 17 / 039,178, filed September 30, 2020, which claims priority to U.S. Provisional Application No. 63 / 052,927, filed July 16, 2020. The disclosure of each of the prior applications is considered part of the disclosure of this application and is incorporated by reference into the disclosure of this application.
[0002] background This specification relates to modifying neural network architectures.
[0003] A neural network is a machine learning model that employs one or more layers of nonlinear units to predict an output for a received input. Some neural networks include one or more hidden layers in addition to an 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 the output layer). Each layer of the network generates an output from the received input according to the current values of a respective set of parameters.
[0004] Some neural networks are recurrent neural networks. A recurrent neural network is a neural network that receives an input sequence and generates an output sequence from the input sequence. In particular, a recurrent neural network can use some or all of the internal state of the network from a previous time step when computing an output at a current time step. One example of a recurrent neural network is a long short-term memory (LSTM) neural network that includes one or more LSTM memory blocks. Each LSTM memory block can include one or more cells. Each of the one or more cells includes an input gate, a forget gate, and an output gate that allow the cell to remember a previous state for the cell, for example, for use in generating a current activation or for providing to other components of the LSTM neural network. Summary of the Invention
[0005] overview This specification describes how a system, implemented as a computer program on one or more computers at one or more locations, can determine an architecture for a neural network configured to perform a particular neural network task.
[0006] Particular embodiments of the subject matter described in this specification can be implemented to realize one or more of the following advantages.
[0007] Neural Architecture Search (NAS) systems can effectively and automatically, i.e., without user intervention, select neural network architectures that will result in high-performance neural networks for a particular task. To do so, these systems may employ any of a wide variety of search techniques, including search techniques based on reinforcement learning, evolutionary search, differentiable search, etc. NAS systems can effectively determine novel neural network architectures adapted to a particular task, thereby enabling the resulting neural network to have improved performance for the task. In general, these systems can effectively explore a large space of possible architectures to identify an architecture for a neural network adapted to a particular task.
[0008] Although these systems may result in neural network architectures that perform certain tasks with relatively high accuracy, such architectures may not necessarily be capable of performing these tasks relatively quickly or efficiently when deployed on a target set of hardware resources. Thus, the neural network architectures produced by NAS systems, while highly accurate, may not necessarily be sufficient for their intended use. In some situations, this may be due, at least in part, to the fact that the design of such neural network architectures is not optimized for the target set of hardware resources on which they will operate.
[0009] For example, in some instances, such a target set of hardware resources may correspond to one or more data center accelerators including one or more tensor processing units (TPUs), one or more graphics processing units (GPUs), or a combination thereof. Emerging data center accelerators, including TPUs and GPUs, employ innovative hardware architectures to keep up with the ever-increasing demand for computational power from machine learning models such as neural networks. Such accelerators may be particularly well suited for machine learning applications because they include matrix multiply-accumulate units or "matrix units" configured to perform matrix multiplication, which may be considered as a core operation in neural networks. Neural network architectures may achieve much higher computational rates (Ops / sec or FLOPs / sec) on such accelerators (e.g., TPUs and GPUs) than can be achieved on some other types of hardware resources, such as central processing units (CPUs). However, to achieve peak computation rates on such accelerators, the computational intensity (Op / Byte, or more specifically, the average number of operations performed when accessing a unit-sized memory, e.g., FLOPs per accessed memory byte) of the neural network architecture must be much higher than that to achieve peak computation rates on other types of hardware resources (e.g., CPUs). Such accelerators also require a much higher degree of parallelism from the neural network architecture to achieve higher execution efficiency than other types of hardware resources (e.g., CPUs), since the matrix units of such accelerators may be idle if the multiplication and addition operations in the neural network architecture are performed sequentially or if there are too few multiplication and addition operations per cycle.For this reason, a neural network architecture that can perform a task relatively quickly on a CPU may not necessarily be able to perform the same task relatively quickly on a TPU or GPU, and vice versa.
[0010] In some implementations, one or more of the NAS systems and techniques described herein may attempt to select neural network architectures that are optimized for a target set of hardware resources on which they will be executed. To do so, the systems and techniques described herein may use a search space augmented with operations specific to the target set of hardware resources and a multi-objective performance metric that takes into account both accuracy and latency when selecting a neural network architecture. In an example where the target set of hardware resources corresponds to one or more data center accelerators, including one or more TPUs and / or GPUs, the search space utilized by one or more of the NAS systems and techniques described herein may include one or more "accelerator-friendly" operations that may provide neural network architectures with enhanced computational intensity, parallelism, and / or execution efficiency. For example, because depth-wise convolutions have lower computational intensity, in some implementations, the search space utilized by one or more of the NAS systems and techniques described herein may include one or more operations to fuse depth-wise convolutions with adjacent 1×1 convolutions to improve computational intensity. Furthermore, since greater input and output depth may provide greater parallelism in data center accelerators (e.g., TPUs and / or GPUs), in some implementations, the search space utilized by one or more of the NAS systems and techniques described herein may include one or more operations that use convolution with an n×n kernel to reshape input tensors to improve parallelism, where n represents an integer value greater than 1 (e.g., n=2). In some examples, one or more of these operations use n×n convolutions with stride-n, such as 2×2 convolutions with stride-2. Such convolution operations may also play a role in benefiting the capacity and accuracy of neural network architectures.Additionally, in some implementations, the search space utilized by one or more of the NAS systems and techniques described herein may include activation features that result in increased parallelism in data center accelerators (e.g., TPUs and / or GPUs).
[0011] Although it is commonly believed that the total number of computations (FLOPS) required in a neural network architecture is proportional to the speed of the neural network architecture, such that fewer computations result in a faster neural network architecture, during development of the NAS systems and techniques described herein, it has been found that the opposite is true when the neural network architecture runs on a data center accelerator (e.g., TPU and / or GPU). Thus, the total number of computations (FLOPS) required in a neural network architecture, alone, may not represent a complete or accurate picture of the performance of the neural network architecture when deployed on such an accelerator. For at least this reason, an actual measure of the speed of each candidate neural network architecture when deployed on a target set of hardware resources may be incorporated into a multi-objective performance metric determined and utilized in one or more of the systems and techniques described herein. For example, in some implementations, the systems and techniques described herein may operate to obtain measures of accuracy with which candidate neural network architectures perform a task, execute the candidate neural network architectures on a target set of hardware resources (e.g., one or more TPUs and / or GPUs) to obtain actual measures of the speed (e.g., latency) with which the candidate neural networks perform the task when deployed on the target set of hardware resources and / or the performance of such task (e.g., computational intensity, execution efficiency, etc.), and select a final neural network architecture based at least in part on such measures. In this manner, the systems and techniques described herein may provide for the selection of a final neural network architecture configured to perform the task with a relatively high level of accuracy and relatively high speed.This may not only benefit end users of such neural network architectures, but may also result in significant cost savings for the owners and / or operators of the target sets of hardware resources on which these neural network architectures operate.
[0012] The details of one or more embodiments of the subject matter described herein are set forth in the accompanying drawings and the description below. Other features, aspects, and advantages of the subject matter will become apparent from the following description, the accompanying drawings, and the appended claims. [Brief description of the drawings]
[0013] [Figure 1] FIG. 1 illustrates an exemplary neural architecture search system. [Diagram 2] FIG. 1 illustrates an exemplary neural network architecture. [Diagram 3] FIG. 1 is a flow diagram illustrating an example process for determining an architecture for a task neural network configured to perform a particular machine learning task when deployed on a target set of hardware resources. [Figure 4] FIG. 1 is a flow diagram illustrating an example process illustrating an iteration of a process for performing a search within a space of candidate neural network architectures to identify one or more candidate neural network architectures. [Diagram 5] FIG. 1 is a flow diagram illustrating an example process for using a task neural network to generate outputs for network inputs for a particular machine learning task. DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS
[0014] Like reference numbers and designations in the various drawings indicate like elements. Detailed Description This specification describes a system, implemented as a computer program on one or more computers at one or more locations, that determines an architecture for a task neural network configured to perform a particular machine learning task on a target set of hardware resources.
[0015] A task neural network can be configured to receive any type of digital data input and generate any type of score, classification, or regression output based on the input. In other words, the particular machine learning task that a task neural network is configured to perform may correspond to any of a wide variety of tasks, including scoring tasks, classification tasks, and / or regression tasks. As described below, such tasks may be useful in a wide range of applications, such as applications involving the processing of images, text, audio, and other data.
[0016] For example, if the inputs to a task neural network are images or features extracted from images, the output generated by the task neural network for a given image may be a score for each of a set of object categories, where each score represents the estimated likelihood that the image contains an image of an object belonging to that category.
[0017] As another example, if the input to a task neural network is an Internet resource (e.g., a web page), document, or document portion, or features extracted from an Internet resource, document, or document portion, the output generated by the task neural network for a given Internet resource, document, or document portion may be a score for each of a set of topics, where each score represents an estimated likelihood that the Internet resource, document, or document portion is related to a topic.
[0018] As another example, if the input to a task neural network is impression context features for a particular advertisement, the output generated by the task neural network may be a score representing the estimated likelihood that a particular advertisement will be clicked.
[0019] As another example, if the inputs to a task neural network are features of personalized recommendations for a user, e.g., features characterizing a context for the recommendation, e.g., features characterizing previous actions taken by the user, then the output generated by the task neural network can be a score for each of a set of content items, where each score represents an estimated likelihood that a user will respond favorably to the content item being recommended.
[0020] As another example, if the input to a task neural network is a sequence of text in one language, the output generated by the task neural network may be a score for each of a set of text portions in another language, where each score represents an estimated likelihood that the text portion in the other language is an appropriate translation of the input text into that other language.
[0021] As another example, if the input to a task neural network is a sequence representing an utterance, the output generated by the task neural network may be a score for each of a set of text portions, where each score represents an estimated likelihood that the text portion is an exact transcript for the utterance.
[0022] In some examples, a system for determining an architecture for a task neural network may correspond to system 100, as described in further detail below with reference to Figure 1. Similarly, in some examples, the architecture of the task neural network may correspond to one or both of neural network architectures 150 and 200, as described in further detail below with reference to Figures 1 and 2, respectively.
[0023] 1 illustrates an exemplary neural architecture search (NAS) system 100. Neural architecture search system 100 is one example of a system in which the systems, components, and techniques described below may be implemented, implemented as a computer program on one or more computers at one or more locations.
[0024] The neural architecture search system 100 is a system for determining an architecture for a task neural network configured to perform a specific machine learning task on a target set of hardware resources. The architecture defines the number of layers in the neural network, the operations performed by each of the layers, and the connectivity between the layers in the neural network, i.e., which layers receive input from which other layers in the neural network. As described above, a task neural network can be configured to receive digital data inputs and perform a specific machine learning task (e.g., scoring, classification, regression, etc.) to generate an output based on the inputs. The architecture determined by the system 100 defines the number of layers in the neural network, the operations performed by each of the layers, and the connectivity between the layers in the neural network, i.e., which layers receive input from which other layers in the neural network.
[0025] The neural architecture search system 100 includes a controller 110, a training engine 120, a target hardware deployment engine 130, and a performance measurement engine 140. Briefly, as described in further detail below, the controller 110 iteratively selects candidate neural network architectures from a candidate architecture search space 111 based on performance measures (e.g., multi-objective performance metrics 142) of the preselected candidate neural network architectures. The training engine 120 uses the training data 102 and the validation set 104 to train each candidate neural network architecture selected by the controller 110 to perform a specific machine learning task, and determines a first performance metric 122 for each trained candidate neural network architecture based on the performance of each trained candidate neural network architecture on the specific machine learning task. A target hardware deployment engine 130 executes each trained candidate neural network architecture on a target set of hardware resources (e.g., collective hardware accelerators in a data center) and determines a second performance metric 132 for each trained candidate neural network architecture based on the performance of each trained candidate neural network architecture when deployed on the target set of hardware resources. A performance measurement engine 140 determines a general-purpose performance metric 142 for each trained candidate neural network architecture based on the first performance metric 122 and the second performance metric 132 determined for each trained candidate neural network architecture.In some examples, the performance measurement engine 140 further provides the determined multi-objective performance metric 142 for each trained candidate neural network architecture to the controller 110, which then selects one or more additional candidate neural network architectures from the candidate architecture search space 111 based at least in part on the multi-objective performance metric 142.
[0026] As an example, the controller 110 may select a kth candidate neural network architecture from the candidate architecture search space 111 based at least in part on the multi-objective performance metric 142 determined for one or more pre-selected candidate neural network architectures. For example, the selection of the kth candidate neural network architecture is based at least in part on the multi-objective performance metric 142 determined for the (k-1)th candidate neural network architecture selected by the controller 110, the multi-objective performance metric 142 determined for the (k-2)th candidate neural network architecture selected by the controller 110, etc. (The multi-objective performance metric 142 is described in more detail below.) In this example, the training engine 120 may then use the training data 102 and the validation set 104 to train an instance of the kth candidate neural network architecture selected by the controller 110 to perform a particular machine learning task and determine a first performance metric 122 for the trained instance of the kth candidate neural network architecture based on its performance for the particular machine learning task. Further, in this example, the target hardware deployment engine 130 may run the trained instance of the kth candidate neural network architecture on a target set of hardware resources (e.g., collective hardware accelerators in a data center) and determine a second performance metric 132 for the trained instance of the kth candidate neural network architecture based on its performance when deployed on the target set of hardware resources.The performance measurement engine 140 may then determine a multi-objective performance metric 142 for the kth candidate neural network architecture selected by the controller 110, in this example, based on the first performance metric 122 and the second performance metric 132 determined by the training engine 120 and the target hardware deployment engine 130 for the trained instance of the kth candidate neural network architecture. In this example, the performance measurement engine 140 may provide the multi-objective performance metric 142 determined for the kth candidate neural network architecture selected by the controller 110, and then select a (k+1)th candidate neural network architecture from the candidate architecture search space 111 based at least in part on the multi-objective performance metric 142 determined for the kth candidate neural network architecture selected by the controller 110, the multi-objective performance metric 142 determined for the (k-1)th candidate neural network architecture selected by the controller 110, the multi-objective performance metric 142 determined for the (k-2)th candidate neural network architecture selected by the controller 110, etc.
[0027] In general, both the training data 102 and the validation set 104 include a set of neural network inputs and, for each network input, a respective target output to be generated by the neural network to perform a particular task. For example, a larger set of training data may be randomly partitioned to generate the training data 102 and the validation set 104.
[0028] The system 100 may receive the training data 102 and the validation set 104 in any of a variety of ways. For example, the system 100 may receive the training data as an upload from a remote user of the system over a data communications network, e.g., using an application programming interface (API) made available by the system 100, and may randomly split the uploaded data into the training data 102 and the validation set 104. As another example, the system 100 may receive input from a user specifying which data already maintained by the system 100 should be used to train the neural network, and then split the specified data into the training data 102 and the validation set 104.
[0029] The controller 110 is configured to select a candidate neural network architecture from the candidate architecture search space 111 and generate an output 112 that defines the selected candidate neural network architecture. The candidate architecture search space 111 may include a set or list of operations that may be performed by components of the candidate neural network architecture. The operations reflected in the candidate architecture search space 111 may be viewed as building blocks from which the system 100 may build, design, or develop the candidate neural network architecture. In some examples, to select each candidate neural network architecture from the candidate architecture search space 111, the controller 110 is configured to select, for each of one or more components of each candidate neural network architecture, an operation to be performed by the respective component from the set or list of operations reflected in the candidate architecture search space 111.
[0030] In some implementations, the set or list of operations reflected in the candidate architecture search space 111 may include operations specific to a target set of hardware resources for which the candidate neural network architecture is intended to operate or function to leverage some attributes of the target set of hardware resources. Thus, in examples where the target set of hardware resources corresponds to one or more TPUs and / or GPUs, the set or list of operations reflected in the candidate architecture search space 111 may include operations that promote improved computational intensity, parallelism, and / or execution efficiency. In this manner, the candidate neural network architecture selected by the controller 110 using the candidate architecture search space 111 may be more likely to be able to perform a particular task at a relatively high speed when deployed on the target set of hardware resources. In particular, in examples where the target set of hardware resources corresponds to one or more TPUs and / or GPUs, the set or list of operations reflected in the candidate architecture search space 111 may include one or more operations for fusing a depth-wise convolution with an adjacent 1×1 convolution, one or more spatial-depth convolution operations that reshape an input tensor by increasing the depth of the input tensor while decreasing its spatial extent (e.g., a 2×2 convolution), or a combination thereof. In some implementations, the one or more spatial-depth operations included in the set or list of operations reflected in the candidate architecture search space 111 may include one or more operations using stride-n n×n convolutions (e.g., operations using convolutions with an n×n kernel), where n represents an integer value greater than 1 (e.g., 2 or 4), as well as H×W×C tensor input,
[0031]
number
[0032] In some examples, the set or list of operations reflected in the candidate architecture search space 111 may further include one or more additional operations, including one or more other types of convolution operations and / or one or more reshaping operations, each of which modifies the shape of an input tensor by performing one or more memory operations in one or more memories of the target set of hardware resources. For example, the search space of the candidate architecture search space 111 may include an operation (e.g., a spatial-to-batch operation) that reshapes an input tensor by moving elements of the tensor to different memory locations in the memory, or by copying elements from one memory location to another, or both. As a particular example, the operation may be one that relocates blocks of spatial data in the depth direction. More specifically, the operation outputs a copy of the input tensor with values from the height and width dimensions moved to the depth dimension. In some implementations, this operation corresponds to a spatial-to-batch operation.
[0033] In some examples, the controller 110 is configured to generate the output 112 according to parameters (referred to herein as “controller parameters”) governing the operation of the controller 110. In some implementations, the controller 110 is configured to select at least some candidate neural network architectures from the candidate architecture search space 111 based at least in part on the multi-objective performance metric 142, as described in further detail below with reference to the performance measurement engine 140 of the system 100 and / or other feedback generated within the system 100. In at least some of the aforementioned implementations, one or more of the controller parameters of the controller 110 may be adjusted or tuned based at least in part on the multi-objective performance metric 142 and / or other feedback generated within the system 100. The controller 110 may select a candidate neural network architecture and / or generate the output 112 specifying such a candidate neural network architecture using any of a wide variety of NAS techniques, such as NAS techniques based on reinforcement learning, evolutionary search, differentiable search, etc. In some examples, the controller 110 represents or includes a neural network, such as a recurrent neural network (RNN), configured to generate an output sequence according to the controller parameters. Generally, in these examples, the system 100 determines an architecture for the neural network by training the controller 110 to adjust values of the controller parameters.
[0034] For each candidate neural network architecture selected by and represented by outputs 112 generated by controller 110, training engine 120 trains an instance of a neural network having the architecture defined by outputs 112 on training data 102 and evaluates the performance (e.g., accuracy) of the trained instance on validation set 104. In some implementations, to evaluate the performance of a trained instance of a neural network having the architecture defined by outputs 112, training engine 120 determines a first performance metric 122 or measure of the performance of the trained instance with respect to a particular machine learning task. In some examples, the first performance metric 122 determined for a given candidate neural network architecture may indicate a level of accuracy with which the candidate neural network architecture may be capable of performing a particular machine learning task.
[0035] The training engine 120 may provide the first performance metric 122 determined for the candidate neural network architecture selected by the controller 110 to a performance measurement engine 140 for further evaluation. In addition, the training engine 120 may also provide the trained instance 124 of the candidate neural network architecture selected by the controller 110 to the target hardware deployment engine 130.
[0036] The target hardware deployment engine 130 performs one or more operations to determine a second performance metric 132 or measure of performance of each trained instance of each neural network architecture selected by the controller 110 (and defined by the output 112) when deployed on the target set of hardware resources. In some examples, the second performance metric 132 determined for a given candidate neural network architecture may indicate a level of speed or latency with which the candidate neural network architecture may be capable of performing a particular machine learning task when deployed on the target set of hardware resources. To determine the second performance metric 132 for a given candidate neural network architecture, the target hardware deployment engine 130 may perform one or more operations to execute the candidate neural network architecture on the target set of hardware resources.
[0037] As mentioned above, in some implementations, the target set of hardware resources may correspond to one or more TPUs and / or GPUs. In some of the examples, the target set of hardware resources may correspond to a collection of hardware accelerators in a data center, which may include one or more TPUs, GPUs, other types of matrix machines and / or vector machines, or combinations thereof. Although described primarily with respect to one or more TPUs and / or GPUs, it should be understood that in some examples, the target set of hardware resources may correspond to one or more CPUs, edge or mobile computing devices, or other computing units. In such examples, the set or list of operations reflected in the candidate architecture search space 111 may include operations that are specific to the target set of hardware resources or serve to exploit some attributes of the target set of hardware resources. In some implementations, the target set of hardware resources may correspond to a combination of two or more of the above-mentioned types of hardware resources (e.g., TPUs, GPUs, CPUs, edge or mobile computing devices, etc.).
[0038] In some examples, the target set of hardware resources may be included as part of system 100, but may be reserved for performing operations associated with target hardware deployment engine 130. In other examples, the target set of hardware resources may be communicatively coupled to target hardware deployment engine 130 and / or one or more other components of system 100. In either case, target hardware deployment engine 130 is configured to deploy the trained instance of the candidate neural network architecture selected by controller 110 onto the target set of hardware resources and determine a second performance metric 132 based thereon.
[0039] More specifically, upon deploying a trained instance of a given candidate neural network onto a target set of hardware resources, the target hardware deployment engine 130 may measure or determine (i) a latency of generating an output using the candidate neural network when deployed onto the target set of hardware resources, (ii) a computational intensity of the candidate neural network when deployed onto the target set of hardware resources, and / or (iii) an execution efficiency of the candidate neural network when deployed onto the target set of hardware resources. In some implementations, the second performance metric 132 is based at least in part on one or more of the aforementioned parameters (i), (ii), and (iii). In some implementations, the target hardware deployment engine 130 may determine the second performance metric 132 for the candidate neural network architecture based at least in part on one or more of the aforementioned parameters (i), (ii), and (iii). In at least some of these implementations, the target hardware deployment engine 130 may use one or more of the aforementioned parameters (i), (ii), and (iii) as the second performance metric 132 for the candidate neural network. In some examples, each of the aforementioned parameters (i), (ii), and (iii) is directly or indirectly reflected in the second performance metric 132. Other configurations are possible.
[0040] In some implementations, the target set of hardware resources may be included as part of the system 100 and may be utilized to perform operations related to one or more components of the system 100 in addition to the target hardware deployment engine 130. In some such implementations, some or all of the functionality of the target hardware deployment engine 130 may be collapsed into the training engine 120, or vice versa. For example, in some such implementations, the system 100 may determine the first performance metric 122 and the second performance metric 132 simultaneously or nearly simultaneously. Furthermore, in some examples, the target hardware deployment engine 130 may not necessarily deploy a trained instance of a candidate neural network architecture selected by the controller 110 onto the target set of hardware resources to determine the second performance metric 132 for the candidate neural network architecture, but may instead perform one or more operations to estimate or predict the second performance metric 132. For example, in some such examples, the target hardware deployment engine 130 may utilize known or predetermined parameters of the target set of hardware resources along with one or more models to calculate the second performance metric 132 or simulate the performance of a given candidate neural network when deployed on the target set of hardware resources to obtain one or more measures thereof. Other configurations are possible.
[0041] In some implementations, the latency, computational intensity, and execution efficiency described herein may be defined as follows:
[0042]
number
[0043] where W (FLOPs) is the amount of computation required in the neural network architecture, Q (bytes) is the memory traffic (bytes of memory transfer) incurred during the execution of the neural network architecture, I is the computational intensity of the neural network architecture, C (FLOPs / sec) is the computation rate achieved by the neural network architecture, and C Ideal is the ideal computation rate achieved by the neural network architecture, E is the execution efficiency of the neural network, b is the memory bandwidth of the target set of hardware resources, and C Max is the peak computation rate achievable on a target set of hardware resources, and R is the "bump point" or minimum computational intensity required for the neural network architecture to achieve the peak computation rate on the target set of hardware resources. As demonstrated in the above formula, C is Ideal and E (for example, E is C / C Ideal is determined by the Ideal I, b, C Max and R. The parameters b, C Max and R may be constant values related to a target set of hardware resources. In practice, the end-to-end inference latency of a neural network architecture is a function of W, I, and E. Thus, to optimize latency for data center accelerators (e.g., TPUs, GPUs, etc.), system 100 may attempt to optimize W, I, and E collectively and simultaneously, rather than attempting to reduce W(FLOPs) alone. System 100 may be configured to operate in this manner, because reducing W(FLOPs) without considering I and E may cause C to decrease much more rapidly than W, which may cause latency degradation.
[0044] Similar to the training engine 120, the target hardware deployment engine 130 may provide the second performance metric 132 determined for the candidate neural network architecture selected by the controller 110 to the performance measurement engine 140 for further evaluation. The performance measurement engine 140 then uses the first performance metric 122 and the second performance metric 132 to determine a multi-objective performance metric 142. The multi-objective performance metric 142 determined by the performance measurement engine 140 for a given candidate neural network architecture may combine the first performance metric 122 determined by the training engine 120 for the candidate neural network architecture with the second performance metric 132 determined by the target hardware deployment engine 130 for the candidate neural network architecture. As an example, in some implementations where the first performance metric 122 indicates the level of accuracy with which a given candidate neural network architecture may be able to perform a particular machine learning task, and the second performance metric 132 indicates the latency of performing the particular machine learning task by the candidate neural network architecture when deployed on a target set of hardware resources, the multi-objective performance metric 142 determined for the mth candidate neural network architecture selected by the controller 110 may combine accuracy and latency as follows:
[0045]
number
[0046] where ACCURACY(m) is the measured level of accuracy with which the mth candidate neural network architecture may be capable of performing a particular machine learning task as indicated by a first performance metric 122 determined by the training engine 120 for the mth candidate neural network architecture, and LATENCY Actual(m) is the measured latency of performing a particular machine learning task with the m-th candidate neural network architecture when deployed on a target set of hardware resources as indicated by a second performance metric 132 determined by the target hardware deployment engine 130 for the m-th candidate neural network architecture, where LATENCY Target (m) is the target or ideal latency for performing a particular machine learning task by the mth candidate neural network architecture when deployed on the target set of hardware resources, as determined based on known or estimated attributes of the target set of hardware resources, input provided by a user searching for neural network architectures (e.g., a target latency specified by the user), and / or current computing conditions, and ω is a factor used to determine the weight that latency performance is given in the multi-objective performance metric 142. In some examples, the value of ω may be adjustable. For example, in some of these examples, the value of ω may be determined based on input provided by a user searching for neural network architectures.
[0047] Similarly, for some implementations in which the first performance metric 122 and the second performance metric 132 indicate accuracy and latency, respectively, much as in the previous example, and the second performance metric 132 further indicates the computational intensity of a given candidate neural network architecture when deployed on a target set of hardware resources and the execution efficiency of the candidate neural network architecture when deployed on the target set of hardware resources, the multi-objective performance metric 142 determined for the mth candidate neural network architecture selected by the controller 110 may combine accuracy, latency, computational intensity, and execution efficiency as follows:
[0048]
number
[0049] Here, I Actual (m) is the measured computational intensity of the m-th candidate neural network architecture when deployed on the target set of hardware resources as indicated by a second performance metric 132 determined by the target hardware deployment engine 130 for the m-th candidate neural network architecture, and I Target (m) is the target or ideal computational intensity for the mth candidate neural network architecture when deployed on the target set of hardware resources, as determined based on known or estimated attributes of the target set of hardware resources, input provided by a user searching for a neural network architecture (e.g., a target computational intensity specified by the user), and / or current computational conditions; θ is a factor used to determine the weight that computational intensity is given in the multi-objective performance metric 142; E Actual (m) is the measured execution efficiency of the m-th candidate neural network architecture when deployed on the target set of hardware resources, as indicated by a second performance metric 132 determined by the target hardware deployment engine 130 for the m-th candidate neural network architecture, and E Target(m) is the target or ideal execution efficiency of the m-th candidate neural network architecture when deployed on the target set of hardware resources as determined based on known or estimated attributes of the target set of hardware resources, input provided by a user searching for neural network architectures (e.g., a target computational intensity specified by the user), and / or current computational conditions, and γ is a factor used to determine the weight given to execution efficiency in the multi-objective performance metric 142. Here, similar to the value of ω, in some examples, one or both of the value of θ and the value of γ may be adjustable. For example, in some of these examples, one or both of the value of θ and the value of γ may be determined based on input provided by a user searching for neural network architectures. It should be understood that terms may be inserted or deleted from the above formula as necessary depending on parameters indicated or not indicated by the second performance metric 132. For example, the formula governing the multi-objective performance metric 142 may omit latency and computational intensity terms in situations where the second performance metric 132 is determined based on execution efficiency (rather than latency and computational intensity). Other configurations for the multi-objective performance metric 142 are also feasible. More specifically, the values of ω, γ, and θ can be determined as respective values according to respective search requirements. One or more factors (e.g., latency, computation intensity, and execution efficiency) in the multi-objective performance metric 142 can be omitted by adjusting one or more values of ω, γ, and θ to zero.
[0050] As mentioned above, in some implementations, the multi-objective performance metric 142 may be provided to the controller 110, and in some such implementations may be utilized by the controller 110 to select additional candidate neural network architectures. In some examples, the system 100 uses the multi-objective performance metric 142 to update current values of controller parameters to improve the expected performance of the architecture defined by the outputs 112 generated by the controller 110 for the task. For example, the system 100 may update the controller parameters in a manner that maximizes the value of the multi-objective metric 142 (e.g., using a proximity policy optimization). In implementations in which the controller 110 includes a neural network, the multi-objective performance metric 142 may effectively function as a “reward” used to train the neural network of the controller 110. By repeatedly updating the values of the controller parameters in this manner, the system 100 can cause or train the controller 110 to ultimately produce an output 112 that results in a neural network with high performance for a particular task, i.e., to maximize the expected accuracy on the validation set 104 of the architecture proposed by the controller 110, as well as high performance when deployed on a target set of hardware resources, i.e., to maximize the speed at which the particular task is expected to be performed.
[0051] Once the controller 110 is trained (e.g., the controller parameters converge), the system 100 may select a final architecture for the neural network once the candidate architecture search space 111 has been exhausted, once a maximum number of candidate neural network architectures have been generated, once one or more candidate neural network architectures with a multi-objective performance metric 142 that satisfies one or more sets of criteria (e.g., one or more thresholds), and / or once some other termination criteria have been met. To select the final architecture, the system 100 may generate new outputs 112 according to the trained values of the controller parameters and use the architecture defined by the new outputs 112 as the final architecture for the neural network, or may generate multiple new outputs 112 according to the trained values and then select one of the multiple candidate neural network architectures defined by the multiple new outputs 112. In some examples, to select the one or more final architectures, the system 100 may select one or more candidate neural network architectures that yielded the maximum first performance metric 122, second performance metric 132, and / or multi-objective performance metric 142. In implementations in which multiple new outputs 112 are generated, system 100 can evaluate the performance of the architectures defined by each new output 112 on the validation set 104 and then select the best performing architecture (e.g., the candidate neural network architecture that yields a value of the all-purpose performance metric 142 that is greater than the values of all other candidate neural network architectures considered by system 100) as the final architecture. Alternatively, system 100 can further train each selected architecture and then evaluate the performance of each of the architectures after further training.
[0052] The neural network search system 100 can then output architecture data 150 that specifies the final architecture of the neural network, i.e., data specifying the layers that are part of the neural network, the connectivity between the layers, and the operations performed by the layers. For example, the neural network search system 100 can output the architecture data 150 to a user who submitted training data. In some cases, the data 150 also includes trained values for the parameters of the neural network from the training of a trained instance of the neural network that had the architecture.
[0053] In some implementations, instead of or in addition to outputting architecture data 150, system 100 trains an instance of a neural network having the determined architecture, e.g., from scratch or to fine-tune parameter values generated as a result of training an instance of a neural network having the architecture, and then uses the trained neural network to process requests received by a user, e.g., via an API provided by the system. That is, system 100 can receive inputs to be processed, process the inputs using the trained neural network, and provide outputs generated by the trained neural network or data derived from the outputs generated in response to the received inputs. In some examples, system 100 may select a final architecture using one or more of the techniques described above and then scale up the size of the architecture using model scaling techniques to generate the final architecture specified in data 150. In other examples, one or more systems may receive data 150 from system 100 and scale up the size of the architecture specified in data 150 using such model scaling techniques.
[0054] For some implementations in which the controller 110 includes a neural network such as an RNN, the system 100 may train the neural network of the controller 110 in a distributed manner. That is, the system 100 includes multiple replicas of the neural network of the controller 110. In some of these implementations in which training is distributed, each replica has a dedicated training engine that generates performance metrics for a batch of outputs 112 output by the replica, and a dedicated controller parameter update engine that uses the performance metrics to determine updates to the controller parameters. Once the controller parameter update engines determine updates, they can send the updates to a central parameter update server that is accessible to all of the controller parameter update engines. The central parameter update server can update values of the controller parameters maintained by the server and send the updated values to the controller parameter update engines. In some cases, each of the multiple replicas and their corresponding training engines and parameter update engines can operate asynchronously with each other set of training engines and parameter update engines.
[0055] In some examples, the final architecture selected for a neural network by system 100 and specified by architecture data 150 output by neural network search system 100 may be similar or equivalent to the final architecture of neural network architecture 200, as described in further detail below with reference to Figure 2. Such a final architecture for a neural network may be particularly well suited for deployment on one or more TPUs and / or GPUs.
[0056] 2 illustrates an example neural network architecture 200. More specifically, neural network architecture 200 includes an initial convolutional sub-network 210, a spatial-depth convolutional sub-network 220, and one or more additional sub-networks 230. As noted above, in some examples, neural network architecture 200 may correspond to a final neural network architecture selected by system 100 as described above with reference to FIG.
[0057] Neural network architecture 200 is designed for optimized performance when deployed on one or more TPUs, one or more GPUs, and / or one or more other matrix or vector machines. Thus, system 100 may be more likely to select a final neural network architecture that is similar or equivalent to neural network architecture 200 in situations where a target set of hardware resources associated with system 100 includes one or more TPUs and / or GPUs. Assuming that neural network architecture 200 may correspond to the final neural network architecture selected by system 100, the components of neural network architecture 200 may be configured to perform operations from a set or list of operations reflected in candidate architecture search space 111, as described above with reference to FIG. 1. Briefly, as described in more detail below, neural network architecture 200 is configured to receive and process network inputs 202 to generate network outputs 232 for network inputs 202 for a particular machine learning task. For example, the particular machine learning task that neural network architecture 200 is configured to perform may be an image processing task. In this example, the network input 202 may correspond to one or more images, i.e., data representing intensity values of pixels of the images. Examples of image processing tasks include image classification, object detection, image segmentation, etc.
[0058] The initial convolutional subnetwork 210 of the neural network architecture 200 may include one or more convolutional layers configured to receive the network input 202 and generate an initial feature representation 212 of the network input 202. The initial feature representation 212 of the network input 202 generated by the initial convolutional subnetwork 210 has a first spatial extent and a first number of depth channels. The initial convolutional subnetwork 210 may be configured to output the initial feature representation 212 of the network input 202 to the spatial-depth convolutional subnetwork 220.
[0059] The spatial-depth convolution sub-network 220 of the neural network architecture 200 may include one or more convolution layers configured to receive the initial feature representation 212 from the initial convolution sub-network 210 and perform a spatial-depth convolution operation on the initial feature representation 212 to generate a second feature representation 222 of the network input 202. The second feature representation 222 of the network input 202 generated by the spatial-depth convolution sub-network 220 has a second spatial extent smaller than the first spatial extent and a second number of depth channels larger than the first number of depth channels. In other words, the spatial-depth convolution operation performed by the spatial-depth convolution sub-network 220 increases the depth of the input tensor while decreasing the spatial extent of the input tensor. By reshaping the input tensor for convolution in this manner, this operation may serve to improve parallelism in the accelerator (e.g., TPU and / or GPU). In addition, the operations may also play a role in benefiting the capacity and accuracy of the neural network architecture. Such operations may represent operations from the set or list of operations reflected in the candidate architecture search space 111 (e.g., “accelerator-friendly” operations), as described above with reference to FIG.
[0060] In some implementations, the spatial-depth convolution operations performed by the spatial-depth convolution subnetwork 220 are n×n convolutions with stride-n (e.g., convolutions with an n×n kernel), where n represents an integer value greater than 1, such as 2 or 4. Such operations convert a H×W×C tensor into
[0061]
number
[0062] Importantly, this operation increases depth without changing the total tensor volume, such that the overall speed may be improved without compromising accuracy. Although the input tensor may be reshaped in a similar manner using a spatial-batch operation or other reshaping operation that modifies the shape of the input tensor by performing one or more memory operations, the spatial-depth convolution operation performed by the spatial-depth convolution sub-network 220 has two advantages: (i) convolutions are associated with relatively high computational intensity and execution efficiency, which translates favorably to deployment on TPUs and / or GPUs, and (ii) in addition to reshaping the input tensor to improve computational intensity and execution efficiency, the n×n convolution with stride n may also be trained to contribute to the capacity of the corresponding neural network. This operation may be trained to mimic the behavior of a spatial-batch operation or other reshaping operation that modifies the shape of the input tensor by performing one or more memory operations, and may be further trained to improve the accuracy of the neural network architecture while improving its speed by increasing parallelism.
[0063] The spatial-depth convolutional subnetwork 220 may be configured to output a second feature representation 222 of the network input 202 to one or more additional subnetworks 230 of the neural network architecture 200. The one or more subnetworks 230 of the neural network architecture 200 may include one or more layers (e.g., convolutional layers) configured to receive the second feature representation 222 from the spatial-depth convolutional subnetwork 220 and generate a network output 232 for the network input 202.
[0064] 3 is a flow diagram of an example process 300 for determining an architecture for a task neural network configured to perform a particular machine learning task when deployed on a target set of hardware resources. For convenience, the process 300 will be described as being performed by one or more computer systems located at one or more locations. For example, a neural architecture search system, such as the neural architecture search system 100 of FIG. 1, suitably programmed in accordance with this specification, may perform the process 300.
[0065] The system receives training data for performing a particular machine learning task (step 302). For example, this may correspond to the system 100 receiving the training data 102 and / or the validation set 104, as described above with reference to Figure 1. In some examples, the particular machine learning task may correspond to an image processing task.
[0066] The system uses the training data to perform a search in a space of candidate neural network architectures to identify one or more candidate neural network architectures (step 304). For example, this may correspond to controller 110 of system 100 performing a search in candidate architecture search space 111, as described above with reference to FIG. 1. As described above, to select a candidate neural network architecture and / or to generate an output specifying such a candidate neural network architecture, controller 110 may use any of a wide variety of NAS techniques, such as NAS techniques based on reinforcement learning, evolutionary search, differentiable search, etc. In some implementations, to perform the operations of step 304, the system iteratively executes process 400, as described in further detail below with reference to FIG.
[0067] 4 is a flow diagram of an example process 400 illustrating an iteration of a process for performing a search within a space of candidate neural network architectures to identify one or more candidate neural network architectures. For convenience, the process 400 will be described as being performed by one or more computer systems located at one or more locations. For example, a neural architecture search system, such as the neural architecture search system 100 of FIG. 1, suitably programmed in accordance with the present disclosure, may perform the process 400. As discussed above, in some implementations, the system performs the process 400 iteratively as part of step 304 of process 300.
[0068] The system selects a candidate neural network architecture from the space of candidate neural network architectures (step 402). For example, this may correspond to the controller 110 of the system 100 selecting a candidate neural network architecture from the candidate architecture search space 111, as described above with reference to FIG. 1. More specifically, in step 402, the system selects, for each of one or more components of the candidate neural network architecture, an operation to be performed by the respective component from a set of operations including a space-depth convolution operation. The space-depth convolution operation included in the set of operations may be an operation that increases the depth of an input tensor while decreasing the spatial extent of the input tensor. In addition, the set of operations may further include one or more other types of convolution operations. For example, the set of operations may correspond to operations reflected in the candidate architecture search space 111, as described above with reference to FIG. 1, which may include operations specific to a target set of hardware resources that the candidate neural network architecture is intended to serve to operate or function to take advantage of some attributes of the target set of hardware resources. In some examples, a space-depth convolution operation may represent one example of such an operation. In some implementations, the space-depth convolution operation may be an n×n convolution with stride −n, where n is an integer value greater than 1. For example, in some such implementations, the space-depth convolution operation may be a 2×2 convolution with stride −2. As mentioned above, this operation may be advantageously deployed on a hardware accelerator to modify the shape of the input tensor. It is well known that a reshaping operation to increase channel depth can result in a faster computation rate (Op / sec) for the convolution, and such a reshaping operation can increase computation speed without affecting computation accuracy.The approach of using stride-2 2×2 convolutions as an alternative to reshaping operations is advantageous because it allows convolutions to be efficiently computed with high computational intensity on a TPU. In addition, the system can also train stride-2 2×2 convolutions given a training set to improve model capacity and mimic substantially the same tensor reshaping operations. In some implementations, the set of operations may further include one or more reshaping operations each modifying the shape of an input tensor by performing one or more memory operations in one or more memories of the target set of hardware resources. For example, such one or more memory operations (e.g., spatial-batch operations) may include one or more operations each reshaping an input tensor by moving elements of the input tensor to various memory locations in one or more memories of the target set of hardware resources, or by copying elements from one memory location to another, or both. As a particular example, the one or more operations may include one or more operations that depthwise rearrange blocks of spatial data. More specifically, each of these one or more operations may output a copy of an input tensor that moves values from the height and width dimensions to the depth dimension.
[0069] In some examples, the system selects a candidate neural network architecture from the space of candidate neural network architectures based at least in part on the performance measures determined for one or more preselected candidate neural network architectures (step 402). For example, this may correspond to the controller 110 selecting a k-th candidate neural network architecture from the candidate architecture search space 111 based at least in part on the multi-objective performance metric 142 determined for the (k-1)-th candidate neural network architecture selected by the controller 110, the multi-objective performance metric 142 determined for the (k-2)-th candidate neural network architecture selected by the controller 110, etc., as described above with reference to FIG.
[0070] The system determines a measure of performance for the selected candidate neural network architecture based on its (i) performance on the particular machine learning task and (ii) performance when deployed on the target set of hardware resources (step 404). For example, this may correspond to performance measurement engine 140 determining a multi-objective metric 142 for the candidate neural network architecture selected by controller 110, as described above with reference to FIG.
[0071] Further, in some examples, (i) the performance of the selected candidate neural network with respect to a particular machine learning task may correspond to the performance of the selected candidate neural network architecture as reflected in the first performance metric 122 determined by the training engine 120 for the selected candidate neural network architecture. Thus, in some implementations, the process 400 includes one or more additional steps in which the system trains the candidate neural network with training data. For example, this may correspond to the training engine 120 training an instance of the selected candidate neural network architecture with the training data 102 and / or the validation set 104, as described above with reference to FIG. 1. In some examples, such one or more additional steps may be performed after step 402, but may also be performed before step 404.
[0072] Similarly, in some examples, (ii) the performance of the selected candidate neural network when deployed on the target set of hardware resources may correspond to the performance of the selected candidate neural network architecture as reflected in a second performance metric 132 determined by the target hardware deployment engine 130 for the selected candidate neural network architecture. Thus, in some implementations, the process 400 includes one or more additional steps in which the system executes the trained instance of the candidate neural network on the target set of hardware resources. For example, this may correspond to the target hardware deployment engine 130 executing the trained instance of the candidate neural network on the target set of hardware resources associated with the system 100, as described above with reference to FIG. 1. In some implementations, the target set of hardware resources may correspond to one or more TPUs, GPUs, other matrix or vector machines, or a combination thereof.
[0073] In some implementations, (ii) the performance of the selected candidate neural network architecture when deployed on the target set of hardware resources is based at least in part on a latency of generating an output using the selected candidate neural network architecture when deployed on the target set of hardware resources. For example, such a latency may correspond to a latency of the selected candidate neural network architecture measured by the target hardware deployment engine 130 when the target hardware deployment engine 130 executes the selected candidate neural network architecture on the target set of hardware resources and reflected in a second performance metric 132 determined by the target hardware deployment engine 130 for the selected candidate neural network architecture.
[0074] In some implementations, (ii) the performance of the selected candidate neural network architecture when deployed on the target set of hardware resources is based at least in part on a computational intensity of the selected candidate neural network architecture when deployed on the target set of hardware resources. For example, such computational intensity may correspond to a computational intensity of the selected candidate neural network architecture as measured by the target hardware deployment engine 130 when the target hardware deployment engine 130 executes the selected candidate neural network architecture on the target set of hardware resources and reflected in a second performance metric 132 determined by the target hardware deployment engine 130 for the selected candidate neural network architecture. In some examples, such computational intensity corresponds to the "I" parameter, as described above with reference to FIG. 1.
[0075] In some implementations, (ii) the performance of the selected candidate neural network architecture when deployed on the target set of hardware resources is based at least in part on an execution efficiency of the selected candidate neural network architecture when deployed on the target set of hardware resources. For example, such execution efficiency may correspond to an execution efficiency of the selected candidate neural network architecture as measured by the target hardware deployment engine 130 when the target hardware deployment engine 130 executes the selected candidate neural network architecture on the target set of hardware resources and reflected in a second performance metric 132 determined by the target hardware deployment engine 130 for the selected candidate neural network architecture. In some examples, such execution efficiency corresponds to the “E” parameter, as described above with reference to FIG. 1.
[0076] Referring again to Figure 3, in step 306, the system generates an architecture for a task neural network configured to perform a particular task using the identified candidate neural network architectures. For example, this may correspond to system 100 generating data for output 150, as described above with reference to Figure 1. In some examples, this may correspond to system 100, or another system in communication with system 100, scaling up the size of the selected final architecture using model scaling techniques to generate an architecture for the task neural network.
[0077] In some implementations, process 300 includes one or more additional steps in which the system uses a task neural network having the generated architecture to perform a specific machine learning task on new inputs. For example, this may correspond to one or more systems using a neural network reflected in data 150 as described above with reference to Figure 1, or a neural network having an architecture similar or equivalent to neural network architecture 200 as described above with reference to Figure 2, performing a specific machine learning task. For example, such a task may correspond to an image processing task.
[0078] In some implementations, the process 300 includes one or more additional steps of providing data specifying the generated architecture for use by the system in performing a particular machine learning task. For example, this may correspond to the system 100 providing data 150 for output, as described above with reference to FIG.
[0079] 5 is a flow diagram of an exemplary process 500 for using a task neural network to generate an output for a network input for a particular machine learning task. For convenience, the process 500 will be described as being performed by one or more computer systems located at one or more locations. For convenience, the process 500 will be described as being performed by one or more computer systems located at one or more locations. For example, a system in which a neural network having an architecture similar or equivalent to the neural network architecture 150 of FIG. 1 and / or the neural network architecture 200 of FIG. 2 is deployed can be suitably programmed in accordance with this specification and perform the process 500.
[0080] The system receives a network input (step 502). For example, this may correspond to the system receiving network input 202, as described above with reference to FIG. 2. The system processes the network input using a task neural network to generate an output for the network input for a particular machine learning task (steps 504-508). For example, this may correspond to the system generating a network output 232 for the network input 202 using a task neural network having an architecture similar or equivalent to neural network architecture 200, as described above with reference to FIG. 2.
[0081] More specifically, in step 504, the system uses the task neural network to generate initial feature representations of the network inputs 202. For example, this may correspond to using the initial convolutional sub-network 210 to generate initial feature representations 212 of the network inputs 202, as described above with reference to FIG.
[0082] In step 506, the system performs a spatial-depth operation on the initial feature representation using the task neural network to generate a second feature representation of the network input. For example, this may correspond to generating a second feature representation 222 of the network input 202 based on the initial feature representation 212 using a spatial-depth convolution sub-network 220, as described above with reference to FIG. 2. In some implementations, the spatial-depth convolution operation may be an n×n convolution with stride −n, where n is an integer value greater than 1. For example, in some such implementations, the spatial-depth convolution operation may be a 2×2 convolution with stride −2. As described above, this operation may be advantageously deployed on a hardware accelerator to modify the shape of the input tensor.
[0083] The system then processes the second feature representation with the task neural network to generate an output for the network input, at step 508. For example, this may correspond to generating a network output 232 based on the second feature representation 222 using one or more additional sub-networks 230, as described above with reference to FIG.
[0084] In some examples, the one or more additional sub-networks may include one or more convolutional layers. In some implementations, processing the network input with the task neural network includes processing the network input with the task neural network with a set of one or more hardware accelerators. In at least some of these implementations, the one or more sets of hardware may include one or more tensor processing units (TPUs), one or more graphics processing units (GPUs), or a combination thereof.
[0085] This specification uses the term "configured" in reference to systems and computer program components. When we say that one or more computer systems are configured to perform a particular operation or action, we mean that the system has installed thereon software, firmware, hardware, or a combination thereof that, when run, causes the system to perform the operation or action. When we say that one or more computer programs are configured to perform a particular operation or action, we mean that the one or more programs contain instructions that, when executed by a data processing device, cause the device to perform the operation or action.
[0086] The subject matter and embodiments of the functional operations described herein may be implemented in digital electronic circuitry, in tangibly embodied computer software or firmware, in computer hardware including the structures disclosed herein and their structural equivalents, or in any combination of one or more of them. The subject matter described herein may be implemented as one or more computer programs, i.e., as one or more modules of computer program instructions encoded on a tangible, non-transitory storage medium for execution by or for controlling the operation of a data processing apparatus. The computer storage medium may be a machine-readable storage device, a machine-readable storage substrate, a random or serial access memory device, or a combination of one or more of these. Alternatively or additionally, the program instructions may be encoded in an artificially generated propagated signal, e.g., a machine-generated electrical, optical, or electromagnetic signal, generated to encode information that is transmitted to a suitable receiver device for execution by the data processing apparatus.
[0087] The term "data processing apparatus" refers to data processing hardware and encompasses any type of apparatus, device, and machine for processing data, including, by way of example, a programmable processor, computer, or multiple processors or computers. The apparatus may also be and include special purpose logic circuitry, such as a field programmable gate array (FPGA), application-specific integrated circuit (ASIC). In addition to hardware, the apparatus may optionally include code that creates an execution environment for computer programs, such as code that constitutes a processor firmware, a protocol stack, a database management system, an operating system, or a combination of one or more of these.
[0088] A computer program (which may also be referred to or described as a program, software, software application, app, module, software module, script or code) may be written in any form of programming language, including compiled or interpreted languages, or declarative or procedural languages, and may be deployed in any form as a stand-alone program or as a module, component, subroutine or other unit suitable for use in a computing environment. A program may correspond to a file in a file system, but does not necessarily have to. A program may be stored as part of a file that holds other programs or data (e.g., one or more scripts stored in a markup language document), in a single file dedicated to the program, or in multiple coordinated files (e.g., a file that stores one or more modules, subprograms, or portions of code). A computer program may be deployed to run on one computer or on multiple computers located at one site or distributed across multiple sites and interconnected by a data communication network.
[0089] As used herein, the term "database" is used broadly to refer to any collection of data, which need not be or need not be structured in any particular way and which may be stored on storage devices in one or more locations. Thus, for example, an index database may contain multiple collections of data. Each of these multiple collections may be organized and accessed in various ways.
[0090] Similarly, the term "engine" is used broadly herein 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 may be dedicated to a particular engine, while in other cases, multiple engines may be installed and executed on the same computer or multiple computers.
[0091] The processes and logic flows described herein may be performed by one or more programmable processors executing one or more computer programs to perform functions by operating on input data and generating output. The processes and logic flows may also be performed by special purpose logic circuitry, such as an FPGA or an ASIC, or a combination of special purpose logic circuitry and one or more programmed computers.
[0092] A computer suitable for running a computer program may be based on a general-purpose microprocessor, a special-purpose microprocessor, or both, or on any other type of central processing unit. In general, the central processing unit will receive instructions and data from a read-only memory or a random access memory, or both. The essential elements of a computer are a central processing unit for executing or implementing instructions, and one or more memory devices for storing instructions and data. The central processing unit and memory may be supplemented by, or incorporated in, special-purpose logic circuitry. In general, a computer may also include one or more mass storage devices, such as magnetic disks, magneto-optical disks, or optical disks, for storing data, or be operatively coupled to receive data from, or transfer data to, the one or more mass storage devices. However, a computer need not have such devices. Additionally, a computer may be embedded in another device, such as a mobile phone, a personal digital assistant (PDA), a portable 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.
[0093] Computer readable media suitable for storing computer program instructions and data include all forms of non-volatile memory, media and memory devices, examples of which include 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-ROM and DVD-ROM disks.
[0094] To enable interaction with a user, embodiments of the subject matter described herein may be implemented on a computer having a display device, such as a cathode ray tube (CRT) or liquid crystal display (LCD) monitor, for displaying information to the user, and a keyboard and pointing device, such as a mouse or trackball, for enabling the user to provide input to the computer. Other types of devices may be used to enable interaction with the user, for example, feedback provided to the user may be in the form of any form of sensory feedback, such as visual, auditory or tactile feedback, and input from the user may be received in any form, including acoustic, speech or tactile input. In addition, the computer may interact with the user by sending and receiving documents to and from a device used by the user, for example by sending a web page to a web browser on the user's device in response to a request received from the web browser. The computer may also 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 receiving a response message from the user in return.
[0095] A data processing device for implementing machine learning models may also include, for example, a dedicated hardware accelerator unit for handling common and computationally intensive parts of machine learning training or creation (i.e., the inference workload).
[0096] The machine learning model can be implemented and deployed using a machine learning framework, for example, the TensorFlow framework, the Microsoft® Cognitive Toolkit framework, the Apache Singa framework, or the Apache MXNet framework.
[0097] An embodiment of the subject matter described herein may be implemented in a computing system that includes a back-end component, e.g., a data server, or includes a middleware component, e.g., an application server, or includes a front-end component, e.g., a client computer having a graphical user interface, web browser, or app that allows a user to interact with an implementation of the subject matter described herein, or includes any combination of one or more such back-end, middleware, or front-end components. The components of the system may be interconnected by any form or medium of digital data communication, e.g., a communication network. Examples of communication networks include local area networks (LANs) and wide area networks (WANs), e.g., the Internet.
[0098] A computing system may include clients and servers. Clients and servers are generally remote from each other and typically interact through a communication network. The relationship of client and server arises by virtue of computer programs running on the respective computers and having a mutual relationship between clients and servers. In some embodiments, a server sends data, e.g., HTML pages, to a user device, e.g., for the purpose of displaying the data to and receiving user input from a user interacting with the device functioning as a client. Data generated at the user device, e.g., results of user interaction, can be received from the device at the server.
[0099] Although the specification contains many specific implementation details, these should not be construed as limiting the scope of any invention or what may be claimed, but rather as descriptions of features that may be specific to particular embodiments of a particular invention. Certain features described in this specification in the context of separate embodiments 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 in multiple embodiments separately or in any suitable subcombination. Furthermore, although features may be described above as acting in a particular combination, and may even be initially claimed as such, one or more features of a claimed combination may, in some cases, be deleted from the combination, and the claimed combination may be directed to a subcombination or a variation of the subcombination.
[0100] Similarly, although operations are shown in the figures and recited in the claims in a particular order, this should not be understood as requiring that such operations be performed in the particular order or sequential order shown to achieve desirable results, or that all of the operations shown must be performed to achieve desirable results. In certain situations, multitasking and parallel processing may be advantageous. Furthermore, the separation of various system modules and components in the above-described embodiments should not be understood as requiring such separation in all embodiments, and it should be understood that the program components and systems described may generally be integrated into a single software product or packaged in multiple software products.
[0101] Specific embodiments of the subject matter have been described. Other embodiments are within the scope of the appended claims. For example, the actions recited in the claims may be performed in a different order and still achieve desirable results. As an example, the processes depicted in the appended figures do not necessarily require the particular order shown, or sequential order, to achieve desirable results. In some cases, multitasking and parallel processing may be advantageous.
Claims
1. 1. A method for determining an architecture for a task neural network configured to perform a particular machine learning task when deployed on a target set of hardware resources, the hardware resources comprising a plurality of hardware accelerators for performing the particular machine learning task, the method comprising: receiving training data for performing the particular machine learning task, the neural architecture search system; and performing a search within a space of candidate neural network architectures using the training data to identify one or more candidate neural network architectures, the performing a search comprising iteratively performing the following steps: the neural architecture search system includes a step of selecting a candidate neural network architecture from the space, the step of selecting the candidate neural network architecture includes a step of selecting, for each of one or more components of the candidate neural network architectures, an operation to be performed by the component from a set of operations in the space including: (1) a spatial-depth convolution operation that increases a depth C of an input tensor having dimensions H×W×C while decreasing a spatial extent H×W of the input tensor; and (2) one or more other types of convolution operations, the spatial-depth convolution operation increasing the depth C to a second number of depth channels of the input tensor that is greater than a first number of depth channels of the input tensor, the spatial-depth convolution operation improving parallelism of the plurality of hardware accelerators, the following steps further comprising: The neural architecture search system includes determining a measure of performance of the selected candidate neural network architectures, the determining step comprising: training a neural network having the selected candidate neural network architecture with the training data; determining a first performance metric representing a level of accuracy based on the performance of the trained neural network having the selected candidate neural network architecture with respect to the particular machine learning task; and determining a second performance metric representative of a level of latency based on a performance of the trained neural network having the selected candidate neural network architecture when deployed on the target set of hardware resources, the level of latency being based on an actual latency and a target latency, the actual latency being a measured latency of performing the particular machine learning task by the trained neural network when deployed on the plurality of hardware accelerators, and the target latency being an ideal latency of performing the particular machine learning task by the trained neural network when deployed on the plurality of hardware accelerators, the determining step further comprising: determining a measure of performance of the selected candidate neural network architecture based on a combined metric of the first performance metric representative of the level of accuracy and the second performance metric representative of the level of latency; The method further comprises: The neural architecture search system includes generating a final architecture for the task neural network using the identified candidate neural network architectures, the final architecture including one or more components that perform the spatial-depth convolution operation, the method further comprising: the neural architecture search system executing the task neural network having the final architecture on the multiple hardware accelerators to perform the particular machine learning task.
2. 2. The method of claim 1, wherein the neural architecture search system further comprises: performing the specific machine learning task on new inputs using the task neural network having the generated final architecture.
3. 3. The method of claim 1 or 2, further comprising providing the neural architecture search system with data specifying the generated final architecture for use in performing the particular machine learning task.
4. The method of any one of claims 1 to 3, wherein the spatial-depth convolution is an nxn convolution with stride-n, where n is an integer value greater than 1.
5. 5. The method of claim 1, wherein the operations further include one or more reshaping operations, each of which modifies a shape of an input tensor by the neural architecture search system performing one or more memory operations in one or more memories of the target set of hardware resources.
6. 6. The method of claim 1, wherein the performance of the selected candidate neural network architecture when deployed on the target set of hardware resources is based at least in part on a latency of generating an output with the selected candidate neural network architecture when deployed on the target set of hardware resources.
7. 6. The method of claim 1, wherein the measure of performance of the selected candidate neural network architecture when deployed on the target set of hardware resources is based at least in part on the computational intensity of the selected candidate neural network architecture when deployed on the target set of hardware resources.
8. 6. The method of claim 1, wherein the measure of performance of the selected candidate neural network architecture when deployed on the target set of hardware resources is based at least in part on a execution efficiency of the selected candidate neural network architecture when deployed on the target set of hardware resources, the execution efficiency being a computation rate achieved by the candidate neural network architecture divided by an ideal computation rate achieved by the candidate neural network architecture.
9. The method of any one of claims 1 to 8, wherein the plurality of hardware accelerators are located within a data center.
10. 10. The method of claim 9, wherein the multiple hardware accelerators include one or more tensor processing units (TPUs), one or more graphics processing units (GPUs), or a combination thereof.
11. After selecting the candidate neural network architecture from the space, the neural architecture search system further comprises training an instance of the selected candidate neural network architecture using the training data, and determining the performance measure of the selected candidate neural network architecture comprises: The method of any one of claims 1 to 10, wherein the neural architecture search system further comprises determining a measure of performance of the trained instances of the selected candidate neural network architectures.
12. 12. The method of claim 11, wherein the neural architecture search system further comprises running the trained instance of the selected candidate neural network architecture on the target set of hardware resources, and wherein the performance of the selected candidate neural network architecture when deployed on the target set of hardware resources comprises a performance of the trained instance of the selected candidate neural network architecture on the target set of hardware resources when run on the target set of hardware resources.
13. The step of selecting the candidate neural network architecture from the space comprises:
13. The method of claim 1, wherein the neural architecture search system comprises selecting a candidate neural network architecture from the space based at least in part on one or more measures of performance of each of one or more pre-selected candidate neural network architectures.
14. A program causing at least one processor to carry out the method according to any one of claims 1 to 13.
Citation Information
Patent Citations
Domain specific language for generation of recurrent neural network architectures
JP2018195314A
Information processing method and information processing system
JP2019096285A
CNN-based learning method and learning device selecting useful learning data, and testing method and testing device using the same
JP2020068028A
Neural Architecture Search with Factorized Hierarchical Search Space
US20200143227A1