Elamur Research

Syntax-Aware Multi-Sense Word Embeddings for Deep Compositional Models of Meaning

Paper · 2015 · Jianpeng Cheng and Dimitri Kartsaklis

Summary

A word can belong in a sentence without fitting every position in it, and the same written word can contribute quite different meanings to different sentences. Both problems matter when a system builds a representation of a sentence from representations of its words. The authors investigate how to make the inputs to that process sensitive to word order and how to select a meaning for each occurrence of an ambiguous word. They train the word representations and the procedure that combines them together. The learned numerical representations are called word embeddings.

The first stage uses ordinary sentences as examples of plausible language. The authors make less plausible versions by replacing a word or shuffling words in its context, then train the network to assign the original a higher score. Replacement tests whether a word fits its surroundings. Shuffling keeps the vocabulary of a passage available while changing its arrangement. For ambiguous words, the method keeps several vectors and uses the surrounding words to decide which one to pass into composition. A later stage can refine the sense selection and the sentence representations together for a particular task. This makes the choice of a word vector part of the computation that produces a sentence vector, an application of word sense disambiguation.

The authors pretrain on the British National Corpus and evaluate the resulting representations at two levels. In the Stanford Contextual Word Similarity evaluation, the embeddings score 58.5 for a comparison using one selected sense per word and 62.5 for a comparison using a weighted combination of senses. Both figures are Spearman’s rank correlation with human judgments, reported on the paper’s multiplied scale. The corresponding scores for the multi-sense skip-gram baseline are 56.7 and 62.1. Examples of nearest neighbors also show that the learned vectors can group words that share a grammatical form as well as a related meaning.

For paraphrase detection, the authors adapt the representations using the Paraphrase Database and evaluate on the Microsoft Research Paraphrase Corpus. The recursive network reaches 76.0 on the reported accuracy scale with soft sense selection. It reaches 77.6 when the sentence representation also receives a direct average of the word vectors, and 78.6 accuracy with 85.3 F1 when the decision incorporates a classifier with surface features. The strongest published comparison in the paper reports 80.4 accuracy and 85.9 F1. The controlled comparisons show that the value of contextual sense selection depends on how the selected vectors reach the final comparison. Its effect is more visible when their information has a direct path into the sentence representation.

Deep dive: Syntax-Aware Multi-Sense Word Embeddings for Deep Compositional Models of Meaning

How word order and context-specific word meanings shape sentence representations, tested on word similarity and paraphrase detection. · about 33 minutes to read

The problem and its context

From a representation of a word to a representation of a sentence

A distributional representation gives a word a numerical description derived from the company it keeps in a corpus. The underlying idea is that words used in similar surroundings tend to have related meanings. A vector is a list of numbers, and the relative positions of many such vectors form a space in which words can be compared. The numbers are useful collectively, through the relationships they encode across the vocabulary. This approach to meaning is known as distributional semantics.

The paper describes a change in how researchers built these spaces. In a count-based approach, each coordinate can record how frequently a word occurs with a particular context word, possibly after a weighting transformation. In a prediction-based approach, the coordinates are adjustable parameters. Learning gives them values that help a network solve a prediction problem drawn from text. The authors give skip-gram as an example. It learns representations by predicting surrounding words given a target word. An early example of learning word representations through prediction is Bengio and colleagues’ neural probabilistic approach. The paper draws its skip-gram example from Distributed Representations of Words and Phrases.

The choice between counting and prediction matters to the authors because the quality of the word space affects everything built from it. They cite evidence that predictive representations capture semantic relationships more effectively than their count-based counterparts in the comparisons discussed in the paper. They also cite work finding predictive vectors effective as inputs to composition. The first of these claims rests partly on Don’t count, predict!.

Neither way of obtaining word vectors makes it practical to store a reliable vector for every sentence. A word can recur in many contexts. A complete sentence may provide very few observations of that exact sequence, so treating it as another vocabulary item makes the evidence sparse. Composition addresses this by learning or specifying a procedure that can build a vector for a new combination from parts with better-established representations. A sentence vector is then an output of the procedure, and its properties depend on both the inputs and how the procedure combines them.

The paper describes several ways to combine vectors. Elementwise addition accumulates contributions from the component words, and elementwise multiplication combines corresponding coordinates. Algebraic approaches discussed by the authors give some words a different kind of representation. A verb or adjective can act as a map on its arguments, so its contribution depends on what it combines with. Deep approaches learn a succession of transformations. They can repeatedly make a vector for a larger unit from vectors for its parts, carrying the result onward until they have a representation for a phrase or sentence.

The arrangement of those transformations can itself encode a view of how a sentence is put together. A recursive network follows a parse tree, so the parser’s analysis determines which pieces meet first. A recurrent network moves through a sequence, successively incorporating words into a running representation. A convolutional approach, also discussed in the paper, applies operations to overlapping portions of the input. The paper focuses on the first two options and treats the third as a possible extension. The background examples include Socher and colleagues’ recursive matrix-vector approach and Kalchbrenner and colleagues’ convolutional work.

What a vector needs to carry into composition

