Elamur Research

MARS: Meaning-Aware Response Scoring for Uncertainty Estimation in Generative LLMs

Paper · 2024 · Yavuz Faruk Bakman, Duygu Nur Yaldiz, Baturalp Buyukates et al.

Summary

A system can produce a fluent answer while being unsure about the detail that makes it right or wrong. When a question asks for the name of a planet, for instance, the name carries the answer. The rest of the sentence may largely repeat the question. Yet a common way of scoring generated answers gives the name and the surrounding text equal weight per token. Bakman and colleagues ask whether uncertainty estimates for question answering improve when the score pays more attention to the parts of a response that supply the requested information.

Meaning-Aware Response Scoring (MARS), the method they use, takes as its starting point the token probabilities assigned during answer generation. It changes how those probabilities are combined. Tokens receive extra weight when removing their phrase would change what the response says in the context of the question. The authors derive training labels for this task by comparing full answers with versions that have a phrase removed. They then train a separate, smaller system to identify phrases and estimate their importance in a single pass over the question and answer. At evaluation time, this step uses the generated answer itself and needs no reference answer.

The authors test MARS as a replacement for the same scoring component in Confidence, Entropy, and Semantic Entropy. Confidence examines the selected answer alone. The entropy methods sample alternatives, and Semantic Entropy groups alternatives by meaning before scoring the groups. Across TriviaQA, Natural Questions, and WebQA, the replacement improves every reported pairing of an uncertainty method and a generator. On TriviaQA with Mistral-7b, for example, Entropy rises from 72.57 to 78.51 in AUROC, the paper’s measure of how well an uncertainty score ranks incorrect answers apart from correct ones. Semantic Entropy with MARS also gives the strongest result on a curated medical question set, at 64.48 AUROC, where all the reported scores are lower than in the general-knowledge experiments.

The controlled comparisons help explain where the improvement comes from. Removing whole phrases to establish importance works better than removing isolated tokens in the tested settings. Once a phrase has an importance score, placing that weight on its least uncertain token harms performance relative to spreading it across the phrase. Placing it on the most uncertain token remains competitive. Together, these results show how the content of an answer and the location of uncertainty within that content affect the usefulness of a response score. The experiments establish better discrimination under the paper’s evaluation procedure. They leave open how well the method estimates an individual answer’s probability of being correct or works outside closed-ended English questions.

Deep dive: MARS: Meaning-Aware Response Scoring for Uncertainty Estimation in Generative LLMs

MARS gives more weight to the words that answer a question, improving how token probabilities flag unreliable generated answers. · about 35 minutes to read

The problem and its context

From choosing a label to generating an answer

Uncertainty estimation is useful when a system has to judge the reliability of an answer it has already produced. The authors consider a question-answering setup in which a generator returns its most likely answer, and a separate calculation assigns a score to that response. An uncertainty method succeeds when responses marked incorrect tend to receive higher uncertainty scores than responses marked correct. The paper motivates this task with settings where an incorrect answer has consequences, including medical advice. A well-ordered set of uncertainty scores would help identify which answers deserve closer scrutiny.

Classification supplies a starting point. A classifier returns probabilities over a set of labels. The largest probability gives a straightforward confidence signal for the chosen label. The distribution across labels gives another signal. If probability is spread across competing options, its entropy, a measure of how dispersed the distribution is, tends to be larger. The paper describes Bayesian approaches that estimate a predictive distribution by averaging predictions from an ensemble. The individual members represent different plausible parameter settings after training, and their average reflects the uncertainty associated with those settings.

A generated answer has no equivalent of a pre-defined label with a probability attached to it. An autoregressive generator assigns a probability to each successive token, conditional on the question and the tokens already present. Here a token is a unit of the generator’s text representation. Depending on tokenization, a name can occupy several such positions. A single answer is therefore associated with a chain of conditional probabilities. The quantity needed for uncertainty estimation is a score for the answer that chain expresses.

Several complications follow. Adding a token multiplies a raw sequence probability by another factor no greater than unity. A short answer and a longer rendering of the same information can consequently have quite different raw probabilities. Different strings can also express the same answer. If the system alternates between a bare place name and a complete sentence containing that name, the variation can reflect a preference about wording. The uncertainty of practical interest is whether the named place answers the question.

There is a further distinction between uncertainty about what to say and uncertainty about how to finish saying it. A generator may have considerable difficulty choosing the first part of a name and then find the rest easy to complete. Similarly, it may be very sure how to phrase a sentence even when it is unsure about the fact that goes inside it. Any calculation that averages token evidence over a sentence has to decide how much the surrounding material should influence the result. This is where MARS intervenes.

What the earlier scores measure

The paper traces the use of length normalization to Malinin and Gales’s adaptation of uncertainty methods to autoregressive prediction. Their approach uses a geometric mean of token probabilities in place of the raw product. Taking a mean prevents the mere act of multiplying more factors from driving the score down in the same way. It also places tokens on equal terms: each contributes the same share of the sum in log space. This handles length while leaving a question-specific judgment about informative content out of the weighting.

Length-normalized scores can be used at different stages of an uncertainty calculation. The simplest approach attaches the negative score of the selected answer to that answer as its uncertainty. A sampling-based approach scores multiple answers to assess the pattern of outputs the question elicits. The second approach can reveal disagreement that the selected answer leaves hidden. Its usefulness depends on what the sampled alternatives express and on how their scores are calculated.

Kuhn and colleagues’ Semantic Uncertainty puts the meaning of alternative answers at the center of that second approach. Answers placed in the same meaning group contribute to a common group score. The motivating case is a question for which several wordings name the same city. Counting every distinct string separately would give variation in wording an influence on the measured uncertainty. Grouping those strings allows the calculation to focus on disagreement among answers in the context of the question.

