Batch normalization layer
By integrating a batch normalization layer to stabilize input distribution, neural networks can be trained more efficiently and accurately, addressing training inefficiencies and enhancing learning rate capabilities.
Patent Information
- Application Number
- JP2024131114
- Authority / Receiving Office
- JP · JP
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2015-01-28
- Filing Date
- 2024-08-07
- Publication Date
- 2024-12-03
- Estimated Expiration
- 2036-01-28
AI Technical Summary
Neural networks face challenges in training efficiency and accuracy due to changes in input distribution during the training process, which can be exacerbated by the need for multiple normalization techniques, such as dropout, and limit the use of higher learning rates.
Incorporating a batch normalization layer between neural network layers to normalize statistics for each training example within a batch, thereby stabilizing the input distribution and reducing the need for additional normalization techniques, allowing for faster training and higher learning rates.
The inclusion of batch normalization layers enables quicker training, reduces the reliance on other normalization methods, and results in a neural network that maintains or exceeds the accuracy of networks without such layers, producing stable and accurate outputs.
Smart Images

Figure 2024167228000001_ABST
Abstract
Description
[Technical field]
[0001] This specification relates to processing inputs through layers of neural networks to generate outputs. [Background technology]
[0002] A neural network is a machine learning model that uses one or more layers of nonlinear units to predict an output for a received input. Some neural networks contain one or more hidden layers in addition to an output layer. The output of each hidden layer is used as the input for the next layer in the network, i.e., the next hidden layer or the output layer. Each layer of the network generates an output from the received input according to the current values of each set of parameters. Summary of the Invention [Means for solving the problem]
[0003] In general, one inventive aspect of the subject matter described herein may be embodied in one or more computer-implemented neural network systems with a batch normalization layer between a first neural network layer and a second neural network layer, the first neural network layer generating a first layer output having a plurality of components, the batch normalization layer being configured, during training of the neural network system on a batch of training examples, to receive a respective first layer output for each training example in the batch, calculate a plurality of normalization statistics for the batch from the first layer outputs, normalize each component of each first layer output using the normalization statistics to generate a respective normalized layer output for each training example in the batch, generate a respective batch normalization layer output for each of the training examples from the normalized layer outputs, and provide the batch normalization layer outputs as inputs to the second neural network layer.
[0004] When one or more computer systems are configured to perform a particular operation or action, it means that the system has installed thereon software, firmware, hardware, or a combination thereof that, when in operation, causes the system to perform that operation or action. When one or more computer programs are configured to perform a particular operation or action, it means that the one or more programs contain instructions that, when executed by a data processing device, cause the device to perform that operation or action.
[0005] Certain embodiments of the subject matter described herein may be implemented to achieve one or more of the following advantages: A neural network system including one or more batch normalization layers may be trained more quickly than an ideal neural network that does not include any batch normalization layers. For example, including one or more batch normalization layers in the neural network system may mitigate issues caused by changes in the distribution of inputs of a given layer during training. This allows for a higher learning rate to be effectively used during training and may mitigate the impact of how parameters are initialized in the training process. Additionally, during training, the batch normalization layer may act as a normalizer, reducing the need for other normalization techniques, such as dropout, to be used during training. Once trained, a neural network system including a normalization layer may generate neural network outputs that are as accurate, if not more accurate, than neural network outputs generated by an ideal neural network system.
[0006] The details of one or more embodiments of the subject matter herein are set forth in the accompanying drawings and the description below. Other features, aspects, and advantages of the subject matter will become apparent from the description, drawings, and claims. [Brief description of the drawings]
[0007] [Figure 1] FIG. 1 illustrates an exemplary neural network system. [Diagram 2] 1 is a flow diagram of an example process for processing inputs with a batch normalization layer during training of the neural network system. [Diagram 3] 1 is a flow diagram of an exemplary process for processing inputs using batch normalization after the neural network system has been trained. DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS
[0008] Like reference numbers and designations in the various drawings indicate like elements.
[0009] This specification describes a neural network system implemented as a computer program on one or more computers in one or more locations, including a batch normalization layer.
[0010] 1 illustrates an exemplary neural network system 100. Neural network system 100 is one example of a system implemented as a computer program on one or more computers at one or more locations in which the systems, components, and techniques described below may be implemented.
[0011] The neural network system 100 includes a number of neural network layers arranged in sequence from a lowest layer to a highest layer, and generates a neural network output from a neural network input by processing the neural network input through each of the layers in the sequence.
[0012] The neural network system 100 can be configured to receive any type of digital data input and generate any type of score or classification output based on the input.
[0013] For example, if the input to the neural network system 100 is an image or features being extracted from the image, the output generated by the neural network system 100 for a given image may be a score for each of a set of object categories, with each score representing an estimated likelihood that the image contains an image of an object belonging to that category.
[0014] As another example, if the input to the neural network system 100 is an Internet resource (e.g., a web page), a document, a portion of a document or features extracted from an Internet resource, a document, or a document portion, the output generated by the neural network system 100 for a given Internet resource, document, or document portion may be a score for each of a set of topics, with each score representing an estimated likelihood that the Internet resource, document, or document portion is related to that topic.
[0015] As another example, if the input to the neural network system 100 is impression context features for a particular advertisement, the output generated by the neural network system 100 may be a score representing an estimated likelihood that the particular advertisement will be clicked on.
[0016] As another example, if the inputs to the neural network system 100 are features of a personalized recommendation for a user, e.g., features characterizing the context for the recommendation, e.g., features characterizing past actions taken by the user, the output generated by the neural network system 100 may be a score for each of a set of content items, each score representing an estimated likelihood that the user will respond favorably to that content item being recommended.
[0017] 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 may be a score for each of a set of text in another language, with each score representing an estimated likelihood that the text in the other language is an accurate transformation of the input text into the other language.
[0018] As another example, if the input to the neural network system 100 is an utterance, a sequence of utterances, or features derived from one of the two, the output generated by the neural network system 100 may be a score for each of a set of text, each score representing an estimated likelihood that the text is an accurate transcript for the utterance or sequence of utterances.
[0019] As another example, the neural network system 100 can be part of an automatic input system or part of a text processing system.
[0020] As another example, the neural network system 100 can be part of a reinforcement learning system and can generate outputs that are used to select actions to be taken by an agent interacting with an environment.
[0021] In particular, each of the layers of the neural network is configured to receive inputs and generate outputs from the inputs, and the neural network layers collectively process the neural network inputs received by the neural network system 100 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 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 an output from the received inputs.
[0022] Neural network system 100 also includes a batch normalization layer 108 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 perform one set of operations on inputs received from neural network layer A 104 while neural network system 100 is training, and another set of operations on inputs received from neural network layer A 104 after neural network system 100 has been trained.
[0023] In particular, the neural network system 100 can be trained on multiple batches of training examples to determine trained values of the parameters of the neural network layers. A batch of training examples is a set of training examples. For example, during training, the neural network system 100 can process a batch 102 of training examples and generate a respective neural network output for each training example in the batch 102. The neural network outputs can then be used to adjust the values of the parameter layers of the neural network in the sequence, for example, through conventional gradient descent and backpropagation neural network training techniques.
[0024] 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 outputs 106 generated by the neural network layer A 104 for the training examples in the batch, process the layer A outputs 106 to generate respective batch normalization layer outputs 110 for each training example in the batch, and then provide the batch normalization layer outputs 110 as inputs to the neural network layer B 112. The layer A outputs 106 include the respective outputs generated by the neural network layer A 104 for each training example in the batch. Similarly, the batch normalization layer outputs 110 include the respective outputs generated by the batch normalization layer 108 for each training example in the batch.
[0025] In general, the batch normalization layer 108 computes a set of normalization statistics for the batch from the layer A outputs 106, normalizes the layer A outputs 106 to generate a respective normalized output for each training example in the batch, and optionally transforms each of the normalized outputs before providing them as inputs to the neural network layer B 112.
[0026] The normalization statistics computed by the batch normalization layer 108 and the manner in which the batch normalization layer 108 normalizes the layer A outputs 106 during training depend on the nature of the neural network layer A 104 that generates the layer A outputs 106.
[0027] In some cases, the neural network layer A104 is a layer that generates an output that includes multiple components indexed by a dimension. For example, the neural network layer A104 may be a fully connected neural network layer. In some other cases, however, the neural network layer A104 is a convolutional layer or other type of neural network layer that generates an output that includes multiple components that are each indexed by both a feature index and a spatial location index. Generating batch normalization layer outputs during training of the neural network system 100 in each of these two cases is described in more detail below with reference to FIG. 2.
[0028] Once the neural network system 100 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 those inputs according to 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 the processing of the new neural network inputs also depend on the nature of the neural network layer A 104. The processing of new neural network inputs after the neural network system 100 has been trained is described in more detail below with reference to FIG. 3.
[0029] The batch normalization layer 108 may be included at various positions within the sequence of neural network layers, and in some implementations, multiple batch normalization layers may be included in the sequence.
[0030] In the example of FIG. 1, in some implementations, neural network layer A 104 generates outputs by modifying inputs to the first neural network layer according to current values of a set of parameters for that layer, e.g., by multiplying the inputs to the layer by a matrix of the current parameter values. In these implementations, neural network layer B 112 may receive outputs from batch normalization layer 108 and generate outputs by applying a nonlinear operation, i.e., a nonlinear activation function, to the batch normalization layer outputs. Thus, in these implementations, batch normalization layer 108 is inserted inside a conventional neural network layer, and the operation of the conventional neural network layer is split between neural network layer A 104 and neural network layer B 112.
[0031] In some other implementations, the neural network layer A 104 generates the output by modifying the layer inputs according to the current values of a set of parameters to generate modified first layer inputs, and then applying a nonlinear operation to the modified first layer inputs before providing the output to the batch normalization layer 108. Thus, in these implementations, the batch normalization layer 108 is inserted after the conventional neural network layers in the sequence.
[0032] 2 is a flow diagram of an exemplary process 200 for generating batch normalization layer output during training of a neural network on a batch of training examples. For convenience, process 200 is described as being performed by one or more computer systems located at one or more locations. For example, a suitably programmed batch normalization layer included in a neural network system, such as batch normalization layer 108 included in neural network system 100 of FIG. 1, can perform process 200.
[0033] The batch normalization layer receives lower layer outputs for a batch of training examples (step 202), which include the respective outputs generated for each training example in the batch by layers below the batch normalization layer in the sequence of neural network layers.
[0034] The batch normalization layer generates a respective normalized output for each training example in the batch (step 204), i.e., the batch normalization layer generates a respective normalized output from each received lower layer output.
[0035] In some cases, the layer below the batch normalization layer is a layer that produces an output that includes multiple components indexed by dimension.
[0036] In these cases, the batch normalization layer computes, for each dimension, the mean and standard deviation of the components of the lower layer outputs that correspond to that dimension. The batch normalization layer then normalizes each component of each of those lower level outputs using the mean and standard deviation to generate a respective normalized output for each of the training examples in the batch. In particular, for a given component of a given output, the batch normalization layer normalizes that component using the mean and standard deviation computed for the dimension that corresponds to that component. For example, in some implementations, the component corresponding to the kth dimension of the i-th lower layer output from batch β is normalized using the mean and standard deviation computed for the kth dimension of the i-th lower layer output from batch β.
[0037]
number
[0038] For, the normalized output
[0039]
number
[0040] teeth
[0041]
number
[0042] Satisfy μ B is the average of the components corresponding to the k-th dimension of the lower layer outputs in batch β, and σ B is the standard deviation of the components corresponding to the k-th dimension of the lower layer outputs in batch β. In some implementations, the standard deviation is
[0043]
number
[0044] where ε is a constant value and
[0045]
number
[0046] is the variance of the component corresponding to the kth dimension of the lower layer outputs in batch β.
[0047] In some other cases, however, the neural network layer below the batch normalization layer is a convolutional layer or other kind of neural network layer that produces an output that contains multiple components, each indexed by both a feature index and a spatial location index.
[0048] In some of these cases, the batch normalization layer calculates, for each possible combination of feature index and spatial location index, the mean and variance of the components of the lower layer output with that feature index and spatial location index. The batch normalization layer then calculates, for each feature index, the arithmetic mean of the means over combinations of feature index and spatial location index that include that feature index. The batch normalization layer also calculates, for each feature index, the arithmetic mean of the variances over combinations of feature index and spatial location index that include that feature index. Thus, after calculating the arithmetic means, the batch normalization layer calculates a mean statistic for each feature across all of its spatial locations and a variance statistic for each feature across its spatial locations.
[0049] The batch normalization layer then normalizes each component of each of the lower level outputs using the mean and arithmetic mean variance to generate a respective normalized output for each of the training examples in the batch. In particular, for a given component of a given output, the batch normalization layer normalizes that component using the mean and arithmetic mean variance over the component's corresponding feature index, e.g., in the same manner as described above when the layer below the batch normalization layer generates dimensionally indexed outputs.
[0050] In the rest of these cases, the batch normalization layer computes, for each feature index, the mean and variance of the components of the lower layer outputs that correspond to, i.e. have, that feature index.
[0051] The batch normalization layer then normalizes each component of each of the lower-level outputs using the mean and variance over the feature index to generate a respective normalized output for each of the training examples in the batch. In particular, for a given component of a given output, the batch normalization layer normalizes that component using the mean and variance over the feature index corresponding to that component, e.g., in the same manner as described above when the layer below the batch normalization layer generates dimensionally indexed outputs.
[0052] In some cases, the batch normalization layer transforms each component of each normalized output (step 206).
[0053] In the case where the layer below the batch normalization layer is a layer that generates an output containing multiple components indexed by dimensions, the batch normalization layer transforms, for each dimension, each normalized output component in that dimension according to the current values of a set of parameters for that dimension. That is, the batch normalization layer maintains a respective set of parameters for each dimension and uses these parameters to apply a transformation to the normalized output components in that dimension. The values of the set of parameters are adjusted as part of training the neural network system. For example, in some implementations, the normalized output
[0054]
number
[0055] The transformed normalized output generated from
[0056]
number
[0057] teeth
[0058]
number
[0059] Meet the following.
[0060]
number
[0061] is the parameter for the kth dimension.
[0062] In the case where the layer below the batch normalization layer is a convolutional layer, the batch normalization layer transforms, for each component of the normalized output, that component according to the current values of a set of parameters for the feature index corresponding to that component. That is, the batch normalization layer maintains a respective set of parameters for each feature index and uses these parameters to apply a transformation to the component of the normalized output having that feature index, e.g., in the same manner as described above when the layer below the batch normalization layer generates a dimensionally indexed output. The values of the set of parameters are tuned as part of the training of the neural network system.
[0063] The batch normalization layer provides the normalized output or the transformed normalized output as input to the layer above the batch normalization layer in the sequence (step 208).
[0064] After the neural network has generated neural network outputs for the training examples in a batch, the normalized statistics are backpropagated as part of adjusting the values of the neural network's parameters, i.e., as part of implementing the backpropagation training technique.
[0065] 3 is a flow diagram of an exemplary process 300 for generating a batch normalization layer output for a new neural network input after the neural network has been trained. For convenience, the process 300 is described as being performed by one or more computer systems located at one or more locations. For example, a suitably programmed batch normalization layer included in a neural network system, such as batch normalization layer 108 included in neural network system 100 of FIG. 1, can perform the process 300.
[0066] The batch normalization layer receives lower layer outputs for a new neural network input (step 302), the lower layer outputs being outputs generated for the new neural network input by layers below the batch normalization layer in the sequence of neural network layers.
[0067] The batch normalization layer generates a normalized output for the new neural network input (step 304).
[0068] If the outputs generated by the layers below the batch normalization layer are indexed by dimension, the batch normalization layer normalizes each component of the lower layer output with a pre-computed mean and standard deviation for each of those dimensions to generate a normalized output. In some cases, the mean and standard deviation for a given dimension are calculated from the components in all dimensions of the outputs generated by the layers below the batch normalization layer during training of the neural network system.
[0069] In some other cases, however, the mean and standard deviation for a given dimension are calculated from the components in the dimension of lower layer outputs generated by layers below the batch normalization layer after training, e.g., from lower layer outputs generated within the most recent time window of a specified period, or from a specified number of lower layer outputs most recently generated by layers below the batch normalization layer.
[0070] In particular, in some cases the distribution of network inputs, and therefore the distribution of lower layer outputs, may change between the training examples used during training and the new neural network inputs used after the neural network system is trained, for example, when the new neural network inputs are different types of inputs than the training examples. For example, a neural network system may be trained on user images and used to process video frames. The user images and video frames may have different distributions in terms of captured classes, image properties, configurations, etc. Thus, normalizing the lower layer inputs with statistics from training may not accurately capture the statistics of the lower layer outputs being generated for the new inputs. Thus, in these cases, the batch normalization layer may use normalization statistics calculated from the lower layer outputs generated by layers below the batch normalization layer after training.
[0071] If the outputs generated by the layers below the batch normalization layer are indexed by feature index and spatial location index, the batch normalization layer normalizes each component of the lower layer outputs using the pre-computed mean and average variance for each of the feature indexes to generate normalized outputs. In some cases, as described above, the mean and average variance for a given feature index are calculated from the outputs generated by the layers below the batch normalization layer for all of 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 from the lower layer outputs generated by the layers below the batch normalization layer after training.
[0072] Optionally, a batch normalization layer transforms each component of the normalized output (step 306).
[0073] If the outputs generated by the layers below the batch normalization layer are indexed by dimension, then for each dimension, the batch normalization layer transforms the components of the normalized output in that dimension according to the trained values of the set of parameters for that dimension. If the outputs generated by the layers below the batch normalization layer are indexed by feature index and spatial location index, then the batch normalization layer transforms each component of the normalized output according to the trained values of the set of parameters for the feature index that corresponds to that component. The batch normalization layer provides the normalized output or the transformed normalized output as input to the layer above the batch normalization layer in the sequence (step 308).
[0074] The subject matter embodiments described herein and the functional operations thereof may be implemented in digital electronic circuitry, in tangibly embodied computer software or firmware, in computer hardware including the structures disclosed herein and their structural equivalents, or in one or more combinations thereof. The subject matter embodiments described herein may 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 for controlling the operation of a data processing apparatus. Alternatively or additionally, the program instructions may be encoded on an artificially generated propagated signal, e.g., a machine-generated electrical, optical, or electromagnetic signal generated to encode information for transmission to a suitable receiver device for execution by a data processing apparatus. The computer storage medium may be a machine-readable storage device, a machine-readable storage substrate, a random or serial access memory device, or one or more combinations thereof.
[0075] The term "data processing apparatus" encompasses all kinds of apparatus, devices, and machines for processing data, including by way of example a programmable processor, a computer, or multiple processors or computers. Such apparatus may include special purpose logic circuitry, such as an FPGA (field programmable gate array) or an ASIC (application specific integrated circuit). Such apparatus may also include, in addition to hardware, code that creates an execution environment for the computer program in question, such as code constituting a processor firmware, a protocol stack, a database management system, an operating system, or one or more combinations thereof.
[0076] A computer program (which may be referred to or described as a program, software, software application, module, software module, script, or code) may be written in any form of programming language, including compiled or interpreted languages, or declarative or procedural languages, and may be deployed in any form, including as a stand-alone program or as a module, component, subroutine, or other unit suitable for use in a computing environment. A computer program may, but need not, correspond to a file in a file system. A program may be stored in one or more scripts stored in file portions that hold other programs or data, e.g., a markup language document, in a single file dedicated to the program in question, or in multiple coordinated files, e.g., a file that stores one or more modules, subprograms, or code portions. A computer program may be deployed to be executed on one computer or on multiple computers, located in one location or distributed across multiple sites and interconnected by a communications network.
[0077] The processes and logic flows described herein may be implemented by one or more programmable computers executing one or more computer programs to perform functions by operating on input data and generating output. The processes and logic flows may also be implemented by an FPGA (field programmable gate array) or an ASIC (application specific integrated circuit), and an apparatus may also be implemented as special purpose logic circuitry, e.g., an FPGA (field programmable gate array) or an ASIC (application specific integrated circuit).
[0078] A computer suitable for executing a computer program may include, for example, be based on, a general-purpose or special-purpose microprocessor or both, or any other type of central processing unit. Typically, the central processing unit receives instructions and data from a read-only memory or a random access memory or both. The essential elements of a computer are a central processing unit for carrying out or executing instructions and one or more memory devices for storing instructions and data. Typically, a computer also includes one or more mass storage devices, for example, magnetic, magneto-optical, or optical disks, for storing data, or is operatively connected to receive data therefrom and / or transmit data thereto. However, a computer need not have such devices. Furthermore, a computer may be incorporated in another device, 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, for example, a universal serial bus (USB) flash drive, to name just a few.
[0079] Computer-readable media suitable for storing computer program instructions and data include all forms of non-volatile memory, media and memory devices, including, by way of 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, and CD-ROM and DVD-ROM disks. The processor and the memory may be supplemented by, or incorporated in, special purpose logic circuitry.
[0080] To provide for interaction with a user, embodiments of the subject matter described herein can be implemented on a computer having a display device, e.g., a Cathode Ray Tube (CRT) or Liquid Crystal Display (LCD) monitor, for displaying information to a user, and a keyboard and pointing device, e.g., a mouse or trackball, by which a user can provide input to the computer. Other types of devices can be used to provide for interaction with a user. For example, feedback provided to the user can be any form of sensory feedback, e.g., visual feedback, audible feedback, or tactile feedback, and input from the user can be received in any form, including acoustic, speech, or tactile input. Additionally, a computer can interact with a user by sending and receiving documents to a device 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.
[0081] Embodiments of the subject matter described herein may be implemented in a computing system that includes a back end component, e.g., a data server, or a middleware component, e.g., an application server, or a front end component, e.g., a client computer having a graphical user interface or web browser through which a user can interact with an implementation of the subject matter described herein, or any combination of one or more such back end, middleware, or front end components. The components of the system may be interconnected by any form or medium of digital data communication, e.g., a communications network. Examples of communications networks include local area networks ("LANs") and wide area networks ("WANs"), e.g., the Internet.
[0082] The computing system may include clients and servers. Clients and servers are generally remote from each other and typically interact through a communication network. The relationship of client and server arises by virtue of computer programs running on the respective computers and having a client-server relationship to each other.
[0083] Although the specification contains many specific implementation details, these should not be construed as limitations on the scope of any invention or what may be claimed, but rather as descriptions of features that may be specific to a particular embodiment of a particular invention. Certain features described in the specification in the context of separate embodiments can also be implemented in combination in a single embodiment. Conversely, various features described in the context of a single embodiment can also be implemented in multiple embodiments separately or in any suitable subcombination. Furthermore, although features may be described above as operating in a particular combination and may initially be claimed as such, one or more features from a claimed combination may in some cases be implemented from that combination, and the claimed combination may relate to a subcombination or a variation of the subcombination.
[0084] Similarly, although operations are shown in a particular order in the figures, this should not be understood as requiring that such operations be performed in the particular order shown, or in a sequential order, or that all of the illustrated operations be performed, to achieve desired results. In certain situations, multitasking and parallel processing may be advantageous. Furthermore, the separation of various system modules and components in the above-described embodiments should not be understood as requiring such separation in all embodiments, and it should be understood that the described program components and systems may generally be integrated into a single software product or packaged into multiple software products.
[0085] Certain embodiments of the subject matter have been described. Other embodiments are within the scope of the following claims. For example, the actions recited in the claims may be performed in a different order and still achieve desirable results. As one example, the processes depicted in the accompanying figures do not necessarily require the particular order depicted, or sequential order, to achieve desirable results. In certain implementations, multitasking and parallel processing may be advantageous. [Explanation of symbols]
[0086] 100 Neural Network Systems A batch of 102 training examples 104 Neural Network Layer A 106 Layer A Output 108 batch normalization layers 110 Batch normalization layer output 112 Neural Network Layer B 114 Neural Network Output
Claims
1. 1. A neural network system implemented by one or more computers, comprising: a batch normalization layer between the first neural network layer and the second neural network layer, the first neural network layer generating a first layer output having a plurality of components; The batch normalization layer, during training of the neural network system on a batch of training examples, receiving a respective first layer output for each training example in the batch; Calculating a plurality of normalized statistics for the batch from the first layer output; normalizing each component of each first layer output using the normalization statistic to generate a respective normalized layer output for each training example in the batch; generating a respective batch normalization layer output for each of the training examples from the normalized layer outputs; providing the batch normalization layer output as an input to the second neural network layer; The neural network system is configured as follows.
2. The components of the first layer output are indexed by a dimension, and computing a plurality of normalized statistics for the first layer output comprises: for each of the dimensions, computing an average of the components of the first layer output in that dimension; for each of the dimensions, calculating a standard deviation of the components of the first layer output in that dimension; 2. The neural network system of claim 1, comprising:
3. The step of normalizing each component of each layer output is normalizing the component using the calculated mean and the calculated standard deviation for the dimension corresponding to the component.
3. The neural network system of claim 2, comprising:
4. generating the respective batch normalization layer outputs for each of the training examples from the normalized layer outputs, Transforming, for each dimension, the components of the normalized layer output for the training examples in that dimension according to the current values of a set of parameters for that dimension.
4. The neural network system according to claim 2 or 3, comprising:
5. The batch normalization layer may further comprise: after the neural network system has been trained to determine trained values of the parameters for each of the dimensions; receiving new first layer outputs generated by the first neural network layer for new neural network inputs; normalizing each component of the new first layer output using pre-computed mean and standard deviation statistics for the dimension to generate a new normalized layer output; for each dimension, generate a new batch normalization layer output by transforming the components of the new normalized layer output for the training examples in that dimension according to the trained values of the set of parameters for that dimension; Providing the batch normalization layer output as a new layer input to the second neural network layer.
5. The neural network system according to claim 4, configured to:
6. 6. The neural network system of claim 5, wherein pre-computed mean and standard deviation statistics for the dimensions are calculated from first layer outputs generated by the first neural network layer during training of the neural network system.
7. 6. The neural network system of claim 5, wherein the pre-computed mean and standard deviation statistics for the dimensions are calculated from first layer outputs generated by the new first neural network layer after the neural network is trained.
8. 8. The neural network system of claim 7, wherein new neural network inputs processed by the neural network system after the neural network system has been trained are inputs of a different type than the training examples used to train the neural network system.
9. The first neural network layer is a convolutional layer, the components of the first layer output are indexed by a feature index and a spatial location index, and the step of calculating a plurality of normalized statistics for the first layer output includes: for each combination of feature index and spatial location index, calculating an average of the components of the first layer output having that feature index and spatial location index; calculating, for each feature index, an arithmetic mean of said means for combinations that include said feature index; for each combination of feature index and spatial location index, calculating the variance of the components of the first layer output having the feature index and spatial location index; calculating, for each feature index, an arithmetic mean of the variances for combinations that include the feature index; 2. The neural network system of claim 1, comprising:
10. The step of normalizing each component of each layer output is normalizing the components using the arithmetic mean of the means and the arithmetic mean of the variances for the feature indexes corresponding to the components.
10. The neural network system of claim 9, comprising:
11. generating the respective batch normalization layer outputs for each of the training examples from the normalized layer outputs, Transforming each component of the normalized layer output according to the current values of a set of parameters for the feature index corresponding to the component.
10. The neural network system of claim 8 or 9, comprising:
12. The batch normalization layer performs a process after the neural network has been trained to determine trained values of the parameters for each of the dimensions. receiving new first layer inputs generated from the new neural network inputs; normalizing each component of the new first layer output using pre-computed mean and standard deviation statistics for the feature index to generate a new normalized layer output; generating a new batch normalization layer output by transforming each component of the normalized layer output according to the trained values of the set of parameters for the feature index corresponding to the component; providing the new batch normalization layer output as a new layer input to the second neural network layer.
12. The neural network system of claim 11 configured to:
13. The first neural network layer is a convolutional layer, the plurality of components of the first layer output are indexed by a feature index and a spatial location index, and the step of calculating a plurality of normalized statistics for the first layer output includes, for each of the feature indexes: calculating an average of the components of the first layer output corresponding to the feature index; A step of calculating the variance of the component of the first layer output corresponding to the feature index. Tep and 2. The neural network system of claim 1, comprising:
14. The step of normalizing each component of each layer output is The mean and the variance for the feature index corresponding to the component are used to Normalizing the components 14. The neural network system of claim 13, comprising:
15. generating the respective batch normalization layer outputs for each of the training examples from the normalized layer outputs, transforming each component of the normalized layer output according to the current values of a set of parameters for the feature index corresponding to the component.
15. The neural network system of claim 13 or 14, comprising:
16. The batch normalization layer performs a process after the neural network has been trained to determine trained values of the parameters for each of the dimensions. receiving new first layer inputs generated from the new neural network inputs; normalizing each component of the new first layer output using pre-computed mean and standard deviation statistics for the feature index to generate a new normalized layer output; generating a new batch normalization layer output by transforming each component of the normalized layer output according to the trained values of the set of parameters for the feature index corresponding to the component; providing the new batch normalization layer output as a new layer input to the second neural network layer.
16. The neural network system of claim 15, configured to:
17. The first neural network layer is 17. The neural network system of claim 1, wherein the first layer outputs are generated by modifying first layer inputs according to current values of a set of parameters for the neural network layer.
18. 20. The neural network system of claim 17, wherein the second neural network layer generates a second layer output by applying a non-linear operation to the batch normalization layer output.
19. 17. The neural network system of claim 1, wherein the first neural network layer modifies first layer inputs according to current values of a set of parameters to generate modified first layer inputs, and then generates the first layer outputs by applying a nonlinear operation to the modified first layer inputs.
20. 20. The neural network system of claim 1, wherein during the training of the neural network, the neural network system is configured to back-propagate the normalized statistics as part of adjusting values of parameters of the neural network.
21. 21. A method comprising operations performed by a batch normalization layer according to any one of claims 1 to 20.
22. One or more non-transitory computer storage media encoded with a computer program comprising instructions that, when executed by one or more computers, cause the one or more computers to implement the neural network system of any one of claims 1 to 20.
Citation Information
Patent Citations
Learning machine and neural network, and device and method for data analysis
JP1993346915A
Image processing device and image processing program
JP2013069132A
Sequential conditional generalized iterative scaling
US20030236662A1
