Elamur Research

MelBERT: Metaphor Detection via Contextualized Late Interaction using Metaphorical Identification Theories

Paper · 2021 · Minjin Choi, Sunkyung Lee, Eunseong Choi et al.

Summary

A word can be familiar even when the sense it carries in a sentence is unexpected. When a speaker talks about hope and a horizon, the horizon evokes what may lie ahead. The same word can also refer to the visible boundary in a landscape. MelBERT addresses the task of identifying which use a word has in a particular sentence. That judgment matters for applications such as translation and sentiment analysis, where a reading that follows the physical meaning too closely can miss what the speaker is communicating. The paper tests whether a detector improves when its design reflects how people identify metaphorical language.

The authors build the detector around two kinds of evidence. The Metaphor Identification Procedure motivates a comparison between the word as it is used in the sentence and the same word presented alone. Selectional Preference Violation motivates a comparison between the word in context and a representation of the surrounding sentence. For the paper’s example involving the twisting of someone’s words, the first comparison concerns the shift from physically changing a shape to distorting a message. The second concerns the unusual combination of an action associated with changing shape and an object made of language. MelBERT uses RoBERTa to represent the inputs, keeping the sentence and the isolated word separate during encoding. It then learns how to use the comparisons to assign a metaphor score. The authors call this arrangement late interaction. RoBERTa

Without combining multiple trained detectors, MelBERT reaches test F1 scores of 78.5 on VUA-18, 75.7 on its verb benchmark, and 72.3 on VUA-20. Each score leads the corresponding comparison among individual detectors. Combining trained versions of MelBERT further improves F1 on the two full VUA test sets, though its combined variant narrowly trails the comparable DeepMet variant on the verb benchmark. When trained on VUA-20 and tested directly on other collections, MelBERT leads on MOH-X with an F1 of 79.2. On TroFi it scores 62.0, behind the simpler joint-encoding RoBERTa baseline at 62.9.

Removing either comparison lowers F1 on both full VUA test sets. The larger loss comes from removing the isolated-word comparison, but examples of personification illustrate why the sentence comparison can still help. The experiments support using the two cues together for word-level detection. They also show the limits of that judgment. An unusual word can still be literal, an isolated word may have several plausible senses, and the complete detector can miss implicit or borderline cases.

Deep dive: MelBERT: Metaphor Detection via Contextualized Late Interaction using Metaphorical Identification Theories

MelBERT detects metaphorical word use by comparing a word in context with the same word in isolation and with its surrounding sentence. · about 38 minutes to read

The problem and its context

The judgment concerns a particular use

Metaphor detection starts with an distinction between a word and an occurrence of that word. A vocabulary entry for horizon could describe physical visibility and also record ways of talking about prospects. A detector still has to decide what an occurrence means in the passage in front of it. Listing words that sometimes have figurative readings would flag the physical uses along with the figurative ones. A detector that merely checks whether a sentence contains a metaphor would face a different problem. It might recognize figurative language somewhere in the sentence while leaving its location unresolved. MelBERT takes a sentence and a designated occurrence and assigns a label to that occurrence. The distinction between a word’s possible senses and its meaning in use is a question of lexical semantics.

The paper treats metaphor as a way of using language associated with one concept to convey another. Its examples are everyday enough that a reader can frequently follow them without pausing over the shift. A complaint about someone twisting words concerns what happened to a message, even though the same verb can describe a change in the shape of an object. The ease with which a reader makes that connection is part of the computational difficulty. The sentence offers a familiar verb and a familiar noun, and the figurative reading depends on what each contributes to the combination.

The authors motivate the task through applications that depend on contextual meaning. In machine translation, the intended reading affects what the translation should convey. In sentiment analysis, a figurative phrase can carry an attitude that a reading of its component words would miss. In dialogue systems, the meaning relevant to a response can likewise depend on taking the expression figuratively. These are reasons to identify metaphors. The paper’s own evaluation concerns agreement with metaphor annotations at the word level.

A sentence can also offer evidence for several labeling decisions. A figurative expression may span more than the designated word, or two separate expressions may appear together. The authors distinguish classification of a designated occurrence from sequence labeling, which assigns labels across a sentence. MelBERT is built for the classification task. A system can apply it successively to different positions to obtain labels across a sentence. Each score still answers a question about a specified target. This distinction matters because a sentence that already contains figurative material presents a different backdrop for deciding whether another word is metaphorical.

The two linguistic comparisons

The Metaphor Identification Procedure, abbreviated MIP, directs attention to the relationship between the meaning a word has in a passage and a more basic meaning associated with it. In the example about twisting words, the contextual reading concerns distortion of intended meaning, while the physical reading involves bending or changing shape. The senses differ, and the physical change offers a way to understand what happened to the message. MelBERT borrows the idea of comparing the word across these two conditions. The distinction between a basic meaning and a contextual one belongs to the linguistic procedure. The architecture has to find a numerical counterpart that it can learn from examples.

Selectional Preference Violation, abbreviated SPV, shifts the comparison to a word and its linguistic surroundings. Words tend to occur with particular kinds of partners. In the twisting example, words spoken by a person are an unusual thing to treat as an object that can be bent out of shape. That pairing offers evidence about the reading. The detector’s design draws on this observation by asking how the representation of the target relates to a representation of the sentence containing it.

These comparisons can converge on the same word for different reasons. MIP draws attention to how the target’s meaning changes across the contextual and basic readings. SPV draws attention to the kinds of words that appear with the target. An occurrence can present stronger evidence under one comparison than under the other. In personification, for instance, a word can retain much of its ordinary meaning while being applied to something with which it would ordinarily be unexpected. Conversely, when several words take part in a figurative expression, they can make sense together inside that expression. The surrounding words may then offer a weak signal that any particular member of the group is unusual. The authors use both comparisons because either can leave a case unresolved.

From hand-built features to contextual representations