MARS and Semantic Entropy thus use meaning at different points. Semantic Entropy compares complete answers to decide which belong together. MARS examines the contents of an individual answer to decide which token probabilities should have more influence on its score. An answer can first receive a meaning-aware score and then contribute that score to a semantic group. This explains why the paper treats the two methods as compatible and evaluates MARS both with and without grouping.

The authors also place the work alongside heuristics for translation and black-box uncertainty methods. In the black-box setting they describe, the system’s token probabilities are unavailable. MARS uses those probabilities directly, so it addresses a different access setting. In the paper’s review, earlier work on tasks such as sentiment analysis, multiple-choice questions, and paraphrase detection helps establish the broader uncertainty problem, while work on autoregressive prediction supplies the calculations the authors actually modify.

The closest comparison in the paper is Shifting Attention to Relevance, which also uses the importance of text to estimate uncertainty. Its TokenSAR component measures the effect of deleting individual tokens using sentence similarity. The MARS authors instead use a question-conditioned answer evaluator and examine what happens when phrases are removed. They also frame MARS as a response score that can be inserted into an uncertainty method. Their discussion points out that it could take the place of TokenSAR in a scheme that already applies relevance weighting at the answer level. The distinction makes clear what is being proposed: a way to weight evidence within each answer, leaving the surrounding uncertainty calculation available for reuse.

The method, step by step

Follow the answer from generation to scoring

Suppose a question asks which planet has a particular nickname. A response may name the planet directly, or it may name it and restate the nickname in a full sentence. Both versions tell the reader which planet is meant. Within the longer answer, however, there are many token probabilities besides those attached to the name. MARS aims to make the response score more sensitive to the probability of the name while retaining a contribution from the rest of the sentence.

The procedure uses two pieces of information about the same answer. The generator supplies the conditional probability of each token under the prefix that led to it. An importance predictor receives the complete question and answer and estimates which response positions carry the pertinent information. This predictor can use later words when assessing the significance of an earlier one. The probability at that earlier position remains the original probability from generation, conditioned on the words that preceded it. MARS combines the two views after the answer has been written.

How MARS scores a generated answer

The steps in order.

How MARS scores a generated answerStep 1: Generate the answer and retain token probabilities1. Generate the answer and retain token probabilitiesStep 2: Read the question and the complete answer2. Read the question and the complete answerStep 3: Identify phrases and estimate their importance3. Identify phrases and estimate their importanceStep 4: Blend token importance with uniform length weights4. Blend token importance with uniform length weightsStep 5: Combine the probabilities using the resulting weights5. Combine the probabilities using the resulting weightsStep 6: Pass the response score into uncertainty estimation6. Pass the response score into uncertainty estimation

For the Confidence comparison, that procedure scores the selected answer. For the sampling-based comparisons, it provides a score for each sampled answer. The semantic grouping step, when used, still compares meanings across those samples. Neither the question nor the selected answer has to be rewritten by MARS. The authors make code available for the method.

Start from the predictive distribution

The paper begins its mathematical account with the Bayesian setting for classification. An ideal predictive probability averages over parameter settings distributed according to the posterior after training. With an approximate posterior and a finite ensemble, the paper writes the calculation as follows.

P(y | x, D) = E_{q(θ)}[P(y | x, θ)] ≈ (1/M) ∑_{m=1}^M P(y | x, θₘ)

Here x is the input, y is a candidate target, and D is the training data. θ represents the parameters of a predictor. q(θ) is the approximate posterior over parameters, and E denotes expectation with respect to that distribution. M is the number of ensemble members, m indexes them, and θₘ is the sampled parameter setting for member m. P denotes probability. The vertical bar introduces the information being conditioned on, and ∑ adds the members’ probabilities. The approximation sign separates a posterior expectation from its finite-ensemble approximation.

One way to summarize the resulting distribution is its entropy.

H(x, D) = −∑_{y ∈ 𝒴} P(y | x, D) log P(y | x, D)

H denotes predictive entropy, and 𝒴 is the set of possible targets. The membership sign ∈ indicates that the sum runs over the targets y in that set. P(y | x, D) is the predictive probability for one target, and log is the logarithm. The leading minus sign makes larger positive contributions possible from probabilities whose logarithms are negative. An alternative described in the paper uses the negative probability of the most probable label as the uncertainty signal.

For generation, the target becomes a token sequence. The probability of that sequence is obtained from the conditional probabilities along its path.

P(s | x, θ) = ∏_{l=1}^L P(sₗ | s₍<l₎, x; θ)

s is the answer sequence, and L is its length in tokens. l indexes a position, sₗ is the token at that position, and s₍<l₎ is the prefix before it. x is the question and θ is the generator’s parameter setting. The semicolon in the mathematical notation separates the conditioning inputs from the parameters. The product sign ∏ directs the calculation to multiply the conditional probabilities for all answer positions.

As in the earlier work the authors follow, the practical setup uses a single generator at a time. Its predictive probability substitutes for the posterior average over an ensemble.

P(s | x, D) ≈ P(s | x, θ)

On the left, P(s | x, D) is the predictive probability of the full sequence given the question and training data. On the right, P(s | x, θ) is the sequence probability under the particular generator with parameters θ. The approximation describes the single-generator setup. The paper evaluates its uncertainty calculations separately for different generators.

Replace equal weights with question-dependent weights

Length normalization adjusts the sequence score before it goes into an uncertainty method. The paper’s length-normalized score takes the following form.

