METAPROBE : A Representation- and Task-Agnostic Probe (2023)

Abstract: Probing contextualized representations typically involves comparing task-specific model predictions against ground truth linguistic labels. Although this methodology shows what information can be recovered by a classifier, it does not reveal how a classifier uses the representation to make its decision. To address the latter problem, we ask: Do task-classifiers rely on representation- and task-independent geometric patterns in the embedding space? We explore this question by developing MetaProbe, an approach that uses geometric properties of representations to predict the behavior of task-specific classifiers (i.e., their predictions as opposed to the ground truth). Our experiments reveal the existence of universal geometric patterns across representations that can predict classifier predictions. Consequently, this allows us to posit a geometric explanation for the impressive performance of contextualized representations.

## introduction pre-trained contextualized representations (e.g., @xcite @xcite have advanced the stateof-the-art across nlp. unsurprisingly, probing representations, i.e., understanding what linguistic information they encode, and how they do so, has provoked much recent interest in the nlp research community (e.g., @xcite @xcite @xcite @xcite . although previous work undoubtedly helps understand contextualized representations, they suffer from two major drawbacks. first, they do not offer a justification of how classifiers trained on a representation arrive at their decisions. for example, the commonly used paradigm of classifier-based probing treats representations as black boxes, and relies on the final predictive performance to infer the knowledge encoded in them. second, since previous work probes representations individually, they do not uncover common patterns in classifiers' decisions across tasks and representations. the fact that most contextualized representations work well on across tasks @xcite leads us to conjecture the existence of universal patterns in the decision processes of classifiers that can be uncovered by examining representations. in this work, we ask: are there universal geometric patterns in how contextualized representations embed text that explain their impressive performance across tasks? to explore this question, we propose a new supervised probing paradigm that studies predictions of multiple task-specific classifiers (henceforth task-classifiers) based on geometric properties of representations. by mimicking the behavior of task-classifiers in this fashion, we discover and analyze the patterns in the representations that lead to task-classifier decisions. we present metaprobe, an instantiation of this idea of exploring universal geometric patterns in contextualized representations. given an unseen example and a representation, metaprobe estimates how probable it is for a trained task-classifier to predict each label. importantly, it does so only using features that use geometric properties of the representation and the task data. in other words, instead of trying to mimic the consensus of annotators as standard classifiers do, metaprobe mimics other classifiers trained on the same representation and data. this probability distribution, coupled with the choice of features, allows us to analyze the usefulness of a representation for predicting an example. for example, a uniform label distribution for an example indicates that the current representation is not informative for that example because classifiers will be maximally confused about it. metaprobe is a linear model; consequently, its parameters help understand which geometric properties are relevant for task-classifiers. our experiments on ten nlp datasets (covering five different tasks) and four contextualized representations reveal task-and representation-agnostic patterns in how the geometry of embeddings is employed by successful models. we show that these common patterns can serve as "zero-shot probes" for unseen tasks (manifested as datasets) and representations. finally, by inspecting the learned metaprobe parameters, we find that the taskclassifiers make their decisions using not only simple geometric properties such as distances between examples (which is usually employed by a nearest neighbor probe), but also more sophisticated geometric properties, e.g. involving potential changes to the decision surfaces that separate two different labels (which cannot be captured by a nearest neighbor probe). in summary, the contributions of this work are: ## two characteristics of representations contextualized representations have two characteristics: their predictiveness and their descriptive intrinsic properties. existing probing methodologies focus on one or the other @xcite . predictive probing involves training supervised classifiers to predict one or more specific linguistic properties using the given representations. representation quality is evaluated using various criteria, e.g. accuracy, complexity, etc., derived from the learned classifiers (e.g. @xcite @xcite @xcite @xcite @xcite . in contrast, descriptive probing looks into the intrinsic structure of representations @xcite @xcite , and focuses on discovering properties of the representation using cluster analysis @xcite or visualization technqiues @xcite . ## from descriptive properties to predictiveness in this section, we first present metaprobe, a linear model that uses the geometric features of a representation to predict the predicted label distribution (from §2.3) for an example. then, we introduce the geometric features we will explore in this work. finally, we describe details about the training process of metaprobe. ## representations and tasks in this section, we describe the english representations and tasks we will use in our experiments. representations. we conduct experiments on four english representations: roberta base , roberta large @xcite , distil-bert @xcite and elmo @xcite . as a group, they represent a diverse collection of architectures, pre-training methods, and pre-training data. their characteristics are summarized in appendix b. tasks. we investigate five different english nlp tasks represented by ten datasets, covering various usages of word representations, and diverse linguistic phenomena. we briefly describe them here and appendix a gives details about these tasks. preposition supersense disambiguation (ps) is a task of predicting supersense labels for singletoken prepositions. it involves two sets of labels: semantic role (ps-role) and semantic functions (ps-func). we use the annotation from streusle v4.2 corpus @xcite . part-of-speech tagging (pos) the task of predicting part-of-speech tags for each token in the sentence. we use the english portion of the parallel universal dependencies treebank (ud-pud, @xcite . text classification (tc) predicts a label for a piece of text. we use three datasets in this work: trec-6, trec-50 @xcite and atis @xcite . semantic relation (sr) involves predicting the semantic relation between a pair of nominals. we use three datasets for semantic relation task: conll04 @xcite , scierc @xcite and semeval 2010 task 8 (semeval) @xcite dataset. named entity recognition (ner) requires finding named entities in a sentence. in this work, we use the scierc @xcite dataset. the above datasets and representations are divided into training and test groups (shown in ## experiments and analysis in this section, we will look at the main findings obtained using metaprobe. across our experiments, we compare the performance of metaprobe against a linear probe and a nearest neighbor probe (1-nn). the linear probe baseline represents a general setting of predictive probing. the 1-nn probe builds upon the simplest geometric property: the distance between one unseen example and its closest labeled example. for efficiency, for metaprobe, we consider the closest @xmath0. 6 to account for outliers, we ignore clusters with fewer than two examples. note that we do not seek to build a better probe. instead, metaprobe provides a comparable performance and also exposes the more sophisticated geometric structures of the representations used by predictors, which other probing approaches that operate directly on embeddings can not reveal. ## conclusions a long list of probing work involves examining the predictiveness of linguistic properties, both syntax (e.g., kassner and schütze, 2020) and semantic (e.g., @xcite . to ease the uncertainty of training classifiers, @xcite propose to use controlled test sets to verify if the representations encode meaningful linguistic information. other work (e.g. @xcite proposed error analysis to reverse engineer the information encoded in representations. in this paper, we ask: are there universal geometric patterns in contextualized representations that can explain the decisions of task-classifiers? we answer the question by developing metaprobe, a linear probe that predicts trained classifier's predictions using the geometric features of the representations. via experiments, we verify the existence of universal patterns in contextualized representations that models exploit. the patterns learned by metaprobe can be used to make predictions on unseen tasks and representations. finally, by analyzing the learned weights, we show how geometric properties affect the decisions of task-classifiers.