The paper groups earlier detection work by the way it represents words and contexts. Feature-based approaches describe words through properties chosen in advance. Abstractness and concreteness supply one such distinction. A word associated with physical action can have an abstract reading in the right context, so information about concreteness can contribute evidence. Other work used imageability, broad semantic categories known as supersenses, or norms describing properties associated with words. Such features offer recognizable linguistic signals. Their coverage depends on the resources used to create them, which the authors identify as a difficulty for rare metaphorical uses. Literal and Metaphorical Sense Identification through Concrete and Abstract Context

Some earlier work sought broader coverage through distributional evidence. Distributional features draw on the contexts in which words occur. They can be sparse, with information represented across separate features, or dense, with a word represented by a vector of learned values. The latter are frequently called word embeddings. Work on metaphor identification also used verb and noun clustering to exploit regularities in how words appear together. These approaches expanded the range of evidence available beyond manually assigned properties. A representation associated with a word type still leaves the detector with the problem of deciding which of its uses is present in a particular sentence. Metaphor Identification Using Verb and Noun Clustering and word embeddings

Recurrent approaches incorporated the sequence itself. A bidirectional long short-term memory network, or BiLSTM, processes a word sequence in both directions so that a representation can reflect information from either side of a target. Wu and colleagues combined this kind of encoder with a convolutional network and supplied information such as word clusters and grammatical categories. Gao and colleagues used a BiLSTM with GloVe and ELMo inputs. GloVe provides word representations, while ELMo’s representations take the context of a word into account. Using contextual representations as an input gives the recurrent network more information to work with. It still leaves the recurrent network in charge of the main sequence processing for the task. GloVe and ELMo

The use of metaphor theory in a neural detector also predates MelBERT. Mao and colleagues adapted the recurrent architecture to incorporate MIP and SPV. Their approaches included a comparison between an input representation and a contextual hidden state, and an attention mechanism that gathered evidence from words within a window. MelBERT takes up the same broad question with a different source of contextual representations and a different point at which the relevant representations are brought together. Its contribution depends on that design choice as well as on which metaphor cues it uses.

The authors also situate MelBERT among detectors that build directly on pretrained contextual encoders. DeepMet uses RoBERTa together with information about broader and local context and grammatical categories. IlliniMet combines RoBERTa with linguistic information from external resources. Chen and colleagues used a multitask approach. These systems already had access to context-sensitive representations and linguistic information. The open design question was how to organize the different readings of the target so that the classifier could compare them directly. The shared-task work documents the setting in which several of these approaches were compared. A Report on the 2020 VUA and TOEFL Metaphor Detection Shared Task

What late interaction takes from retrieval

The authors look to semantic matching for a way to structure the comparison. In retrieval, a system can encode a search query and a document together. A joint input lets the encoder account for relationships across the query and the document while building their representations. Another approach encodes each input independently and compares the resulting representations later. Sentence-BERT and ColBERT are examples the paper discusses in connection with this latter arrangement. MelBERT adapts the placement of the comparison to a different task. Its inputs are a sentence and a target word, and the resulting score concerns metaphoricity. Sentence-BERT, ColBERT, and information retrieval and search

The choice has a particular consequence for metaphor detection. If the separately supplied target and the sentence are jointly encoded, the target can receive information from the sentence before a comparison takes place. Separate encoding keeps the isolated-word input free of that sentence’s context. Meanwhile, the occurrence inside the sentence can still interact with the words around it. The two representations therefore reach the comparison stage having seen deliberately different input. That difference is what makes the retrieval architecture relevant to MIP.

The paper also gives practical reasons to consider the separation. Joint encoding allows many interactions, some of which the authors expect to be unnecessary for the task. Independent encoding makes reuse possible in principle, since comparisons can be performed after a sentence representation has been obtained. The central reason for using it here is the opportunity to preserve the word’s isolation until the detector has a contextual representation to compare it with.

The method, step by step

From the sentence to a metaphor score

MelBERT receives a sentence with an indicated target. Imagine the occurrence of twist in the complaint about someone’s words. One input contains the full sentence and identifies the occurrence under consideration. The other contains twist on its own, with the special markers required by the encoder. On the sentence side, the system reads out a vector for the whole sentence and a vector at the location of the target. On the isolated side, it extracts a representation of the target from an input that has no surrounding sentence. A vector here is a collection of learned numerical features that later parts of the detector can use together.

The authors refer to this arrangement as a siamese architecture. Its two sides use the same kind of contextual encoder to process separate inputs. MelBERT uses RoBERTa as its backbone, even though the name refers to the BERT family. This choice lets the detector use pretrained representations while controlling what context is available when it constructs each representation. Contextualization occurs within the sentence input. The first point at which information from the isolated input can meet information from the sentence input is the later comparison stage. BERT

The detector builds two pairs out of the three readouts. One pair places the contextual and isolated target vectors side by side. The other places the sentence vector beside the contextual target vector. A small neural layer processes each pair. The resulting features are then brought together to produce a score for the metaphor label. The first comparison can draw evidence from how a target is represented with and without context. The second can draw evidence from how the target is represented relative to the whole input containing it.

How MelBERT scores a target word

The steps in order.

How MelBERT scores a target wordStep 1: Mark the target and its local context1. Mark the target and its local contextStep 2: Encode the full sentence2. Encode the full sentenceStep 3: Encode the target in isolation3. Encode the target in isolationStep 4: Compare contextual and isolated target representations4. Compare contextual and isolated target representationsStep 5: Compare the contextual target with the sentence5. Compare the contextual target with the sentenceStep 6: Combine the comparisons into a metaphor score6. Combine the comparisons into a metaphor score

Preparing the sentence and the isolated word

The unit that receives a label is a word, but the encoder may process a word as several pieces. MelBERT uses a version of byte-pair encoding, which represents an input as tokens that can include parts of words. This is a form of subword tokenization. When byte-pair encoding splits a target into multiple tokens, the architecture figure specifies averaging their representations to obtain a target vector. The downstream layers can then work with a single target representation regardless of how many pieces the tokenizer produced.

