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 use previous error signal of the output layer as an additional input to recurrent update function in order to enhance the modelling power of a dynamic system such as RNNs. -This paper makes an erroneous assumption: test label information is not given in most of the real world applications, except few applications. This means that the language modelling task, which is the only experiment of this paper, may not be the right task to test this approach. Also, comparing against the models that do not use test error signal at inference time is unfair. We cannot just say that the test label information is being observed, this only holds in online-prediction problems. -The experiment is only conducted on one dataset, reporting state-of-the-art result, but unfortunately this is not true. There are already more than four papers reporting better numbers than the one reported in this task, however the author did not cite them. I understand that this paper came before the other papers, but the manuscript should be updated before the final decision. -The model size is still missing and without this information, it is hard to judge the contribution of the proposed trick.