Credere o Non Credere al Tuo LLM
To Believe or Not to Believe Your LLM
June 4, 2024
Autori: Yasin Abbasi Yadkori, Ilja Kuzborskij, András György, Csaba Szepesvári
cs.AI
Abstract
Esploriamo la quantificazione dell'incertezza nei grandi modelli linguistici (LLM), con l'obiettivo di identificare quando l'incertezza nelle risposte fornite a una query è elevata. Consideriamo simultaneamente sia l'incertezza epistemica che quella aleatoria, dove la prima deriva dalla mancanza di conoscenza sulla verità di fondo (come fatti o la lingua), e la seconda deriva da una casualità irriducibile (come più risposte possibili). In particolare, deriviamo una metrica basata sulla teoria dell'informazione che consente di rilevare in modo affidabile quando solo l'incertezza epistemica è elevata, nel qual caso l'output del modello è inaffidabile. Questa condizione può essere calcolata esclusivamente basandosi sull'output del modello ottenuto semplicemente attraverso un prompting iterativo speciale basato sulle risposte precedenti. Tale quantificazione, ad esempio, consente di rilevare allucinazioni (casi in cui l'incertezza epistemica è alta) sia nelle risposte singole che in quelle multiple. Questo è in contrasto con molte strategie standard di quantificazione dell'incertezza (come la sogliazione della log-verosimiglianza di una risposta) in cui le allucinazioni nel caso di risposte multiple non possono essere rilevate. Condurremo una serie di esperimenti che dimostrano il vantaggio della nostra formulazione. Inoltre, le nostre indagini gettano luce su come le probabilità assegnate a un determinato output da un LLM possano essere amplificate dal prompting iterativo, il che potrebbe essere di interesse indipendente.
English
We explore uncertainty quantification in large language models (LLMs), with
the goal to identify when uncertainty in responses given a query is large. We
simultaneously consider both epistemic and aleatoric uncertainties, where the
former comes from the lack of knowledge about the ground truth (such as about
facts or the language), and the latter comes from irreducible randomness (such
as multiple possible answers). In particular, we derive an
information-theoretic metric that allows to reliably detect when only epistemic
uncertainty is large, in which case the output of the model is unreliable. This
condition can be computed based solely on the output of the model obtained
simply by some special iterative prompting based on the previous responses.
Such quantification, for instance, allows to detect hallucinations (cases when
epistemic uncertainty is high) in both single- and multi-answer responses. This
is in contrast to many standard uncertainty quantification strategies (such as
thresholding the log-likelihood of a response) where hallucinations in the
multi-answer case cannot be detected. We conduct a series of experiments which
demonstrate the advantage of our formulation. Further, our investigations shed
some light on how the probabilities assigned to a given output by an LLM can be
amplified by iterative prompting, which might be of independent interest.