EVALUATING LARGE LANGUAGE MODELS USING CONTRAST SETS: AN EXPERIMENTAL APPROACH

Authors

  • Manish Sanwal Engineering Department, News Corporation, New York, USA. Author

Keywords:

Contrast Sets, LLM, Natural Language Inference, Neural Networks, Text Classification

Abstract

In the field of Natural Language Inference (NLI), particularly for multi-input text classification tasks, Cross-Entropy Loss is commonly used as a general error metric. Although effective as a training benchmark, this metric does not adequately assess a model’s understanding of language entailments. In this work, we propose a novel approach for creating a contrast set for the Stanford Natural Language Inference (SNLI) dataset. Our method involves automatically replacing verbs, adverbs, and adjectives with their synonyms, maintaining the original sentence’s meaning. This approach helps determine whether a model truly comprehends the language or merely identifies recurring patterns for making predictions. We utilized the ELECTRA-small model for our investigation. While the model exhibits an 89.9% accuracy on the standard SNLI dataset, its performance drops to 72.5% on our contrast set—a significant 17% decrease. This finding prompted an in-depth analysis to understand the underlying learning patterns of the model. Subsequently, we enhanced the model’s robustness by fine-tuning it with a contrast training dataset tailored for SNLI, resulting in an improved accuracy of 85.5% on contrast sets. These experiments underscore the necessity for more balanced datasets in NLI tasks that account for varied linguistic expressions. We anticipate that our findings will inspire further development of comprehensive datasets, fostering the advancement of more nuanced and effective NLI models.

References

A. Vaswani et al., “Attention Is All You Need,” 2017.

R. Jia and P. Liang, “Adversarial Examples for Evaluating Reading Comprehension Systems,” 2017.

M. Gardner et al., “Evaluating NLP Models via Contrast Sets,” 2020.

S. R. Bowman, G. Angeli, C. Potts, and C. D. Manning, “A large annotated corpus for learning natural language inference,” 2015.

K. Clark, M.-T. Luong, Q. V. Le, and C. D. Manning, “ELECTRA: Pre-training Text Encoders as Discriminators Rather Than Generators,” 2020.

P. Rajpurkar, R. Jia, and P. Liang, “Know What You Don’t Know: Unanswerable Ques- tions for SQuAD,” 2018.

D. Weissenborn, G. Wiese, and L. Seiffe, “FastQA: A Simple and Efficient Neural Archi- tecture for Question Answering,” 2017.

I. J. Goodfellow, J. Shlens, and C. Szegedy, “Explaining and Harnessing Adversarial Ex- amples,” 2015.

N. Madnani and B. J. Dorr, “Generating Phrasal and Sentential Paraphrases: A Survey of Data-Driven Methods,” 2010.

N. F. Liu, R. Schwartz, and N. A. Smith, “Inoculation by Fine-Tuning: A Method for Analyzing Challenge Datasets,” 2019.

Downloads

Published

2024-09-30

How to Cite

Manish Sanwal. (2024). EVALUATING LARGE LANGUAGE MODELS USING CONTRAST SETS: AN EXPERIMENTAL APPROACH. INTERNATIONAL JOURNAL OF ARTIFICIAL INTELLIGENCE RESEARCH AND DEVELOPMENT (IJAIRD), 2(2), 90-97. https://lib-index.com/index.php/IJAIRD/article/view/IJAIRD_02_02_007