A word space designed for measuring relatedness can bring together words that belong to the same subject area but have different uses in a sentence. This is often desirable when the aim is to retrieve related vocabulary. Composition brings an additional requirement. The vector for a word needs to contribute information about how it can interact with the words around it. The paper therefore asks how to make a representation sensitive to both meaning and the distribution of grammatical forms, a meeting point between lexical semantics and syntax.

Earlier approaches supplied grammatical distinctions in several ways. One can keep separate vectors for the noun and verb uses of book by attaching a part-of-speech tag to the form. One can define a context using grammatical relations so that a word is characterized by the words to which it is linked in a sentence. From the perspective of a context-counting procedure, a word connected through a particular relation can then provide a different observation from the same nearby word in another relation. The paper discusses this distinction between proximity and grammatical connection in connection with Dependency-Based Construction of Semantic Space Models.

The authors also describe ways of giving predictive systems syntactic information. One extension of skip-gram uses dependency contexts. Another approach weights a context word according to its distance from the target. Among approaches that learn composition, some condition the training criterion on dependency relations, while others use grammatical types. These are different decisions about where to put the information. It can define which words count as context, change their influence, or enter the criterion used to train the network. The method in this paper supplies a further option. It derives an order-sensitive training signal by changing the arrangement of the observed words.

Lexical ambiguity presents a separate problem. A single vector for bank has to absorb evidence from occurrences in which the word refers to different things. As the authors observe, this is especially problematic when the meanings have little to do with each other. The combined vector can reflect how the word behaves across the corpus while giving a poor account of what it contributes to any particular sentence. A composition procedure receiving that vector has to recover the relevant distinction from the other inputs and its own learned transformations.

One response is to resolve ambiguity before composition. A preliminary procedure selects a representation using the current context, and a second procedure combines the selected representations. In the work surveyed by the authors, such prior disambiguation had shown benefits for shallow algebraic and tensor-based composition. An earlier recursive experiment by Cheng and colleagues found smaller benefits on phrase and sentence similarity. The contrast prompted a question about how a sense decision should interact with a deep network. A vector chosen by a preliminary rule can look appropriate in isolation even when another choice would serve the eventual sentence representation better.

Research on multiple prototypes supplied a way to represent several uses of the same form. The paper draws especially on work that clusters contexts and uses those clusters to select one of several word vectors. It extends this idea by putting the selected vectors into a composition procedure during training. That changes the source of the learning signal for a sense vector. Its usefulness is measured through the larger representation to which it contributes. The earlier approach the authors build on is Neelakantan and colleagues’ multi-sense embedding work.

The remaining problem is where to get enough training evidence. The authors characterize earlier deep compositional systems as learning their word vectors and composition weights against objectives set by particular applications. A collection assembled for one application can expose a network to fewer uses of a word than a general corpus does. The paper’s proposal is to learn embeddings and composition together on general text, then retain both when adapting to a task. This gives the application a starting point for building sentence vectors as well as a vocabulary of initial word vectors.

The method, step by step

Build a larger vector from its parts

The procedure starts with a vector at each word position. For an unambiguous representation, the same vocabulary entry supplies a word’s vector wherever it appears. For the multi-sense version, the input depends on a contextual choice. In either case, the composition network has to transform these word-level inputs into a representation of a larger unit.

The paper uses a pairwise operation to describe the basic recursive computation. Place the coordinates of one input after those of the other, apply a learned linear transformation, add a bias, and pass the result through a nonlinear function. A pair of word vectors can become a phrase vector, and a phrase vector can subsequently be combined with a word or another phrase. Concatenation preserves which child supplied which coordinates. The learned transformation can therefore respond differently to information in the two input positions.

p = g(Wx[1:2] + b)

Here p is the vector for the combined unit. The inputs x₁ and x₂ are the vectors being combined, and x[1:2] denotes their concatenation in that order. W is a learned weight matrix that acts on the concatenated input, and b is a learned bias vector added to the transformed input. The function g applies the nonlinearity to give the parent representation.

For the recursive neural network, abbreviated RecNN, an external parser determines the tree used in the experiments. A branch can produce an intermediate vector before that information meets a word elsewhere in the sentence. A higher branch composes the results of earlier branches. The sentence representation sits at the root, where the final combination takes place. The tree and the composition weights have different jobs. The tree specifies which vectors are combined, while the weights determine how their coordinates contribute to the new vector.

In the recurrent neural network, abbreviated RNN, the order of computation follows the order of the words from left to right. Each step incorporates the next word into the representation carried forward from the preceding step. The experimental recurrent system uses long short-term memory, or LSTM, to address the problem of gradients becoming very small or very large over long sequences. The pairwise equation gives the paper’s general illustration of composition. It does not spell out the internal gates of that recurrent implementation.

From corpus sentences to paraphrase decisions

The steps in order.

From corpus sentences to paraphrase decisionsStep 1: Sample original sentences and create corrupted variants1. Sample original sentences and create corrupted variantsStep 2: Summarize context with the other words’ main vectors2. Summarize context with the other words’ main vectorsStep 3: Choose sense vectors using their context centroids3. Choose sense vectors using their context centroidsStep 4: Compose vectors and score linguistic plausibility4. Compose vectors and score linguistic plausibilityStep 5: Update embeddings and composition weights together5. Update embeddings and composition weights togetherStep 6: Adapt the sense selector on paraphrase pairs6. Adapt the sense selector on paraphrase pairsStep 7: Compare sentence vectors from shared encoders7. Compare sentence vectors from shared encoders

