Title: SURPRISAL-DRIVEN FEEDBACK IN RECURRENT NET-WORKS

Abstract: Recurrent neural nets are widely used for predicting temporal data. Their inherent deep feedforward structure allows learning complex sequential patterns. It is believed that top-down feedback might be an important missing ingredient which in theory could help disambiguate similar patterns depending on broader context. In this paper, we introduce surprisal-driven recurrent networks, which take into account past error information when making new predictions. This is achieved by continuously monitoring the discrepancy between most recent predictions and the actual observations. Furthermore, we show that it outperforms other stochastic and fully deterministic approaches on enwik8 character level prediction task achieving 1.37 BPC.

1. INTRODUCTION:

Based on human performance on the same task, it is believed that an important ingredient which is missing in state-of-the-art variants of recurrent networks is top-down feedback. Despite evidence of its existence, it is not entirely clear how mammalian brain might implement such a mechanism. It is important to understand what kind of top-down interaction contributes to improved prediction capability in order to tackle more challenging AI problems requiring interpretation of deeper contextual information. Furthermore, it might provide clues as what makes human cognitive abilities so unique. Existing approaches which consider top-down feedback in neural networks are primarily focused on stacked layers of neurons, where higher-level representations constitute a top-down signal source. In this paper, we propose that the discrepancy between most recent predictions and observations might be effectively used as a feedback signal affecting further predictions. It is very common to use such a discrepancy during learning phase as the error which is subject to minimization, but not during inference. We show that is also possible to use such top-down signal without losing generality of the algorithm and that it improves generalization capabilities when applied to Long-Short Term Memory (Hochreiter & Schmidhuber, 1997) architecture. It is important to point out that the feedback idea presented here applies only to temporal data.

1.1. SUMMARY OF CONTRIBUTIONS:

The main contributions of this work are:

• the introduction of a novel way of incorporating most recent misprediction measure as an additional input signal • extending state-of-the-art performance on character-level text modeling using Hutter Wikipedia dataset.

1.2. RELATED WORK:

There exist other approaches which attempted to introduce top-down input for improving predictions. One such architecture is Gated-Feedback RNN (Chung et al., 2015) . An important difference between architecture proposed here and theirs is the source of the feedback signal. In GF-RNN it is assumed that there exist higher level representation layers and they constitute the feedback source.

On the other hand, here, feedback depends directly on the discrepancy between past predictions and current observation and operates even within a single layer. Another related concept is Ladder Networks (Rasmus et al., 2015) , where top-down connections contribute to improved semi-supervised learning performance. dataset. y-axis is negative log probability in bits. Intuitively surprise signal is low when a text fragment is highly predictable (i.e. in the < timestamp > part -sequence no 10, the tag itself is highly predictable, whereas the exact date cannot be predicted and should not be the focus of attention). The main idea presented in this paper is that feedback signal s t should be able to help in distinguishing predictable and inherently unpredictable parts during the inference phase.

2.1. NOTATION:

The following notation is used throughout the section:

x -inputs h -hidden units y -outputs p -output probabilities (normalized y) s -surprisal t -time step

W -feedforward x → h connection matrix U -recurrent h → h connection matrix V -feedback s → h connection matrix S -truncated BPTT length M -number of inputs N -number of hidden units • denotes matrix multiplication denotes elementwise multiplication σ(•), tanh(•) -elementwise nonlinearities δx = ∂E ∂x

In case of LSTM, the following concatenated representations are used:

EQUATION

2.2. SIMPLE RNN WITHOUT FEEDBACK:

First, we show a simple recurrent neural network architecture without feedback which serves as a basis for demonstrating our approach. It is illustrated in Fig. 2 and formulated as follows:

EQUATION

. . . h Figure 3 : Surprisal-Feedback RNN; s t represents surprisal (in information theory sense) -the discrepancy between prediction at time step t -1 and the actual observation at time step t; it constitutes additional input signal to be considered when making a prediction for the next time step.

Figure 3 presents the main idea of surprisal-driven feedback in recurrent networks. In addition to feedforward and recurrent connections W and U , we added one additional matrix V . One more input signal, namely V • s t is being considered when updating hidden states of the network. We propose that the discrepancy s t between most recent predictions p t-1 and observations x t might be effectively used as a feedback signal affecting further predictions. Such information is usually used during learning phase as an error signal, but not during inference. Our hypothesis is that it represents an important source of information which can be used during the inference phase, should be used and that it bring benefits in the form of improved generalization capability. Figure 1 presents examples of feedback signal being considered. Intuitively, when surprisal is near zero, the sum of input signals is the same as in a typical RNN. Next subsections provide mathematical description of the feedback architecture in terms of forward and backward passes for the Back Propagation Through Time (BPTT) (Werbos, 1990) algorithm.

2.4. FORWARD PASS:

Set h 0 , c 0 to zero and p 0 to uniform distribution or carry over the last state to emulate full BPTT.

∀ i , p i 0 = 1 M , i ∈ {0, 1, .., M -1}, t = 0 (3)

for t = 1:1:S-1

I. Surprisal part s t = - i log p i t-1 x i t (4)

IIa. Computing hidden activities, Simple RNN

EQUATION

IIb. Computing hidden activities, LSTM (to be used instead of IIa)

EQUATION

III. Outputs 

EQUATION

Carry error over to ∂Et ∂ct-1

EQUATION

Propagate error through the gates

EQUATION

EQUATION

EQUATION

EQUATION

Carry error over to ∂Et ∂ht-1

EQUATION

III. Backprop through linearities

EQUATION

EQUATION

IV. Surprisal part

EQUATION

