Patent Publication Number: US-10325200-B2

Title: Discriminative pretraining of deep neural networks

Description:
CROSS-REFERENCE TO RELATED APPLICATIONS 
     This application is a continuation of a prior application entitled “DISCRIMINATIVE PRETRAINING OF DEEP NEURAL NETWORKS”, which was assigned Ser. No. 13/304,643 and filed Nov. 26, 2011. 
    
    
     BACKGROUND 
     A deep neural network (DNN) is known to be a powerful discriminative modeling tool, and can be used for a variety of purposes. For example, a DNN can be combined with a hidden Markov model (HMM) to characterize context-dependent (CD) phones as the pronunciation units of speech. The resulting hybrid CD-DNN-HMM takes advantage of the temporally localized discriminative modeling power of a DNN and the sequential modeling power of an HMM. A CD-DNN-HMM can be used in speech recognition systems, handwriting recognition systems, and human activity recognition/detection systems including gesture recognition systems, among many others. 
     One of the key procedures in building such CD-DNN-HMMs is the training of the DNN. This training is typically conducted by first initializing the weights and is known as a “pretraining” procedure. 
     SUMMARY 
     Discriminative pretraining technique embodiments described herein are generally employed to pretrain the hidden layers of a Deep Neural Network (DNN). The discriminative pretraining technique embodiments described herein have the advantage of bringing the DNN layer weights close to a good local optimum, while still leaving them in a range with a high gradient so that they can be fine-tuned effectively at a later stage of training. 
     In one exemplary discriminative pretraining technique embodiment, a DNN is pretrained by first training a single layer neural network (NN) having an input layer into which training data is input, an output layer from which output is generated, and a first hidden layer which is interconnected with the input and output layers with randomly initialized weights. This training involves accessing a set of training data entries, each of which has a corresponding label assigned to it. Each data entry is then input one by one into the input layer of the single hidden layer neural network until all the data entries have been input at least once. It is noted that after inputting each data entry, weights associated with the first hidden layer are set via an error back-propagation (BP) procedure so that the output generated from the output layer matches the label associated with the training data entry. This produces an initial NN. 
     Once the single hidden layer NN has been trained, the current output layer is discarded and a new hidden layer is added that is interconnected with the last previously trained hidden layer and a new output layer with randomly initialized weights, to produce a new multiple hidden layer DNN. This last-produced new multiple hidden layer DNN is then trained as follows. Each data entry of the training set is input one by one into the input layer of the last-produced new multiple hidden layer DNN until all the data entries have been input at least once. It is noted that after inputting each data entry, weights associated with the new hidden layer and each previously trained hidden layer are set via BP so that the output generated from the output layer matches the label associated with the training data entry. This produces a deeper neural network with one layer more than the previous DNN. 
     Additional new hidden layers are then added and trained in the same manner, until a prescribed number of hidden layers have been added. The resulting last-produced revised multiple layer DNN is then designated to be the pretrained DNN. 
     It should be noted that this Summary is provided to introduce a selection of concepts, in a simplified form, that are further described below in the Detailed Description. This Summary is not intended to identify key features or essential features of the claimed subject matter, nor is it intended to be used as an aid in determining the scope of the claimed subject matter. 
    
    
     
       DESCRIPTION OF THE DRAWINGS 
       The specific features, aspects, and advantages of the disclosure will become better understood with regard to the following description, appended claims, and accompanying drawings where: 
         FIG. 1  is an exemplary computing program architecture for implementing discriminative pretraining technique embodiments described herein. 
         FIG. 2  is a flow diagram generally outlining one implementation of a pretraining technique process for pretraining a deep neural network (DNN). 
         FIG. 3  is a flow diagram generally outlining one implementation of a process for performing an iteration of a multi-iteration process for fine-tuning a pretrained DNN. 
         FIG. 4  is a diagram depicting a general purpose computing device constituting an exemplary system for implementing discriminative pretraining technique embodiments described herein. 
     
    
    
     DETAILED DESCRIPTION 
     In the following description of discriminative pretraining technique embodiments reference is made to the accompanying drawings which form a part hereof, and in which are shown, by way of illustration, specific embodiments in which the technique may be practiced. It is understood that other embodiments may be utilized and structural changes may be made without departing from the scope of the technique. 
     1.0 Discriminative Pretraining and Fine-Tuning of a Deep Neural Network 
     The discriminative pretraining technique embodiments described herein are generally employed to pretrain the hidden layers of a Deep Neural Network (DNN). This produces a pretrained DNN that can be fine-tuned to produce a fully trained DNN. For the purposes of this description, a completed DNN is defined as a neural network having more than one hidden layer. Additionally, the term “pretraining” refers to the procedure to obtain the DNN weights in all layers that are subject to the further modification based on a pure discriminative learning procedure through all layers in the DNN. One such discriminative learning procedure is the aforementioned fine tuning which calls for BP through all DNN layers from top layer to the bottom layer. 
     A trained DNN can be used for a variety of purposes. For example, a DNN can directly model tied context-dependent (CD) states or in a context independent manner that models context independent states. In the case of modeling tied CD states, as indicated previously, a DNN can model context-dependent (CD) phones and can be combined with a hidden Markov model (HMM). The resulting hybrid CD-DNN-HMM takes advantage of the discriminative modeling power of a DNN with the sequential modeling power of a HMM. A CD-DNN-HMM can be used in speech recognition systems, handwriting recognition systems, and human activity recognition/detection systems, among many others. In the case of a speech recognition system, such as is used in a voice search task or switchboard phone-call transcription task, a CD-DNN-HMM is used to directly model senones (tied CD states) and approximates the emission probabilities of these senones in a HMM speech recognizer. A senone represents clustered (or tied) context-dependent triphone states. However, it is not intended that the discriminative pretraining technique embodiments described herein be limited to speech recognition systems, or any of the other above-mentioned systems. Rather, the discriminative pretraining technique embodiments described herein can be employed with any DNN used for any purpose. 
     1.1 Deep Neural Network 
     DNNs can be considered as conventional multi-layer perceptrons (MLPs) with many hidden layers. Specifically, a DNN models the posterior probability P s|o  (s|o) of a class s given an observation vector o, as a stack of (L+1) layers of log-linear models. The first L layers, l=0 . . . L−1, model hidden binary output units h l  given input vectors v l  as Bernoulli distribution 
                         P     h   |   v     ℓ     ⁡     (       h   ℓ     |     v   ℓ       )       =       ∏     j   =   1       N   ℓ       ⁢           ⁢       e       z     j   ⁡     (     v   ℓ     )       ℓ     ⁢     h   j   ℓ             e     z       j   ⁡     (     v   ℓ     )         -   1       ℓ       +     e     z       j   ⁡     (     v   ℓ     )         -   0       ℓ               ,     0   ≤   ℓ   &lt;   L             (   1   )               
