Elamur Research

ERNIE-NLI: Analyzing the Impact of Domain-Specific External Knowledge on Enhanced Representations for NLI

Paper · 2021 · Lisa Bauer, Lingjia Deng and Mohit Bansal

Summary

A pair of sentences can leave a reader with all the grammatical clues needed to compare them and still omit a fact that makes the comparison possible. A sentence about cutting expenses for the golden years can support a sentence about spending less in retirement if the reader recognizes what golden years means in that context. Natural language inference, or NLI, asks whether a hypothesis follows from a premise, conflicts with it, or remains undecided. ERNIE-NLI studies which kinds of external knowledge help with those judgments and how the supplied knowledge changes the mistakes a system makes.

The authors start with an error analysis on the Multi-Genre Natural Language Inference Corpus, or MNLI. They judge that at least 50% of the BERT mistakes they examined require external knowledge to resolve. They then adapt ERNIE, an architecture that already has a place to bring external information into its text representations. Their version selects relations between words or phrases in the two sentences and groups those relations by polarity. A positive relation gives the system a reason to consider a connection that could support entailment. A negative relation can flag an opposition or exclusion. These are labels for individual connections. The final judgment still concerns the sentences as a whole.

The authors train a separate encoder to predict the polarity of each concept pair and use its intermediate vectors as knowledge inputs to ERNIE-NLI. They vary where the relations come from and how many positive examples the encoder sees. With the original balance of relations from ConceptNet and the Paraphrase Database, ERNIE-NLI reaches 83.43% accuracy on MNLI entailments and 84.18% across labels. The original ERNIE scores 80.84% and 83.42% on those measures. Adding negative WordNet relations and balancing the training pool produces the strongest contradiction and neutral scores among the tested configurations, at 86.50% and 85.21%, respectively. That configuration scores 80.00% on entailments.

The gains come with shifts in the errors. Under the setup richest in positive relations, the error categories that grow are false entailments. Under the balanced setup with WordNet, the growing category is false neutral predictions on actual entailments. The authors also find that the encoder can use concept pairs linked by source relation types it did not see during knowledge training. Allowing those types at evaluation gives a better entailment result than dropping them, while contradiction moves in the other direction. Together, these comparisons show how the choice of knowledge can make particular inference labels easier to recognize while making other judgments harder.

Deep dive: ERNIE-NLI: Analyzing the Impact of Domain-Specific External Knowledge on Enhanced Representations for NLI

ERNIE-NLI tests how the choice of external knowledge changes entailment, contradiction, and neutral predictions on the MNLI benchmark. · about 31 minutes to read

The problem and its context

What the sentences leave implicit

An NLI example gives the reader a premise and a hypothesis. The premise supplies the information to reason from. The hypothesis gives a claim to assess against that information. Entailment means that the hypothesis follows from the premise under the intended interpretation. Contradiction means that the claims are incompatible. A neutral label means that the premise leaves the hypothesis open. The order matters because a more specific statement can support a more general statement even when the reverse inference is unwarranted.

The paper illustrates the task with a premise about boys playing soccer. Knowing that soccer is a sport supports the corresponding generalization about what they are doing. The paper also changes the description of the players to older men to illustrate contradiction. An apparently straightforward example thus brings together different kinds of evidence. A category relation helps with the activity, while an age distinction changes the judgment about the participants. Recognizing the relation between soccer and sport leaves the question about the participants to be resolved.

The retirement example puts the missing evidence in a phrase. Both sentences describe people reducing expenses. A reader who understands golden years as a reference to retirement can match their purposes as well. A system that recognizes the similarity between reducing and cutting may still miss the inference if it has no usable representation of the phrase. The paper uses cases like this to distinguish access to relevant content from the ability to combine that content with the sentences.

The authors call the meaning of the retrieved relation its content. They use polarity for the role assigned to the relation with respect to entailment. A paraphrase connection can count as positive because it supports comparing two expressions as related in meaning. An antonym connection can count as negative because it supplies a reason to consider a difference in meaning. Even an accurately retrieved relation has a limited scope. The proposition in each sentence determines whether that relation is decisive, incidental, or useful only for aligning the sentences before considering other evidence.

Neutrality makes that distinction especially important. A premise can establish a fact about one ingredient in someone's coffee and leave their use of another ingredient open. The shared setting makes the sentences easy to compare, but the result hinges on what the premise actually says about each ingredient. A useful connection between words can establish that the two sentences concern a related situation while leaving the hypothesis undecidable. The system needs to handle both the connection and the boundary of what it licenses.

How earlier work represented the task

In the history the authors describe, early textual entailment systems used explicit logical rules, syntactic information, and accounts of how the meanings of expressions compose. For instance, the paper cites work that treated entailment as a problem for logical inference and work on how lexical alternatives affect the conclusion inside a sentence. These approaches illustrate ways of making the path from linguistic evidence to an inference explicit. Recognising Textual Entailment with Logical Inference · An extended model of natural logic

