Cross-batch normalization

By introducing a cross batch normalization layer in neural network training, synchronizing the normalization statistical information of global batches, the problem of inconsistency in normalization between local batches is solved, and the stability and accuracy of training are improved.

JP7655906B2Active Publication Date: 2025-04-02ZOOX INC
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
JP2022521710
Authority / Receiving Office
JP · JP
Patent Type
Patents
Current Assignee / Owner
Priority Date
2019-10-15
Filing Date
2020-10-15
Publication Date
2025-04-02
Estimated Expiration
2040-10-15

AI Technical Summary

Technical Problem

When training neural networks, normalization inconsistency among local batches leads to uneven parameter adjustments, affecting training efficiency and accuracy.

Method used

The cross-batch normalization layer is introduced, and the input of local batches is normalized by synchronizing the normalized statistics of global batches to ensure the consistency of each local batch during the training process.

Benefits of technology

It effectively reduces the differences between batches, improves the stability and accuracy of training, and shortens the training time.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure 0007655906000044
    Figure 0007655906000044
  • Figure 0007655906000045
    Figure 0007655906000045
  • Figure 0007655906000046
    Figure 0007655906000046
Patent Text Reader

Abstract

Techniques for training machine learning models are described herein. For example, the techniques may include implementing a cross-batch normalization layer that generates a cross-batch normalization layer output based on a first layer output during training of a neural network. The training may be based on a local batch of training examples of a global batch that includes the local batch of training examples and at least one remote batch. The cross-batch normalization layer output may include a normalized component of the first layer output determined based on a global normalization statistic for the global batch. The above techniques may be used to train a neural network across distributed machines by synchronizing batches between the machines.
Need to check novelty before this filing date? Find Prior Art

Description

[Background technology]

[0001] This PCT international patent application claims the benefit of priority to U.S. patent application Ser. No. 16 / 653,656, filed Oct. 15, 2019, the disclosure of which is incorporated by reference in its entirety herein.

[0002] Machine learning algorithms, such as neural networks, often learn to perform a task by considering training data. For example, image data previously associated with a classification may be fed into an artificial neural network to train the neural network to recognize the classification. Such neural networks often use 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 an input to the next layer of 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 its respective parameters.

[0003] The detailed description is set forth with reference to the accompanying drawings, in which the left-most digit(s) of a reference number identifies the drawing in which the reference number first appears. Use of the same reference number in different drawings indicates similar or identical components or features. [Brief description of the drawings]

[0004] [Figure 1] FIG. 1 illustrates an example environment in which the techniques described herein may be implemented. [Diagram 2] 1 illustrates a block diagram of an example system for implementing the techniques described herein. [Diagram 3] FIG. 1 illustrates an example neural network system that utilizes cross-batch normalization during training of the neural network. [Figure 4]FIG. 4A shows an example process for generating outputs of a cross-batch normalization layer during training of a neural network on a global batch of training examples, and FIG. 4B shows an example process for training a neural network including a cross-batch normalization layer on a global batch of training examples. [Diagram 5] FIG. 1 illustrates an example process for training a neural network including a cross-batch normalization layer in the context of an autonomous vehicle use case. DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS

[0005] The present disclosure is directed to techniques for training machine learning algorithms. For example, the techniques may be used to train neural networks in parallel across multiple computing devices. More specifically, the systems and techniques disclosed herein may take into account synchronization of normalization statistics between local batches of inputs in a cross batch normalization layer for a global batch of inputs that includes multiple local batches.

[0006] Each layer of a neural network may generate an output from a received input (e.g., either the initial input to the neural network or an input from a previous layer). Some or all of the neural network layers may generate an output from the input according to the current values ​​of a set of parameters for the neural network layer. For example, some layers may multiply the received input by a matrix of current parameter values ​​as part of generating an output from the received input.

[0007] The output is then output or passed to the next layer of the neural network, which thus collectively process the neural network inputs received by the neural network system to generate a respective neural network output for each received neural network input.

[0008] In many examples, artificial neural networks may be trained to perform one or more tasks. Some examples of machine learning models that may be trained may include neural networks that may classify objects in image data, identify emergency vehicles in audio data, generate bounding boxes from lidar data, predict the location of an object, determine when to purchase an airline ticket, identify cancer in a tissue sample, etc.

[0009] The training includes forward propagation and backward propagation. In forward propagation of an artificial neural network, data may be input to the artificial neural network to calculate activations of each layer in the artificial neural network, and finally output. Then, during back propagation (also referred to as backward pass or backward propagation), an error representing the difference between the output and a desired output (e.g., ground truth) may be propagated backwards through the layers of the artificial neural network to adjust (e.g., using gradient descent) the current values ​​of a set of parameters for the neural network layer. Backward propagation may include performing one or more gradient operations associated with one or more operations of forward propagation to generate one or more gradients.

[0010] As mentioned above, the systems and techniques disclosed herein relate to neural networks that may include one or more cross batch normalization layers. A collection of local batches of training samples processed by a neural network may be referred to herein as a batch of training samples or a global batch. A batch normalization layer according to the new disclosure may operate to normalize a local batch of inputs (also referred to herein as a current batch or a mini-batch) using global normalization statistics generated from the global batch of inputs in the cross batch normalization layer. More specifically, the present specification describes synchronization of global normalization statistics between local batches of inputs, in some examples, between local batches input in parallel with a distributed training pipeline. For example, the distributed training pipeline described above may include multiple Graphics Processing Units (GPUs) operating collectively to train a neural network with a training data set. In some examples, each of the GPUs may receive a local batch of training samples selected from the entire training data set. Each GPU may then input its respective local batch of training data as training data into its local copy of the neural network.

[0011] Local batches of inputs may vary due to differences in the training examples included in each local batch. For example, training data may include a set of data, e.g., images with ground truth labels. Due to limitations in working memory (e.g., GPU memory size), batches may include randomly sampled elements from the set of training data. For example, each local batch may include 10 or 20 images randomly selected from the entire training set. As noted above, in one example, images in a first local batch may include more cars than images in a second local batch. Due to variation in batches, without normalization between local batches, training may result in differences in parameters that may be backpropagated. Normalizing helps minimize variation between batches, reduces the chance of unwieldy large numbers of activations, and / or ensures consistency in learning.

[0012] Specifically, the cross-batch normalization layer may perform two general functions during training. First, during forward propagation, the cross-batch normalization layer may normalize a local batch of inputs to a global batch of training samples. Then, the normalized local batch of inputs may be input to the layer following the cross-batch normalization layer. Second, during backpropagation, the output of the neural network may be used to adjust the values ​​of the parameters of the neural network layers in the sequence, for example, through gradient descent and backpropagation neural network training techniques. More specifically, the normalized statistics from forward propagation may be backpropagated through as part of adjusting the values ​​of the parameters of the neural net, such as part of performing a backpropagation training technique.

[0013] In some examples, to normalize the inputs of the local batches, the cross batch normalization layer may (1) calculate a local batch variance for the local batches, (2) calculate a local batch variance for the local batches, (3) distribute local statistics (e.g., means and variances) or local intermediate values ​​based on the local statistics, (4) receive remote statistics or remote intermediate values ​​from other processors that run the cross batch normalization layer, (5) calculate a global batch mean and global batch variance based on the local and remote statistics or intermediate values, (6) normalize the local inputs using the global batch mean and global batch variance, and (7) scale and shift the local inputs that have been normalized by global scale and shift parameters.

