Batch normalization layer

By introducing a batch normalization layer into the neural network system, the problem that neural networks are difficult to deal with changes in input distribution during training is solved, and a higher learning rate and lower dependence on parameter initialization is achieved, which improves training efficiency.

CN120068980AActive Publication Date: 2025-05-30GOOGLE LLC
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202510128788.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Priority Date
2015-01-28
Filing Date
2016-01-28
Publication Date
2025-05-30
Estimated Expiration
2036-01-28

AI Technical Summary

Technical Problem

Existing neural networks are difficult to effectively handle changes in input distribution during training, resulting in limited learning rate and parameter initialization has a great impact on the training process.

Method used

A batch normalization layer is introduced in a neural network system, and the components output from each first layer are normalized by calculating normalized statistics in the batch, thereby generating normalized layer outputs and providing these outputs as inputs to the next layer.

Benefits of technology

The batch normalization layer can mitigate the impact of input distribution changes during training, allowing for higher learning rates, and reducing dependence on parameter initialization, while reducing the need for other regularization techniques, improving the training efficiency of neural networks.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120068980A_ABST
    Figure CN120068980A_ABST
Patent Text Reader

Abstract

The invention relates to a batch normalization layer. Methods, systems, and apparatus, including computer programs encoded on a computer storage medium, are provided for processing inputs using a neural network system that includes a batch normalization layer. One of the methods includes: receiving a respective first layer output for each training example in the batch; calculating a plurality of normalized statistics for the batch according to the first layer output; normalizing each component of each first layer output using the normalization statistics to generate a corresponding normalized layer output for each training example in the batch; generating a respective batch normalized layer output for each of the training examples from the normalized layer output; and providing the batch normalization layer output as an input to the second neural network layer.
Need to check novelty before this filing date? Find Prior Art

Description

[0001] Division Explanation

[0002] This application is a divisional application of Chinese Patent Application No. 201680012517.X with an application date of January 28, 2016. Technical Field

[0003] This specification relates to processing an input through a neural network layer to generate an output. Background Art

[0004] A neural network is a machine learning model that uses one or more layers of non-linear units to predict an output for a received input. In addition to the output layer, some neural networks also include one or more hidden layers. 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 in the network generates an output from the received input according to the current values of the corresponding set of parameters. Summary of the Invention

[0005] In general, an innovative aspect of the subject matter described in this specification can be embodied as a neural network system implemented by one or more computers. The neural network system includes: a batch normalization layer between a first neural network layer and a second neural network layer. The first neural network layer generates a first layer output having a plurality of components. The batch normalization layer is configured to, during training of the neural network system based on a batch of training examples: receive the corresponding first layer output of each training example in the batch; calculate a plurality of normalization statistics for the batch based on the first layer output; normalize each component of each first layer output using the normalization statistics to generate a corresponding normalized layer output for each training example in the batch; generate a corresponding batch normalization layer output for each training example from the normalized layer output; and provide the batch normalization layer output as an input to the second neural network layer.

[0006] For a system of one or more computers to be configured to perform a particular operation or action means that the system has software, firmware, hardware, or a combination thereof installed on it that, when operating, causes the system to perform the operation or action. For one or more computer programs to be configured to perform a particular operation or action means that the one or more programs include instructions that, when executed by a data processing device, cause the device to perform the operation or action.

[0007] Specific embodiments of the subject matter described in this specification can be implemented to achieve one or more of the following advantages. Compared to the same neural network that does not include any batch normalization layers, a neural network system that includes one or more batch normalization layers can be trained more quickly. For example, by including one or more batch normalization layers in a neural network system, problems caused by the distribution of the input to a given layer that changes during training can be alleviated. This can allow for the effective use of higher learning rates during training and can reduce the impact of how the parameters are initialized on the training process. Additionally, during training, the batch normalization layer can act as a regularization matrix and can reduce the need for other regularization techniques (e.g., dropout) employed during training. Once trained, a neural network system that includes a normalization layer can generate a neural network output that is as accurate as, if not more accurate than, the neural network output generated by the same neural network system.

[0008] Details of one or more embodiments of the subject matter of this specification are set forth in the accompanying drawings and the following description. Other features, aspects, and advantages of the subject matter will become apparent from the description, the drawings, and the claims. BRIEF DESCRIPTION OF THE DRAWINGS

[0009] Figure 1 An example neural network system is shown.

[0010] Figure 2 is a flow diagram of an example process for using a batch normalization layer to process an input during training of a neural network system.