P̃(s | x, θ) = ∏_{l=1}^L [P(sₗ | s₍<l₎, x; θ)]^(1/L)

P̃ is the auxiliary length-normalized score. The exponent 1/L gives each position an equal share, where L is the total number of positions in answer s. The product includes the probability of each token sₗ given its prefix s₍<l₎, the question x, and parameters θ. The caret marks exponentiation. This is a geometric mean of the conditional probabilities. The resulting scores over possible answers do not generally sum to 1.

MARS preserves the product and changes its exponents.

P̄(s | x, θ) = ∏_{l=1}^L [P(sₗ | s₍<l₎, x; θ)]^w(s, x, L, l)

P̄ denotes the MARS response score. w(s, x, L, l) is the weight for position l, determined from the whole answer s, its question x, its length L, and the position being scored. The factors inside the brackets remain the generator’s original token probabilities under parameters θ. A larger exponent gives that position more influence on the log of the response score. Consequently, a low conditional probability on an important token can pull the score down more strongly.

The authors keep a uniform length component alongside the meaning-dependent one.

w(s, x, L, l) = 1/(2L) + u(s, x, l)/2

w is the final exponent. u(s, x, l) is the importance coefficient for position l in answer s to question x. Its values lie between 0 and 1, and they sum to 1 over the answer. The first term gives every position the same share of the uniform component. The second contributes the same fraction of each position’s estimated importance. Since both components allocate a fixed total, the final weights sum to 1. If importance is uniform, the weighted calculation recovers ordinary length normalization.

This mixture matters for the interpretation of the method. The importance predictor can concentrate its output on a short phrase. The final scoring rule still gives the surrounding tokens a contribution through the uniform term. Within that rule, the probabilities are doing the work of indicating confidence, while the importance coefficients determine where that evidence should count more. An answer can receive a large importance coefficient on a name even when the name is factually wrong. That coefficient says the name is central to the answer being offered.

Learn importance by removing parts of an answer

To define importance, the authors adapt BERT Matching, or BEM, from Tomayto, Tomahto. In its original evaluation role, BEM receives a question, a reference answer, and a proposed answer. It estimates whether the proposal is correct given the reference and the question. This makes it suitable for comparing two versions of a response in light of what the question asks.

The authors repurpose BEM by using the unmodified generated answer in the reference slot and a shortened version in the proposed-answer slot. If removing a particular span leaves a response that still gives the same answer, BEM should assign a high matching score. If removal takes away the information that resolves the question, the matching score should be low. The importance calculation reverses that direction by using 1 minus the BEM output. A large value means the removed material was important to preserving the answer. The generated text supplies the reference for this comparison even when it gives the wrong factual answer.

An initial version removes each token in turn. This can make the importance of a name depend on whether a remaining fragment is recognizable, and it can test an unnatural edit when a familiar word is divided into pieces. The paper illustrates the problem with the name William Shakespeare in an answer about Hamlet. The first and last names belong together for the purposes of evaluating what the answer tells the reader. Removing a phrase allows the evaluator to test the contribution of the full expression.

For the phrase-based procedure, the authors use Flair chunking, associated with Contextual String Embeddings for Sequence Labeling. Chunking divides the response into spans using phrase categories such as noun phrases, verb phrases, and prepositional material. The authors remove the tokens belonging to a phrase, submit the original and shortened answers to BEM with the question, and repeat the process for the other phrases. The generator’s probabilities play no role in deciding which omission changes the answer’s meaning in this equal-allocation procedure.

The main description says the phrase’s importance is shared equally among its tokens. The pseudocode specifies the order of operations: it divides the raw removal score by the phrase length before normalizing the resulting list of token scores.

I[l] = (1 − oₖ)/|hₖ|

I[l] is the preliminary importance at token position l, which lies in phrase hₖ. The index k identifies the phrase. oₖ is the BEM output comparing the full answer and the answer with phrase hₖ removed, both read in the context of the question. |hₖ| is the number of tokens in that phrase. The subtraction turns a low match score into a large removal impact, and the division gives each position in the phrase the same preliminary value.

I ← softmax(I, τ)

I on the right is the list of preliminary values over the answer. softmax converts them into non-negative coefficients that sum to 1. The temperature τ controls how strongly the normalization favors larger values, and the arrow replaces the preliminary list with the normalized list. The authors set this temperature to 0.01. This setting governs the conversion of removal impacts into training labels for importance. Answer generation uses a separate sampling temperature.

The phrase-based procedure gives the importance labels a specific meaning. They measure how strongly the evaluator responds to the removal of a span, in the context of a question. They do not express the probability that its claim is true. In the planet example, removing the name would leave little information with which to identify the intended planet. The same reasoning applies if the generator supplied a different planet. The omission would still eliminate the part that makes the response an answer.

Predict phrases and importance in a single pass

Repeated omission is expensive at evaluation time. Phrase detection requires a pass through the chunker, and each phrase then needs its own BEM comparison. To avoid repeating those operations for every answer being scored, the authors train a separate importance predictor from the labels produced by the chunker and BEM. Its inputs at inference are the question and intact answer. The omissions occur when preparing supervision.

The predictor is based on BERT-base-uncased and has 110M parameters. The authors remove the last layer of the pretrained system and add separate fully connected output layers. The phrase layer produces scores for labels indicating whether a token begins a phrase or falls inside one. Successive labels establish the span boundaries. The importance layer returns a scalar score for each token. This architecture lets the shared network use the question and surrounding answer for both tasks in the same forward pass.