[0014] In some examples, the global variance may be determined based on an aggregation of the difference between the sum of the local batch variances and the squared local batch means and the squared global batch mean. In examples where the local batches vary in size, the sum may be weighted.

[0015] The following example considers the determination of global batch variance when the shared values ​​or cross-batch data includes local batch means and local batch variances. To determine the local batch mean for the current local batch (i), we use the local batch mean μ i may be calculated as follows:

[0016]

number

[0017] However, n iis the count of the i-th local batch,

[0018]

number

[0019] is the jth input from the previous layer for the ith local batch.

[0020] Similarly, local batch distribution

[0021]

number

[0022] may be calculated as follows:

[0023]

number

[0024] The cross-batch normalization layer may determine and share cross-batch data for use in determining the global batch mean and global batch variance.

[0025] If the local batch means and local batch variances are distributed, then the global batch mean μ may be calculated as follows:

[0026]

number

[0027] However, p i is the relative size of the current local batch(i) (e.g., the ratio of the count of the current local batch(i) to the total count of the global batch).

[0028] Next, a global batch variance may be determined. For example, the global batch variance (e.g., σ2 ) may be determined as follows:

[0029]

number

[0030] Additional details and variants on the forward propagation and backpropagation phases of operation of the cross batch normalization layer are provided below with reference to the following figures:

[0031] In examples, the cross batch normalization techniques described herein may provide higher accuracy without sacrificing training speed when compared to other training techniques that do not use a batch normalization scheme. Additionally, in some examples, the cross batch normalization techniques described herein may reduce training time by training in parallel, improve accuracy by exchanging normalized data, reduce data to be exchanged during normalization by simplifying the data exchanged, and / or provide the ability to train on different sized batches (and different types of GPUs) by incorporating the size of the batch as a parameter. Additionally, the above techniques allow for training networks based on larger data sets (thereby creating a more robustly learned network in a smaller amount of time) that would not otherwise be possible due to limitations in, for example, memory, processing power, etc.

[0032] The methods, apparatus, and systems described herein can be implemented in many ways. Exemplary implementations are provided below with reference to the following drawings. Although described in some examples below in the context of an autonomous vehicle, the methods, apparatus, and systems described herein can be applied to a variety of systems. In one example, machine-learned models may be utilized in a driver-controlled vehicle, where the system may provide an indication of whether it is safe to perform various maneuvers. In another example, the methods, apparatus, and systems may be utilized in a flight or navigation context. Additionally or alternatively, the techniques described herein can be used with real data (e.g., captured using a sensor(s)), simulated data (e.g., generated by a simulator), or any combination.

[0033] FIG. 1 illustrates an example environment 100 in which the techniques described herein may be implemented. In particular, the environment 100 includes a computing device(s) 102 including a first processing unit 104, a second processing unit 106, and a memory 108 associated with the second processing unit 106. The first processing unit 104 (e.g., a processor(s) 110 associated with the first processing unit 104) and the second processing unit 106 may each include one or more GPUs, one or more CPUs, one or more tensor processing units, one or more neural processing units, one or more digital signal processors, etc. In many examples, the first processing unit 104 is implemented as a G,PU and the second processing unit 106 is implemented as a CPU, although other configurations may be used. As illustrated, the first processing unit 104 may include a processor(s) 110 and a memory 112. The memory 112 may store a training component 114 and an inference component 116 executable by the processor(s) 110. Additionally, although the first processing unit 104 and the second processing unit 106 are depicted in FIG. 1 as belonging to the same computing device 102, the above depiction is for illustrative purposes as the processing units may be separate units that may or may not be local.

[0034] In general, the computing device 102 may be part of a distributed learning pipeline of multiple computing devices that train a neural network in parallel based on local batches of training examples of a global batch. During parallel training, cross-batch data may be shared between the computing devices and used for batch normalization. However, in other examples, the computing device 102 may operate alone to train a neural network by processing local batches in sequence while performing batch normalization between the local batches. The following description focuses on parallel use cases, with additional explanations as necessary for sequential use cases.

[0035] The training component 114 may be executed by the processor(s) 110 to train the neural network 118 (also referred to as “artificial neural network 118”) based on the training data 120. The training data 120 may include various data, such as image data, video data, lidar data, radar data, audio data, other sensor data, etc., associated with values ​​(e.g., desired classifications, inferences, predictions, etc.). Generally, such values ​​may be referred to as “ground truth.” To illustrate, the training data 120 may be used for image classification and may include images of an environment captured by an autonomous vehicle and associated with one or more classifications, as described above. In some examples, such classifications may be based on user input (e.g., user input indicating that an image depicts a particular type of object). In some examples, such labeled classifications (or more generally, labeled outputs associated with the training data) may be referred to as ground truth.

[0036] During training, the training component 114 may transfer the local cross-batch data 126 and 130 calculated by the training component 114 (and at least temporarily stored in the memory 112) onto the memory 108 associated with the second processing unit 106. The local cross-batch data 126 and 130 may be distributed by the second processing unit 106 to the other computing device(s) 102 (one of which is shown as a computing device 134, also referred to as a remote computing device), and the remote cross-batch data 132 may be received from the other computing device(s) 102 and stored in the memory 108. Additionally, the training component 114 may retrieve the remote cross-batch data 132 from the memory 108 for storage in the memory 112 associated with the first processing unit 104 when the cross-batch data 126, 130, and 132 are needed during training. Because the cross-batch data can be a small number of scalar values ​​instead of an entire local batch of values, the amount of data to be transferred between computing devices 102 can be greatly reduced.

[0037] The inference component 116 may be executed by the processor(s) 110 to process new data with the neural network 118 and make inferences about the new data (e.g., predict values, classify the new data, etc.). To illustrate, the inference component 116 may implement the neural network 118 to classify objects in new images captured by the autonomous vehicle. While implementing the neural network 118, the inference component 116 may not perform backward propagation as backward propagation is used to train the neural network 118. In some examples, the inference component 116 may be part of a separate computing device, such as the autonomous vehicle described above.

[0038] The data used by the training component 114 (e.g., training data 120) and / or the data used by the inference component 116 (e.g., data to feed into the neural network 118 for inference) may include a variety of data. For example, the data may include depth data from one or more sensors, such as Lidar (Light Detection and Ranging) data, radar data, image data (determined from multi-view geometry), depth sensor data (time of flight, structured light, etc.), etc. In some examples, the computing device(s) 102 may receive (e.g., retrieve) data from a data store, such as a database, where the data store may store data over time as data is received from one or more vehicles or other devices in the environment. In some examples, the computing device(s) 102 may receive data from one or more vehicles or other devices where data is captured in a batch manner, in one or more log files received from a vehicle, or at any other time (e.g., real-time).

[0039] In some examples, the computing device(s) 102 may receive multiple lidar data sets from multiple lidar sensors operating in association with a perception system of an autonomous vehicle. In some examples, the computing device(s) 102 may combine or fuse data from two or more lidar sensors into a single lidar data set (also referred to as a "metaspin"). In some examples, the computing device(s) 102 may extract a portion of the lidar data for processing, such as over a period of time. In some examples, the computing device(s) 102 may receive radar data and associate the radar data with the lidar data to generate a more detailed representation of the environment. As an example, the data may include lidar data (e.g., a point cloud) associated with various objects in an urban environment, such as cars, trucks, roads, buildings, bicycles, pedestrians, etc. Of course, the above data need not be sensor data at all. In various examples, the training data may include features defined for a particular problem and associated expected outputs. As a non-limiting example, the data may include the square footage size of the home, the number of bedrooms, the number of floors, etc., with associated home values ​​to train a network that predicts likely home values.