Learn from an original sentence and its corruptions

Generic training needs a signal that can be obtained without asking someone to label each example for a particular application. The authors take sentences from a corpus as positive examples. They create negative examples by deliberately changing those sentences. A scoring layer judges the plausibility of the composed representation. Training rewards a score that places the observed example above its corruptions by a chosen margin.

One corruption replaces a target word in its context with a randomly selected word. This can create an example whose words no longer fit together in meaning. The goal is to make the embeddings and the composition weights sensitive to compatibility between a word and its surroundings. Comparing each negative example with the original it came from gives a learning signal about how plausible the word is in that specific context.

∑ₛ∈S ∑ₛ′∈S′ max(0, m − f(s) + f(s′))

The outer sum ranges over original sentences s in the corpus set S. In the inner sum, S′ denotes the set of replacement negatives for the current original, and s′ is one such negative. In this loss, f denotes the scalar plausibility score obtained from the composed representation. The margin m is the desired separation between the original and the negative. The maximum with 0 keeps the loss at zero once the original scores at least the margin above the replacement, and otherwise returns the amount of the shortfall.

A replacement can also change grammatical acceptability, so it is best understood as a general contextual compatibility signal. To supply a more direct signal about arrangement, the authors generate a separate set of negatives by randomly shuffling words in the context. When the same vocabulary appears in both versions, recognizing the individual words is insufficient to rank the original above the shuffle. An order-sensitive composition procedure can produce different representations for the two versions, giving the scorer information it can use to distinguish them.

∑ₛ∈S ∑ₛ″∈S″ max(0, m − f(s) + f(s″))

The symbols S and s again refer to the originals and the original currently being considered. S″ is the set of shuffled negatives associated with that original, and s″ denotes a member of the set. The function f scores an example, m is the target gap, and the maximum with 0 applies the same margin rule as in the replacement loss. The sums collect the penalties across the relevant comparisons.

These hinge losses specify a relative preference. Once a pair satisfies the margin, that pair contributes no further penalty. Thus the scorer need not assign an absolute probability that a sentence belongs to the language. Its training job is to distinguish an observed arrangement from alternatives generated from it. The order information comes from those contrasts. The method does not assign a grammatical label or a position label as the output of the scorer.

The scorer is shown above the composition network in the architectural description. In the reported pretraining implementation, it is applied at individual nodes, so a training signal can reach intermediate representations as well as the final sentence vector. The plausibility network has 2 layers and 150 hidden units. Back-propagation carries a score error through the scoring and composition layers into the embeddings. Training therefore changes the vectors the network sees and the operations it applies to them.

Select a sense using the other words

The multi-sense procedure gives each word a main vector and several pairs of additional vectors. In each pair, one vector is a context centroid, which summarizes contexts assigned to the corresponding sense. The other is a sense vector, which is the representation used during composition. A centroid organizes evidence about the company a word keeps. The sense vector has to work as an input when the network combines that word with its neighbors or with a larger unit.

For an occurrence of a target word, the gate looks at the main vectors for the other words in its context. It averages those vectors into a context vector. Excluding the target keeps the comparison focused on evidence from its surroundings. Using the other words’ main vectors lets the gate obtain this evidence before it has chosen their individual senses. The procedure can therefore make a contextual choice at each position without first needing the completed sentence representation.

The gate compares the context vector with the target word’s centroids by cosine similarity. Cosine measures alignment of direction, so a vector pointing in the same direction represents a close match under this criterion even when its length differs. The centroid with the closest match wins. The corresponding sense vector is the input forwarded to composition. For a homonym such as organ, the design allows occurrences with different surrounding vocabulary to reach different inputs despite having the same written form. This is how the procedure is intended to work. The paper does not use organ as a reported cluster-quality test.

The winning centroid is updated by adding the current context vector to it. Contexts assigned to that centroid thus contribute to its direction in later comparisons. The selected sense vector is updated through back-propagation from the plausibility objectives. An occurrence can influence the centroid through the context it supplies and influence the sense vector through the effect it has on composition. These are distinct updates, even though both go to entries associated with the same sense.

The authors describe starting the sense vectors and centroids with random values. They suggest obtaining the main vectors from an existing collection or from an earlier run of the generic training procedure. The experiments fix the inventory at 3 senses per word and set the embedding dimension to 300. The inventory is available regardless of how many distinct uses a human analyst would assign to the word. Here a learned sense is a prototype selected by contextual evidence and trained through usage in the network.

Pretrain on general text

The generic training corpus is the British National Corpus, or BNC. The paper describes it as containing 6 million sentences drawn from written and spoken English. The authors pretrain versions with a single vector for a word as well as versions with multiple senses. The single-vector versions provide a comparison in which familiar word forms have the same starting representation across contexts. Both families learn composition under the plausibility objectives.