Large annotated corpora gave researchers another way to approach sentence comparison. The examples came with judgments that could be used to train encoders and measure how frequently they reproduced the intended label. The paper points to the Stanford Natural Language Inference Corpus and MNLI in this transition. In its account of later encoders, some built sentence representations using tree structure, while others used forms of attention to learn which words to emphasize. A large annotated corpus for learning natural language inference · Natural Language Inference by Tree-Based Convolution and Heuristic Matching

Contextual pretraining and multitask learning supplied broader representations for inference. The authors discuss BERT as a starting point for several approaches and describe a multitask system that learns representations across language understanding tasks. They also mention work that brings semantic roles into a BERT-based system to make information about what participants do in sentences more explicit. These approaches improve the representation from which a judgment is made. The question ERNIE-NLI takes up concerns how to select additional information when the connection the judgment depends on is difficult to recover from the sentence representations. BERT · Multi-Task Deep Neural Networks for Natural Language Understanding

The paper also draws on work that tests what a pretrained encoder can actually recover. It describes psycholinguistic diagnostics applied to BERT, experiments with negated prompts that expose failures, and NLI tests built around semantic fragments that are challenging for systems trained on standard benchmarks. The authors use these studies to motivate concern about new domains and changes in the form of the input. A system may succeed often on a benchmark and still have systematic difficulty with a kind of inference that the benchmark result averages together with many others. What BERT Is Not · Negated and Misprimed Probes for Pretrained Language Models · Probing Natural Language Inference Models through Semantic Fragments

Why the choice of knowledge matters

A separate line of work represents facts in a knowledge graph. A graph records concepts or entities and names the kinds of connections between them. The paper describes TransE, which represents a relation as a translation between entity vectors. In that scheme, the relation vector expresses how to move from the representation of one entity toward the representation of another. Other work discussed by the authors uses relation paths, groups entity pairs with related behavior, or brings in rules and semantic categories when learning the representations. TransE · Modeling Relation Paths for Representation Learning of Knowledge Bases

There was already work that supplied lexical relations to inference systems. The authors discuss a system that obtains semantic relations from WordNet and uses pretrained TransE representations. They also discuss the original ERNIE, which injects entity information into the representation of a text. ERNIE was developed mainly for entity typing and relation extraction. Those tasks give the system a reason to emphasize which named entities occur and how they are connected. A premise and hypothesis can depend just as much on a common word or an ordinary phrase. WordNet · Neural Natural Language Inference Models Enhanced with External Knowledge

Entity identity and inference polarity answer different questions. A relation connecting a songwriter to a song gives context for interpreting an entity mention. A relation connecting two expressions for the same stage of life gives evidence for comparing claims. An opposition between words supplies a different kind of evidence again. ERNIE-NLI asks how performance changes when an architecture designed to accept supplemental representations is supplied with relations chosen for their possible role in sentence inference.

In this study, adaptation to the domain has a concrete meaning. The authors find concepts in MNLI sentences, look for external relations that connect those concepts across the sentence pair, and train on the resulting examples using labels chosen for NLI. MNLI supplies multiple genres, so this is not a study of a single subject specialty. The adaptation concerns the inference task and the language occurring in its examples. The authors' aim is to use the architecture as an experimental framework in which they can vary the selected knowledge and examine the resulting decisions.

The method, step by step

From sentences to connections

ERNIE-NLI treats a concept as a word or phrase that can participate in a relation. In its coffee example, sugar, cream, and coffee act as concepts. An external relation gives one such connection a name. ConceptNet relates sugar and cream through RelatedTo and sugar and coffee through AtLocation. The premise provides the sugar mention, while the hypothesis provides the cream and coffee mentions. These connections are useful to the method because they give it something to represent across the two sentences.

ConceptNet is the general knowledge source. Its graph can express a category relation, as when jazz is connected to a genre of music, or an association with a place, as when jazz is linked to New Orleans. The Paraphrase Database, or PPDB, supplies expressions with similar meanings. According to the paper, its more than 220 million paraphrase pairs were drawn from bilingual parallel corpora. WordNet organizes words into groups that express a sense and connects those groups with relations including synonymy, antonymy, and relations of greater or lesser specificity. For the configurations that add WordNet, the authors use it to extend the supply of negative knowledge.

The examples in the knowledge sources are concept pairs, whereas the benchmark examples are sentence pairs with judgments. The authors connect the two collections by running Python Keyphrase Extraction, abbreviated PKE, on the premise and the hypothesis. They search for relations with one endpoint among the concepts from the premise and the other among those from the hypothesis. A sentence pair can supply several such connections. Each is a separate knowledge example because its endpoints and original relation can differ from those of the other connections found in the same sentences.

Looking across sentences makes the lookup serve a particular purpose. A relation entirely inside the premise could describe that sentence well but leave open which part of the hypothesis it should help evaluate. Here the candidate connections come with endpoints on opposite sides of the comparison. The extracted pairs remain selective. Which connections are available depends on which words or phrases are proposed and which of them the sources relate. An absent connection may reflect the lookup or the databases even when a reader could identify a relevant relationship.