[0040] As illustrated, the neural network 118 may include multiple layers. Each layer may include one or more nodes (also referred to as neurons or perceptrons). In the example of FIG. 1, the neural network 118 includes five layers, and the cross batch normalization layer 122 includes six nodes. However, it can be understood that any number of layers and / or nodes may be implemented. In an example, the neural network 118 may include bias node(s) not illustrated in FIG. 1. Nodes, such as those associated with hidden layers, may have operations and weights associated with them. Operations at one layer may be performed to generate activations that are provided as input to the next layer (e.g., to operations associated with the next layer in the forward graph). The activations may be, for example, sigmoid functions, arctangents, ReLUs, hyperbolic arctangents, Heaviside, and the like.

[0041] In an example, the neural network 118 may include one or more cross batch normalization layer(s) 122. While other layers in the neural network 118 may be cross batch normalization layers 122, a single cross batch normalization layer 122 is shown in FIG. 1 for ease of illustration. As described above, during forward propagation 124, the cross batch normalization layer 122 may normalize local batch inputs (e.g., inputs to the cross batch normalization layer 122 based on training data 120 input to a local neural network of a computing device 102) to a global batch of training samples (e.g., a collection of local batches of training samples processed by a neural network of a distributed learning pipeline including multiple computing devices 102). The normalized local batches of inputs may then be input to a layer following the cross batch normalization layer 122. During backpropagation 128, the output of the neural network can be used to adjust the values ​​of parameters of neural network layers in a sequence, for example, through gradient descent and backpropagation neural network training techniques. Additionally, the normalized statistics from forward propagation may be backpropagated, such as through part of adjusting the values ​​of the neural net's parameters, i.e., as part of performing a backpropagation training technique.

[0042] Additional details regarding the operation of the cross batch normalization layer are provided below with respect to Figures 3-5.

[0043] Although the training component 114 and the inference component 116 are illustrated in FIG. 1 as being stored in memory 112 and implemented by the first processing unit 104, the training component 114 and / or the inference component 116 may be stored in memory 108 and / or implemented by the second processing unit 106.

[0044] The computing device(s) 102 may be implemented as one or more laptop computers, desktop computers, servers, etc. In an example, the computing device(s) 102 are configured in a cluster, a data center, a cloud computing environment, or a combination thereof. In one example, the computing device(s) 102 provide cloud computing resources including computational resources, network resources, storage resources, etc. that operate remotely with another computing device, e.g., a client device. By way of illustration, the computing device(s) 102 may implement a cloud computing platform / infrastructure to build, deploy, and / or manage applications and / or services.

[0045] The memory 112 and / or memory 108 are examples of non-transitory computer-readable media. The memory 112 and / or 108 may store an operating system and / or one or more software applications, instructions, programs, and / or data for implementing the methods described herein and the functions attributed to the various systems. In various implementations, the non-transitory computer-readable media may be implemented using any suitable memory technology, such as SRAM (Static RAM), SDRAM (Synchronous DRAM), non-volatile / flash memory, or any other type of memory. The architecture, systems, and individual elements described herein may include many other logical, programmatic, and physical components, and those shown in the accompanying drawings are merely examples relevant to the description herein.

[0046] In some examples, memory 112 may have different characteristics than memory 108. For example, memory 112 and memory 108 may have different memory capacities, different read and / or write capabilities (e.g., one may have the ability to read and write simultaneously while the other may have the ability to read and write at different times), different read / write speeds, different size memory buses (e.g., 64-bit, 128-bit, etc.), etc. Additionally, first processing unit 104 may have different characteristics than second processing unit 106, such as a different operating speed, a different number of cores, etc.

[0047] Although the second processing unit 106 and the memory 108 are illustrated as being part of the computing device(s) 102, in some examples the second processing unit 106 and / or the memory 108 may be located elsewhere. For example, the second processing unit 106 and / or the memory 108 may be implemented in a computing device that is remote from the computing device(s) 102.

[0048] The techniques described herein may be implemented in a variety of contexts. In some examples, the techniques are implemented in the context of machine learning applications, such as TensorFlow, PyTorch, Caffe, Caffe2, etc.

[0049] 2 is a block diagram of an example system 200 for implementing the techniques described herein according to aspects of the disclosure. In some examples, the system 200 may include one or more features, components, and / or functionality of the aspects described herein with reference to FIG. 1. In some aspects, the system 200 may include a vehicle 202 and computing device(s) 102 of FIG. 1. The vehicle 202 may include a vehicle computing device 204, one or more sensor systems 206, one or more communication connections 208, and one or more drive systems 210.

[0050] The vehicle computing device 204 may include one or more processors 212 and a computer-readable medium 214 communicatively coupled to the one or more processors 212. In the illustrated example, the vehicle 202 is an autonomous vehicle, however, the vehicle 202 could be any other type of vehicle or any other system (e.g., a robotic system, a camera-enabled smartphone, etc.). In the illustrated example, the computer-readable medium 214 of the vehicle computing device 204 stores a perception system 216, a prediction system 218, a planning system 220, one or more system controllers 222, as well as sensor data 224 and other data 226. While depicted in FIG. 2 as residing on computer-readable medium 214 for illustrative purposes, it is envisioned that the perception system 216, the prediction system 218, the planning system 220, and one or more system controllers 222 may also be accessible to the vehicle 202 (e.g., stored or otherwise accessible by computer-readable media separate from the vehicle 202), in addition to or instead of the sensor data 224 and other data 226.

[0051] In at least one example, the perception system 216 may be configured to receive sensor data 224 (e.g., radar data) captured during one or more time intervals associated with the sensor system 206. The perception system 216 may include functionality for detecting, segmenting, and / or classifying objects. In some examples, the perception system 216 may provide processed sensor data indicative of the presence of an entity proximate to the vehicle 202 and / or a classification of the entity as a type of entity (e.g., car, pedestrian, cyclist, animal, building, tree, road surface, curb, sidewalk, unknown, etc.). In additional or alternative examples, the perception system 216 may provide processed sensor data indicative of one or more characteristics associated with the detected entity (e.g., tracked object) and / or the environment in which the entity is located. In some examples, characteristics associated with an entity may include, but are not limited to, x position (global and / or local position), y position (global and / or local position), z position (global and / or local position), orientation (e.g., roll, pitch, yaw), entity type (e.g., classification), entity velocity, entity acceleration, entity range (size), etc. Characteristics associated with an environment may include, but are not limited to, the presence of other entities in the environment, the state of other entities in the environment, time of day, day of the week, season, weather conditions, darkness / light indications, etc. Processed sensor data may be output to the forecasting system 218 and / or the planning system 220.

[0052] The planning system 220 may determine a path for the vehicle to follow to move through and traverse a physical environment. For example, the planning system 220 may determine various routes and trajectories and various levels of detail. For example, the planning system 220 may determine a route to travel from a current location to a target location. For purposes of this discussion, a route may be a sequence of waypoints to travel between two locations.

[0053] In at least one example, the vehicle computing device 204 may include one or more system controllers 222 that may be configured to control steering, propulsion, braking, safety, emitter, communication, and other systems of the vehicle 202. The just mentioned system controller(s) 222 may communicate with and / or control corresponding systems of the drive system(s) 210 and / or other components of the vehicle 202.

[0054] In some cases, some or all aspects of the components described herein may include any models, algorithms, and / or machine learning algorithms. For example, in some cases, components in computer-readable medium 214, such as perception system 216, prediction system 218, and / or planning system 220, may be implemented as one or more neural networks. As an example, perception system 216 may include a machine-learned model (e.g., a neural network) trained to predict the speed, trajectory, and / or other characteristics of a pedestrian (or other object) based on image data.

