Discover, Explain, Improve: An Automatic Slice Detection Benchmark for Natural Language Processing (2023)

Abstract: Pretrained natural language processing (NLP) models have achieved high overall performance, but they still make systematic errors. Instead of manual error analysis, research on slice detection models (SDMs), which automatically identify underperforming groups of datapoints, has caught escalated attention in Computer Vision for both understanding model behaviors and providing insights for future model training and designing. However, little research on SDMs and quantitative evaluation of their effectiveness have been conducted on NLP tasks. Our paper fills the gap by proposing a benchmark named “Discover, Explain, Improve (DEIm)” for classification NLP tasks along with a new SDM Edisa. Edisa discovers coherent and underperforming groups of datapoints; DEIm then unites them under human-understandable concepts and provides comprehensive evaluation tasks and corresponding quantitative metrics. The evaluation in DEIm shows that Edisa can accurately select error-prone datapoints with informative semantic features that summarize error patterns. Detecting difficult datapoints directly boosts model performance without tuning any original model parameters, showing that discovered slices are actionable for users.1

## introduction while deep learning models @xcite @xcite achieve high overall performance on many tasks, they often display systematic errors @xcite @xcite correlated with biases, challenging data points, and data collection issues. investigating these errors and their associated features is crucial for understanding models' strengths and weaknesses. although manual error analysis is typically employed for identifying biases and erroneous behaviors, its efficiency and quality are limited. consequently, automatic slice detection models (sdms) are motivated to streamline the analysis process by identifying systematic errors in any trained machine learning model @xcite @xcite , based on the observation that representations of error instances may share features and thus similar to each other. in sdms, a slice refers to a set of datapoints sharing a specific attribute. an error slice is a slice characterized by low accuracy @xcite . identifying these error slices serves three primary purposes: (1) locating error-prone datapoints to enable direct prediction adjustments, (2) gaining insights into model behavior to foster better comprehension and interpretation, and (3) guiding additional model training through strategies such as slice-specific modeling, data augmentation, and active learning. therefore, an effective slice detection model should (1) accurately locate error-prone data points, (2) offer coherent error slices which help yield intelligible error-correlated features, and (3) enhance model performance when complemented with suitable tools. in this study, we introduce a comprehensive benchmark that assesses sdms with three modules: namely, discover, explain, and improve, each of which corresponds to a point previously discussed. we also propose a new sdm edisa to serve as a baseline on the benchmark. the usage of edisa and the evaluation pipeline of the benchmark deim are depicted in figure 1 . here we briefly introduce the three modules. as m. the evaluation of the discovery capability is straightforward, which verifies whether the located error-prone datapoints are indeed mispredicted by m. in the example in figure 1 , one sentence classified to ψ 1 and three sentences classified to ψ 2 are deemed as error-prone. explain: this module employs linguistic tools to articulate why a model fails on a given error slice, consolidating the reasons into humancomprehensible concepts. for each identified error slice, it discerns linguistic features that occur substantially more often within the slice. these features potentially elucidate why the model inaccurately predicts these data points. in figure 1 , sentences in ψ 1 all contain gerund (verbal ending in -ing that functions as a noun) as sentence subject, indicating that it is likely to be the reason why these datapoints are mispredicted. in order to assess the cohesiveness of the discovered error slices, we evaluate measures such as homogeneity and completeness of each slice with respect to their error-correlated features. improve: this module showcases how model improvement is realized based on discovered error slices utilizing three techniques: selective prediction @xcite , flipping, and active learning. for instance, as shown in figure 1 , we invert the prediction for each identified error-prone data point. these three model improvement methods also serve as external evaluations of sdms. to verify the usefulness of the discovered error slices, we examine whether the model's performance escalates after implementing these techniques. in the three-module benchmark deim, each module concentrates on one specific application of an sdm: (1) detection of error-prone data points, (2) interpretability of error slices, and (3) improvement of model performance. each module provides evaluation tasks with the necessary tools and quantitative metrics. each module incorporates evaluation tasks equipped with essential tools and quantitative metrics. experimental results on edisa indicate that it can effectively identify error-prone data points in unlabeled datasets and precisely detect error-correlated features, which contribute directly to enhanced model performance. the paper is organized as follows: section 2 discusses recent work on slice detection models; section 3 introduces the model structure of edisa model. section 4 presents the details of the deim benchmark and all relevant tools. section 5 presents experiment results and relevant ablation studies. section 6 concludes this paper. however, as far as we know, there has not been a comprehensive evaluation benchmark that circumvents all the aspects of sdm in nlp. therefore in this project, we contribute to the research area by designing a benchmark deim for all classification tasks: it provides (1) task-independent comprehensive linguistic feature benchmark for potential explanations, (2) quantitative experiments for both error slice quality and error-prone datapoints detection efficacy in unlabeled datasets, and (3) corresponding metrics that facilitate future development. we also propose a new sdm model edisa which performs fairly well to serve as the sdm baseline for deim benchmark in nlp field. its simple structure and promising results show a good prospect of this field. ## edisa model the edisa model is a new model that we proposed for slice detection in nlp. this section describes the model structure, training objective, and inference procedure of edisa. subsequently, we compare this model with the current state-of-the-at sdm model domino @xcite to underscore why such model structure design is necessary. in edisa, we posit the existence of a set of k interpretable slices, each distinguished by one or more crucial features that differentiate the slice from other data points. edisa specifically focuses on error-correlated features, that is, features co-occurring with incorrect predictions. thus, for the same task and dataset, the set of features and the k slices may vary with respect to different nlp models. the objective of an sdm is to identify these k slices for a trained m in an unsupervised manner. ideally, the discovery of these k slices requires a sufficiently large dataset where both input information and model prediction information are accessible. we mimic this setting by providing a labeled validation dataset, aiming to identify the k slices within it. to formally introduce the model, edisa can be seen as a function g that takes in a trained nlp model m and a labeled dataset d to generate k slicing functions ## deim benchmark the deim benchmark evaluates the performance of a tuned sdm. this section elaborates on the specifics of the three modules within the deim benchmark: (1) the process of error-prone data point detection (discover), (2) the manner in which explanations are delivered (explain), and ## experiment result this section presents experiment results for all three modules on edisa. it illustrates how this benchmark should be used and also demonstrates that edisa is able to cluster error datapoints with similar features and detect error-prone datapoints accurately. we apply deim on a variety of datasets in glue benchmark @xcite and kaggle dataset jigsaw: foot_3 cola, qnli, qqp, sst-2, mnli, sst-5, jigsaw-gender, jigsaw-racial, jigsaw-religion. since glue test dataset labels are not publicly available, we split the original training dataset into training and validation, and treat the original validation dataset as a test dataset. for each dataset, we train three models based on three widely used models: bert-large, roberta-large, and electra-large-discriminator with the following hyperparameters: {batch @xmath0, learning @xmath1, warm up @xmath2.1, @xmath3, gradient @xmath4.0, dropout @xmath5.1}. all models are trained on one a5000 gpu. to evaluate the performance of deim, we apply edisa on each of the trained models and evaluate on results from these models. ## conclusion in this paper, we take the first step to build a comprehensive slice detection framework deim on nlp with principled evaluation tasks, linguistic tools, and metrics. it discovers error-prone datapoints, clusters datapoints in an error slice under the interpretable concept, and directly improves model performance on unlabeled datasets. it shows that discovering error slices can provide not only insights into model behaviors but also actionable and automatic model improvement methods. experiments show that edisa is a more efficacious model than current baselines. we hope this benchmark can facilitate further research in sdm.