[0011] Figure 3 is a flow diagram of an example process for using batch normalization to process an input after a neural network system has been trained.

[0012] In the various figures, the same reference numerals and signs indicate the same elements. DETAILED DESCRIPTION

[0013] This specification describes a neural network system that includes batch normalization layers, which is implemented as a computer program on one or more computers at one or more locations.

[0014] Figure 1 An example neural network system 100 is shown. The neural network system 100 is an example of a system that is implemented as a computer program on one or more computers at one or more locations, where the systems, components, and techniques described below can be implemented.

[0015] The neural network system 100 includes a plurality of neural network layers arranged in a sequence: arranged in order from the lowest layer in the sequence to the highest layer in the sequence. The neural network system generates a neural network output from the neural network input by processing the neural network input through each layer in the sequence.

[0016] The neural network system 100 can be configured to receive any kind of digital data input and generate any kind of score or classification output based on that input.

[0017] For example, if the input to the neural network system 100 is an image or features that have been extracted from an image, the output generated by the neural network system 100 for a given image can be scores for each category in an object category set, where each score represents the estimated likelihood that the image contains an object belonging to that category.

[0018] As another example, if the input to the neural network system 100 is an Internet resource (e.g., a web page), a document, or a part of a document, or features extracted from an Internet resource, a document, or a part of a document, the output generated by the neural network system 100 for a given Internet resource, document, or part of a document can be scores for each topic in a topic set, where each score represents the estimated likelihood that the Internet resource, document, or part of a document is related to that topic.

[0019] As another example, if the input to the neural network system 100 is features of a flash scenario of a specific advertisement, the output generated by the neural network system 100 can be a score representing the estimated likelihood of clicking on that specific advertisement.

[0020] As another example, if the input to the neural network system 100 is features of a personalized recommendation for a user, e.g., features characterizing the scenario of the recommendation, e.g., features characterizing actions previously taken by the user, the output generated by the neural network system 100 can be scores for each content item in a content item set, where each score represents the estimated likelihood that the user will respond positively to the recommended content item.

[0021] As another example, if the input to the neural network system 100 is text in one language, the output generated by the neural network system 100 can be scores for each text segment in a set of text segments in another language, where each score represents the estimated likelihood that the text segment in the other language is a suitable translation of the input text into the other language.

[0022] As another example, if the input to neural network system 100 is a spoken utterance, a sequence of spoken utterances, or features derived from one of the former two, the output generated by neural network system 100 can be a score for each text segment in a set of text segments, where each score represents an estimated likelihood that the text segment is a correct transcription of the utterance or sequence of utterances.

[0023] As another example, neural network system 100 can be part of an autocomplete system or part of a text processing system.

[0024] As another example, neural network system 100 can be part of a reinforcement learning system and can generate an output for selecting an action to be performed by an agent interacting with an environment.

[0025] Specifically, each layer in the neural network is configured to receive an input and generate an output from the input, and the neural network layers together process the neural network inputs received by neural network system 100 to generate corresponding neural network outputs for each received neural network input. Some or all of the neural network layers in the sequence generate outputs from the input based on the current values of a set of parameters of the neural network layer. For example, some layers can multiply the received input by a matrix of current parameter values as part of generating an output from the received input.

[0026] Neural network system 100 further includes a batch normalization layer 108 that is between neural network layer A 104 and neural network layer B 112 in the sequence of neural network layers. Batch normalization layer 108 is configured to: during training of neural network system 100, perform a set of operations on the input received from neural network layer A 104, and, after neural network system 100 has been trained, perform another set of operations on the input received from neural network layer A 104.

[0027] Specifically, neural network system 100 can be trained based on multiple batches of training examples to determine training values for the parameters of the neural network layers. A batch of training examples is a set of multiple training examples. For example, during training, neural network system 100 can process batch of training examples 102 and generate corresponding neural network outputs for each training example in batch 102. Then, the neural network outputs are used to adjust the values of the parameters of the neural network layers in the sequence, e.g., by conventional gradient descent and backpropagation neural network training techniques.

[0028] During training of the neural network system 100 on a given batch of training examples, the batch normalization layer 108 is configured to receive the layer A output 106 generated by the neural network layer A 104 for the training examples in the batch, process the layer A output 106 to generate a corresponding batch normalization layer output 110 for each training example in the batch, and then provide the batch normalization layer output 110 as an input to the neural network layer B 112. The layer A output 106 includes corresponding outputs generated by the neural network layer A 104 for each training example in the batch. Similarly, the batch normalization layer output 110 includes corresponding outputs generated by the batch normalization layer 108 for each training example in the batch.