[0055] In at least one example, the sensor system(s) 206 may include lidar sensors, radar sensors, ultrasonic transducers, sonar sensors, location sensors (e.g., GPS, compass, etc.), inertial sensors (e.g., inertial measurement units (IMUs), accelerometers, magnetometers, gyroscopes, etc.), cameras (e.g., RGB, IR, intensity, depth, time of flight, etc.), microphones, wheel encoders, environmental sensors (e.g., temperature sensors, humidity sensors, light sensors, pressure sensors, etc.), one or more time of flight (ToF) sensors, etc. The sensor system(s) 206 may include multiple instances of each of the just mentioned or other types of sensors. For example, the lidar sensors may include individual lidar sensors located at the corners, front, rear, sides, and / or top of the vehicle 202. As another example, the camera sensors may include multiple cameras positioned at various locations around the exterior and / or interior of the vehicle 202. The sensor system(s) 206 may provide input to the vehicle computing device 204. Additionally or alternatively, the sensor system(s) 206 can send sensor data over one or more networks 228 to one or more remote computing device(s), such as at a particular frequency, at predetermined intervals, in near real-time, etc.

[0056] Additionally, the vehicle 202 may also include communication connection(s) 208 that enable communication between the vehicle 202 and other local or remote computing device(s). By way of example, the communication connection(s) 208 may facilitate communication of the vehicle 202 with other local computing device(s) and / or with the drive system(s) 210. Additionally, the communication connection(s) 208 may enable the vehicle 202 to communicate with other nearby computer device(s) (e.g., other nearby vehicles, traffic signals, etc.). Additionally, the communication connection(s) 208 may also enable the vehicle 202 to communicate with remote teleoperated computing devices or other remote services.

[0057] The communication connection(s) 208 may include physical and / or logical interfaces for connecting the vehicle computing device 204 to another computing device (e.g., computing device(s) 102) and / or to a network, such as network(s) 228. For example, the communication connection(s) 208 may enable Wi-Fi-based communications, such as, for example, frequencies defined by the IEEE 802.11 standard, short-range wireless frequencies such as BLUETOOTH™, cellular communications (e.g., 2G, 3G, 4G, 4G LTE, 5G, etc.), or via any suitable wired or wireless communications protocol that enables each computing device to interface with other computing device(s).

[0058] In at least one example, the vehicle 202 can include one or more drive systems 210. In some examples, the vehicle 202 can have a single drive system 210. In at least one example, if the vehicle 202 has multiple drive systems 210, the individual drive systems 210 can be located at opposing ends of the vehicle 202 (e.g., at the front and rear, etc.). In at least one example, the drive system(s) 210 can include one or more sensor systems 206 that detect conditions of the drive system(s) 210 and / or conditions surrounding the vehicle 202, as described above. By way of example and not limitation, the sensor system(s) 206 can include one or more wheel encoders (e.g., rotary encoders) that sense the rotation of the wheels of the drive system, inertial sensors (e.g., inertial measurement units, accelerometers, gyroscopes, magnetometers, etc.) that measure the orientation and acceleration of the drive system, cameras or other image sensors, ultrasonic sensors that acoustically detect objects surrounding the drive system, lidar sensors, radar sensors, etc. Some sensors, such as wheel encoders, may be unique to the drive system(s) 210. In some cases, the sensor system(s) 206 in the drive system(s) 210 may overlap or supplement a corresponding system in the vehicle 202.

[0059] In at least one example, the components described herein may process the sensor data 224 as described above and may send their respective outputs to one or more computing device(s) 102 over one or more network(s) 228. In at least one example, the components described herein may send their respective outputs to one or more computing device(s) 102 at a particular frequency, at a predetermined fixed time, in near real-time, etc.

[0060] In some examples, the vehicle 202 can send sensor data to one or more computing device(s) 102 over the network(s) 228. In some examples, the vehicle 202 can send raw sensor data 224 to the computing device(s) 102. In other examples, the vehicle 202 can send processed sensor data 224 and / or a representation of the sensor data (e.g., an object perception track) to the computing device(s) 102. In some examples, the vehicle 202 can send the sensor data 224 to the computing device(s) 102 at a particular frequency, after a pre-defined period of time, in near real-time, etc. In some cases, the vehicle 202 can send the sensor data (raw or processed) to the computing device(s) 102 as one or more log files.

[0061] As described herein, a typical neural network is a biologically inspired algorithm that generates an output through input data through a series of connected layers. Furthermore, each layer in a neural network may include another neural network, or may include any number of layers (whether convolutional or not). As can be understood in the context of the present disclosure, a neural network may utilize machine learning, which may refer to a broad class of algorithms described above in which an output is generated based on a learning parameter.

[0062] Although described in the context of neural networks, any type of machine learning can be used consistent with this disclosure. For example, machine learning algorithms can include, but are not limited to, regression algorithms (e.g., ordinary least squares regression (OLSR), linear regression, logistic regression, stepwise regression, multivariate adaptive regression splines (MARS), local estimation scatter plot smoothing (LOESS)), instance-based algorithms (e.g., ridge regression, least absolute shrinkage and selection operator (LASSO), elastic nets, least angle regression (LARS)), decision tree algorithms (e.g., classification and regression trees (CTRs)), and others. ART), Iterative Bisection 3 (ID3), Chi-squared Automatic Interaction Detection (CHAID), Decision Cut, Conditional Decision Tree), Bayesian algorithms (e.g., Naive Bayes, Gaussian Naive Bayes, Multinomial Naive Bayes, Average One Dependence Estimators (AODE), Bayesian Belief Networks (BNN), Bayesian Networks), Clustering algorithms (e.g., k-means, k-medians, Expectation Maximization (EM), Hierarchical Clustering), Association Rule Learning Algorithms The learning algorithms may include algorithms (e.g., perceptron, backpropagation, Hopfield network, radial basis function network (RBFN)), deep learning algorithms (e.g., deep Boltzmann machine (DBM), deep belief network (DBN), convolutional neural network (CNN), stacked autoencoder), dimensionality reduction algorithms (e.g., principal component analysis (PCA), principal component regression (PCR), partial least squares regression (PLSR), Sammon mapping, multidimensional scaling (MDS), projection pursuit, linear discriminant analysis (LDA), mixed discriminant analysis (MDA), quadratic discriminant analysis (QDA), flexible discriminant analysis (FDA)), ensemble algorithms (e.g., boosting, bootstrap aggregation (bagging), AdaBoost, stacked generalization (blending), gradient boosting machine (GBM), gradient boosted regression tree (GBRT), random forest), support vector machine (SVM), supervised learning, unsupervised learning, semi-supervised learning, etc.Additional examples of architectures include neural networks, such as ResNet50, ResNet101, VGG, DenseNet, PointNet, etc.

[0063] The processor(s) 212 of the vehicle 202 may be any suitable processor capable of executing instructions to process data and perform operations as described herein. By way of example and not limitation, the processor(s) 212 may include one or more central processing units (CPUs), graphics processing units (GPUs), or any other device or portion of a device that processes electronic data and converts the electronic data into registers and / or other electronic data that may be stored in a computer-readable medium. In some examples, integrated circuits (e.g., ASICs, etc.), gate arrays (e.g., FPGAs, etc.), and other hardware devices may also be considered processors so long as they are configured to implement encoded instructions.