The implementation updates parameters in mini-batches, grouping training examples before an update. It uses AdaDelta, with λ = 0.03 and an initial α = 0.05 as reported by the authors. The output of pretraining includes embeddings and composition weights. Both can initialize a network for a new objective, so adaptation starts with a way to put words together that has already been trained on general text. The update method is ADADELTA.

The authors describe a direct alternative in which a task-specific network learns its vectors and sense selection from the task data. Their reason for separating pretraining from adaptation is that a task collection may be limited in size or linguistic variety. A network initialized from general text already has representations shaped by original and corrupted sentences. The task data can then refine those representations according to which distinctions help with the particular decision.

Adapt sense selection to the paraphrase decision

For task adaptation, a task objective takes the place of the generic plausibility objective. Sense selection in this stage uses a softmax layer. A softmax turns scores for competing senses into a set of weights that sum to a whole and can be treated as probabilities. The sense selector can consequently be trained as part of the task network. What makes a prototype useful is now tied to how the resulting sentence vector helps decide whether a pair conveys the same meaning.

The authors evaluate hard and soft selection. With hard selection, the sense with the highest probability supplies the vector for the word. With soft selection, the network makes a weighted average of the available sense vectors. A strongly favored sense can dominate that average. If the available context gives support to several senses, their vectors can all contribute. This changes the word input to the composition network. It is separate from the later pooling operation that combines inputs across word positions.

The paraphrase architecture is siamese. It has a branch for each sentence, and the branches use the same parameters. Each branch selects or builds word inputs and composes them into a sentence vector. Because they share weights, the branches learn one procedure for representing a sentence, regardless of which position the sentence occupies in a pair. The comparison operates on the two resulting vectors. The objective uses the human or task label for the pair to train the geometry of this comparison.

One option measures Euclidean distance, written with the L₂ norm. For a paraphrase pair, the training cost gets smaller as the distance between the sentence vectors shrinks. For a pair that is not a paraphrase, the cost is active only while the vectors remain closer than the selected margin. A change in vector magnitude can change the distance, even if the vectors point in similar directions.

