Elamur Research

Multi-Timescale Long Short-Term Memory Neural Network for Modelling Sentences and Documents

Paper · 2015 · Pengfei Liu, Xipeng Qiu, Xinchi Chen et al.

Summary

A clue at the beginning of a movie review can matter as much as a clue at the end. A recurrent neural network reads the review in order and builds up a representation as it goes. By the time it reaches the last word, evidence from the opening has passed through many updates. Training faces the same distance in reverse. If the final judgment is wrong, the signal identifying what needs to change has to travel back to the point where the network first saw the useful evidence. This paper asks whether dividing the network’s memory by update frequency can make both jobs easier.

The authors start with long short-term memory, or LSTM, a recurrent architecture with gates that learn what to retain, add and expose at each step. Their multi-timescale version, MT-LSTM, divides the hidden units into groups with fixed update schedules. The fastest group processes every word. Slower groups revise their states at wider intervals and keep their previous values in between. The authors test two directions for connections between groups. The stronger setting lets slower groups draw on faster ones when they update. This gives recent evidence a route into parts of the network that revise their memory less often.

The evaluation covers sentence-level sentiment, question classification and sentiment in reviews that span several sentences. The fast-to-slow MT-LSTM improves on a standard LSTM with the same hidden-layer size on every benchmark in the paper. Its test accuracy is 49.1% on the fine-grained SST-1 sentiment task, 87.2% on the binary SST-2 sentiment task and 94.4% on the QC question task. On IMDB review sentiment, it reaches 92.1%, compared with 88.5% for standard LSTM. It leads the reported comparisons on SST-1, QC and IMDB. On SST-2, it ties one of the strongest convolutional entries and trails the other. Sentiment & emotion · Text classification

The document experiment also shows faster convergence, and the authors report that MT-LSTM runs approximately three times faster than standard LSTM in practice. The shorter inputs reveal a tradeoff. If an update interval is too wide for the text, the corresponding group gets few chances to use the evidence, or the sequence ends before its update comes due. The paper’s strongest evidence is therefore about how to allocate recurrent updates for classification. Holding some parts of the state steady can improve both the final decision and the training process, provided those parts still have enough opportunities to take in information.

Deep dive: Multi-Timescale Long Short-Term Memory Neural Network for Modelling Sentences and Documents

Multi-timescale LSTM updates different parts of its memory at different rates to classify sentences and long documents, including movie reviews. · about 35 minutes to read

The problem and its context

A fixed-size representation for a variable-length text

A classifier needs to turn a text into evidence for a decision. A question may need a label describing the kind of answer it seeks. A review may need a label describing its overall sentiment. The text can be of varying length in either case, while the classification layer expects a vector with a fixed number of entries. The problem addressed in this paper is how to build that vector so it reflects which words occurred, how they were arranged and which details remain relevant after more words have arrived.

Distributed representations of words had already made it practical to start with a vector for each word. A vector is a set of numerical features. In a distributed representation, the information associated with a word is spread across its entries. The paper places its work in a line of research that uses such representations for language tasks and then asks how to combine them into representations of larger pieces of text. A word vector supplies a starting point for the word at the current position. The composition procedure determines how that word contributes to the phrase, sentence or document around it. Word embeddings

The classification label also determines what a useful representation must preserve. A question classifier may benefit from a brief expression that identifies the expected answer type. A review classifier may need to carry evidence through sentences that contribute little to the eventual decision, then weigh it against a qualification near the end. The review can be long in words without having relevant evidence at every position. The authors are interested in a representation that handles short informative spans and also gives earlier evidence a chance to survive across a long input.

The paper groups earlier approaches by the way they combine word representations. The differences matter because each approach imposes a different path from an individual word to the finished representation. One can pool word evidence immediately, carry it through a recurring state, combine pieces in a tree, or compose nearby features through convolution. These choices affect what information can interact and how far the signal has to travel before it reaches the classifier.

Pooling words, following a sequence and composing larger pieces

The simplest approach in the paper’s account is the neural bag of words. Averaging the word vectors produces a single vector regardless of how many words the text contains. This gives the classifier a straightforward way to use vocabulary across a document. It also makes the same words contribute in the same way when their order changes. The authors regard this as a particular drawback for short sentences, where rearranging a small amount of material can change the interpretation. For general document classification, the words present in the document can still form a useful signal.

A recurrent neural network keeps track of order by reading a word at a time. Its hidden state, the vector it passes from one step to the next, changes in response to both that word and the preceding state. The final state can then represent the whole sequence. In the paper’s account, recurrence tends to favor recent inputs. That tendency can be useful when the task is to predict a continuation from recent context, but the relevance of a word to a document label can be independent of how close it is to the end. The paper connects recurrent sequence representations to work on encoding a sequence as a fixed-size vector for a downstream task. Sequence to Sequence Learning

Paragraph Vector offers a different way to retain information about a piece of text. The paper describes it as learning a distributed representation for that piece and treats the resulting vector as a form of longer-term memory alongside the shorter-term behavior of recurrence. Its training is unsupervised in the paper’s account. The classification comparison applies a separate classifier to the learned paragraph representations. In MT-LSTM, the training signal for the classification decision reaches the recurrent encoder itself, so the representation can change in response to mistakes on that decision. Paragraph Vector

A tree-based recursive network composes the text according to a structure supplied in advance. Starting from the words, it combines child representations at each node and reuses the same composition weights across the tree. The vector at the root represents the sentence. This can let words interact according to their syntactic grouping. It also requires a parse structure and, when the input includes several sentences, leaves a further question about how to combine the resulting sentence representations. The sequential architecture in this paper starts from the order of the words and uses that order throughout the input. Recursive Deep Networks for Sentiment