[0064] The computer readable medium 214 is an example of a non-transitory computer readable medium. The computer readable medium 214 can store an operating system and one or more software applications, instructions, programs, and / or data for implementing the methods described herein and the functions attributed to the various systems. In various implementations, the computer readable medium can be implemented using any suitable computer readable medium technology, such as SRAM (Static RAM), SDRAM (Synchronous DRAM), non-volatile / flash type memory, or any other type of memory capable of storing information. The architecture, systems, and individual elements described herein can include many other logical, programmatic, and physical components, and those shown in the accompanying drawings are merely examples relevant to the description of this specification.

[0065] As can be appreciated, the components described herein are illustrated as separate for purposes of illustration, however, operations performed by various components can be combined or performed by any other components.

[0066] 2 is illustrated as a distributed system, it should be noted that in alternative examples, components of the vehicle 202 may be associated with the computing device(s) 102 and / or components of the computing device(s) 102 may be associated with the vehicle 202. That is, the vehicle 202 may perform one or more functions associated with the computing device(s) 102, and vice versa. Additionally, aspects of the training component 114 may be performed in any of the devices described herein.

[0067] 2 is illustrated as a distributed system, it should be noted that in alternative examples, components of the vehicle 202 may be associated with the computing device(s) 102 and / or components of the computing device(s) 102 may be associated with the vehicle 202. That is, the vehicle 202 may perform one or more functions associated with the computing device(s) 102, and vice versa.

[0068] The computing device(s) 102 may include one or more computing devices implemented at the same location and / or distributed. In one example, the first processing unit 104 is implemented in a first computing device, and the second processing unit 106 and memory 108 are implemented in a second computing device. In another example, the first processing unit 104, the second processing unit 106, and the memory 108 are implemented in the same computing device. In yet other examples, other configurations are used.

[0069] 3 is a diagram illustrating an example system 300 that utilizes cross-batch normalization during training and operation of a neural network. The example 300 represents one of many implementations for cross-batch normalization according to the present disclosure. In other words, fewer or more operations (e.g., blocks) and / or different sequences of operations may be implemented.

[0070] The neural network system 300 may include multiple neural networks 118 and 302, each including multiple neural network layers 122 and 304-312 arranged in sequence from a top layer in sequence to a bottom layer in sequence. The neural network system 300 may generate neural network outputs from neural network inputs by processing the neural network inputs through each of the layers in sequence.

[0071] The neural network system 300 can be configured to receive any type of digital data input and generate any type of score or classification output based on the input.

[0072] In particular, each of the neural network layers is configured to receive inputs and generate outputs such that the neural network layers collectively process the neural network inputs received by the neural network system 300 to generate a respective neural network output for each received neural network input. Some or all of the neural network layers in the sequence generate outputs from the inputs according to current values ​​of a set of parameters for the neural network layer. For example, some layers may multiply the received inputs by a matrix of current parameter values ​​as part of generating outputs from the received inputs.

[0073] Additionally, neural network system 300 includes cross-batch normalization layers 122 and 308 in the sequence of neural network layers between neural network layers A 304 and 306 and neural network layers B 310 and 310. Cross-batch normalization layers 122 and 308 are configured to perform one set of operations on inputs received from neural network layers A 304 and 306 during training of neural network system 300 and to perform another set of operations on inputs received from neural network layers A 304 and 306 after neural network system 300 has been trained.

[0074] In particular, the neural network system 300 can be trained on multiple global batches of training examples (e.g., a global batch that includes a local batch for each of the neural networks 118 and 302) to determine training values ​​for parameters of the neural network layers. For example, during training, the neural network system 300 can process a global batch of training examples including local batches 314 and 316 and generate local neural network outputs 318 and 320, respectively, for each local batch in the global batch. The neural network outputs 318 and 320 can then be used to adjust the values ​​of the parameters of the neural network layers 122 and 304-312 in sequence, for example, through gradient descent and backpropagation neural network training techniques.

[0075] During training of the neural network system 300 on a given global batch of training examples, the cross batch normalization layers 122 and 308 are configured to receive layer A outputs 322 and 324 generated by neural network layers A 304 and 306 for the local batches 314 and 316, process the layer A outputs 322 and 324 to generate respective cross batch normalization layer outputs 328 and 330 for the local batches, and then provide the cross batch normalization layer outputs 328 and 330 as inputs to neural network layers B 310 and 312. The layer A outputs 322 and 324 include the respective outputs generated by neural network layers A 304 and 306 for each training example in the local batch.

[0076] Similarly, the cross batch normalization layer outputs 328 and 330 include the outputs generated by the cross batch normalization layers 122 and 308 for each training example in the local batches 314 and 316, respectively.

[0077] In general, during forward propagation, the cross-batch normalization layers 122 and 308 compute a set of normalization statistics for the local batch from the layer A outputs 322 and 324, synchronize the normalization statistics across the global batch by distributing and receiving cross-batch data 326 from the cross-batch normalization layers of other neural networks, compute global normalization statistics, and normalize the layer A outputs 322 and 324 to generate respective normalized outputs 328 and 330 for the local batch, and optionally transform each of the normalized outputs before providing the outputs as inputs to the neural network layers B 310 and 312.

[0078] More specifically, in some examples, to normalize inputs in local batches during training, the cross batch normalization layer may (1) calculate local batch means for the local batches; (2) calculate local batch variances for the local batches; (3) distribute local statistics (e.g., means and variances) or local intermediate values ​​based on the local statistics; (4) receive remote statistics or remote intermediate values ​​from other processors that run the cross batch normalization layer; (5) calculate global batch means and global batch variances based on the local and remote statistics or intermediate values; (6) normalize the local inputs using the global batch means and global batch variances; and (7) scale and shift the normalized local outputs by global scale and shift parameters.

[0079] To determine the local batch mean for the current local batch (i), the cross batch normalization layer calculates the local batch mean μ i It may be calculated as follows:

[0080]

number

[0081] However, n i is the count of the i-th local batch,

[0082]

number

[0083] is the jth input from the previous layer for the i-th local batch (e.g., the local batch being processed by the current neural network 118 or 302).

[0084] Similarly, local batch distribution

[0085]

number

[0086] may be calculated as follows:

[0087]

number

[0088] The cross batch normalization layer may determine and share cross batch data 326 for use in determining the global batch mean and global batch variance. Depending on the implementation, the cross batch normalization layer may share local batch means and local batch variances as the cross batch data 326, or may determine and share intermediate values ​​as the cross batch data 326. For example, the cross batch normalization layer may calculate and distribute the following intermediate values:

[0089]

number

[0090]

number

[0091] However, p iis the relative size of the current local batch(i) (e.g., the ratio of the count of the current local batch(i) to the total count of the global batch).

[0092] Regardless of whether the local batch mean and local batch variance or median are distributed as normalization statistics (e.g., for cross-batch data), the cross-batch normalization layer may receive the distributed normalization statistics for use in determining global normalization statistics.

[0093] If the local batch means and local batch variances are distributed, then the global batch mean μ may be calculated as follows:

[0094]

number

[0095] A global batch variance may then be determined. Specifically, in implementations consistent with the present disclosure, the global variance may be determined based on an aggregation of the difference between the sum of the local batch variances and the squared local batch means and the squared global batch mean. In instances where the local batches vary in size, the sum may be weighted based on the relative sizes of the batches. For example, the global batch variance (e.g., σ 2 ) may be determined as follows:

[0096]

number

[0097] If the intermediate values ​​are determined and shared, the cross batch normalization layer may aggregate the intermediate values ​​into a global intermediate value as follows:

