Traffic Light or Light Traffic? Investigating Phrasal Semantics in Large Language Models (2024)

Abstract: Phrases are fundamental linguistic units through which humans convey semantics. This study critically examines the capacity of API-based large language models (LLMs) to comprehend phrase semantics, utilizing three human-annotated datasets. We assess the performance of LLMs in executing phrase semantic reasoning tasks guided by natural language instructions and explore the impact of common prompting techniques, including few-shot demonstrations and Chain-of-Thought reasoning. Our findings reveal that LLMs greatly outperform traditional embedding methods across the datasets; however, they do not show a significant advantage over fine-tuned methods. The effectiveness of advanced prompting strategies shows variability. We conduct detailed error analyses to interpret the limitations faced by LLMs in comprehending phrase semantics. Code and data can be found at https://github.com/memray/llm_phrase_semantics/.

## introduction understanding phrase semantics presents unique challenges for artificial intelligence due to the compositionality and ambiguity inherent in natural languages. the same set of words can yield phrases with vastly different meanings, exemplified by phrase pairs such as "traffic light" versus "light traffic" and "hard drive" versus "drive hard". understanding phrase semantics @xcite @xcite involves reasoning the structure and meaning of the combined words and aligning these symbol with real-world concepts commonly understood by humans. common tasks used to assess a model's ability to comprehend phrase semantics include identifying similar phrases or estimating the semantic similarity between phrase pairs. traditional methods for representing phrase semantics generally rely on either embedding-based strategies or fine-tuning approaches. embeddingbased methods @xcite @xcite @xcite generate vector representations for phrases, using vector similarity as a proxy for semantic relatedness. however, this approach often oversimplifies the complex relationships between phrases. on the other hand, finetuning methods @xcite adapt a pretrained model (like bert) to a specific task, such as classification or regression, but require extensive task-specific data. large language models (llms) excel by generalizing to new tasks with minimal instructions, an advantage in data-scarce situations. innovations such as in-context few-shot learning @xcite and chain-of-thought prompting @xcite @xcite have shown promise in transferring knowledge to novel tasks and enhancing reasoning skills. the potential of llms in phrase semantic understanding remains underexplored and warrants investigation. this study evaluates the performance of llms in phrase semantics tasks by focusing on their instruction-following abilities. our contributions are threefold: (1) we analyze llms' processing of phrase semantics, particularly their alignment with human linguistic understanding -a crucial yet underexplored aspect; (2) we benchmark llms against a range of traditional methods to determine if llms can effectively perform semantic reasoning tasks solely based on instruction-following and various prompting techniques; (3) we provide a detailed error analysis to elucidate the reasons behind the failures of current llms in specific scenarios. ## methods we compare three types of models to evaluate their performance in understanding phrase semantics: ## experiment setting to evaluate phrase semantics understanding, three datasets were utilized: turney (turney, 2012): comprising 2,180 examples derived from wordnet, this dataset pairs one bigram phrase (query phrase) with five unigrams, where one unigram is a synonym of the bigram, and the others are related distractors. as a multiplechoice classification task, it challenges the model to identify the synonym from the unigrams, with performance measured by accuracy. bird @xcite : this is a bigram relatedness dataset using the best-worst scaling (bws) annotation. in contrast to common annotation techniques that use a discrete 0 to 5 scale, bws is expected to provide more reliable and discriminating annotations. specifically, it employs comparative annotations, where annotators are given multiple items at a time and asked to select which item is the best and worst. bird consists of 3,345 pairs of bigram phrases, each including a pair of phrases and a human rating of similarity between 0 and 1. the pearson correlation coefficient between the model predictions and human judgments is reported. pic-ps (phrase-in-context -phrase similarity) @xcite : pic-ps is a binary classification task and it contains 2,000 examples for testing. the model is tasked to predict whether two noun phrases are semantically similar or not in the same context. the challenge of this task is that, without taking the contextual information into account, very likely the two phrases are interpreted as synonyms. the accuracy score is reported. for turney and bird, we replicate baselines following @xcite . for pic-ps, we follow @xcite and reuse the reported scores. we select two api-based llms: gpt-3.5-turbo (gpt-3.5-turbo-1106) and gpt-4-turbo (gpt-4-1106-preview). sample data and prompts are detailed in however, the highest score on each dataset comes with different models or configurations. on the turney benchmark, the previous best accuracy score (57.1) was achieved by an embeddingbased method using phrase-bert and cosine similarity. both llms under the basic prompting significantly outperform phrase-bert (+30 points), primarily due to enhanced language understanding capabilities. furthermore, more improvements can be attained (gpt-3.5t +0.6, gpt-4t +1.4, no cot) by providing few-shot examples within the context, allowing the model to glean more task-specific information for refining its predictions. bird directly evaluates the alignment between human annotators and models on phrase similarities, which is measured by pearson correlation coefficient. it may favor embedding-based methods since they were trained by optimizing the similarities between phrases @xcite . llms output similarities in natural language, similar to the way that humans annotate the data @xcite . the result shows that llms still outrun baselines by a clear margin. similar to turney results, few-shot examples show beneficial impacts on gpt-4t but cot hurts both models. one possible reason is that the longer prompts potentially cause "distractions" to the models. for example, we observe many more bad-format cases for gpt-3.5t when cot prompting is enabled. pic-ps is a context-dependent test. the task is arguably more challenging as the difference between them can be subtle and models need to comprehend the context for support. the previous best score (69.3) is achieved by a fine-tuned spanbert-large with 7k training examples. the best llm setting only attains a minor improvement (73.7). the few-shot demonstration benefits gpt-3.5-turbo the most when two examples are used, but it worsens the performance of gpt-4-turbo. additionally, the result shows that the cot prompting leads to degradation in general. the models appear to give reasonable interpretations and very few invalid responses are detected. ## conclusion we investigated the performance of llms on phrase semantics to assess their alignment with human preferences. despite strong performance across benchmarks, our findings reveal significant opportunities for improvement. key areas include ensuring consistent adherence to instructions, crafting better prompts to enhance semantic reasoning, and integrating external knowledge to resolve ambiguities in phrase interpretation. this study inspects the alignment of llms with human understanding through the lens of phrase semantics, shedding light on the specific challenges and limitations these models face. it also inspires further exploration into diverse perspectives to assess the cognitive differences between ai agents and humans.