On the sentence side, the input provides information about the identity, position, and segment membership of tokens. A token embedding represents the token itself. A position embedding supplies information about where it occurs. Segment embeddings identify the target and its local context, denoted [TAR] and [LOC] in the paper. Together these signals tell the encoder which occurrence to classify and which part of the sentence is locally relevant. This is useful even if the spelling would allow a reader to find the target, since the same word can appear in more than one place or play different roles.

The authors use commas as a simple way to delimit the local context in a sentence with multiple clauses. The clause that contains the target serves as the local context. The sentence input still includes the broader sentence. A marker for the local clause and the presence of the whole sentence therefore provide different information. The marker singles out a region around the target, while the rest of the sentence can contribute to the contextual representation. The delimiter is a practical approximation to a clause boundary.

The sentence begins with the classification token [CLS] and uses [SEP] to mark the end of the sentence text. The authors append a tag identifying the target’s grammatical category after [SEP], following a feature used by DeepMet. A part-of-speech tag can indicate that the occurrence is, for instance, a verb or a noun. It gives the encoder a cue about the role this particular occurrence plays. The input combines token, position, and segment embeddings by adding corresponding values in their vectors. The grammatical tag is part of the input sequence described by the authors. Part-of-speech tagging

The isolated input is also tokenized using byte-pair encoding. Its sequence contains the target between the special markers. The paper specifies that position and segment embeddings are omitted on this side. The isolated encoder thus has a far narrower view of the target than the sentence encoder has. Its output can reflect associations acquired during pretraining and subsequently adjusted during task training. Its immediate input offers no sentence, clause, or grammatical tag from which to resolve the reading in the specific occurrence.

What the encoders return

The architecture uses a Transformer encoder. Attention within the sentence allows a token’s representation to reflect other positions in that input. This makes the position of the target a readout of its use with its surroundings. The vector at [CLS] serves a different purpose. It is the readout used for the sentence as a whole. Both vectors are contextual, since both come from the same encoded input. The difference is what position each is read from and what role it has in the downstream comparisons.

The paper gives the sentence encoding in compact form.

v_S, v_S,1, …, v_S,n = Enc([CLS], w₁, …, wₙ, [SEP])

Here S is the input sentence and n is its number of words. The symbols w₁ through wₙ denote the words in their original order, and … stands for the intervening positions. Enc is the encoder applied to the sequence on its right. [CLS] is the leading classification marker and [SEP] is the separation marker. v_S is the output vector at [CLS]. v_S,1 through v_S,n are the contextual output vectors associated with the words, with the second subscript identifying each word’s position. The equals sign associates these readouts with the encoding operation. The equation shows the main text sequence, while the input description supplies the target and local-context markings and the appended grammatical tag.

The paper represents the encoding on the isolated side as follows.

v_t = Enc([CLS], wₜ, [SEP])

Here t is the position of the designated target in the original sentence, and wₜ is the word at that position. The position index identifies which word was selected from that sentence. Enc operates on the isolated sequence between the [CLS] classification and [SEP] separation markers, and v_t is the resulting isolated target vector. The equals sign assigns that output to the symbol on the left. The sentence-side vector for the same occurrence is v_S,t, the word readout indexed by t among the outputs of the first equation.

The distinction between v_t and v_S,t is central to the method. If twist is the target, v_t comes from an isolated input containing that word. The sentence-side vector comes from an occurrence whose representation can reflect the presence of words as the thing being twisted. The detector uses v_t as a proxy for the word’s basic meaning when it applies the idea behind MIP. An isolated word can support more than one reading, so the proxy has to be understood as a representation learned from the available input, with no explicit choice of a dictionary sense.

Learning the two comparisons

On the MIP side, MelBERT concatenates the contextual and isolated target vectors. Concatenation places every value from one vector alongside the values from the other. A neural layer then learns which features of the pair matter for the label.

h_MIP = f([v_S,t ; v_t])

Here h_MIP is the hidden vector produced for the Metaphor Identification Procedure branch. f is its multilayer perceptron function. A multilayer perceptron is a learned transformation that maps the input features to a new representation. The square brackets enclose the pair and the semicolon inside them denotes concatenation. v_S,t is the contextual vector for the target at position t of sentence S, and v_t is the vector for that target encoded in isolation. The equals sign defines the result of applying f. The output is a column vector of h values, where h denotes the branch’s hidden size.

The paper describes this branch as learning a semantic gap. The formula makes clear how it can do so. The two inputs are available to the learned function in full. There is no prescribed distance calculation whose value determines the label. Different dimensions or combinations of dimensions can have different relevance, and the function learns its transformation through the classification objective. This flexibility fits a contrast that can take different forms across words. It also means that the resulting hidden vector has the status of a learned feature representation.

The SPV side uses the vector for the full sentence and the contextual target vector. These come from the same encoder pass over the sentence. The assumption is that the readout from the target can relate to the whole-sentence readout in a way that helps distinguish metaphorical uses.

h_SPV = g([v_S ; v_S,t])

Here h_SPV is the hidden vector for the Selectional Preference Violation branch. g is the branch’s multilayer perceptron function, with a separate role from f. The bracketed expression gives the two vectors in order, and the semicolon denotes concatenation. v_S is the sentence readout from [CLS], and v_S,t is the contextual readout for the target at position t in sentence S. The equals sign defines the hidden vector as the output of g. Like the MIP hidden vector, this output is a column of h values.

The SPV branch uses the sentence embedding as a broad summary of the setting in which the target appears. The target itself contributes to that summary. The word-position readout also incorporates surrounding words through attention. The two vectors can still reflect different aspects of the input because one comes from the sentence’s classification position and the other comes from the target position. MelBERT relies on that distinction as a way to approximate contextual fit. The architecture has no separate rule in this branch that declares which verb can ordinarily take which noun as an object.

The branches share the contextual target readout. As a consequence, a sentence that gives the encoder a strong signal about the target’s use can affect both comparisons. The branches differ in the other vector they receive. One has access to evidence from viewing the same word in isolation. The other has access to the overall sentence readout. This arrangement makes it possible to remove one pair of inputs and examine what is lost, which is the basis of the paper’s ablation.

Turning the comparisons into a prediction

