This is not a Dataset: A Large Negation Benchmark to Challenge Large Language Models (2023)

Abstract: Although large language models (LLMs) have apparently acquired a certain level of grammatical knowledge and the ability to make generalizations, they fail to interpret negation, a crucial step in Natural Language Processing. We try to clarify the reasons for the sub-optimal performance of LLMs understanding negation. We introduce a large semi-automatically generated dataset of circa 400,000 descriptive sentences about commonsense knowledge that can be true or false in which negation is present in about 2/3 of the corpus in different forms. We have used our dataset with the largest available open LLMs in a zero-shot approach to grasp their generalization and inference capability and we have also fine-tuned some of the models to assess whether the understanding of negation can be trained. Our findings show that, while LLMs are proficient at classifying affirmative sentences, they struggle with negative sentences and lack a deep understanding of negation, often relying on superficial cues. Although fine-tuning the models on negative sentences improves their performance, the lack of generalization in handling negation is persistent, highlighting the ongoing challenges of LLMs regarding negation understanding and generalization. The dataset and code are publicly available.

## introduction large language models (llms) currently offer state of the art performance in many natural language processing (nlp) tasks. apparently, they have acquired the ability to capture syntactic (baroni, 2020) and semantic @xcite abstractions. however, recent experiments @xcite @xcite have proven that llms fail at interpreting contexts in which understanding negation is required. the presence of negation in a sentence reverts the polarity of the proposition it represents, and thus affects its truth and factuality values. see how the adverb "never" changes the truth value of the sentences in figure 1 . as a consequence, understanding negation correctly is crucial for all nlp tasks. moreover, understanding negation should help llms to grasp how things happen in reality, boosting nlp tasks that involve commonsense, causality, entailment and world knowledge. the reasons for the lower capabilities of llms dealing with negation remain largely unclear, although some point out at the under-representation of negation in corpora @xcite . in this work, we present a corpus in which negation is present in around two thirds of the sentences in different forms. taking advantage of the relations in wordnet @xcite , we have generated a set of patterns to create descriptive sentences that work as truth and falsity tests which are then used together with a list of prompts to measure the sentence understanding of the different llms. the dataset has been used in a series of experiments to test its quality and coherence. first, we assess the quality of the sentences by human anno-tators. then, to grasp its capacity of generalization and inference, we have used our dataset to test different configurations of llms available in a zeroshot approach. we have also fine-tuned some of these models to assess whether the understanding of negation can be learnt. our initial hypothesis is that if the dataset is coherently and robustly built we will be able to learn how llms deal with negation. the contributions of this paper are: i) we introduce the largest negation probing dataset. this dataset includes affirmative and negative sentences with and without distractors, incorporating multiple types of relations and negations. ii) we evaluate a comprehensive set of open llms using our dataset in both zero-shot and fine-tuning scenarios. iii) our findings demonstrate that current llms, whether in zero-shot settings or after fine-tuning with examples from our dataset, possess a profound understanding of the truthfulness of affirmative sentences. however, when confronted with negation, these models heavily rely on superficial cues instead of effectively generalizing negation. ## experimental setup in this section, we define the evaluation protocol we use to measure the performance of language learning models (llms) on our dataset. ## exposure to negation does not solve the problem understanding whether llms would understand negation if a sufficient number of negative sentences were present in the pretraining corpora is crucial for improving their reasoning capabilities and addressing the limitations associated with negative knowledge. however, due to the lack of suf-ficiently large datasets containing negative knowledge, this hypothesis has not been extensively explored. in contrast, our dataset is substantial enough to be split into training, development, and test sets. to investigate whether llms can learn to reason over negative knowledge given enough negated data, we split the dataset at the triple level, ensuring that all sentences within a triple are assigned to the same split to ensure no data contamination. our training dataset consists of 268,505 sentences from 2,876 triples, the development dataset includes 2,514 sentences from 244 triples, and the test dataset contains 90,281 sentences from 980 triples. we finetune flan-t5 and vicuna on our dataset; the results are listed in ## conclusion current llms are typically trained using next token or mask token prediction objectives, which have proven effective for various nlp tasks. however, it remains an open issue understanding how certainly a model models negation. negation tokens, which intermittently appear in sentences, hold little predictive importance for other tokens in the sentence. as a result, there is limited negation signal during language modeling training. previous research has touched upon this issue but was limited by small manually generated datasets. in contrast, our study introduces the largest dataset to date comprising negative sentences. this comprehensive dataset includes affirmative and negative sentences with and without distractors, incorporating multiple types of relations and negations, which help to encode the underlying mechanisms for negation understanding. through our analysis, we reveal that current llms, both in zero-shot settings and when fine-tuned with examples from our dataset, exhibit a profound understanding of the truthfulness of affirmative sentences. however, when it comes to negation, these models heavily rely on superficial cues instead of generalizing negation and these superficial cues are not transferable across different negative sentences. negation remains a persistent and unsolved challenge in the field of nlp, demanding further research to develop systems capable of effectively handling it. our dataset holds the potential to significantly contribute towards achieving this objective. in our future work, we plan to explore advanced reasoning paradigms, such as chain-of-thought, with the aim of enhancing model performance on our dataset. however, dealing properly with negation may also require novel neural architectures.