[0098]

number

[0099]

number

[0100] From the global mean values ​​just mentioned, the global batch mean and global batch variance may be calculated as follows:

[0101]

number

[0102]

number

[0103] The normalization statistics computed by the cross-batch normalization layers 122 and 308 and the manner in which the cross-batch normalization layers 122 and 308 normalize the layer A outputs 322 and 324 during training depend on the nature of the neural network layers A 304 and 306 that generate the layer A outputs 322 and 324.

[0104] Global batch normalization statistics (e.g., global batch variance (e.g., σ 2 ) and the global batch mean μ) are used to multiply the inputs received by the cross batch normalization layer from the previous layer (e.g.

[0105]

number

[0106] ) will be converted to a normalized output (e.g.

[0107]

number

[0108] ) and calculated.

[0109]

number

[0110] where ε is a constant value that is added to the global batch variance for numerical stability.

[0111] As mentioned above, some implementations scale and shift the normalized output to produce a transformed normalized output (e.g.,

[0112]

number

[0113] ) may be computed. Specifically, the normalized output may be scaled and shifted using a global scale variable γ and a global shift variable β, which may be learned values ​​(the learning of these variables is described later in the backpropagation discussion). More specifically, the transformed normalized output of the cross batch normalization layer (e.g.,

[0114]

number

[0115] ) may be calculated as follows:

[0116]

number

[0117] The transformed normalized output (e.g.

[0118]

number

[0119] ) may be provided to the layer following the cross batch normalization layer 122 and 308 (e.g., layer B 310 and 312), and the neural network 118 and 302 may continue to process successive layers until the local neural network output 318 and 320 is output by the final layer of the neural network 118 and 302. The neural network may then begin backpropagation.

[0120] During backward propagation, the cross batch normalization layer may determine and backpropagate the gradient of the loss with respect to the translation, as well as compute the gradient with respect to the global scale variable γ and the global shift variable β. In particular, the cross batch normalization layer is

[0121]

number

[0122] (i.e., the gradient of the loss with respect to the outputs 332 and 334 of the cross batch normalization layer),

[0123]

number

[0124] ,

[0125]

number

[0126] , and

[0127]

number

[0128] (i.e., the gradient of the loss with respect to the inputs 336 and 338 of the cross batch normalization layer).

[0129] During operation, a cross batch normalization layer may compute gradients with respect to a global scale variable γ and a global shift variable β. First, the local intermediate values ​​θ i and Φ i may be computed locally as follows:

[0130]

number

[0131]

number

[0132] However, n i is the count for local batch(i).

[0133] As in forward propagation, the local intermediate value θ i and Φ i may be distributed between the neural networks 118 and 302.

[0134] Next, each neural network 118, 302 calculates a local intermediate value θ i and Φ i Using

[0135]

number

[0136] and

[0137]

number

[0138] may be determined locally. Specifically,

[0139]

number

[0140] and

[0141]

number

[0142] teeth,

[0143]

number

[0144]

number

[0145] It may be calculated as follows.

[0146] The gradients of the global scale variable γ and the global shift variable β are

[0147]

number

[0148] It is sometimes used to calculate. As mentioned above,

[0149]

number

[0150] and

[0151]

number

[0152] By storing

[0153]

number

[0154] In particular,

[0155]

number

[0156] may be calculated as follows:

[0157]

number

[0158] Once the neural network system 300 is trained, it may receive new neural network inputs for processing and process the neural network inputs through the neural network layers to generate new neural network outputs for the inputs according to the training values ​​of the component parameters for the neural network system 300. Furthermore, the operations performed by the cross batch normalization layers 122 and 308 during processing of new neural network inputs also depend on the nature of the neural network layers A 304 and 306.

[0159] In some cases, the mean and standard deviation used after training are calculated from all outputs generated by the layer prior to the cross batch normalization layer during training of the neural network system. However, in some other cases, the mean and standard deviation used in the cross batch normalization layer may be calculated from the outputs generated by the layer prior to the cross batch normalization layer after training, for example, from the outputs of the previous layer generated most recently in time, for a window of a particular duration, or from a particular number of outputs of the previous layer most recently generated by the layer prior to the cross batch normalization layer.

[0160] In particular, in some cases, the distribution of the network's inputs, and therefore the distribution for the outputs of the previous layer, may change between the training examples used during training and the new inputs of the neural network used after training of the neural network system, for example if the new inputs of the neural network are different types of inputs than the training examples. For example, a neural network system may have been trained on user images and now be used to process video frames. The user images and video frames may have different distributions with respect to pictured classes, image characteristics, composition, etc. Therefore, normalizing the inputs of the previous layer using statistics from training may not accurately capture the statistics for the outputs of the previous layer being generated for the new inputs. Thus, in the case just mentioned, the cross batch normalization layer may use normalization statistics calculated from the outputs of the previous layer generated by the layer previous to the cross batch normalization layer after training.

[0161] The cross batch normalization layers 122 and 308 may be included at various locations in the sequence of neural network layers, and in some implementations, multiple cross batch normalization layers may be included in the sequence.

[0162] While the processing shown in FIG. 3 concerns parallel processing of local batches of a global batch, another example is to process local batches as components of a rolling global batch that grows with each local batch being processed in turn using the definition disclosed above for distribution of a global batch.

[0163] FIG. 4A illustrates an exemplary process 400 for generating outputs of a cross-batch normalization layer during training of a neural network on a global batch of training examples. More specifically, the process 400 may relate to processing in a particular computing device of a plurality of computing devices that collectively form a distributed learning pipeline for the neural network. The just-described process 400 is illustrated as a logical flow graph, where each operation represents a sequence of operations that may be implemented in hardware, software, or a combination thereof. In the context of software, the operations represent computer-executable instructions stored on one or more computer-readable storage media that, when executed by one or more processors, perform the recited operations. Generally, computer-executable instructions include routines, programs, objects, components, data structures, etc. that perform particular functions or implement particular abstract data types. The order in which the operations are described is not intended to be construed as a limitation, and any number of the described operations may be combined in any order and / or in parallel to implement the process. Process 400 may be performed by any component, such as, for example, first processing unit 104 of Figure 1, second processing unit 106 of Figure 1, vehicle computing device 204 of Figure 2, another processing unit or computing device, etc. For ease of explanation, process 400 will be described in the context of Figure 1 (and possibly Figure 3). In an example, process 400 is associated with a forward propagation portion of a training phase for an artificial neural network.

[0164] 4A, at 402, the first processing unit 104 may calculate a local batch mean for inputs associated with the training samples of the local batch. At 404, the first processing unit 104 may calculate a local batch variance for the inputs associated with the training samples of the local batch. At 406, the first processing unit 104 may calculate a local median for the inputs associated with the training samples of the local batch.

[0165] At 408, the first processing unit 104 and the first processing unit 104 of the other computing device may distribute the local intermediate values ​​to each other. At 410, the first processing unit 104 may receive remote intermediate values ​​from the other computing device.

[0166] At 412, the first processing unit 104 may use the intermediate values ​​to aggregate the local and remote means to calculate a global batch average. Then, at 414, the first processing unit 104 may use the intermediate values ​​to aggregate the local and remote variances to calculate a global batch variance.

[0167] At 416, the first processing unit 104 may normalize the inputs associated with the local batch using the global batch mean and global batch variance. Then, at 418, the first processing unit 104 may scale and shift the normalized inputs using the global scale and shift parameters. The first processing unit 104 may then output the transformed normalized local outputs to the next layer in the neural network. Processing then continues to 452 of FIG. 4B for backpropagation in the cross batch normalization layer.