After obtaining both hidden vectors, MelBERT joins them and applies a learned weight and bias. A sigmoid converts the resulting scalar to a score between the endpoints used for the two labels.

ŷ = σ(Wᵀ[h_MIP ; h_SPV] + b)

Here ŷ is the predicted score for the metaphorical label. σ denotes the sigmoid function. h_MIP and h_SPV are the outputs of the two branches. The bracketed expression and its semicolon indicate concatenation in that order. W is a learned column of 2h weights, since each branch supplies h hidden values. The superscript ᵀ denotes transposition so that Wᵀ multiplies the concatenated column to produce a scalar. The plus sign adds the learned scalar bias b, and the equals sign defines ŷ as the sigmoid of the result.

The scalar measures the detector’s preference for the positive label. The paper defines the hard classification as 1 for a metaphorical target and 0 for a literal target. The two branch vectors contribute to the same decision. There is no separate training label that says whether a particular prediction should rely on the MIP cue or the SPV cue. The annotated target label provides the feedback that trains the complete decision.

For training, the paper gives the following expression under its description of binary cross-entropy.

L = ∑ᵢ₌₁ᴺ [yᵢ log(ŷᵢ) + (1 − yᵢ) log(1 − ŷᵢ)]

Here L is the objective as written, N is the number of training examples, and ∑ᵢ₌₁ᴺ sums the bracketed terms for instance index i from 1 through N. The true label for instance i is yᵢ, and the predicted metaphor score is ŷᵢ. log denotes the logarithm. Juxtaposition multiplies each logarithm by its label factor, the minus signs form the complementary quantities, and the plus sign adds the two class terms. The square brackets group the contribution of an example, and the equals sign defines L. For a metaphorical label the term weighted by yᵢ supplies that example’s contribution. For a literal label the term weighted by 1 − yᵢ supplies it. With the sign shown, the expression is a log-likelihood to maximize. Minimizing binary cross-entropy corresponds to minimizing its negative. The paper calls the expression a loss and prints it with the sign shown above.

Training and combining detectors

The trainable architecture starts from pretrained RoBERTa. The configuration reported in the paper has 12 layers, 12 attention heads per layer, and a hidden-state size of 768. Layers successively transform the sequence representations. Attention heads allow a layer to use different learned patterns of interaction among positions. The hidden-state size is the number of values available in each representation at that stage. These are backbone settings. The MIP and SPV projections downstream have their own hidden vectors, described symbolically in the method.

The authors use a batch size of 32 and a maximum sequence length of 150. A batch groups training examples for an update. The maximum length sets the sequence budget in the experiment. Training runs for three epochs, or passes through the training data, using the Adam optimizer. The learning rate controls the size of parameter updates. During epochs one and two, it increases from 0 to 3e-5, then decreases at a constant rate over the final epoch. The dropout ratio is 0.2. Dropout suppresses a portion of the activations during training so the learned decision can rely on combinations of features.

The contextual systems are tuned using F1 on the VUA-18 validation split. This gives the authors a criterion for choosing settings before evaluating the held-out test results. They average their experimental results over five runs with different random seeds. The seed can affect elements such as initialization and training order, so averaging reduces dependence on a single run. A reported score is therefore a result for the specified evaluation procedure, including the averaging, instead of a description of a single training trajectory.

A separate comparison concerns bagging. The authors train multiple instances in a 10-fold cross-validation process and aggregate their predictions. The resulting versions carry the suffix -CV. Both MelBERT and DeepMet are evaluated with and without that procedure. The authors use bagging for the paired comparison and omit an additional ensemble technique used in the original DeepMet system. This keeps the individual-detector comparison distinct from the question of what happens when predictions are combined. The paper reports a PyTorch implementation and releases the MelBERT source code.

Experiments and results

The datasets and what each split measures

The main benchmarks come from the VU Amsterdam Metaphor Corpus, called VUA in the paper. Its shared-task versions are VUA-18 and VUA-20. VUA-18 has a training split, a validation split, and a test split. The training split contains 116,622 tokens with 11.2 percent marked metaphorical. The validation split has 38,628 tokens, of which 11.6 percent are marked metaphorical. The test split has 50,175 tokens and a metaphor share of 12.4 percent. The training labels supply the learning signal, the validation labels can guide the choice of settings, and the test labels are used to measure the resulting detector. A Report on the 2018 VUA Metaphor Detection Shared Task

VUA-20 extends the VUA-18 data. The authors describe its training material as incorporating the earlier training and validation material and its test material as including the earlier test material. VUA-20 also selects which tokens enter the classification task because so many tokens are literal. Therefore, the relationship between the sets of passages and the relationship between the sets of scored targets are different. The VUA-20 training split contains 160,154 tokens and a metaphor share of 12.0 percent. Its test split contains 22,196 tokens with a metaphor share of 17.9 percent. The higher metaphor share in this test split accompanies a different target selection. A score across the two editions reflects performance on their respective evaluation sets.

VUA covers several genres and grammatical categories. The VUA-18 test set includes academic writing, fiction, news, and conversation. Its annotations allow the authors to inspect performance on verbs, adjectives, adverbs, and nouns. These divisions give different views of the same benchmark. The genre analysis asks whether results vary with the type of text. The grammatical analysis asks whether they vary with the role of the target word. The separate VUA-Verb test benchmark restricts evaluation to verbs and contains 5,873 target tokens. Its aggregate result is reported separately from the verb category in the VUA-18 grammatical breakdown.

MOH-X and TroFi provide the transfer setting. MOH-X uses examples taken from WordNet sentences, while TroFi draws sentences from a Wall Street Journal corpus. Both have verb targets. The share of metaphorical examples reported for MOH-X is 48.7 percent. For TroFi it is 43.5 percent. Those shares and the restriction to verbs make the evaluation settings different from full VUA, which supplies annotations across grammatical categories and includes a larger proportion of literal uses. The authors reserve both additional datasets for testing. A detector trained on VUA-20 is evaluated on their labels without training on those collections. Metaphor as a Medium for Emotion

The comparisons and the measures