The training questions come from the TriviaQA and Natural Questions training splits. The authors take 69,192 questions from the former and all 87,925 training questions from the latter. They use the questions to elicit responses from Llama2-7b, Llama2-7b-chat, Mistral-7b, and Falcon-7b. The examples are question–generated-answer pairs, so the target predictor encounters both the questions and the kinds of answers on which its scoring will be used. Flair provides the phrase labels on those generated answers, and the omission procedure supplies the importance targets.

Training runs for 1 epoch at a learning rate of 5e-5 and a batch size of 32. The objective gives equal weight to cross-entropy for phrase detection and negative log-likelihood for the importance prediction. The phrase term encourages the boundary labels from the chunker. The importance term encourages the system to reproduce the scores derived from BEM. Both objectives depend on automatic supervision, so a low loss indicates successful prediction of those labels under the authors’ setup.

For phrase detection, the final losses are 0.0275 on the training data and 0.0205 on validation. The corresponding importance losses are 0.1957 and 0.1901. The paper also presents individual importance predictions. In an answer to a question about Japan’s capital, the predictor assigns Tokyo an importance of 0.994. In the chemical-symbol example, Oxygen receives 0.976. These outputs illustrate how concentrated the predictions can be before the uniform component is added for MARS. They are examples of the predictor locating an answer-bearing phrase, while the uncertainty benchmarks test whether such weights improve ranking.

Convert answer scores into uncertainty estimates

The Confidence method uses the negative score of the most probable response. Substituting MARS has a direct effect: a response with a lower meaning-aware score receives higher uncertainty under this rule. There is no need to compare different answers. For the other methods, the same response scoring operation is repeated on the alternatives used in the entropy calculation.

For standard sequence Entropy, the paper gives a sampled approximation using the length-normalized score.

H(x, θ) ≈ −(1/B) ∑_{b=1}^B ln P̃(sᵦ | x, θ)

H(x, θ) denotes the uncertainty estimate for question x under generator parameters θ. B is the number of sampled answers, b is their index, and sᵦ is the answer at that index. P̃ is the length-normalized score for that answer, and ln is the natural logarithm. The sum and the factor 1/B form the mean across samples. With MARS, P̄ replaces P̃, and the averaging rule stays the same. The paper presents this approximation in its discussion of earlier work, then gives the sampling settings used in its own experiments.

Semantic Entropy first groups samples that express the same answer in context. Adding up the scores of all answers in a group gives that group’s score.

P̃(c | x, θ) = ∑_{s ∈ c} P̃(s | x, θ)

c is a semantic cluster of sampled answers for question x. The expression s ∈ c means that sequence s is a member of that cluster. θ identifies the generator, and P̃ is used on the left for the group score and on the right for each response score. The sample scores are added before taking a logarithm. Under the MARS version, the sum uses the meaning-aware scores.

SE(x, θ) = −(1/|C|) ∑_{i=1}^{|C|} log P̃(cᵢ | x, θ)

SE denotes Semantic Entropy. C is the collection of semantic clusters for question x, |C| is the number of clusters, and i indexes them. cᵢ is the cluster at index i. P̃(cᵢ | x, θ) is its summed score under the generator with parameters θ, and log is the logarithm. The calculation averages the negative log group scores over clusters. It therefore has a different averaging unit from sequence Entropy, which gives each sampled answer its own term.

Interpret the scores as evidence about meanings

The authors use a classification analogy to explain why these rules are plausible. In classification, a label represents a particular meaning and has a probability attached to it. For a generated answer, the authors posit a variable for the meaning expressed by a response in the context in which it was given. A function maps the response and context to that meaning. A desirable ordering would assign greater weight to the meanings of responses that are more likely to be correct.

In their first construction, each answer–context pair corresponds to a separate meaning. They show how the length-normalized auxiliary scores could be turned into a distribution by dividing by the total across possible pairs.

P(Y = y | θ) = P̃(s | x, θ) / ∑_{s′ ∈ S, x′ ∈ X} P̃(s′ | x′, θ)

Y is the meaning variable and y is the meaning of the answer s in context x, as determined by the paper’s meaning function g. S and X are the possible sequences and contexts. The primed symbols s′ and x′ range over those possibilities in the denominator, independently of the pair in the numerator. P is probability under the construction, P̃ denotes the length-normalized score, and θ identifies the generator. This version treats the mapping as one-to-one, so the numerator represents the score of a single pair.

If many answer–context pairs can express the same meaning, the paper replaces the numerator with a sum over those pairs.

P(Y = y | θ) = [∑_{(s, x) ∈ cᵧ} P̃(s | x, θ)] / [∑_{s′ ∈ S, x′ ∈ X} P̃(s′ | x′, θ)]

cᵧ is the set of pairs whose meaning according to g is y. The numerator sums their length-normalized scores P̃(s | x, θ). The denominator sums over all sequences s′ and contexts x′ from S and X. Y, y, P, and θ retain their meanings from the previous formula. The numerator now aggregates support for a meaning across the strings and contexts that map to it.

In this formulation, sampled meanings replace sampled strings in an entropy calculation.

SE(x, θ) = −(1/B) ∑_{b=1}^B log P(Y = yᵦ | θ)

Here x is the question, θ is the generator’s parameter setting, and SE is its semantic uncertainty for the question. In this expression B counts distinct sampled meanings and b indexes them. yᵦ is the indexed meaning, Y is the meaning variable, and log is the logarithm of its assigned probability. The factor 1/B averages those negative log probabilities.

The common denominator in the meaning distribution contributes a constant to these log-based scores for a fixed generator under the paper’s construction. Such a shift preserves their ranking. This is a conceptual explanation of why the authors can work with the auxiliary scores in the practical comparisons. It also shows where MARS fits. Replacing the length-normalized quantity changes the relative support given to answer meanings, while semantic grouping determines which answers contribute support to the same meaning. The experimental question is whether the resulting order agrees better with judgments of answer correctness.