How ERNIE-NLI learns and applies external knowledge

The steps in order.

How ERNIE-NLI learns and applies external knowledgeStep 1: Extract concepts from both sentences1. Extract concepts from both sentencesStep 2: Find external relations linking concepts across sentences2. Find external relations linking concepts across sentencesStep 3: Map source relations to positive or negative3. Map source relations to positive or negativeStep 4: Train an encoder to predict knowledge polarity4. Train an encoder to predict knowledge polarityStep 5: Keep the learned knowledge vectors fixed during NLI training5. Keep the learned knowledge vectors fixed during NLI trainingStep 6: Fuse sentence representations with aligned knowledge vectors6. Fuse sentence representations with aligned knowledge vectorsStep 7: Predict the relation between premise and hypothesis7. Predict the relation between premise and hypothesis

Turning many relation types into a training signal

Each knowledge source has its own relation vocabulary. The authors write a heuristic that assigns source relations to pos or neg. Their examples map RelatedTo to pos and Antonym to neg. The appendix also associates such relations as IsA, Synonym, and AtLocation with the positive side and lists DistinctFrom and Exclusion among the negative ones. The different source systems can therefore contribute examples to the same learning objective.

The positive class has a broad meaning. A category connection, a synonym, and a place association can all get that label, although they make very different contributions to a sentence judgment. Two synonyms may support a substitution in a particular context. An association such as a typical location may help explain why two terms belong to the same situation. The training label captures a common orientation toward entailment evidence and leaves the encoder to represent whatever useful distinctions it can from the identities of the terms.

The negative side is also local. An antonym gives a system reason to pay attention to a distinction between the words. Whether that difference contradicts the hypothesis depends on what the two sentences assert and how the terms occur in them. A contradiction can contain several positive connections between other words that describe shared participants or events. An entailment can contain a negative connection that is incidental to the decisive inference. There is also no separate neutral knowledge label in the method. Neutrality is an outcome of comparing complete sentences.

The two kinds of supervision can be seen in the coffee example. The retrieved concept pairs both receive positive labels, while the sentence pair is labeled neutral. The authors can train the knowledge encoder on those positive relationships without teaching it that the hypothesis about milk or cream follows. The NLI classifier separately learns from the neutral judgment. This separation is what allows the paper to vary the distribution of relation labels and then measure what happens to the distribution of sentence predictions.

Learning a vector from the concept pair

For an indexed training example, the authors use the following input format for the knowledge encoder.

[CLS] cᵢ¹ [SEP] cᵢ² [SEP]

Here i indexes the example, cᵢ¹ is the concept from its premise, and cᵢ² is the concept from its hypothesis. The superscripts distinguish the positions of the concepts. [CLS] is the special token at the start of the BERT input, and [SEP] delimits the concepts. Each concept can occupy more than one token. The brackets are part of the special token names.

The knowledge stage feeds that sequence to BERT. The paper writes the computation in terms of its two concept arguments.

o = BERT(cᵢ¹, cᵢ²)

o denotes the contextual representation produced by BERT. The arguments cᵢ¹ and cᵢ² are the premise and hypothesis concepts for index i, in the order used to build the sequence. BERT sees the terms together in this pass. Its input at this stage is the concept pair, so the surrounding premise and hypothesis remain available to a different part of the method.

A linear layer then projects the output into the space used for the knowledge vectors.

kᵢ = Wₖ(o) + bₖ

kᵢ is the learned knowledge embedding for the indexed input. Wₖ is the learned weight transformation of the knowledge layer, applied to o, the BERT output. bₖ is the learned bias added to that transformation. The subscript ₖ identifies the parameters of the knowledge layer. The resulting vector is the object that the sentence-level system will later receive.

The authors train that representation by attaching a classifier for the relation polarity. Its first operation produces scores for the possible knowledge labels.

l꜀ = W꜀(kᵢ) + b꜀

l꜀ is the vector of classification scores before conversion to probabilities. kᵢ is the knowledge embedding for index i. W꜀ denotes the weight transformation for the classifier and b꜀ its bias. The subscript ꜀ distinguishes the classifier quantities from the parameters of the knowledge projection.

y = softmax(l꜀)

y is the predicted distribution over positive and negative relations, and l꜀ is the score vector from the classification layer. softmax turns those scores into probabilities over the alternatives. The paper also uses y when referring to the relation attached to a pair. In this equation it represents the prediction, which the training loss compares with the target assigned by the mapping. The authors use cross-entropy, which penalizes the system when it puts little probability on the assigned polarity.

The transferable output of this stage is kᵢ. The prediction of pos or neg gives the training direction, and the intermediate vector gives the next component something richer to work with than a discrete flag. The source relation name is used in constructing the training label. The listed BERT input contains only the two concepts. For instance, a source relation called RelatedTo helps decide how the sugar and cream pair is supervised, but the words sugar and cream are what enter the knowledge encoder.