[0168] 4B illustrates an example process 450 for training a neural network including a cross-batch normalization layer on a global batch of training examples. More specifically, the process 450 may relate to processing on a particular computing device of a plurality of computing devices that collectively form a distributed learning pipeline for the neural network. In an example, the process 450 is associated with a backpropagation portion of a training phase for an artificial neural network.

[0169] In FIG. 4B , at 452, the first processing unit 104 may determine the gradient of the loss with respect to the transformed normalized output. In some examples, the gradient of the loss with respect to the transformed normalized output may be input at the beginning of the backpropagation portion of the training. In other examples, the first processing unit 104 may calculate the gradient of the loss with respect to the transformed normalized output. At 454, the first processing unit 104 may calculate the local gradient of the loss with respect to the learnable scale parameter. At 456, the first processing unit 104 may calculate the local gradient of the loss with respect to the learnable shift parameter.

[0170] At 458, the first processing unit 104 and the first processing unit 104 of the other computing device may distribute the local gradients to each other. At 460, the first processing unit 104 may receive remote gradients from the other computing device.

[0171] At 462, the first processing unit 104 may collect local and remote gradients of the loss with respect to the learnable scale parameters to calculate a global gradient of the loss with respect to the learnable scale parameters. Then, at 464, the first processing unit 104 may collect local and remote gradients of the loss with respect to the learnable shift parameters to calculate a global gradient of the loss with respect to the learnable shift parameters.

[0172] At 466, the first processing unit 104 may calculate a global gradient of the loss with respect to the input. Then, at 468, the first processing unit 104 may adjust current values ​​of parameters of the neural network based at least in part on the determined gradient of the loss.

[0173] The first processing unit 104 may then determine, at 470, whether the loss for the input is less than the threshold. If so, processing may continue to 472 where training is stopped. On the other hand, if the loss is not less than the threshold, processing may return to 402, at 474, and training of the neural network may continue based on a new global batch that includes multiple new local batches of training examples. As mentioned above, training may be performed by a single computing device operating on the local batches in sequence, or by a distributed learning pipeline of multiple computing devices that train the local batches in parallel.

[0174] FIG. 5 illustrates an example process 500 for training a neural network that includes a cross-batch normalization layer in the context of an autonomous vehicle use case.

[0175] In particular, at 502, a computing device (e.g., computing device 102) may receive data associated with an autonomous vehicle (e.g., vehicle 202). The computing device may then train a machine learning model based on the data at 504, where the training is based at least in part on multi-processor cross batch normalization in a cross batch normalization layer of the machine learning model. In some examples, the training may be performed as described above with respect to FIGS. 1-4B. Then, at 506, the computing device may send the machine learned model to the same or a different autonomous vehicle (e.g., vehicle 202). Example clauses Although the example clauses described above are described with respect to certain implementations, it should be further understood in the context of this document that the contents of the example clauses can be implemented via a method, device, system, computer-readable medium, and / or another implementation. Additionally, any of the example ATs may be implemented alone or in combination with any other one or more of the example ATs.

[0176] A. At a batch normalization layer of a neural network associated with a first computing device, receiving a first layer output from a first neural network layer of the neural network, the first layer output being based on a local batch of training examples of a global batch, the global batch including the local batch and a remote batch of training examples; and calculating a normalization statistic of the local batch based at least in part on a component of the first layer output. determining for the local batch a first value based at least in part on a local batch mean and a second value based at least in part on a local batch variance as a local batch normalization statistic; subsequent to determining the first and second values, transmitting the local batch normalization statistics to a second computing device that trains a copy of the neural network with the remote batch; receiving from the second computing device a remote batch normalization statistic associated with the remote batch; determining a global batch mean and a global batch variance based at least in part on the local batch normalization statistic and the remote batch normalization statistic; and generating a normalized component of the normalized output associated with a component of the first layer output based at least in part on the global batch mean and the global batch variance.

[0177] B. The method of example A further including calculating a global batch variance based at least in part as an aggregation of the difference between the sum of the local batch variances and the squared local batch means and the squared global batch mean.

[0178] C. The method of Example A, further including generating transformed components of the output of the batch normalization layer by scaling and shifting normalized components of the normalized output based on a global scaling parameter and a global shift parameter, and determining the global scaling parameter and the global shift parameter based on a gradient of the loss during backpropagation of training the neural network in the local batch.

[0179] D. The method of example C, further including: determining a gradient of the loss with respect to the global shift parameter includes determining a sum of gradients of the loss with respect to the output of the batch normalization layer as a local intermediate shift parameter; receiving a remote intermediate shift parameter for a remote batch of training examples; and combining the local intermediate shift parameter and the remote intermediate shift parameter to generate a gradient of the loss with respect to the global shift parameter; and determining a gradient of the loss with respect to the global scaling parameter includes determining a dot product of gradients of the loss with respect to the output of the batch normalization layer of the transformed component and the normalized component of the normalized output as a local intermediate scaling parameter; receiving a remote intermediate scaling parameter for a remote batch of training examples; and aggregating the local intermediate scaling parameter and the remote intermediate scaling parameter to generate a gradient of the loss with respect to the global scaling parameter.

[0180] E. The method of Example A, further including determining a gradient of the loss with respect to an output of the first layer based on a gradient of the loss with respect to a global shift parameter and a gradient of the loss with respect to a global scaling parameter.

[0181] F. The method of example A, wherein the first value includes a weighted local batch mean for the local batch and the second value includes a weighted sum of the local batch mean and the squared local batch variance for the local batch, the weighting of the weighted local batch mean being based on the number of training examples in the local batch relative to the number of training examples across the global batch.

[0182] G. When executed, the method includes inputting a first portion of the set of examples to a neural network as a local batch; receiving a first layer output from a first neural network layer of the neural network based at least in part on the first portion; determining, for the local batch, a first value based at least in part on a local batch mean and a second value based at least in part on a local batch variance as normalized statistics for the local batch based at least in part on components of the first layer output; transmitting the normalized statistics for the local batch to a second computing device that trains a copy of the neural network using the remote batch; and one or more non-transitory computer-readable media storing instructions that cause one or more processors of the first processing unit to perform operations including receiving from the routing system a normalized statistics for the remote batch associated with a second portion of the set of examples included in the remote batch; determining a global batch mean based on the first values ​​and the normalized statistics for the remote batch; determining a global batch variance based at least in part on the second values ​​and the normalized statistics for the remote batch; and generating a normalized component of the normalized output associated with a component of the first tier output using the global batch mean and the global batch variance.

[0183] H. The one or more non-transitory computer-readable media of example G, wherein the operations further include calculating a global batch variance based at least in part as an aggregation of the difference between the sum of the local batch variances and the squared local batch means and the squared global batch mean.

[0184] I. The one or more non-transitory computer-readable media of Example G, wherein the operations further include determining, during backpropagation of training the neural network in the local batch, global scaling parameters and global shifting parameters based on gradients of the loss, and generating transformed components of outputs of the batch normalization layer by scaling and shifting normalized components of the normalized outputs based on the global scaling parameters and global shifting parameters.

[0185] J. The one or more non-transitory computer-readable media of Example I, the operations further including: determining local intermediate shift parameters by aggregating gradients of losses with respect to outputs of the batch normalization layer; receiving remote intermediate shift parameters of a remote batch; and aggregating the local intermediate shift parameters and the remote intermediate shift parameters as gradients of losses with respect to global shift parameters.