Experiments and results

Questions, generators, and correctness judgments

The main experiments use closed-book questions. The generation prompt asks for an answer without supplying a passage from which to recover it. The general-knowledge evaluation uses 8000 question–answer pairs from the TriviaQA validation split, 3610 samples from the Natural Questions validation split, and 6642 WebQA samples from its combined training and test splits. The paper labels Natural Questions as NaturalQA in its result tables. The TriviaQA and Natural Questions evaluation splits are separate from their training splits used to prepare the importance predictor. TriviaQA · Natural Questions

The generators include the base and chat variants of Llama2-7b, along with Mistral-7b and Falcon-7b. A further comparison uses Llama2-13b. The chat variant of Llama is adapted for dialogue, and the paper describes Falcon as fine-tuned on a mixture of chat and instruction data. The authors use the existing configurations for generation. Each score comparison concerns responses from an individual generator, so the results do not depend on assembling outputs from different systems into a posterior ensemble. Llama 2 · Mistral 7B · The Falcon Series

The authors give all generators the same 2-shot prompt. In this form of few-shot learning, the prompt first supplies completed examples that establish the response format. The paper’s demonstrations concern Australia’s capital and the painter of Starry Night. The test question follows with a slot for its answer. The generation configuration uses the period token as a stopping marker to discourage long answers in the closed-book setting. The appendix also specifies greedy decoding with num_beams = 1. For the sampled answers used in the main entropy comparisons, the authors report 5 samples and a sampling temperature of 0.5.

After generation, GPT-3.5-turbo judges the answers for the general-knowledge benchmarks. It receives the question, the benchmark reference, and the generated answer and returns a binary judgment. This is a different comparison from the one BEM performs when the authors build importance labels. BEM compares an answer with its own shortened version. The experimental evaluator compares a generated answer with an external reference to establish whether the uncertainty ranking succeeds at its intended task.

The reported metric is the area under the receiver operating characteristic curve, abbreviated AUROC. Imagine moving a threshold through the range of uncertainty scores and flagging answers above it as likely errors. At any threshold some actual errors will be flagged, and some correct answers will be flagged as well. Each threshold gives a point on the curve with the false positive rate on the x-axis and the true positive rate on the y-axis. On the underlying AUROC scale, the paper describes 0.5 as chance, with the metric ranging from 0 to 1. The figures below retain the numerical presentation in the paper’s tables.

AUROC evaluates discrimination across thresholds. An improvement means the uncertainty method does a better job of separating the two classes of evaluated answers by rank. It does not select an operating threshold, and it does not count how many answers the generator got right. In this design the MARS variants are scored on the generator’s answers, so the comparison concerns how well the method recognizes unreliable output.

The effect of replacing the response score

The experimental design pairs each baseline with a version that uses MARS. Confidence uses only the token probabilities of the selected generation. Entropy brings in multiple sampled generations and uses each sequence as a separate term. Semantic Entropy uses multiple generations and calls a natural language understanding system for natural language inference, or NLI, to make the comparisons needed to group their meanings. The quantities the methods aggregate therefore differ. Within each pair, the switch from the uniform to the meaning-aware score is the intervention of interest.

Uncertainty methods with and without MARS on TriviaQA with Mistral-7b

MARS improves each paired method, and Semantic Entropy with MARS ranks highest.

Uncertainty methods with and without MARS on TriviaQA with Mistral-7bConfidence: 72.55Confidence72.55Confidence + MARS (this paper): 77.97Confidence + MARS (this paper)77.97Entropy: 72.57Entropy72.57Entropy + MARS: 78.51Entropy + MARS78.51Semantic Entropy: 82.17Semantic Entropy82.17Semantic Entropy + MARS: 83.63Semantic Entropy + MARS83.63
The numbers
System or settingAUROC
Confidence72.55
Confidence + MARS (this paper)77.97
Entropy72.57
Entropy + MARS78.51
Semantic Entropy82.17
Semantic Entropy + MARS83.63

The TriviaQA results show why a within-method comparison matters. With Mistral-7b, ordinary Confidence and Entropy are close on this benchmark, and both benefit from replacing their response score. Semantic Entropy begins with a higher AUROC and still improves. Weighting positions inside the sampled answers preserves a benefit after the answers have been grouped by meaning. Within this setting, the two uses of semantics are complementary.

The pattern extends across the other generators and datasets in the main table. The paper reports gains as large as 5.8 AUROC points for Confidence, 6.24 for Entropy, and 1.51 for Semantic Entropy on its reported scale. Those maxima describe the strongest changes for each calculation across the main comparisons. Their sizes vary by dataset and generator. The authors’ consistent-improvement claim refers to the direction of the paired changes throughout that table.

Some of the smaller improvements help put the TriviaQA examples in perspective. On the Natural Questions validation split with Mistral-7b, Confidence goes from 69.54 to 71.36 and Entropy goes from 68.05 to 70.71. Semantic Entropy goes from 75.12 to 75.50. On the combined WebQA splits with Falcon-7b, the corresponding scores move from 66.56 to 68.26 for Confidence, from 65.98 to 68.44 for Entropy, and from 73.16 to 73.57 for Semantic Entropy. These comparisons show that the advantage survives across the datasets while its size depends on the starting method and the test conditions.

The sharpest increase reported for Confidence is visible on TriviaQA with Llama2-13b, where the baseline records 68.19 and the MARS variant records 73.99. That setting also gives an example of a sizeable change when the underlying generator was absent from the list used to produce training answers for the importance predictor. On WebQA with the chat Llama2-7b, Confidence moves from 64.06 to 64.48. The range of changes is part of the result. A consistent direction across tested comparisons and a uniform practical benefit are different claims.

