Source-linked AI summary

Gated Feedback Recurrent Neural Networks

Junyoung Chung, Caglar Gulcehre, Kyunghyun Cho, Yoshua Bengio

arXiv:1502.02367v4cs.NEcs.LGstat.ML

TL;DR

RNNs have difficulty learning long-term dependencies while modeling sequences containing both fast- and slow-changing components. GF-RNN addresses this by adaptively gating recurrent connections across hierarchically stacked layers, including feedback from upper to lower layers, and it outperforms standard stacked RNNs on character-level language modeling and Python program evaluation. The authors also report a performance deterioration when GF-RNN uses tanh rather than more sophisticated gated activations.

  • Problem

    RNNs struggle to learn long-term dependencies, and sequence structure can combine fast- and slow-changing components requiring multiple timescales.

  • Method

    GF-RNN extends stacked recurrent layers with adaptive global gates controlling interlayer recurrent connections, including feedback from upper to lower layers.

  • Results

    GF-RNN outperformed standard stacked RNNs on character-level language modeling and Python program evaluation across different datasets and task difficulties.

  • Takeaways & Limitations

    Gated-feedback architecture is helpful for complicated sequences involving long-term dependencies and can scale to larger models and varying task difficulties.

  • Takeaways & Limitations

    Performance deteriorated when gated feedback was combined with tanh activation, motivating further study of its interaction with recurrent activation functions.

Abstract

from arXiv · show

In this work, we propose a novel recurrent neural network (RNN) architecture. The proposed RNN, gated-feedback RNN (GF-RNN), extends the existing approach of stacking multiple recurrent layers by allowing and controlling signals flowing from upper recurrent layers to lower layers using a global gating unit for each pair of layers. The recurrent signals exchanged between layers are gated adaptively based on the previous hidden states and the current input. We evaluated the proposed GF-RNN with different types of recurrent units, such as tanh, long short-term memory and gated recurrent units, on the tasks of character-level language modeling and Python program evaluation. Our empirical evaluation of different RNN units, revealed that in both tasks, the GF-RNN outperforms the conventional approaches to build deep stacked RNNs. We suggest that the improvement arises because the GF-RNN can adaptively assign different layers to different timescales and layer-to-layer interactions (including the top-down ones which are not usually present in a stacked RNN) by learning to gate these interactions.

1. Introduction

RNNs struggle to learn long-term dependencies, motivating architectures with persistent memory and hierarchical timescales. GF-RNN adds adaptive gated feedback to stacked recurrent layers and outperforms conventional RNN approaches on two sequence-modeling tasks.

  • Training RNNs to capture long-term dependencies is difficult despite their theoretical capacity.
  • Gated activations such as LSTM and GRU provide more persistent memory for capturing long-term dependencies.
  • Stacking recurrent layers is a conventional way to represent the hierarchical fast- and slow-changing components in sequences.
  • GF-RNN extends stacked RNNs with gated-feedback connections from upper recurrent layers to lower ones and adaptively controls recurrent connection strength.The design targets multiple adaptive timescales and lets the model adapt its structure to the input sequence.
  • GF-RNN significantly outperforms conventional stacked and single-layer RNNs on language modeling and Python program evaluation across two datasets.

2. Recurrent Neural Network

The paper presents standard RNN sequence processing and next-symbol prediction, then reviews LSTM and GRU mechanisms for adaptively retaining, forgetting, and exposing recurrent memory. These gated units address long-term dependencies through input-dependent state transitions.

  • An RNN processes arbitrary-length sequences by recursively updating hidden states from the current input and previous hidden states.
  • Sequence probabilities can be factorized into next-symbol conditional probabilities, which an RNN models using its hidden state.The hidden state summarizes preceding symbols for predicting the next symbol.
  • Long short-term memory: LSTM uses a memory cell with input, forget, and output gates to control memorization, forgetting, and exposure of memory content.
  • Long short-term memory: LSTM gating can carry important memory content across many timesteps while resetting content deemed unnecessary.
  • Gated recurrent unit: GRU uses reset and update gates to modulate previous states and balance previous memory with new candidate content.
  • Gated recurrent unit: The GRU reset mechanism can ignore previous hidden states when warranted by the previous states and current input, while its update mechanism supports long-term dependencies.

3. Gated Feedback Recurrent Neural Network