[0029] Typically, the batch normalization layer 108 calculates a set of normalization statistics for the batch based on the layer A output 106, normalizes the layer A output 106 to generate a corresponding normalized output for each training example in the batch, and, optionally, transforms each of the normalized outputs before providing the output as an input to the neural network layer B 112.

[0030] The normalization statistics calculated by the batch normalization layer 108 and the manner in which the batch normalization layer 108 normalizes the layer A output 106 during training depend on the nature of the neural network layer A 104 that generates the layer A output 106.

[0031] In some cases, the neural network layer A 104 is a layer that generates an output that includes multiple components indexed by dimensions. For example, the neural network layer A 104 can be a fully connected neural network layer. However, in some other cases, the neural network layer A 104 is a convolutional layer or other kind of neural network layer that generates an output that includes multiple components indexed by both feature indices and spatial positions. The generation of the batch normalization layer output during training of the neural network system 100 in each of these two cases will be described in more detail below with reference to Figure 2 More detailed descriptions of generating the batch normalization layer output during training of the neural network system 100 in each of these two cases.

[0032] Once the neural network system 100 has been trained, the neural network system 100 can receive a new neural network input for processing and process the neural network input through the neural network layers to generate a new neural network output for the input based on the trained values of the parameters of the components of the neural network system 100. The operations performed by the batch normalization layer 108 during processing of the new neural network input also depend on the nature of the neural network layer A 104. The processing of the new neural network input after the neural network system 100 has been trained will be described in more detail below with reference to Figure 3 More detailed descriptions of processing the new neural network input after the neural network system 100 has been trained.

[0033] The batch normalization layer 108 can be included at various positions in a sequence of neural network layers, and in some embodiments, multiple batch normalization layers can be included in the sequence.

[0034] In Figure 1 example, in some embodiments, the neural network layer A 104 generates an output by modifying the input to the layer according to the current value of a set of parameters of the first neural network layer (e.g., by multiplying the input to the layer by a matrix of the current parameter values). In these embodiments, the neural network layer B 112 can receive the output from the batch normalization layer 108 and generate an output by applying a non-linear operation (i.e., a non-linear activation function) to the output of the batch normalization layer. Thus, in these embodiments, the batch normalization layer 108 is inserted within a traditional neural network layer, and the operations of the traditional neural network layer are divided between the neural network layer A 104 and the neural network layer B 112.

[0035] In some other embodiments, the neural network layer A 104 generates an output by modifying the layer input according to the current value of the set of parameters to generate a modified first layer input and then applying a non-linear operation to the modified first layer input before providing the output to the batch normalization layer 108. Thus, in these embodiments, the batch normalization layer 108 is inserted after the traditional neural network layer in the sequence.

[0036] Figure 2 is a flowchart of an example process 200 for generating the output of a batch normalization layer during the training of a neural network based on a batch of training examples. For convenience, the process 200 is described as being performed by a system of one or more computers located in one or more locations. For example, a batch normalization layer included in a neural network system (e.g., the batch normalization layer 108 included in Figure 1 the neural network system 100) can be appropriately programmed to perform the process 200.

[0037] The batch normalization layer receives the lower layer output of a batch of training examples (step 202). The lower layer output includes the respective outputs generated by the layer below the batch normalization layer in the sequence of neural network layers for each training example in the batch.

[0038] The batch normalization layer generates the respective normalized outputs for each training example in the batch (step 204). That is, the batch normalization layer generates the respective normalized outputs from each received lower layer output.

[0039] In some cases, the layer below the batch normalization layer is a layer that generates an output that includes multiple components indexed by dimension.

[0040] In these cases, the batch normalization layer calculates the mean and standard deviation of the components of the lower layer output corresponding to each dimension for each dimension. The batch normalization layer then normalizes each component of each lower layer output in the lower layer output using the mean and standard deviation to generate the corresponding normalized output for each training example in the batch. Specifically, for a given component of a given output, the batch normalization layer normalizes the component using the mean and standard deviation calculated for the dimension corresponding to the component. For example, in some embodiments, for the component x corresponding to the k-th dimension of the i-th lower layer output from batch β k,i , the normalized output satisfies:

[0041]

