Unsupervised Expressive Rules Provide Explainability and Assist Human Experts Grasping New Domains (2020)

Abstract: Approaching new data can be quite deterrent; you do not know how your categories of interest are realized in it, commonly, there is no labeled data at hand, and the performance of domain adaptation methods is unsatisfactory. Aiming to assist domain experts in their first steps into a new task over a new corpus, we present an unsupervised approach to reveal complex rules which cluster the unexplored corpus by its prominent categories (or facets). These rules are human-readable, thus providing an important ingredient which has become in short supply lately - explainability. Each rule provides an explanation for the commonality of all the texts it clusters together. The experts can then identify which rules best capture texts of their categories of interest, and utilize them to deepen their understanding of these categories. These rules can also bootstrap the process of data labeling by pointing at a subset of the corpus which is enriched with texts demonstrating the target categories. We present an extensive evaluation of the usefulness of these rules in identifying target categories, as well as a user study which assesses their interpretability.

## introduction a common scenario faced by subject matter experts tackling a new text understanding task is getting to know a new dataset, for which there is no labeled data. understanding the unexplored data, and collecting first insights from it, is always a slow process. often, the expert is trying to categorize the data, and potentially build a system to automatically identify these categories. for example, an expert may be looking at customer complaints, aiming to understand their types or categories, and then building a system that will categorize complaints. or she may be analyzing contracts, aiming to identify the types of legal commitments. in other cases, the expert may be trying to identify a certain class of texts, and this class may be composed of unknown underlying sub-types or categories. consider a data scientist looking for all * first two authors equally contributed to this work. when facing a new task, with no labeled data, but with domain expertise, a practical first step is to manually write rules that identify some texts from a certain category the expert is aware of and aiming to identify (e.g., a certain complaint type). with these seed examples, experts can better understand the occurrences of the target category in the new corpus, and use them as the initial set of labeled examples, towards the goal of having enough labeled data to facilitate supervised learning. however, oftentimes, the categories underlying the data are not known a-priori, and may be a part of what the expert aims to identify (e.g., what are the types of complaints). since new data may mean new underlying categories, domain adaptation is not always applicable, and often results in unsatisfying performance @xcite . in this paper, we present a method for generating initial rules automatically, with no need for any labeled data, nor for a list of categories. our method, grasp lite , is based on grasp @xcite . grasp is a supervised algorithm that finds highly expressive rules, in the form of patterns, that capture the common structures of a category of interest. grasp requires a set of texts in which the target category appears and a set in which it does not. grasp lite is an unsupervised version of grasp, that requires no labeled data and no prior knowledge. instead, grasp lite takes a background corpus and contrasts it with the new corpus, the foreground corpus. by this, it reveals rules which capture sentences that are common in the foreground but not in the background. such sentences are expected to be correlated with (at least some of) the unique categories in the foreground -the new corpus. examples of such rules are given in for example, employer always prefer to for instance, several teenagers play games as a matter of fact, women have proved (a written entity, followed by a noun, and a verb for he/she/it in present tense) tos unfair clauses 13 14 15 we may take any of these actions at any time suspend your access to any of the no liability to you or any third party [ndet syntactic relation] + @xcite (a noun determiner, followed by the word "any") naturally, rules generated without supervision would be noisy. in addition, the rules revealed by grasp lite capture a mixture of the categories that exist in the foreground corpus, some of which may be irrelevant for the task at hand. we, therefore, suggest grasp lite as a preliminary automatic step which provides input for the human expert, without any input needed beyond the corpus of text. as rules are human-readable, and each one provides an explanation for why it clusters sentences together, experts can identify the subset of rules which, together, best capture the sentences of their category of interest. experts can also be inspired by the rules suggested by grasp lite , manually edit rules to better fit their needs, merge elements from several rules into new rules, or improve their own manual rules with generalizations offered by the suggested rules. in other words, grasp lite is a way to alleviate the blank canvas problem and to expedite the expert's work. the rules identified by grasp lite not only elucidate the underlying categories and facilitate rulebased algorithms, but also provide the benefit of explainability. that is, the human expert can now explain why a text is classified as a complaint and why it is in a certain complaint category. we extensively evaluate grasp lite over datasets from different domains, and show that the rules it generates, without being exposed to the datasets' categories, can help identify these categories. we further present a user study which validates the explainability power of grasp lite rules. ## grasp lite when facing a new task with new data, it is useful to have a tool which can quickly highlight some interesting aspects of these data. such a tool must work with minimal prerequisites, as often we have little information about the new data. this is what our proposed method, grasp lite , aims to provide. grasp lite is based on grasp @xcite , an algorithm for extracting highly expressive rules, in the form of patterns, for detecting a target category in texts. a good rule is one that captures different realizations of the target category. for example, humans reading 1-3 in to achieve this goal, grasp extracts patterns that characterize a target linguistic phenomenon (e.g., argumentative sentences). its input is a set of positive examples (in which the phenomenon appears) and another set of negative examples (in which it does not). first, all terms of all examples are augmented with a variety of linguistic attributes. attributes are any type of term-level information, such as syntactic information (e.g., part-of-speech tag, information from the parsed tree), semantic (e.g., is the term a named entity? what are its hypernyms?), task-specific (e.g., is the term included in a relevant lexicon?), and more. next, grasp greedily selects top attributes according to their information gain with the label. these attributes make the alphabet. patterns are grown in iterations by combining attributes of the alphabet with shorter patterns from the previous iteration. at the end of each iteration a greedy step keeps only the top patterns (by information gain). in this work, we use a commonly available attribute set, which includes the surface form of the term, pos tags, named entity recognizer, word-net @xcite , and a sentiment lexicon. we used the same set of attributes throughout our experiments, but one can add specific ones or rely on different technologies to extract them (e.g., a new parsing technology). see rule examples in as the rules are human-readable and expose common structures in the data, they can expedite the process of getting to know it, especially when addressing novel domains. an entry barrier is that grasp requires labeled data which may not be available for a new domain. grasp lite aims to lift this barrier by providing a method to generate the two input sets for grasp, with no labeled data. it achieves that by setting a more modest goal -instead of discovering rules describing common structures of a target category, grasp lite aims to discover rules describing non-trivial structures which capture some repeating meaning, or category. however, these rules must not overfit the available data. to achieve this goal, grasp lite contrasts the available data, the foreground corpus (which serves as the positive set), with a background corpus (used as the negative set) in which the categories of interest are expected to be significantly less prominent. with these two input sets, the regular grasp can be applied. by the nature of weak supervision, the foreground is not guaranteed to contain only positive examples (same for background and negative). however, we hypothesize that it is enough for a phenomenon to be more prominent in the foreground than it is in the background, for the regular grasp to extract rules that characterize it. this way, by discovering rules for repeating meaningful structures which tend to appear in the foreground corpus more than in the background corpus, grasp lite describes the common and unique categories of the available data. next, we describe two methods to obtain a background corpus. general english a simple choice is to take random texts of the language of interest. we sampled 50,000 sentences from a news-domain corpus. in many cases, such a corpus is, on the one hand, different enough from the domain corpus (so can be assumed to be less enriched with the target category), and on the other hand, similar enough so as not to make the discrimination task of grasp lite trivial (which will result in non-informative rules). however, in other cases, such a random sample of texts would not yield a suitable background corpus. for a distinctive domain corpus, legal contracts for example, contrasting it with a general english background will mostly bring up the legal jargon which is very common in the domain and rare in general english. the structures of legal commitments, a potential target category, would be obscured by this specificity of the domain. thus, another method is needed, one which builds a background corpus from the domain corpus itself. in-domain split for those cases, in which a general english background is too distinct from the foreground corpus, we suggest splitting the domain corpus itself into foreground and background. in this in-domain split the language style in the foreground and the background are similar, thus it avoids the risk of discovering rules that simply capture stylistic differences between the two parts. if the expert has some knowledge about the new domain, it can be used to come up with a heuristic to split the new corpus. as an example of knowledgeable in-domain split we take the argument mining task. argumentative sentences, aiming to persuade, ought to be well structured, to be easily understood by an audience, and often include foreshadowing hints, to guide the audience through the full argument. we hypothesize that such structures are more likely to be found in the beginning of a sentence, rather than in its end. based on this hypothesis, the foreground is made of the first halves of all sentences in the corpus, while the background is made of the second halves. we used this split method as an example in the analysis in §5.3. if no heuristic can be found for the dataset, we suggest splitting it based on an unsupervised clustering method. the expert examines the clusters and chooses as the foreground one cluster which seems to contain many sentences of the target category. this selection does not have to be optimal (i.e., choosing the cluster with the most relevant sentences). it is enough that the prior for the target category in the selected cluster would be considerably higher than the prior in the entire corpus. the rest of the clusters are used as the background. ## datasets to demonstrate that grasp lite rules are useful across domains, we evaluate them on 10 datasets and 26 target categories. the list of datasets, detailed next, contains both written and spoken language, from sms messages with informal abbreviations, through posts of movie reviews, to formal protocols and legal documents written by professionals. in addition, both clean text and noisy automatic speech recognition (asr) output are being used. the datasets' categories, sizes and download links are provided in appendix a. subjectivity @xcite subjective and objective movie reviews automatically obtained from rotten tomatoes and imdb. polarity @xcite positive and negative automatically derived movie reviews. ag's news a large-scale corpus of categorized news articles. we used the description field of the version released by @xcite . ## evaluation as described, the goal of grasp lite is to alleviate the blank canvas problem when facing new unlabeled data, and to expedite the expert's work. the experiments described next aim to show that the list of rules grasp lite discovers can be useful at the hand of experts. we do not propose utilizing this list directly to classify sentences. rather, we propose that an expert considers the list of rules and uses her expertise to gain insights and create rules for the task at hand. the expert can either consider a rule directly, or gain insights by looking at several sentences in the new data which a rule captures. the expert can then filter noisy rules, combine rules to create new ones, fine tune rules, and much more. eventually, interacting with the list of rules generated by grasp lite should help her understand the underlying categories and design rules that correspond to categories of interest. ## analysis after demonstrating the potential of grasp lite in the quantitative results, we turn to a qualitative analysis. it is hard to experimentally quantify the contribution of grasp lite rules for human experts. in §5.4 we present a user study which shows that grasp lite model is indeed human-readable and provides explainability for its decisions. in the next three sections, we show a recurrent ability of grasp lite rules to capture a semantic meaning which is commonly used in a given domain, and to generalize its different formulations in it. for example, the first rule in ## related work our work provides a method to explore new data. in statistics, the field of analyzing new datasets is called exploratory data analysis @xcite . in nlp, such work is less common and characteristics of each dataset, task or domain are extracted independently @xcite . this has the benefit of gaining a deep understanding of each task. for instance, the work on translation divergences @xcite ) that aims to better explain translation to support system development later on. research about patterns and expert crafted rules was popular in the past @xcite @xcite and is still found useful nowadays; for enhancing embeddings @xcite , filtering noise in crawled data @xcite , as a component within large pipelines @xcite or by itself in textrich domains @xcite . using domain expertise to categorize and understand a new domain is often the first practical step to apply in other fields too, which may devise rules for that purpose @xcite @xcite . with the increasing use of ai, a new field is emerging -explainable ai (xai). it is concerned with how to understand models' inner workings. lime @xcite attempts to explain predictions by perturbing the input and understanding how the predictions change. other works use attention as a mechanism to interpret a model's prediction (see e.g., @xcite , who propose to interpret the intermediate layers of dnn models by visualizing the saliency of attention and lstm gating signals). a survey of the xai field for nlp does not exist but see @xcite for surveys of the xai field in general. we show in this paper that grasp lite is interpretable by human users and is thus interesting for the xai community. ## conclusions we present grasp lite , an unsupervised, explainable method, which does not require substantial computing resources, and can expedite the work of human experts when approaching new datasets. we describe two methods for obtaining the background and foreground corpora which grasp lite relies on, and compare them. we note that our method is not limited to any specific language. all grasp lite needs is a few basic text processing tools. examining numerous datasets, we demonstrate that with no labeled data, nor any information about the categories underlying these datasets, grasp lite is able to identify indicative rules for a wide variety of categories of interest. our analysis shows that these rules often capture a common semantic meaning which can be realized in many different ways in the data. finally, a user study further shows that these expressive rules provide valuable explanations for classification decisions. finally, the fact that grasp lite was found useful for most of the 26 categories on which it was evaluated (despite their difference) increases our belief that it can be very practical for your next dataset. asrd: https://www.research.ibm.com/ haifa/dept/vst/debating_data.shtml (look for the debate speech analysis section). essays: https://www.informatik. tu-darmstadt.de/ukp/research_6/ data/index.en.jsp holj: https://www.inf.ed.ac.uk/ research/isdd/admin/package? @xmath0: https://www.unige. ch/cisa/research/ materials-and-online-research/ research-material/ . polarity: http://www.cs.cornell.edu/ people/pabo/movie-review-data/ . sms spam: http://www.dt.fee.unicamp.br/ ˜tiago/smsspamcollection/ subjectivity: http://www.cs.cornell.edu/ people/pabo/movie-review-data/ . tos: http://claudette.eui.eu/tos.zip wiki attack: https://figshare.com/ articles/wikipedia_talk_labels_ personal_attacks/4054689 . we present in