The recurrent comparisons make it possible to distinguish types of context use. RNN_ELMo and RNN_BERT join GloVe representations with contextual embeddings from ELMo or BERT and pass them through a BiLSTM. The contextual information enters as a feature for a recurrent backbone. RNN_HG and RNN_MHCA are the theory-informed recurrent alternatives. RNN_HG compares an input word embedding with the word’s contextual hidden state. RNN_MHCA uses attention over a window to obtain a contextual feature. Together these comparisons show how MelBERT fares against recurrent systems that already have ways of incorporating contextual information or linguistic motivation.

The RoBERTa comparisons ask more directly about the role of the architecture. RoBERTa_BASE jointly encodes the sentence and the separately supplied target, allowing all-to-all interaction between the two inputs. RoBERTa_SEQ takes the sentence with the target marked and predicts from the representation at that position. It thus gives a point of comparison for what can be learned from the contextual target in the sentence alone. DeepMet adds global and local context and grammatical features, including more fine-grained tags. It won the VUA 2020 shared task and serves as a strong comparison with its own use of RoBERTa and linguistic information.

The positive class is a metaphorical use. Precision asks what share of the occurrences flagged by a detector are annotated as metaphorical. Recall asks what share of the annotated metaphors it flags. F1 combines precision and recall using their harmonic mean, which makes the aggregate sensitive to a weak value on either measure. This matters when literal uses are more common. A detector that predicts literal for many occurrences can agree with many labels while discovering few of the metaphorical uses. Reporting both components of F1 shows whether a detector’s aggregate reflects selective predictions, broad coverage, or a more even balance.

Results on the VUA benchmarks

On the VUA-18 test set, the individual MelBERT detector achieves F1 of 78.5. RoBERTa_SEQ scores 77.5, RoBERTa_BASE scores 77.1, and DeepMet scores 76.3. The recurrent comparisons in the same table are lower. RNN_MHCA is the strongest of those on test F1 with 74.3, followed by RNN_HG with 74.0. RNN_ELMo scores 72.6 and RNN_BERT scores 71.7. Within this experiment, using BERT or ELMo as input features to a recurrent network yields a different result from making the pretrained contextual encoder the backbone of the detector.

Individual detectors on the VUA-18 test set by F1

MelBERT leads the contextual comparisons on the full test set.

Individual detectors on the VUA-18 test set by F1DeepMet: 76.3DeepMet76.3RoBERTa_BASE: 77.1RoBERTa_BASE77.1RoBERTa_SEQ: 77.5RoBERTa_SEQ77.5MelBERT (this paper): 78.5MelBERT (this paper)78.5
The numbers
System or settingF1
DeepMet76.3
RoBERTa_BASE77.1
RoBERTa_SEQ77.5
MelBERT (this paper)78.5

The VUA-18 precision and recall figures show how MelBERT gets its aggregate. DeepMet has test precision of 82.0 and recall of 71.3. MelBERT has precision of 80.1 and recall of 76.9. MelBERT therefore identifies a larger share of the annotated metaphorical occurrences while DeepMet has a higher share of correct predictions among its positive calls. The comparison is useful because the F1 ranking alone leaves that distinction invisible. Bagged MelBERT-CV reaches test F1 of 79.8 with recall of 80.7, and bagged DeepMet-CV reaches F1 of 78.8 with recall of 80.2. The paper marks both the individual and bagged MelBERT F1 results on the full VUA-18 test set as significant in their respective comparisons.

On the VUA-20 test set, the individual MelBERT detector again has the highest F1 in its group at 72.3. Its test recall is 68.6. DeepMet’s individual test F1 is 70.9, with recall of 65.9. RoBERTa_SEQ has the highest precision among the individual detectors in the table at 76.9, with recall of 66.7 and F1 of 71.4. MelBERT’s test precision is 76.4. Its F1 lead accompanies higher recall than the other individual detectors in this comparison. The paper marks the individual MelBERT F1 result as significant on VUA-20. The criterion for starred significance in the paper’s comparison tables is p < 0.05 in a two-tailed t-test against the strongest competitor.

Individual detectors on the VUA-20 test set by F1

MelBERT has the highest F1 among the individual detectors shown.

Individual detectors on the VUA-20 test set by F1DeepMet: 70.9DeepMet70.9RoBERTa_BASE: 71.2RoBERTa_BASE71.2RoBERTa_SEQ: 71.4RoBERTa_SEQ71.4MelBERT (this paper): 72.3MelBERT (this paper)72.3
The numbers
System or settingF1
DeepMet70.9
RoBERTa_BASE71.2
RoBERTa_SEQ71.4
MelBERT (this paper)72.3

Bagging changes the VUA-20 precision and recall balance. MelBERT-CV obtains test recall of 73.7 and precision of 74.1, giving F1 of 73.9. DeepMet-CV reaches test recall of 73.2 and precision of 73.8, giving F1 of 73.5. Both combined systems raise recall compared with their individual counterparts on this split. For MelBERT, the aggregate from multiple training fits captures more annotated positives, accompanied by a lower precision than the individual version. This is a property of the reported combination and split, and the table allows it to be distinguished from the gains associated with changing the detector architecture.

On the VUA-Verb test benchmark, individual MelBERT leads with F1 of 75.7. Individual DeepMet scores 74.9, while RoBERTa_BASE reaches 74.7 and RoBERTa_SEQ reaches 74.2. The ranking between the two bagged systems differs. DeepMet-CV scores 77.2 and MelBERT-CV scores 77.1. MelBERT-CV has higher recall at 78.7, compared with 78.3 for DeepMet-CV. DeepMet-CV has higher precision at 76.2, compared with 75.5 for MelBERT-CV. Thus the F1 lead for individual MelBERT on the verb task does not extend to the bagged comparison there.

The results establish a consistent pattern among individual detectors within the three VUA comparisons. The size of the advantage depends on which baseline and split are used. The simpler all-to-all baseline is already competitive, and the sentence-only baseline also performs well. MelBERT’s result shows what the full package of explicit comparisons and target input features achieves under the reported training setup. The branch removals address a narrower question about whether the individual comparisons contribute to that package.