For an NLI example with multiple extracted connections, the corresponding embeddings form a sequence.

Kᵢ = {kᵢ¹, …, kᵢᵐ}

Kᵢ denotes the knowledge sequence for sentence pair i. Each kᵢ with a superscript denotes the vector for a particular connection in that pair. The first and last entries shown have superscripts 1 and m, and m is the length of the sequence for the pair. The ellipsis stands for the intervening entries. The authors hold these knowledge embeddings fixed during the subsequent NLI training.

Bringing the knowledge into the sentence encoder

The original ERNIE has a textual encoder followed by a knowledge encoder. The textual encoder uses a bidirectional Transformer and attention architecture like BERT's to produce contextual token representations. The knowledge encoder combines token vectors with external entity vectors aligned to the corresponding text. The authors illustrate the alignment using a sentence about Bob Dylan writing Blowin’ in the Wind. ERNIE can incorporate the vectors for the songwriter and the song where their mentions appear.

The paper gives a compact expression for that original arrangement.

u = ERNIE(T, E)

u is the resulting representation. ERNIE denotes the encoding operation, T is the input token sequence, and E is the aligned sequence of entities represented by pretrained TransE vectors. For T, the paper writes the tokens as w₁ through wₙ, with n the token sequence length. For E, it writes the entries as e₁ through eₘ, with m the length of the entity sequence. The alignment specifies where the external entity information enters the text representation.

ERNIE-NLI changes what is fed through that knowledge interface. It supplies vectors learned from cross-sentence concept pairs under the polarity objective.

u = ERNIE(T, K)

u again denotes the output representation, and ERNIE denotes the architecture that combines text and knowledge. T is the sequence of text tokens, and K contains the learned knowledge embeddings aligned to those tokens. The entries of K are written as k₁ through kₘ, where m now counts the entries in the knowledge sequence. The alignment associates the knowledge information with the relevant text. The resulting representation supports the classification of the complete premise and hypothesis as entailment, contradiction, or neutral.

The paper describes two successive periods of training. During relation training, the concept-pair encoder learns with the heuristic polarity labels. During NLI training, the knowledge vectors are held fixed and the sentence-level system learns from MNLI judgments. This makes the recipe comparable across different knowledge pools. A change to the pool changes what the relation encoder learns, while the downstream task continues to use the same set of sentence labels.

The authors build on the released PyTorch implementation of ERNIE. They set the random seed to 42 and train with batches of 12 at a learning rate of 2e-5. The schedule gives relation training 1 epoch and NLI training 4 epochs. They keep those settings across the experiments and choose them for consistency with the original ERNIE setup rather than tuning them for each knowledge condition.

At evaluation time the method can calculate a vector from an eligible pair of concepts using the BERT pass and the linear projection. That calculation works even if the exact pair was absent from knowledge training. If an experiment permits a source relation type that was absent from that training, the lookup can use the relation to select the pair, and the same encoder can process its endpoints. This property comes from representing a relation through its concept text. An encoder that needed a separately learned entry for every allowed pair or every source relation name would face a different constraint.

Experiments and results

The corpus, the comparison, and the metric

MNLI contains 433k sentence pairs with entailment, contradiction, and neutral judgments. Its genres cover spoken and written text, varied degrees of formality, and different topics. The paper reports standard accuracy, which counts the proportion of sentence pairs assigned their gold label. It also reports accuracy for each gold class. Entailment accuracy, for example, measures success among examples that are entailments. The errors on neutral and contradictory examples that were miscalled entailments appear elsewhere in the class breakdown.

The preliminary error analysis uses BERT. The authors report 83.90% accuracy on the MNLI development set and examine 40 of its misclassifications per domain. Across the domains they judge that at least 50% of the inspected errors require some outside knowledge to resolve. They identify needs such as world knowledge, terminology from a domain, familiar paraphrases, and commonsense information. They also report that ConceptNet and PPDB together cover at least 70% of the concepts they judged necessary for these mistakes. That last measure concerns whether the resources contain relevant concepts. The experiments test the further question of whether representations from the sources help with predictions.

The main direct comparison uses ERNIE as the reference. It already has the mechanism for incorporating external entity embeddings and gives the authors an architecture on which to test their replacement knowledge input. The paper presents 83.42% as ERNIE's overall MNLI accuracy in that comparison. For broader context it separately cites an MNLI test accuracy of 92.2% for T5-11B. The latter is a reported benchmark result on the test set. The ERNIE table is the reference for the paper's knowledge comparisons, and the separately reported BERT development result motivates the investigation. T5

The knowledge pools

The configurations vary both the sources and the distribution of positive and negative relations. PC combines PPDB and ConceptNet. Its extracted knowledge pool contains more positive relations than negative ones. PC&Bal uses those sources and downsamples the positive relations to reach a 50%-50% balance. The negative portion of the pool therefore has greater relative weight in the balanced condition, even though the balancing operation consists of removing positive examples.