E_f = { (1/2) ‖f(s₁) − f(s₂)‖₂²,                 if y = 1
      { (1/2) max(0, m − ‖f(s₁) − f(s₂)‖₂)²,     otherwise

E_f is the cost for a sentence pair. s₁ and s₂ are the two input sentences, and here f is the shared composition function whose outputs are sentence vectors. Subtraction gives their coordinatewise difference, ‖ · ‖₂ gives its Euclidean length, and the superscript ² squares the relevant distance or shortfall. The factor 1/2 scales the cost. The label y = 1 identifies a paraphrase. In the other case, m is the chosen margin and max with 0 keeps the loss at zero when the distance reaches or exceeds that margin.

The other option bases the comparison on direction. It first calculates the cosine between the two composed sentence vectors. In contrast to the cosine used in the generic gate, the objects compared here are whole sentences, and the result goes into the pairwise classification objective.

d = (f(s₁) · f(s₂)) / (‖f(s₁)‖₂ ‖f(s₂)‖₂)

d is the cosine similarity. The shared function f maps each of the sentences s₁ and s₂ to its vector. The centered dot · denotes the dot product, and each norm ‖ · ‖₂ is the Euclidean length of one vector. Dividing the dot product by the product of the lengths makes the comparison depend on their directions.

The system learns a scale and offset for that comparison, applies a sigmoid, and penalizes the squared discrepancy from the pair label. The sigmoid maps its input into a bounded score. The learned scale and offset let the training procedure calibrate how a given cosine contributes to the prediction.

E_f = (1/2) (y − σ(wd + b))²

E_f is the cost for the pair under this objective, where y is the label and d is the cosine similarity of the sentence vectors. The learned scalar w scales d, the learned scalar b shifts it, and σ denotes the sigmoid function. The superscript ² squares the prediction error, and the factor 1/2 scales the squared error. The bias here belongs to the comparison, whereas the bias in the composition equation belongs to the transformation of its inputs.

With the dynamic selector active, training can further refine the sense vectors used in the sentence branches. The authors also try giving the sentence comparison a direct view of the word-level inputs. They average the vectors across the positions in a sentence and add that average to its composed sentence vector. Pooling therefore changes the representation presented to the comparator. The tree or sequence still supplies the composed part, while the average carries information from individual positions without sending it through every intervening composition operation.

The final variant adds surface evidence through a separate logistic regression classifier. It uses embedding similarity together with sentence-length difference, unigram overlap, and features indicating whether numbers occur and whether the numbers in the pair agree. A unigram here is an individual word considered as an overlap feature. The authors combine this classifier, called C1, with the original decision system. They report making the embeddings and the Python/Theano implementation available.

Experiments and results

Which words become neighbors

The paper first looks at nearest neighbors. This makes it possible to inspect what kinds of words the vectors bring together before asking them to produce a numerical score on a benchmark. The authors compare their embeddings, which they call SAMS for Syntax-Aware Multi-Sense, with skip-gram and the representations from Collobert and Weston, abbreviated SG and CW. They show a selection of query words and neighbors for each approach.

For refused, skip-gram retrieves forms including refusing and refuses. The SAMS examples include declined, rejected, and denied. Each list captures something about the query. In the former, the relation comes partly from forms of the same word. In the latter, the examples are verbs with related meanings and a matching inflected form. For interrupted, the SAMS list includes punctuated, preceded, and disrupted. The authors use examples like these to argue that the space can preserve tense and other grammatical distinctions while still retrieving semantically related words.

The pattern extends to other forms in the examples. For predictions, SAMS retrieves expectations, projections, and forecasts. Each is a plural noun, and each is semantically related to the query. For prompting, examples include sparking, triggering, and forcing. The point of comparing the neighbor lists is to see which properties coexist in a local region of the space. Related meanings are useful there, and the matching word forms suggest that grammatical use can also help determine proximity.

The authors compare this qualitative behavior to examples reported for dependency-based skip-gram. They emphasize that their own embeddings are learned with a composition network and that generating order contrasts avoids having to count separate context observations for each grammatical relation. The nearest-neighbor examples provide evidence of the kind of grouping the method can produce. The quantitative question of whether the vectors agree with people’s contextual similarity judgments is tested separately.

How the word space agrees with human judgments

The Stanford Contextual Word Similarity dataset, abbreviated SCWS, contains 2,003 word pairs with contexts for the occurrences. A comparison can therefore ask how similar the words are as used on that occasion. This is an application of semantic similarity. The dataset comes from Huang and colleagues’ work on multiple word prototypes.

The paper evaluates different ways of using the representations. The globalSim setting compares the main vectors for the two words. The same vector represents a word across its occurrences under this rule. The localSim setting uses each word’s context to select one sense and compares the chosen sense vectors. In avgSim, each word is represented by an average weighted by context, so more than one sense can contribute to the vector being compared.

For each rule, the authors compare the system’s similarities with human judgments using Spearman’s rank correlation. This metric asks how well the ranking induced by the vector comparisons agrees with the ranking induced by the judgments. The paper reports the correlation as ρ × 100. Thus a score in this experiment measures rank agreement, and the similar-looking numbers in the paraphrase study measure classification performance.

The global comparison includes continuous bag of words, abbreviated CBOW, skip-gram, and CW, as well as the multi-sense skip-gram system, abbreviated MSSG. On SCWS globalSim, SAMS scores 59.9. CBOW scores 59.5 and CW scores 55.3. Skip-gram scores 61.8 and MSSG scores 61.3. The single-vector comparison places SAMS in the range of the other methods, with the highest reported global score belonging to skip-gram.

Context-selected word vectors on SCWS by localSim rank correlation

SAMS agrees more closely with human rankings when each word is represented by a single context-selected sense.

Context-selected word vectors on SCWS by localSim rank correlationMulti-sense skip-gram: 56.7Multi-sense skip-gram56.7SAMS (this paper): 58.5SAMS (this paper)58.5
The numbers
System or settingSpearman’s ρ × 100
Multi-sense skip-gram56.7
SAMS (this paper)58.5

Only MSSG and SAMS supply the multiple prototypes required for the contextual comparisons in the table. SAMS leads on localSim, as shown in the chart. On avgSim, MSSG scores 62.1 and SAMS scores 62.5. For both systems, the reported rank agreement is higher when the comparison uses context-weighted averages than when it commits to a single prototype. This makes the way prototypes are read out part of the evaluation. A space with multiple senses can yield different rankings depending on the decision rule used for a particular occurrence.

How the paraphrase experiment uses its data

The sentence-level evaluation uses the Microsoft Research Paraphrase Corpus, abbreviated MSRPC. The paper describes the corpus as containing 5,800 sentence pairs with labels supplied by human annotators. The prediction is binary. The system must decide whether a pair expresses equivalent meaning. This tests whether sentence vectors preserve enough information to support a pairwise decision. The corpus is associated with Dolan and Brockett’s work on constructing sentential paraphrase corpora.

The authors regard the benchmark as too small to train their deep architectures directly. They train and adapt the main systems with external paraphrase data, keeping the original MSRPC training set for selecting settings such as the margin and number of epochs. The final comparison also uses that training split to fit C1. This distinction matters when comparing the results. A score for the pooled sentence encoder and a score for its ensemble with C1 come from systems with different inputs to their decisions and different uses of the labeled benchmark training data.

The external collection is the Paraphrase Database, abbreviated PPDB. The paper reports more than 220 million pairs for the collection, including 73 million phrasal paraphrases and 140 million patterns representing syntactic transformations. These figures describe the resource. The authors use phrase- and sentence-level paraphrase material from it for task training and for the baselines. Relevant evidence for the training setup comes from The Paraphrase Database.

In the MSRPC experiments, accuracy measures the frequency of correct pair labels. F1 combines precision and recall for paraphrases. Precision concerns how many pairs predicted to be paraphrases actually bear that label. Recall concerns how many labeled paraphrases receive the positive prediction. The all-positive baseline shows why the paper reports both measures. On the cross-system comparison it obtains 66.5 accuracy and 79.9 F1, despite making the same decision for every pair. The additive baseline with sense selection reaches 71.3 accuracy and 81.1 F1.

The encoder, pooling, and the final classifier

The strongest recursive result comes from a sequence of changes to the comparison system. In the unpooled configuration, the RecNN with dynamic soft selection reaches 76.0 accuracy and 84.0 F1 on MSRPC. Giving that configuration direct access to the average of the word inputs raises its scores to 77.6 accuracy and 84.7 F1. The encoder with average pooling is the strongest version of the recursive approach before C1 contributes surface evidence.

The recurrent branch of the comparison follows the same progression. Its dynamic soft-selection result is 75.2 accuracy and 83.6 F1. With average pooling, it reaches 76.6 accuracy and 84.3 F1. The comparison therefore contains evidence about the same design change in both a tree-based and a sequential architecture. The pooled recursive variant remains ahead of the pooled recurrent variant on the reported accuracy and F1 measures.

Adding C1 yields 78.6 accuracy and 85.3 F1 for the recursive system on MSRPC. For the recurrent system with pooling and C1, the corresponding results are 77.5 and 84.6. The chart compares F1 for the recursive settings and places them alongside the strongest previously published result in the paper. The star marks the strongest configuration of the authors’ system.

Recursive configurations and comparison systems on MSRPC by F1

Each addition raises the recursive system’s reported F1, with the best configuration close to the strongest published comparison.

Recursive configurations and comparison systems on MSRPC by F1All-positive baseline: 79.9All-positive baseline79.9Addition with disambiguation: 81.1Addition with disambiguation81.1Recursive encoder with soft selection: 84.0Recursive encoder with soft selection84.0Recursive encoder with soft selection and pooling: 84.7Recursive encoder with soft selectionand pooling84.7Recursive encoder with pooling and C1 (this paper): 85.3Recursive encoder with pooling and C1(this paper)85.3Ji and Eisenstein: 85.9Ji and Eisenstein85.9
The numbers
System or settingF1
All-positive baseline79.9
Addition with disambiguation81.1
Recursive encoder with soft selection84.0
Recursive encoder with soft selection and pooling84.7
Recursive encoder with pooling and C1 (this paper)85.3
Ji and Eisenstein85.9

The published comparisons establish the range in which the results sit. The paper lists 82.7 F1 and 76.1 accuracy for Das and Smith’s approach, and 84.1 F1 and 77.4 accuracy for Madnani and colleagues’ approach. These numbers are results reported for other systems in the paper’s cross-system table, rather than controlled runs of the authors’ architecture. The linked works are Das and Smith’s paraphrase identification approach and Madnani and colleagues’ study of translation metrics for paraphrase identification.

Ji and Eisenstein’s entry, at 80.4 accuracy and 85.9 F1, remains the highest in that table. The paper characterizes its own best result as close to the leading published result and reports it as the second best in the comparison. The distinction between the pooled encoder and the final ensemble is relevant to that claim. The result closest to the published leader is the one in which the learned sentence representations are supplemented by C1.

What the ablations show

Comparing directions and distances

The authors begin the paraphrase comparisons with single-vector word representations, which lets them change the comparison loss without also introducing dynamic sense selection. On MSRPC, the RecNN scores 73.8 accuracy with the Euclidean loss and 74.9 with the cosine loss. For the RNN the respective scores are 73.0 and 74.3. The direction-based comparison is ahead within each architecture, and the authors use it in their subsequent sense-selection comparisons.

This result bears on how sentence vectors are read. A vector can change in length as a consequence of how its constituent representations combine. Euclidean distance treats that change as evidence in the sentence comparison. Cosine similarity bases its judgment on the relative direction of the vectors. The experiment shows that the cosine-based objective works better for these encoders and this task. Since each objective also has its own loss shape and training parameters, the comparison concerns the complete alternatives as implemented.

Choosing a sense before or during composition

The simplest baseline combines word vectors by adding them. With the same vector for each occurrence of a word, it scores 69.9 accuracy on MSRPC. With prior disambiguation, it reaches 71.3. The prior procedure compares a word’s sense vectors with the average representation of the other words in the sentence and commits to the closest sense before composing the sentence. The additive operation itself has no mechanism for making an occurrence-specific sense choice. The improvement is consistent with a substantial part of the work in this configuration being done by the inputs.

For the deep architectures, the paper compares the same-vector setting, prior selection, hard dynamic selection, and soft dynamic selection. The unpooled RecNN goes from 74.9 accuracy with single-vector inputs to 75.3 with prior selection. It reaches 75.7 with the hard dynamic selector and 76.0 with the soft selector. The corresponding RNN scores are 74.3, 74.6, 75.1, and 75.2. The additive baseline and the prior-disambiguation variants use separately trained logistic regression classifiers, a difference worth keeping in view when reading across settings.

The authors interpret the modest effect of prior selection in the deep networks as evidence that learned composition can already use surrounding words to absorb some effects of ambiguity. A recursive parent, for example, is a function of both children, so the representation produced from an ambiguous word can vary with the other input even when the original word vector was fixed. The experiment measures the resulting classifications. Whether an internal vector has recovered a particular word sense remains an interpretation of how those classifications are obtained.

The dynamic variants add a further possibility. They can adjust the representations for different senses while learning which sentence distinctions matter to the task. Soft selection preserves some contribution from lower-weighted senses, whereas hard selection passes only the highest-weighted vector. The ordering of the results favors soft selection for both architectures, though the scores are close. The subsequent experiments use soft selection when the paper reports a dynamic setting.

Preserving word-level information with pooling

The authors motivate pooling with a tree example in which kids is combined near the top with a longer phrase about playing ball games in a park. The vector on the phrase side already summarizes several earlier combinations. Details about the activity and where it happens pass through more composition operations than the subject does. The authors suggest that this can weaken individual lexical contributions to the final vector and make fine-grained changes in the selected senses harder to detect in the sentence comparison.

Average pooling supplies a second path from word inputs. Every word position participates in the average added to the sentence vector. This does not give each position identical importance in the resulting classification, since composition and the learned comparison still influence the result. It does give each chosen word vector a direct route into the representation used for the decision. The contrast the authors test is therefore between reading the composed sentence vector alone and reading it with that additional source of word-level information.

For the pretrained RecNN, the pooled scores on MSRPC are 75.5 accuracy for single-vector inputs, 76.3 for prior disambiguation, and 77.6 for dynamic selection. The corresponding pooled RNN scores are 74.8, 75.9, and 76.6. Each of the pooled settings can be compared with its unpooled counterpart. Pooling helps even with single-vector inputs, which supports a contribution from the direct preservation of word information in general. The dynamically selected inputs achieve the highest pooled score in each architecture.

The pooled runs also change how far apart the settings are. In the recursive architecture, the dynamic and prior-selection scores separate more clearly once the word vectors can reach the comparison through an average. The same pattern appears relative to the single-vector condition in both architectures. This fits the authors’ account of sense information becoming less accessible through repeated composition. The support is indirect. The study changes the route by which lexical information enters the final representation and observes accuracy, without tracing individual coordinates through the tree.

Starting with general text or training in one stage

The pooling experiment also contains runs trained in a single stage, with word and sense vectors initialized randomly at the start of task training. In these runs the recursive architecture reaches 74.4 accuracy with single-vector inputs and 72.9 with dynamic selection. The corresponding recurrent scores are 73.6 and 73.1. The paper reports no prior-selection result for the single-stage columns of this comparison.

Pretraining and sense selection with recursive pooling on MSRPC by accuracy

Dynamic selection gives the strongest recursive result after general pretraining and trails the single-vector setting when training starts from random vectors.

Pretraining and sense selection with recursive pooling on MSRPC by accuracySingle-stage training with single-vector inputs: 74.4Single-stage training with single-vectorinputs74.4Single-stage training with dynamic selection: 72.9Single-stage training with dynamicselection72.9General pretraining with single-vector inputs: 75.5General pretraining with single-vectorinputs75.5General pretraining with dynamic selection (this paper): 77.6General pretraining with dynamicselection (this paper)77.6
The numbers
System or settingAccuracy %
Single-stage training with single-vector inputs74.4
Single-stage training with dynamic selection72.9
General pretraining with single-vector inputs75.5
General pretraining with dynamic selection (this paper)77.6

The single-stage comparison shows that increasing the expressiveness of the word representation need not help when the system has to learn it completely from the task objective. It also gives a stronger basis for discussing pretraining than the best headline score alone. The single-vector encoders benefit from pretraining, and the largest reported scores in the pooling comparison belong to the pretrained dynamic systems. The recurrent comparison follows the same ordering, even though it uses a different route through the sentence.

The authors take these results as evidence that general text supplies useful linguistic information beyond what the paraphrase training examples provide. The experiment compares the entire pretrained starting point with random initialization. Its outcome is compatible with several contributions from that starting point, including better lexical representations, better composition weights, and a more effective initialization for sense selection. The one-stage comparison does not apportion the gains among those sources.

Supplying evidence that a vector comparison can miss

The C1 comparison asks whether the best sentence vectors already capture all the distinctions needed to judge paraphrases. The authors point to numbers and names as examples of details that can matter even when the rest of a pair is closely related. The implemented features give the classifier direct access to length, word overlap, and number information. They do not include a separately reported name-matching feature. The extra classifier uses these features together with embedding similarity.

The increase from 77.6 to 78.6 accuracy for the pooled recursive system and from 76.6 to 77.5 for the pooled recurrent system shows that the additional classifier helps both. This result concerns the joint contribution of the added features, the classifier, and its fit on MSRPC training data. The paper does not run the feature groups separately. The evidence supports adding the surface information in this configuration, while leaving the contribution of any individual feature open.

Limitations

Limits the authors identify

The authors test their approach with a recursive and a recurrent architecture. They present the training and sense-selection ideas as applicable more broadly, but leave a convolutional implementation to future work. The results establish how the method behaves in the two architectures studied. A convolutional version would put the selected vectors through a different pattern of local and larger combinations, so the measured effect of selection or pooling would need its own evaluation.

The authors also flag the dependence of direct task training on the size and variety of the task data. A small collection may give a deep system too little evidence to learn useful word vectors and composition weights. Even a larger collection assembled for a specific goal may provide a narrow range of contexts for particular words. Their experiment addresses this by using general text before adaptation, then using external paraphrase material. The performance numbers are therefore tied to a training procedure with access to both kinds of resource.

They acknowledge that a fixed sense inventory is a design choice. The experiments allocate 3 senses per word. The paper cites earlier work that can add a sense dynamically, and the authors leave open using that kind of inventory in principle. A fixed count makes the number of available prototypes easy to specify, while assigning the same capacity to words with potentially different patterns of usage. The experiment does not establish how many senses are appropriate for any given word.

Finally, the authors identify a limitation of relying completely on distributional sentence representations for paraphrase decisions. Small factual differences may matter more than the amount of shared wording suggests. They respond with C1 and discuss the tendency of recursive composition to attenuate local word information, which they address through pooling. These changes target different stages of the system. Pooling changes which vector information reaches the comparison, and C1 adds surface cues that need not be recoverable from vector similarity.

Limits visible in the experimental design

The neighbor lists show examples of syntax-aware behavior, and the lexical benchmark measures agreement with human similarity rankings. Neither evaluation directly measures the grammatical distinctions encoded in the vectors across the vocabulary. The paper gives no corresponding quantitative breakdown by tense, number, or other grammatical property. The examples illustrate how the vectors can behave, while the breadth and consistency of that behavior remain unmeasured.

The paper also leaves the separate effect of the shuffle objective unresolved. Its comparisons include other embedding methods, alternatives for sense selection, and runs with or without generic pretraining. It does not report a matched pretraining comparison in which the same architecture and data are used with the replacement loss alone and then with shuffling added. Consequently the difference from CW on SCWS or the difference between a pretrained encoder and a randomly initialized one cannot be assigned specifically to shuffled negatives. Those comparisons change broader parts of the training setup.

Order is a useful source of syntactic evidence, but the training signal is plausibility under particular corruptions. A partial shuffle can change meaning as well as grammatical arrangement. A replacement can introduce an implausible form as well as an implausible meaning. The losses do not label which kind of mismatch produced a penalty. The recursive implementation also uses a parse supplied by an external parser, so it combines an order-based objective with syntactic structure supplied elsewhere in the architecture. The recurrent implementation offers a sequential comparison, but it changes the way composition proceeds along with its access to the tree.

There is also a difference between useful sense prototypes and a verified inventory of word meanings. A centroid can collect contexts that share vocabulary, and the resulting input can help a sentence classifier. These outcomes do not tell a reader whether a prototype consistently matches a human sense category. SCWS labels the similarity of contextual occurrences, and MSRPC labels relations between sentences. Neither experiment independently checks whether the gate makes the right sense choice on a word-by-word basis. The results show what the selected representations do for the measured tasks.

The reported advantage of soft selection over hard selection is modest in the unpooled comparisons, and the paper gives point results without uncertainty estimates for those contrasts. The observed ordering supports the use of soft selection in the subsequent experiments. It provides a limited basis for claiming a reliable advantage across new samples or initialization runs. The same caution applies when the best recursive and recurrent scores are compared. Their difference reflects the complete trained implementations, including how they compose, and does not isolate the contribution of a parse tree.

The paper places its best paraphrase score in context by listing previously reported scores. This establishes its position among the entries shown, but it is a different kind of comparison from changing one component within the authors’ system. In particular, the main score combines English corpus pretraining, external paraphrase training, dynamic selection, pooling, and a classifier that uses benchmark training labels and extra features. That configuration demonstrates how those pieces work together on MSRPC. The paper’s lexical and sentence evaluations do not establish comparable performance in another language or on a task whose labels require a different kind of sentence distinction.

What came after

BnPC cites the paper in later work on paraphrase detection. Its contribution is a gold-standard corpus for Bangla and an evaluation of paraphrase detection on that corpus. This connects it to the sentence-level question in the earlier study, which asks whether a system can recognize equivalent meaning when two sentences differ in how they express it. The earlier experiments answer that question on English data, while BnPC supplies an evaluation resource centered on Bangla.

The documented connection is through the task and the citation. BnPC’s stated contribution concerns the corpus and its evaluation, and that description does not establish that it reused the order-based pretraining objective, the sense selector, or the shared sentence encoders. The later work therefore places the earlier paper in a continuing line of paraphrase evaluation across languages. It does not by itself extend the earlier findings about syntax-aware embeddings to Bangla.

Cite

Cite as Jianpeng Cheng and Dimitri Kartsaklis. 2015. Syntax-Aware Multi-Sense Word Embeddings for Deep Compositional Models of Meaning. 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-1177

@inproceedings{cheng2015syntax,
  title = {{Syntax-Aware Multi-Sense Word Embeddings for Deep Compositional Models of Meaning}},
  author = {Jianpeng Cheng and Dimitri Kartsaklis},
  booktitle = {Proceedings of the 2015 Conference on Empirical Methods in Natural Language Processing},
  year = {2015},
  doi = {10.18653/v1/d15-1177},
  url = {https://doi.org/10.18653/v1/d15-1177}
}

↑ back to top

This page in Markdown https://md.research.elamur.ai/free/en/papers/cheng-2015-syntax-aware-multi-sense-word/