[0042] where μ Β is the mean of the components corresponding to the k-th dimension of the lower layer output in batch β, and σ B is the standard deviation of the components corresponding to the k-th dimension of the lower layer output in batch β. In some embodiments, the standard deviation is a numerically stable standard deviation equal to (σ B 2 + ε) 1 / 2 , where ε is a constant value, and σ B 2 is the variance of the components corresponding to the k-th dimension of the lower layer output in batch β.

[0043] However, in some other cases, the neural network layer below the batch normalization layer is a convolutional layer or other types of neural network layers, and the other types of neural network layers generate an output including multiple components indexed by both a feature index and a spatial position index respectively.

[0044] In some of these cases, the batch normalization layer calculates the mean and variance of the components of the lower layer output having the feature index and the spatial position index for each possible combination of the feature index and the spatial position index. The batch normalization layer then calculates the average of the means of the feature index and spatial position index combinations including the feature index for each feature index. The batch normalization layer also calculates the average of the variances of the feature index and spatial position index combinations including the feature index for each feature index. Thus, after calculating the averages, the batch normalization layer has calculated the mean statistic for each feature across all spatial positions and the variance statistic for each feature across all spatial positions.

[0045] The batch normalization layer then normalizes each component of each lower layer output in the lower layer outputs using the mean of the means and the mean of the variances to generate a corresponding normalized output for each training example in the batch. Specifically, for a given component of a given output, the batch normalization layer uses the mean of the means and the mean of the variances corresponding to the feature index of the component (e.g., in the same manner as described above for the layer below the batch normalization layer generating outputs indexed by dimension) to normalize the component.

[0046] In other cases of these cases, the batch normalization layer calculates the mean and variance of the components of the lower layer output corresponding to the feature index for each feature index (i.e., the lower layer output having that feature index).

[0047] The batch normalization layer then normalizes each component of each lower layer output in the lower layer outputs using the mean and variance of the feature indices to generate a corresponding normalized output for each training example in the batch. Specifically, for a given component of a given output, the batch normalization layer then uses the mean and variance of the feature index corresponding to the component (e.g., in the same manner as described above for the layer below the batch normalization layer generating outputs indexed by dimension) to normalize the component.

[0048] Optionally, the batch normalization layer transforms each component of each normalized output (step 206).

[0049] In the case where the layer below the batch normalization layer is a layer that generates an output including a plurality of components indexed by dimension, the batch normalization layer transforms each component of each normalized output in the dimension according to the current value of the parameter set for the dimension. That is, the batch normalization layer maintains a corresponding parameter set for each dimension and uses these parameters to apply the transformation to the components of the normalized output in the dimension. The values of the parameter set are adjusted as part of the training of the neural network system. For example, in some embodiments, the transformed normalized output y generated from the normalized output k,i satisfies:

[0050]

[0051] where γ k and A k are parameters for the k-th dimension.

[0052] When the layer below the batch normalization layer is a convolutional layer, the batch normalization layer transforms each component of each normalized output in the normalized output according to the current value of the parameter set corresponding to the feature index of that component. That is, the batch normalization layer maintains a corresponding parameter set for each feature index and uses these parameters to apply the transformation to the components of the normalized output with the feature index, for example, in the same manner as described above when the layer below the batch normalization layer generates an output indexed by dimension. The value of the parameter set is adjusted as part of the training of the neural network system.

[0053] The batch normalization layer provides the normalized output or the transformed normalized output as the input to the layer above the batch normalization layer in the sequence (step 208).

[0054] After the neural network has generated the neural network output for the training examples in the batch, the normalization statistics are backpropagated as part of adjusting the values of the parameters of the neural network, that is, as part of performing the backpropagation training technique.