PCW extends PC with negative relations from WordNet. It changes what negative knowledge is available, introducing different content as well as affecting the polarity distribution. PCW&Bal then applies positive downsampling to this expanded pool to reach 50%-50%. Comparing the unbalanced pool with the balanced pool from the same sources addresses a different question from comparing the pools before and after the addition of WordNet.

The labels in the main accuracy comparison refer to the strongest setups for particular gold classes. ERNIE-NLI E corresponds to PC, which has the highest entailment accuracy among the configurations. ERNIE-NLI C&N corresponds to PCW&Bal, which has the highest contradiction and neutral accuracy. The latter is a single configuration with both of those strengths. The paper reports what each configuration does across all the classes, including the ones for which it was not the strongest.

The strongest setup depends on the label

The main accuracy table gives ERNIE 85.91% on contradiction, 83.74% on neutral examples, and 80.84% on entailment. With PC, ERNIE-NLI scores 85.29%, 83.87%, and 83.43% in those same classes. Its overall accuracy is 84.18%, the highest overall score among the configurations shown in that table. The comparison gives the entailment improvement a precise context. The same setup slightly improves the neutral score and lowers the contradiction score.

ERNIE and ERNIE-NLI accuracy on MNLI entailments

The original ConceptNet and PPDB mixture gives the strongest entailment score.

ERNIE and ERNIE-NLI accuracy on MNLI entailmentsERNIE: 80.84ERNIE80.84ERNIE-NLI with PCW&Bal: 80.00ERNIE-NLI with PCW&Bal80.00ERNIE-NLI with PC (this paper): 83.43ERNIE-NLI with PC (this paper)83.43
The numbers
System or settingaccuracy %
ERNIE80.84
ERNIE-NLI with PCW&Bal80.00
ERNIE-NLI with PC (this paper)83.43

With PCW&Bal, ERNIE-NLI scores 86.50% on contradiction and 85.21% on neutral examples. Its entailment accuracy is 80.00%, and its overall accuracy is 83.74%. Though it improves on ERNIE overall, its gains come from a different part of the corpus than the gains in PC. Choosing a knowledge setup by overall accuracy would favor PC in this comparison. Choosing one by accuracy on either contradiction or neutral examples would favor PCW&Bal.

ERNIE and ERNIE-NLI accuracy on MNLI neutral examples

The balanced mixture that includes negative WordNet relations yields the highest neutral accuracy.

ERNIE and ERNIE-NLI accuracy on MNLI neutral examplesERNIE: 83.74ERNIE83.74ERNIE-NLI with PC: 83.87ERNIE-NLI with PC83.87ERNIE-NLI with PCW&Bal (this paper): 85.21ERNIE-NLI with PCW&Bal (this paper)85.21
The numbers
System or settingaccuracy %
ERNIE83.74
ERNIE-NLI with PC83.87
ERNIE-NLI with PCW&Bal (this paper)85.21

The paper also gives class-specific changes from ERNIE for all the configurations. These are its reported differences in accuracy, which can be read in percentage points. For PC, the changes are -0.62 on contradiction, 0.13 on neutral, and 2.59 on entailment. For PC&Bal, the changes in that order are 0.22, 0.96, and -1.06. Downsampling positives within those sources improves the contradiction and neutral comparison with ERNIE and weakens the entailment comparison.

For PCW, the reported changes are -1.00 on contradiction, 0.66 on neutral, and 1.41 on entailment. For PCW&Bal, they are 0.59, 1.47, and -0.84. Here too, the step of balancing by removing positive relations shifts the scores towards contradiction and neutral and away from entailment. Adding WordNet without balancing has a more qualified pattern. PCW does better than PC on neutral, while its contradiction and entailment results are weaker. The effect of including negative relations depends on the rest of the pool and on which label is used to assess the change.

The class distribution matters for reading the overall gains, and the direction of changes in each class matters for interpreting them. An overall score counts every corrected or newly missed example together. Class accuracy reveals where those gains and losses lie, while still grouping together errors with different predicted destinations. A system that gets more true entailments right and also miscalls more neutral examples entailments will display different aspects of the same shift in different rows of the results. The paper examines individual decision changes to trace that pattern more closely.

What the ablations show

Changing polarity through sampling and source choice

The paired comparisons PC against PC&Bal and PCW against PCW&Bal use the same source combination within each comparison. In both, balancing removes positive training examples. Both comparisons favor the unbalanced pool for recognizing entailment and the balanced pool for recognizing neutral and contradiction. This makes the relation between positive training material and entailment performance visible under both source combinations.

There are two changes within that intervention. The positive share goes down and the complete collection of examples becomes smaller. The encoder also sees a different selection of positive content. The paired comparisons therefore directly describe what happens under the paper's downsampling procedure. They leave room for several properties of the removed examples to contribute to the observed changes.