GF-RNN generalizes hierarchical recurrent modeling by adaptively gating fully connected interactions across stacked layers, including feedback from coarser to finer timescales. It uses global reset gates to control recurrent signals and supports tanh, LSTM, and GRU units.

  • Adaptive timescales: The architecture is motivated by sequences containing both slow-moving and fast-moving components, requiring recurrent models to capture long-term and short-term dependencies.Different recurrent layers can operate at different timescales through hierarchical stacking and adaptive gating.
  • Adaptive timescales: The model generalizes CW-RNN by adaptively adjusting connectivity between hidden layers across consecutive timesteps rather than assigning explicit update rates.Hidden units are partitioned into modules corresponding to layers in a recurrent stack.
  • Global reset gates: Each module is fully connected to the other modules and itself, while logistic global reset gates control recurrent connections using the current input and previous hidden states.The gates replace a fixed connectivity pattern with learned, input- and state-dependent interactions.
  • Gated-feedback architecture: GF-RNN extends stacked recurrent layers by allowing information from upper, coarser-timescale layers to flow back into lower, finer-timescale layers.This adds top-down interactions to the usual bottom-up flow between recurrent layers.
  • Recurrent-unit variants: GF-RNN can incorporate tanh, LSTM, and GRU recurrent units, with global reset gates applied to the recurrent state computation.For LSTM and GRU variants, the unit-wise gates remain unchanged and the global gates affect the new-state computation.

4. Experiment Settings

The experiments evaluate GF-RNNs on character-level language modeling and Python program evaluation using controlled architectures, datasets, metrics, and training procedures.

  • GF-RNNs were evaluated on character-level language modeling and Python program evaluation, both framed as discrete sequence-modeling tasks.
  • Language modeling: The Hutter dataset contains 100 MBytes of characters, split into 90 MBytes for training, 5 MBytes for validation, and the remainder for testing.
  • Language modeling: Language-modeling performance was measured using average bits-per-character, E[−log2 P(x_t+1|h_t)].
  • Python program evaluation: Python program evaluation maps scripts to printed outputs, with difficulty controlled by nesting levels and target-sequence length.
  • The study compared single-layer, stacked, and GF-RNN architectures with tanh, LSTM, and GRU transition functions under roughly matched parameter counts.
  • Python program evaluation: Python models used encoder-decoder RNNs with three hidden layers and GRU or LSTM units, trained on 320,000 generated examples with early stopping.

5. Results and Analysis

GF-RNNs outperform conventional architectures with gated units across the reported language-modeling and Python-evaluation analyses, while adaptive feedback gating is supported as important.

  • Language modeling: GF-RNNs with LSTM and GRU units outperform the tested baseline architectures, whereas GF-RNNs do not improve vanilla tanh RNNs.
  • Language modeling: GF-RNN learning curves show faster progress over wall-clock time under both parameter-count and hidden-unit constraints, suggesting facilitated optimization.
  • Language modeling: Fixing global reset gates to 1 yields a GF-LSTM test BPC of 1.854, between conventional stacked LSTM and gated GF-LSTM results.
  • Qualitative analysis: In generated text, stacked LSTM failed to close two XML tags in both trials, while GF-LSTM closed both tags across the reported generations.
  • Language modeling: The larger five-layer GF-RNN with LSTM units achieved performance comparable to or better than previously reported best results.
  • Python program evaluation: Python accuracy decreases as nesting or target length increases, but GF-RNNs generally outperform stacked RNNs, especially at higher difficulty.

6. Conclusion

The paper concludes that gated-feedback connections improve deep stacked RNNs on challenging sequence-modeling tasks, with gains in performance and training speed. However, the architecture’s effectiveness depends on the recurrent activation function, with deterioration observed for tanh units.

  • Gated-feedback connections form a deep stacked RNN architecture that improves modeling of complicated sequences involving long-term dependencies.The experiments focused on character-level language modeling and Python program evaluation, with results consistent across different datasets.
  • GF-RNNs trained faster in wall-clock time and achieved better performance than standard stacked RNNs with the same capacity.Large GF-LSTM also outperformed previously reported best character-level language-modeling results, while GF-RNNs exceeded standard stacked RNNs and prior records on Python program evaluation.
  • Performance deteriorated when gated-feedback connections were paired with tanh activation rather than more sophisticated gated activation functions.The paper identifies further investigation of the interaction between gated-feedback connections and recurrent activation functions as future work.
Loading 1502.02367v4…