[0055] Figure 3 is a flowchart of an example process 300 for generating the output of the batch normalization layer for a new neural network input after the neural network has been trained. For convenience, process 300 is described as being executed by a system of one or more computers located in one or more locations. For example, the batch normalization layer included in the neural network system (e.g., the batch normalization layer 108 in the neural network system 100 included in Figure 1 can execute process 300 when appropriately programmed.

[0056] The batch normalization layer receives the output of the lower layer of the new neural network input (step 302). The lower layer output is the output generated by the layer below the batch normalization layer in the sequence of neural network layers for the new neural network input.

[0057] The batch normalization layer generates a normalized output of the new neural network input (step 304).

[0058] If the output generated by the layer below the batch normalization layer is indexed by dimension, the batch normalization layer normalizes each component in the lower layer output using the pre-computed mean and standard deviation for each dimension in the dimension to generate the normalized output. In some cases, the mean and standard deviation for a given dimension are calculated from the components in the dimension of all outputs generated by the layer below the batch normalization layer during the training of the neural network system.

[0059] However, in some other cases, the mean and standard deviation of a given dimension are calculated based on components in the dimensions of the lower layer output generated by the layers below the batch normalization layer after training (e.g., based on the lower layer output generated during the most recent time window of a specified duration or from a specified number of the most recently generated lower layer outputs by the layers below the batch normalization layer).

[0060] Specifically, in some cases, the distribution of the network input can change between the training examples used during training and the new neural network inputs used after the neural network system has been trained. Thus, the distribution of the lower layer outputs can change between them. For example, if the new neural network inputs are of a different kind than the training examples. For instance, a neural network system has been trained based on user images and can now be used to process video frames. The user images and video frames may have different distributions in terms of the classes pictured, image attributes, composition, etc. Thus, using the statistics from training to normalize the lower layer inputs may not accurately capture the statistics of the lower layer outputs generated for the new inputs. Therefore, in these cases, the batch normalization layer can use the normalization statistics calculated based on the lower layer outputs generated by the layers below the batch normalization layer after training.

[0061] If the output generated by the layers below the batch normalization layer is indexed by a feature index and a spatial location index, the batch normalization layer normalizes each component of the lower layer output using the pre-computed mean of the means and the mean of the variances for each feature index in the feature index to generate a normalized output. In some cases, as described above, the mean of the means and the mean of the variances for a given feature index are calculated based on the outputs generated by the layers below the batch normalization layer for all the training examples used during training. In some other cases, as described above, the mean and standard deviation for a given feature index are calculated based on the lower layer outputs generated by the layers below the batch normalization layer after training.

[0062] Optionally, the batch normalization layer transforms each component of the normalized output (step 306).

[0063] If the output generated by the layer below the batch normalization layer is indexed by dimension, the batch normalization layer transforms the components of the normalized output in each dimension according to the training values of the parameter set for that dimension. If the output generated by the layer below the batch normalization layer is indexed by feature index and spatial location index, the batch normalization layer transforms each component of the normalized output according to the training values of the parameter set corresponding to the feature index of the component. The batch normalization layer provides the normalized output or the transformed normalized output as the input to the layer above the batch normalization layer in the sequence (step 308).

[0064] Embodiments of the subject matter and the functional operations described in this specification can be implemented in digital electronic circuitry, in tangibly embodied computer software or firmware, in computer hardware including the structures disclosed in this specification and their structural equivalents, or in combinations of one or more of them. Embodiments of the subject matter described in this specification can be implemented as one or more computer programs, i.e., one or more modules of computer program instructions encoded on a tangible non-transitory program carrier for execution by, or to control the operation of, data processing apparatus. Alternatively or additionally, the program instructions can be encoded on an artificially generated propagated signal (e.g., a machine-generated electrical, optical, or electromagnetic signal) that is generated to encode information for transmission to a suitable receiver apparatus for execution by the data processing apparatus. A 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 them.

[0065] The term “data processing apparatus” encompasses all kinds of apparatus, devices, and machines for processing data, including, for example, programmable processors, computers, or multiple processors or computers. The apparatus may include special purpose logic circuitry, such as an FPGA (field programmable gate array) or an ASIC (application specific integrated circuit). In addition to hardware, the apparatus may also include code that creates an execution environment for the computer programs being discussed, such as code that constitutes processor firmware, a protocol stack, a database management system, an operating system, or a combination of one or more of them.

[0066] A computer program (which may also be referred to or described as a program, software, software application, module, software module, script, or code) can be written in any form of programming language (including compiled or interpreted languages, declarative or procedural languages), and the computer program can be deployed in any form (including as a stand-alone program or as a module, component, subroutine, or other unit suitable for a computing environment). A computer program may or may not correspond to a file in a file system. The program can be stored in a part of a file that holds other programs or data (e.g., one or more scripts in a markup language document), stored in a single file dedicated to the program in question or in multiple co-operating files (e.g., files that hold one or more modules, subroutines, or portions of code). The computer program can be deployed to execute on one computer or multiple computers located at one site or distributed across multiple sites and interconnected by a communication network.

[0067] The processes and logical flows described in this specification can be performed by one or more programmable computers that execute one or more computer programs to perform functions by operating on input data and generating output. The processes and logical flows can also be performed by special purpose logic circuitry, e.g., an FPGA (Field Programmable Gate Array) or an ASIC (Application Specific Integrated Circuit), and the apparatus can also be implemented as special purpose logic circuitry.

[0068] A computer suitable for executing a computer program can be, for example, based on a general or special purpose microprocessor or both, or any other kind of central processing unit. Generally speaking, the central processing unit will receive instructions and data from a read-only memory or a random access memory or both. The basic elements of a computer are a central processing unit for performing or executing instructions and one or more memory devices for storing instructions and data. Generally speaking, a computer also includes one or more mass storage devices (e.g., magnetic disks, magneto-optical disks, or optical disks) for storing data, or can be operatively coupled to receive data from such mass storage devices or transfer data to such mass storage devices or do both. However, a computer need not have such devices. In addition, a computer can be embedded in another device, such as, for example, a mobile phone, a personal digital assistant (PDA), a mobile audio or video player, a game console, a global positioning system (GPS) receiver, or a portable storage device (e.g., a universal serial bus (USB) flash drive), to name just a few. Computer-readable media suitable for storing computer program instructions and data include all forms of non-volatile memory, media, and memory devices, including: for example, semiconductor memory devices (e.g., EPROM, EEPROM, and flash memory devices), magnetic disks (e.g., internal hard disks or removable disks), magneto-optical disks, CD-ROM disks, and DVD-ROM disks. The processor and memory can be supplemented by, or incorporated in, special purpose logic circuitry.

[0069] To provide interaction with a user, embodiments of the subject matter described in this specification can be implemented on a computer having a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user, a keyboard, and a pointing device (such as a mouse or a trackball), by which the user can provide input to the computer. Other kinds of devices can also be used to provide interaction with the user; for example, the feedback provided to the user can be any form of sensory feedback, such as, for example, visual feedback, auditory feedback, or tactile feedback; and the input received from the user can be received in any form, including sound, voice, or tactile input. Additionally, a computer can interact with a user by sending documents to and receiving documents from the devices used by the user (e.g., by sending a web page to a web browser on a user's client device in response to a request received from the web browser).

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

[0071] A computing system can include clients and servers. Clients and servers are generally remote from each other and typically interact through a communication network. The relationship between a client and a server arises from computer programs that run on the respective computers and have a client-server relationship with each other.

[0072] Although this specification contains many specific implementation details, these details should not be construed as limitations on the scope of any invention or of what may be claimed, but rather as descriptions of features specific to particular embodiments of a particular invention. Certain features that are described in this specification in the context of separate embodiments can also be implemented in combination in a single embodiment. Conversely, various features that are described in the context of a single embodiment can also be implemented separately or in any suitable sub-combination in multiple embodiments. Moreover, although features may be described above as acting in certain combinations and even initially claimed as such, in some cases one or more features from a claimed combination can be excluded from the combination, and the claimed combination can be directed to a sub-combination or a variant of a sub-combination.

[0073] Likewise, although operations are depicted in the drawings in a particular order, this should not be understood as requiring that the operations be performed in the particular order shown or in sequential order, or that all illustrated operations be performed to achieve a desired result. In certain circumstances, multitasking and parallel processing may be advantageous. Moreover, the separation of various system modules and components in the above embodiments should not be understood as requiring such separation in all embodiments, and it should be understood that the described program components and systems can generally be integrated together in a single software product or packaged into multiple software products.

[0074] Specific embodiments of the subject matter have been described. Other embodiments are within the scope of the following claims. For example, the acts recited in the claims can be performed in a different order and still achieve the desired result. As one example, the processes shown in the figures need not be in the particular order or sequential order shown to achieve the desired result. In certain embodiments, multitasking and parallel processing may be beneficial.

Claims

1. A method for training a neural network, where the neural network has a batch normalization layer between a first neural network layer and a second neural network layer, wherein, the first neural network layer generates a first layer output having a plurality of components, the plurality of components being indexed by dimensions, and wherein the method includes: during training of the neural network on a plurality of training data batches, each batch including a corresponding plurality of training examples, and for each batch in the batches: receiving the corresponding first layer output of each training example in the plurality of training examples in the batch; for each dimension, calculating the average value of the plurality of components of the first layer output in the dimension; for each dimension, calculating the standard deviation of the plurality of components of the first layer output in the dimension; normalizing each component in the plurality of components of each first layer output to generate a corresponding normalized layer output for each training example in the batch, including: for each first layer output and for each component in the plurality of components, normalizing the component of the first layer output using the average value calculated for the dimension corresponding to the component and the standard deviation calculated for the dimension corresponding to the component; generating a corresponding batch normalization layer output for each training example in the training examples according to the normalized layer output; and providing the batch normalization layer output as an input to the second neural network layer.

2. The method according to claim 1, wherein, The standard deviation of the component output by the first layer in the dimension is equal to (σ B 2 + ε) 1 / 2 is a numerically stable standard deviation, where ε is a constant value and σ B 2 is the variance of the component output by the first layer in the dimension.

3. The method according to claim 1, wherein, generating the corresponding batch normalization layer output for each training example in the training examples from the normalized layer output includes: for each training example in the training examples, for each dimension, transforming the component of the normalized layer output of the training example in the dimension according to the current value of the parameter set for the dimension.

4. The method according to claim 3, wherein, the batch normalization layer is configured to, after the neural network system has been trained to determine the training values of the parameter sets for each dimension: receive a new first layer output generated by the first neural network layer for a new neural network input; normalizing each component of the new first layer output using the pre-computed average value and standard deviation statistics for the dimension to generate a new normalized layer output; generating a new batch normalization layer output by transforming the component of the new normalized layer output of the training example in the dimension according to the training value of the parameter set for the dimension for each dimension; and providing the batch normalization layer output as a new layer input to the second neural network layer.

5. The method according to claim 4, wherein, the pre-computed average value and standard deviation statistics for the dimension are calculated according to the first layer output generated by the first neural network layer during the training of the neural network.

6. The method according to claim 4, wherein, the pre-computed mean and standard deviation statistics for the dimension are calculated based on new first-layer outputs generated by the first neural network layer after the neural network has been trained.

7. The method according to claim 6, wherein, the new neural network input processed by the neural network system after the neural network system has been trained is an input of a type different from the training examples used to train the neural network system.

8. The method according to claim 1, wherein, the first neural network layer generates the first-layer output by modifying the first-layer input according to the current values of the parameter set of the first neural network layer.

9. The method according to claim 8, wherein, the second neural network layer generates a second-layer output by applying a non-linear operation to the batch normalization layer output.

10. The method according to claim 1, wherein, the first neural network layer generates the first-layer output by modifying the first-layer input according to the current values of the parameter set to generate a modified first-layer input and then applying a non-linear operation to the modified first-layer input.

11. The method according to claim 1, further comprising, during the training of the neural network, backpropagating the mean and the standard deviation as part of adjusting the parameter values of the neural network.

12. A system, the system comprising one or more computers and one or more storage devices storing instructions which, when executed by the one or more computers, cause the one or more computers to perform operations for training a neural network having a batch normalization layer between a first neural network layer and a second neural network layer in the neural network, wherein, the first neural network layer generates a first-layer output having a plurality of components indexed by dimension, and wherein the operations include: during the training of the neural network on a plurality of training data batches, each batch comprising a respective plurality of training examples, and for each batch in the plurality of batches: receiving the respective first-layer outputs of each training example in the plurality of training examples in the batch; for each dimension in the plurality of dimensions, calculating the mean of the plurality of components of the first-layer output in the dimension; for each dimension in the plurality of dimensions, calculating the standard deviation of the plurality of components of the first-layer output in the dimension; normalizing each component of the plurality of components of each first-layer output to generate a respective normalized layer output for each training example in the batch, including: for each first-layer output and for each component of the plurality of components, normalizing the component of the first-layer output using the mean calculated for the dimension corresponding to the component and the standard deviation calculated for the dimension corresponding to the component; Generate a corresponding batch normalization layer output for each training example in the training examples according to the output of the normalization layer; and Provide the batch normalization layer output as an input to the second neural network layer.

13. The system according to claim 12, wherein, The standard deviation of the component output by the first layer in the dimension is equal to (σ B 2 + ε) 1 / 2 which is a numerically stable standard deviation, where ε is a constant value and σ B 2 is the variance of the component output by the first layer in the dimension.

14. The system according to claim 12, wherein, Generating the corresponding batch normalization layer output for each training example in the training examples from the output of the normalization layer includes: For each training example in the training examples, for each dimension, transform the component of the output of the normalization layer of the training example in the dimension according to the current value of the parameter set for the dimension.

15. The system according to claim 14, wherein, The batch normalization layer is configured to, after the neural network system has been trained to determine the training values of the parameter sets for each dimension in the dimension: Receive a new first layer output generated by the first neural network layer for a new neural network input; Normalize each component of the new first layer output using pre-computed mean and standard deviation statistics for the dimension to generate a new normalization layer output; Generate a new batch normalization layer output by transforming the component of the new normalization layer output of the training example in the dimension according to the training value of the parameter set for the dimension for each dimension; and Provide the batch normalization layer output as a new layer input to the second neural network layer.

16. The system according to claim 15, wherein, The pre-computed mean and standard deviation statistics for the dimension are calculated based on the first layer output generated by the first neural network layer during the training of the neural network.

17. The system according to claim 15, wherein, The pre-computed mean and standard deviation statistics for the dimension are calculated based on a new first layer output generated by the first neural network layer after the neural network has been trained.

18. The system according to claim 17, wherein, The new neural network input processed by the neural network system after the neural network system has been trained is an input of a different type from the training examples used to train the neural network system.

19. The system according to claim 12, wherein, The first neural network layer generates the first layer output by modifying the first layer input according to the current value of the parameter set of the first neural network layer.

20. The system according to claim 19, wherein, The second neural network layer generates a second layer output by applying a non-linear operation to the batch normalization layer output.

21. The system according to claim 12, wherein, The first neural network layer generates the first layer output by modifying the first layer input according to the current value of the parameter set to generate a modified first layer input and then applying a non-linear operation to the modified first layer input.

22. The system according to claim 12, further comprising, during the training of the neural network, backpropagating the mean value and the standard deviation as part of adjusting the parameter values of the neural network.

23. One or more non-transitory computer-readable storage media storing instructions that, when executed by one or more computers, cause the one or more computers to perform operations for training a neural network that has a batch normalization layer between a first neural network layer and a second neural network layer in the neural network, wherein, the first neural network layer generates a first layer output having a plurality of components indexed by dimension, and wherein the operations include: during the training of the neural network on a plurality of training data batches, each batch including a respective plurality of training examples, and for each batch in the batches: receiving the respective first layer output of each training example in the batch; for each dimension, calculating the mean value of the plurality of components of the first layer output in the dimension; for each dimension, calculating the standard deviation of the plurality of components of the first layer output in the dimension; normalizing each component of the plurality of components of each first layer output to generate a respective normalized layer output for each training example in the batch, including: for each first layer output and for each component of the plurality of components, normalizing the component of the first layer output using the mean value calculated for the dimension corresponding to the component and the standard deviation calculated for the dimension corresponding to the component; generating a respective batch normalization layer output for each training example in the training examples according to the normalized layer output; and providing the batch normalization layer output as an input to the second neural network layer.

24. The computer-readable storage medium according to claim 23, wherein, The standard deviation of the component output by the first layer in the dimension is equal to (σ B 2 + ε) 1 / 2 which is a numerically stable standard deviation, where ε is a constant value and σ B 2 is the variance of the component output by the first layer in the dimension.

25. The computer-readable storage medium according to claim 23, wherein, generating the respective batch normalization layer output for each training example in the training examples from the normalized layer output includes: for each training example in the training examples, for each dimension, transforming the component of the normalized layer output of the training example in the dimension according to the current value of the parameter set for the dimension.

26. The computer-readable storage medium according to claim 25, wherein, the batch normalization layer is configured to, after the neural network system has been trained to determine the training values of the parameter sets for each dimension: receive a new first layer output generated by the first neural network layer for a new neural network input; normalize each component of the new first layer output using the pre-computed mean value and standard deviation statistics for the dimension to generate a new normalized layer output; Generating a new batch normalization layer output by transforming the components of the new normalized layer output of the training examples in the dimension according to the training values of the parameter set of the dimension for each dimension; and Providing the batch normalization layer output as a new layer input to the second neural network layer.

27. The computer-readable storage medium according to claim 23, wherein, The first neural network layer generates the first layer output by modifying the first layer input according to the current value of the parameter set of the first neural network layer.

28. The computer-readable storage medium according to claim 27, wherein, The second neural network layer generates a second layer output by applying a non-linear operation to the batch normalization layer output.

29. The computer-readable storage medium according to claim 23, wherein, The first neural network layer generates the first layer output by modifying the first layer input according to the current value of the parameter set to generate a modified first layer input and then applying a non-linear operation to the modified first layer input.

30. The computer-readable storage medium according to claim 23, further comprising, during the training of the neural network, backpropagating the mean and the standard deviation as part of adjusting the parameter values of the neural network.

Citation Information

Patent Citations

  • Discriminative pretraining of Deep Neural Network

    CN103049792A

  • Linguistic model training method and system based on distributed neural networks

    CN103810999A

  • Classifying Resources Using a Deep Network

    US20140279774A1