A convolutional network begins with word embeddings in sequence order. Its filters combine features over local stretches, and pooling collects useful responses into a smaller representation. Successive layers can put local features together into more abstract ones. In the paper’s description, this allows word order to contribute to the representation while ultimately producing a fixed-size vector. For a long document, a designer can add capacity or introduce a separate stage for combining sentence representations. The cited example of a two-level convolutional network does exactly that, with a sentence encoder followed by a document encoder. Dynamic Convolutional Neural Network

Why ordinary LSTM is the starting point

A simple recurrent update can be difficult to train over long spans. Each step transforms the previous hidden state. In training, the gradient measures how a small change to a state or parameter would affect the loss. Passing that signal through many transformations can make parts of it grow or decay exponentially. A signal that decays can give an early state little useful guidance about the final prediction. A signal that grows excessively also makes learning difficult. The concern is about learning which relationships to preserve, in addition to having a state large enough to hold them.

LSTM changes the recurrent transition by introducing a memory cell and gates. The cell provides a place for information that can persist while the network reads new words. The gates determine how much of the previous contents to retain, how much of a proposed change to write, and how much of the resulting contents to expose as hidden state. This gives the network a learned way of maintaining a feature over time. The paper uses the LSTM variant described in work on recurrent sequence generation, in which the gates can also receive information from the memory cells. Generating Sequences with Recurrent Networks

For the authors, that still leaves an architectural question. A standard LSTM calculates its gated transition at every position. It can learn to retain a feature by making a succession of favorable gate decisions. In a long review, the same feature may need to survive many such decisions, and training must send credit or blame for the final prediction through the corresponding sequence of updates. The authors seek a route in which some of the steps are guaranteed copies. When a group is inactive, the existing value survives that step by construction.

The inspiration comes from earlier recurrent designs that use delayed connections or units operating at different rates. In particular, the paper draws on the idea of a recurrent layer divided into groups that run on different schedules. Its contribution is to introduce that organization into an LSTM with gated cells, then test how the slow and fast parts should communicate when the end product is a text classification. The group schedule and the direction of communication are distinct choices. The former determines when a state can change. The latter determines whose state can inform that change. A Clockwork RNN

The method, step by step

From the first word to the class decision

The network starts with a sequence of word embeddings. It uses the same general route from words to labels for a sentence and for a multi-sentence review. At each word position, it looks at the current input and consults the schedule for its groups. Some groups calculate a gated update. Others carry forward the cell and hidden values they already had. Once the input ends, the combined hidden state supplies the fixed-size representation passed to the classification layer.

Imagine an early phrase in a review that is useful for predicting sentiment. The fastest group can respond to the words as they arrive. A slower group can later use the faster group’s state when its own update is due, under the fast-to-slow connectivity rule. Once the slower group has incorporated some of that information, its cell and hidden state pass through intervening positions unchanged. Its next update can adjust or discard the information. In this sense, a long timescale describes how frequently the network can revise a stored value. The decision about which feature to retain still depends on learning.

The schedule runs by word position. It does not have to identify the end of a clause or the transition between review sentences. A slow group follows the same period whether its next opportunity falls at a sentence boundary or in the middle of a phrase. The current word goes directly into the update of every group due at that position. Information about preceding words can also arrive through the earlier states that the feedback rule permits the group to read. This combination lets a slow group use the current input and some of the sequence already read.

From word sequence to classification

The steps in order.

From word sequence to classificationStep 1: Look up the current word embedding1. Look up the current word embeddingStep 2: Check which memory groups are due2. Check which memory groups are dueStep 3: Read earlier states through permitted connections3. Read earlier states through permitted connectionsStep 4: Update the active memory cells4. Update the active memory cellsStep 5: Compute active groups’ exposed hidden states5. Compute active groups’ exposed hidden statesStep 6: Carry inactive states forward unchanged6. Carry inactive states forward unchangedStep 7: Repeat through the last word7. Repeat through the last wordStep 8: Predict the class from the final hidden state8. Predict the class from the final hidden state

The distinction between a cell state and a hidden state matters throughout. The cell state is the internal memory. The hidden state exposes a gated version of that memory. It goes into recurrent connections and, at the end of the text, into classification. An inactive group carries both forward. A group can therefore contribute a hidden value to the final representation even if its most recent update took place well before the final word.

The recurrent transition and the LSTM gates

The paper first gives the rule for ordinary recurrence. Written with the current position as a subscript, it has an initial state and a separate rule for processing the sequence.