Transfer to MOH-X and TroFi

In the transfer experiment, the contextual detectors train on VUA-20 and are tested on MOH-X and TroFi. This is zero-shot transfer with respect to the destination datasets. The training procedure uses labeled metaphors from VUA-20, while the destination test labels provide the evaluation. The experiment asks how useful the learned decision is when applied to a different collection of English sentences, with targets restricted to verbs. Differences in the source of the sentences and the way targets enter the evaluation are part of what the detector encounters at transfer time.

On the MOH-X test set, MelBERT scores 79.2 F1. The next highest F1 is 78.7 from RoBERTa_SEQ. RoBERTa_BASE reaches 78.4, and DeepMet reaches 77.9. MelBERT has precision of 79.3 and recall of 79.7. RoBERTa_SEQ has higher precision, at 80.6, and RoBERTa_BASE has higher recall, at 80.1. MelBERT’s precision and recall together yield the highest F1 in this comparison. The result is evidence for transfer to this particular collection even though the destination annotations did not supply training examples.

The order changes on TroFi. RoBERTa_BASE leads with F1 of 62.9. MelBERT reaches 62.0, followed by DeepMet at 61.7 and RoBERTa_SEQ at 60.7. MelBERT’s test recall of 74.1 is higher than DeepMet’s 72.9, while its precision of 53.4 is lower than DeepMet’s 53.7. RoBERTa_BASE has both higher recall, at 74.3, and higher precision, at 54.6, than MelBERT. The paper notes that TroFi sentences are longer on average than MOH-X sentences and suggests their greater complexity as a reason the systems do worse there. The experiment changes the collection as a whole, so the scores show where transfer was more difficult without isolating sentence length as its cause.

Detectors trained on VUA-20 and tested on TroFi by F1

Jointly encoding the sentence and target gives the highest F1 in this transfer setting.

Detectors trained on VUA-20 and tested on TroFi by F1RoBERTa_SEQ: 60.7RoBERTa_SEQ60.7DeepMet: 61.7DeepMet61.7MelBERT (this paper): 62.0MelBERT (this paper)62.0RoBERTa_BASE: 62.9RoBERTa_BASE62.9
The numbers
System or settingF1
RoBERTa_SEQ60.7
DeepMet61.7
MelBERT (this paper)62.0
RoBERTa_BASE62.9

The DeepMet results here are for a detector retrained on VUA-20 under the transfer protocol. The paper distinguishes those scores from the original DeepMet study’s results when training and testing took place on the corresponding smaller datasets. A score reached with destination training data answers a question about learning within that collection. The scores here answer a question about taking what was learned elsewhere and applying it directly. The most useful comparison is between systems evaluated under the same transfer condition.

What the ablations show

What is lost when a branch is removed

An ablation tests the role of a component by removing it and measuring performance under the resulting configuration. Here the authors remove either the MIP branch or the SPV branch from MelBERT. Removing MIP leaves the contextual target and sentence comparison. Removing SPV leaves the comparison of the contextual target and its isolated counterpart. The paper reports these settings on the full VUA-18 and VUA-20 test sets, alongside the complete individual detector.

On VUA-18, the full detector scores F1 of 78.5. The version without MIP drops to 76.7. The version without SPV scores 77.9. The precision and recall results give more detail about the decline. The complete detector has precision of 80.1 and recall of 76.9. The detector without MIP has precision of 77.8 and recall of 75.8. The detector without SPV has precision of 79.5 and recall of 76.3. In this experiment, both individual comparisons leave some test performance unrealized, and the version that retains MIP comes closer to the full result.

On VUA-20, the complete detector reaches test F1 of 72.3. Removing MIP leaves F1 of 71.1. Removing SPV leaves F1 of 71.7. The full detector has precision of 76.4 and recall of 68.6. With MIP removed, precision is 74.7 and recall is 67.8. With SPV removed, precision is 74.9 and recall is 68.6. In the latter comparison, the reported recall is unchanged at the precision with which the table presents it, while the precision declines. The value of adding the sentence comparison therefore need not show up as finding a larger share of annotated metaphors. It can also show up as a change in how often a positive prediction is correct.

The same F1 ordering on both splits supports a narrow conclusion. The contrast between contextual and isolated target representations is the stronger of the two available branches when used alone under this procedure. The full detector nevertheless scores higher than either reduced version. This supports retaining information from both comparisons in MelBERT. The result is about these implementations of the cues. The MIP branch receives access to an isolated input, whereas the SPV branch compares two readouts from the sentence. Each removal takes away both a proposed linguistic comparison and the particular representation that made it possible.

The comparison against RoBERTa_BASE provides a broader check. That baseline jointly processes the sentence and the additional target, while MelBERT preserves an isolated view and introduces the two learned comparisons. The individual MelBERT result is higher on the VUA benchmarks. On TroFi, the joint encoder has the strongest result. Because the systems differ in how they construct and use their representations, the comparison concerns the combined architectures. The branch ablation offers more direct evidence for the contribution of each pair of inputs inside MelBERT.

What changes with genre and grammatical category

The VUA-18 genre analysis examines the behavior of the complete detector and the baselines on different kinds of text. MelBERT has the strongest reported F1 in academic writing at 83.9 and in fiction at 75.4. RoBERTa_BASE is close in academic writing at 83.6. In fiction, the nearest comparison in the table is RoBERTa_SEQ at 73.3. The two genre results arise under different patterns of precision and recall. On academic targets MelBERT has precision of 85.3 and recall of 82.5. In fiction it reports precision of 74.0 and recall of 76.8. The same system can therefore lead an F1 comparison with quite different balances between its two components.

In conversation, DeepMet leads the table at 71.4 F1 and MelBERT scores 70.9. In news, RoBERTa_SEQ leads with F1 of 77.9, while MelBERT and RoBERTa_BASE each report 77.2. A leading aggregate score on the full test set can coexist with different leaders in individual genres. The authors point to fragmented and colloquial expressions in conversation and to fictional names as sources of difficulty in parts of the benchmark. These are plausible reasons to inspect genre separately. The breakdown does not isolate those textual properties within the genres.

