Refining Raw Sentence Representations for Textual Entailment Recognition via Attention
Paper · 2017 · Jorge Balazs, Edison Marrese-Taylor, Pablo Loyola et al.
Summary
A pair of sentences can share much of its vocabulary while making different claims. In natural language inference, the task is to read a premise and decide whether a hypothesis follows from it, contradicts it, or remains unresolved given what the premise says. The Rivercorners team used the RepEval shared task to ask how well a system can make those judgments when it has to represent each sentence by itself. The setup probes a particular kind of natural language understanding: can an encoder retain enough of a sentence’s meaning to support a comparison whose other sentence it has yet to see?
The authors build a sentence representation in stages. A bidirectional recurrent network first produces a vector for each word position, taking account of the surrounding words. A simple operation such as averaging reduces those vectors to a preliminary summary. The system then uses that summary to rescore the positions in the same sentence and forms a weighted average of their vectors. This is the paper’s inner attention mechanism. It lets the encoder revisit its first pass and give some positions more influence. Only after this refinement does the classifier bring the premise and hypothesis together. It receives both sentence vectors, their coordinate-wise products, and the magnitudes of their coordinate-wise differences.
The selected single system achieved test accuracy of 72.057% on the matched track, which draws on the same sources as training, and 72.055% on the mismatched track, which uses different sources. An ensemble that averages predictions across independently initialized systems reached 72.247% and 72.827%, respectively. The authors report that their submission surpassed the shared task’s LSTM baseline. In the separate development comparison, the system’s overall accuracy was close to ESIM’s, even though ESIM can use information from both sentences during attention and Rivercorners encodes each sentence independently.
The authors also varied how they formed the preliminary sentence vector and whether they supplied character-based information. Mean pooling was a consistently strong choice on matched development data, although the repeated trials did little to distinguish the pooling methods statistically. Character representations likewise offered little consistent advantage in this architecture. The comparisons establish what the full pipeline can achieve and show how it responds to these changes. How much of that performance comes specifically from the attention step remains an open question, since all of the reported pooling comparisons retain attention and the same sentence matching features.
Deep dive: Refining Raw Sentence Representations for Textual Entailment Recognition via Attention
How Rivercorners refines sentence representations with attention for textual entailment, and what its MultiNLI results establish. · about 34 minutes to read
The problem and its context
What an inference label asks of a sentence representation
Natural language inference starts with an ordered pair. The premise supplies the information the reader is asked to take as given. The hypothesis proposes a claim whose status depends on that information. Entailment means that the premise supports the claim as a consequence. Contradiction means that the two claims are incompatible in the intended reading. A neutral case leaves the hypothesis unsettled. The order matters because a premise can warrant a less specific hypothesis while the reverse inference leaves some details open. A successful classifier therefore needs a way to keep track of which sentence supplied which evidence.
The authors put entailment and contradiction at the center of the paper because both are fundamental to meaning. They connect those relations to uses in information retrieval, semantic parsing, and commonsense reasoning. The connection is easiest to see by considering the evidence a judgment requires. A passage may use the vocabulary a reader expects and still fail to establish the desired claim. The words around a claim help determine what is asserted, and the relationship between two assertions depends on more than how many words they have in common. RepEval turns this broad issue into a classification problem with defined inputs and labels.
The paper describes a field that had approached inference through symbolic logic, knowledge bases, and neural networks. These approaches frame the problem in different ways. For the branch of work the team joins, the question is what a learned numerical representation preserves. Deep learning had made inference a place to test distributed representations of words and phrases, where information is spread across the coordinates of vectors. The shared task shifts attention to the sentence as the unit of representation. It asks a system to compress what the input says and then use the result to judge its relation to another input.
Representing the whole sentence introduces a choice about when to compare the pair. A system can let the hypothesis direct its reading of the premise, or it can finish reading each sentence and leave all interaction to the classifier. In the first design, a detail in the premise can attract attention because a corresponding detail occurs in the hypothesis. In the second, the encoder must decide how to represent that detail from the premise alone. Rivercorners follows the second design. Its inference decision still depends on both sentences. The distinction concerns which information is available while the individual sentence vectors are being formed.
The design also changes the meaning of a sentence vector. If the encoder conditions a premise on its current hypothesis, the premise representation can change when the hypothesis changes. If the premise is encoded independently, the same input can reach the comparison stage in the same form across different pairings. That property makes it meaningful to ask how broadly the representation preserves useful information. It also imposes a bottleneck. Once the encoder has reduced a sentence to a single vector, everything the classifier learns about the sentence has to be accessible through that vector.
Why the shared task has matched and mismatched tracks
RepEval frames inference as a balanced classification task over sentence pairs. The authors describe two forms of evaluation using MultiNLI. In the matched track, training and evaluation draw from the same sources. This tests whether the system can classify held-out pairs in familiar kinds of writing and speech. In the mismatched track, the evaluation sources differ substantially from the training sources. This asks whether the features learned for the task remain useful when the inputs come from different genres. The relation labels and the act of comparing a premise with a hypothesis carry over across the tracks. The origin of the sentences changes.
That distinction matters for interpreting the sentence vectors. A decision rule can work within familiar sources partly because it has encountered similar language during training. A useful representation may also preserve regularities that apply across sources. The mismatched track offers a way to examine that possibility under the conditions of the challenge. The paper relates its evaluation to the description of the MultiNLI corpus and draws its genre-level baseline scores from that work. A Broad-Coverage Challenge Corpus for Sentence Understanding through Inference
The task also helps distinguish an architectural comparison from a comparison of objectives. Rivercorners and the reference systems are evaluated on the same inference labels. They differ in the information they make available at each point in their computation. In particular, ESIM provides a reference point for how an architecture with attention across the pair performs. A comparison with ESIM can establish whether the independently encoded vectors are competitive under the benchmark’s scoring. Isolating the effect of where attention is applied would require control over the other architectural differences.
How the paper arrives at attention within a sentence
The authors connect their approach to earlier work by Liu and colleagues on attention within an input and to work by Lin and colleagues on self-attentive sentence embeddings. The shared premise is that a sentence encoder can benefit from assigning different degrees of influence to different positions. Rivercorners adds a specific sequence of operations. It first collects a rough impression of the whole sentence through pooling and then uses that impression when deciding how to weight the pieces. The mechanism is a form of attention because its weights depend on the material being encoded. A Structured Self-attentive Sentence Embedding
The authors motivate this sequence with the experience of rereading. A reader can form a rough sense of a sentence, then give closer attention to portions whose significance becomes clear in light of the whole. In the implementation, the rough sense is an aggregate of contextual word vectors. The second look is a scoring operation over those vectors. It neither needs fresh access to the raw sentence nor guarantees a human-like reading. Its practical purpose is to make the single vector handed to the classifier more selective than an initial pooling operation can be on its own.
An important precedent concerns what happens after selection. The paper follows earlier work by Mou and colleagues in supplying coordinate-wise products and absolute differences when comparing sentence vectors. This gives the classifier direct features for the relationship between the two inputs in addition to the vectors themselves. The paper’s approach thus combines an independently constructed representation with explicit matching after encoding. That matching step is part of the system whose performance is measured, and it matters when deciding how much explanatory weight to give the attention mechanism. Discriminative Neural Sentence Modeling by Tree-Based Convolution
The method, step by step
From a sequence of words to a decision
The architecture has a boundary that runs through the entire design. Before the boundary, the premise and hypothesis undergo the same kinds of operations independently. Each starts as a sequence of word vectors. A recurrent encoder then represents every position in context. Pooling makes a sentence-sized summary, and attention uses that summary to reconsider the influence of each position. After the boundary, the two refined vectors meet. The classifier can use their individual contents and features built from comparing them.
From separate sentence encodings to an inference label
The steps in order.
The first reduction in the diagram produces a provisional vector. The sequence of contextual vectors remains available during refinement, so the encoder can refer back to specific positions even if their individual contributions would be hard to recover from the pooled summary alone. The second reduction produces the vector that crosses the boundary into matching. By then, the contextual sequence has served its purpose. The comparison stage receives a fixed-size description of each sentence regardless of their lengths.
Looking up words and composing characters
The first layer gives every word position a numerical input. The main source is a set of pretrained word embeddings. Each known word has an associated vector that the encoder retrieves using the word’s index. These representations were learned in a separate procedure. In the Rivercorners experiments, the pretrained entries stay fixed while the inference task trains the components that read and combine them. The experiments use 300-dimensional vectors from training on 840B tokens. The large training collection belongs to the origin of the vectors, while the inference examples supply the supervision for the later stages. GloVe
A word outside the pretrained vocabulary still needs a numerical input. The authors initialize unknown word vectors by sampling uniformly from (−0.05, 0.05). A uniform draw gives equal density throughout the interval, and the interval applies to the initial values of the vector components. This fills in entries for words without available pretrained values. The paper explicitly describes the pretrained vectors as fixed during training. It gives the initialization rule for unknown word vectors separately.
The optional character component represents a word through the small units that make up its spelling. The authors start with a randomly initialized character embedding matrix. A row supplies the vector for a character, just as a word lookup supplies the vector for a word. For a particular word, they read its characters in sequence, fetch the corresponding vectors, and pass them through a unidirectional long short-term memory network, or LSTM. The character network returns a series of hidden states. Its final state represents the word’s character sequence as a vector of fixed size.
The character lookup entries have 20 dimensions, and the output of the character LSTM has 50 dimensions. The lookup matrix is trained with the inference system. Where the character option is enabled, the word’s character vector and its pretrained word vector are concatenated, meaning their coordinates are placed end to end. The resulting token representation includes information learned from the spelling and information carried by the word lookup. The character recurrence runs within a word. The context recurrence described next runs across positions in a sentence.
The authors relate this character procedure to earlier work by Wang and colleagues. For Rivercorners, the optional branch provides a controlled question within the task. The same basic inference pipeline can be run with the word representations alone or with the additional character-based information. The paper reports both configurations throughout the pooling comparisons. Bilateral Multi-Perspective Matching for Natural Language Sentences
Reading each sentence in both directions
A lookup supplies the same pretrained vector for a known word whenever that entry is used. Its role in a sentence, however, depends on the surrounding words. Rivercorners takes a step toward representing that role by running an LSTM across the sequence in each direction. An LSTM carries a state forward through its input and updates that state as it reads each position. The paper writes the recurrence in terms of the hidden vectors it needs for the rest of the architecture. One direction visits the words in their original order. The other begins at the end and works back toward the beginning.
h⃗ᵢ = LSTM(xᵢ, h⃗ᵢ₋₁)
Here i indexes a word position, xᵢ is the input vector for that word, and h⃗ᵢ is its forward hidden vector. The right arrow identifies the direction of reading. h⃗ᵢ₋₁ is the forward vector at the position immediately before i in sentence order. LSTM is the recurrent operation that updates the hidden representation using the current input and the carried state.
h⃖ᵢ = LSTM(xᵢ, h⃖ᵢ₊₁)
Here h⃖ᵢ is the backward hidden vector at position i, and h⃖ᵢ₊₁ is the hidden vector from the position immediately after it in sentence order. That latter position has already been processed in the backward pass. The left arrow identifies this direction. xᵢ supplies the same position’s input vector as in the forward pass, and LSTM denotes the recurrent update in the backward direction.
hᵢ = [h⃗ᵢ; h⃖ᵢ]
In this formula hᵢ is the contextual vector at position i. h⃗ᵢ and h⃖ᵢ are the forward and backward hidden vectors at that position. The brackets and the semicolon denote concatenation, with the forward coordinates followed by the backward coordinates. The resulting vector is centered on a position, but both directions of reading can supply information about its surroundings.
For a sentence of length n, the context layer returns a sequence of n such vectors. A longer sentence therefore supplies more position vectors, each of the same size for a given system configuration. The paper sets the word-level LSTM output dimension to 300. In its accounting of the character-enabled setup, each direction contributes 350 dimensions and the concatenated position vector has 700 dimensions. The repeated runs without character embeddings use 600-dimensional contextual vectors, and the selected system without characters also yields 600-dimensional sentence representations.
This division of labor is important for understanding the next stage. A pooling operation acts on the contextual sequence, where each position has already been processed in relation to the other positions. Mean and sum pooling treat the positions symmetrically at the point of reduction. Word order can still affect their outputs through the recurrent computation that produced the vectors in the first place. The raw representation is called raw because it precedes attention, even though a substantial encoding step has already taken place.
Constructing the preliminary sentence vector
The context layer has one output per word position. The pooling layer converts the entire sequence to a single vector, denoted h̄. The authors compare mean pooling, sum pooling, a concatenation of the final states in the two directions, and maximum pooling. Each route produces a vector suitable for the same downstream attention procedure. The alternatives differ in how the position vectors can influence that first description of the sentence.
h̄ = (1/n) ∑ᵢ₌₁ⁿ hᵢ
Here h̄ is the preliminary sentence vector, n is the number of word positions, and hᵢ is the contextual vector at position i. The summation ∑ runs from the first position through the last and adds corresponding coordinates. Multiplication by 1/n gives the mean. Each position contributes with the same weight at this stage, with the total normalized by sentence length.
h̄ = ∑ᵢ₌₁ⁿ hᵢ
Here h̄ is the preliminary vector from sum pooling. hᵢ denotes the contextual vector at position i, n is the sentence length, and ∑ again adds the vectors across all positions. There is no length normalization in this operation. The total can therefore depend on how many positions contribute as well as on the values and signs of the coordinates they contribute.
h̄ = [h⃗ₙ; h⃖₁]
Here h⃗ₙ is the forward hidden vector at the last position of a sentence of length n. h⃖₁ is the backward hidden vector at the first position in the written sentence, which is the last position read in that direction. The arrows identify the respective passes. The brackets and semicolon concatenate these endpoints into the preliminary vector h̄. Each endpoint carries the state reached after its direction has traversed the sentence.
h̄ = maxᵢ₌₁…ₙ hᵢ
Here h̄ is the preliminary vector from maximum pooling, hᵢ is the contextual vector at position i, and n is the number of positions. The maximum is taken separately for each coordinate over the indicated positions. Different coordinates can take their maxima from different words. The result collects the strongest values along individual dimensions while keeping the same vector size as the other pooling outputs.
The final-state variant deserves a distinction from simply taking the contextual vector at the last word. That last word has a forward state that has traversed the sentence and a backward state at the start of its traversal. The formula instead takes the endpoint from each completed traversal. Mean, sum, and maximum pooling work over the combined contextual vectors at all positions. The endpoint method draws on information transmitted through the recurrent state rather than making a new aggregation over the entire sequence.
In each case the preliminary vector serves as a query about the sentence it came from. The aim is to give the next layer enough of a broad view that it can judge the usefulness of each local representation. Mean pooling, for instance, can make a general starting point by including every position. The following attention stage still has each individual position available and can depart from those equal contributions. The success of a pooling option in the paper is therefore success as an input to refinement and classification.
Revisiting positions with inner attention
Attention starts by comparing the preliminary vector with each contextual vector. The comparison is learned from the inference task. It is computed for every position in the sentence and has access to the same preliminary vector each time. The attention is global in the sense that the full sequence participates. It is inner attention because the information used to score a position comes from the sentence that contains it. The authors use the concatenation scoring scheme associated with earlier attention work in machine translation. Effective Approaches to Attention-based Neural Machine Translation
uᵢ = vᵀ tanh(W[h̄; hᵢ])
Here uᵢ is a scalar score for position i, h̄ is the pooled sentence vector, and hᵢ is the contextual vector at that position. The brackets and semicolon join the two vectors end to end. W is a trainable matrix that transforms the joined vector. tanh is the hyperbolic tangent applied to each component of the transformed vector. v is a trainable vector, and the transpose mark ᵀ makes vᵀ the row used to take the inner product with the result. That last operation reduces the transformed features to a single score.
The score can depend on how the position vector and the pooled vector work together. Both enter the same learned transformation before the nonlinearity, so the same kind of local evidence can receive differing scores in different sentences. Position scores have a common scale within the sentence for the next operation. On their own they are unnormalized values, and the ensuing weighting depends on the scores of the other positions as well.
αᵢ = exp(uᵢ) / ∑ₖ₌₁ⁿ exp(uₖ)
Here αᵢ is the weight for position i, uᵢ is that position’s score, and exp is the exponential function. The denominator sums exponentiated scores exp(uₖ) over positions indexed by k, from the first position through sentence length n. The division normalizes the weights to a total of 1. This is a softmax over positions in the current sentence. A larger score gives a position a larger share of the weight, with the share depending on every score in the denominator.
h̄′ = ∑ᵢ₌₁ⁿ αᵢhᵢ
Here h̄′ is the refined sentence vector, identified by the prime. hᵢ is the contextual vector at position i, αᵢ is the corresponding scalar attention weight, and n is the sentence length. The product scales the entire position vector by its weight. The summation adds those scaled vectors coordinate by coordinate over the sentence. The result is a weighted average of the contextual vectors and has their dimensionality.
The preliminary vector influences the result through the scores and weights. The vectors being averaged at the end are the outputs of the context layer. This means the attention step can shift emphasis across positions while retaining the encoder’s contextual features. All coordinates at a position receive the same scalar weight, so the decision about emphasis is made at the position level. The computation can distribute its emphasis across the sentence. It produces a vector even when several positions receive appreciable weight.
For the character-enabled dimensions reported in the paper, the concatenation in the scoring function has size 1400. The authors use a square W of size 1400×1400 and a v of size 1400. Both are initialized using uniform samples from (−0.005, 0.005) and then trained. The paper describes refinement in terms of rereading and gives the calculation from h̄ to h̄′. This is the calculation used to account for the refined vector passed on to the pairwise stage.
Matching premise and hypothesis
Once there is a refined vector for each side, the architecture can compare them explicitly. The authors retain the two sentence vectors in an ordered concatenation and add two matching vectors. One highlights how corresponding coordinate values interact through multiplication. The other measures how far apart corresponding coordinate values are. These features make aspects of the relationship available directly to the classifier while preserving the source vectors from which they came.
hₘᵤₗ = h̄′ₚ ⊙ h̄′ₕ
Here hₘᵤₗ is the product feature vector, h̄′ₚ is the refined premise vector, and h̄′ₕ is the refined hypothesis vector. The subscripts p and h identify the roles, and the primes indicate that these are the outputs after attention. The symbol ⊙ denotes coordinate-wise multiplication. Each entry in hₘᵤₗ comes from multiplying the entries at the corresponding coordinate in the two sentence vectors.
h𝒹ᵢ𝒻 = |h̄′ₚ − h̄′ₕ|
Here h𝒹ᵢ𝒻 is the absolute-difference feature vector. h̄′ₚ and h̄′ₕ again denote the refined premise and hypothesis vectors. The minus sign subtracts corresponding coordinates, and the vertical bars take the absolute value of each resulting entry. The output preserves the size of each coordinate difference while discarding its sign.
r = [h̄′ₚ; h̄′ₕ; hₘᵤₗ; h𝒹ᵢ𝒻]
Here r is the combined feature vector. The brackets and semicolons concatenate the refined premise h̄′ₚ, the refined hypothesis h̄′ₕ, the coordinate products hₘᵤₗ, and the absolute differences h𝒹ᵢ𝒻, in that order. All of these components have the size of a refined sentence vector. Their concatenation is the fixed-size input for the final classifier.
The matching features are symmetric under an exchange of the sentences. Swapping the inputs preserves the products and the magnitudes of the differences. It changes the ordering of the original vectors inside r. The classifier can consequently use both where the vectors agree or differ and which sentence played each role. That distinction is useful for an inference task whose labels depend on the direction from premise to hypothesis. The explicit comparison features operate on whole-sentence coordinates, so their availability is compatible with separate encoding.
The final stage is described as a 3-layer multilayer perceptron, with 2000 hidden units in each layer and ReLU activations. A multilayer perceptron transforms a fixed-size vector through successive learned layers. ReLU passes positive activations through and sets negative ones to zero. The classifier produces a logit, or unnormalized score, for each relation label. A second softmax converts these scores into a probability distribution. This softmax acts across labels for the sentence pair. The earlier softmax acts across positions in a single sentence. The predicted label is the one with the highest class probability.
Preparing inputs and training the system
The authors join MultiNLI with a random sample of 15% of the SNLI corpus for their experiments. Their reason is comparability with the baselines reported through Kaggle. MultiNLI provides the matched and mismatched evaluation framework, while the sampled portion of SNLI supplies additional material for the reported setup. The paper identifies SNLI with earlier work on building a large annotated resource for inference. A large annotated corpus for learning natural language inference
Before encoding, words are made lower-case and numbers are mapped to a dedicated numeric token. This makes forms that differ only in capitalization use the same vocabulary entry and lets number strings share an entry. The authors report that these changes improved performance and made the embedding matrix smaller. The paper gives that observation for the preprocessing changes without presenting separate evaluation scores for each transformation.
During training, the authors discard pairs whose premise exceeds 200 words. They give memory stability as the reason. The rule is stated for the premise and for the training stage. A separate rule excludes pairs marked with - from both training and validation because that marker denotes the absence of a valid relation label. These rules have different purposes. The length rule controls the demands of the training examples, and the label rule removes examples for which the classification target is missing.
Optimization uses RMSprop at a learning rate of 0.001. The optimizer updates the trainable parameters using the training signal and the learning rate governs the scale of the updates. The authors apply dropout of 0.25 between the layers of the final multilayer perceptron. Dropout during training temporarily suppresses activations, and the reported placement confines that operation to the classifier’s internal layers. The attention parameters and, when enabled, the character embedding matrix are learned within the inference system. The pretrained word embeddings remain fixed.
The trained pipeline produces class probabilities for each pair. Those probabilities can serve directly for a single-system prediction or be combined across runs. The authors use both approaches at test time, with selection for the single submission based on matched development accuracy. They make their replication code available in the repeval_rivercorners repository and report making the sentence representations produced by their best system available through Zenodo.
Experiments and results
How to read the experimental comparisons
The paper reports several kinds of accuracy, each answering a different question. The pooling experiments use matched validation accuracy averaged over repeated runs. The paper also records the best matched validation run for each configuration. A development comparison gives accuracy by genre, with an overall MultiNLI result for comparison with CBOW and ESIM. The Kaggle figures concern the held-out matched and mismatched test tracks. The splits matter because a result used to choose a configuration has a different role from a result used to assess it after selection.
Accuracy is the percentage of evaluated sentence pairs assigned the correct relation label. It gives a common measure for the official tracks, the character and pooling experiments, and the development comparison. The reported numbers summarize performance across the pairs in the stated split or genre. A genre’s accuracy concerns its own subset. The overall value in the development table is a reported result in its own right. It can be read as the paper gives it without reconstructing an aggregate from the printed genre values.
The common dataset preparation uses MultiNLI and the sampled 15% of SNLI. Matched and mismatched development comparisons then let the authors see how their chosen system behaves across familiar and different genres. The paired test tracks let them report the official challenge outcome under the corresponding source conditions. None of these meanings is interchangeable with mean over runs. A run average describes repeatability for a configuration on a split, while a split-level accuracy describes the predictions of a particular trained system or ensemble.
The development baseline comparison
The genre comparison places the authors’ system, labeled InnerAtt, alongside the CBOW and ESIM baselines that they take from the MultiNLI paper. CBOW supplies the lower-scoring point of reference in this table. ESIM supplies the close architectural comparison because its attention uses information from the premise and hypothesis together. The authors also report improving on the shared task’s LSTM baseline. They give that test comparison in words and provide the numerical genre comparison for CBOW and ESIM on development data.
System comparison on overall MultiNLI development accuracy
InnerAtt finishes close to ESIM, with both above CBOW.
The numbers
| System or setting | accuracy % |
|---|---|
| CBOW | 64.7 |
| ESIM | 72.2 |
| InnerAtt (this paper) | 72.3 |
The overall result establishes the scale of the paper’s performance claim. The authors obtain roughly the same overall development accuracy as the jointly attentive comparison system, with a much clearer separation from CBOW. The result is especially relevant because the Rivercorners encoder has already completed the representation of each sentence by the time matching starts. The architecture’s separate encoding therefore leaves enough information for competitive classification in this comparison. The classification pipeline still includes learned contextual encoding, inner attention, and explicit matching, all of which contribute to the result as evaluated.
The overall ordering also conceals changes across genres. The paper places Fiction, Government, Slate, Telephone, and Travel on the matched side of the development comparison. On Government, InnerAtt reports 75.2% validation accuracy against ESIM’s 74.8%. On Telephone the respective scores are 73.0% and 72.2%. ESIM leads on Slate, where it records 67.9% compared with InnerAtt’s 67.2%, and on Travel, with 73.7% compared with 72.8%. Fiction places the two systems close together at 73.2% for InnerAtt and 73.0% for ESIM. These examples show that neither system’s relative position in the overall result applies uniformly to the matched genres.
The mismatched side comprises 9/11, Face-to-face, Letters, Oup, and Verbatim. On Face-to-face, InnerAtt obtains 74.5% development accuracy and ESIM obtains 71.2%. InnerAtt also leads in Letters, with 75.4% against 74.7%. The comparison goes the other way on 9/11, where ESIM obtains 71.9% against 70.5%, and on Verbatim, where it obtains 71.9% against 69.5%. On Oup, InnerAtt obtains 71.5% and ESIM obtains 71.7%. The genre spread gives a clearer picture than the overall score alone of how the competition between the architectures changes with the source.
Those comparisons describe which system scored higher for a genre in the reported evaluation. Explaining the differences would require another kind of evidence, such as an account of the examples each classifier got right or wrong. Genre names identify where the observations were made. They leave open whether the scores reflect differences in sentence structure, available vocabulary, the inference examples themselves, or other aspects of the inputs. The paper uses the overall closeness to argue for the usefulness of attention confined to each sentence. The genre scores qualify the scope of that claim.
Selecting a single system and combining runs
The single system was chosen by its matched development accuracy of 72.257%. The selected run used the architecture without character embeddings. In the rounded breakdown of best matched validation scores, mean pooling without characters gives the highest entry, reported as 72.3%. The paper’s overall development comparison also reports 72.3% for InnerAtt. The score used in the selection account, the rounded validation entries, and the test results appear at the precision the authors report for each.
On the matched test track, the selected system achieves 72.057% accuracy. On the mismatched test track, it achieves 72.055%. These are the official test results for the single system. They place its aggregate accuracy at a similar level under the two source conditions. The evaluation supports that comparison at the track level. The development breakdown gives additional context for why similar aggregate results can coexist with variations across individual genres.
The ensemble is built from 4 training runs initialized with different random seeds. A random seed affects the run’s initialization, so the trained systems can arrive at different class probabilities for the same pair despite following the same general recipe. For each pair, the ensemble averages their probability distributions and predicts the class with the highest resulting probability. The procedure combines final decisions at the probability level. Each run has already gone through its own encoding, attention, matching, and classification stages before the average is made.
On the matched Kaggle test track, the ensemble reaches 72.247% accuracy. The corresponding score of the selected single system is 72.057%. The mismatched test comparison also favors the ensemble, with a more pronounced separation between the reported values. The gains establish the result of combining these runs on the two tracks. The paper does not break down the predictions by run or by test example.
Single system and ensemble on mismatched MultiNLI test accuracy
Averaging the runs' class probabilities improves on the selected single system.
The numbers
| System or setting | accuracy % |
|---|---|
| Selected single InnerAtt system | 72.055 |
| InnerAtt ensemble (this paper) | 72.827 |
The ensemble has a different experimental purpose from the pooling and character comparisons. It asks whether several fitted systems, each with the same broad design, can produce a better prediction collectively. A pooling comparison asks which rough summary works better as an input within a single design. A character comparison asks whether a different source of token information helps. Keeping the questions distinct makes it possible to attribute the ensemble result to the reported way of combining runs while leaving open what causes any individual prediction to change.
The tests answer the paper’s main practical question. Independent sentence encoding with a subsequent matching stage performs competitively in the shared task, and probability averaging improves the submitted result. The development comparisons add evidence about how scores vary by genre and by architecture. The repeated experiments examined next address a narrower question about which components of the Rivercorners design matter within the conditions tested.
What the ablations show
Changing the rough summary used by attention
The pooling comparison varies the computation that creates the preliminary sentence vector. The contextual sequence is still available to attention, and the architecture still uses the refined vectors and matching features for classification. The experiment therefore tests sensitivity to the initial summary supplied to the scorer. It compares different ways of arriving at a query for attention: a length-normalized average, an unnormalized sum, the two recurrent endpoints, and the strongest value in each coordinate.
For each pooling and character setting, the paper calculates mean matched validation accuracy over 10 runs and supplies intervals at 95% confidence. The means put mean pooling at the top of the reported grid. The other methods also produce scores in a similar range, with the endpoint method among the stronger alternatives. The intervals matter because a difference in displayed means can be small compared with variation among runs. The authors conclude that their estimates at 95% confidence do not establish a statistical difference among the pooling methods.
Pooling and character settings on mean matched MultiNLI validation accuracy
Mean pooling gives the highest reported averages with either character setting.
The numbers
| System or setting | accuracy % |
|---|---|
| Mean without characters (this paper) | 71.3 |
| Sum without characters | 70.7 |
| Last states without characters | 70.9 |
| Max without characters | 70.6 |
| Mean with characters | 71.3 |
| Sum with characters | 70.9 |
| Last states with characters | 71.0 |
| Max with characters | 71.0 |
The uncertainty figures add context that the means alone cannot convey. With mean pooling and no character component, the paper reports 71.3 ± 1.2 for mean matched validation accuracy in percent. With the character component, the same pooling choice yields 71.3 ± 0.7. Without characters, the final-state setting gives 70.9 ± 0.6. With characters, it gives 71.0 ± 1.2. The interval surrounding a mean depends on the configuration and its observed variation. The results do not support treating the ordering of the displayed means as an established hierarchy of pooling methods.
The authors offer one interpretation of the broadly similar outcomes. Each pooling strategy may produce a sufficiently informative starting point, leaving most of the work of refinement to attention. The architecture makes this plausible because every variant passes the original contextual vectors to attention along with its raw summary. A rough summary could vary while the scorer still recovers useful emphasis over positions. This remains an interpretation. The experiment retains both the scorer and the downstream matching features across the comparison.
An equally important detail is the information the alternatives already share. Their starting vectors are all derived from a bidirectional sequence encoder. A mean pooled vector and a maximum pooled vector encode the sequence differently, but both draw on representations that already incorporate the surrounding words. The final-state vectors also reflect recurrent passes through the same sentence. The comparisons therefore concern several summaries of a rich common input. They say little about what would happen with less contextualized inputs or with a different classifier.
The paper also shows the best matched validation score from each configuration. Without characters, mean pooling reaches 72.3%, sum pooling 71.6%, the final states 71.4%, and maximum pooling 71.1%. With characters, the best scores are 71.8% for mean pooling, 71.6% for sum, 72.1% for the final states, and 71.6% for maximum. These values answer the question of how well a run in each configuration performed at its best. The mean-and-interval comparison is the place to look for how the configurations performed across runs. The character-enabled final-state result illustrates the difference, with a strong best run alongside a lower mean than the character-enabled mean pooling setting.
Adding the character pathway
The character comparison asks whether the word lookup and sentence context encoder benefit from an additional spelling-based representation. The answer in the reported experiments depends little on whether that branch is present. The averages for mean pooling agree at the precision printed in the paper. The other pooling settings show some movement in the averages when characters are added, and the best-run scores move in different directions. The selected run for test evaluation uses the simpler input configuration without the character component.
This conclusion is specific to the character procedure the authors test. Their character vectors are initialized for the experiment and learned with the rest of the system, and the character LSTM contributes a fixed-size representation of each word. Turning off the branch changes the dimensions of the representations used downstream. The comparison measures the practical effect of enabling the component in this implementation. It does not identify which character patterns were learned or where those patterns might have influenced the output.
The authors found the result surprising in view of their experience with a more complex architecture associated with Wang and colleagues. They report that character embeddings had a considerable effect in that setting. Its premise and hypothesis could share information during processing, which was outside the competition’s constraints for submissions of this kind. The paper includes the observation as context and leaves that comparison without scores. The quantitative conclusion rests on the Rivercorners runs reported with and without characters. Bilateral Multi-Perspective Matching for Natural Language Sentences
The distinction between averages and selected runs matters for this component too. The strongest individual run can contribute a sensible submission choice when matched validation is the selection criterion. A repeated-run average is more informative about whether the extra information helps across initializations. Both views point to limited evidence for a consistent character advantage in this architecture. They leave open the possibility of a different outcome with a different character design, a possibility the authors identify in their future work.
What remains unresolved about attention
The direct attention ablation the authors propose would compare the pooling methods with attention removed. The pooled vectors could then go to the comparison stage without the intervening learned weighting. This would help answer whether the initial summary is already sufficient for the classifier and how much the refinement contributes in each pooling setting. The paper raises this question because the matching features provide another plausible source of predictive strength. The reported runs vary the raw summary while leaving the rest of that explanatory question open.
The authors also tried alternatives inspired by Lin’s self-attentive architecture and Xiong’s coattention work. They describe the preliminary results as unpromising and say they did not pursue extensive tuning. The paper provides neither scores nor a comparably tuned set of runs for these attempts. Their role is to explain why the reported experiments focus on the selected formulation. They cannot establish how the alternative mechanisms would compare under matched training effort. A Structured Self-attentive Sentence Embedding and Dynamic Coattention Networks For Question Answering
The preprocessing observation has a similarly limited role. The paper identifies lowercasing and using a numeric token as changes that made the input vocabulary smaller and performance better. The reported experiments give the pool of runs after adopting those choices. There are no separate scores for lowercasing, numeric normalization, or their combination in the paper. Their contribution is described qualitatively. By comparison, pooling and character inputs receive explicit repeated-run evaluation, making those components the ones about which the paper can offer the most specific evidence.
Limitations
Limits the authors identify
The central unresolved question is the one the authors themselves raise about the source of predictive power. They present an architecture with several learned stages and a structured comparison of sentence vectors. The pooling results show that this architecture is fairly insensitive to how its attention query is formed under the settings tested. They do not give a result for the pipeline with pooled vectors sent directly to matching. The authors identify that missing comparison as a way to distinguish the contribution of attention from the strength of the sentence comparison that follows it.
The discussion also treats the chosen attention score as a design decision worth revisiting. The implementation uses the concatenation-based score, in which the pooled and position vectors enter a shared learned transform. The authors would like to test other scoring rules described in earlier attention work. Those rules can change how the two vectors interact before the softmax. The paper’s preliminary tests of other attention architectures provide little basis for ranking these scoring choices, since they were conducted as exploratory runs and lack comparable reported results. Effective Approaches to Attention-based Neural Machine Translation
The authors also outline ways to change the inputs and the encoder. They propose part-of-speech embeddings at the same stage as the character embeddings. Part-of-speech tagging supplies categories for word usages that the proposed inputs could encode. They also identify pretrained character representations as an alternative to the learned, randomly initialized character component they tried. The dimensionality of the character embeddings, the size of the character encoder output, and the design of the final classifier remain possible tuning choices. The reported character comparison concerns the dimensions and training procedure actually used.
Finally, the authors suggest incorporating information from dependency trees through recursive networks. The current sentence encoding uses recurrent passes in sequential order. A dependency tree would provide a structured account of how words relate inside a sentence, making different connections available during encoding. The suggestion builds on prior work using tree-structured recurrence. It is a proposed source of richer initial representations, and no result in this paper measures its effect. Improved Semantic Representations From Tree-Structured Long Short-Term Memory Networks
Limits apparent from the evaluation
The architecture’s competitiveness with ESIM is a comparison of complete systems. They differ in whether a sentence’s attention can consult the other input, and the comparison leaves their other design differences in place. The close overall development scores establish that the Rivercorners pipeline can perform well with separate encoding under the shared task conditions. The experiment cannot estimate what would happen if access to the other sentence were the only component changed. That distinction is especially important when a reader wants to choose between inner and cross-sentence attention on the basis of this experiment.
The mismatched track supplies evidence about transfer within the evaluation as defined by MultiNLI. Its examples come from different sources, with inference remaining the task and accuracy remaining the outcome. The result gives a meaningful cross-genre test of the trained pipeline. Usefulness for another downstream task, another collection of sources, or a population of unusually long inputs is unmeasured. The authors also filter training premises longer than 200 words for memory stability, which matters when relating the training experience to settings with long sentences.
The splits support different strengths of inference about configuration choices. The pooling and character comparisons use matched validation scores. They establish the degree of sensitivity observed there and motivate the selection of the submission. The test results give matched and mismatched performance for the selected system and the ensemble. There is no corresponding set of test results for every combination in the validation grid. The effect of switching pooling strategies or enabling characters on the mismatched test track thus remains open even though the chosen configuration generalizes competitively to that track.
The repeated-run intervals quantify uncertainty for the matched validation comparisons. The genre table and official test results provide point values. Close scores in those comparisons should be read as the reported outcomes of those evaluations. Their precision does not establish that a particular small separation would persist under another initialization, another selection of training pairs, or another evaluation sample. The paper’s repeated pooling trials are its clearest direct treatment of run-to-run variation.
Genre accuracies also leave open the makeup of the errors. A higher aggregate score can arise from different patterns of success on entailment, contradiction, and neutral pairs. The paper gives no label-specific breakdown or analysis of particular constructions that the attention step helps. The attention weights define how the refined vector is formed, but the reported results do not trace an inference decision back to particular positions or show that the highest-weighted positions correspond to the evidence a reader would use. The mechanism remains explicit at the level of the computation, while its linguistic behavior has limited direct examination.
The ensemble result likewise concerns predictive accuracy. Averaging the class distributions changes the final decision whenever the combined evidence favors a different label from the one selected by the single system. The paper shows the benefit of that procedure on the benchmark. It does not evaluate a new shared sentence representation produced by the ensemble, since each constituent supplies its own class probabilities after completing the pairwise computation. The result belongs to the performance of the classifier at the output of the pipeline.
What came after
The shared-task account places the Rivercorners paper in the broader RepEval evaluation of sentence representations. Balazs and colleagues describe what their own entry computes and how it performs. The shared-task work addresses the setting that made these results comparable across entries, using inference over multiple genres to evaluate sentence representations. Its connection to Rivercorners is through the submission and the evaluation it took part in. The documented relationship is one of shared-task reporting. The title and citation establish that relationship without specifying a new use of the team’s pooling or attention equations. The RepEval 2017 Shared Task
The stress-test paper also cites the Rivercorners work. Its stated subject is evaluation of natural language inference through stress tests. This gives a distinct evaluation context for the earlier claim of competitive benchmark accuracy. Rivercorners asks how well an independently encoded sentence pair supports inference under matched and mismatched source conditions. Stress testing poses the broader question of how inference performance holds up when an evaluation is designed to apply particular pressures. The citation connects those lines of work. It leaves the details of any reuse of the Rivercorners architecture or learned representations unspecified. Stress Test Evaluation for Natural Language Inference
Together, these citations place the paper in work on how to evaluate sentence representations and inference systems. The shared-task account supplies the common setting in which the submission’s performance is understood. The stress-test work points to a different scope of evaluation from the genre comparisons reported by Rivercorners. The result carried forward as a point of comparison is specific: a sentence encoder can summarize and reweight each input independently, then use explicit vector matching to obtain competitive accuracy on the shared task. The controlled contribution of the reweighting step remains a separate empirical question.
Cite
Cite as Jorge Balazs, Edison Marrese-Taylor, Pablo Loyola and Yutaka Matsuo. 2017. Refining Raw Sentence Representations for Textual Entailment Recognition via Attention. Proceedings of the 2nd Workshop on Evaluating Vector Space Representations for NLP.
@inproceedings{balazs2017refining,
title = {{Refining Raw Sentence Representations for Textual Entailment Recognition via Attention}},
author = {Jorge Balazs, Edison Marrese-Taylor, Pablo Loyola and Yutaka Matsuo},
booktitle = {Proceedings of the 2nd Workshop on Evaluating Vector Space Representations for NLP},
year = {2017},
doi = {10.18653/v1/w17-5310},
url = {https://doi.org/10.18653/v1/w17-5310}
}This page in Markdown https://md.research.elamur.ai/free/en/papers/balazs-2017-refining-raw-sentence-representations-textual/