The paper also asks the reader to consider what the baseline calculation requires. Confidence scores one answer. Entropy has the added cost of generating and scoring samples. Semantic Entropy also makes pairwise inference comparisons for clustering, which the authors describe as growing quadratically in the number of generations. The importance predictor adds work for any response that is scored. The authors characterize its added resource demands as approximately 1.5% for the 7b generators and 0.8% for the 13b generator, owing to its relatively small size. Those estimates concern the importance component alongside the generator. The total cost of the uncertainty method still depends on how many responses it uses and whether it groups them.

The appendix gives end-to-end context for the experiments. It reports roughly 400 GPU-hours for the main benchmark table, approximately 200 GPU-hours for automatic labeling of the importance training data, and 7 GPU-hours for training that predictor on the labeled data. The labeling figure captures a cost paid to obtain the targets for phrase removal. Once the predictor is trained, using it on a generated answer no longer entails that repeated labeling procedure.

The medical question set

The authors also test whether the scoring change carries over to medical questions. They describe a practical difficulty in selecting data. Some available datasets give several answer options, and others lack clear references suitable for the same correctness test. They work with medical professionals to choose items from MedMCQA that can be answered objectively without displaying the original choices. The resulting medical set contains 415 samples. The medical professionals’ role described by the paper is in selecting suitable questions. MedMCQA

The authors use Medicine-Chat-7b to generate the answers in this experiment. This generator is adapted to medicine and is based on LLaMA-2-Chat-7B. The evaluation uses GPT-4 to assess answer validity. The benchmark thus extends the test to specialized questions while changing both the generator and the correctness evaluator. The relevant comparison for the score substitution is again within each uncertainty method under the same medical setup. GPT-4 Technical Report

Uncertainty methods with and without MARS on the curated medical QA set

MARS improves each paired method, with the highest AUROC from Semantic Entropy with MARS.

Uncertainty methods with and without MARS on the curated medical QA setConfidence: 62.41Confidence62.41Confidence + MARS (this paper): 62.89Confidence + MARS (this paper)62.89Entropy: 59.58Entropy59.58Entropy + MARS: 60.33Entropy + MARS60.33Semantic Entropy: 62.89Semantic Entropy62.89Semantic Entropy + MARS: 64.48Semantic Entropy + MARS64.48
The numbers
System or settingAUROC
Confidence62.41
Confidence + MARS (this paper)62.89
Entropy59.58
Entropy + MARS60.33
Semantic Entropy62.89
Semantic Entropy + MARS64.48

The medical experiment reproduces the direction of the paired improvements. It also shows that weighting relevant phrases does not remove the difficulty of judging uncertainty in that domain. Even the best of the medical results has lower AUROC than the best general-knowledge settings. The authors suggest that the structure of the answers could be involved. A general-knowledge item often asks for a fact that fits in a short sentence. A selected medical item can have an objective answer while still calling for an explanation that extends over several sentences. Scoring reliability in that case may require handling more claims and relationships within an answer.

That explanation remains a hypothesis. The medical experiment does not hold the rest of the setup constant while varying answer complexity, and its scores on their own cannot identify the source of the difference. It does show that the improvement from meaning-aware weighting survives a shift to this curated medical setting. The absolute level of discrimination gives a separate view of how difficult the extension remains.

What the ablations show

Removing phrases gives better importance labels

The first ablation changes the unit removed to derive importance. In the token version, each omission affects a single generator token. In the phrase version, the omission affects the chunk as a whole. Both versions still estimate response importance and combine it with length normalization. On the TriviaQA validation subset, the authors report results with Llama2-7b and Mistral-7b, applying each importance variant to all the uncertainty methods used in the main study.

Token and phrase importance for Confidence on TriviaQA

Phrase-level importance gives higher AUROC for both generators in the comparison.

Token and phrase importance for Confidence on TriviaQALlama2-7b with token importance: 72.53Llama2-7b with token importance72.53Llama2-7b with phrase importance (this paper): 75.06Llama2-7b with phrase importance (thispaper)75.06Mistral-7b with token importance: 75.31Mistral-7b with token importance75.31Mistral-7b with phrase importance: 77.97Mistral-7b with phrase importance77.97
The numbers
System or settingAUROC
Llama2-7b with token importance72.53
Llama2-7b with phrase importance (this paper)75.06
Mistral-7b with token importance75.31
Mistral-7b with phrase importance77.97

The gain carries over to Entropy and Semantic Entropy. On the TriviaQA validation subset with Llama2-7b, Entropy with token importance records 74.46, while phrase importance gives 75.94. With Mistral-7b, Semantic Entropy with token importance gives 83.25, and the phrase version gives 83.63. The token-level variant already improves upon its corresponding length-normalized baselines in these comparisons. The gain from phrase removal comes on top of the gain from introducing importance weighting.

The controlled change supports the authors’ concern about dividing semantically related text into independent positions. The removal score for a fragment can reflect how well the evaluator recognizes the damaged expression. An omission of the full expression more directly tests how much the answer relied on it. The reported AUROC measures the consequence for uncertainty ranking. It does not directly grade phrase boundaries or establish that every span proposed by the chunker matches the unit a reader would choose.

Allocating importance inside the phrase

Once a phrase receives an importance coefficient, the paper considers different ways of placing that weight on its tokens. The default divides the importance equally. The alternative called Max assigns it to the most uncertain token of the phrase, the position with the lowest conditional probability. Min assigns it to the least uncertain token, the position with the highest conditional probability. The uniform length component remains part of MARS even when the meaning-dependent weight is concentrated on one token.

