Dual recurrent neural network architecture for modeling long-term dependencies in sequential data
Through the dual recurrent neural network architecture, combined with historical and update recurrent networks, it solves the shortcomings of traditional recurrent neural networks in long-term video frame prediction, achieves accurate prediction of long-term future data in high-dimensional video data, and is suitable for a variety of applications scene.
Patent Information
- Application Number
- CN202011011935.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Priority Date
- 2019-09-24
- Filing Date
- 2020-09-22
- Publication Date
- 2024-09-27
- Estimated Expiration
- 2040-09-22
AI Technical Summary
Accurate prediction of long-term future video frames is difficult with existing techniques, especially in high-dimensional video data, where traditional recurrent neural networks perform poorly in long-term predictions due to dynamic changes, propagated prediction errors, and future uncertainty.
Adopting a dual recursive neural network architecture, including a historical recursive neural network and an update recursive neural network, the unit state transition function is learned through the historical recursive network, and the current unit state and hidden state are updated using the update recursive network to model long-term dependencies in sequence data. to achieve long-term future data prediction.
Effectively predicts long-term future video frames, reducing prediction errors over time, improving the accuracy and stability of video prediction, and is suitable for applications such as video prediction, robotics, and autonomous driving.
Smart Images

Figure CN112633463B_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to recurrent neural networks for future state prediction. Background Art
[0002] Learning the dynamics of an environment and predicting future consequences is a recent technological advancement with numerous applications. These applications include video prediction, speech recognition, and more, and they often use machine learning (e.g., deep learning models, neural networks, or other artificial intelligence algorithms) to make predictions. In one example, a common application is to train a model (e.g., a deep learning model) that accurately predicts pixel-level future frames of a video conditioned on past frames of a video. This particular application can be used for intelligent agents to guide their interactions with the world, or for other video analysis tasks such as activity recognition.
[0003] However, current artificial intelligence algorithms for making predictions, such as those described above, exhibit various limitations. For example, current techniques are often limited to making short-term future predictions. For example, the Convolutional Long Short-Term Memory (ConvLSTM) network, which has become a popular model architecture choice for video prediction, can only produce high-quality predictions for one frame or less than ten frames. In the context of video prediction, learning to predict long-term future video frames remains challenging due to 1) the complex dynamics present in high-dimensional video data, 2) the propagation of prediction errors over time, and 3) the inherent uncertainty of the future.
[0004] There is a need to address these and / or other problems associated with the prior art. Summary of the invention
[0005] A method, computer readable medium, and system are disclosed to provide a dual recurrent neural network architecture for modeling long-term dependencies in sequence data. As a first part, the dual recurrent neural network architecture includes a history recurrent neural network configured to process an input sequence to learn a unit state transition function from a set of hidden states associated with the input sequence. As a second part, the dual recurrent neural network architecture includes an update recurrent neural network configured to update a current unit state and a corresponding hidden state for each input of the input sequence based on the unit state transition function. BRIEF DESCRIPTION OF THE DRAWINGS
[0006] Figure 1 A flow chart of a dual recurrent neural network architecture method according to one embodiment is shown.
[0007] Figure 2 A block diagram of a dual recurrent neural network architecture system is shown according to one embodiment.
[0008] Figure 3 A method for Figure 2An implementation of the attention mechanism for a dual recurrent neural network architecture system.
[0009] Figure 4 A method for Figure 2 An implementation of skip connections in a dual recurrent neural network architecture system.
[0010] Figure 5 According to an embodiment Figure 2 The architecture of each recurrent neural network in the dual recurrent neural network architecture system.
[0011] Fig. 6A Inference and / or training logic according to one embodiment is shown.
[0012] Figure 6B Inference and / or training logic according to one embodiment is shown.
[0013] Figure 7 The training and deployment of a neural network according to one embodiment is shown.
[0014] Figure 8 An exemplary system according to one embodiment is shown. DETAILED DESCRIPTION
[0015] In general, a neural network is a set of algorithms that can be trained to make predictions (inference). Given some input, a trained neural network can predict or infer the output. Figure 6A-Figure 7 Provides more information about neural networks in general.
[0016] On the other hand, recurrent neural networks improve on traditional neural networks by including node loops to allow information to persist at each step of the loop. Since each node of a recurrent neural network loops to the next node, and the output of one node is input to the next node, recurrent neural networks are often used in applications involving sequence data. Recurrent neural networks have some internal (cell) state that is updated based on some function of each node and then provided as output to the next node. The complexity of the functions will vary depending on the type of recurrent neural network employed. In any case, each node will receive the output of the previous node and some additional input from the input sequence for processing. However, when using traditional recurrent neural networks, some history is always lost or discarded over time.
[0017] The present disclosure provides a recursive neural network architecture involving two recursive neural networks that operate in combination to model long-term dependencies in sequence data.
[0018] Figure 1A flow chart of a dual recurrent neural network architecture method 100 according to one embodiment is shown. The method 100 can be performed by a computer processor, a program, a custom circuit, or a combination thereof. For example, the method 100 can be performed by a GPU (graphics processing unit) and / or a CPU (central processing unit). In addition, a person of ordinary skill in the art will understand that any system that performs the method 100 is within the scope and spirit of the embodiments of the present disclosure.
[0019] As shown in operation 102, a set of hidden (history) states associated with an input sequence is identified. The input sequence may be any data sequence, such as a video frame sequence, a speech sequence, etc. In one embodiment, each portion (e.g., frame) of the input sequence may be associated with a different timestamp, so that the input sequence may be a time-based data sequence.
[0020] In one embodiment, an input sequence may be provided (e.g., selected) as input to a dual recurrent neural network architecture. For example, the input sequence may be provided for the purpose of predicting long-term future data from the input sequence.
[0021] As shown in operation 104, the history recurrent neural network processes the set of hidden states to learn a cell state transition function associated with the input sequence. In various embodiments, the history recurrent neural network can be a long short-term memory (LSTM) network, a convolutional long short-term memory (ConvLSTM) network, a gated recurrent unit (GRU) network, or any other recurrent neural network (RNN) having repeating nodes capable of processing an input sequence to learn a cell state transition function of the input sequence.
[0022] In the context of this specification, a cell state transition function refers to a function by which the cell and hidden states of each node are changed. The cell state transition function may delete data from a cell state, add data to a cell state, update a value in a cell state, merge a cell state with one or more hidden states, and / or change the cell and hidden states in any other way.
[0023] As described above, the historical recurrent neural network uses a set of hidden states associated with an input sequence to learn a unit state transition function. In one embodiment, the set of hidden states may include all hidden states associated with the input sequence. In another embodiment, the historical recurrent neural network may include an attention mechanism that can be applied to the set of hidden states associated with the input sequence. The attention mechanism can calculate the relationship between the last hidden state and each earlier hidden state for time step k to indicate the weight of each earlier hidden state. In the context of video frames, when using hidden states (rather than input frames) for calculations, in addition to the pixel-level information of the frame itself, the spatiotemporal context of each frame is also considered, which is more suitable for calculating the frame-level attention of the video. Typically, the attention information is propagated through recursive connections, and the output of the attention mechanism can then be used for the purpose of learning the unit state transition function.
[0024] In addition, as shown in operation 106, the update recurrent neural network updates the current cell state and the corresponding hidden state for each input of the input sequence based on the cell state transition function. Similar to the historical recurrent neural network, the update recurrent neural network can be an LSTM network, a ConvLSTM network, a GRU network, etc., but of course it can be any RNN with repeated nodes that can use the cell state transition function learned by the historical recurrent neural network to update the cell state and the corresponding hidden state in the update recurrent neural network.
[0025] To this end, by separating the history and update functions into two separate recurrent neural networks, the history recurrent neural network and the update recurrent neural network, a dual recurrent neural network architecture is formed that models the long-term dependencies in the sequential data represented by the input sequence. In turn, the dual recurrent neural network architecture can be used to predict long-term future data from the input sequence.
[0026] In an optional embodiment, a loss function may be used to train the historical recurrent neural network and / or update the recurrent neural network. Further, a perceptual loss may be used to train the historical recurrent neural network and update the recurrent neural network. In another optional embodiment, a skip connection may be used between the previous and current recurrent layers, such as concatenating the outputs of the previous and current recurrent layers. In yet another optional embodiment, a gated skip connection may be used across layers, such as added as a multiplication gate to control cross-layer information flow.
[0027] Now, more illustrative information about various optional architectures and features that can be used to implement the aforementioned framework will be given according to the needs of the user. It should be particularly noted that the following information is provided for illustrative purposes and should not be interpreted as limiting in any way. Any of the following features can be optionally combined or not combined with other features described.
[0028] Figure 2 FIG. 2 is a block diagram of a dual recurrent neural network architecture system 200 according to one embodiment. For example, the dual recurrent neural network architecture system 200 may be implemented to perform Figure 1 Method 100.
[0029] As shown in the figure, the dual recurrent neural network architecture system 200 includes a historical recurrent neural network 202 and an updated recurrent neural network 204. Both the historical recurrent neural network 202 and the updated recurrent neural network 204 can be LSTM networks, ConvLSTM networks, GRU networks, etc.
[0030] The history recurrent neural network 202 receives as input the set of hidden states associated with the input sequence. The history recurrent neural network 202 processes the set of hidden states to learn a unit state transition function from the set of hidden states associated with the input sequence. The history recurrent neural network 202 outputs the unit state transition function to the update recurrent neural network 204.
[0031] The update recurrent neural network 204 receives as input the input sequence and the cell state transition function as described above. The update recurrent neural network 204 updates the current cell state and the corresponding hidden state for each input of the input sequence based on the cell state transition function.
[0032] By combining, the history recurrent neural network 202 and the update recurrent neural network 204, also referred to as a dual recurrent neural network architecture system 200, are able to model long-term dependencies in the sequence data represented by the input sequence, and can therefore be used to predict long-term future data from the input sequence. Compared to using traditional RNNs, etc., long-term future data can be predicted and degrade less over time. Various applications of the update recurrent neural network 204 include video prediction (e.g., for robotics, autonomous driving, human-computer interaction, etc.), language modeling, speech recognition, object / human trajectory prediction, etc.
[0033] Exemplary Embodiments
[0034] The following description discloses an embodiment of a dual recurrent neural network architecture system 200 implemented using a ConvLSTM network.
[0035] To effectively learn the dynamics change from the historical states, the dual recurrent neural network architecture system 200 can be implemented as two ConvLSTM networks, one being the historical LSTM (H-LSTM) and the other being the update LSTM (U-LSTM), also known as the Double LH-STM. The goal of the dual recurrent neural network architecture system 200 is to explicitly separate the long-term historical memory and the update memory. By unrolling these, the model can better encode the high-dimensional long-range history and track its dependencies.
[0036] The H-LSTM block explicitly learns from a (possibly the entire) set of hidden states H k-m:k-1 , 1 < m < k to learn complex variable functions. If m = k, the H-LSTM incorporates the entire history up to time step k - 1.
[0037] In the case where the traditional ConvLSTM network is expressed as Equation 1 shown below, the H-LSTM can be expressed as including an attention mechanism (HistAtt) as shown in Equation 2 below.
[0038] Formula 1
[0039] Let be an input sequence of length n. is the k-th frame, where, h is the height, w is the width and c is the number of channels. For the input frame X k , the ConvLSTM network calculates the current cell and hidden states (C k-1 , H k-1 ) based on the cell and hidden states of the previous frame (C k , H k ):
[0040] C k , H k = ConvLSTM(X k , H k-1 , C k-1 ),
[0041] By calculating the input, forget, output gates i k , f k , o k , the transformed cell state
[0042] i k = σ(W i * X k + M i * H k-1 + b i ),
[0043] f k =σ(W f *X k +M f *H k-1 +b f ),
[0044] o k =σ(W o *X k +M o *H k-1 +b o ),
[0045]
[0046]
[0047] H k =o k ⊙tanh(C k ),
[0048] Where σ is the sigmoid function, W and M are 2D convolution kernels for input-to-state and state-to-state transformations. (*) is the convolution operation, and (⊙) is the element-wise product. The size of the weight matrix depends on the size of the convolution kernel and the number of hidden units.
[0049] Formula 2
[0050] i′ k-1 =σ(M′ i *H k-1 +HistAtt(H k-1 , H k-m:k-2 )+b′ i ),
[0051] f′ k-1 =σ(M′ f *H k-1 +HistAtt(H k-1 ,H k-m:k-2 )+b′ f ),
[0052] o′ k-1 =σ(M′ o *H k-1 +HistAtt(H k-1 ,H k-m:k-2 )+b′ o )
[0053]
[0054]
[0055] H′ k-1 o′ k-1 ⊙tanh(c k-1 )′.
[0056] The HistAtt unit uses a self-attention mechanism based on dot products. This attention mechanism can be expressed as Att(Q,K,V)=softmax(W Q Q.W Q K)·W Q V. It consists of query (Q), key (K) and value (V). It calculates the dot product of query and key and then applies softmax function. Finally, value (V) is weighted by the output of softmax function. Query, key and value can be optionally represented by WQ, W K and W V Matrix transformation.
[0057] Using this mechanism, HistAtt computes the last hidden state H at time step k. k-1 and the earlier hidden state H k-m:k-2 The relationship between Figure 3 ). k-m:k-2 is the set of previous hidden states (H k-m;Hk-m-1 ;…H k-3;Hk-2 ). The historical attention mechanism can be formulated as Formula 3:
[0058] Formula 3
[0059]
[0060]
[0061] In another embodiment (not shown), HistAtt(H k-1 ,H k-m:k-2 ) is added to the input and previous state (X k ,H k-1 ,C k-1 ), HistAtt can be used in the traditional ConvLSTM (Formula 1). This direct extension can be called a single LH-STM: k =SingleConvLSTM(X k ,H k-1 ,C k-1 ,HistAtt(H k-1 ,H k-m:k-2 )), and can be expressed by Formula 4.
[0062] Formula 4
[0063] i k =σ(W i *X k +M i *H k-1 +HistAtt(H k-1 ,H k-m:k-2 )+b i ),
[0064] f k =σ(W f *X k +M f *H k-1 +HistAtt(H k-1 ,H k-m:k-2 )+b f ),
[0065] o k =σ(W o *X k +M o *H k-1 +HistAtt(H k-1 ,H k-m:k-2 )+b o )
[0066]
[0067]
[0068] H k =o k ☉tanh(C k ).
[0069] Returning to the dual recurrent neural network architecture system 200, given an input X k , the previous cell state C k-1 and H-LSTMH′ k-1 The output of k-1 Replace H k-1 , U-LSTM updates the state H of time step k k and C k Formula 5 represents the U-LSTM modified from Formula 1.
[0070] Formula 5
[0071] C' k ,H' k =ConvLSTM(X k ,H' k-1 ,C k-1 ),in:
[0072] i k =σ(W i *X k +M i *H′ k-1 +b i ),
[0073] f k =σ(W f *X k +M f *H′ k-1 +b f ),
[0074] o k =σ(W o *X k +M o *H′ k-1 +b o ),
[0075]
[0076]
[0077] H k =o k ⊙tanh(C k ),
[0078] Optional implementation details
[0079] ConvLSTM is a popular building block for spatiotemporal sequence prediction problems. The two latest state-of-the-art architectures based on ConvLSTM include the Deep ConvLSTM model (ConvLSTM-12) and the context-aware video prediction model (ContextVP-4). Both models can capture sufficient spatiotemporal context, such as for video prediction. As mentioned above, the ConvLSTM block is replaced by the LH-STM.
[0080] Additionally, two types of skip connections can be used to avoid the vanishing gradient problem and allow long-term predictions, such as Figure 4 These skip connections include: (a) connections between the previous and current recurrent layers, and (b) connections across layers.
[0081] As shown in Formula 1, ConvLSTM-12 is a stack of 12 ConvLSTM layers with six skip connections between the first and last six layers, i.e., (1-7), (2-8), ... (6-12). ContextVP-4 consists of 4 layers, including five directed parallel multidimensional LSTM (PMD) units along the h+, h-, w+, w-, and t recursive directions, as shown in Figure 5As shown. The PMD unit along the time direction (t-) is mathematically equivalent to the standard ConvLSTM (Equation 1). By using LSTM connectivity in both the temporal and spatial dimensions, each processing layer can cover the entire context in the video or other input sequence. It can also include weighted mixing, directed weight sharing (DWS), and two skip connections between layers 1-3 and 2-4.
[0082] The weighted mixture layer learns the relative importance of each direction during training according to Equation 6.
[0083] Formula 6
[0084]
[0085] M k =f(W k ·S k +b k ),
[0086] Where H is the PMD unit output from h+, h-, w+, w- and t- directions, and W is the weight matrix.
[0087] DWS provides the weights and biases of the PMD units in opposite directions. This means that the 11 h+ and h- directions as well as the w+ and w directions are shared.
[0088] As described above, skip connections can be used in the dual recurrent neural network architecture system 200 to improve performance. In one embodiment, cascade-based skip connections can be used for long-term gradient propagation. Cascade-based skip connections will cascade the outputs of the previous and current LSTM layers. In another embodiment, gated skip connections can be added across layers. Gated skip connections are multiplication gates added to control the flow of information across layers. It can stabilize learning as the depth increases.
[0089] The layer is expressed as in Formula 7.
[0090] Formula 7
[0091] Y=H l ·T l +X l-i (1-Tl), i<l,
[0092] in Xl is the input of layer l. T is the gate, H l is the transformation of the input to layer l.
[0093] As described above, the loss function can be used to train the historical recurrent neural network and / or update the recurrent neural network. In one embodiment, the loss function for training the network is Among them, Y and are the target frame and the predicted frame respectively. In one embodiment, p = 1. Perceptual loss It can also be used to improve visual quality. This perceptual loss calculates the cosine distance between feature maps extracted from a VGG-16 network pre-trained on the ImageNet dataset as
[0094] are the target frame and predicted frame Y and The size of the feature map of the lth layer is
[0095] Machine Learning
[0096] Deep neural networks (DNNs), including deep learning models, developed on processors have been used in a variety of use cases: from self-driving cars to faster drug development, from automatic image captioning in online image databases to intelligent real-time language translation in video chat applications. Deep learning is a technology that models the neural learning process of the human brain, constantly learning, constantly getting smarter, and delivering more accurate results faster over time. A child is initially taught by an adult to correctly identify and classify various shapes, and eventually is able to recognize shapes without any coaching. Similarly, deep learning or neural learning systems need to be trained in object recognition and classification to become smarter and more efficient in identifying basic objects, occluded objects, etc., while also assigning context to objects.
[0097] At the simplest level, neurons in the human brain look at the various inputs they receive, assign a level of importance to each of these inputs, and pass outputs to other neurons for processing. An artificial neuron, or perceptron, is the most basic model of a neural network. In one example, a perceptron can receive one or more inputs representing various features of an object that the perceptron is being trained to recognize and classify, and each of these features is given a certain weight based on the importance of that feature when defining the shape of the object.
[0098] Deep neural network (DNN) models include multiple layers of many connected nodes (e.g., perceptrons, Boltzmann machines, radial basis functions, convolutional layers, etc.), which can be trained with large amounts of input data to solve complex problems quickly and accurately. In one example, the first layer of a DNN model breaks down an input image of a car into its parts and looks for basic patterns (such as lines and angles). The second layer assembles lines to look for higher-level patterns, such as wheels, windshields, and mirrors. The next layer identifies the type of vehicle, and the last few layers generate labels for the input image, identifying the model of a specific car brand.
[0099] Once a DNN is trained, it can be deployed and used to recognize and classify objects or patterns in a process called inference. Examples of inference (the process by which a DNN extracts useful information from a given input) include recognizing handwritten numbers on check deposits in ATM machines, identifying images of friends in photos, providing movie recommendations to over 50 million users, recognizing and classifying different types of cars, pedestrians, and road hazards in self-driving cars, or translating human speech in real time.
[0100] During training, data flows through the DNN in a forward propagation phase until a prediction is produced, which indicates a label corresponding to the input. If the neural network does not correctly label an input, the error between the correct label and the predicted label is analyzed, and the weights are adjusted for each feature during a backward propagation phase until the DNN correctly labels that input and other inputs in the training data set. Training complex neural networks requires a large amount of parallel computing performance, including floating-point multiplication and addition supported by the PPU 300. Inference is less computationally intensive than training and is a latency-sensitive process in which a trained neural network is applied to new inputs it has not seen before to classify images, translate speech, and generally reason about new information.
[0101] Reasoning and training logic
[0102] As mentioned above, deep learning or neural learning systems need to be trained to generate inferences from input data. Fig. 6A and / or Figure 6B Details regarding the inference and / or training logic 615 of the deep learning or neural learning system are provided.
[0103] In at least one embodiment, the inference and / or training logic 615 may include, but is not limited to, a data memory 601 to store forward and / or output weights and / or input / output data corresponding to neurons or layers of neurons of a neural network used for training and / or for inference in aspects of one or more embodiments. In at least one embodiment, the data memory 601 stores input / output data during training and / or inference using aspects of one or more embodiments and / or weight parameters and / or input / output data for each layer of a neural network trained or used in conjunction with one or more embodiments during forward propagation of weight parameters. In at least one embodiment, or any portion of the data memory 601 may be included in other on-chip or off-chip data storage, including a processor's L1, L2, or L3 cache or system memory.
[0104] In at least one embodiment, any portion of data memory 601 may be internal or external to one or more processors or other hardware logic devices or circuits. In at least one embodiment, data memory 601 may be a cache memory, a dynamically random addressable memory, or a memory that can be used to store data.
[0105] ("DRAM"), static random addressable memory ("SRAM"), non-volatile memory (e.g., flash memory), or other memory. In at least one embodiment, the choice of whether data memory 601 is internal or external to the processor, for example, or composed of DRAM, SRAM, flash memory, or some other memory type, can depend on the available storage space on-chip or off-chip, the latency requirements of the training and / or inference functions being performed, the batch size of data used in inference and / or training of the neural network, or some combination of these factors.
[0106] In at least one embodiment, the reasoning and / or training logic 615 may include, but is not limited to, a data memory 605 to store backward and / or output weights and / or input / output data corresponding to neurons or layers, corresponding to neurons or layers of neurons of a neural network trained and / or used for reasoning in aspects of one or more embodiments. In at least one embodiment, the data memory 605 stores input / output data during training and / or reasoning using aspects of one or more embodiments and / or weight parameters during backward propagation for each layer of a neural network trained or used with one or more embodiments. In at least one embodiment, any portion of the data memory 605 may be included with other on-chip or off-chip data memory, including the L1, L2, or L3 cache or system memory of a processor. In at least one embodiment, any portion of the data memory 605 may be internal or external to one or more processors or other hardware logic devices or circuits. The data memory 605 may be a cache memory, DRAM, SRAM, non-volatile memory (e.g., flash memory), or other memory. In at least one embodiment, code and / or data memory 605 is selected to be internal or external to the processor, e.g., comprised of DRAM, SRAM, flash memory, or some other memory type, depending on whether the available storage is on-chip or off-chip, the latency requirements of the training and / or inference functions being performed, the data batch sizes used in inference and / or training of the neural network, or some combination of these factors.
[0107] In at least one embodiment, data memory 601 and data memory 605 may be separate storage structures. In at least one embodiment, data memory 601 and data memory 605 may be the same storage structure. In at least one embodiment, data memory 601 and data memory 605 may be partially the same storage structure and partially separate storage structures. In at least one embodiment, any portion of data memory 601 and data memory 605 may be included with other on-chip or off-chip data memory, including the processor's L1, L2 or L3 cache or system memory.
[0108] In at least one embodiment, the inference and / or training logic 615 may include, but is not limited to, one or more arithmetic logic units ("ALUs") 610 to perform logic and / or mathematical operations based at least in part on or directed by training and / or inference code, the results of which may result in activations (e.g., output values from a layer or neuron within a neural network) being stored in activation memory 620, which is a function of input / output and / or weight parameter data stored in data memory 601 and / or data memory 605. In at least one embodiment, the activations are generated by linear algebra and / or matrix-based mathematics performed by ALU 610 in response to executing instructions or other code to generate the activations stored in activation memory 620, wherein the weight values stored in data memory 605 and / or data memory 601 are used as operands with other values, such as bias values, gradient information, momentum values, or other parameters or hyperparameters, any or all of which may be stored in data memory 605 or data memory 601 or other on-chip or off-chip storage. In at least one embodiment, one or more ALUs 610 are included in one or more processors or other hardware logic devices or circuits, while in another embodiment, one or more ALUs 610 may be outside a processor or other hardware logic device or circuit that uses them (e.g., a coprocessor). In at least one embodiment, ALUs 610 may be included within an execution unit of a processor, or otherwise included in a group of ALUs accessible by an execution unit of a processor, which may be within the same processor or distributed between different processors of different types (e.g., a central processing unit, a graphics processing unit, a fixed function unit, etc.). In at least one embodiment, data memory 601, data memory 605, and activation memory 620 may be on the same processor or other hardware logic device or circuit, while in another embodiment, they may be in different processors or other hardware logic devices or circuits or some combination of the same and different processors or other hardware logic devices or circuits. In at least one embodiment, any portion of activation memory 620 may be included with other on-chip or off-chip data memory, including the processor's L1, L2, or L3 cache or system memory. Additionally, inference and / or training code may be stored with other code accessible to a processor or other hardware logic or circuitry and may be retrieved and / or processed using the processor's fetch, decode, schedule, execute, exit, and / or other logic circuitry.
[0109] In at least one embodiment, activation memory 620 may be a cache memory, DRAM, SRAM, non-volatile memory (e.g., flash memory), or other memory. In at least one embodiment, activation memory 620 may be completely or partially within or external to one or more processors or other logic circuits. In at least one embodiment, the choice of whether activation memory 620 is internal or external to the processor, for example, or the composition of DRAM, SRAM, flash memory, or other memory types, may depend on the storage available on-chip versus off-chip, the latency requirements for performing training and / or inference functions, the batch size of data used in inferencing and / or training neural networks, or some combination of these factors. In at least one embodiment, Fig. 6A The inference and / or training logic 615 shown in FIG. 6 may be used in conjunction with an application specific integrated circuit (“ASIC”), such as Google’s Processing unit, Graphcore TM Intel Corp’s Inference Processing Unit (IPU) (e.g., "Lake Crest") processor. In at least one embodiment, Fig. 6A The illustrated inference and / or training logic 615 may be used in conjunction with central processing unit (“CPU”) hardware, graphics processing unit (“GPU”) hardware, or other hardware such as a field programmable gate array (“FPGA”).
[0110] Figure 6B Inference and / or training logic 615 is shown in accordance with at least one embodiment. In at least one embodiment, the reasoning and / or training logic 615 may include, but is not limited to, hardware logic in which computing resources are dedicated or otherwise used exclusively with weight values or other information corresponding to one or more layers of neurons within a neural network. In at least one embodiment, Figure 6B The inference and / or training logic 615 shown in FIG. 6 can be used in conjunction with an application specific integrated circuit (ASIC), such as Google's Processing unit, Graphcore TM Inference Processing Unit (IPU) or IntelCorp’s (e.g., "Lake Crest") processor. In at least one embodiment, Figure 6BThe reasoning and / or training logic 615 shown in can be used in conjunction with central processing unit (CPU) hardware, graphics processing unit (GPU) hardware, or other hardware (e.g., field programmable gate array (FPGA)). In at least one embodiment, the reasoning and / or training logic 615 includes, but is not limited to, data storage 601 and data storage 605, which can be used to store weight values and / or other information, including bias values, gradient information, momentum values, and / or other parameter or hyperparameter information. Figure 6B In at least one embodiment shown in , each of data memory 601 and data memory 605 is associated with a dedicated computing resource, such as computing hardware 602 and computing hardware 606, respectively. In at least one embodiment, each of computing hardware 606 includes one or more ALUs that perform mathematical functions (e.g., linear algebraic functions) only on the information stored in data memory 601 and data memory 605, respectively, and the results are stored in activation memory 620.
[0111] In at least one embodiment, each of the data stores 601 and 605 and the corresponding computing hardware 602 and 606 corresponds to a different layer of the neural network, such that activations from one "storage / compute pair (601 / 602)" of the data store 601 and computing hardware 602 are provided as inputs to a "storage / compute pair (605 / 606)" of the data store 605 and computing hardware 606 to reflect the conceptual organization of the neural network. In at least one embodiment, each storage / compute pair (601 / 602 and 605 / 606) can correspond to more than one neural network layer. In at least one embodiment, additional storage / compute pairs (not shown) can be included in the inference and / or training logic 615 after or in parallel with the storage / compute pairs (601 / 602 and 605 / 606).
[0112] Neural network training and deployment
[0113] Figure 7Another embodiment for training and deploying a deep neural network is shown. In at least one embodiment, an untrained neural network 706 is trained using a training data set 702. In at least one embodiment, the training framework 704 is a PyTorch framework, while in other embodiments, the training framework 704 is Tensorflow, Boost, Caffe, Microsoft Cognitive Toolkit / CNTK, MXNet, Chainer, Keras, Deeplearning4j, or other training frameworks. In at least one embodiment, the training framework 704 trains an untrained neural network 706 and enables it to be trained using the processing resources described herein to generate a trained neural network 708. In at least one embodiment, the weights may be randomly selected or selected by pre-training using a deep belief network. In at least one embodiment, training may be performed in a supervised, partially supervised, or unsupervised manner.
[0114] In at least one embodiment, supervised learning is used to train the untrained neural network 706, where the training data set 702 includes inputs paired with expected outputs of the inputs, or where the training data set 702 includes inputs with known outputs and the outputs of the neural network are manually graded. In at least one embodiment, the untrained neural network 706 is trained in a supervised manner to process inputs from the training data set 702 and compare the resulting outputs with a set of expected or desired outputs. In at least one embodiment, errors are then propagated back through the untrained neural network 706. In at least one embodiment, the training framework 704 adjusts the weights that control the untrained neural network 706. In at least one embodiment, the training framework 704 includes tools for monitoring the degree to which the untrained neural network 706 converges toward a model (e.g., trained neural network 708) based on known input data (e.g., new data 712), which is suitable for generating the correct answer (e.g., result 714). In at least one embodiment, the training framework 704 repeatedly trains the untrained neural network 706 while adjusting the weights to refine the output of the untrained neural network 706 using a loss function and an adjustment algorithm (such as stochastic gradient descent). In at least one embodiment, the training framework 704 trains the untrained neural network 706 until the untrained neural network 706 reaches the desired accuracy. In at least one embodiment, the trained neural network 708 can then be deployed to implement any number of machine learning operations.
[0115] In at least one embodiment, untrained neural network 706 is trained using unsupervised learning, where untrained neural network 706 attempts to train itself using unlabeled data. In at least one embodiment, unsupervised learning training data set 702 will include input data without any associated output data or "ground truth" data. In at least one embodiment, untrained neural network 706 can learn groupings within training data set 702 and can determine how individual inputs are related to untrained data set 702. In at least one embodiment, unsupervised training can be used to generate a self-organizing map, which is a trained neural network 708 that can perform operations useful for reducing the dimensionality of new data 712. In at least one embodiment, unsupervised training can also be used to perform anomaly detection, which allows identification of data points in new data set 712 that deviate from the normal pattern of new data set 712.
[0116] In at least one embodiment, semi-supervised learning can be used, which is a technique in which a mixture of labeled and unlabeled data is included in the training data set 702. In at least one embodiment, the training framework 704 can be used to perform incremental learning, such as through a transfer learning technique. In at least one embodiment, incremental learning enables the trained neural network 708 to adapt to new data 712 without forgetting the knowledge injected into the network during initial training.
[0117] Figure 8 An exemplary system 800 according to one embodiment is shown. The system 800 can be used to perform and / or implement the above reference Figure 1-Figure 7 The functionality of any of the embodiments described.
[0118] As shown, a system 800 is provided, which includes at least one central processor 801 connected to a communication bus 802. The system 800 also includes a main memory 804 [eg, random access memory (RAM) etc.]. The system 800 also includes a graphics processor 806 and a display 808.
[0119] The system 800 may also include a secondary storage 810. The secondary storage 810 includes, for example, a hard disk drive and / or a removable storage drive, which represents a floppy disk drive, a tape drive, an optical disk drive, etc. The removable storage drive reads from and / or writes to a removable storage unit in a well-known manner.
[0120] To this end, a computer program or computer control logic algorithm may be stored in the main memory 804, the auxiliary memory 810, and / or any other memory. Such a computer program, when executed, enables the system 800 to perform various functions (e.g., as described above). The memory 804, the auxiliary memory 810, and / or any other memory are possible examples of non-transitory computer-readable media.
[0121] The system 800 may also include one or more communication modules 812. The communication module 812 may be used to facilitate communication between the system 800 and one or more networks and / or one or more devices via various possible standard or proprietary communication protocols (e.g., via Bluetooth, near field communication (NFC), cellular communication, etc.).
[0122] Also as shown, the system 800 may include one or more input devices 814. The input devices 814 may be wired or wireless input devices. In various embodiments, each input device 814 may include a keyboard, a touch pad, a touch screen, a game controller (e.g., to a game console), a remote control (e.g., to a set-top box or a television), or any other device that can be used by a user to provide input to the system 800.
[0123] As described herein, a method, computer readable medium, and system are disclosed to provide a dual recurrent neural network architecture for modeling long-term dependencies in continuous data. Figure 1-Figure 5 , the dual recurrent neural network architecture may include multiple recurrent neural networks. In one embodiment, Fig. 6A and 6B As shown, the recursive neural network (partially or entirely) may be stored in one or both of the data stores 601 and 605 in the inference and / or training logic 615. The training and deployment of the recursive neural network may be as follows: Figure 7 As shown and described herein. Figure 8 One or more systems 800 are shown and described herein for performing predictions using recurrent neural networks.
Claims
1. A computer-implemented method comprising: identifying a set of hidden states associated with an input sequence, the input sequence being a time-based data sequence and the hidden states in the set of hidden states corresponding to different time steps in the time-based data sequence, wherein the input sequence is a sequence of video frames or a speech sequence; processing the set of hidden states through a history recurrent neural network to learn a unit state transition function associated with the input sequence, the unit state transition function being a function by which a unit state and the hidden state of each node of the history recurrent neural network are changed, wherein the historical recurrent neural network includes an attention mechanism for calculating, for each time step in the time-based data sequence, attention information including a relationship between a last hidden state and each earlier hidden state to indicate a weight for each earlier hidden state, where the attention information is propagated through recurrent connections, and wherein the output of the attention mechanism is used to learn the unit state transition function; Inputting the input sequence and the unit state transition function into an updated recurrent neural network; as well as For each input of the input sequence, a current unit state and a corresponding hidden state in the update recurrent neural network are updated by the update recurrent neural network, wherein the update recurrent neural network uses the unit state transition function to update the current unit state and the corresponding hidden state for the input of the input sequence.
2. The method according to claim 1, wherein: The history recurrent neural network and the update recurrent neural network are long short-term memory (LSTM) networks.
3. The method according to claim 1, wherein: The history recursive neural network and the update recursive neural network are convolutional long short-term memory (ConvLSTM) networks.
4. The method according to claim 1, wherein: The history recurrent neural network and the update recurrent neural network are gated recurrent unit (GRU) networks.
5. The method according to claim 1, wherein: The set of hidden states associated with the input sequence includes all hidden states associated with the input sequence.
6. The method according to claim 1, wherein: The history recurrent neural network applies the attention mechanism to the set of hidden states associated with the input sequence.
7. The method according to claim 1, wherein: The loss function is used to train the history recurrent neural network and the update recurrent neural network.
8. The method according to claim 7, wherein: The history recurrent neural network and the update recurrent neural network are also trained using perceptual loss.
9. The method according to claim 1, wherein: Skip connections are utilized between the previous recurrent layer and the current recurrent layer.
10. The method according to claim 9, wherein: The skip connection connects the outputs of the previous recurrent layer and the current recurrent layer together.
11. The method according to claim 1, wherein: Gated skip connections are utilized across layers.
12. The method according to claim 11, wherein: The gated skip connections are multiplication gates added to control the flow of information across layers.
13. The method according to claim 1, wherein: The history recurrent neural network and the update recurrent neural network form a dual recurrent neural network architecture that models long-term dependencies in the sequence data represented by the input sequence.
14. The method of claim 13 further comprising predicting long-term future data from the input sequence using the dual recurrent neural network architecture.
15. A method according to claim 1, wherein the input sequence is a sequence of video frames, and wherein the attention information is calculated using the hidden states so that the attention information calculated for a given video frame is based on the spatiotemporal context of each previous frame in addition to the pixel-level information in the given frame.
16. The method of claim 1, wherein connections across time and space dimensions are used so that each processing layer of the historical recurrent neural network covers the entire context of the input sequence.
17. A computer system comprising: a non-transitory memory, wherein storage space of the non-transitory memory includes instructions; and one or more processors in communication with the memory, wherein the one or more processors execute the instructions to: identifying a set of hidden states associated with an input sequence, the input sequence being a time-based data sequence and the hidden states in the set of hidden states corresponding to different time steps in the time-based data sequence, wherein the input sequence is a sequence of video frames or a speech sequence; processing the set of hidden states through a history recurrent neural network to learn a unit state transition function associated with the input sequence, the unit state transition function being a function by which a unit state and the hidden state of each node of the history recurrent neural network are changed, wherein the historical recurrent neural network includes an attention mechanism for calculating, for each time step in the time-based data sequence, attention information including a relationship between a last hidden state and each earlier hidden state to indicate a weight for each earlier hidden state, where the attention information is propagated through recurrent connections, and wherein the output of the attention mechanism is used to learn the unit state transition function; Inputting the input sequence and the unit state transition function into an updated recurrent neural network; as well as For each input of the input sequence, a current unit state and a corresponding hidden state in the update recurrent neural network are updated by the update recurrent neural network, wherein the update recurrent neural network uses the unit state transition function to update the current unit state and the corresponding hidden state for the input of the input sequence.
18. The system of claim 17, wherein: The history recurrent neural network and the update recurrent neural network are: Long Short-Term Memory (LSTM) networks, Convolutional Long Short-Term Memory (ConvLSTM) networks, or Gated Recurrent Unit (GRU) network.
19. The system of claim 17, wherein: The set of hidden states associated with the input sequence includes all hidden states associated with the input sequence.
20. The system of claim 17, wherein: The history recurrent neural network applies the attention mechanism to the set of hidden states associated with the input sequence.
21. The system of claim 17, wherein: The loss function is used to train the history recurrent neural network and the update recurrent neural network.
22. The system of claim 21, wherein: The history recurrent neural network and the update recurrent neural network are also trained using perceptual loss.
23. The system of claim 17, wherein: Skip connections are utilized between the previous recurrent layer and the current recurrent layer.
24. The system of claim 23, wherein: The skip connection connects the outputs of the previous recurrent layer and the current recurrent layer together.
25. The system of claim 17, wherein: Gated skip connections are utilized across layers.
26. The system of claim 25, wherein: The gated skip connections are multiplication gates added to control the flow of information across layers.
27. The system of claim 17, wherein: The history recurrent neural network and the update recurrent neural network form a dual recurrent neural network architecture that models long-term dependencies in the sequence data represented by the input sequence.
28. The system of claim 27, further comprising predicting long-term future data from the input sequence using the dual recurrent neural network architecture.
29. A non-transitory computer readable medium storing computer instructions that, when executed by one or more processors, cause the one or more processors to perform a method comprising: identifying a set of hidden states associated with an input sequence, the input sequence being a time-based data sequence and the hidden states in the set of hidden states corresponding to different time steps in the time-based data sequence, wherein the input sequence is a sequence of video frames or a speech sequence; processing the set of hidden states through a history recurrent neural network to learn a unit state transition function associated with the input sequence, the unit state transition function being a function by which a unit state and the hidden state of each node of the history recurrent neural network are changed, wherein the historical recurrent neural network includes an attention mechanism for calculating, for each time step in the time-based data sequence, attention information including a relationship between a last hidden state and each earlier hidden state to indicate a weight for each earlier hidden state, where the attention information is propagated through recurrent connections, and wherein the output of the attention mechanism is used to learn the unit state transition function; Inputting the input sequence and the unit state transition function into an updated recurrent neural network; as well as For each input of the input sequence, a current unit state and a corresponding hidden state in the update recurrent neural network are updated by the update recurrent neural network, wherein the update recurrent neural network uses the unit state transition function to update the current unit state and the corresponding hidden state for the input of the input sequence.
