Rethinking STS and NLI in Large Language Models (2024)

Abstract: Recent years, have seen the rise of large language models (LLMs), where practitioners use task-specific prompts; this was shown to be effective for a variety of tasks. However, when applied to semantic textual similarity (STS) and natural language inference (NLI), the effectiveness of LLMs turns out to be limited by low-resource domain accuracy, model overconfidence, and difficulty to capture the disagreements between human judgements. With this in mind, here we try to rethink STS and NLI in the era of LLMs. We first evaluate the performance of STS and NLI in the clinical/biomedical domain, and then we assess LLMs’ predictive confidence and their capability of capturing collective human opinions. We find that these old problems are still to be properly addressed in the era of LLMs.

## introduction semantic textual similarity (sts) is a fundamental natural language understanding (nlu) task involving the prediction of the degree of semantic equivalence between two pieces of text @xcite . under the regime of first pre-training a language model and then fine-tuning with labelled examples, there are three major challenges in sts modelling (see examples in large language models (llms), such as chatgpt, claude and llama-2, have demonstrated impressive performance on natural language understanding and reasoning tasks, by simply inputting appropriate prompts or instructions, without any parameter modifications. on general sts-b @xcite , zero-shot chatgpt achieves competitive pearson correlation (r) of 80.9 vs. 83.0 by fine-tuning bert-base using thousands of training examples @xcite . 1 on mnlim @xcite , zero-shot chatgpt even outperforms fine-tuned roberta-large: accuracy of 89.3 vs. 88.0. 2 llms' remarkable capabilities in zero-shot setting motivate us to rethink the task of sts/nli and the three challenges under llm prompt-based generation. we ask the following questions: (i) how well do llms perform over knowledge-rich and lowresource domains, such as biomedical and clinical sts/nli? (ii) does the paradigm of prompting llms lead to over-confident predictions? and (iii) how to capture collective human opinion (the distribution of human judgements) using llms? chen et al. (2023a) evaluated gpt-3.5 (textdavinci-003) on nli (e.g., snli, mnli, qqp) and on the semantic matching dataset mrpc (it is a binary classification task that predicts whether two sentences are semantically equivalent). @xcite evaluated chatgpt over sts/nli datasets including sts-b, mnli, qnli, and rte. we found that they focused on the performance of general-purpose sts and nli. however, it is unclear how well chatgpt performs on clinical and biomedical domains over these two tasks. @xcite studied the calibration of t5, bart, and gpt-2 on question answering (qa) tasks: whether the model makes well-calibrated predictions, i.e., whether the probability it assigns to the outcomes coincides with the frequency with which these outcomes actually occur. the predictive probability (confidence) will be a reliable signal to assist in deciding how much we can trust a prediction and the corresponding risks we may take. unfortunately, the answer is a relatively emphatic no. most prior work focused on white-box calibration for qa and showed that llms are more calibrated on diverse multiple choice qa @xcite @xcite . however, there have been no studies on the calibration of sts/nli neither in a white-box nor in a black-box scenario. moreover, there are studies exploring llms' robustness across nlu tasks, i.e., the accuracy variation against adversarial attacks @xcite , while less attention has been paid to human disagreement in labelling and how to capture the distribution of multiple individual opinions instead of an aggregated label by averaging or majority voting. in this work, we aim to bridge these gaps by first evaluating the accuracy of clinical/biomedical sts and nli over five datasets, and then assessing llm predictive confidence and their capability of capturing collective human opinions. we have three major findings: ## background we first describe sts and nli, and the datasets we use, and then we discuss three challenges in pretrained language models, followed by how they are approached in llms using prompting strategies. ## clinical and biomedical evaluation how well do llms encode clinical and biomedical knowledge, compared with small pretrained language models? @xcite assess palm (8b to 540b)'s potential in medicine through answering medical questions. they observed strong performance as a result of scaling and instruction fine-tuning. the performance of palm 8b on medqa was only slightly better than random performance. accuracy improved by more than 30% for palm 540b. @xcite evaluate the proprietary llms chatgpt and gpt-4, and open-source models including llama, alpaca and bloomz on a radiology corpus, determining whether a context sentence from a radiology report contains the answer given the question, by the answer of yes or no. results show that gpt-4 outperforms chatgpt, followed by llama, alpaca and bloomz. finetuning bert @xmath0. we see an ability that does not exist in small models, and rapidly improves above random beyond a certain model size. how do llms perform for clinical and biomedical sts and nli? ## calibration under llm calibration measures how well the predictive confidence aligns with the real correctness likelihood. depending on a well-calibrated model, we can trust how certain a model is for a correct prediction, and then deliver tasks to human experts when the model is highly uncertain. ## collective human opinion capturing the distribution of human opinions under large neural models is non-trivial, especially for continuous values. applying bayesian estimation to all model parameters in large language models is theoretically possible, in practice it is prohibitively expensive in both model training and evaluation. deriving uncertainty estimates by integrating over millions of model parameters, and initialising the prior distribution for each are both non-trivial @xcite . bypassing estimating key parameters of a standard distribution (e.g. µ and σ in a gaussian distribution) to fit the collective human opinions, in this work, we propose estimating personalised ratings which simulate individual annotations, and then compare the two collective distributions. specifically, we prompt llms by setting the system role with different personas characterised by age, gender, educational background, profession and other skills. it is assumed that llms can make personaspecific judgement within the capability and background of the role. hypothesis: if language models are capable to do personalised assignments that match the ability of different roles, a helpful assistant should give more accurate estimations than a five-year old child on the complex semantic reasoning tasks, and a linguistic expert is better than an assistant, a nlp phd student should have comparable judgement to a nlp expert. judgements collected from different roles should be close to the distribution of the collective human opinions gathered by crowdsourcing. ## conclusion and future work in this study, we aim to rethink sts and nli challenges in the context of llms, to identify whether llms alleviate the three issues in the era of bert. experiments on ten sts/nli datasets show that fine-tuned bert-base outperforms zero-shot chatgpt, especially on non-english corpus and ambiguous examples where high disagreement exists between individual annotations. smaller llms such as llama-2 (7b, 13b) collapse if only by incontext learning. though the larger model shows smaller calibration error, llm chatgpt is still far from a well-calibrated model. llms may be able to provide personalised descriptions for a specific topic, or to generate semantically similar content in different tones, but it is still hard for current llms to make personalised judgements. these reveal that old problems are not addressed in the new era.