The Max and Equal settings trade places across some TriviaQA comparisons. With Llama2-7b, Entropy with MARS gives 77.11 for Max and 75.94 for Equal. With Mistral-7b, the same calculation gives 79.22 for Max and 78.51 for Equal. For Semantic Entropy on Mistral-7b, Equal gives 83.63 and Max gives 83.62. The results support the authors’ characterization of concentrating weight on the most uncertain part of a phrase as competitive with sharing it. The tested setting with the largest AUROC depends on the surrounding uncertainty calculation.

The Min comparisons are weaker. On TriviaQA with Llama2-7b, Min gives 69.92 for Confidence with MARS, compared with 75.13 for Max and 75.06 for Equal. On the same dataset with Mistral-7b, Min gives 72.75 for Entropy with MARS, below both the Equal and Max values. The results show that choosing the right phrase still leaves a consequential decision about which conditional probability to emphasize.

The paper offers a hypothetical tokenization of Shakespeare to explain this pattern. Think of the name as having an opening piece and a completion. Once the generator commits to the opening, the completion may be highly predictable. Weighting the completion alone can give a misleading account of how uncertain the generator was when choosing the name. The opening probability may carry more of that information. Equal weighting lets both positions contribute, and Max puts the phrase’s importance where the observed conditional uncertainty is greatest.

This interpretation connects phrase dependencies to the autoregressive probabilities used in the score. The phrase is assessed as a unit because its parts express meaning together. The values multiplied for that phrase still represent successive decisions. They can differ substantially in how informative they are about the choice that made the phrase appear. The ablation tests that distinction directly by reallocating importance while keeping the phrase available.

Sampling temperature and the number of answers

Entropy and Semantic Entropy depend on which alternative answers are sampled. The authors vary sampling temperature and sample count on TriviaQA with Llama2-13b and Mistral-7b. Changing temperature changes the diversity of the answers available for the entropy calculation. Higher temperature spreads the sampling probabilities more broadly, while lower temperature favors the more probable continuations. This is the temperature used for generation. The importance procedure’s softmax temperature shapes the labels derived from phrase omissions.

The temperature plots show improvements from MARS at every tested temperature for those generator and method settings. The comparisons indicate that the response score’s benefit does not depend on the single sampling temperature chosen for the main table. Because the temperature affects what answers are observed, this test probes one way the importance weights might have been sensitive to the make-up of the sample.

Varying the sample count tests another source of sensitivity. More generations provide more material for estimating entropy, with added generation costs. For Semantic Entropy, they also increase the number of comparisons needed for clustering. The authors report that MARS continues to help as the count changes, with its advantage more apparent at lower sample counts in the plotted comparisons. In that setting the evidence from each sampled answer has a larger role in the calculation, which makes the quality of its score especially relevant. The plot concerns the tested TriviaQA settings and does not yield a general exchange rate between adding samples and reweighting tokens.

Comparisons with relevance weighting

The paper includes an illustrative comparison with TokenSAR using an answer that names the Burj Khalifa and surrounds the name with descriptive material. MARS assigns the phrase containing the building’s name an importance value of 0.8428. The TokenSAR example distributes weight more broadly among the displayed tokens, including parts of the descriptive ending. The comparison illustrates the distinction the authors draw between a question-aware answer match and a general similarity score after removal. The actual answer can occupy a small part of a long string, where changes to the other words also affect plain similarity.

The authors also contrast the number of scoring passes required by the procedures. Their trained importance predictor uses one pass per answer, while the TokenSAR procedure described in the paper calls its similarity system for successive token removals. The paper gives a 30x computational-efficiency comparison for a generation of 10 tokens, alongside the sizes of the two auxiliary systems. The comparison is tied to that scenario and the described implementations. The trained predictor changes the number of repeated passes needed for importance estimation. Processing a longer answer still requires the predictor to read that answer.

Limitations

Limits the authors state

The authors restrict the main claims to closed-ended English question answering. Questions in this setting have objective references, allowing an evaluator to assign a binary correctness label. The authors leave open-ended questions and other languages for future work. A result on this setup therefore does not establish what a high importance coefficient would mean when an answer has several valid lines of argument, or when evaluating it requires judgments beyond agreement with a reference fact.

The importance labels are also a limitation the authors identify. The supervision comes from existing systems, with phrase labels from automatic chunking and importance targets from BEM comparisons. No human judgment of the importance of each span is required by this procedure. The authors suggest that human importance labels might improve the predictor. Their study does not test that expectation. Agreement with automatic targets supports the ability to reproduce the labeling procedure, while improvement on uncertainty benchmarks supports the usefulness of the resulting score under those conditions.

The paper’s ethics discussion stresses that the uncertainty methods still make mistakes. It also raises the possibility that biases in the generators’ probabilities can carry over to their uncertainty scores. The reported AUROCs summarize the selected evaluation sets. They do not establish equal treatment across demographic groups, and the paper does not supply group-specific estimates. This concern is separate from the gains shown in the medical experiment, which are measured on the curated question set as a whole.

For specialized domains, the authors call for further investigation into what changes when answers become more involved. Their discussion of medical questions distinguishes the simplicity of an objective reference from the complexity of the explanation a question can require. A response may have an identifiable correct conclusion and still contain supporting claims whose validity matters. The sample used here lets the authors test error ranking on selected questions. It leaves the behavior of the score on broader medical conversations and on other specialized fields open.

Limits visible in the evaluation design