The grammatical breakdown shows the largest value of looking at the table alongside the paper’s general account. MelBERT has F1 of 75.1 on verbs, 74.6 on adverbs, and 70.7 on nouns in the VUA-18 test breakdown. Those are the highest values for their respective categories in that table. On adjectives, MelBERT scores 64.4, while RoBERTa_BASE scores 64.7. The table therefore qualifies the prose’s broader claim of a category-wide lead. MelBERT does exceed DeepMet on each reported grammatical category, including adjectives, for which DeepMet scores 63.3.

The noun results illustrate what the aggregate can hide. MelBERT’s noun precision is 75.4 and its recall is 66.5. RoBERTa_BASE has higher noun precision, at 77.5, and lower noun recall, at 60.4. Their noun F1 scores are 70.7 and 67.9, respectively. In this category MelBERT’s stronger aggregate is associated with better coverage of the annotated metaphors. The table does not identify which noun readings were recovered by each branch. The analysis is a breakdown by target category, while the ablation removes a component across the test set. Those are complementary views of the evidence.

What the example errors reveal

The paper examines selected cases from VUA-20 using the original metaphor annotation guidelines as a point of reference. Its examples compare the full detector with versions that lack a branch. This makes it possible to ask what kind of evidence would be missing in a particular case. The authors associate removal of MIP with failures on common words that can be used in several senses. They mention go and feel. A familiar word can occur across many settings, so the sentence comparison alone can leave a shift in the target’s meaning hard to detect. The isolated comparison gives the classifier an additional representation of the very same word against which to read its contextual use.

The authors also point to sentences that contain several metaphorical words. When surrounding expressions already participate in the same figurative reading, they may form a coherent context for the target. A branch that relies on detecting a mismatch with that context can have weaker evidence in such a case. Comparing the target against its isolated representation still offers another cue. The analysis explains why the two comparisons can behave differently even within a sentence where the metaphors are related.

The reverse pattern arises with personification in the authors’ examples. A word may be close to its familiar sense while being applied to a subject for which that sense is unexpected. The paper illustrates this with an expression of being alone applied to Manchester. The character of the subject matters to the reading, and a comparison with an isolated target may register less change than a comparison involving the sentence. The authors associate this kind of failure with the system that retains MIP alone.

Some examples remain difficult for the complete detector. The authors call attention to borderline or implicit metaphors, including a poetic heading involving the way of the world. The intended relation may depend on more than a shift in the target’s immediately apparent sense or an obvious clash with a nearby word. The selected examples give qualitative evidence for how the cues can complement one another. They do not measure how frequently each type of failure occurs or how much each type accounts for in the aggregate ablation results.

Limitations

Limits identified by the authors

The authors treat common ambiguous words, personification, and sentences with several metaphors as cases in which either of the linguistic cues can be difficult to apply. Combining the cues reduces some of the errors shown in the paper, but implicit and borderline readings remain difficult. The study presents those cases as examples of the detector’s errors. It gives no separate error rate for borderline metaphors or a quantitative measure of whether different readers would agree on all such examples.

The authors also point out differences between the smaller transfer collections and the data they choose for training. MOH-X and TroFi focus on verbs and contain a relatively high share of metaphorical examples. VUA spans more grammatical categories and offers larger collections of annotated occurrences. These differences explain the authors’ preference for VUA as the training source and the use of the other datasets only for testing. They also define the transfer claim. MelBERT is evaluated on two additional collections of English verb uses. Its best result on MOH-X and the lead of RoBERTa_BASE on TroFi show that the advantage depends on the destination.

For TroFi, the authors suggest that longer and more complicated sentences help explain lower performance. Their evaluation compares collections that differ in origin, target inventory, and sentence properties. A controlled comparison of short and long sentences within otherwise matched data would answer a more specific question about length. The reported contrast supplies an observation about the whole benchmark and a proposed explanation.

Limits visible in the design and evaluation

The branch names refer to linguistic ideas, while the branch inputs are learned vectors. An isolated representation can encode multiple senses of a word. The MIP-inspired branch has no explicit dictionary definition, sense annotation, or test of whether a contextual reading can be understood in relation to a basic sense. Its extra evidence comes from exposing the same target under a different input condition. The ablation supports the usefulness of that evidence. It leaves open which aspects of the isolated representation help account for the result on any particular word.

The SPV branch likewise has access to a sentence representation that includes the target itself. Its comparison concerns two different readouts from one sentence, one from [CLS] and one from the target position. There is no separate representation of the surrounding context with the target removed, or a direct measurement of how acceptable a particular grammatical pairing is. The sentence branch may capture contextual fit, grammatical information, and other features together. Removing it shows that this learned comparison contributes to F1. It does not by itself establish which feature was decisive.

The local-context procedure introduces another approximation. Commas provide a convenient way to flag a span around the target in a composite sentence. Punctuation offers limited evidence about clause structure, especially in the fragmented or colloquial language the authors discuss in their genre analysis. The experiments leave open how much performance depends on this approximation, the appended grammatical tag, and the segment markings. The direct ablations isolate the presence of the two comparison branches. They do not provide independent estimates for each of the input design choices.

The overlap between the VUA editions also matters. They provide distinct evaluation settings, with different target selection and class proportions, but share source material. Their results should be read as evidence from related benchmarks. MOH-X and TroFi broaden the evaluation to other collections while narrowing the target scope to verbs. Nothing in that setup tests transfer from English to another language. The work also operates on the sentence input described in the architecture. It offers no comparison designed to measure the contribution of a preceding dialogue turn, a surrounding passage, or background knowledge to an implicit reading.

There is a distinction between the classification score and a fuller account of metaphor. The output tells the reader how the detector classifies a target, with an intermediate score available for that decision. The architecture does not produce an explanation of the intended reading, say which aspects of the basic sense carry over, or identify a source and target domain. An F1 improvement establishes closer agreement with the benchmark labels under the tested conditions. Whether the same detector could improve translation, sentiment analysis, or dialogue would require an evaluation in those applications.

