Lost in Disambiguation: How Instruction-Tuned LLMs Master Lexical Ambiguity
Authors: Luca Capone, Serena Auriemma, Martina Miliani, Alessando Bondielli, Alessandro Lenci (Università di Pisa, 2024)
Topic: Distributional Semantics

Abstract
This paper investigates how decoder-only instruction-tuned LLMs handle lexical ambiguity. Two distinct methodologies are employed: Eliciting rating scores from the model via %by prompting and analysing the cosine similarity between pairs of polysemous words in context. Ratings and embeddings are obtained by %submitting providing pairs of sentences from AUTHOR to the model. These ratings and cosine similarity scores are compared with each other and with the human similarity judgments in the dataset. %the subjects' similarity judgments, also present in the same dataset. Surprisingly, the model scores show only a moderate correlation with the subjects' similarity judgments and no correlation with the target word embedding similarities. A vector space anisotropy inspection has also been performed, as a potential source of the experimental results. The analysis reveals that the embedding spaces of two out of the three analyzed models exhibit poor anisotropy, while the third model shows relatively moderate anisotropy compared to previous findings for models with similar architecture AUTHOR. These findings offer new insights into the relationship between generation quality and vector representations in decoder-only LLMs.

Introduction
Lexical ambiguity (LA) is a peculiar characteristics of human language communication. Words often carry multiple meanings, and discerning the intended sense requires nuanced comprehension of contextual cues. LA is a broad concept subsuming several semantic phenomena, such as regular and irregular polysemy, homonymy, and the coinage of new senses. Humans handle such ambiguity effortlessly, leveraging contextual information, prior knowledge, and pragmatic inference. However, for Large Language Models (LLMs), which rely on statistical patterns in text data, accurately resolving lexical ambiguity remains a challenging task. Despite their remarkable capability of using words appropriately in context, one critical aspect that requires deeper investigation is whether such models possess human-like lexical competence, enabling them to generalize from multiple instances of the same phenomenon, or if they are simply mimicking these instances. In this paper, we aim to investigate how LLMs handle LA. Specifically, we challenged three decoder-only instruction-tuned models to generate lexical similarity ratings for word pairs used in two different contexts, with various degrees of sense similarity. To achieve this, we employed a chain-of-thought approach, prompting the models to produce a step-by-step reasoning process before assigning their ratings, allowing them to better distinguish between different senses of the same term. For this task, we used the dataset released by \citet{haber2021patterns}, which includes human similarity judgments. The models' generated ratings were correlated with human similarity judgments to determine whether their lexical disambiguation competence aligns with that of humans. Additionally, we computed the cosine similarity between the models' internal representation of the ambiguous target words. Our research question is twofold: i.) to assess if the models' generated ratings are consistent with their internal representations of the target words; ii.) to determine whether the internal representations have a more similar distribution to human ratings than the generated responses. We are aware that context-sensitive word embeddings, like those of LLMs, can suffer from a representation degeneration problem (see Section sec:anisotropy for further details), which limits their semantic representational power. Hence, we included in our analysis a brief overview of how this phenomenon affects the internal representational space of the models under our investigation. To the best of our knowledge, this is the first study in which different decoder-only models were tested on their metalinguistic competence regarding LA. Understanding how LLMs manage this type of complex semantic phenomenon, based on the interplay of multiple contextual factors, can guide new improvements in training methodologies for the development of more sophisticated and robust models that better mimic human-like language understanding. %\item Analyzing the capability of decoder-only LLMs to capture LA via prompting, in comparison to annotators' similarity judgments; %\item Comparing the cosine similarity scores among target words with annotators' similarity judgments, to establish the correlation between hidden states and human ratings; %\item Assessing the internal coherence of the tested LLMs by comparing their generated predictions with the cosine distances between vector representations of target words. %\item %Investigating the effects of anisotropy in decoder-only models, revealing interesting and unusual findings compared to previous studies AUTHOR.

Conclusion
%Fatte Our study investigates how LLMs handle LA, using two distinct methodologies: Eliciting rating scores from the model and analyzing the cosine similarity between pairs of polysemous words. We calculated the Spearman correlation between HRS vs. MRS, HRS vs. CSS, and MRS vs. CSS. The aim was to determine whether the model's metalinguistic knowledge aligns with its internal representations and to assess if human ratings more closely match the outputs generated by the model than its internal representations. The lack of correlation between CSS and MRS provides intriguing insights into the relationship between the internal representations of LLMs and the responses they generate in metalinguistics tasks, like explicitly assigning similarity ratings. Specifically, the argument presented in AUTHOR appears to be validated: Generated responses do not always reflect the model's internal processing. AUTHOR compared model generations with their probability distributions and found the latter method to be more accurate. In contrast, in our study, using the internal representations of the model (i.e., the contextual embeddings, \luca{as motivated in Section sec:relworks}) proved to be a less reliable method. The most straightforward conclusion is that generative LLMs might be suboptimal for estimating word sense similarity. The superior performance of probability estimation reported by AUTHOR might be due to its direct link to the prediction training objectives of LLMs. To further investigate the relationship between CSS and MRS, we inspected the anisotropy of the embeddings. The average cosine similarity among a sample of generated tokens was relatively low, indicating that anisotropy did not affect our cosine similarity measures and is not characteristic of all decoder-only models under investigation. The lack of anisotropy observed in some of the analyzed decoder-only models is at odds with the conclusions of AUTHOR, who reported a higher anisotropic space for GPT-2. % Only MRS yielded a moderate correlation with HRS, indicating that LA is not fully captured by the analyzed models, in text generation and vector representations. In conclusion, the relationship between human judgments, model generations, and internal representations appears unclear and calls for further research. Despite the low anisotropy of the examined models, cosine similarity did not reveal a correlation between the generations and the internal representations of the models, indicating a need for deeper investigation. We plan to repeat the experiments by leveraging recent results with sparse autoencoders AUTHOR to decompose the meanings of lexically ambiguous words. This could provide a deeper understanding of the models' ability to handle and represent polysemy. %and to determine whether this limitation also affect their performance in a downstream task. scenarios where polysemy emerges from the whole context of a sentence. We could not extract embeddings from commercial models, such as those provided by OpenAI, which are accessible only through APIs. However, it would be valuable in future research, if and when this functionality becomes available, to analyze and compare the internal representations and the generated outputs of these state-of-the-art models. Another promising avenue for future research is to examine the differences between vector representations and generated tokens with respect to linguistic phenomena beyond polysemy and lexical ambiguity. For instance, incorporating out-of-vocabulary words could allow for an exploration of semantic shifts caused by the addition of prefixes or suffixes (e.g., ``order'' vs. ``dis-order''), offering valuable insights. This analysis would benefit from using a tokenization strategy that treats morphemes as subtokens, alongside an investigation into the degree of anisotropy in these models. We acknowledge financial support under the PRIN 2022 Project Title "Computational and linguistic benchmarks for the study of verb argument structure" – CUP I53D23004050006 - Grant Assignment Decree No. 1016 adopted on 07/07/2023 by the Italian Ministry of University and Research (MUR). This work was also supported under the PNRR—M4C2—Investimento 1.3, Partenariato Esteso PE00000013—“FAIR—Future Artificial Intelligence Research”—Spoke 1 “Human-centered AI,” funded by the European Commission under the NextGeneration EU programme, and partially supported by the Italian Ministry of University and Research (MUR) in the framework of the PON 2014-2021 ``Research and Innovation" resources – Innovation Action - DM MUR 1062/2021 - Title of the Research: ``Modelli semantici multimodali per l’industria 4.0 e le digital humanities.'' \newpage \appendix