Adjust ∂Et ∂pt-1 according to the sum of gradients and carry over to ∂Et ∂yt-1 

EQUATION

3. EXPERIMENTS:

We ran experiments on the enwik8 dataset. It constitutes first 10 8 bytes of English Wikipedia dump (with all extra symbols present in XML), also known as Hutter Prize challenge dataset 2 . First 90% of each corpus was used for training, the next 5% for validation and the last 5% for reporting test accuracy. In each iteration sequences of length 10000 were randomly selected. The learning algorithm used was Adagrad 1 with a learning rate of 0.001. Weights were initialized using so-called Xavier initialization Glorot & Bengio (2010) . Sequence length for BPTT was 100 and batch size 128, states were carried over for the entire sequence of 10000 emulating full BPTT. Forget bias was set initially to 1. Other parameters set to zero. The algorithm was written in C++ and CUDA 8 and ran on GTX Titan GPU for up to 10 days. Table 1 presents results comparing existing state-of-theart approaches to the introduced Feedback LSTM algorithm which outperforms all other methods despite not having any regularizer.

Table 1 : Bits per character on the Hutter Wikipedia dataset (test data). BPC mRNN (Sutskever et al., 2011) 1.60 GF-RNN (Chung et al., 2015) 1.58 Grid LSTM (Kalchbrenner et al., 2015) 

4. SUMMARY:

We introduced feedback recurrent network architecture, which takes advantage of temporal nature of the data and monitors the discrepancy between predictions and observations. This prediction error 1 with a modification taking into consideration only recent window of gradient updates 2 http://mattmahoney.net/dc/text.html 3 This method does not belong to the 'dynamic evaluation' group: 1. It never actually sees test data during training. 2. It does not adapt weights during testing 4 our implementation information, also known as surprisal, is used when making new guesses. We showed that combining commonly used feedforward, recurrent and such feedback signals improves generalization capabilities of Long-Short Term Memory network. It outperforms other stochastic and fully deterministic approaches on enwik8 character level prediction achieving 1.37 BPC.

5. FURTHER WORK:

It is still an open question what the feedback should really constitute as well as how it should interact with lower-level neurons (additive, multiplicative or another type of connection). Further improvements may be possible with the addition of regularization. Another research direction is incorporating sparsity in order improve disentangling sources of variation in temporal data.

:



Figures and Tables:

Figure 1: Illustration of s t signal on a typical batch of 16 sequences of length 100 from enwik8 dataset. y-axis is negative log probability in bits. Intuitively surprise signal is low when a text fragment is highly predictable (i.e. in the < timestamp > part -sequence no 10, the tag itself is highly predictable, whereas the exact date cannot be predicted and should not be the focus of attention). The main idea presented in this paper is that feedback signal s t should be able to help in distinguishing predictable and inherently unpredictable parts during the inference phase.

Figure 4: Training progress on enwik8 corpus, bits/character

Figure 2: Simple RNN; h -internal (hidden) states; x are inputs, y are optional outputs to be emitted 2.3 FEEDBACK AUGMENTED RECURRENT NETWORKS

Table content: <table><tr><td/><td/><td/><td colspan="3">error feedback</td></tr><tr><td/><td/><td/><td/><td>s t</td><td>V</td></tr><tr><td>prediction</td><td colspan="2">y t-1</td><td/><td/><td>y t</td></tr><tr><td/><td>W y</td><td/><td/><td/></tr><tr><td colspan="3">. . . h t-1</td><td>U</td><td/><td>tanh</td><td>h t</td><td>. . .</td></tr><tr><td colspan="4">internal state</td><td>x t</td><td>W</td></tr><tr><td/><td/><td/><td colspan="3">feedforward input</td></tr><tr><td colspan="2">y t-1</td><td/><td/><td/><td>y t</td></tr><tr><td>W y</td><td/><td/><td/><td/></tr><tr><td colspan="2">t-1</td><td>U</td><td/><td/><td>tanh</td><td>h t</td><td>. . .</td></tr><tr><td colspan="3">internal state</td><td>x t</td><td>W</td><td>x t+1</td></tr><tr><td/><td/><td colspan="4">feedforward input</td></tr></table>

Peer review (iclr2017):
This paper proposes to leverage *surprisal* as top-down signal in RNN. More specifically author uses the error corresponding to the previous prediction as an extra input at the current timestep in a LSTM. The general idea of suprising-driven feedback is interesting for online prediction task. It is a simple enough idea that seems to bring some significant improvements. However, the paper in its current form has some important flaws. - Overall, the paper writing could be improved. In particular, section 2.4 and 2.5 is composed mostly by the equations of the forward and backward propagation of feedback RNN and feedback LSTM. However, author provides no analysis along with those equations. It is therefore not clear what insight the author tries to express in those sections. In addition, feedback RNN is not evaluated in the experimental section, so it is not clear why feedback RNN is described. - The experimental evaluation is limited. Only one dataset enwik8 is explored. I think it is necessary to try the idea on different datasets to see if feedback LSTM sees some consistent improvements. Also, author claims state-of-art on enwik8, but hypernetwork, already cited in the paper, achieves better results (1.34 BPC, table 4 in the hypernetworks paper). - Author only compares to methods that do not use last prediction error as extra signal. I would argue that a comparison with dynamic evaluation would be more fair. Feedback LSTM uses prediction error as extra input in the forward prop, while dynamic evaluation backprop it through the network and change the weight accordingly. Also they don*t propagate the prediction error in the same way, they both leverage *extra* supervised information through the prediction errors. In summary: Pros: - Interesting idea - Seems to improve performances Cons: - Paper writing - Weak evaluation (only one dataset) - Compare only with approaches that does not use the last-timestep error signal