Finally, the paper motivates independent encoding in part through the possibility of reuse. The sentence vector can in principle be retained for later comparisons, but the sentence input also carries features that depend on the target, including segment markings and its grammatical tag. Changing the target can therefore change the input from which the sentence representation is computed. The experiments report classification comparisons rather than runtime measurements for repeatedly scoring words in the same sentence. They establish the accuracy behavior of the late-interaction design under the reported settings and leave its practical reuse gains unmeasured.

What came after

Testing whether the signal travels

Later studies that cite MelBERT pick up different parts of the problem. Aghazadeh and colleagues examine metaphor information in pretrained language representations through probing and through tests of generalization across datasets and languages. A probe asks what information can be recovered from a representation under a chosen test. This changes the emphasis from designing a new word-level classifier to examining the evidence that pretrained representations already offer. The cross-language part also extends the generalization question beyond the English-to-English dataset transfers reported for MelBERT. Metaphors in Pre-Trained Language Models

Berger and colleagues address transfer learning for metaphor prediction in German. MelBERT’s transfer comparison takes a trained decision from VUA-20 to other English verb datasets. German metaphor prediction makes transfer part of the problem in another language. The connection is the question of which learned evidence can be reused for a different setting. The German study’s stated focus is transfer learning for the prediction task, while the architecture and exact transfer route need to be established from that study itself. Applying Transfer Learning to German Metaphor Prediction

Other work changes the domain or supplies data for another language. Reimann and colleagues introduce a dataset concerned with metaphor in German religious online forums and investigate several approaches to automatic detection. That work centers an identifiable type of discourse, where a detector has to recognize the uses that its annotation scheme records in forum text. Miri and colleagues introduce PerMet 1.0, a Persian corpus with metaphor annotations. In relation to MelBERT, the corpus work addresses a prerequisite for supervised evaluation. A proposed word-level decision needs annotated examples against which its predictions can be compared. Automatic Metaphor Detection in German Religious Online Forums and PerMet 1.0

Pitarch and colleagues consider metaphor identification in Spanish oncological discourse, with a focus on explicit meaning in a low-resource setting. This takes up a question close to MelBERT’s use of an isolated word as a meaning cue. Explicit meaning information and a learned representation of an isolated word are different ways of supplying evidence about how to read an occurrence. The Spanish study places the question in a specific kind of discourse and explicitly frames it around a setting with limited resources. Metaphor Identification in Spanish Oncological Discourse

Combining figurative-language tasks and examining meaning

Badathala and colleagues put hyperbole and metaphor detection within a multitask framework. MelBERT combines two kinds of evidence in service of one metaphor label. Multitask learning makes the relationship between tasks part of the design, here by considering exaggeration and metaphor together. FL-MSCL pursues a broader figurative-language detection framework using several kinds of signals and contrastive learning. Contrastive learning shapes representations through comparisons between examples. In both cases the later work asks how evidence for a figurative category can be learned alongside other signals, expanding the scope from the two metaphor cues MelBERT compares for one target. A Match Made in Heaven and FL-MSCL

Research on interpretation changes the output being evaluated. Tong and colleagues introduce a challenge dataset devoted to metaphor understanding. A challenge framed around understanding puts attention on what a system can recover about the expression, beyond assigning the occurrence to a figurative category. Montero and colleagues create and validate a monolingual Spanish dataset for metaphor interpretation using natural-language inference. Inference tasks express a judgment about how statements relate in meaning. A metaphor interpretation dataset organized this way makes an interpretation itself part of the test. The distinction follows directly from MelBERT’s task definition, where the designated word receives a binary label. Metaphor Understanding Challenge Dataset and Spanish Natural-Language Inference for Metaphor Interpretation

Ye and colleagues investigate semantic alignment, lexical invariance, and the influence of syntax in metaphor processing. These questions concern how representations relate in meaning, how stable the result is across changes in wording, and what role sentence structure plays. MelBERT learns from a contextual target, an isolated target, and a sentence representation, but its evaluation does not vary wording or syntax as separate factors. The probing study takes those properties as objects of investigation. It continues the question of what evidence a contextual representation contributes to metaphor processing while making the conditions of that evidence part of the research problem. Probing Semantic Alignment, Lexical Invariance, and Syntactic Influence

A related development is to ask what a metaphor does within a discourse. Otmakhova and colleagues examine metaphorical framing through source domains and semantic frames. Source domains concern the concepts that supply a metaphor’s imagery, while frames organize the situations and relationships evoked by language. The focus connects to the conceptual motivation of MelBERT, whose detector relies on how a word’s contextual use relates to another meaning and to its sentence. Framing research takes a further step by making the choice of conceptual material part of the analysis. It asks how a metaphor presents its subject, a judgment for which a word-level detection score can identify a candidate expression but cannot supply the interpretation. Not all ANIMALs are equal

Cite

Cite as Minjin Choi, Sunkyung Lee, Eunseong Choi, Heesoo Park, Junhyuk Lee, Dongwon Lee and Jongwuk Lee. 2021. MelBERT: Metaphor Detection via Contextualized Late Interaction using Metaphorical Identification Theories. Proceedings of the 2021 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies.

The paper itself, not this page. BibTeX from the library's record of the work. DOI 10.18653/v1/2021.naacl-main.141

@inproceedings{choi2021melbert,
  title = {{MelBERT: Metaphor Detection via Contextualized Late Interaction using Metaphorical Identification Theories}},
  author = {Minjin Choi, Sunkyung Lee, Eunseong Choi, Heesoo Park, Junhyuk Lee, Dongwon Lee and Jongwuk Lee},
  booktitle = {Proceedings of the 2021 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies},
  year = {2021},
  doi = {10.18653/v1/2021.naacl-main.141},
  url = {https://doi.org/10.18653/v1/2021.naacl-main.141}
}

↑ back to top

This page in Markdown https://md.research.elamur.ai/free/en/papers/choi-2021-melbert-metaphor-detection-contextualized-late/