Comparing PC and PCW brings a different intervention into view. The extra negative relations arrive from WordNet, so they bring both a polarity and a source vocabulary. Neutral accuracy improves in this comparison while contradiction accuracy falls. Under balancing, moving from PC&Bal to PCW&Bal improves contradiction and neutral, and the entailment change from ERNIE is less unfavorable with PCW&Bal. These differences qualify the broad description that positive relations help entailment while negative relations help neutral and contradiction. In the actual experiments, the source, the sampling procedure, and the class being measured all affect the result.

The good neutral results in the balanced setups are informative because neutral is not one of the knowledge encoder's training categories. The sentence classifier can respond to evidence of a semantic difference by deciding that a hypothesis is unsupported, without deciding that it directly conflicts with the premise. The reported class scores are consistent with that possibility. They show which classifications improve when the pool changes, while the paper's examples give a closer look at how a local association can coexist with a neutral decision.

Varying how much positive knowledge the encoder sees

The authors also vary the amount of positive knowledge used during relation training under the PC source combination. The percentages in this experiment specify the portion of available positive knowledge used. They differ from the 50%-50% description of a balanced pool, which specifies the class composition after downsampling. At 0% of positive knowledge, the experiment removes the positive examples from this training condition. It does not remove all external knowledge.

At 0%, entailment accuracy is 80.12% and total accuracy is 83.37%. At 25%, those scores are 80.52% and 83.44%. The 50% condition reaches 80.00% on entailment and 83.74% overall. The 78% condition reaches 82.25% and 83.80%. With 100% of positives included, entailment accuracy reaches 83.43% and overall accuracy reaches 84.18%. Overall accuracy rises across the reported sequence, while entailment dips at the intermediate setting before rising at the larger portions. Fine-tuning

MNLI overall accuracy by the portion of positive knowledge used in relation training

Overall accuracy rises across the tested portions of positive knowledge under the PC source combination.

MNLI overall accuracy by the portion of positive knowledge used in relation training0% of positive knowledge: 83.370% of positive knowledge83.3725% of positive knowledge: 83.4425% of positive knowledge83.4450% of positive knowledge: 83.7450% of positive knowledge83.7478% of positive knowledge: 83.8078% of positive knowledge83.80100% of positive knowledge (this paper): 84.18100% of positive knowledge (this paper)84.18
The numbers
System or settingaccuracy %
0% of positive knowledge83.37
25% of positive knowledge83.44
50% of positive knowledge83.74
78% of positive knowledge83.80
100% of positive knowledge (this paper)84.18

The other class curves help explain why the entailment dip can coexist with rising total accuracy. Contradiction scores 86.35% at 0% and 86.50% at 50%, then falls to 84.91% at 78% and reaches 85.29% at 100%. Neutral accuracy is 83.93% at 0%, reaches 85.21% at 50%, and ends at 83.87% at 100%. The intermediate peak for neutral and contradiction comes at the reported low point for entailment. At larger portions of positive knowledge, entailment becomes stronger and the other classes yield some of their gains.

This experiment adds a dose comparison to the source and balancing comparisons. It shows that the performance associated with the full pool is reached across several measured settings and that the class tradeoff is visible within one source combination. The sequence also gives a more precise account of the authors' claim about adding positive knowledge. The gain in overall accuracy is consistent across the listed portions. The gain in entailment is clearest at the higher portions, with an intermediate reversal that a comparison of the endpoints alone would hide.

Which mistakes grow and which shrink

The authors compare the error types made by ERNIE and ERNIE-NLI using both the gold label and the wrong label that was predicted. This separates falsely predicting entailment from missing a true entailment. It also shows how a change that helps one gold class may be accompanied by new mistakes on examples elsewhere in the corpus.

Under PC, the error categories with positive changes are both false entailment categories. The enhanced system is more accurate on gold entailments, yet some non-entailments are more frequently assigned that label. Both movements are consistent with the authors' interpretation that the positive-heavy setup favors entailment. The change can make the system better at recognizing a valid inference and more willing to propose the same inference where the premise offers insufficient support.

With PCW&Bal, the growing error category is false neutral on gold entailment. Errors on gold contradictions and gold neutral examples decline or stay level across the wrong destinations in the comparison. The direction of the new mistake matters. The loss of entailment accuracy in this setup appears as a movement towards treating an inference as open. The authors interpret this along with the class scores as evidence that balancing changes how the system handles the boundary among the decisions.

These results describe net changes in error categories. A category that shrinks can still contain individual examples newly sent into it if more examples leave it. That is why the paper's separate analysis of changed predictions adds information. It takes actual switches from one prediction to another and asks which of them land on the gold label. The error comparison shows how the totals redistribute. The switch analysis examines a finer group of predictions and relates them to the knowledge that was available.

What the system retrieved on examples with changed predictions

The authors analyze prediction switches on the MNLI development set using ERNIE-NLI with PC. They group changes by the new prediction and the polarity of retrieved relations, including a group without retrieved relations. A switch is counted as correct if the new prediction is the gold label. The reported counts tell the reader how many examples in the relevant groups were corrected.