[0186] K. The one or more non-transitory computer-readable media of example J, wherein the operations further include determining local intermediate scaling parameters as a dot product of a gradient of a loss as a function of an output of the batch normalization layer and a normalized component of the normalized output, receiving remote intermediate scaling parameters for a remote batch, and aggregating the local intermediate scaling parameters and the remote intermediate scaling parameters as a gradient of the loss with respect to a global scaling parameter.

[0187] L. The one or more non-transitory computer-readable media of example G, wherein the operation further includes determining a gradient of the loss with respect to an output of the first layer based on a gradient of the loss with respect to a global shift parameter and a gradient of the loss with respect to a global scaling parameter.

[0188] M. One or more non-transitory computer readable media of example G, wherein a first portion includes a first number of training examples and a second portion includes a second number of training examples different from the first number.

[0189] N. One or more non-transitory computer readable media of example G, wherein the normalized statistics for the remote batches include, for the remote batches, a remote batch mean and a remote batch variance.

[0190] O. One or more non-transitory computer-readable media of example G, wherein the first value comprises a weighted local batch mean for the local batch and the second value comprises a weighted sum of the local batch mean and the squared local batch variance for the local batch, the weighting of the weighted local batch mean being based on the number of training examples in the local batch relative to the number of training examples across the global batch.

[0191] P. A system comprising: one or more processors; and one or more computer readable media storing instructions executable by the one or more processors, the instructions which, when executed, cause the one or more processors to perform operations including: inputting a first portion of a set of examples to a neural network as a local batch; receiving a first layer output from a first neural network layer of the neural network based at least in part on the first portion; determining a local batch mean and a local batch variance for the local batch based at least in part on a component of the first layer output; receiving from a remote computing system remote batch normalized statistics associated with a second portion of the set of examples included in the remote batch; determining a global batch mean based on the local batch mean and the remote batch normalized statistics; determining a global batch variance based at least in part on the local batch variance and the remote batch normalized statistics; and generating a normalized component of a normalized output associated with the component of the first layer output using the global batch mean and the global batch variance.

[0192] Q. The system of example P, wherein the operations further include determining global scaling parameters and global shifting parameters based on gradients of the loss during backpropagation of training the neural network in the local batches, and generating transformed components of the outputs of the batch normalization layer by scaling and shifting normalized components of the normalized outputs based on the global scaling parameters and global shifting parameters.

[0193] R. The system of example Q, wherein the operations further include determining a local intermediate shift parameter by collecting gradients of the loss with respect to the output of the batch normalization layer, determining a local intermediate scaling parameter as a dot product of the gradient of the loss as a function of the output of the batch normalization layer and a normalized component of the output being normalized, receiving the remote intermediate shift parameter and the remote intermediate scaling parameter for the remote batch, collecting the local intermediate shift parameter and the remote intermediate shift parameter as gradients of the loss with respect to a global shift parameter, and collecting the local intermediate scaling parameter and the remote intermediate scaling parameter as gradients of the loss with respect to the global scaling parameter.

[0194] The system of example P, wherein the operation further includes determining a gradient of the loss as a function of the output of the first layer based on a gradient of the loss as a function of a global shift parameter and a gradient of the loss as a function of a global scaling parameter.

[0195] T. A system of examples P, where a first portion includes a first number of training examples and a second portion includes a second number of training examples different from the first number. termination Although one or more examples of the techniques described herein have been described, various alternatives, additions, permutations and equivalents fall within the scope of the techniques described herein.

[0196] In describing the examples, reference is made to the accompanying drawings, which form a part hereof, which show as illustrative specific examples of the claimed subject matter. It is understood that other examples can be used and that modifications or alternatives, for example structural changes, can be made. The above examples, modifications, or alternatives do not necessarily depart from the scope of the intended and claimed subject matter. Although steps in this specification may be presented in a certain order, in some cases the order can be changed such that certain inputs are provided at different times or in a different order without changing the functionality of the described systems and methods. Furthermore, the procedures disclosed could be performed in a different order. Furthermore, the various calculations in this specification need not be performed in the order disclosed, and other examples using alternative orderings of calculations could be implemented without difficulty. In addition to being reordered, the calculations could also be decomposed into sub-calculations that have the same results.

Claims

1. A method performed by a computing device, comprising: inputting a first portion of the set of examples as a local batch into the neural network by a first processing unit; receiving a first layer output from a first neural network layer of the neural network based at least in part on the first portion; determining, for the local batch, as normalized statistics for the local batch based at least in part on the components of the first layer output, a first intermediate value based at least in part on a local batch mean and a second intermediate value based at least in part on a local batch variance, wherein the first intermediate value differs from the local batch mean and the second intermediate value differs from the local batch variance; transmitting normalized statistics of the local batch to a remote computing device that trains a copy of the neural network using the remote batch; receiving from the remote computing device a normalized statistic for a remote batch associated with a second portion of the set of examples included in the remote batch; determining a global batch mean based on the first intermediate value and the normalized statistics of the remote batches; determining a global batch variance based at least in part on the second intermediate value and the normalized statistics of the remote batches; generating normalized components of normalized outputs associated with the components of the first layer outputs using the global batch mean and the global batch variance; 23. A method comprising:

2. calculating the global batch variance based at least in part on an aggregation of a difference between the sum of the local batch variance and the squared local batch mean and the squared global batch mean; The method of claim 1 further comprising:

3. determining a global scaling parameter and a global shift parameter based on a gradient of a loss during backpropagation of training the neural network in the local batch; generating transformed components of the outputs of the batch normalization layer by scaling and shifting the normalized components of the normalized outputs based on the global scaling parameter and the global shift parameter; The method according to claim 1 or 2, further comprising:

4. determining local mean shift parameters by collecting gradients of losses with respect to the outputs of the batch normalization layer; receiving remote mid-shift parameters for the remote batch; collecting the local intermediate shift parameters and the remote intermediate shift parameters as gradients of losses with respect to the global shift parameters; 4. The method of claim 3, further comprising:

5. determining a local intermediate scaling parameter as a dot product of the gradient of a loss as a function of the output of the batch normalization layer and the normalized component of the normalized output; receiving remote intermediate scaling parameters for the remote batch; collecting the local intermediate scaling parameters and the remote intermediate scaling parameters as gradients of losses with respect to the global scaling parameters; The method of claim 4 further comprising:

6. determining a gradient of the loss with respect to an output of the first layer based on a gradient of the loss with respect to a global shift parameter and a gradient of the loss with respect to a global scaling parameter; The method according to claim 1 or 2, further comprising:

7. The first portion includes a first number of training examples and the second portion includes a second number of training examples that is different from the first number.

7. The method according to any one of claims 1 to 6.

8. 8. The method of claim 1, wherein the normalized statistics of the remote batches include a remote batch mean and a remote batch variance for the remote batches.

9. the first intermediate value comprises a weighted local batch mean of the local batch; The second intermediate value comprises a weighted sum of the squared local batch mean and the local batch variance for the local batch, the weighting of the weighted local batch mean being based on a number of training examples in the local batch relative to a number of training examples across a global batch.

9. The method according to any one of claims 1 to 8.

10. One or more non-transitory computer readable media storing instructions that, when executed by one or more processors, cause the one or more processors to perform the method of any one of claims 1 to 9.

11. one or more processors; One or more computer readable media storing instructions executable by said one or more processors, said instructions, when executed, causing said one or more processors to perform the method of any one of claims 1 to 9; A system comprising:

Citation Information

Patent Citations

  • Batch normalization layer

    JP2018508879A