Effective Proxy for Human Labeling: Ensemble Disagreement Scores in Large Language Models for Industrial NLP (2023)

Abstract: Large language models (LLMs) have demonstrated significant capability to generalize across a large number of NLP tasks. For industry applications, it is imperative to assess the performance of the LLM on unlabeled production data from time to time to validate for a real-world setting. Human labeling to assess model error requires considerable expense and time delay. Here we demonstrate that ensemble disagreement scores work well as a proxy for human labeling for language models in zero-shot, few-shot, and fine-tuned settings, per our evaluation on keyphrase extraction (KPE) task. We measure fidelity of the results by comparing to true error measured from human labeled ground truth. We contrast with the alternative of using another LLM as a source of machine labels, or ‘silver labels’. Results across various languages and domains show disagreement scores provide a better estimation of model performance with mean average error (MAE) as low as 0.4% and on average 13.8% better than using silver labels.

## introduction we have recently seen significant progress on many natural language processing (nlp) tasks using the latest generative pretrained models such as gpt @xcite , palm @xcite , and many others @xcite @xcite . this new generation of models opens up many new possibilities including competitive performance in zero-shot and few-shot settings for tasks that have typically been modeled using a supervised setting @xcite . more established language models (bert @xcite , roberta @xcite , xlm-roberta @xcite , etc.) provide a strong balance of inference cost and task performance for such systems. this broad class of large language models (llms) used for complex supervised nlp tasks share the problem of how to effectively assess performance in production settings where we don't yet have human labels due to cost or urgency. the ability to judge model capability becomes important for production settings where we often have to decide whether to launch a model in a new domain or for a new language where we have few or no labels ready. this is also known as few-shot and zero-shot performance, respectively. scaling models up to new domains and new languages quickly becomes an expensive proposition in terms of labeling. for example, if we have two new domains and ten languages, this results in twenty new label sets that need to be generated. having the capability to guide that investment or possibly eliminate the need for extensive human labeling for some subset of those domains/languages becomes very valuable. there have been many approaches to assess the performance of llms without human labels, including efforts to assess the performance of taskspecific models. @xcite ) explored evaluating fine-tuned question answering models on out of domain data, relevant to question answering problems. more recently, @xcite creates a meta-model responsible for predicting the accuracy of the llm model using the model's confidence scores as features. methods from the computer vision (cv) domain to assess unlabeled data more generally have, for example, proposed the average threshold confidence method that learns a threshold over the model's confidence, predicting accuracy as the fraction of unlabeled examples exceeding that threshold @xcite , or iteratively learn an ensemble of models to identify misclassified data points and perform self-training to improve the ensemble with the identified points @xcite . however, the metrics and hyperparameters in previous works are specifically for classification tasks and cannot be easily extended to more complex tasks. we propose adapting disagreement scores in @xcite , also from the cv domain, to assess model quality for these supervised nlp tasks. a disagreement score is computed by first training a well-calibrated ensemble of models and then measuring how similar their respective predictions are on the same input. the intuition is that models will agree on highly confident (likely correct) predictions and disagree on less confident (likely wrong) predictions. one way to develop a well calibrated ensemble is to train the same model on the same dataset but changing initial random seed among the ensemble members, as proposed in @xcite for the cv domain. in this paper, we adapt the same approach for the nlp tasks to understand the prediction performance across different domains (survey responses, conversation text, and social media chats) and languages. inspired by the latest work on llms, as another alternative to human labeling, we explore leveraging a few-shot gpt-4 as an oracle model to provide a 'silver label'. we find that disagreement scores of a well-calibrated ensemble work better at predicting a single model's performance for a complex keyphrase extraction task (kpe) than gpt-4 as an oracle model. our evaluation comparing xlm-roberta @xcite , @xcite , and gpt-4 models @xcite shows that disagreement scores provide estimation of model performance with mean average error (mae) as low as 0.4% and on average 13.8% better than using silver labels. we define d be a distribution over x ×y, where x is the space of input features to the model and y the space of output values from the model. let (x, y ) denote the random variable from d and (x, y) be sampled values taken from d. let h : @xmath0. we assume a be a stochastic training algorithm that induces a distribution h a from h. let @xmath1. we denote the test error and disagreement score for @xmath2: the relationship between t est err d (h) and dis d (h, h ′ ) is described as the following theorem 1 @xcite . theorem 1 given a stochastic learning algorithm a,if its corresponding ensemble satisfies class-wise calibration, then we have: in this paper, we focus on a sequence-to-sequence task, keyphrase extraction (kpe). we use the f1 score instead of test error to measure model quality and agreement instead of disagreement to measure model disparity. these choices are justified due to the mathematical relationship of model error to f1 score and agreement to disagreement (see appendix a). for the computation of kpe agreement, for each sentence we extract the keyphrases using the two models and compute the agreement score as the ratio of common keyphrases extracted to the total number of keyphrases extracted. the disagreement score is simply 1α, where α is the agreement score. to estimate model error on unlabeled data, we first train a set of kpe models using different random seeds on the training set. then we compute both the disagreement score and the error on a labeled test set to collect all data pairs (f1 score, agreement score). based on these data pairs, we fit a simple linear regression model for error prediction, similar to that employed in @xcite . ## experimental results and analysis we evaluated the the disagreement scoring approach for the kpe task on 10 different languages and three domains using the three models: xlm-r, a fine-tuned gpt-3, and a few-shot prompted gpt-4 model. in the following two sections, we look at evaluations when languages and domains are held out during fine-tuning. in 4.3, we look at the case when gpt-4 is used as an oracle for ground truth in a zero-shot manner, without any fine tuning. ## conclusion we conclude that disagreement scoring is a promising approach to predict model performance of llms. llms like gpt-4 that use few-shot prompting as a source for silver labels have high mae and may not be useful in practice. in this paper, we explored the effects over three llm models, xlm-r, gpt-3, and gpt-4 across 10 languages and 3 domains. overall we recommend against measuring model performance on complex nlp tasks using llms as a few-shot oracle, in our experiments we observe gpt-4 derived labeling results in f1 prediction with mae of 15.7% on average (