Among switches from contradiction or neutral to entailment, the paper reports 101 correct changes with positive relations, 11 with negative relations, and 88 with none. Within the positive-relation column, the corresponding counts for correct switches into neutral and contradiction are 96 and 60. Thus the largest count among those destinations with positive relations is for entailment. In the row for switches into entailment, the count is also largest for the group with positive relations.

The scope of the comparison is important. These are counts of corrected switches in the cited groups. If groups differ in size, their counts can differ even when their rates of correction follow another pattern. The relatively large count for switches into entailment without any detected relation also shows that training the adapted system can change a decision in examples where the lookup yields no edge at evaluation. The authors' result associates the availability of positive knowledge with correct entailment switches in the positive-heavy PC setting. It does not establish that the retrieved relation individually caused each switch.

This analysis answers a question that a class accuracy figure leaves open. A stronger entailment score could be achieved by changes spread throughout the test cases or by changes concentrated where the lookup brings in positive relationships. The paper finds a concentration in the counts it examines, alongside correct switches to other labels. The spread across destinations fits the architecture. A positive relationship is one element in the sentence comparison, and the learned sentence decision can use that element in different ways.

Keeping or dropping relation types unseen during training

For the unseen-knowledge experiment, the authors restrict knowledge training to RelatedTo, IsA, Independent, and Antonym. At evaluation they compare a constrained policy that drops connections with other source relation names with an unconstrained policy that keeps them and computes their vectors. For instance, under the first policy an Entails connection would be discarded. Under the second, the linked concepts enter the same BERT and projection layers already used for the familiar relations. The new relation name is a reason to keep the pair for encoding. It does not require adding a new output class.

Against ERNIE, the constrained policy produces reported class accuracy changes of 0.09 for contradiction, 0.48 for neutral, and -0.17 for entailment. The unconstrained policy produces changes of -0.31 for contradiction, 0.57 for neutral, and 0.63 for entailment. The strongest advantage of keeping the new types is on entailment, and the neutral comparison also improves. On contradiction, the constrained policy has the better result.

The authors relate the entailment change to the extra positive knowledge that the unconstrained policy makes available. The comparison shows that the encoder can make use of concept pairs available through additional source relations even though its training relation vocabulary was restricted. It also gives a concrete case in which accepting more edges has different effects by class. The setup changes which relations can be retrieved within the evaluation task. It gives direct evidence about that particular change in knowledge availability.

What the example sentences illustrate

The coffee example gives a closer view of a correct neutral decision. The premise says Cynthia did not put sugar in her coffee. The hypothesis says she often took milk or cream with it. The baseline predicts contradiction, and the enhanced system predicts neutral. The authors suggest the common coffee context and the premise's negation may have contributed to the baseline error. The retrieved links relate sugar to cream and to coffee. They can help align the topic while leaving clear that the premise concerns sugar and the hypothesis concerns different ingredients.

The other example concerns Lalley's attitude towards a bar association's work on behalf of poor people. The hypothesis describes him as enthusiastic about its initiative. The baseline predicts contradiction, while ERNIE-NLI predicts entailment. The discussion emphasizes the similarity between efforts and initiative. That local connection makes it easier to align what Lalley is enthusiastic about in the two sentences. The rest of the sentences supplies the participants, the attitude, and the purpose.

Together the examples show why relation polarity is only one part of the decision. Positive connections are present in both cases. In one, the link organizes the comparison while the hypothesis remains unresolved. In the other, it helps bridge a difference in wording that would otherwise obscure the inference. The examples illustrate the authors' account of how external information can help. The corpus comparisons measure how often performance changes under the different knowledge configurations.

Limitations

Limits identified by the authors

The authors define the study as an investigation of knowledge selection and its effect on NLI decisions. Their direct benchmark is the original ERNIE setup, and their comparison with T5-11B acknowledges a substantially higher result reported on the MNLI test set. The paper's contribution is an architecture and an experimental design for examining knowledge choices. The strongest class result depends on the configuration, and the authors interpret that dependence as relevant evidence about polarity.

The authors also emphasize that the polarity of a retrieved connection can differ from the orientation of the sentence judgment. Positive links can appear in contradictions, and negative links can appear in entailments. Their own examples show why the complete text remains important. A graph may tell the system that two substances are related, while only the sentence comparison can determine whether a claim about one supplies evidence about the other.

The training setup has a stated restriction. The authors use settings consistent with the earlier ERNIE implementation and report no hyper-parameter tuning. Their comparisons therefore describe what happens under a common recipe. That gives the experiments a shared basis and leaves unanswered how the relative performance would look after each condition had been independently tuned.

The authors' investigation of knowledge shift is also specifically defined. They train using a restricted set of source relations and adjust which relations are allowed during evaluation. Its evidence is valuable for evaluating a lookup policy when the allowed relation inventory expands. The authors' broader discussion of robustness should be understood in light of that experiment and its opposing class movements.

Limits visible in the setup