and the top layer L models the desired class posterior as multinomial distribution
 
                       P     s   |   v     L     ⁡     (     s   |     v   ℓ       )       =         e       z   s   L     ⁡     (     v   L     )             ∑     s   ′       ⁢     e       z     s   ′     L     ⁡     (     v   L     )             =       softmax   s     ⁡     (       z   L     ⁡     (     v   L     )       )                 (   2   )               
where z l (v l )=(W l ) T  v l +a l  is the activation at layer l, W l  and a l  are the weight matrices and bias vectors at layer l, and h j   l  and z j   l (v l ) are the j-th component of h l  and z l (v l ), respectively.
 
     The precise modeling of P s|o (s|o) is infeasible as it requires integration over all possible values of h l  across all layers. An effective practical trick is to replace the marginalization with a mean-field approximation. Given observation o, v 0 =o is set and conditional expectation E h|v   l {h l |v l }=σ(z l (v l )) is chosen as input v l+1  to the next layer, where σ j (z)=1/(1+e −Zj ) is sigmoid function. 
     1.2 Training a Deep Neural Network 
     DNNs, being ‘deep’ MLPs, can be trained with the well-known error back-propagation (BP) procedure. Because BP can easily get trapped in poor local optima for deep networks, it is helpful to ‘pretrain’ the model in a layer growing fashion as will be described shortly. However, before describing this pretraining it would be useful to briefly describe BP. MLPs are often trained with the error back-propagation (BP) procedure with stochastic gradient ascent 
                       (       W   ℓ     ,     a   ℓ       )     ←       (       W   ℓ     ,     a   ℓ       )     +     ϵ   ⁢       ∂   D       ∂     (       W   ℓ     ,     a   ℓ       )               ,     0   ≤   ℓ   ≤   L     ,           (   3   )               
