Explaining the Hardest Errors of Contextual Embedding Based Classifiers (2024)

Abstract: We seek to explain the causes of the misclassification of the most challenging documents, namely those that no classifier using state-of-the-art, very semantically-separable contextual embedding representations managed to predict accurately. To do so, we propose a taxonomy of incorrect predictions, which we used to perform qualitative human evaluation. We posed two (research) questions, considering three sentiment datasets in two different domains – movie and product reviews. Evaluators with two different backgrounds evaluated documents by comparing the predominant sentiment assigned by the model to the label in the gold dataset in order to decide on a likely misclassification reason. Based on a high inter-evaluator agreement (81.7%), we observed significant differences between the product and movie review domains, such as the prevalence of ambivalence in product reviews and sarcasm in movie reviews. Our analysis also revealed an unexpectedly high rate of incorrect labeling in the gold dataset (up to 33%) and a significant amount of incorrect prediction by the model due to a series of linguistic phenomena (including amplified words, contrastive markers, comparative sentences, and references to world knowledge). Overall, our taxonomy and methodology allow us to explain between 80%-85% of the errors with high confidence (agreement) – enabling us to point out where future efforts to improve models should be concentrated.

## introduction in a scenario where the amount of user-generated content is growing exponentially, automatic text classification (atc) plays a vital role in enabling automatic categorization of texts into different semantic groups based on their distinctive characteristics @xcite . the state-of-the-art in atc is currently provided by attention-based transformer methods (e.g., bert @xcite , roberta @xcite , bart @xcite ), which produce contextual representations of words and documents. indeed, in de @xcite , the authors show that these contextual representations are so (semantically) separable in the embeddings space that any classifier using them achieves similar effectiveness, no matter how simple (e.g., a nearest-centroid classifier) or complex it may be (e.g., a gradient boosted decisions tree or a support vector machines). some of the results obtained in that study are the highest (state-of-theart) ever reported in the literature for effectiveness (e.g., macro-f1) in several experimented datasets. with such powerful text representations and results, sometimes achieving or even exceeding human parity @xcite , a main question that arises is: are we approaching the limits of what can be automatically classified by a machine learning model? this article delves deep into this question by analyzing the reasons for misclassification by classifiers using these powerful contextual representations. we go one step further to advance the literature and look into the hardest cases, i.e., documents that none of the strongest classifiers explored in the aforementioned study, using contextual embedding-based representations, was able to classify correctly. a thorough review evidenced that this type of error or misclassification analysis is rarely performed in the literature, with a few exceptions @xcite . misclassification analysis serves the purpose of revealing the how's and why's behind model (or human) failure. one of the main difficulties in performing such an analysis is the lack of standardized methodologies and methods for doing so. accordingly, one of our contributions is the proposal of a misclassification taxonomy capable of categorizing incorrect predictions upon classifiers application. we propose and evaluate an error taxonomy using a document sample for which no classifier was able to produce correct predictions. due to the very complex nature of the error analysis task, we adopt bert to generate contextual document representations foot_0 . we evaluated the proposed taxonomy with a different sample of erroneous documents, using human evaluators with different backgrounds to assess how effective and useful the taxonomy is in explaining the errors. unlike previous work @xcite )which focuses on assessing the impact of "hard" instances on the effectiveness of polarity detection using a single dataset (movie reviews) and not concerned with textual representation -here we focus on analyzing and quantifying the reasons for the misclassification of the hardest documents by all machine learning methods using some of the most separable representations in the literature. for this, we used datasets from two domains: movie and product reviews. we also compare and contrast the results in these two domains, gathering insights into the differences in the type of errors found in each of them. the main questions we seek to answer are: [rq1] is the proposed taxonomy effective for misclassification analysis? to answer rq1, we analyze evaluators' responses regarding their level of agreement -the higher the agreement, the more effective the taxonomy. we analyze inter-evaluator agreement and correlate that with hardness in classifying; and [rq2] can the proposed taxonomy be used to reveal the main reasons for misclassification? are there significant differences in the results between different domains? in rq2, drawing on the consensus achieved, we quantify and analyze the main reasons for the misclassification, highlighting the differences between domains. our experiments engaging eight human evaluators with two different backgrounds (computer science and linguistics) and three datasets, two in the movie reviews domain and one in the product reviews domain, revealed that (i) the developed taxonomy proved effective, with an inter-evaluator agreement of over 81% for error category -this suggests that evaluators find it relatively easy to identify classification errors using the proposed taxonomy; (ii) between 50%-80% of the errors can be ascribed to the model for reasons further explained below; (iii) the evaluators found a sig-nificant amount of incorrect labels in the dataset -, i.e., there were incorrect labels in the gold datasetsaround 33% of the documents in the product dataset and 16% in one of the movie datasets; (iv) in movie reviews, sarcasm foot_2 (> 23% of the cases) is considered a major reason for incorrect prediction by the model, while (v) in product reviews, the main reason is ambivalence (40% of the cases) -we believe this is a particular characteristic of this domain. the remaining model errors were considered instances of "incorrect prediction despite available textual cues" ascribable to a series of language phenomena, including amplified words, contrastive markers, comparative sentences, and world-knowledge regarding named entities. while for product review, the model errors are mostly associated with comparisons and contrastive cases, for movie scenarios, world knowledge, use of amplifiers and idiomatic/new expressions are issues in the model's incorrect predictions. our results can be potentially leveraged for model enhancement focused on the application domain. in sum, our main contributions include: (i) the development and evaluation of a taxonomy for categorizing the main causes for misclassification of the hardest documents; ii) a fine-grained analysis of the results of a comprehensive qualitative experiment applying the taxonomy to 3 different datasets in 2 different domains, with relevant implications for the improvement of the next generation of textual classifiers and representations; and (iii) a release of a new dataset of challenging documents manually annotated by humans. ## related work in @xcite , five categories for misclassification of objects in images are explored (see appendix a.3 for evaluation schema). @xcite categorized prediction failures in textual documents by defining four error categories (see appendix a.3 for schema), focusing on the lack of training information. @xcite assesses the impact on labeling of (i) time allocated to evaluators; and (ii) the order of annotations in the labeling task. unlike these works, we propose a taxonomy for atc test errors and investigate a more comprehensive set of reasons, focusing on the hardest cases for classifiers using state-of-the-art, very separable (contextual) representations by means of qualitative human assessment. bras et al. (2020) remove bias in training to reduce misclassification. pleiss et al. (2020) propose adapting the area under the margin to identify training data that preclude generalization. both focus on the training set to identify (challenging) documents that do not contribute to the learning process. instead, we focus on misclassification at inference time (test set), aiming to identify common characteristics of misclassified documents. swayamdipta et al. (2020) present a tool to characterize and diagnose datasets regarding the behavior of the model on individual instances during training. ethayarajh et al. (2022) seek to find challenging documents using v-usable information. differently, we find challenging documents based on their incorrect classification by four classifiers using a very separable contextualized representation as input. moreover, unlike ethayarajh et al. (2022), who do not provide qualitative experiments involving human evaluation and swayamdipta et al. (2020), who evaluate human mislabeling only, we evaluate both automatic and human mislabeling. martins et al. (2021) analyze a set of hard instances (evaluation schema in appendix a. ## experimental methodology our methodology, which comprises seven steps, is summarized in figure 1 . the text and label for each document are used as input for fine-tuning a transformer model, resulting in an encoder that produces contextual embedding vectors representing the documents using the cls approach. we employ various classifiers with these embeddings as input, exploring different underlying techniques. from this set of classifiers, we select the set of documents for which none of the classifiers was able to produce correct predictions (according to the labels assigned in the datasets). within this set, we sample documents for analysis to outline misclassification categories ("development of the misclassification taxonomy" in figure 1 ), which human evaluators will apply to evaluate documents in a second sample different from the first one ("application of the misclassification taxonomy to evaluate documents" in figure 1 ). upon applying the taxonomy, we quantify the results and evaluate its efficiency. a detailed account of the steps follows. ## results documents were assessed by 4 evaluators. question 1 required selecting 1 out of 3 alternatives, whereas question 2 had 6 alternatives. focused categorization comprised 10 categories. consensus was defined as one of the alternatives having the majority of votes -4, 3, or 2 foot_5 . if there was no majority, a document was classified as "no consensus". ## conclusion we addressed the hard task of unveiling the reasons why models misclassified the hardest documents, those which no classifier using very separable contextual representations could correctly classify. for this, we devised an error taxonomy and ran qualitative experiments requesting 8 evaluators with distinct backgrounds to use the taxonomy to qualify the errors using 3 datasets in 2 domainsprior work has been limited to a single domain or dataset. the high consensus among the evaluators emerged as an interesting finding. we have found significant differences regarding reasons for misclassification in the product and movie review domains. sarcasm is very pronounced in movie reviews, while ambivalence is more prevalent in product reviews. there is a high proportion of wrong labels in the gold dataset and a noteworthy number of incorrect model predictions due to various linguistic phenomena, including comparisons, contrastive constructions, negation and instances requiring world knowledge. no single category emerged as dominant. future work includes explaining the few remaining unexplained cases; applying our methodology/taxonomy to other domains (e.g., topic classification); and using acquired knowledge to improve models. additionally, we intend to investigate current models, such as large language models (llms), in classification tasks, assessing the potential of these models to address the issue of misclassification presented in this paper.