The error audit examines mistaken BERT predictions on MNLI. The estimate about the need for external knowledge applies to those inspected mistakes. Its denominator excludes examples that BERT already got right. Likewise, the coverage estimate for ConceptNet and PPDB concerns the concepts the reviewers identified. A database can contain both relevant words while supplying an unhelpful edge, an association too broad to resolve the inference, or a relation whose direction does not fit the sentence context. Coverage precedes the harder questions of finding an appropriate edge, encoding it, and using it in a judgment.

The knowledge selection process is limited by its use of keyphrase extraction and the available resources. An important expression can be missed by the extractor. A relation can be present in the world and absent from the source, or present in the source under words that do not match the extracted concepts. These possibilities make the group without retrieved relations heterogeneous. A sentence pair in that group may require little outside information, or the method may have failed to retrieve information that would have helped. The correct switches observed in that group cannot resolve which situation applies to each example.

The heuristic mapping also puts unlike connections under a single label. Synonymy, category membership, and association can all be positive even though their implications depend on context and direction in different ways. The standalone concept encoder receives the selected endpoints without the full sentences or the name of the source relation. The complete text becomes available when the representation is fused into the sentence encoder. This design offers a way for context to qualify a broad knowledge signal, but the reported comparisons do not measure how well the resulting representations preserve distinctions such as equivalence versus loose association.

The study associates polarity with changes in predictions through several interventions. Each intervention also changes some other aspect of the material. Positive downsampling changes the quantity and selection of training examples, while adding WordNet changes the origin and vocabulary of the negative examples. The training-portion series gives a more detailed look at one of these changes, but it does not hold total example count fixed as the positive portion changes. The headline comparison with ERNIE likewise replaces general entity knowledge with task-specific concept-pair vectors. Its gains describe the combined replacement. The internal comparisons help narrow the explanation, and they leave open the respective contributions of corpus selection, grouping by polarity, and the learned vector representation.

The results are reported with a fixed seed and without a range across repeated runs. That makes the observed scores clear for the specified setup. The uncertainty around the smaller reported changes remains unmeasured. There is a parallel issue in the switch analysis. Counts of correct switches describe where corrections appeared, while measuring the chance that a supplied relation leads to a correction would require denominators for the relevant opportunities and a way to control for which examples receive the relation.

Finally, the unseen-relation test stays within MNLI and the paper's source and encoding pipeline. It allows concept pairs through relation types withheld during training. It does not establish performance on a different inference corpus or on a wholesale change of knowledge base. The examples do not establish that the system can faithfully explain individual answers, either. They present plausible accounts of what the external links contributed, supported by the observed difference in predictions. A separate explanation evaluation would need to assess the quality of those accounts directly.

What came after

Does External Knowledge Help Explainable Natural Language Inference? Automatic Evaluation vs. Human Ratings cites ERNIE-NLI and takes up the question of external knowledge in explainable inference. Its framing adds an evaluation question to the one studied here. ERNIE-NLI measures which sentence labels change when the knowledge changes and uses selected examples to discuss why the changes may have occurred. The later study puts automatic evaluation and human ratings in comparison when asking whether external knowledge helps explainable NLI.

The distinction matters in a case like the coffee example. Accuracy credits the system for returning the neutral label. An explanation has a further job. It should make clear that the premise concerns sugar and that a related ingredient may still be used. The connection between the ingredients can be relevant background, while the reason for neutrality rests on the different claims about them. Automatic evaluation and human ratings are two ways to examine the explanation, a different object of evaluation from agreement with the gold inference label.

The citation ties the later question to ERNIE-NLI's central concern about the fit between supplied knowledge and the task. The specific connection established is the move from evaluating decisions made with external knowledge to asking how to evaluate explainable inference with that knowledge. The citation alone leaves open whether the later study reuses the architecture, the polarity mapping, or the knowledge pools.

Cite

Cite as Lisa Bauer, Lingjia Deng and Mohit Bansal. 2021. ERNIE-NLI: Analyzing the Impact of Domain-Specific External Knowledge on Enhanced Representations for NLI. Proceedings of Deep Learning Inside Out (DeeLIO): The 2nd Workshop on Knowledge Extraction and Integration for Deep Learning Architectures.

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

@inproceedings{bauer2021ernie,
  title = {{ERNIE-NLI: Analyzing the Impact of Domain-Specific External Knowledge on Enhanced Representations for NLI}},
  author = {Lisa Bauer, Lingjia Deng and Mohit Bansal},
  booktitle = {Proceedings of Deep Learning Inside Out (DeeLIO): The 2nd Workshop on Knowledge Extraction and Integration for Deep Learning Architectures},
  year = {2021},
  doi = {10.18653/v1/2021.deelio-1.7},
  url = {https://doi.org/10.18653/v1/2021.deelio-1.7}
}

↑ back to top

This page in Markdown https://md.research.elamur.ai/free/en/papers/bauer-2021-ernie-nli-analyzing-impact-domain/