Table of Contents
Fetching ...

A Formal Framework for Uncertainty Analysis of Text Generation with Large Language Models

Steffen Herbold, Florian Lemmerich

Abstract

The generation of texts using Large Language Models (LLMs) is inherently uncertain, with sources of uncertainty being not only the generation of texts, but also the prompt used and the downstream interpretation. Within this work, we provide a formal framework for the measurement of uncertainty that takes these different aspects into account. Our framework models prompting, generation, and interpretation as interconnected autoregressive processes that can be combined into a single sampling tree. We introduce filters and objective functions to describe how different aspects of uncertainty can be expressed over the sampling tree and demonstrate how to express existing approaches towards uncertainty through these functions. With our framework we show not only how different methods are formally related and can be reduced to a common core, but also point out additional aspects of uncertainty that have not yet been studied.

A Formal Framework for Uncertainty Analysis of Text Generation with Large Language Models

Abstract

The generation of texts using Large Language Models (LLMs) is inherently uncertain, with sources of uncertainty being not only the generation of texts, but also the prompt used and the downstream interpretation. Within this work, we provide a formal framework for the measurement of uncertainty that takes these different aspects into account. Our framework models prompting, generation, and interpretation as interconnected autoregressive processes that can be combined into a single sampling tree. We introduce filters and objective functions to describe how different aspects of uncertainty can be expressed over the sampling tree and demonstrate how to express existing approaches towards uncertainty through these functions. With our framework we show not only how different methods are formally related and can be reduced to a common core, but also point out additional aspects of uncertainty that have not yet been studied.

Paper Structure

This paper contains 38 sections, 41 equations, 1 figure.

Figures (1)

  • Figure 1: Structured view of generating an LLM response with corresponding uncertainties. In our formal framework, the random variables $X_i, Y_i,$ and $Z_i$ are corresponding to modeling the uncertainty of the different phases of the generative process.