The main metric supports a ranking claim. If an uncertainty score orders the answers well, a reader can infer that higher-scored responses are more prone to error under the evaluation procedure. The experiments give no mapping from a particular MARS value to an observed probability of correctness. The paper’s meaning-distribution construction is an explanation of how the scores can be understood, while the observed AUROC establishes discrimination. Reading the auxiliary score as a calibrated probability of truth would require evidence about observed correctness at specified score levels.

The correctness decisions are themselves part of the measurement. The general-knowledge labels come from GPT-3.5-turbo, and the medical labels from GPT-4. The results depend on how those evaluators handle equivalents, elaboration, and partial agreement with the reference. The medical professionals helped create the subset, while GPT-4 assessed the generated answers. The medical AUROC consequently reflects agreement with those automated correctness judgments on questions selected with expert assistance. The benchmark does not report independent expert grading for all the generated responses.

The importance calculation has another dependency on automated judgment. Its training labels are grounded in what BEM considers a meaningful difference after removal. Deleting a phrase can simultaneously remove factual content and damage the grammar of what remains. Such cases can change an evaluator’s match score for more than one reason. The phrase-versus-token results show which procedure was more useful downstream in the reported TriviaQA settings. They leave open how frequently the coefficient agrees with a human assessment of why the omission mattered.

The span-removal design mainly asks what is lost by deleting a phrase in the presence of the rest of the answer. This gives it a particular view of redundancy. If two parts repeat the same piece of information, deleting either separately could leave that information available elsewhere. The importance of a phrase can thus depend on the other phrases around it. This is consistent with the paper’s context-dependent definition, but it limits a broader interpretation of the coefficients as standalone measures of how essential every claim is.

The fixed uniform contribution also marks a boundary on what the ablations establish. The authors compare token and phrase labeling, allocation within phrases, and sampling settings. The main rule gives the uniform and importance components equal influence. The reported comparisons do not establish that this mixture is optimal across generators, datasets, or answer lengths. An improvement from the chosen mixture is evidence for using meaning-aware weights in the tested calculations.

The training and test setup shows some transfer while retaining relationships between sources of supervision and evaluation. TriviaQA and Natural Questions appear in both stages, through separate splits. The generators used to produce the training answers include several of those benchmarked later. Llama2-13b and the medical generator broaden the evidence, and WebQA adds a dataset outside the importance predictor’s training question sources. The design supports performance across those reported settings. Claims about completely different generation systems or answer formats would require testing those conditions.

Access to token probabilities is a prerequisite for using the method as described. The importance predictor can identify a critical phrase from the text and question, but the uncertainty calculation still needs the generator’s conditional probabilities. The paper therefore restricts the main comparison to probability-based baselines. Its results do not establish a ranking against uncertainty methods designed to operate with plain-text access alone.

Finally, the paper reports that the numerical results come from a single run, citing computational demands. Repeated-run variation is especially relevant when interpreting the smaller AUROC changes, and the reported experiment does not give an estimate of that variation. The direction of the changes across the table is directly observable. The precision with which any individual improvement would repeat under fresh sampling is a separate question.

What came after

Efficient Self-Evaluation for Diffusion Language Models via Sequence Regeneration cites MARS in work on efficient self-evaluation through sequence regeneration. The title identifies a different source of evidence for judging a response: generating the sequence again. MARS asks how to turn the token probabilities of an answer into a score that better reflects its content. The later work addresses self-evaluation in a diffusion setting. Its citation establishes a connection to the earlier uncertainty work, while the title does not establish whether it uses phrase importance or adopts the MARS scoring rule.

Balancing Classification and Calibration Performance in Decision-Making LLMs via Calibration Aware Reinforcement Learning cites MARS in a study whose stated objective is to balance classification and calibration through training. That objective brings the distinction between ranking and calibration into view. MARS tests whether a scoring change on existing responses improves the ranking of right and wrong answers. The citing work’s title places calibration alongside classification performance in a reinforcement learning objective. The citation alone does not establish whether the MARS score is an input to that objective or whether the connection is to the broader problem of estimating reliability.

D²-RAG cites MARS in work on retrieval-augmented generation that names multi-dimensional uncertainty and utility-aware decoding as parts of a dual-decision approach. This brings uncertainty into a setting concerned with how the system makes decisions during retrieval-augmented generation. MARS measures uncertainty for a selected answer to a closed-book question. The later title indicates a broader decision setting, while leaving the source and use of each uncertainty dimension unspecified. It does not establish which decisions depend on MARS or whether they use its coefficients directly.

Cite

Cite as Yavuz Faruk Bakman, Duygu Nur Yaldiz, Baturalp Buyukates, Chenyang Tao, Dimitrios Dimitriadis and Salman Avestimehr. 2024. MARS: Meaning-Aware Response Scoring for Uncertainty Estimation in Generative LLMs. Proceedings of the 62nd Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers).

The paper itself, not this page. BibTeX from the library's record of the work. DOI 10.18653/v1/2024.acl-long.419

@inproceedings{bakman2024mars,
  title = {{MARS: Meaning-Aware Response Scoring for Uncertainty Estimation in Generative LLMs}},
  author = {Yavuz Faruk Bakman, Duygu Nur Yaldiz, Baturalp Buyukates, Chenyang Tao, Dimitrios Dimitriadis and Salman Avestimehr},
  booktitle = {Proceedings of the 62nd Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers)},
  year = {2024},
  doi = {10.18653/v1/2024.acl-long.419},
  url = {https://doi.org/10.18653/v1/2024.acl-long.419}
}

↑ back to top

This page in Markdown https://md.research.elamur.ai/free/en/papers/bakman-2024-mars-meaning-aware-response-scoring/