Does BERT Know that the IS -A Relation Is Transitive? (2022)

Abstract: The success of a natural language processing (NLP) system on a task does not amount to fully understanding the complexity of the task, typified by many deep learning models. One such question is: can a black-box model make logically consistent predictions for transitive relations? Recent studies suggest that pre-trained BERT can capture lexico-semantic clues from words in the context. However, to what extent BERT captures the transitive nature of some lexical relations is unclear. From a probing perspective, we examine WordNet word senses and the IS-A relation, which is a transitive relation. That is, for senses A, B, and C, A is-a B and B is-a C entail A is-a C. We aim to quantify how much BERT agrees with the transitive property of IS-A relations, via a minimalist probing setting. Our investigation reveals that BERT’s predictions do not fully obey the transitivity property of the IS-A relation.

## introduction the is-a relation denotes a subclass relation. if a is-a b, then the concept a is a subclass of the concept b, or a is subsumed by b. the is-a relation is frequently encoded in lexical taxonomies. the is-a relation has great significance since it empowers generalization, and generalization is at the core of machine inference for text understanding. the is-a hierarchy is inherently transitive, i.e., for three concepts (or word senses) a, b, and c, a is-a b and b is-a c entail a is-a c. for example, knowing that humanoid is a type of automaton, and automaton is a type of artifact, then by transitivity, the relation humanoid is an artifact also holds. the concept of transitivity is easy to comprehend by humans. however, deep learning models, including pre-trained language models such as bert @xcite , are known to lack some human-level generalization capacities in text understanding, or it may show some capacities for making correct predictions but for the wrong reasons, including being insensitive to negation and exploiting only surface features @xcite , lacking understanding of perceptual properties @xcite , and surface form competition @xcite . despite the issues raised above, previous work has shown that bert's layers align with the nlp pipeline, and representations in the different layers of bert are found to capture different levels of textual understanding, from syntactic (e.g., partof-speech tagging) to semantic (e.g., semantic role labeling) as the layers go from the lower to higher layers @xcite . recent studies also suggest that bert can capture lexical relation clues from words in contexts @xcite . researchers begin to recognize bert as an open knowledge source and query bert for information @xcite . moreover, bert, even without fine-tuning on downstream tasks, possesses a fair ability to produce contextualized embeddings that cluster to word senses @xcite @xcite . these findings suggest that bert has some understanding of the building blocks of language. following these findings, since an is-a taxonomy can be built on top of explicit word senses, do contextualized embeddings learned from bert for word senses (in particular contexts) respect the properties of the is-a taxonomy, specifically transitivity? that is, does bert make logically consistent predictions that enforce the transitivity constraint of the is-a relation? in this paper, we introduce a minimalist probing method to investigate whether bert knows that the is-a relation is transitive. we first quantify how well bert predicts the is-a relation. next, we measure the extent to which bert enforces the transitivity constraint. that is, given that bert predicts a is-a b and b is-a c, does it then predict a is-a c? in our work, we make use of wordnet @xcite and propose a method to sample word sense pairs with contexts from wordnet example sentences to build a probing dataset. we use a nearest neighbor classifier for probing, which does not require any parameter tuning. our findings indicate that bert can predict is-a relations with an accuracy score of 72.6%. however, when bert predicts a is-a b and b is-a c, it only predicts a is-a c 82.4% of the time. this suggests that simply treating bert as is as a knowledge base @xcite is not completely satisfactory, and additional work needs to be done to incorporate the transitivity constraint in natural language inference when using bert. ## related work a key weakness of deep learning models is that they are black-box models and do not offer explainable and interpretable predictions. this has led to a large body of research regarding their interpretability @xcite . the pre-trained language model bert has been extensively analyzed since its release. in particular, feature-based probes have been proposed to show how a particular layer, head, or neuron of bert works on a downstream nlp task. usually with a small set of additional parameters, a probe is trained in a supervised manner using feature representations from the pre-trained bert, e.g., contextualized embeddings, to solve a particular task @xcite . attention and structural probes have been invented to investigate different aspects of bert and linguistic properties @xcite @xcite @xcite @xcite . latent ontology of contextual embeddings has also been investigated via cluster analysis @xcite . on probing contextualized representations for lexico-semantic relations, previous studies have investigated bert for lexical relation classification via a neural network probe on type-level embeddings @xcite . our work differs from prior work by our goal to explicitly investigate how much bert understands the is-a relation and more importantly, obeys the transitivity constraint. that is, we aim to determine if and how often bert makes logically consistent predictions for the is-a relation. moreover, we focus on investigating sense-based is-a relation, which is associated with explicit word senses in their contexts, so contextualized embeddings can be clearly mapped to word senses. ## experimental setup we probe if and how well bert can predict the is-a relation and its transitivity. task definition for a dataset of interest, we denote it as ## conclusion in this paper, we have investigated how much bert agrees with the transitivity constraint of the is-a relation, via a minimalist probing setting. our findings indicate that although bert can predict is-a relations to some extent, it does not always make logically consistent predictions. allowing bert and more generally neural network models to enforce the transitivity constraint of the is-a relation would be a worthy future research goal. besides the is-a relation, there are other transitivity relations like after, before, larger than, smaller than, etc. it would also be interesting to investigate to what extent bert also enforces or fails to enforce these other transitivity relations in future work.