An ELMo-inspired approach to SemDeep-5's Word-in-Context task
Paper · 2019 · Alan Ansell, Felipe Bravo-Marquez and Bernhard Pfahringer
Summary
The same word can do different work in different sentences. A system that gives a word the same numerical representation wherever it occurs has little to say about that difference. The Word-in-Context task makes the distinction testable. Each example identifies a focus word in each of two sentences and asks whether the uses have the same meaning. Ansell and colleagues approached the task by asking what each sentence leads a reader to expect at the focus position. Their system compares those expectations to decide whether the word is doing the same work in both places.
The approach adapts ELMo, which builds a representation of a word occurrence using the sentence in which it appears. The authors train a network to recover a missing word from the text on either side. For a Word-in-Context example, they take the internal vector that the network would use to predict the focus word in each sentence. They then multiply corresponding entries of those vectors and learn how much each product should contribute to the same-sense decision. The actual focus word is absent from both vectors. This gives the experiment a specific question to answer about word sense disambiguation and the evidence available in surrounding text.
The competition entry reached 61.2% test accuracy, compared with 57.7% for the ELMo 1 baseline reported by the benchmark authors. The paper describes this as a 3.5% improvement. In comparisons using the same Wikipedia-trained network, taking the vectors used to predict the word gave higher accuracy than taking the first-layer states at the word itself when both used cosine similarity. Learning weights for the prediction vectors also helped, though the gain over an ordinary dot product was much larger on development data than on the test set. The effect of learning those weights depended on the representation they were applied to.
A post-evaluation submission reached 62.4% test accuracy after adding a collection of books to the training corpus and increasing regularization, which limits how freely the classifier can fit its weights to the training examples. Because the authors changed both settings together, the result belongs to that combined configuration. The experiments show how far the system could get by comparing the surroundings of the focus word. They also leave a practical question open. Grammatical differences between the two occurrences can change what the surrounding text predicts, even when the benchmark calls the meanings the same.
Deep dive: An ELMo-inspired approach to SemDeep-5's Word-in-Context task
An ELMo-inspired system uses the words around a target to judge whether its meaning stays the same across two sentences in Word-in-Context. · about 32 minutes to read
The problem and its context
A decision about occurrences
In Word-in-Context, a sentence has a particular position marked for attention, and a second sentence has a corresponding marked position. The focus word is shared in the sense intended by the task, though the forms on the page may differ through inflection. The input gives the system enough information to find the occurrences it should compare. The label concerns the meaning of the word at those occurrences. Broad similarity between the sentences can be beside the point. Two situations may have many features in common while the focus word plays a different semantic role in each, and sentences about different situations may use the word in the same sense.
The distinction between a word and a use of that word is central to lexical semantics. A word can recur across sentences while its interpretation depends on the surrounding expression. WiC sets up a decision in which ordinary vocabulary identity is already largely settled. What varies is whether the relation between the occurrences qualifies as a match in meaning. Consequently, a good representation for this task must meet demands in both directions. It should change when the context supports a different sense, and it should allow the uses to match when differences elsewhere in the sentence leave the focus word's sense intact.
The binary task format makes this possible to measure without asking a system to supply a definition. The classifier receives a pair and can return a same-sense or different-sense decision directly. For this system there is no intervening step in which it assigns a named sense to each occurrence and compares those names. That matters for how to understand the paper's contribution. A classifier can make the pairwise decision whenever its inputs carry usable evidence about their relationship, even if they provide no straightforward way to describe either meaning in isolation.
The benchmark also entails a distinction between comparing two occurrences and comparing two vocabulary entries. A word form is the observed shape of a word, and forms that differ grammatically can belong to the same focus word in the task. The paper cites break and breaks. A representation can be responsive to the contexts that license these forms and still have trouble with the requested decision. It has to make the grammatical difference count for less when the two uses belong together. The example shows why sensitivity to context is only part of the design problem. The rest lies in deciding which of the differences that context reveals should matter to the output.
From one vector per word to a vector per occurrence
The starting point is the use of word embeddings, numerical vectors that allow words or their occurrences to be compared. In the word2vec setup the authors discuss, each word has a fixed vector. If a word has several meanings, the same vector has to represent its uses across those meanings. This can be useful when a task needs a representation of a vocabulary item in general. For WiC, the difficulty becomes apparent if the two focus occurrences have the same form. Looking up the same entry gives the pair of occurrences identical vectors regardless of what their sentences say. The comparison cannot recover a difference absent from its inputs. Efficient Estimation of Word Representations in Vector Space
The authors describe a family of approaches that gives a word multiple possible vectors. Each vector acts as a prototype for a discrete sense. The usefulness of this idea depends on which distinctions the prototypes capture and whether a particular occurrence can be associated with a suitable one. The prototype structure gives comparison a natural form. Once uses are represented in terms of separate senses, the system can draw on that separation when assessing a pair. The paper locates this idea in earlier work on multiple representations for a single word, including work that uses global context. Improving Word Representations via Global Context and Multiple Word Prototypes
The introduction points to prior improvements on tasks that compare meanings in context or assess relationships between words. These lines of research motivate representing an occurrence more specifically than with a single word vector. Contextual word similarity is particularly relevant to WiC because the comparison depends on how expressions are being used. Relational similarity is a separate use of the representations, involving what the representations reveal about a relationship between words. The paper draws its examples for these outcomes from work on multiple embeddings, unified representations and disambiguation, and SensEmbed. Efficient Non-parametric Estimation of Multiple Embeddings per Word in Vector Space · A Unified Model for Word Sense Representation and Disambiguation · SensEmbed
The other family builds a fresh vector for each occurrence from its context. A vector in this family can vary even between uses that a human would put in the same sense category. That flexibility is valuable because each sentence can contribute different evidence about the particular use. It also turns the metric into an important component. The system needs a way to judge whether differences between continuous vectors amount to a sense distinction. The paper points to context2vec and ELMo as examples of contextual embeddings, and it describes ELMo's success across several language tasks as motivation to try such vectors on WiC. context2vec
These families answer somewhat different representation questions. With prototypes, the organization into discrete senses takes place as part of building or selecting the representation. With occurrence-specific vectors, the system can form each representation from a sentence and leave the task-specific decision until comparison. WiC supplies a binary outcome for a pair either way. The present paper chooses to build the vectors from context and learn the decision from labeled pairs. The labels give it a criterion for judging which kinds of resemblance are useful without requiring anyone to read meanings directly out of the vectors.
The template supplied by ELMo 1
The WiC benchmark paper had already supplied a procedure called ELMo 1. In the account given by Ansell and colleagues, it starts with ELMo's pretrained recurrent network. A recurrent network reads positions in sequence and carries an internal state from one position to the next. ELMo provides states from opposite directions, so its representations can bring together information from both parts of a sentence. Its recurrent units are long short-term memory units, abbreviated LSTMs. The role of these units here is to carry information along the word sequence and produce a state at each position.
For the benchmark comparison, the representation comes from the first recurrent layer at the focus position. The system uses cosine similarity to compare the contextual vectors. Cosine similarity measures how closely the vectors point in the same direction, so changing the overall length of a vector alone leaves that comparison unchanged. A threshold turns similarity into a classification. When the score is above the learned cutoff, the system assigns the positive label for a shared sense. This gives the benchmark a relatively direct test of how well a general-purpose contextual representation serves a specific semantic decision.
Ansell and colleagues keep the broad structure of that procedure. A language predictor is trained on text, a representation is extracted for each marked occurrence, and a comparison is converted into a binary result. The paper asks what should happen within each of those stages. Can training make the two reading directions work together on the same word prediction? Is the most informative state the one computed at the target, or the state the network would rely on to fill the target's position? Does the same-sense decision benefit from learning how much to trust each entry of the representation? These questions connect the evaluation to specific design choices rather than to the broad idea of contextual embeddings alone.
The method, step by step
Learning from the words around a gap
Consider a sentence with an internal position set aside for prediction. The text before that position gives clues from one side, and the text after it gives clues from the other. Each side goes through a recurrent stack that reads toward the gap. The network joins the two resulting states and uses them to score words in its vocabulary. During training it already has the sentence, so it knows the correct answer at each position. The observed word provides supervision for the joint prediction. This operation gives the authors a way to learn contextual vectors from a large corpus before seeing the WiC labels.
At a single training position, the network can combine clues about what kind of word belongs there with clues about what would make sense in the sentence. The prediction objective makes no separate provision for these types of evidence. A pattern is worth learning whenever it helps assign higher probability to the observed vocabulary entry. This is important for the later WiC comparison. The vector that supports prediction can carry something about the likely sense, but it was learned in a setting where form, syntax and meaning can all contribute to the same score.
The approach resembles context2vec in predicting a word using left and right context together. In the original ELMo setup as described by the paper, the recurrent directions predict from their respective sides. Here they cooperate through a shared prediction. They still process the sentence separately. A forward state never needs to read a backward state to do its recurrence, and the backward stack runs over the same tokens in reverse order. The interaction occurs when the prediction layer receives a vector made from both outputs.
The network can obtain predictions for eligible positions from complete directional passes over the sentence. For any particular target, it chooses the forward state just before the word and the backward state just after it. Each of those states has already seen the appropriate stretch of the sentence in its reading direction. Together they cover both sides while leaving the target out of the computation for that prediction. A word that is held out of its own predictor vector can still be present in a context used to predict a different word in the same sentence. Exclusion concerns the target position currently being scored.
From corpus training to a Word-in-Context decision
The steps in order.
Preparing the text and building the recurrent stacks
The competition system learned from a 2018 Wikipedia dump. The authors lower-cased the tokens and used a frequency cutoff to decide which got individual vocabulary entries. A token had to occur at least 300 times to qualify. Tokens outside that vocabulary became <UNK>, the unknown-token marker. The resulting vocabulary contained ∼ 100,000 entries. This preprocessing makes the input a sequence of whole-token identities. The representation can distinguish frequent forms with different vocabulary entries, and it treats the rarer forms mapped to <UNK> alike at the input.
The input examples were constructed around sentence boundaries. The authors packed as many sentences as possible into each example, padded it to a limit of 50 tokens, and used <START> and <END> to mark its ends. They shuffled the examples before grouping them into batches so that a batch would draw on varied parts of the corpus. Packing and padding govern how the text reaches the recurrent stacks. They are distinct from the choice of states for each target, which governs which parts of a sequence can affect a particular prediction.
Each vocabulary token was assigned a randomly initialized 256-dimensional embedding, with embeddings also assigned to <START>, <END> and <UNK>. At this stage an embedding is a lookup vector for an input token. It supplies a numerical input to the recurrent computation. The contextual vector used in WiC comes later, after the network has read the surroundings of the focus position. These are different roles for vectors. The same input lookup can contribute to many contextual outputs, each of which is computed from the particular sequence reaching an LSTM.
Each direction uses a stack of two LSTM layers. The cells have 2048 hidden units, and the network projects their outputs to 256 dimensions. Thus the recurrent computation has a larger internal state than the vector it passes on as its projected output. The cell weights are distinct across layers and directions. The paper also describes a residual connection that sends the raw input embeddings directly to the second layer, giving that layer access to the input through a path alongside the output of the preceding layer. These architectural choices determine the states available for the prediction and for the later first-layer comparison.
Several units of measurement in this setup describe different things. The vocabulary size determines how many possible word entries the prediction layer scores. The input length limit governs a training sequence. The hidden-unit count describes the recurrent cells, while the projected dimension describes the size of the output available at a position. The classifier's input size comes from joining directional outputs. Keeping those quantities distinct helps explain why the representation can be comparatively compact even though the predictor has to discriminate among a large set of word types.
Choosing states and predicting the target
The paper describes the computation for a sentence of length n. The second recurrent layer supplies a forward state and a backward state at every position. For the forward direction, the state at any position can depend on the tokens read up to that point from the beginning. The backward direction follows the corresponding order from the end. If the word being predicted is at position i, the state at the preceding position in the forward stream contains the left-side evidence, and the state at the following position in the backward stream contains the right-side evidence.
xᵢ = [→uᵢ₋₁ ; ←uᵢ₊₁]
Here xᵢ is the predictor vector for the word at position i. The symbol u denotes a projected state from the second recurrent layer. The arrow → identifies the forward stream and ← identifies the backward stream. The subscripts i − 1 and i + 1 indicate the immediately preceding and following positions, respectively. The brackets and semicolon denote concatenation, putting the entries of one vector after the other. The equals sign defines the vector used at i. In the paper's notation, each directional vector lies in ℝᵈ, where ℝ denotes the real numbers and d is the number of entries in one directional state.
Concatenation keeps the origin of the features explicit in the layout of the vector. The entries from the left-context computation occupy one part and the right-context entries occupy the other. They can contribute differently to the eventual prediction because the next layer has access to them individually. The two directions become jointly useful by influencing the same vocabulary scores. The paper's definition applies to interior positions, expressed by the range 2 ≤ i ≤ n − 1, where n is the sentence length and ≤ includes the endpoints of the indicated range. Each eligible position has a neighboring state on each side.
p⁽ⁱ⁾ = softmax(W xᵢ)
The vector p⁽ⁱ⁾ gives probabilities over the vocabulary for position i, with the superscript in parentheses identifying the position. The matrix W is the learned output transformation, and multiplication by xᵢ produces one unnormalized score per vocabulary entry. The function softmax converts that collection of scores into a probability distribution. The equality states how the distribution is obtained from the contextual predictor vector. The probability of interest for a training example is the entry corresponding to the word actually observed at the position.
The output transformation belongs to the missing-word task. The representation for WiC will be xᵢ, the input to that transformation, so the system can compare context features before they are turned into vocabulary scores. This separates what the representation has learned about its surroundings from the particular word rankings those features produce. During training the vocabulary objective still determines which representations are useful. The distinction is about the point in the computation at which the authors save the representation for transfer to the benchmark.
J = −Σᵢ₌₂ⁿ⁻¹ log p⁽ⁱ⁾ₛᵢ
The symbol J denotes the cross-entropy loss for the sentence. The sum Σ runs over positions i from 2 to n − 1, the interior of the sentence of length n. The notation sᵢ denotes the vocabulary index of the observed word at position i, so p⁽ⁱ⁾ₛᵢ selects that word's assigned probability from p⁽ⁱ⁾. The function log takes the logarithm of the probability, and the leading minus sign makes the objective a loss to minimize. The equals sign defines the total as the sum of these contributions.
Assigning a small probability to the observed word incurs a larger loss at that position. To improve the prediction, training can adjust how the directional stacks encode their contexts and how the output transformation uses the combined vector. The common loss supplies the reason to call the directional training joint, even though the two passes have distinct recurrent weights. Both sides contribute to the probability of the same observed word. The paper uses that prediction as the task on which the contextual representation is learned and reserves the WiC labels for learning the comparison.
Extracting a vector for each occurrence
A WiC example identifies a focus position in each sentence. Call those positions f₁ and f₂, with the subscripts distinguishing the sentences. To represent each occurrence, the authors construct the same predictor vector they would use if the objective were to recover the word at that position. This gives x⁽¹⁾₍f₁₎ for the first sentence and x⁽²⁾₍f₂₎ for the second, with the parenthesized superscript indicating the source sentence. The classifier receives the two vectors through a comparison of their entries.
A state taken directly at the focus position would reflect a recurrent step that includes the focus token. The predictor vector takes positions on either side, so the vector is determined by the surrounding words. The focus position still organizes the computation by setting the boundary between the left and right parts. Accordingly, choosing different focus positions in a sentence changes which prefixes and suffixes the system compares, even if the same sentence is being processed. The method relies on a known location and is designed to judge a specified occurrence.
The motivation is that a surrounding expression can set up expectations about the kind of use that would be appropriate at the focus position. Contexts supporting the same sense may yield similar evidence along important entries of the vector even though their words differ. A sense shift can change what types of completions the network is prepared for. The comparison never needs to output the expected words. It acts directly on the encoded context that would have supplied the evidence for ranking them.
The paper also tests an alternative to this representation. It takes the first-layer states at the focus token itself and concatenates their forward and backward outputs. This is closer to the ELMo 1 extraction rule. It is useful to distinguish the alternatives by both their layer and their location. The predictor vector comes from the second layer immediately around the target and is the vector used by the word prediction layer. The hidden-state alternative comes from the first layer at the target. The experiments compare these ways of extracting vectors from the same trained network.
Learning how to compare the vectors
A dot product compares two vectors by multiplying entries that occupy the same position and adding those products. An ordinary dot product gives each product the same coefficient. The authors also try cosine similarity, which controls for the vectors' overall lengths, and a weighted dot product. In the weighted version, the classifier can rely strongly on certain products and give others little influence. This is a choice about the meaning of similarity for the particular decision. Evidence that helps recover a missing token from a sentence can have a different value when the question is whether two uses share a sense.
d(x⁽¹⁾₍f₁₎, x⁽²⁾₍f₂₎) = wᵀ(x⁽¹⁾₍f₁₎ ◦ x⁽²⁾₍f₂₎)
Here d is the weighted comparison score. The vectors x⁽¹⁾₍f₁₎ and x⁽²⁾₍f₂₎ are the predictor vectors at the respective focus positions f₁ and f₂, with the superscripts identifying the two sentences. The symbol ◦ means element-wise multiplication, producing a vector whose entries are the products of corresponding entries in the two inputs. The vector w contains the learned coefficients, and ᵀ transposes it so that multiplying it by the product vector gives a single score. The parentheses group the arguments to the score function and the products to which the weights apply. The equals sign defines the score.
The product operation makes the comparison symmetric. Exchanging the two sentences leaves every product unchanged, as appropriate for a label that asks whether the uses match. The score also has a specific expressive structure. Each entry is compared to the corresponding entry in the other sentence. The trained coefficients change how these comparisons are combined, with each coefficient acting on a feature that is already a product. The classifier does not explicitly compare each coordinate against every other coordinate, so it relies on the network supplying useful features in corresponding positions.
Learning the weights is a logistic regression problem. Logistic regression uses a weighted combination of input features to distinguish the outcomes of a binary task. In this case each labeled sentence pair contributes one vector of element-wise products and a judgment of whether the focus uses share a sense. The weights are learned from those labels. The prediction stage uses the resulting comparison to decide whether the relation between the contexts is strong enough to classify the pair as a match. This stage introduces supervision about sense agreement, whereas learning to predict the missing word relied on the observed corpus tokens themselves.
The WiC training split contained ∼ 5,500 examples, and w had dimension 512 because the predictor joins two projected states. The authors fitted the vector using Scikit-Learn's LogisticRegression with L2 regularization. L2 regularization penalizes large coefficients, constraining how strongly the fitted classifier can pursue patterns in the labeled training set. Its parameter C is the inverse of regularization strength. The authors chose 0.2 on the development split for the competition system. A smaller value puts more pressure on the fit to keep the weights small, a distinction that becomes relevant to the post-evaluation configuration.
The two training stages therefore answer different questions about the same vector. The corpus objective rewards features that help predict what belongs at a position. The WiC objective measures whether products of those features help judge a pair. A feature that recurs in contexts predicting similar forms might be very useful to the first stage. Its usefulness to the second depends on how reliably that agreement tracks the same-sense labels. The learned comparator makes that relationship an empirical question, and the experiments reveal how much the answer changes with the choice of representation and split.
Experiments and results
What the splits measure
The paper uses the Word-in-Context training data to learn the supervised comparison and the development set to choose the regularization setting. The test set provides the reported evaluation of the competition entry. The outcome is accuracy, the share of sentence pairs for which the system correctly predicts whether the focus uses have the same sense. This measure applies to the whole pipeline. A correct WiC prediction counts equally whether the context makes the meaning clear through vocabulary, syntax or a combination of cues.
For understanding the comparisons, it helps to distinguish the corpus from the benchmark. Wikipedia supplies sentences from which the network learns to predict words. The WiC training split supplies examples with labels about the relation between occurrences. Development and test accuracy refer to Word-in-Context, including for configurations whose predictor was trained on a different corpus. Changing the corpus can alter the vectors available to the classifier. Changing the classifier can alter the way those vectors are used. The benchmark metric is the same in both cases.
The main comparison with an external baseline uses the WiC authors' reported ELMo 1 score. That baseline had a character-based input and used an ELMo version trained on the 1 Billion Word Benchmark. It extracts first-layer states at the focus position and uses cosine similarity with a learned threshold. The Ansell team's system consumes whole tokens, uses Wikipedia, trains the directions together, extracts the neighboring states used for prediction, and learns a weighted comparison. The published baseline comparison consequently measures the accuracy of complete configurations that differ in several respects.
The paper also reports a set of internal comparisons based on the same training run on the 2018 Wikipedia corpus. Those comparisons vary the way a vector is obtained from the network and the way a pair is scored. Keeping the training run shared means a difference in accuracy cannot be attributed to retraining on new text for the row in question. This is what makes the internal comparisons more informative about extraction and scoring than the difference between the full competition system and the external baseline.
The competition entry and the common training run
The authors made a single submission during the evaluation period. It used the Wikipedia-trained predictor, the vector constructed from both sides of the focus, and the weighted dot product with the development-selected regularization. Its accuracy on the WiC test set was 61.2%. ELMo 1's reported test accuracy was 57.7%. The authors describe the improvement as 3.5% on this test comparison. This headline result compares the submitted system with the benchmark baseline. The controlled results within the Wikipedia run bear on which parts of the submitted system helped.
The following test chart keeps the corpus and training run fixed and shows the reported scores for each extraction and scoring combination. Predictor refers to the vector used to make a missing-word prediction. Hidden states refers to the first-layer outputs at the focus position, joined across the reading directions. The competition entry is the starred row.
Representation and scoring choices on WiC test accuracy
The weighted dot product gives the strongest result with predictor vectors and the weakest with first-layer hidden states.
The numbers
| System or setting | accuracy % |
|---|---|
| Predictor, weighted dot product (this paper) | 61.2 |
| Predictor, unweighted dot product | 59.1 |
| Predictor, cosine similarity | 59.1 |
| Hidden states, cosine similarity | 54.9 |
| Hidden states, weighted dot product | 53.1 |
The best score in this group came from the combination that the authors submitted. With predictor vectors, the unweighted dot product and cosine similarity both reached 59.1% test accuracy. Equal accuracy leaves open whether they solved the same examples. What it establishes is that adopting cosine normalization made no difference to the aggregate test accuracy in this particular comparison. The weighted comparison exceeded both of those scores with predictor vectors. For the first-layer hidden states, the ordering was different. Cosine similarity reached 54.9%, while the weighted dot product reached 53.1%.
The paper compares the Wikipedia-trained system's 54.9% test result with first-layer states and cosine against the external ELMo 1 result of 57.7%. Both use the same broad extraction and scoring rule. The underlying networks differ, including in their input units, training corpus and method of directional prediction. The comparison shows that simply taking the authors' trained network and applying the ELMo 1 extraction and scoring choices produced lower accuracy on the test split than ELMo 1 itself. The authors interpret this as a reason to think that the training or implementation of their predictor offered room for improvement.
The development results use the same set of configurations. They show the scores available while the authors were choosing the configuration and illustrate how the apparent importance of a choice can depend on which split is used to measure it.
Representation and scoring choices on WiC development accuracy
Predictor vectors with learned weights lead on development data, where the scoring choices separate more clearly.
The numbers
| System or setting | accuracy % |
|---|---|
| Predictor, weighted dot product (this paper) | 67.4 |
| Predictor, unweighted dot product | 60.2 |
| Predictor, cosine similarity | 60.5 |
| Hidden states, cosine similarity | 55.2 |
| Hidden states, weighted dot product | 54.1 |
The submitted combination scored 67.4% on development data. With the same predictor vectors, cosine similarity scored 60.5%, and the unweighted dot product scored 60.2%. The first-layer states reached 55.2% with cosine and 54.1% with learned weights. Thus the development split already showed that learned weights were most useful with the predictor representation. It also made the benefit over the simple predictor comparisons look larger than it turned out to be on the test set.
These accuracy values help separate two questions about the chosen configuration. One concerns selection. The weighted predictor comparison led the development results and was the submitted choice. The other concerns the magnitude of its benefit in evaluation. Its test accuracy still led the configurations that shared the Wikipedia training run, but a reader using the development comparison alone would get a different impression of the size of the improvement. The trained comparison's standing carried across the splits more clearly than its margin.
The post-evaluation submission
After the evaluation period, the authors submitted a configuration that used Wikipedia together with BookCorpus. Their description associates the book collection with the work by Zhu and colleagues. They also changed the classifier's C from 0.2 to 0.02, increasing regularization. The resulting submission reached 62.4% on the WiC test set. This is the paper's highest reported test accuracy, with the 61.2% result belonging to the entry submitted during the competition's evaluation period. Aligning Books and Movies
Using a book corpus alongside Wikipedia changes the distribution of language available during missing-word training. Stronger regularization changes the flexibility of the fit to the labeled pairs. Both can matter to accuracy because the classifier's inputs and its coefficients come from separate training procedures. The post-evaluation score reports their joint outcome. The paper gives no matched test result for the combined corpus with the original regularization setting, or for the Wikipedia-only corpus with just the stronger setting. There is therefore no individual effect size to associate with either change.
What the ablations show
The vector choice helps under a shared scoring rule
The clearest comparison about representation uses cosine similarity for both kinds of vectors. Predictor vectors reach 59.1% test accuracy and the first-layer states reach 54.9%. The paper reports the difference as 4.2% on the test set. Both configurations draw their vectors from the same Wikipedia-trained network. Both use the same kind of comparison, so the result supports the practical choice to take the vector that feeds the word prediction layer for this task. The development scores show the same ordering under cosine similarity.
What the comparison isolates is the extraction procedure as a whole. It changes where in the sentence the states come from and which layer provides them. The predictor vector uses second-layer outputs from before and after the focus, while the hidden variant uses first-layer outputs at the focus. It also changes access to the focus token, because the first-layer states at the word incorporate it into the recurrent computation and the prediction vector excludes it at that position. Any of these features could contribute to the accuracy difference. The experiment establishes the value of the chosen extraction recipe in this network. A comparison that changed only layer depth or only the inclusion of the focus token would answer a narrower question.
The result is compatible with the rationale for the method. A vector created to support a joint prediction of a hidden word is shaped by what the surrounding sentence makes plausible. When two uses call for different interpretations of the focus word, their contexts can contain different cues, and the vectors offer a way to compare those cues. The experiment evaluates that relationship through WiC answers. Its accuracy does not reveal a particular coordinate that corresponds to a sense, or tell us whether specific pairs were solved through semantic information versus other regularities that happen to align with the benchmark labels.
The fact that first-layer states with cosine do worse in the authors' network than in ELMo 1 further qualifies the extraction result. The internal ablation concerns how best to use the states available from this jointly trained predictor. The external comparison shows that the same broad readout recipe has different accuracy when the states come from the baseline network. It leaves room for a different balance between the usefulness of each layer and the usefulness of prediction states in another recurrent architecture or after a different training objective.
The benefit of learned weights depends on their inputs
The paper compares the weighted and unweighted dot products with the representation fixed to the predictor vectors. The weighted score was worth 7.2% over the unweighted score on the development split, in the paper's terms. On the test split the reported improvement was 2.1%. The direction of the effect remains favorable. Its size makes it reasonable to ask how much of the development advantage reflects patterns that a classifier can learn from labeled data and then rely on across splits. The authors interpret the smaller test gain as evidence suggestive of some overfitting.
The classifier can improve when the learned coefficients favor dimensions useful to the WiC labels. To see why it might fit the development split especially well, consider what each supervised feature encodes. A feature is high or low according to the product of two context-vector entries, with no direct statement that the entry tracks sense. If patterns in the training and development pairs coincide, a coefficient can reward a pattern that predicts the label well in both. That correlation can be weaker among the test pairs. Regularization constrains the weights, but the development split also supplies the evidence for which constraint to choose. The authors suggest that training and development examples may resemble each other more than training and test examples do, drawing on a possibility raised by the benchmark paper.
Comparison with cosine gives a related view of how the learned product score behaves. Cosine and the ordinary dot product have the same accuracy on the test split with predictor vectors, and the learned weights improve over that common score. On the development split, the unweighted alternatives are close to each other and farther from the weighted result. That pattern supports the usefulness of supervised weighting in the submitted representation, with an important qualification about the size of the development gain. It does not establish that the learned score orders pairs the same way as cosine, or that it repairs the same errors that cosine makes.
The hidden-state comparison imposes a stronger qualification. With those states as input, the weighted dot product trails cosine on both splits. The test chart accordingly shows the weighted function in both the highest and the lowest scoring combinations from the shared run. The results support a pairing between a representation and a metric. A change in score that helps with the vector used for predicting a missing word can have a different effect when the features come from a first-layer state at the observed word. The authors provide no feature analysis that identifies why the difference occurs.
The available rows also determine which claims are possible about this interaction. The study reports an unweighted dot product for predictor vectors and no corresponding hidden-state row. The comparison between weighted and unweighted products therefore directly measures the effect of adding weights for the predictor vectors. For hidden states, the comparison uses cosine as the alternative, so the change includes a different treatment of vector length. The findings show where the weighted score performed well among the tested configurations. A decomposition of weighting and normalization for both types of state would require more configurations than the paper evaluates.
The training choices are evaluated as a package
The competition system changes how inputs are represented, where the training text comes from, and how the two directions are trained, along with its choices for extraction and scoring. The shared-run experiments hold the language predictor fixed, which is what makes them useful for the latter two questions. There is no corresponding matched pair of results that varies joint directional training while keeping the corpus, input representation, and readout fixed. Joint training is part of the successful setup, and the score of that setup does not tell us how much accuracy to attribute to joint training alone.
This distinction matters because the paper gives a concrete mechanism by which joint training might help. The two context states contribute to prediction of the same held-out word, so they are optimized to be used together. This supplies a reason for extracting them as a pair later. The test results then show that prediction vectors built from those states work well relative to the available alternatives. The mechanism and the comparison are both informative, while a specific claim about the advantage of joint over separate training would require an experiment organized around that difference.
Likewise, the comparison with ELMo 1 using the baseline-style readout gives the authors a way to diagnose the network as a possible source of additional gains. It shows weaker performance for the authors' network under that readout, despite their stronger full submission. This is consistent with their suggestion that improved training or implementation could increase the quality of the vectors. The comparison does not identify which corpus, input, or architectural change accounts for the baseline-style gap. The post-evaluation submission provides another outcome after changing the available text and the fit of the comparison function simultaneously. It offers evidence for the combined revision, while leaving the sources of the gain unresolved.
Limitations
Limits the authors identify
The authors emphasize that their selected vector depends on the words around the focus position. Because each directional state ends before the reader reaches the target in its respective pass, the classifier gets no direct encoding of the focus token. The target serves as an address telling the system where to extract the vector. It cannot contribute its lexical identity to the score. The paper suggests that a method with access to information about the target itself could make better decisions, and the authors say they did not find a convincing way to incorporate that information.
There is a practical difference between inferring what could fill a slot and evaluating what a particular word means in that slot. The predictor learns to support the former. Two contexts can provide similar evidence about plausible words, and the known target could still help adjudicate which interpretation is relevant. An approach that uses target information would need to preserve the useful contextual differences while deciding what the word itself adds. The authors' results demonstrate that context is sufficient for many of the decisions in their evaluation. They leave unanswered how frequently the missing lexical information accounts for misclassifications.
The paper also identifies inflection as a potential source of false negatives. In morphology, inflection is the variation in word form associated with grammatical features. The paper's break and breaks example illustrates the issue. The contexts can set up expectations for different forms of the same word even when the meaning agrees. If entries of the prediction vectors encode information about such grammatical demands, an overall comparison can penalize the contrast and push the answer towards different senses. The authors mention tense and plurality as kinds of information that could have this effect.
They give two possible ways to address the problem. A weighted comparison can learn to give little influence to dimensions whose differences are associated with variation in form. That is a possibility afforded by the feature weighting, and the paper does not report a measurement of how much it happens in the fitted classifier. The authors also suggest preprocessing the corpus and WiC examples to strip away inflection. Doing so would change both what the network has to predict and the contexts from which it obtains its vectors. The proposal remains future work in the paper, so the experiments provide no accuracy estimate for it or evidence about which grammatical cues such a change might remove.
Limits visible in the evaluation
The task measures correctness for a particular set of sentence pairs. Aggregate accuracy gives each pair an outcome, so it cannot answer which kinds of usage the score handles well. The report does not break the test results down by matching versus differing forms, by distinct focus words, or by the kinds of semantic distinction involved. Those breakdowns would be needed to connect the aggregate gain to the authors' mechanism for inflection or to any specific group of meaning contrasts. On the evidence available, the safest interpretation is that the method improves the overall pair decision for the tested configurations.
The comparison with the baseline is also narrower than a claim about contextual representation in general. The ELMo 1 result is a reported benchmark baseline, and the authors' experiments compare a selection of ways to use states in their own recurrent predictor. The paper does not establish a preferred extraction rule for all contextual systems. Even within the tested network, the comparison between prediction states and at-target hidden states changes several details. A general conclusion about ignoring the focus word would need to distinguish the effect of that decision from the locations and layers from which the vectors were drawn.
All the rows comparing scoring and extraction use the same Wikipedia training run. That common source is valuable for investigating architectural choices at inference. It leaves the sensitivity of the comparisons to separately trained networks unmeasured. The paper reports no variability across repeated training runs or uncertainty estimates for the accuracy values. Its results support the observed ordering and the observed improvements under the reported conditions. They give no estimate of how consistently a retrained system would produce the same ordering, especially where scores are close.
There are also limits to how literally to read the word similarity in the weighted comparison. The learned score says how the products of contextual features contribute to a binary label. The paper gives an interpretation in which some entries contain more information relevant to human judgments of word sense. A weight on its own does not tell the reader what linguistic information the corresponding entry carries. Evidence about that would require an analysis of the states or of their behavior on selected examples. The accuracy comparisons show the advantage of the weighting in one representation and split configuration at a time.
Finally, the relation between development and test performance exposes a limit of tuning against this evaluation setup. The authors chose regularization on development data, and the learned score's improvement was substantially smaller on the test set. That observation is consistent with overfitting, but the paper's suggestion about resemblance across splits is an explanation for the pattern, not a direct measurement of their similarity. Stronger regularization appears in the higher-scoring later submission together with additional training text. Without a separate comparison of the settings, the higher score cannot establish that stronger regularization corrected the source of the development-to-test discrepancy.
What came after
The documented follow-up is the authors' own post-evaluation submission, which combined training on Wikipedia and BookCorpus with a more strongly regularized comparison. It extended the original approach while keeping the WiC decision centered on the two contexts. No subsequent study is documented as carrying the method forward. The authors left the use of the focus word itself and the treatment of inflection as open directions.
Cite
Cite as Alan Ansell, Felipe Bravo-Marquez and Bernhard Pfahringer. 2019. An ELMo-inspired approach to SemDeep-5's Word-in-Context task. Proceedings of the 5th Workshop on Semantic Deep Learning (SemDeep-5).
@inproceedings{ansell2019elmo,
title = {{An ELMo-inspired approach to SemDeep-5's Word-in-Context task}},
author = {Alan Ansell, Felipe Bravo-Marquez and Bernhard Pfahringer},
booktitle = {Proceedings of the 5th Workshop on Semantic Deep Learning (SemDeep-5)},
year = {2019},
url = {https://aclanthology.org/W19-5804/}
}This page in Markdown https://md.research.elamur.ai/free/en/papers/ansell-2019-elmo-inspired-approach-semdeep-5/