for an objective function D and learning rate ϵ. Typically, the objective is to maximize the total log posterior probability over the T training samples O={o(t)} with ground-truth labels s(t), i.e.
 
 D ( O )=Σ t=1   T  log  P   s|o ( s ( t )| o ( t )),  (4)
 
then the gradients are
 
                           ∂   D       ∂     W   ℓ         =       ∑   t     ⁢         v   ℓ     ⁡     (   t   )       ⁢       (         ω   ℓ     ⁡     (   t   )       ⁢       e   ℓ     ⁡     (   t   )         )     T           ;         ∂   D       ∂     a   ℓ         =       ∑   t     ⁢         ω   ℓ     ⁡     (   t   )       ⁢       e   ℓ     ⁡     (   t   )               ⁢     
     ⁢         e   L     ⁡     (   t   )       =         (     log   ⁢           ⁢   softmax     )     ′     ⁢     (       z   L     ⁡     (       v   L     ⁡     (   t   )       )       )         ⁢     
     ⁢         e     ℓ   -   1       ⁡     (   t   )       =           W   ℓ     ·       ω   ℓ     ⁡     (   t   )       ·       e   ℓ     ⁡     (   t   )         ⁢           ⁢   for   ⁢           ⁢   0     ≤   ℓ   &lt;   L       ⁢     
     ⁢         ω   ℓ     ⁡     (   t   )       =     {           diag   ⁡     (       σ   ′     ⁡     (       z   ℓ     ⁡     (       v   ℓ     ⁡     (   t   )       )       )       )               for   ⁢           ⁢   0     ≤   ℓ   &lt;   L             1       else                     (   5   )               
with error signals e l (t)=∂D/∂v l+1 (t) as back-propagated from networks l+1 and above; network l&#39;s output-nonlinearity&#39;s derivative w l (t) if present; component-wise derivatives
 
σ′ j ( z )=σ j ( z )·(1−σ j ( z )) and (log softmax)′ j ( z )=δ s(t),j −softmax j ( z );
 
and Kronecker delta δ.
 
1.3 Discriminative Pretraininq
 
     It has been found that pretraining a DNN, followed by a fine-tuning training procedure, can provide more accurate results than traditional training methods. The discriminative pretraining technique embodiments described herein have the advantage of bringing the DNN layer weights close to a good local optimum, while still leaving them in a range with a high gradient so that they can be fine-tuned effectively. While both pretraining discussed herein and fine tuning are discriminative, they differ from each other in that the former is confined with each layer of the DNN while the latter is carried out through all layers of the DNN. Embodiments of the discriminative pretraining technique will be described in this section and the fine-tuning procedure in the next. 
     The discriminative pretraining technique embodiments described herein operate as a computer-implemented process for pretraining a DNN. This can involve employing a computer-readable storage medium having computer-executable instructions stored thereon for achieving the training. Suitable computing devices and storage media will be described in more detail in the Exemplary Operating Environments section to follow. 
     An exemplary computing program architecture for implementing the discriminative pretraining technique embodiments described herein is shown in  FIG. 1 . This architecture includes various program modules executable by a computing device, such as a hidden layer generator program module  100 . This module  100  directs the computing device to initially generate a single hidden layer NN that includes an input layer into which training data is input, an output layer from which outputs are generated, and a first hidden layer which is interconnected with the input and output layers with randomly initialized weights. 
     There is also a pretraining program module  102  that directs the computing device to first access a set of training data entries, each of which has a corresponding label. The labels represent the particular distinguishing output desired from the DNN when its corresponding training data entry is input. For instance, in the aforementioned example of a speech recognizer system, the training data entries would be frames in spoken utterances. These frames are assigned a senone label representing the desired DNN output for that frame in the utterance. For example, each unique senone associated with the training data entries would be assigned a different label (e.g., 1, 2, 3, . . . , N where N is the total number of senones). This simplification of the output associated with a senone allows for a clear distinction to be made between them. It is also noted that the set of training data accessed for the pretraining can be a smaller set than is used for follow-on training. The pretraining program module  102  also directs the computing device to access the single hidden layer DNN once it is generated in response to the aforementioned direction from the hidden layer generator program module  100 . The pretraining program module  102  then inputs the training data entries and produces a pretrained version of the single hidden layer DNN. One implementation of a procedure used to accomplish the foregoing task will be described in an exemplary discriminative pretraining technique process to be provided shortly. 
     Whenever a pretrained version of the single hidden layer DNN is produced under the direction of the pretraining program module  102 , the hidden layer generator program module  100  directs the computing device to discard the current output layer and to add a new hidden layer that is interconnected with the first hidden layer and a new output layer with randomly initialized weights to produce a multiple hidden layer DNN. In addition, whenever a pretrained version of a last produced multiple hidden layer DNN is produced under the direction of the pretraining program module  102  (as will be described shortly) and is designated as lacking a prescribed number of hidden layers, the hidden layer generator program module  100  directs the computing device to discard the current output layer and add a new hidden layer that is interconnected with the last previously added hidden layer and a new output layer with randomly initialized weights to produce a new multiple hidden layer DNN. 
     As for the aforementioned pretrained version of a last produced multiple hidden layer DNN, the pretraining program module  102  directs the computing device to access each multiple hidden layer deep neural network at the time it is produced, and for each multiple hidden layer DNN accessed, inputs the training data entries thereto and produces a pretrained version of the accessed network. One implementation of a procedure used to accomplish the foregoing task will be described in the aforementioned exemplary discriminative pretraining technique process to be provided shortly. 
     With regard to the aforementioned designation as to whether the pretrained version of a last produced multiple hidden layer deep neural network lacks the prescribed number of hidden layers, a DNN program module  104  is employed to accomplish this task. More particularly, the deep neural network module  104  directs the computing device to determine whether the pretrained version of the last produced multiple hidden layer DNN includes the prescribed number of hidden layers, each time such a network is produced under the direction of the hidden layer generator program module  100 . Whenever it is determined the last produced pretrained multiple hidden layer DNN does not include the prescribed number of hidden layers, it is designated under the direction of the deep neural network module  104  as lacking the prescribed number of hidden layers. However, whenever it is determined the last produced pretrained multiple hidden layer DNN does include the prescribed number of hidden layers, the deep neural network module  104  directs that it be designated as the desired pretrained DNN. 
     The foregoing computing program architecture can be advantageously used to implement the discriminative pretraining technique embodiments described herein. More particularly, with reference to  FIG. 2 , one implementation of a pretraining technique process for pretraining a DNN is presented. The process begins with the aforementioned single hidden layer deep neural network being trained. As indicated previously, this single hidden layer deep neural network includes an input layer into which training data is input, an output layer from which outputs are generated, and a first hidden layer which is interconnected with the input and output layers with randomly initialized weights. The training involves first accessing a set of training data entries (process action  200 ). Each of these data entries has a corresponding label assigned to it. 
     Each data entry of the training set is next input one by one into the input layer of the single hidden layer neural network until all the data entries have been input at least once (process action  202 ). It is noted that after inputting each data entry, weights associated with the first hidden layer are set via the aforementioned error back-propagation (BP) procedure so that an output generated from the output layer matches the label associated with the training data entry. This produces an initial NN. 
     It is also noted that in one implementation, each data entry of the training set is input into the input layer of the single hidden layer deep neural network only once (sometimes referred to as early stop). In addition, in one implementation, the BP uses a high prescribed learning rate that ranges between 0.01 and 0.20. In tested embodiments, a learning rate of 0.08 was employed. It has been found that using either or both of the foregoing features can result in improved accuracy. 
     It is further noted that in one implementation, the outputs from the first hidden layer are transformed via a softmax function so as to better correspond to the label associated with a currently entered training data entry. The softmax function generally is used to transform the outputs of a neural network&#39;s layer so that all the output values fall between 0 and 1, and so that the sum of the output values is 1. In one version, this is accomplished using the following equation: 
                     p   i     =       exp   ⁡     (     q   i     )           ∑     j   =   1     n     ⁢     exp   ⁡     (     q   j     )                   (   6   )               
where p i  is the output value of node i, q i  is the net input to the output node i and n is the number of output nodes.
 
     Once the single hidden layer deep neural network has been trained as described previously, the current output layer is discarded and a new hidden layer is added that is interconnected with the last previously trained hidden layer and a new output layer with randomly initialized weights (process action  204 ). This in effect produces a new multiple hidden layer DNN. 
     This last-produced new multiple hidden layer DNN is then trained as follows. Each data entry of the training set is input one by one into the input layer of the last-produced new multiple hidden layer neural network until all the data entries have been input at least once (process action  206 ). It is noted that after inputting each data entry, weights associated with the new hidden layer and each previously trained hidden layer are set via the error back-propagation procedure (BP) so that an output generated from the output layer matches the label associated with the training data entry. This produces a revised multiple hidden layer deep neural network. 
     As with the single hidden layer neural network, in one implementation, each data entry of the training set is input into the input layer of the last-produced new multiple hidden layer neural network only once. In addition, in one implementation, the BP uses a high prescribed learning rate that ranges between 0.01 and 0.20. In tested embodiments, a learning rate of 0.08 was employed. As before, it has been found that using either or both of the foregoing features can result in increased accuracy. 
     Also as before, in one implementation, the outputs from the new hidden layer are transformed via the aforementioned softmax function so as to better correspond to the context label associated with a currently entered training data entry. 
     Additional new hidden layers are then added and trained. More particularly, in process action  208  it is determined whether the last produced revised multiple hidden layer deep neural network has a prescribed number of hidden layers (e.g., at least two hidden layers). If not, then actions  204  and  206  are repeated. When it is determined that the last produced revised multiple hidden layer deep neural network does have the prescribed number of hidden layers, it is designated to be the pretrained DNN (process action  210 ). 
     1.4 Fine-Tuning 
     As mentioned previously, the pretrained DNN can be fine-tuned. More particularly, in one embodiment this fine-tuning involves iteratively training the pretrained DNN a prescribed number of times (e.g., 4 times) to produce a trained DNN. In another embodiment, the fine-tuning involves iteratively training the pretrained DNN until the weights associated with the each hidden layer do not vary between iterations by more than a prescribed training threshold. In yet another embodiment, if either of the foregoing iteration limits occurs, the fine-tuning procedure ends. Referring to  FIG. 1  once again, a fine-tuning program module  106  is used to direct the computing device to fine-tune the layer weights of the pretrained DNN. 
     More particularly, referring to  FIG. 3 , in one implementation each iteration of the fine-tuning procedure is accomplished by first inputting each data entry of the aforementioned set of training data entries, one by one, into the input layer of the pretrained DNN until all the data entries have been input once (process action  300 ). It is noted that after inputting each data entry, the weights associated with the hidden layers are set via the error back-propagation (BP) procedure so that an output is generated from the output layer that matches the label associated with the training data entry. It is then determined if the pretrained DNN has been fine-tuned the prescribed number of times, or the weights associated with each hidden layer did not vary by more than a prescribed training threshold (process action  302 ). If not, process action  300  is repeated. If, however, either condition is determined to exist, then the resulting fine-tuned DNN is designated as a trained DNN (process action  304 ). 
     2.0 Exemplary Operating Environments 
     The discriminative pretraining technique embodiments described herein are operational within numerous types of general purpose or special purpose computing system environments or configurations.  FIG. 4  illustrates a simplified example of a general-purpose computer system on which various embodiments and elements of the discriminative pretraining technique embodiments, as described herein, may be implemented. It should be noted that any boxes that are represented by broken or dashed lines in  FIG. 4  represent alternate embodiments of the simplified computing device, and that any or all of these alternate embodiments, as described below, may be used in combination with other alternate embodiments that are described throughout this document. 
     For example,  FIG. 4  shows a general system diagram showing a simplified computing device  10 . Such computing devices can be typically be found in devices having at least some minimum computational capability, including, but not limited to, personal computers, server computers, hand-held computing devices, laptop or mobile computers, communications devices such as cell phones and PDA&#39;s, multiprocessor systems, microprocessor-based systems, set top boxes, programmable consumer electronics, network PCs, minicomputers, mainframe computers, audio or video media players, etc. 
     To allow a device to implement the discriminative pretraining technique embodiments described herein, the device should have a sufficient computational capability and system memory to enable basic computational operations. In particular, as illustrated by  FIG. 4 , the computational capability is generally illustrated by one or more processing unit(s)  12 , and may also include one or more GPUs  14 , either or both in communication with system memory  16 . Note that that the processing unit(s)  12  of the general computing device may be specialized microprocessors, such as a DSP, a VLIW, or other micro-controller, or can be conventional CPUs having one or more processing cores, including specialized GPU-based cores in a multi-core CPU. 
     In addition, the simplified computing device of  FIG. 4  may also include other components, such as, for example, a communications interface  18 . The simplified computing device of  FIG. 4  may also include one or more conventional computer input devices  20  (e.g., pointing devices, keyboards, audio input devices, video input devices, haptic input devices, devices for receiving wired or wireless data transmissions, etc.). The simplified computing device of  FIG. 4  may also include other optional components, such as, for example, one or more conventional display device(s)  24  and other computer output devices  22  (e.g., audio output devices, video output devices, devices for transmitting wired or wireless data transmissions, etc.). Note that typical communications interfaces  18 , input devices  20 , output devices  22 , and storage devices  26  for general-purpose computers are well known to those skilled in the art, and will not be described in detail herein. 
     The simplified computing device of  FIG. 4  may also include a variety of computer readable media. Computer readable media can be any available media that can be accessed by computer  10  via storage devices  26  and includes both volatile and nonvolatile media that is either removable  28  and/or non-removable  30 , for storage of information such as computer-readable or computer-executable instructions, data structures, program modules, or other data. By way of example, and not limitation, computer readable media may comprise computer storage media and communication media. Computer storage media includes, but is not limited to, computer or machine readable media or storage devices such as DVD&#39;s, CD&#39;s, floppy disks, tape drives, hard drives, optical drives, solid state memory devices, RAM, ROM, EEPROM, flash memory or other memory technology, magnetic cassettes, magnetic tapes, magnetic disk storage, or other magnetic storage devices, or any other device which can be used to store the desired information and which can be accessed by one or more computing devices. 
     Retention of information such as computer-readable or computer-executable instructions, data structures, program modules, etc., can also be accomplished by using any of a variety of the aforementioned communication media to encode one or more modulated data signals or carrier waves, or other transport mechanisms or communications protocols, and includes any wired or wireless information delivery mechanism. Note that the terms “modulated data signal” or “carrier wave” generally refer to a signal that has one or more of its characteristics set or changed in such a manner as to encode information in the signal. For example, communication media includes wired media such as a wired network or direct-wired connection carrying one or more modulated data signals, and wireless media such as acoustic, RF, infrared, laser, and other wireless media for transmitting and/or receiving one or more modulated data signals or carrier waves. Combinations of the any of the above should also be included within the scope of communication media. 
     Further, software, programs, and/or computer program products embodying some or all of the various discriminative pretraining technique embodiments described herein, or portions thereof, may be stored, received, transmitted, or read from any desired combination of computer or machine readable media or storage devices and communication media in the form of computer executable instructions or other data structures. 
     Finally, the discriminative pretraining technique embodiments described herein may be further described in the general context of computer-executable instructions, such as program modules, being executed by a computing device. Generally, program modules include routines, programs, objects, components, data structures, etc., that perform particular tasks or implement particular abstract data types. The embodiments described herein may also be practiced in distributed computing environments where tasks are performed by one or more remote processing devices, or within a cloud of one or more devices, that are linked through one or more communications networks. In a distributed computing environment, program modules may be located in both local and remote computer storage media including media storage devices. Still further, the aforementioned instructions may be implemented, in part or in whole, as hardware logic circuits, which may or may not include a processor. 
     3.0 Other Embodiments 
     In another exemplary discriminative pretraining technique embodiment the DNN is changed from all nonlinear layers to interleaving linear and nonlinear layers. In this embodiment, BP is no longer needed in the discriminative pretraining but rather convex optimization is used to determine the DNN weights before fine tuning. Again, the pretraining here for this type of DNN with interleaving linear and nonlinear layers involves accessing a set of training data entries (plus optionally the output layer data), each of which has a corresponding label assigned to it. All the data entries are input in a batch mode instead of one by one. 
     It is also noted that any or all of the aforementioned embodiments throughout the description may be used in any combination desired to form additional hybrid embodiments. In addition, although the subject matter has been described in language specific to structural features and/or methodological acts, it is to be understood that the subject matter defined in the appended claims is not necessarily limited to the specific features or acts described above. Rather, the specific features and acts described above are disclosed as example forms of implementing the claims.