Evaluating Large Language Models via Linguistic Profiling (2024)

Abstract: Large Language Models (LLMs) undergo extensive evaluation against various benchmarks collected in established leaderboards to assess their performance across multiple tasks. However, to the best of our knowledge, there is a lack of comprehensive studies evaluating these models’ linguistic abilities independent of specific tasks. In this paper, we introduce a novel evaluation methodology designed to test LLMs’ sentence generation abilities under specific linguistic constraints. Drawing on the ‘linguistic profiling’ approach, we rigorously investigate the extent to which five LLMs of varying sizes, tested in both zero- and few-shot scenarios, effectively adhere to (morpho)syntactic constraints. Our findings shed light on the linguistic proficiency of LLMs, revealing both their capabilities and limitations in generating linguistically-constrained sentences.

## introduction recent advancements in natural language processing (nlp) have been significantly shaped by the emergence and refinement of large-scale language models (llms) @xcite @xcite . these models demonstrated remarkable capabilities in solving multiple tasks and in generating coherent and contextually relevant texts, underscoring their potential for capturing complex linguistic structures with high precision and accuracy @xcite . such capabilities have been extensively evaluated against several benchmarks, as evidenced by the success of platforms such as the openllm leaderboard @xcite , in a task-oriented scenario covering a wide range of nlp tasks such as commonsense reasoning @xcite , mathematical problem-solving @xcite , ## related work the remarkable and unprecedented performance of llms across diverse tasks has significantly increased awareness regarding the importance of evaluating these models. this awareness has prompted a comprehensive reflection on the multifaceted nature of evaluation protocols @xcite . additionally, the rapid emergence of open leaderboards has become pivotal for comparatively assessing the capabilities and limitations of various models. a well-known example is the openllm leaderboard platform foot_1 , which provides official rankings for evaluating the performance of models, or the italian llm-leaderboard @xcite , specifically developed to evaluate italian models. existing leaderboards report llms' performance across a spectrum of text-understanding and generation tasks. however, to the best of our knowledge, evaluation methodologies specifically designed to quantitatively assess the multilevel linguistic abilities of llms in text generation, independent of specific tasks, are lacking. insights in this direction have emerged from the definition of prompting methodologies that have been used to assess the linguistic competence of the models in the resolution of diverse nlp tasks. @xcite proposed for the first time a study devoted to evaluating gpt-2 @xcite in the resolution of 5 tasks, e.g. part-of-speech tagging, showing that the tested properties are indeed encoded in the pre-trained model. following a similar approach, @xcite proposed a structured prompting to evaluate the abilities of gpt-neo @xcite and gpt-3 @xcite ) models in the resolution of sequence tagging tasks, e.g. named entity recognition. @xcite tested multilingual bert @xcite and xlm-roberta @xcite in encoding morphological (e.g. the number of nouns) and syntactic (e.g. distinction between subject and object) properties. on a different side, studies focused on ctg assessed the linguistic capabilities of llms through direct examinations of their adherence to linguistic constraints following an instructional tuning phase @xcite or indirectly through the analysis of their performance in diverse tasks. an example of the latter is the study by @xcite , which examined the controllability of llms across 5 generation tasks. specifically, they showed that in the syntactically-controlled paraphrase generation task, chatgpt is good at mimicking syntactic structures from sentences, but it struggles when the syntactic parses are directly incorporated into the prompt. @xcite , instead, investigated the abilities of llms in adhering to lexical and morpho-syntactic constraints, for the task of personalized text generation. ## approach we systematically evaluate the ability of several llms to generate sentences with targeted linguistic constraints corresponding to a set of morphosyntactic and syntactic properties of a sentence, denoted as @xmath0, p 2 , ..., p n }. specifically, we prompted the models to generate sentences containing these properties within a fixed prompt structure. in particular, for each property p i , we asked the models to generate a fixed number of sentences having a precise value v p i , as drawn from a set of possible values v @xmath1, v p 2 , ..., v pn }. for instance, a prompt asking the model to generate a sentence with two verbs will have the following structure: "generate a sentence with 2 verbs" foot_2 . given the well-known difficulty of llms in producing texts with precise numerical constraints @xcite , we decided to constrain the models on increasing values of linguistic properties v p i , in order to evaluate their ability also to generate sentences following incremental constraints. our premise lies in the fact that while an llm may struggle to precisely generate a sentence with an exact value of a particular linguistic property, it is likely to be sensitive to incremental values, i.e. it can generate a sentence characterized by either the absence or the frequent occurrence of a linguistic property. we tested our approach across both zero-and few-shot scenarios. specifically, for the few-shot evaluation, we augmented each prompt with five exemplar sentences for each linguistic constraint. ## results in the following sections, first we present the results obtained by the models in following the linguistic constraints (sec. 4.1 and 4.2). subsequently, we analyze how increasing the linguistic property values shapes all the other sentence properties accordingly (sec. 4.3). ## conclusion in this paper, we presented the results of an evaluation methodology aimed at testing the linguistic abilities of llms of different sizes to generate english sentences according to multiple linguistic constraints. inspired by the 'linguistic profiling' approach, it is not intended to be a task-oriented evaluation. given the acknowledged multifaceted nature of evaluating llms @xcite , it includes two evaluation metrics showing that while models may struggle in adhering to a specific constraint value, they show greater sensitivity to the value variations. the differences between the scores of the two metrics seem to confirm that they offer two distinct perspectives on models' behaviour, suggesting their suitability for different tasks. namely, for tasks requiring precise adherence to constraints, e.g. text simplification or question answering, the success rate evaluation is preferred. conversely, for tasks that rely on the model's ability to follow incremental constraints, e.g. style transfer, an evaluation based on spearman correlation is more appropriate. in addition, our results demonstrated that linguistically-constrained models are capable not only of generating longer sentences but also sentences with varied (morpho)syntactic structures that align with the ewt sentences, which are considered representative of the english language.