hₜ = { 0                  if t = 0
     { f(hₜ₋₁, xₜ)        otherwise

Here t is the sequence position, hₜ is the hidden state at that position, and hₜ₋₁ is the preceding hidden state. The symbol xₜ denotes the current input vector. The function f combines that input and the previous state. The value 0 is the zero vector for the state at the initial position. The subscripts t and t−1 distinguish the current step from the previous one.

For simple recurrence, the paper describes a common choice of f as a learned affine transformation followed by an elementwise nonlinear function. An affine transformation combines the components of its inputs with learned weights and can shift the result. The nonlinear function then acts separately on each entry. LSTM replaces this single transition with an explicit path for the memory cell and separate computations for the gates. The symbol f below, when written as a gate vector with a position subscript, refers to the forget gate.

iₜ = σ(Wᵢ xₜ + Uᵢ hₜ₋₁ + Vᵢ cₜ₋₁)

The vector iₜ is the input gate at position t. The logistic sigmoid σ acts on each entry and gives a gate value in the range described by the paper as [0, 1]. The matrix Wᵢ maps the current input xₜ into the gate computation. The matrix Uᵢ maps the previous hidden state hₜ₋₁, and Vᵢ maps the previous memory cell cₜ₋₁. Juxtaposition denotes multiplication of a matrix by a vector. The plus signs combine the resulting vectors before the sigmoid. A larger entry of the gate admits more of the corresponding proposed memory content.

fₜ = σ(W𝒻 xₜ + U𝒻 hₜ₋₁ + V𝒻 cₜ₋₁)

The vector fₜ is the forget gate. The matrices W𝒻, U𝒻 and V𝒻 act on the current input xₜ, the previous hidden state hₜ₋₁ and the previous cell cₜ₋₁, respectively. The plus signs add those contributions and σ converts their sum into entrywise gate values. The effect of the gate is easiest to read from the cell update below. A large forget-gate value preserves more of the old cell entry. A small one suppresses more of it.

oₜ = σ(Wₒ xₜ + Uₒ hₜ₋₁ + Vₒ cₜ)

The vector oₜ is the output gate. Its matrices Wₒ, Uₒ and Vₒ multiply the current input xₜ, the previous hidden state hₜ₋₁ and the current cell cₜ. The plus signs combine the products and σ again gives an entrywise gate. The use of cₜ means that the gate can respond to the updated memory at the same position. The cell computation can therefore be completed before the network decides how much of its content to expose.

c̃ₜ = tanh(W꜀ xₜ + U꜀ hₜ₋₁)

The tilde in c̃ₜ marks the candidate cell content, a vector of possible additions to memory at position t. The matrix W꜀ multiplies the current input xₜ, and U꜀ multiplies the previous hidden state hₜ₋₁. The plus sign adds the products, and tanh, the hyperbolic tangent, acts separately on their entries. The candidate proposes content. The input gate determines how much enters the cell.

cₜ = fₜ ⊙ cₜ₋₁ + iₜ ⊙ c̃ₜ

The vector cₜ is the new cell state. The symbol ⊙ means elementwise multiplication, so each forget-gate entry in fₜ scales the corresponding old entry in cₜ₋₁. Each input-gate entry in iₜ scales the corresponding candidate entry in c̃ₜ. The plus sign adds the surviving old content and the admitted new content. This gives the cell a direct way to retain an existing value while accepting new evidence in selected entries.

hₜ = oₜ ⊙ tanh(cₜ)

The vector hₜ is the current hidden state. The function tanh transforms each entry of the current cell cₜ, and ⊙ multiplies each transformed entry by its corresponding output-gate value in oₜ. Together the two operations let the cell hold information internally while controlling how strongly that information contributes to the exposed state. In the paper’s notation, d is the number of LSTM units and hence the length of each gate, cell and hidden vector before partitioning.

The three gates answer different questions about a single update. The forget gate acts on what the cell has already stored. The input gate acts on the candidate computed for the current word. The output gate affects the value that the rest of the network can read. A cell can preserve something while exposing little of it at a particular step. MT-LSTM keeps this distinction and changes how frequently the entire update takes place for a subset of units.

Assigning periods to the groups

MT-LSTM partitions the hidden units into groups. Each group has its own entries of the cell and hidden state, along with the parts of the gate and weight matrices needed to update those entries. The total hidden-layer size describes the combined width of the groups. The group index orders them by their update periods in the schedule used for the experiments.

t mod Tₖ = 0

Here t is the current word position, k identifies a group Gₖ, and Tₖ is its update period. The operation mod returns the remainder after division. Equality to 0 says that the position is divisible by the period, so the group runs its update there. If that condition fails, the group copies its existing state. The activation decision comes from this rule and is fixed by the position and period.

Tₖ = 2ᵏ⁻¹

The symbol Tₖ is the period of the group indexed by k. The base 2 makes the periods grow exponentially with that index, and subtracting 1 in the exponent gives the first group a period of 1. It can therefore update at every word. The last group, indexed by g when there are g groups, has the widest interval. The authors allow other sets of periods in the general architecture and use this series in their evaluation. With a single group on the fastest schedule, the construction reduces to ordinary LSTM.

A schedule with wider intervals has two consequences. In the forward pass, a slow group can hold a value between updates with no input-gate or forget-gate computation on those steps. During training, the gradient across each copy of that state can also be carried back through the copy operation. The overall sequence still has a step for each word. What changes is the number of intervening gated transformations on a route through the slow group. This is the sense in which the design offers a shorter path for retaining evidence and assigning credit over a long span.

Updating an active group

The equations for an active group extend the ordinary gate equations by drawing on states from multiple groups. The notation below puts the group index in brackets. A matrix with a source and a destination in brackets maps the source group’s vector to a contribution for the destination group. Which such matrices are present is determined by the feedback strategy.

iₜ[k] = σ(Wᵢ[k] xₜ + ∑ⱼ₌₁ᵍ Uᵢ[j→k] hₜ₋₁[j] + ∑ⱼ₌₁ᵍ Vᵢ[j→k] cₜ₋₁[j])

The vector iₜ[k] is the input gate of destination group k at position t. The matrix Wᵢ[k] maps the current input xₜ to that group’s gate. In each sum ∑ⱼ₌₁ᵍ, j runs over the g source groups, beginning at 1. The arrow j→k gives the direction of each connection. The matrix Uᵢ[j→k] multiplies source group j’s previous hidden state hₜ₋₁[j]. The matrix Vᵢ[j→k] multiplies its previous cell state cₜ₋₁[j]. The plus signs combine the terms before the entrywise logistic sigmoid σ.

fₜ[k] = σ(W𝒻[k] xₜ + ∑ⱼ₌₁ᵍ U𝒻[j→k] hₜ₋₁[j] + ∑ⱼ₌₁ᵍ V𝒻[j→k] cₜ₋₁[j])

The vector fₜ[k] is the forget gate for group k at the current position t. The input matrix W𝒻[k] maps xₜ to the gate. For each source j, the matrices U𝒻[j→k] and V𝒻[j→k] multiply, respectively, its previous hidden state hₜ₋₁[j] and previous cell cₜ₋₁[j]. Both sums run from source 1 through source g. The plus signs add the contributions, and σ turns them into entrywise retention factors. The gate can thus use another group’s evidence to decide how much of its own cell to keep.

oₜ[k] = σ(Wₒ[k] xₜ + ∑ⱼ₌₁ᵍ Uₒ[j→k] hₜ₋₁[j] + ∑ⱼ₌₁ᵍ Vₒ[j→k] cₜ[j])

The vector oₜ[k] is the output gate of group k at position t. The matrix Wₒ[k] multiplies current input xₜ. Over source indices j from 1 to g, Uₒ[j→k] multiplies the previous hidden state hₜ₋₁[j], and Vₒ[j→k] multiplies the current cell cₜ[j]. The plus signs add the resulting vectors before the sigmoid σ. The current cell can be either newly computed or copied from the previous step, depending on the source group’s schedule. All the current cell values are available before the output gates need them.

c̃ₜ[k] = tanh(W꜀[k] xₜ + ∑ⱼ₌₁ᵍ U꜀[j→k] hₜ₋₁[j])

The vector c̃ₜ[k] is the candidate cell content for group k at position t. Its input matrix W꜀[k] multiplies xₜ. In ∑ⱼ₌₁ᵍ, the matrix U꜀[j→k] maps each preceding hidden state hₜ₋₁[j] from source j into candidate features for group k. The plus sign combines the current-input and recurrent contributions before tanh, the entrywise hyperbolic tangent.

cₜ[k] = fₜ[k] ⊙ cₜ₋₁[k] + iₜ[k] ⊙ c̃ₜ[k]

The vector cₜ[k] is group k’s cell state at position t. The symbol ⊙ multiplies matching entries. The forget gate fₜ[k] scales group k’s own preceding cell cₜ₋₁[k]. The input gate iₜ[k] scales the candidate c̃ₜ[k]. The plus sign joins retained and incoming content. Other groups’ states can shape the gates and candidate through the preceding equations. The direct retention term continues to carry the destination group’s own memory.

hₜ[k] = oₜ[k] ⊙ tanh(cₜ[k])

Here hₜ[k] is group k’s exposed hidden state at the current position t. The function tanh acts on the entries of its current cell cₜ[k], and ⊙ scales those entries by the matching values of its output gate oₜ[k]. This is the value available through hidden-state connections at later positions. It also supplies that group’s portion of the hidden state used for classification when the text ends.

The paper gives two copy equations for an inactive group. The first applies to its internal cell.

cₜ[k] = cₜ₋₁[k]

Both sides refer to group k. The left side is its cell at current position t, and the right side is its cell at the preceding position t−1. The equality copies every entry of the previous cell into the current state.

hₜ[k] = hₜ₋₁[k]

The left side is the current hidden state of group k, and the right side is its hidden state at the previous position. This equality also copies every entry. If another group is permitted to read this group’s state, the copied value is still present. Inactivity determines whether the group recomputes its own state at the current word.

Deciding which groups can communicate

The authors test a fast-to-slow strategy, abbreviated F2S. It allows a connection from a source group to a destination with an equal or longer period.

Tⱼ ≤ Tₖ

Here Tⱼ is the period of source group j, Tₖ is the period of destination group k, and ≤ means less than or equal to. A shorter period makes the source faster. Equality allows a group to use its own state. When the inequality fails, the source-to-destination matrices in the input, forget, output and candidate equations are set to zero. The affected matrices are the ones that multiply a hidden or cell state from the source. Each active group still has its own matrix for the current word input.

F2S gives information gathered by a fast group a chance to enter slower memory when a slow update comes due. Suppose a useful word arrives between such updates. The fast state can respond immediately. The slow state can take that response into account at a later scheduled step, if it is still available in a form that helps the gates or candidate calculation. Once the slow group writes a useful feature, it can hold it across intervening positions. The effect depends on the learned connections and on which features survive until the next scheduled transfer.

In the slow-to-fast strategy, abbreviated S2F, the inequalities go the other way. A slowly changing state can then influence a faster group as the faster group takes in new words.

Tⱼ ≥ Tₖ

Here Tⱼ is again the source period, Tₖ is the destination period, and ≥ means greater than or equal to. A group can use states from itself and from groups with longer periods. When the inequality fails, the corresponding cross-group matrices are set to zero. One consequence is that a slow group can furnish a relatively stable context to faster calculations over several positions. Both strategies follow the same clock rule and carry out the same kind of cell update. The comparison changes which direction a feature can travel across groups.

Choosing the number of groups and training the classifier

If the input ends before a slow group’s scheduled update, that group has no opportunity to take in a word for that input. Even when it runs, a very wide interval may give it few opportunities to revise its contribution. The authors therefore use typical text length to estimate a maximum group count, then treat the count used in the experiments as a hyper-parameter, a setting selected through validation.

g = log₂ L − 1

Here g denotes the proposed upper bound on the number of groups, L is the corpus’s average sequence length, and log₂ is the logarithm to base 2. The subtraction of 1 is part of the authors’ rule. They motivate it by seeking enough room for the slowest group to update at least twice on the typical length. The average serves as a guide for a dataset. Individual inputs can be shorter or longer, and the chosen count applies across inputs for that task.

To produce a class decision, a fully connected layer takes the combined hidden state at the final position and assigns a score to each class. A softmax then turns those scores into a probability distribution. Training minimizes cross-entropy between this predicted distribution and the target distribution. A prediction assigning little probability to the correct class incurs a larger loss. The authors add L₂ regularization, which penalizes large parameter values. Adagrad updates the parameters using the gradients, adapting the update size to the accumulated gradients for each parameter.

Back-propagation through time follows the calculations made during the read. At a position where a group ran its gates, the training signal passes through those calculations and can reach earlier source states through their connections. At a position where the group copied a state, the corresponding gradient is copied backward across that step and added to any other signal reaching the same earlier state. A slow group can therefore connect successive updates through intervening copies, while gradients arising from other uses of the group’s state can still contribute.

The experiments start the word vectors with word2vec embeddings trained on a Wikipedia corpus of 1B words. The paper gives the embedding vocabulary as about 500,000. The embeddings are then updated along with the classifier, a process known as fine-tuning. The other parameters are randomly initialized from a uniform distribution over [-0.1, 0.1]. Validation uses the development split where one exists and 10-fold cross-validation where it does not. A development split supplies held-out data for choosing settings. Cross-validation uses different held-out portions in turn to make that choice. word2vec · Fine-tuning

Experiments and results

What the benchmarks ask the network to predict

The evaluation uses three sentence-level tasks and one document-level task. The principal metric for all of them is classification accuracy, the percentage of examples assigned the correct class. The main scores refer to the benchmark test sets. The development results discussed later serve a different purpose. They show how accuracy changes when the number of groups is varied. A test accuracy has to be read against the dataset and label scheme that produced it, especially across tasks with different numbers or kinds of classes.

SST-1 and SST-2 both come from the Stanford Sentiment Treebank, which supplies movie-review sentences with sentiment labels. SST-1 has 5 classes, ranging from negative through a neutral category to positive, with intermediate degrees of sentiment. It has 8544 training sentences, 1101 development sentences and 2210 test sentences. The average length reported for the dataset is 19 words, and the vocabulary size is 18K. On this task, a prediction has to match the degree of sentiment as well as its direction.

SST-2 uses binary sentiment labels. It has 6920 training sentences, 872 development sentences and 1821 test sentences. The average length is 18 words and the vocabulary is 15K. SST-1 and SST-2 therefore offer two different sentiment decisions on broadly similar lengths of input. The score on SST-2 concerns a polarity choice. The score on SST-1 concerns a finer label inventory, so the two percentages answer different questions about the representation.

QC uses the TREC question dataset. The task is to identify the type of information the question seeks. Examples in the paper include questions seeking a person, a place or a number. The classifier assigns one of 6 categories. The paper lists 5452 training questions and 500 test questions, with an average question length of 10 words and a vocabulary of 9.4K. There is no separate development split in the dataset statistics. Despite the short input, the classification can depend on the distinction between the topic of a question and the kind of answer that would satisfy it. Learning Question Classifiers

IMDB is the document-level benchmark. The paper describes the full collection as 100,000 movie reviews and lists 25,000 training and 25,000 test reviews for the classification comparison. The label is binary sentiment. The average input length in its dataset statistics is 294 words, and the reported vocabulary is 392K. The reviews contain several sentences each. Those lengths give a slow group more opportunities to run and also create more intervening updates through which a standard LSTM must retain information. There is no separate development split listed. Learning Word Vectors for Sentiment Analysis

The paper reports embeddings of size 100 for each benchmark. The hidden-layer size is 60 for SST-1 and SST-2, 55 for QC and 100 for IMDB. The initial learning rate is 0.1, and the regularization setting is 10⁻⁵. For the main MT-LSTM comparisons, the group count is 3 on each sentence benchmark and 5 on IMDB. These are the settings for the headline comparison. The separate group-count analysis uses a fixed hidden-layer width of its own.

Which alternatives the authors compare

The standard LSTM is the most direct comparison. It shares the underlying gated architecture and has the same total hidden-layer size as MT-LSTM on each task. Its units update on every word. The main results also compare the two MT-LSTM connectivity directions, so the reader can see how much the choice of feedback matters after introducing periodic updates. Other entries in the comparison cover different ways to represent the text or build a classifier.

The simpler text classifiers include multinomial naive Bayes and a naive Bayes SVM, using features from individual words and pairs of consecutive words. Those pairs are bigrams. The neural bag-of-words baseline combines word vectors, applies a nonlinear transformation and predicts a label with a softmax. These baselines provide reference points for how far a classifier can get with vocabulary and, in the bigram case, short stretches of word order. Baselines and Bigrams · N-gram

The tree-based alternatives include recursive autoencoders using pretrained word vectors, a matrix-vector recursive network that uses parse trees, and a recursive tensor network with a tensor-based composition function. Across these approaches, the tree supplies a route for assembling parts of a sentence into a larger representation. The convolutional comparisons include the dynamic convolutional network with its dynamic k-max pooling, which selects strong feature responses, and the non-static and multichannel configurations of Kim’s sentence classifier. AdaSent supplies an adaptive hierarchical comparison that uses gates. Recursive Autoencoders · Recursive Matrix-Vector Spaces · Convolutional Networks for Sentence Classification

For document classification, the paper includes the two-level dynamic convolutional network that first encodes sentences and then combines the sentence vectors. It also trains a logistic regression classifier on top of Paragraph Vector representations, using the Gensim implementation for those representations. The results table draws many comparator scores from their original studies, while the direct LSTM comparison uses the authors’ own experimental setup. The range of available comparisons differs by dataset.

Accuracy on sentences and questions

On SST-1, the standard LSTM reaches 47.9% test accuracy. Changing the recurrent layer to MT-LSTM gives 48.9% with slow-to-fast feedback and 49.1% with fast-to-slow feedback. The strongest listed convolutional result on this task is 48.5% for the dynamic convolutional network. The fast-to-slow configuration has the highest reported accuracy on the fine-grained sentiment task.

Fine-grained sentiment accuracy on the SST-1 test set

Both scheduled LSTMs improve on standard LSTM, and fast-to-slow feedback leads the comparison.

Fine-grained sentiment accuracy on the SST-1 test setStandard LSTM: 47.9Standard LSTM47.9Dynamic convolutional network: 48.5Dynamic convolutional network48.5MT-LSTM, slow-to-fast: 48.9MT-LSTM, slow-to-fast48.9MT-LSTM, fast-to-slow (this paper): 49.1MT-LSTM, fast-to-slow (this paper)49.1
The numbers
System or settingaccuracy %
Standard LSTM47.9
Dynamic convolutional network48.5
MT-LSTM, slow-to-fast48.9
MT-LSTM, fast-to-slow (this paper)49.1

SST-2 is the closest comparison with the convolutional entries. Standard LSTM gets 85.8% test accuracy, slow-to-fast MT-LSTM gets 86.7%, and fast-to-slow MT-LSTM gets 87.2%. CNN-non-static also gets 87.2%, while CNN-multichannel gets 88.1%. The recurrent change improves results within the LSTM family. The multichannel convolutional entry retains the highest accuracy in this particular comparison.

The authors accompany the SST-2 comparison with a discussion of parameter counts. They give a range of 10K to 40K for LSTM and a figure of about 400K for CNN. These are the paper’s general counts for the architectures it discusses. The paper does not lay out a separate parameter accounting for each test score. Its point is that the fast-to-slow recurrent result is close to the strongest convolutional results under the reported setups, with a smaller recurrent network in the paper’s comparison.

The QC results give the paper’s best question-classification accuracy to fast-to-slow MT-LSTM at 94.4% on the test set. The slow-to-fast result is 93.3%, and standard LSTM reaches 91.3%. The leading CNN entry reaches 93.6%. The task’s short average length matters to the interpretation. The result indicates that even short inputs can benefit from dividing an LSTM’s updates across timescales. The longer temporal route motivated the architecture, while the improvement in test accuracy is visible on both short and long inputs.

Document accuracy and convergence

IMDB has the clearest separation between the two feedback directions among the main results. The fast-to-slow network reaches 92.1% test accuracy, ahead of the reported Paragraph Vector result of 91.7%. Slow-to-fast MT-LSTM reaches 90.2%, and standard LSTM gets 88.5%. The two-level dynamic convolutional network reaches 89.4%. With the longer inputs, the best scheduled recurrent configuration leads both the equal-hidden-size LSTM comparison and the reported alternatives.

Movie review sentiment accuracy on the IMDB test set

Fast-to-slow MT-LSTM leads the comparison and improves on the standard recurrent baseline.

Movie review sentiment accuracy on the IMDB test setStandard LSTM: 88.5Standard LSTM88.5Two-level dynamic convolutional network: 89.4Two-level dynamic convolutional network89.4MT-LSTM, slow-to-fast: 90.2MT-LSTM, slow-to-fast90.2Paragraph Vector: 91.7Paragraph Vector91.7MT-LSTM, fast-to-slow (this paper): 92.1MT-LSTM, fast-to-slow (this paper)92.1
The numbers
System or settingaccuracy %
Standard LSTM88.5
Two-level dynamic convolutional network89.4
MT-LSTM, slow-to-fast90.2
Paragraph Vector91.7
MT-LSTM, fast-to-slow (this paper)92.1

The document comparison illustrates two ways of handling sentences within a review. The two-level convolutional system first gives each sentence its own representation and then builds the review representation from those vectors. MT-LSTM reads through the words in sequence and maintains its several update rates across the document. The paper notes that the earlier convolutional study considered the IMDB data too small for training its convolutional approach satisfactorily. The available results concern those implementations and their training conditions. They show that periodic recurrent updates provide an effective way to run a single encoder from the beginning of a review to its end.

The paper also plots convergence on IMDB. Convergence here concerns how the networks progress during training. The authors report a faster rate for MT-LSTM and say that it is approximately three times faster than LSTM in practice. Their explanation is that inactive groups copy their hidden values and skip the usual gated calculations at many positions. The plot and practical speed report speak to related benefits. A network can make progress more quickly in training, and a scheduled update can also cost less work at a position where some groups are inactive. The paper associates both benefits with the document experiment.

What the ablations show

The direction of feedback matters

The most direct architectural comparison keeps the periodic groups and reverses the permitted direction of their connections. On every benchmark, F2S gives the higher test accuracy. On IMDB, the scores are 92.1% for F2S and 90.2% for S2F. On SST-1, they are 49.1% and 48.9%, respectively. Both directions improve on standard LSTM across the reported tasks, so splitting the layer into timed groups is compatible with improvement under either tested connection rule. The best results consistently favor the rule that lets slower groups consult faster ones.

The authors interpret this as support for periodically storing useful evidence from the fast state in a slower one. A fast group sees each word, so its sequence of states can reflect evidence from the positions between slow updates. When a slow group next runs, it can draw on this recent state and also read the current input. Its own gates decide how much to keep. Under S2F, the slower state can instead influence successive fast calculations, while faster evidence has no corresponding connection into the slow group. The test scores favor the first arrangement for the classification decisions studied here.

This comparison tests the two connection patterns as whole configurations. A particular slow group can use fast information in its gate computations, its proposed cell content and the exposure of its state. The accuracy comparison leaves the contribution of each path unresolved. It also leaves open how a connection pattern that allowed information to travel in both directions would behave. As evidence for the authors’ explanation, the experiment supports the usefulness of the fast-to-slow route, while the contents that travel along it are inferred from the design and the final accuracy.

Group count depends on how long the input runs

The authors vary the number of groups while holding the full hidden layer at a size of 120. Their plot tracks development accuracy on the four tasks. Fixing the total width matters because increasing the group count changes the division of units and the range of periods within the same overall memory budget. It also changes the opportunities for connections across rates. The sweep therefore tests the practical effect of repartitioning the layer under the proposed schedule.

For SST-1, SST-2 and QC, the authors find that too many groups can hurt. Short texts sometimes finish before the slowest groups have run, and a late update leaves little opportunity for those groups to take in additional evidence. Part of the hidden layer is then assigned to schedules that can make only limited use of the input. Adding a timescale can thus change both how long a feature is carried and how much of the layer is available to respond before the text ends. The authors describe underfitting when the count is too high.

On IMDB, the longer reviews allow more groups to participate. The paper reports that development accuracy benefits from increasing the number of groups in the range where additional timescales help. Its selected count is 5. The average-length rule gives IMDB a proposed maximum of 7, so the best observed count is within the suggested range. The experiment supports trying slower groups for the longer input. The reported optimum still comes from the validation experiment with a particular layer width and benchmark.

For SST-1 and SST-2, the rule gives a maximum of 3 in each case, and the experiments also select 3 on each dataset. QC is the exception. The rule gives it a maximum of 2, while the best observed setting has 3 groups. The discrepancy is important because it shows the role of validation. The length calculation captures an opportunity to update. It leaves the value of an actual update to depend on what the question contains, the other groups’ states and the task’s class distinctions.

What changes as the words arrive

The paper also inspects sentiment predictions during the reading of examples from the SST-2 test set. In ordinary use, the classifier predicts from the state at the end. For the case study, the authors examine scores at intermediate word positions as well. The figure puts successive input words along the horizontal axis and the predicted sentiment score on the vertical axis. A horizontal boundary marks where the score switches between the positive and negative sides. This makes it possible to see a final judgment emerge or change as the input continues.

One example is a short rhetorical question about whether something counts as progress. The word progress supplies an apparently positive cue. The correct sentiment label is negative. The authors show MT-LSTM reaching that judgment after it sees the question mark. The timing illustrates sensitivity to a late signal that can change the reading of the preceding words. The score trajectory records the change at that position. It leaves open whether the network has learned a general way of interpreting rhetorical questions.

Another example says that someone would make a better movie than the one being discussed. The comparative adjective initially carries a positive association. The continuation makes clear that the film under review is the inferior one. MT-LSTM ends on the correct negative side of the boundary once it receives that continuation. Standard LSTM ends with the wrong prediction. This example illustrates why the direction of a comparison matters to sentiment. A favorable word can be part of an unfavorable judgment when it applies to an alternative.

The remaining example weighs a denial of gourmet quality against a favorable assessment of what the establishment serves. Its sentiment is positive overall, despite cues that could support a negative reading along the way. MT-LSTM reaches the correct label and the standard LSTM has difficulty with the example. The authors take this as an illustration of useful evidence persisting through more complicated composition. The plot follows the output scores. It gives a view of when the predictions change, while the specific contributions from individual memory groups remain unresolved.

Limitations

Limits the authors identify

The authors identify a practical limit on creating progressively slower groups. Their period is measured in positions, so a short input can give a slow group too few opportunities to update. The empirical group-count choices also show that average length gives approximate guidance. QC’s best setting exceeds the proposed maximum. The authors therefore rely on validation to choose the count. The heuristic should be read in light of both the average length it uses and the spread of lengths among actual examples.

The conclusion identifies the feedback mechanism as further work. The comparison covers fast-to-slow and slow-to-fast connectivity. Each is a fixed rule about which groups can send information to which other groups. The paper presents the stronger rule for its experiments and leaves other ways of connecting short and long timescales open. The schedule itself is likewise a design choice. The authors allow arbitrary periods in the formulation and run their experiments with the exponential schedule.

The paper also situates the document comparison within what the existing alternatives can readily handle. Its examples include sentence encoders that depend on parse trees and a convolutional approach with a separate document stage. The authors point out the difficulty of extending some sentence architectures across several sentences. Their experiment addresses that issue by running the same recurrent design over the whole review. The relative advantage is measured against the document comparisons that appear in the paper.

Limits evident in the experiments

The evidence for document handling comes from IMDB sentiment. The classification result establishes that the architecture can help assign an overall review label to multi-sentence inputs from that benchmark. It leaves open how the same schedule would behave on documents whose evidence has a different distribution or whose output requires finer distinctions. The test tells the reader whether the final class was correct. It cannot localize how far the decisive evidence traveled in any particular review.

Input length and dependency length are related but can differ. A long review gives a network many opportunities to lose useful evidence. It can also contain sentiment cues near the end, where even a short effective memory may suffice. A short question may depend on the relation between words separated by much of its input. The experiment compares benchmarks and architectures using their overall accuracy. Evidence about a particular span would require examples whose decisive words and distances were identified. The paper’s case study supplies illustrative trajectories, while systematic measurement of retention distance remains open.

Equal hidden-layer width is a useful control because the gains over LSTM cannot be attributed simply to adding hidden units. It still leaves several changes bundled together. The periodic architecture skips computations at some positions, divides the units into groups and restricts cross-group connectivity. The feedback comparison reverses one connectivity rule within the grouped architecture, and the group-count sweep changes the partition under a fixed width. Neither gives an independent estimate of each change’s share of the final test accuracy.

The reported scores also leave the variability of the comparisons undetermined. The table gives point values, and the paper describes improvements as significant. It supplies no uncertainty intervals or statistical significance procedure for the accuracy comparisons. Small separations such as the SST-1 results for the two feedback directions should consequently be read as an ordering of the reported scores. The same ordering across tasks supports the authors’ choice of default, while variation across training runs is unavailable.

The speed claim depends on the experimental setting. The IMDB convergence plot and the practical timing report support the authors’ account of faster training, and the gating schedule explains why a slow group can skip work. The paper offers no comparable timing breakdown by task or by operation. An exact speed estimate for a different setup would depend on details such as how the scheduled computation and copies are implemented. The group-count plot likewise addresses accuracy under a specified fixed width, while a full comparison of the cost of different partitions remains open.

Finally, the sentiment examples visualize the classifier’s scores. They are helpful for identifying positions where the prediction changes, such as punctuation at the end of a question or the continuation of a comparison. The examples do not trace specific signals through the network’s cells. A group may help preserve information, affect another group’s gate or provide a useful feature directly to the classifier. The distribution of those roles is a question for further analysis. The benchmark results, group sweep and score trajectories provide evidence at the level of decisions and configurations.

What came after

The citing works span text classification, emotion detection, medical report generation and word segmentation. Their citation relationship establishes that the paper entered discussions of these tasks. The architecture was evaluated here as a recurrent encoder for one decision per text, with the clocks controlling how its state evolves before that decision. A later mention of recurrent memory can concern that general representation problem or the specific use of scheduled groups. The details of adoption remain open for the works whose scope is given by their titles.

Adversarial Multi-task Learning for Text Classification is closest in task format. Its named contribution concerns adversarial multitask learning, or learning across tasks in an adversarial setup. MT-LSTM addresses a different design choice within text classification. It changes how an encoder revises its state as it proceeds through an individual input. The connection is that a text classification system needs a representation on which to base its decisions. The citation alone leaves open whether the later encoder uses the periodic partition or either of its feedback directions.

EmoNet brings gated recurrent networks to fine-grained emotion detection. Its connection to the paper lies in both the use of gated recurrence and the need to extract evidence for affective labels from a sequence. The SST-1 evaluation also requires a more detailed affective judgment than a binary polarity choice, though its classes describe degrees of sentiment. The later paper’s title establishes its focus on emotion and gating. The use of distinct group clocks within that gated network remains unspecified.

On the Automatic Generation of Medical Imaging Reports cites the work in a generation setting. The target there is a report, while the MT-LSTM experiments produce a class label. This changes the possible role of recurrent memory. In classification, the paper’s combined final state supplies evidence for a single prediction. In a report generation task, there is a sequence of output decisions to make. The citation connects the paper to that broader setting, though the specific role of its schedule or feedback rules in the report system is undetermined.

Long Short-Term Memory Networks for Chinese Word Segmentation has a relationship that runs in both directions. The MT-LSTM paper itself cites the segmentation study when describing applications of LSTM to sequence labeling. Word segmentation concerns boundaries within a sequence, so it illustrates a use of recurrent states at positions inside the input. The classification experiments in MT-LSTM use the final hidden representation for the label. The two citations establish a shared interest in gated sequence processing, and the MT-LSTM paper identifies the segmentation study as context for its choice of LSTM. Tokenization & segmentation

New Arabic Medical Dataset for Diseases Classification brings the citation back to classification through a dataset contribution. Its stated task concerns assigning disease categories to Arabic medical data. The most direct connection is the general problem of representing an input so a classifier can choose an appropriate category. The paper on MT-LSTM evaluated sentiment and question labels. The citation supplies a link to another classification domain, while the use or evaluation of its particular recurrent schedule on the Arabic data remains open.

Cite

Cite as Pengfei Liu, Xipeng Qiu, Xinchi Chen, Shiyu Wu and Xuanjing Huang. 2015. Multi-Timescale Long Short-Term Memory Neural Network for Modelling Sentences and Documents. Proceedings of the 2015 Conference on Empirical Methods in Natural Language Processing.

The paper itself, not this page. BibTeX from the library's record of the work. DOI 10.18653/v1/d15-1280

@inproceedings{liu2015multi,
  title = {{Multi-Timescale Long Short-Term Memory Neural Network for Modelling Sentences and Documents}},
  author = {Pengfei Liu, Xipeng Qiu, Xinchi Chen, Shiyu Wu and Xuanjing Huang},
  booktitle = {Proceedings of the 2015 Conference on Empirical Methods in Natural Language Processing},
  year = {2015},
  doi = {10.18653/v1/d15-1280},
  url = {https://doi.org/10.18653/v1/d15-1280}
}

↑ back to top

This page in Markdown https://md.research.elamur.ai/free/en/papers/liu-2015-multi-timescale-long-short-term/