Large language model validity via enhanced conformal prediction methods

Authors: john j cherian
isaac  gibbs
emmanuel j candès
Venue: NeurIPS_cc_2024_Conference
Published: 2024-05-15 16:44:37

Abstract: We develop new conformal inference methods for obtaining validity guarantees on the output of large language models (LLMs). Prior work in conformal language modeling identifies a subset of the text that satisfies a high-probability guarantee of correctness. These methods work by filtering claims from the LLM's original response if a scoring function evaluated on the claim fails to exceed a threshold calibrated via split conformal prediction. Existing methods in this area suffer from two deficiencies. First, the guarantee stated is not conditionally valid. The trustworthiness of the filtering step may vary based on the topic of the response. Second, because the scoring function is imperfect, the filtering step can remove many valuable and accurate claims. We address both of these challenges via two new conformal methods. First, we generalize the conditional conformal procedure of Gibbs et al. (2023) in order to adaptively issue weaker guarantees when they are required to preserve the utility of the output. Second, we show how to systematically improve the quality of the scoring function via a novel algorithm for differentiating through the conditional conformal procedure. We demonstrate the efficacy of our approach on biography and medical question-answering datasets.

Main paper: 
 introduction: 
 Large language models (LLMs) are a breakthrough in machine learning. In addition to their extraordinary performance on natural language processing benchmarks, LLMs such as ChatGPT and Gemini are now used by hundreds of millions of users around the world [24] . But even though these models match or even surpass human performance on an increasingly complex and diverse set of tasks, their reliability remains in doubt. For example, LLMs often confidently hallucinate facts that do not exist, and can generate toxic outputs that may offend or discriminate [22] . This "misalignment" between user goals and model behavior hinders LLM deployment in settings where the potential for AI assistance appears highest, e.g., legal work or customer service interaction [31] .Since an LLM output is not always trustworthy, a growing body of work aims to quantify uncertainty regarding a given output's validity. While there are many approaches to this problem [28, 4, 9, 18] , this paper considers a particularly popular method for black-box uncertainty quantification: conformal inference [30, 2, 3] . Conformal inference provides a generic methodology for transforming the predictions of any modeling procedure into valid prediction sets that are guaranteed to contain the true outcome with high probability. Several recent papers have applied conformal inference to define a set of LLM responses that contains at least one factual response with high probability [3, 17, 25, 32] . But while generating a candidate set of outputs may be a reasonable strategy in some question-answering problems, it is not a generalizable approach for the diverse and unstructured tasks faced in real-world deployment.The shingles vaccine is typically recommended for adults aged 50 and older. The vaccine is given in two doses, with the second dose administered 2 to 6 months after the first dose. It is currently recommended that individuals receive the shingles vaccine once in their lifetime. However, it is always best to consult with a healthcare provider for personalized recommendations.The shingles vaccine is typically recommended for adults aged 50 and older. The vaccine is given in two doses, with the second dose administered 2 to 6 months after the first dose. It is currently recommended that individuals receive the shingles vaccine once in their lifetime. However, it is always best to consult with a healthcare provider for personalized recommendations.The shingles vaccine is typically recommended for adults aged 50 and older. The vaccine is given in two doses, with the second dose administered 2 to 6 months after the first dose. It is currently recommended that individuals receive the shingles vaccine once in their lifetime. However, it is always best to consult with a healthcare provider for personalized recommendations.Fixed level: 90% Adaptive level: 63%Figure 1 . The left panel displays the output of GPT-3.5-Turbo for the prompt "How often is a shingles vaccine required?" The first filtered output (center) is calibrated using the frequency score (see Appendix E.1) and the marginally valid conformal factuality method of Mohri and Hashimoto [21] at a fixed level of 90%. The second filtered output (right) is calibrated using a score obtained via our conditional boosting procedure (Section 3.3) at a level of 63%, which is chosen and calibrated using our adaptive method (Section 3.2) to approximately ensure that at least 70% of the claims are retained.Both filtered outputs are guaranteed to include no false claims with the stated probability.More recently, Mohri and Hashimoto [21] propose to forgo sets of LLM outputs and instead utilize conformal inference to filter out invalid components of the LLM response. At a high level, given an LLM generation parsed into a set of distinct sub-claims, their method censors all sub-claims for which a pre-defined scoring function lies below some threshold. Mohri and Hashimoto [21] then show how to calibrate this threshold such that the retained claims are factual with high probability.While these methods represent a promising step towards usable guarantees for LLM outputs, theyare not yet practical. One limitation is that the guarantee attained by previous methods only holds marginally over a random test prompt. The true probability of output correctness may then vary substantially based on the prompt's characteristics. For example, we show in Section 4 that the probability of output correctness (even after applying the conformal factuality method) is substantially lower for responses whose subjects are likely to be underrepresented in the model's training corpus. Second, existing methods remove too many claims to be practically useful. Recall that we remove sub-claims for which some pre-defined score falls below a calibrated threshold. If this score is perfect, only false claims will be censored. In practice, however, these scores are only weakly correlated with the ground truth. As Figure 1 demonstrates, a high probability factuality guarantee can require the removal of a significant proportion of the generated text. 1 The conformal guarantee is not useful if the filtered response has limited value for the end-user.In this subsection, we will preview and summarize our results. A more complete description of our theory and experimental setup is deferred to Sections 3 and 4.As in prior literature on conformal language modeling, we will assume the existence of an annotated calibration set of n i.i.d. prompt-response-claim-annotation tuples, {(P i , R i , C i , W i )} n i=1 . The vector C i is obtained by using an LLM to parse the response into a list of scorable sub-claims, while W i might correspond to human verification of the underlying factuality of each claim. To simplify notation, we will refer to these tuples using the shorthand, D i .At first glance, the twin goals we have outlined for this paper, improved conditional validity and enhanced quality of filtered outputs, appear to be irreconcilable. Indeed, prior work establishes that precise conditional guarantees in black-box uncertainty quantification require larger prediction set sizes, i.e., smaller filtered outputs [5, 29] . We contribute two methods to mitigate this trade-off, thus enabling the practical application of conformal prediction to LLMs.Our first method, which we call conditional boosting, allows for the automated discovery of superior claim scoring functions via differentiation through the conditional conformal algorithm of Gibbs et al. [10] . Automated conformal score improvement was introduced by Stutz et al. [27] ; their paper shows how to minimize conformal prediction set size in a classification setting by differentiating through the marginally valid split conformal algorithm. As we show, however, in Section 4, optimiz- . Empirical demonstration of our methods. The panels display results for our conditional boosting and level-adaptive methods. We aim to issue outputs with 0 factual errors, and for the latter method, we choose the level with the objective of retaining at least 70% of the original claims in the prompt. The left panel compares the binned nominal probabilities of factuality reported by our method against the realized probability of factuality for data points belonging to each bin. These probabilities are estimated using 500 test points over 100 calibration-test splits. The plotted bins, which are also given as inputs to our method, are [0. ing the score function subject only to a marginal coverage constraint can lead to poor conditional properties.Optimizing through the conditional conformal algorithm is not straightforward. Our key technical contributions are a proof that (under mild assumptions) the cutoff output by the conditional conformal method is differentiable and a computationally efficient method for computing this derivative. By running gradient descent using this algorithm we discover new scores that enable greater claim retention.The right panel of Figure 2 demonstrates the efficacy of our method. Here, we use boosting to learn an optimal linear combination of four candidate scoring functions. We compare the learned, boosted scores (orange) against a baseline method (blue) that uses the "frequency" scoring method developed by Mohri and Hashimoto [21] . As the figure shows, the boosted score allows for higher claim retention across all datasets (mean retention of 39% vs. 24% for the boosted vs. unboosted scores).Our second method, which we call level-adaptive conformal prediction, allows the validity of the conformal output to depend on characteristics of the queried prompt. In our LLM experiments, we adapt the level, i.e., the claimed probability of correctness, individually to each prompt in order to ensure that issued outputs retain at least 70% of the original set of sub-claims. For example, in Figure 1 , we prompt GPT-3.5-Turbo to output a response to a question from the MedicationQA dataset [6] . Outputting a filtered response that achieves the stated factuality criterion with probability 90% requires near-complete censorship, but by relaxing the level to 63% using our method, we can preserve almost the entire response.Given that we are now issuing an output-adaptive probability of correctness, it is crucial that our issued probability is calibrated. Calibration requires that the true probability of correctness matches the issued one. For example, if a weather forecaster claims that there is a 70% chance of rain, their forecast is calibrated if it actually rains for 70% of the days on which a 70% forecast is issued.Figure 2 displays the advantages of our approach to this problem. First, the left panel of Figure 2 verifies that the level-adaptive probabilities we report are empirically well-calibrated. Second, the right panel of Figure 2 quantitatively demonstrates the improved claim retention of our method and verifies that for each dataset included in the MedLFQA benchmark [13] our level-adaptive conformal prediction retains at least 70% of the original output's claims in most examples. Finally, by combining our level-adaptive and conditional boosting methods, we retain most claims and output non-trivial guarantees of response factuality; the left panel shows that the issued probabilities vary between 50 and 85%. By contrast, while the fixed level method guarantees a 90% probability of correctness, the method retains very little of the original LLM output.To emphasize that these results are accompanied by formal guarantees, we preview one instantiation of our theory here. Since it is well-known that exact conditional guarantees in conformal inference are impossible to achieve without strong distributional assumptions [5, 29] , we present an interpretable alternative: group-conditional calibration. 2 For example, in this dataset, we might group questions by medical area or data provenance; we would then hope to show that across health conditions or data sources, the claimed probability of factuality matches the true probability of factuality.Equation (1) , which follows from Theorem 3.2, presents one guarantee that our method can satisfy.Here, we denote the (random) output of our data-adaptive level function by α n+1 and our filtered set of claims by F (C n+1 ). Our method then satisfies the following guarantee simultaneously over groups G ∈ G (e.g., prompt topic, data provenance) and some discretization of [0, 1] given by the sub-intervals I (e.g., all sub-intervals with endpoints belonging to {0, 0.1, . . . , 1}),EQUATION)More concretely, (1) establishes that the issued probabilities are well-calibrated in the following sense: among similar prompts, the outputs that we claim to be factually correct with probability, say, between 70 and 80% will be actually factual between 70 and 80% of the time. In Section 3.1, we show how our framework can be adapted to guarantee that the LLM's response satisfies other alignment targets beyond factual accuracy.The remainder of the paper is outlined as follows. In Section 2, we introduce the formal notation of our paper and contextualize our approach by reviewing related work in conformal inference. Section 3 then presents our new methodology for conformal language modeling. We first generalize the conditional conformal procedure of Gibbs et al. [10] to obtain high-probability control of arbitrary monotone risks. We then state and give intuition for the key technical results underpinning our level-adaptive and boosting methods. Section 4 outlines synthetic experiments displaying the improvements of our approach over existing methods, gives a more detailed description of the experiment presented in Figure 2 above, and presents another experiment that filters short biographies output by an LLM.We release a filtered version of the MedLFQA benchmark that removes some non-health-related prompts, the generated and parsed text used to run our experiments, as well as the notebooks used to produce the figures in this paper at github.com/jjcherian/conformal-safety. We also update our Python package for conditional conformal inference to support level-adaptive conformal prediction. This package is available to download at github.com/jjcherian/conditional-conformal and can be installed from PyPI.2 Background and related work 
conformal prediction with conditional guarantees: 
 Split conformal prediction provides a generic procedure for transforming the outputs of any blackbox model into valid prediction sets [23, 30] . Let {(X i , Y i )} n+1 i=1 be a set of covariate-ground truth pairs where X n+1 denotes a test value for which we would like to output a response. Then, split conformal outputs a prediction set Ĉ(X n+1 ) such thatEQUATION)for any user-specified value α ∈ (0, 1).While powerful, the guarantee given in (2) only holds on-average over the test value. Critically, in the LLM context we consider, this means that methods calibrated using split conformal prediction run the risk of displaying systematically worse performance on the most safety-critical examples.This problem is addressed in Gibbs et al. [10] , which introduces a novel target for obtaining coverage conditional on covariate information. In their work, they observe that exact covariate-conditional coverage can also be expressed as a marginal guarantee over any measurable function f ∈ F , i.e.,P(Y n+1 ∈ Ĉ(X n+1 ) | X n+1 ) = 1 -α ⇔ E[f (X n+1 ) • ({Y n+1 ∈ Ĉ(X n+1 )} -(1 -α))] = 0 for all measurable f .Since exact distribution-free covariate-conditional coverage requires the analyst to issue vacuous prediction sets [29] , Gibbs et al. [10] design a prediction set that satisfies the same marginal guarantee over a user-specified function class F, i.e.,EQUATION)To make this guarantee concrete, consider the case whereF := {({X ∈ G}) ⊤ β | β ∈ R |G| }for some set of subgroups G. Then, (3) is exactly equivalent to group-conditional coverage, i.e.,P(Y n+1 ∈ Ĉ(X n+1 ) | X n+1 ∈ G) = 1 -α for all G ∈ G.To understand their construction, let S(X, Y ) ∈ R denote a conformity score that measures how well Y "conforms" to an estimate of its value. A typical choice in the regression setting is S(X, Y ) = |Y -μ(X)| for some fixed regression function μ(•); in the classification setting, we might choose S(X, Y ) = 1/π(Y | X) for some estimated conditional probabilities π.Gibbs et al. [10] estimate a high-probability upper bound for these scores by fitting an augmented quantile regression in which the unknown test score, S(X n+1 , Y n+1 ) is replaced by an imputed value S. Formally, let ℓ α (r) := (1 -α)[r] + + α[r] -denote the pinball loss. Then, they defineEQUATIONand output the prediction set given by Ĉ(X n+1 ) := {y : S(X n+1 , y) ≤ g S(Xn+1,y) (X n+1 )}.Since Ĉ(X n+1 ) can be mildly conservative, Gibbs et al. [10] also define a smaller randomized prediction set, Ĉrand. (X n+1 ) that achieves exact coverage. We will typically prefer to work with this set, but defer a detailed definition of its construction to the Appendix. As the following theorem shows, this randomized set achieves the guarantee stated in (3).Theorem 2.1 (Proposition 4 of Gibbs et al. [10] ). Let F = {Φ(X) ⊤ β : β ∈ R d } denote any finite dimensional linear class. Assume that {(X i , S i )} n+1 i=1 are exchangeable and that solutions to (4) and its dual are computed symmetrically on the input data. Then, for all f ∈ F ,E[f (X n+1 )({S n+1 ∈ Ĉrand. (X n+1 )} -(1 -α))] = 0.As discussed in the introduction, prediction sets are not suitable for many LLM use-cases. As an alternative, Quach et al. [25] and Mohri and Hashimoto [21] use conformal inference to develop filtering methods that remove false claims from an LLM's output. We will focus specifically here on the work of Mohri and Hashimoto [21] since this is most similar to the new methods that we will propose in this article. Recall that C i = {C ij } ki j=1 denotes the claims made in an LLM's response and W i = {W ij } ki j=1 denotes binary variables for which W ij = 1 indicates that the claim is true.Mohri and Hashimoto [21] aim to output a set of filtered claims, F (C i ) ⊆ C i , that contains no errors with high probability, i.e.,EQUATION)To achieve this target, Mohri and Hashimoto [21] define a scoring function p(P i , C ij ) ∈ R that takes a prompt and claim as input and summarizes the LLM's internal confidence in the claim. Here, larger values of p(P i , C ij ) indicate that the LLM believes that C ij is more likely to be true. Then, Mohri and Hashimoto [21] setF (C i ) := F (C i ; τ ) = {C ij : p(P i , C ij ) ≥ τ },where τ is the ⌈(1-α)(n+1)⌉ n+1 -quantile of the conformity scores,EQUATIONMirroring the proof of split conformal prediction [23] , Theorem 1 of [21] shows that if{(P i , R i , C i , W i )} n+1i=1 are exchangeable, this method satisfies (5).3 Methods 
generalization to alternative targets: 
 Our first contribution in this paper will be to generalize the conditional framework of Gibbs et al. [10] to accommodate generic LLM alignment tasks. To do so, we extend the conformal risk control framework [3, 15] to provide high-probability control of a monotone loss with conditional guarantees.More concretely, suppose that we are given a loss function L( F (C i ), W i ) that measures the quality of the filtered output F (C i ) relative to the ground truth W i . Our goal will be to ensure that P(L( F (C n+1 ), W n+1 ) ≤ λ) ≥ 1 -α, for some user-specified tolerance λ > 0. For example, in the prior section L(•, •) was the binary indicator that F (C n+1 ) contains a false claim. More generally, L(•, •) could measure the presence of toxic or discriminatory content in the response.To incorporate general losses into the conditional conformal framework of Gibbs et al. [10] , we require two assumptions. First, we assume that the method is always permitted to abstain from issuing a response and thus L(∅, •) = 0. Second, we assume that the loss is monotone. Namely, for any sets of claimsF1 (C i ) ⊆ F2 (C i ), it must be the case that L( F1 (C i ), W i ) ≤ L( F2 (C i ), W i ).With these assumptions, we extend the calibration procedure of Gibbs et al. [10] as follows. Let X i = X(P i , R i ) denote a set of features computed using the prompt and response. Matching (6), we define p(P i , C ij ) to be a score measuring the quality of claim C ij . We define the filtered set of claims by F (C i ) = F (C i ; τ ) := {C ij : p(P i , C ij ) ≥ τ }, and the conformity score viaS(C i , W i ) := inf{τ | L(F (C i ; τ ), W i ) ≤ λ}.Our two assumptions (monotonicity of the loss and L(∅, •) = 0) imply that S(C i , W i ) is welldefined and equal to the minimum loss-controlling threshold. Finally, we setEQUATIONand filter claims at the cutoff τ (X n+1 ) = sup{S | S ≤ g S (X n+1 )}. Similar to the prediction sets of Gibbs et al. [10] , τ (X n+1 ) can be conservative, and, thus, we prefer to use a randomized analog τrand. (X n+1 ); its formal definition can be found in Appendix A. As the following theorem shows, this randomized cutoff satisfies the desired guarantee.Theorem 3.1. Let F = {Φ(X) ⊤ β : β ∈ R d } denote any finite dimensional linear class. Assume that {D i } n+1i=1 are exchangeable, that solutions to (7) and its dual are computed symmetrically in the input data, L(•, •) is monotone in its first argument, and L(∅, •) = 0. Then, for all f ∈ F ,E[f (X n+1 )({L( F (C n+1 ; τrand. (X n+1 )), W n+1 ) ≤ λ} -(1 -α))] = 0.As above, we can make this guarantee concrete by choosing F to be a linear combination of group indicators specifying the topic of the prompt, i.e.,F = {({X ∈ G}) ⊤ β | β ∈ R |G| }.For any finite set of groups G, this choice of F yields the high-probability guarantee,P(L(F (C n+1 ; τn+1 ), W n+1 ) ≤ λ | X n+1 ∈ G) = 1 -α for all G ∈ G.Like other conformal guarantees, the result of Theorem 3.1 only holds marginally over the calibration data, {D i } n i=1 . Nevertheless, Gibbs et al. [10] observe that the calibration-conditional validity of their method concentrates around the nominal level as the calibration set size grows.In addition to adapting the filtering cutoff to X n+1 , it may also be beneficial to adapt the desired error probability α at test time. 3 In this manuscript, we adjust α to ensure sufficient claim retention for each test output. In other scenarios, we might set a stricter α for high-stakes prompts and a more lenient one otherwise. For now, suppose that we are given some desired level function α(•), and our goal is to ensure that L(F (C n+1 ), W n+1 ) ≤ λ with probability 1 -α(X n+1 ).Recall that in the previous section, we use the pinball loss, ℓ α (•) to learn the 1 -α quantile of S(C i , W i ). To control the error rate adaptively, here we will use a data-dependent loss for the i-th point, ℓ α(Xi) (•). Then, similar to the previous section, we defineEQUATIONand filter at the cutoff τl.a. (X n+1 ) := sup{S : S ≤ g S (X n+1 )}. As in the previous section, it is more convenient to work with a slightly smaller randomized cutoff, τl.a., rand. . The following theorem shows that our previous guarantee for fixed α extends to this new setting. Theorem 3.2. Under the assumptions of Theorem 2.1,E[f (X n+1 )({L( F (C n+1 ; τl.a., rand. (X n+1 )), W n+1 ) ≤ λ} -(1 -α(X n+1 )))] = 0, ∀f ∈ F .Note that we recover the guarantee presented in (1) by definingΦ(•) = {{α(•) ∈ I} • {• ∈ G} : I ∈ I, G ∈ G} and F = {Φ(•) ⊤ β : β ∈ R d }.While this choice of function class elicits an interpretable guarantee, it can be quite large in practice. This can slow down the computation of the conformal cutoff and reduce claim retention. Alternatively, this class might be chosen to exactly satisfy other popular (and more efficient) approximations to multicalibration such as low-degree multicalibration [11] . In Appendix B.2, we briefly explore the consequences of choosing an insufficiently complex function class in a synthetic regression example.A more substantial exposition of these trade-offs can be found in Gibbs et al. [10] .Estimating α(•) While the above theory treats α(•) as fixed, in order to ensure that the outputs of our method meet our desired quality criterion (e.g., small interval length or sufficient claim retention) we will need to learn α(•) from the data. To do this, we split our training data into two folds: one is used to estimate α(•) and the other is used to run the calibration method described above. After making these splits, α(•) can be learned using any regression method. In our experiments, we will aim to learn the smallest possible values of α(•) that meet our target quality criterion. A detailed description of our procedure for doing so is given in Appendix B.1.In this section, we describe a new method for automated conformity score design subject to conditional coverage constraints. As discussed in the introduction, the goal of this procedure is to find conformity scores that when combined with our filtering method, allow the filter to retain as much of the LLM output as possible while still ensuring validity. For the sake of simplicity, we will assume that we are boosting the conformity score defined in (6) . Our approach, however, will generalize to any parameterized score function. We note here that the concurrent work of Kiyani et al. [16] presents another approach to this problem by reframing it as a min-max optimization task.Let p θ (•) denote a parameterized claim-scoring function that assigns a measure of confidence to each sub-claim. We run the conditional conformal method on a set of size n and optimize θ such that the number of retained claims is maximized on a hold-out set of size m, i.e.,EQUATION)Here, τi denotes the filtering threshold output by the conditional conformal method on the held-out test point X n+i . Crucially, τi = τi (θ) carries a hidden dependence on θ: τi is obtained by solving a quantile regression problem on scores that depend on p θ (•).There are therefore two obstacles to optimizing (9) via gradient descent. First, the indicator function is non-differentiable. To resolve this, we proceed as in Stutz et al. [27] and approximate the indicator using a sigmoid function. Second, it is unclear how to backpropagate through τi (θ).Observe that for a linear function class F = {Φ(X) ⊤ β : β ∈ R d }, the regression ( 8) by which we obtain τi (θ) is a linear program. Using this observation, we find that τi (θ) can be expressed as the solution to a linear system of equations given by a subset of the dataset that we denote by B, i.e.,EQUATIONHere, Φ(X) -1 B and S B (θ) are used to denote the matrix of features and vector of scores for the subset of the data given by B. In the linear programming literature, this subset is typically referred to as the "optimal basis." It can be explicitly identified by selecting the points at which the quantile regression interpolates the scores. Then, so long as B is invariant to small perturbations of θ and S is differentiable in θ, we can obtain the derivative of τi (θ) with respect to θ by backpropagating through (10) . Proposition 3.1 identifies a simple condition under which this is possible. Proposition 3.1. Let τi (θ) denote the non-randomized filtering threshold defined via (8) . Assume that the threshold is finite and that the augmented quantile regression for all S > τi (θ) admits a unique non-degenerate basic solution. Let B denote this basis. Then, τi (θ) has derivativeEQUATION)The technical condition on the basis in Proposition 3.1 nearly always holds; if it does not, we remark that uniqueness can always be obtained by "dithering" the scores and/or design matrix, i.e., adding small i.i.d. noise, at each step of the boosting procedure [7] .The rest of our procedure emulates the ConfTr algorithm of Stutz et al. [27] . Having set aside a portion of the dataset for the final calibration procedure, we replicate the conformal prediction algorithm at each iteration. Namely, we randomly split the remaining data into a "calibration" and "test" set. We then run the level-adaptive conformal prediction method on the calibration set, compute the quality criterion on the test set, and backpropagate on the objective given by (9) . Algorithm 1, which presents a complete description of the procedure, can be found in Appendix C.Question: For each theoretical result, does the paper provide the full set of assumptions and a complete (and correct) proof?Answer Guidelines:• The answer NA means that the paper does not include theoretical results.• All the theorems, formulas, and proofs in the paper should be numbered and crossreferenced. • All assumptions should be clearly stated or referenced in the statement of any theorems. • The proofs can either appear in the main paper or the supplemental material, but if they appear in the supplemental material, the authors are encouraged to provide a short proof sketch to provide intuition. • Inversely, any informal proof provided in the core of the paper should be complemented by formal proofs provided in appendix or supplemental material. • Theorems and Lemmas that the proof relies upon should be properly referenced. 
experiments: 
 In this section, we present a subset of our experimental results on two previously studied benchmarks in medical question-answering and biography generation. Additional experiments on these data sets, as well as further validation on a synthetic dataset, can be found in Appendix D.In this section, we summarize the experimental setup for the claims and figures presented in Section 1.1. Our experiment considers the long-form medical question-answering dataset (MedLFQA) published in Jeong et al. [13] . It combines several previously established benchmarks in the medical question-answering literature: HealthSearchQA (n = 3047), K-QA (n = 1077), LiveQA (n = 100) and MedicationQA (n = 627). Each prompt in these datasets is also accompanied by either an LLM or human-generated response to each question [6, 1, 19, 26] . Following prior work [19, 13] , we treat these responses as ground-truth for model evaluation. Also matching Jeong et al. [13] , in our plots, we distinguish between the subset of questions (n = 201) in the K-QA dataset that have gold-standard physician responses (denoted by K-QA Golden) and those questions with LLM-generated responses (denoted by K-QA Silver). To reproduce our results, our GitHub repository includes a filtered and combined dataset that removes some non-health-related prompts contaminating the HealthSearchQA dataset.To obtain the dataset used in our experiment, we query GPT-3.5-Turbo with each of the prompts in the combined dataset, and then ask GPT-4o to parse these prompts into self-contained sub-claims. Then, to obtain our "ground-truth" labels, we ask GPT-3.5-Turbo to evaluate whether each claim is substantiated by the pseudo-ground-truth response for that prompt. The prompts we use for each of these tasks are included in Appendix E.2.In all of the medical question-answering experiments displayed, we run the conditional conformal method with the following scoring function,S(C i , W i ) = inf{τ : F (C i ; τ ) contains no unsubstantiated claims}.To run our procedure, we must first split the dataset into two parts. We use the first split to both run the conditional boosting method and estimate α(•), while we use the second split to run leveladaptive conformal prediction and evaluate our method's guarantees.On the first split (n = 1421), we boost our claim score and subsequently estimate the level required for 70% claim retention. We achieve the former by optimizing a linear combination of four scores previously described in the LLM factuality literature: the frequency, self-evaluation, and ordinal scores described in Mohri and Hashimoto [21] and the token-level probability assigned to a singletoken self-evaluation [14] . Appendix E.1 describes how these claim scores are computed. The function class F for which we run the conditional boosting method is defined by the linear combination of several prompt-response features. For the sake of brevity, we defer a detailed description of this function class, our method for estimating α(•), and ablations of our method to Appendix D.2.On the second half of this dataset, we run level-adaptive conformal prediction over the F used in the conditional boosting step augmented by indicator functions that correspond to α(•) falling in some sub-interval with endpoints lying in {0, 0.05, . . . , 1}. Finally, to produce the plots in Figure 2 , we run this step over 100 random calibration-test splits of size 2354 and 500, respectively. Our second experiment reconsiders the biography dataset analyzed in Mohri and Hashimoto [21] .We sample 8516 names from Wikipedia and query GPT-3.5-Turbo with the prompt "Write me a short biography of [NAME] ." We then ask GPT-4o to parse the prompts into self-contained subclaims. While the prior work only annotates 25 biographies, we need to scale up this experiment to validate our proposed methods. To get around expensive human annotation, we use a variant of the FActscore procedure developed by Min et al. [20] . Their method includes relevant Wikipedia passages identified by the BM25 ranking function in the prompt to the LLM and asks if the claims are supported. Scoring of the LLM outputs (i.e., computation of p(P i , C ij )) is done using the frequency scoring method in all displayed figures except for the boosting comparison (the right panel of Figure 3 ). In that plot, we compare the claim retention achieved by an optimal ensemble of In all of the experiments displayed here, we run the conditional conformal method with the scoring function given byS(C i , W i ) = inf{τ : F (C i ; τ ) contains at most 3 false claims}.Empirically, we find that the claim scoring methods we apply are not as well-correlated with factuality as they were for MedLFQA. As a result, in order to issue non-trivial guarantees, i.e., to ensure both that 1 -α(X n+1 ) remains reasonably large and that the method does not filter too much of the response, we allow the filter to keep up to three false claims. 4 Experimental results for the more typical 0-error guarantee are also included in Appendix D.3. For the sake of avoiding redundancy with the previous subsection, we defer the remaining experimental details to Appendix D.3.Experimental results displaying the effectiveness of our level-adaptive and conditional boosting procedures on this dataset can be found in Figure 3 . In Figure 4 , we also provide additional comparisons contrasting the conditional conformal method of Section 3.1 with the marginal method proposed in Mohri and Hashimoto [21] . As anticipated by our theory, we find that our method provides accurate coverage regardless of the popularity of the Wikipedia page, while the split conformal method of Mohri and Hashimoto [21] gives variable results (left panel). As the right panel of the figure shows, this conditional accuracy is obtained by retaining more claims for frequently viewed topics and less claims for rare topics on which the LLM is more uncertain.Question: Does the paper fully disclose all the information needed to reproduce the main experimental results of the paper to the extent that it affects the main claims and/or conclusions of the paper (regardless of whether the code and data are provided or not)?Answer: [Yes] Justification: Detailed descriptions of the experiments can be found in Section 4 and the associated sections in the Appendix. The data and code to reproduce the experiments is available in the linked Github repository.• The answer NA means that the paper does not include experiments.• If the paper includes experiments, a No answer to this question will not be perceived well by the reviewers: Making the paper reproducible is important, regardless of whether the code and data are provided or not. • If the contribution is a dataset and/or model, the authors should describe the steps taken to make their results reproducible or verifiable. • Depending on the contribution, reproducibility can be accomplished in various ways.For example, if the contribution is a novel architecture, describing the architecture fully might suffice, or if the contribution is a specific model and empirical evaluation, it may be necessary to either make it possible for others to replicate the model with the same dataset, or provide access to the model. In general. releasing code and data is often one good way to accomplish this, but reproducibility can also be provided via detailed instructions for how to replicate the results, access to a hosted model (e.g., in the case of a large language model), releasing of a model checkpoint, or other means that are appropriate to the research performed. • While NeurIPS does not require releasing code, the conference does require all submissions to provide some reasonable avenue for reproducibility, which may depend on the nature of the contribution. For example , with an open-source dataset or instructions for how to construct the dataset). (d) We recognize that reproducibility may be tricky in some cases, in which case authors are welcome to describe the particular way they provide for reproducibility.In the case of closed-source models, it may be that access to the model is limited in some way (e.g., to registered users), but it should be possible for other researchers to have some path to reproducing or verifying the results. 
limitations: 
 While we believe the described methodology can improve LLM factuality, we highlight some limitations here. First, our theoretical results assume that the prompt-response tuples are i.i.d. In settings where user interactions change over time, the test prompts may be incomparable to previous prompts. Even though our framework can be applied to guarantee validity under a pre-specified class of covariate shifts (see Appendix A.2 for details), robustness guarantees under other types of distribution shift will require additional research. Second, since our filter is a wrapper around existing claim scores and thus the utility of our method depends on the quality of the underlying scoring algorithm.If the claim scores are weakly correlated with factuality, the filtered output will be accompanied by a vacuous nominal guarantee. Nevertheless, discovering new features that accurately predict LLM hallucinations is an active field of research, and our wrapper can easily leverage new approaches.In addition to the methods discussed in Section 2.1, Gibbs et al. [10] also consider extensions of Theorem 2.1 to other function classes and regularized quantile regression procedures. In this section, we show how all of these results can be applied to our present setting. We then describe the randomization procedure that is used to construct our filtering threshold, τl.a. rand. (X n+1 ) and prove Theorems 3.1 and 3.2.Following Gibbs et al. [10] , let F be a vector space and P : F → R be a convex penalty. Then, to extend our procedure to such function classes and regularizers, we consider regressions of the formEQUATION)Following our work in the main text, this leads to the filtering threshold τl.a. (X n+1 ) = max{S : S ≤ g S (X n+1 )}. As discussed earlier, this definition of τl.a. (X n+1 ) can be slightly conservative and thus it can be preferrable to work with a randomized analog. We derive this analog now. First, note that ( 12) is equivalent to the program minimizep,q∈R n+1 , g∈F n+1 i=1 (1 -α(X i ))p i + α(X i )q i + (n + 1)P(g), subject to S(C i , W i ) -g(X i ) -p i + q i = 0, ∀1 ≤ i ≤ n, S -g(X n+1 ) -p n+1 + q n+1 = 0, p i , q i ≥ 0, ∀1 ≤ i ≤ n + 1.Our randomized variant of τ (X n+1 ) will be based on the dual of this program. Following the calculations of Gibbs et al. [10] , the Lagrangian for this problem isn+1 i=1 (1 -α(X i ))p i + α(X i )q i + (n + 1)P(g) + n i=1 η i (S(C i , W i ) -g(X i ) -p i + q i ) + η n+1 (S -g(X n+1 ) -p n+1 + q n+1 ) - n+1 i=1 (λ i p i + ξ i q i ),where λ i and ξ i are constrained to be non-negative. Letting P * (η) = -min g∈F ((n + 1)P(g) -n+1 i=1 η i g(X i )) and minimizing the Lagrangian over g givesn+1 i=1 (1-α(X i ))p i +α(X i )q i + n i=1 η i S i (C i , W i )+η n+1 S-P * (η)+ n+1 i=1 η i (q i -p i )- n+1 i=1 (λ i p i +ξ i q i ),and additionally minimizing over p i and q i produces the constraintsλ i = (1 -α(X i )) -η i , ξ i = α(X i ) + η i . Finally, since λ i , ξ i ≥ 0, these constraints are equivalent to the inequalities -α(X i ) ≤ η i ≤ (1 - α(X i )). Putting this all together, we arrive at the dual formulation maximizeη∈R n+1 n i=1 η i S(C i , W i ) + η n+1 S -P * (η), subject to -α(X i ) ≤ η i ≤ (1 -α(X i )), ∀1 ≤ i ≤ n + 1.Let η S denote a vector of solutions to this program. Then, the critical observation of Gibbs et al. [10] is that the above calculations give a close relationship between the event S ≤ g S (X n+1 ) and the value of η S n+1 . In particular, assuming that strong duality holds, complementary slackness tells us that S > g S (X n+1 ) =⇒ η S n+1 = 1 -α(X n+1 ), S < g S (X n+1 ) =⇒ η S n+1 = -α(X n+1 ), and η S n+1 ∈ (-α(X n+1 ), 1 -α(X n+1 )) =⇒ S = g S (X n+1 ). The randomization scheme derived in Gibbs et al. [10] for fixed alpha then corresponds to randomizing over the event that S = g S (X n+1 ). In particular, following that work, here we define the randomized thresholdτl.a. rand. (X n+1 ) = max{S : η S n+1 ≤ U }, where U ∼ Unif([-α(X i ), 1 -α(X i )]) is a random variable drawn independent of the data. The following theorem states the coverage guarantee of this method.Theorem A.1. Assume that F is a vector space and that for all f, g ∈ F , the derivative of ϵ → P(g+ ϵf ) exists. Assume additionally that strong duality holds between the primal and dual programs derived above and that η S(Cn+1,Wn+1) is computed using an algorithm that is symmetric in the input data. Finally, assume that{(P i , R i , X i , C i , W i )} n+1i=1 are exchangeable and that L(•, •) is monotone and such that L(∅, •) = 0. Then, for all f ∈ F ,E[f (X n+1 )({L( F (C n+1 ; τl.a. rand. (X n+1 )), W n+1 ) ≤ λ} -(1 -α(X n+1 )))] = -E d dϵ P(g S(Cn+1,Wn+1) + ϵf ) ϵ=0 .This theorem has two key assumptions that may appear unusual at first glance. First, we have assumed that the dual solutions η S(Cn+1,Wn+1) are computed using an algorithm that is symmetric in the input data. This is an extremely minor assumption and is satisfied by any standard method for solving convex programs (e.g. interior point solvers). For a much more detailed exposition about efficient algorithms for computing {S : η S n+1 ≤ U }, we refer the reader to the original work of Gibbs et al. [10] . Second, we have assumed that strong duality holds. As we will see shortly, this assumption is always satisfied for the linear function classes considered in the main text. For more general vector spaces, Gibbs et al. [10] prove that this condition holds for other common choices of F such as reproducing kernel Hilbert spaces and Lipschitz functions.We now prove our main results.Proof [Proof of Theorem A.1] By Theorem 4 of Gibbs et al. [10] , S → η S n+1 is non-decreasing in S. So, by the monotonicity assumption on L(•, •) and our definition of the conformity score, we have that{L( F (C n+1 ; τl.a. rand. (X n+1 )), W n+1 ) ≤ λ} ⇔ {η S(Cn+1,Wn+1) n+1 ≤ U }.Thus,E[f (X n+1 )({L( F (C n+1 ; τl.a. rand. (X n+1 )), W n+1 ) ≤ λ} -(1 -α(X n+1 )))] = E[f (X n+1 )({η S(Cn+1,Wn+1) n+1 ≤ U } -(1 -α(X n+1 )))] = E[E U [f (X n+1 )({η S(Cn+1,Wn+1) n+1 ≤ U } -(1 -α(X n+1 ))) | X n+1 , η S(Cn+1,Wn+1) n+1 ]] = -E[f (X n+1 )η S(Cn+1,Wn+1) n+1].For ease of notation let S i := S(C i , W i ), for 1 ≤ i ≤ n+1. Investigating the case where S = S n+1 gives us the Lagrangiann+1 i=1 (1 -α(X i ))p i + α(X i )q i + (n + 1)P(g Sn+1 ) + n+1 i=1 η Sn+1 i (S i -g Sn+1 (X i ) -p i + q i ) - n+1 i=1 (λ i p i + ξ i q i ).Now, following the calculations in the proof of Proposition 4 of Gibbs et al. [10] , we find that taking a derivative along the direction ϵ → g Sn+1 + ϵf and applying KKT stationarity to the above gives the equation,0 = d dϵ (n + 1)P(g Sn+1 + ϵf ) ϵ=0 - n+1 i=1 η Sn+1 i f (X i ).So, by the exchangeability of the data we have that-E[f (X n+1 )η S(Cn+1,Wn+1) n+1 ] = - 1 n + 1 E[ n+1 i=1 f (X i )η Sn+1 i ] = -E d dϵ (n + 1)P(g Sn+1 + ϵf ) ϵ=0 , as desired.A.1 Proof of Theorem 3.1 and Theorem 3.2Theorems 3.1 and 3.2 from the main text can now be proven directly as corollaries of Theorem A.1.Proof [Proof of Theorem 3.1] This result is the special case of Theorem A.1 in which P(•) = 0, α(X i ) = α is a constant function, and F is a finite-dimensional linear class. Under this setup, the primal and dual programs outlined above are linear programs. Since the dual program admits the interior feasible solution η = 0, Slater's condition immediately implies that these programs satisfy strong duality.Proof [Proof of Theorem 3.2] This result is the special case of Theorem A.1 in which P(•) = 0 and F is a finite-dimensional linear class. Similar to the previous result, the resulting primal and dual programs are linear and satisfy strong duality by Slater's condition.As discussed in the original work of Gibbs et al. [10] , the guarantees on the loss we developed in Theorems 3.1 and 3.2 can be readily interpreted as a form of robustness with respect to a class of distribution shifts affecting P X (but not P Y |X ) known as covariate shifts.First, to precisely define such a shift, suppose that f ∈ F is non-negative. Recall that our features X n+1 = X(P n+1 , R n+1 ) are functions of the prompt and response. Consider the setting in which the training data, {(P i , R i , C i , W i )} n i=1 are sampled i.i.d. from a distribution Q, while the test point is sampled from the "covariate-shifted" distribution(P n+1 , R n+1 ) ∼ f (X n+1 ) E Q [f (X)] dQ (P,R) , (C n+1 , W n+1 ) ∼ Q (C,W)|(P,R) .Here, we use the notation f (Xn+1) E Q [f (X)] dQ (P,R) to refer to the distribution in which the covariate space is re-weighted by f , e.g. using the subscript f to denote the re-weighting, we have that for any set A,P f (X n+1 ∈ A) = E Q [f (X)1{X ∈ A}] E Q [f (X)] .Then, using these definitions, our Theorems 3.1 and 3.2 have the following immediate corollaries.Corollary A.1 (Extension of Theorem 3.1). Let P f denote the covariate shift setting described above. Then, under the setting and assumptions of Theorem 3.1,P f (L( F (C n+1 ; τrand (X n+1 )), W n+1 ) ≤ λ) = 1 -α, ∀f ∈ {h ∈ F : 0 < E Q [h(X)] < ∞}. Corollary A.2 (Extension of Theorem 3.2). Let E f [•]denote expectations with respect to the covariate shift setting described above. Then, under the setting and assumptions of Theorem 3.2,E f [({L( F (C n+1 ; τl.a., rand. (X n+1 )), W n+1 ) ≤ λ} -(1 -α(X n+1 )))] = 0, ∀f ∈ {h ∈ F : 0 < E Q [h(X)] < ∞}.B Details of the level-adaptive procedureTo make our approach to learning α(•) precise, we formally define our quality criterion using a binary function Q(•, •) that takes in a data point and a cutoff and returns 1 or 0 if the criterion is satisfied or not, respectively. For example, for the claim retention objective described in Section 1.1, . For a hold-out set of size 424, we plot the optimal level threshold, α * i for claim retention (13) against the number of Wikipedia page views (on the log scale) for the associated person. Letting vi denote the view count for person i, the black line denotes the estimate of the 0.25-quantile of α * i | vi obtained by regressing over the function class given by {β0Q(C, τ ) := |F (C; τ )| |C| ≥ 0.7 .+ ∑ 3 i=1 βiv i | β ∈ R 4 }.As discussed in the main text, when running our method we split our training data into a portion for fitting α(•) and portion for calibrating the conformity score. Then, we further divide the portion of the data that is used to fit α(•) into two folds. We use the first fold to run the conditional conformal procedure at a fixed grid of quantiles, α ∈ {0.01, . . . , 0.99}, and the second dataset to evaluate Q(C i ; τα (X i )) for each choice of α. Here, τα (X i ) denotes the conditional conformal cutoff evaluated for test claim C i at fixed level 1 -α.After collecting these data, we compute the maximum α at which the quality criterion is achieved. Formally, for each point (C i , X i ) in the dataset held out from fitting, we computeEQUATIONWith this data in hand, our goal now is to fit a function α(•) that predicts α * i from (X i , α * i ). In principle, this could be done using any number of regression algorithms. In our experiments, we choose to estimate a quantile of α * i | X i using the same function class we used to run our conditional conformal procedure. We then truncate these estimates to lie above 0.1. See Figure 5 for a plot of this estimated quantile and the underlying data points used to fit this regression. Our choices of quantile and truncation are motivated by our desire to ensure that the adaptive level will guarantee the quality criterion for most test points without issuing completely vacuous guarantees, i.e., fitting some α(•) whose range is concentrated around 1 or 0.The quality of our level-adaptive guarantee strongly depends on the choice of function class, F. To understand this, recall that split conformal prediction corresponds to taking F to be the class of constant functions, F = {x → β : β ∈ R}. In this case, Theorem 3.2 states thatE[{L(C n+1 , W n+1 ) ≤ λ}] = E[(1 -α(X n+1 ))],i.e. with probability E[1 -α(X n+1 )] the error rate of our method lies at the target level. This guarantee is extremely weak; our objective is to ensure that the nominal probability is pointwise close to the true level, i.e.|P(L(C n+1 , W n+1 ) ≤ λ | α(X n+1 )) -(1 -α(X n+1))| is small. In the main text, we saw empirical results in which our methods were able to approximately achieve this target. These result were obtained by designing F to include functions that depend on α(X n+1 ).To demonstrate the importance of this choice of F more explicitly, Figure 6 compares the realized difference between the true coverage, P(Y n+1 ∈ Ĉ(X n+1 ) | α(X n+1 )) and the nominal level Comparison of the realized and nominal levels of our level-adaptive method for various choices of F . Here, (Xi, Yi) ∼ N (0, I2) and we set the conformity score to be simply S(Xi, Yi) = Yi. In this experiment, we use our level-adaptive method (Section 3.2 in the main text) to construct prediction sets for Yi given covariates Xi. We set α(X) = σ(X) where σ(•) denotes the sigmoid function with temperature 1. We then run the level-adaptive method on a calibration set of size n = 1000 and evaluate the method on 1 test point; the plotted points (center, right) are obtained from 500 trials. The left panel shows results for F = {x → β : β ∈ R}, while the right panel displays results forF = {(1, α(X)) ⊤ β : β ∈ R 2 }. 1 -α(X n+1 ) when F = {x → β : β ∈ R} and F = {(1, α(X)) ⊤ β : β ∈ R 2 }on a simple synthetic dataset. As anticipated, when F consists only of constant functions, the nominal guarantee is spurious, and the true probability of coverage is uncorrelated with the claimed level (left panel). This is corrected by adding α(X) to the feature space of F; despite being quite simple this choice empirically achieves the desired calibration (right panel). We leave a more substantial investigation of the trade-off between F complexity, empirical calibration, and efficiency to future work.For the boosting procedure, we will assume that we are working with the derandomized variant of the conditional conformal method of Gibbs et al. [10] . In addition, these results will hold only for the finite-dimensional function class variant of their method with no regression penalty, i.e., in the notation of Appendix A we assume thatF = {Φ(•) ⊤ β : β ∈ R d }, P(•) = 0.We first restate and then prove Proposition 3.1. Proposition C.1. Let τi (θ) denote the non-randomized filtering threshold defined via (8) . Assume that the threshold is finite and that the augmented quantile regression for all S > τi (θ) admits a unique non-degenerate basic solution. Let B denote this basis. Then, τi (θ) has derivativeEQUATION)Proof Assume without loss of generality that i = 1. We drop the subscript on τ for notational convenience. To differentiate between the imputed value of the (n + 1)-st score and the vector of all observed scores, we will use S to refer to the former and S to the latter. When the optimal basis is unique, we will assume that the primal solution is defined via the interpolator of the basis.Otherwise, we assume it is obtained via some symmetric algorithm.First, we establish that θ → Φ(X n+1 ) ⊤ β S (θ) is locally linear in θ for S > τ (θ). First, observe that the non-interpolated points of the quantile regression correspond to the non-basic variables in the solution, and that their residuals are equivalent to the non-basic "reduced costs" of the LP. Standard results from LP sensitivity analysis establish that when these reduced costs are bounded away from 0 (implied by our assumptions of non-degeneracy and uniqueness), the basis of the LP is unchanged under sufficiently small perturbations of the objective coefficients (i.e., for perturbations of θ) [8] .Since β S is defined by the solution to a linear system of equations involving the basis, the local constancy of the basis implies the claim of local linearity. Second, we establish that S → β S (θ) for S > τ (θ) is constant. This is immediate from the KKT conditions for (7) . The optimal basis is unchanged for all S > τ (θ).Fix any θ 0 . We claim that there exists a ball around θ 0 such that τ (θ) = Φ(X n+1 ) ⊤ β τ (θ0)+1 (θ).To prove this, first note that we know that for θ sufficiently close to θ 0 , τ (θ 0 ) + 1 > Φ(X n+1 ) ⊤ βτ(θ0)+1 (θ). Since S → β S (θ) is constant above τ (θ), this immediately implies that for S > Φ(X n+1 ) ⊤ βτ(θ0)+1 (θ), βS (θ) = βτ(θ0)+1 (θ) and thus S > Φ(X n+1 ) ⊤ βS (θ). Hence,τ (θ) ≤ Φ(X n+1 ) ⊤ βτ(θ0)+1 (θ).Now, assume by contradiction that τ (θ) < Φ(X n+1 ) ⊤ βτ(θ0)+1 (θ). For ease of notation let v = Φ(X n+1 ) ⊤ βτ(θ0)+1 (θ). Now, since τ (θ) < v we must have v > Φ(X n+1 ) ⊤ βv (θ). Recall that we additionally know that τ (θ 0 ) + 1 > Φ(X n+1 ) ⊤ βτ(θ0)+1 (θ). So, by our assumption that S → β S (θ)is constant above τ (θ) we find that βτ(θ0)+1 (θ) = βv (θ).Thus, v = Φ(X n+1 ) ⊤ βτ(θ0)+1 (θ) = Φ(X n+1 ) ⊤ βv (θ), which gives the desired contradiction.The above proves that τ (θ) = Φ(X n+1 ) ⊤ β τ (θ0)+1 (θ) locally in a ball around θ 0 . The desired result follows by our previous proof of the differentiability of the right hand-side.With this result in hand, our boosting procedure is now given in detail in Algorithm 1 below. In this algorithm we use the notation Φ(I) = [Φ(X i )] i∈I and S θ (I) = (S θ (C i , W i )) i∈I to refer the feature matrix and scores for the data points in I. for i ∈ D 2 do B = getOptimalBasis(α, Φ(D 1 ), S θ (D 1 ), Φ({i}), S θt-1 ({i})); βi = Φ -1 B (D 1 ∪ {i})S B (D 1 ∪ {i}); ℓ = ℓ + ki j=1 σ λ (Φ({i}) ⊤ βi -p θ (P i , C ij )); θ t = Adam(ℓ, θ t-1 ).step(); return θ T .In Algorithm 1 above, getOptimalBasis(•) refers to the subroutine that computes the optimal basis B appearing in the statement of Proposition C.1 for text point i.In order to decrease computational complexity, the experiments in this paper are run using a simplified version of Algorithm 1. In particular, the subroutine getOptimalBasis obtains the optimal basis in Algorithm 1 by identifying the dim(Φ) points that are interpolated by the regression when S > τi (θ). Identifying this set is computationally burdensome since each gradient step in θ requires computing τi (θ) (and therefore βi ) for each point in the second split. Thus, the gradient computation step scales quadratically in |D 2 |. A linear-time approximation to the gradient can be obtained by defining B as the optimal basis from the quantile regression fit to D 1 alone. This approximation, which does not account for the test-point augmentation in the conditional conformal procedure, is much faster since it yields a single β to use for all the test points. The experiments in this paper are run using this simplified procedure. To concretely modify Algorithm 1, B is defined as the optimal basis of the quantile regression fit to D 1 alone, the computation in the nested for loop is removed, and the estimated threshold in the sigmoid function becomes Φ ⊤ ({i}) β. To demonstrate how our methods improve upon previous approaches, we consider a synthetic regression dataset with substantial heteroskedasticity. The data in this experiment are generated by sampling two features (5, 10) , while the labels are sampled from a distribution whose variance is given by the sixth power of the first feature, i.e., Y i ∼ N (0, (X (1) i ) 6 ). We then construct prediction intervals using the score function S θ (X, Y ) := |Y |/|X ⊤ θ|. [27] against our Conditional Boosting method. While the left panel shows that the former method may sometimes issue shorter intervals, these come at the cost of degraded conditional validity (right panel). In particular, the prediction sets resulting from ConfTr have extremely poor coverage on the subset of data with high conditional variance. By contrast, learning θ using our procedure still attains near-perfect conditional coverage. Xn+1) is now chosen adaptively to ensure a maximum prediction set size of at most 500 (red line). Finally, the right panel compares the realized coverage P(Yn+1 ∈ Ĉ(Xn+1) | α(Xn+1)) against the nominal level, 1 -α(Xn+1) reported by our method withX (1) i iid ∼ Unif(1, 10) and X (2) i iid ∼ UnifF = {β0 + ∑ 2 i=1 β1x i + β3α(x) | β ∈ R 4 }.Figure 8 applies the level-adaptive conformal prediction procedure to the same data-generating process. In this example, we use the naive absolute value score S(X, Y ) = |Y |. Since the score is poorly chosen and the data is noisy, the resulting prediction interval can be very large. The left panel of the figure shows boxplots that display the empirical distribution of interval lengths over the test set at various fixed levels of α ∈ {0.05, 0.25, 0.5, 0.75, 0.95}. Unsurprisingly, at most fixed levels for α, many intervals are substantially larger than the maximum target length of 500. This is corrected when we fit using an adaptive level, α(X i ) (center panel), which is estimated to ensure that the interval lengths fall below 500. Finally, the right-hand panel verifies that the guarantee of Theorem 3.2 is accurate. The issued values of α(X n+1 ) closely track the true coverage probabilities; note that the latter can be computed in closed-form for our data-generating process.Additional details for the experiment set-up The function class F is defined by the linear combination of an intercept, the number of characters in the prompt, the number of characters in the response, the mean frequency score assigned to the claims, the standard deviation of the frequency scores assigned to the claims, and group-indicators corresponding to the source dataset. The results shown in Figure 2 are obtained by running the conditional boosting algorithm for 1000 steps using the Adam optimizer with learning rate set to 0.001.We estimate α(•) by dividing the first split of the data into two further sub-parts. On the first half of this further subdivisionx (n = 720), we run the fixed-level conditional conformal procedure (with the same F used to boost the scores) for each α in a grid of 50 evenly spaced values between 0 and 1. Using the second half of this dataset, we evaluate the percentage of retained claims at each α.We record the smallest α for which at least 70% of claims are preserved at all larger values of α.We then obtain our estimate of α(•) by fitting a 0.85-quantile regression over F to this dataset. For interpretability and numerical stability in the next step, the final output of the function is truncated to lie between 0.1 and 0.5.Additional experiments Figure 9 decomposes the effect of each method in this paper on claim retention and calibration for the MedLFQA benchmark. For a fixed-level guarantee, we observe that the boosting method substantially improves claim retention. When we adapt the level to guarantee high claim retention, the improvement of the boosting method is visible in the second panel of Figure 9 . Namely, we find that when the level-adaptive method is augmented with boosted scores we obtain the same claim retention while issuing stronger guarantees as compared to the un-boosted scores. Finally, the third panel of Figure 9 verifies that our reported values of 1 -α(X n+1 ) (approximately) match the realized error rates.Using the same experimental set-up as the ablations, Figure 10 compares the effect of the choice of claim scoring method on the nominal guarantee offered by the level-adaptive procedure. Note that the log-probability and frequency claim scores appear to offer the strongest set of guarantees. However, the markedly lower level of claim retention for the log-probability score make the guarantees difficult to directly compare.Additional details for the experiment set-up To define features for the conditional conformal function class, we obtain page metadata from the Wikidata API. The metadata we use is the number of views of the biography's Wikipedia article in January 2023. Since this data is quite right-skewed, the view counts for the most popular articles can cause numerical issues in our optimizer. Consequently, we trim the largest entries to the 0.95-quantile of the view data.Here, we also provide some additional details regarding the function classes used in our biography experiments. In all examples, we aim to provide uniform coverage guarantees regardless of the underlying popularity of the topic. In the fixed-level filtered biographies, we run the conditional conformal method with F = {β 0 + 2024). This benchmark contains many datasets each of which is displayed on the x-axis. Before boosting, we define our claim score by an equally-weighted ensemble of previously published claim scoring functions. We run 100 trials in which we resample a boosting/α(•)-estimation split (n = 1441), calibration split (n = 2354), and test split (n = 500). We plot 4 filtering methods: the fixed-level (1 -α = 0.9) method that guarantees conditional validity over the function class given by dataset indicators and prompt metadata (prompt length, response length, as well as the mean and standard deviation of the "log probability" claim score over the output) (blue), the same conditionally valid method with adaptive level α(Xn+1) (orange), the conditionally valid method with boosted scores (green), and a combination method that incorporates both conditional-boosting and level-adaptive CP (red). All methods are set-up to ensure that the final output contains 0 false claims. The middle panel shows that boosting allows the level-adaptive procedure to issue guarantees with higher confidence. The right panel verifies that the reported nominal levels 1 -α(Xn+1) match the empirical error frequencies over equi-spaced bins of width 0.05; these bin indicators are included in the function class used in the level-adaptive procedure. . The set-up is identical to that of Figure 9 . Here we do not consider boosted scores, but display the performance of the level-adaptive method for each claim scoring approach in isolation.our experiments, we truncate α(•) to lie above 0.1. As a result, a substantial proportion of outputs receive that estimated quantile and thus, (α(•) -0.1) 2 correlates with the more variable portion of the quantile function.Though the first two panels of Figure 3 and Figure 4 are run using the more performant frequency score, the right panel of Figure 3 is obtained by finding an optimal linear combination of the three cheaper-to-obtain claim scores (self evaluation, token probability, ordinal). We obtain the displayed result by running 1000 steps of Adam (with PyTorch defaults, i.e., learning rate 0.001) through the conditional conformal procedure given by the same F described in the previous paragraph.Additional experiments Figures 11 and 12 decompose the effect of each method on claim retention and calibration for the FActscore benchmark. Notably, we observe that optimally ensembling the 3 cheaper-to-compute claim scores using conditional boosting improves claim retention and/or shifts the distribution of issued guarantees to the right. Furthermore, regardless of the guarantee issued, the third panel of both of these figures confirms that our method is well-calibrated. Finally, as the second panel of Figure 12 confirms, if we aim to guarantee 0 false claims in the final output, it is unlikely that we issue a nominal probability above 50%. This motivates our choice to instead guarantee that the filtered output contains at most three false claims. We collect several features to use for estimating a confidence level in each claim. Unless otherwise noted, the claim scoring function used in this paper is defined by the "frequency" score examined by Mohri and Hashimoto [21] . We compute this score by querying GPT-3.5-Turbo 5 times at a temperature of T = 5. For each claim, we re-query the LLM to ask if the claim is supported in the resampled generation. These scores which can be -1 for contradicted, 0 for not present, and 1 for supported are then averaged over the 5 responses. For example, a claim that is present in three out of the five responses, but absent in the other two would receive a score of 0.6.Since the frequency score requires many API queries, we also investigate several cheaper and fasterto-compute methods for claim scoring. Following Mohri and Hashimoto [21] , we also collect the self-reported probability obtained by directly asking the LLM to report its estimated probability of claim correctness to three significant figures. We also compute the ordinal score, i.e., the order in which the claim appeared in the original response. Going beyond Mohri and Hashimoto [21] , we compute the LLM's internal probability of each claim by querying the model with the list of claims and asking it to output a single-character (T or F) assessment of its beliefs. The internal probability of the model can then be computed by exponentiating the log probability of the returned token.To parse the initial response into scorable sub-claims, we prompt the LLM (GPT-4o, in our experiments). After first parsing the initial response into its component sentences, we copy the method of Min et al. [20] (made available on GitHub under an MIT license) and use in-context learning to improve the parsing accuracy of the LLM. We first use the BM25 ranking function to match our sentences to similar examples previously parsed by Min et al. [20] . We prepend these gold-standard examples as well as the new sentence to be parsed to the prompt, Please breakdown the following sentence into independent facts: [...]To annotate the subclaims, we either retrieve the response given in the MedLFQA dataset or emulate Min et al. [20] and retrieve Wikipedia passages that are most relevant (using the BM25 ranking function) to the subject of the biography. The prompt includes this passage followed by the previous claims in the output that have already been annotated to ensure self-consistency, To evaluate the support of the claims in new response, we prompt the LLM using You will get a list of claims and piece of text. For each claim, score whether the text supports, contradicts, or is unrelated to the claim. Directly return a jsonl, where each line is "id":[CLAIM_ID], "score": [SCORE] . Directly return the jsonl with NO explanation or ANY other formatting. For the [SCORE], return 1 for supports, -1 for contradicts, and 0 for unrelated. The claims are: [...] The text is: [...]'We obtain self-assessed probabilities by prompting the LLM using You will get a list of claims and the original prompt that motivated these claims. For each claim, assess the probability of correctness. Directly return a jsonl, where each line is "id":[CLAIM_ID], "gpt-score": [SCORE] . Directly return the jsonl with NO explanation or ANY other formatting. For the [SCORE], return the esimated probability of correctness to three significant figures. The original promptis: [...] The claims are: [...]We obtain the internal probability of the model using a very similar prompt, You will get a list of claims and the original prompt that motivated these claims. For each claim, assess the correctness. Directly return a jsonl, where each line is "id":[CLAIM_ID], "gpt-bool": [BOOL] . Directly return the jsonl with NO explanation or ANY other formatting. For the [BOOL], return "T" or "F" in quotes so that it is valid json. The original prompt is: [...] The claims are: [...]• While the authors might fear that complete honesty about limitations might be used by reviewers as grounds for rejection, a worse outcome might be that reviewers discover limitations that aren't acknowledged in the paper. The authors should use their best judgment and recognize that individual actions in favor of transparency play an important role in developing norms that preserve the integrity of the community. Reviewers will be specifically instructed to not penalize honesty concerning limitations.Question: Does the paper provide open access to the data and code, with sufficient instructions to faithfully reproduce the main experimental results, as described in supplemental material?Answer: [Yes]Justification: Data and code to reproduce the experiments is included in the linked GitHub repository. Additionally, detailed descriptions of the experiments can be found in Section 4 and the associated sections of the Appendix.Guidelines:• The answer NA means that paper does not include experiments requiring code. • Providing as much information as possible in supplemental material (appended to the paper) is recommended, but including URLs to data and code is permitted. 
experimental setting/details: 
 Question: Does the paper specify all the training and test details (e.g., data splits, hyperparameters, how they were chosen, type of optimizer, etc.) necessary to understand the results?Answer: [Yes]Justification: Detailed descriptions of the experiments including information about all relevant settings can be found in Section 4 and the associated sections in the Appendix. Code to reproduce the experiments that also contains this information is publicly available.Guidelines:• The answer NA means that the paper does not include experiments.• The experimental setting should be presented in the core of the paper to a level of detail that is necessary to appreciate the results and make sense of them.• The full details can be provided either with the code, in appendix, or as supplemental material. 
experiment statistical significance: 
 Question: Does the paper report error bars suitably and correctly defined or other appropriate information about the statistical significance of the experiments?Answer: [Yes]Justification: Appropriate error bars displaying uncertainty can be seen in Figure 2 . In other experiments in the paper (e.g. those in Figure 4 ) we prefer to not show error bars, but rather boxplots displaying the entire distribution of the values observed in the experiment.Guidelines:• The answer NA means that the paper does not include experiments. Justification: The majority of the experiments performed in this paper were run on a Mac-Book Pro in a total runtime of less than a few hours. Since this is not a significant use of computational resources, we do not include this information in the paper. The remaining computational burden of this paper consists of calls to the OpenAI GPT API, which again are relatively low cost and take only a few hours to run. Since we cannot speak to the backend cost of running this API and the costs on our end are relatively minor, we do not include information about these computational costs in the paper.Guidelines:• The answer NA means that the paper does not include experiments.• The paper should indicate the type of compute workers CPU or GPU, internal cluster, or cloud provider, including relevant memory and storage. • The paper should provide the amount of compute required for each of the individual experimental runs as well as estimate the total compute. • The paper should disclose whether the full research project required more compute than the experiments reported in the paper (e.g., preliminary or failed experiments that didn't make it into the paper). 
code of ethics: 
 Question: Does the research conducted in the paper conform, in every respect, with the NeurIPS Code of Ethics https://neurips.cc/public/EthicsGuidelines?Justification: There is no human subject or otherwise sensitive data in this article that require careful consideration. Additionally, we do not anticipate any serious harmful use cases for our methods.Guidelines:• The answer NA means that the authors have not reviewed the NeurIPS Code of Ethics.• If the authors answer No, they should explain the special circumstances that require a deviation from the Code of Ethics. • The authors should make sure to preserve anonymity (e.g., if there is a special consideration due to laws or regulations in their jurisdiction). 
broader impacts: 
 Question: Does the paper discuss both potential positive societal impacts and negative societal impacts of the work performed?Answer: [Yes] Justification: This article is concerned with methods for improving the safe and humanaligned use of LLMs. Thus, as we discuss throughout the article, we hope this paper will have a positive societal impact. We do not anticipate any serious harmful use cases for our methods.Guidelines:• The answer NA means that there is no societal impact of the work performed.• If the authors answer NA or No, they should explain why their work has no societal impact or why the paper does not address societal impact. • Examples of negative societal impacts include potential malicious or unintended uses (e.g., disinformation, generating fake profiles, surveillance), fairness considerations (e.g., deployment of technologies that could make decisions that unfairly impact specific groups), privacy considerations, and security considerations. • The conference expects that many papers will be foundational research and not tied to particular applications, let alone deployments. However, if there is a direct path to any negative applications, the authors should point it out. For example, it is legitimate to point out that an improvement in the quality of generative models could be used to generate deepfakes for disinformation. On the other hand, it is not needed to point out that a generic algorithm for optimizing neural networks could enable people to train models that generate Deepfakes faster. • The authors should consider possible harms that could arise when the technology is being used as intended and functioning correctly, harms that could arise when the technology is being used as intended but gives incorrect results, and harms following from (intentional or unintentional) misuse of the technology. • If there are negative societal impacts, the authors could also discuss possible mitigation strategies (e.g., gated release of models, providing defenses in addition to attacks, mechanisms for monitoring misuse, mechanisms to monitor how a system learns from feedback over time, improving the efficiency and accessibility of ML). 
safeguards: 
 Question: Does the paper describe safeguards that have been put in place for responsible release of data or models that have a high risk for misuse (e.g., pretrained language models, image generators, or scraped datasets)?Answer: [NA] Justification: This paper does not release a model or any item that has a significant potential for misuse.Guidelines:• The answer NA means that the paper poses no such risks.• Released models that have a high risk for misuse or dual-use should be released with necessary safeguards to allow for controlled use of the model, for example by requiring that users adhere to usage guidelines or restrictions to access the model or implementing safety filters. • Datasets that have been scraped from the Internet could pose safety risks. The authors should describe how they avoided releasing unsafe images. • We recognize that providing effective safeguards is challenging, and many papers do not require this, but we encourage authors to take this into account and make a best faith effort. 12. Licenses for existing assets Question: Are the creators or original owners of assets (e.g., code, data, models), used in the paper, properly credited and are the license and terms of use explicitly mentioned and properly respected? Answer: [Yes] Justification: The only data used in this experiment are Wikipedia pages scraped from publicly available caches of English language Wikipedia under the CC4.0 license. We use MIT-licensed code from Min et al. [20] and credit them. Guidelines:• The answer NA means that the paper does not use existing assets.• The authors should cite the original paper that produced the code package or dataset.• The authors should state which version of the asset is used and, if possible, include a URL. • The name of the license (e.g., CC-BY 4.0) should be included for each asset.• For scraped data from a particular source (e.g., website), the copyright and terms of service of that source should be provided. • If assets are released, the license, copyright information, and terms of use in the package should be provided. For popular datasets, paperswithcode.com/datasets has curated licenses for some datasets. Their licensing guide can help determine the license of a dataset. • For existing datasets that are re-packaged, both the original license and the license of the derived asset (if it has changed) should be provided. • If this information is not available online, the authors are encouraged to reach out to the asset's creators. 13. New Assets Question: Are new assets introduced in the paper well documented and is the documentation provided alongside the assets? Answer: [Yes] Justification: This paper does not release any new assets aside from the proposal of new methodology. Code for implementing our methods and the experiments in this paper is included with the submission. Guidelines:• The answer NA means that the paper does not release new assets.• Researchers should communicate the details of the dataset/code/model as part of their submissions via structured templates. This includes details about training, license, limitations, etc. • The paper should discuss whether and how consent was obtained from people whose asset is used. • At submission time, remember to anonymize your assets (if applicable). You can either create an anonymized URL or include an anonymized zip file. 
crowdsourcing and research with human subjects: 
 Question: For crowdsourcing experiments and research with human subjects, does the paper include the full text of instructions given to participants and screenshots, if applicable, as well as details about compensation (if any)?We note that when conformal prediction is applied to more typical supervised learning tasks, this problem is equivalent to the challenge of prediction set "inefficiency," i.e. large prediction set size.Equation (1) closely resembles a measure of calibration error known in the theoretical computer science literature as multicalibration[12]. Formally, however, multicalibration is defined conditionally on the calibration dataset, while the expectation in (1) is over both the calibration and test points.Although our methods' implementations differ, we remark here that the level-adaptive guarantee is inspired by a similar result in Zhang and Candès[33].While a non-zero error guarantee is not always desirable, it may be suitable for tasks where the cost of an error is low and/or high error rates appear unavoidable, e.g., "Please suggest ten recommendations for my vacation." or "Give me a list of already-approved drugs that might be repurposed to treat COVID."i=1 β i v i | β ∈ R}, where v denotes the number of views of the corresponding Wikipedia page in January 2023. In the level-adaptive examples, we use a nearly identical workflow to the previous section. The only difference is that here we estimate α(•) using a 0.75-quantile regression over F (see Figurefor a plot of this estimate). Additionally, in the final level-adaptive fit, we add a linear term to this function class given by β 4 (α(•) -0.1) 2 . Note that in 
 
 Appendix:  


Decision: This paper presents conformal inference methods for obtaining validity guarantees on large language model (LLM) outputs, a problem known as conformal factuality (Mohri and Hashimoto 2024). It leverages previous work (Gibbs et al. 2023) to obtain **conditional** validity through level-adaptive conformal prediction. It also introduces a training method called "conditional boosting" which differentiates through the conditional conformal algorithm to obtain better conformity scores. Experiments on synthetic and real-world datasets demonstrate the performance of their methods and improvement upon existing approaches.    

Most reviewers point out as strengths the originality and soundness of the proposed approach (particularly the conditional boosting procedure) and the non-trivial generalization of (Gibbs et al. 2023) to incorporate general losses and adaptive error rate. The main weaknesses are the limited discussion about alternative frameworks (such as conformal risk control), the limited empirical analysis (with lack of ablations and not very well organized experimental section), and somewhat insufficient discussion about the practical limitations of providing non-zero error guarantee in a conformal factuality framework with LLMs. 

While I agree with the reviewer tBPp that a guarantee of three factual errors is in general not very useful in practice -- and I strongly recommend acknowledging this limitation more explicitly in the paper or presenting examples of situations where this can be useful to avoid overselling the practical usefulness of the method -- the other contributions of this paper are solid and potentially useful. The author rebuttal adds more experiments which will enhance the paper and alleviates some of the other concerns. I also urge the authors to include more details (as mentioned in the answer to CDbE) as what the advantages / disadvantages of their proposed framework are with respect to other proposed frameworks in the conformal prediction literature, such as conformal risk control.

Reviews: review: paper_summary: paper_summary: The paper provides a conformal prediction framework for the generation of hallucination risk-bound. The method can involve any loss function instead of the 0-1 loss as traditional conformal classification. They also provide a conditional (group) conformal prediction guarantee. They optimize the loss function with improved conformal prediction efficiency.
strength_weakness: strength_weakness: 1. [Generalization to alternative targets]: the rigorous proof is lacking about why the prediction set provided by lines 191 and 192 can lead to the conformal prediction guarantee. In line 181-187, the paper claims some assumptions on the loss function to be used. However, how these assumptions are used to derive the final valid conformal prediction guarantee is missing.

2. [Generalization to alternative targets]: conformal risk control methods [1] with a similar guarantee should be included in the discussion.

[1] Angelopoulos A N, Bates S, Fisch A, et al. Conformal risk control[J]. arXiv preprint arXiv:2208.02814, 2022.

3. [Generalization to alternative targets]: missing related work [2,3] on risk control of LLMs with conformal prediction
[2] Kang, Mintong, et al. "C-rag: Certified generation risks for retrieval-augmented language models." ICML 2024
[3] Quach, Victor, et al. "Conformal language modeling." ICLR 2024

4. [Level-adaptive conformal prediction]: Equation (8) use different $\alpha$ for the pinball loss (different $\alpha_i$), which can breaks the pinball loss formulation in Equation 4 and might also deteriorate the original conclusion of prediction coverage of $1-\alpha$. Do the authors have any justifications on it?

5. [Level-adaptive conformal prediction]: I think the designed level-adaptive conformal prediction is not that effective. If our goal is to use an adaptive level $\alpha$ for a particular example, why not directly do the conformal calibration with the particular $\alpha$ so that we can get the desired coverage?  I am confused on the final goal of the method in Sec 3.2. What the adaptivity here different from what I am thinking?

6. [Conditional boosting]: The conformal training method (reference [18] in the paper) optimizes $\theta$ in an end-to-end way, but the paper claims that it is unclear how to backpropagate through the estimated cutoff in Line 236. What makes the difference in the scenario?
questions: questions: Please refer to the weakness part for concrete questions and concerns.
limitations: limitations: discussed in Sec 5
paper_summary: paper_summary: The paper presents two new conformal inference methods for obtaining validity guarantees on large language model (LLM) outputs. The authors consider the task of filtering invalid claims from LLM responses to ensure high probability factuality guarantees on the filtered output. They discuss two limitations of existing approaches and how their methods improve upon them – (i) previous methods provide a marginal guarantee over a random test prompt instead of conditional validity, and (ii) existing methods may remove too many claims as the score function is imperfect. To improve upon these, the authors generalize the conditional conformal framework of [1] to adapt the filtering threshold that controls monotone risks and adjust the error rate adaptively (level-adaptive conformal prediction). The second method introduced in the paper termed conditional boosting enables automated discovery of superior claim scoring functions via differentiation through the conditional conformal algorithm i.e., finding conformity scores that allow retaining more claims in the LLM output while also ensuring validity. The authors perform experiments on synthetic and real-world datasets to demonstrate the performance of their methods and improvement upon existing approaches.
&nbsp;
&nbsp;

[1] I. Gibbs, J. J. Cherian, and E. J. Candès. Conformal prediction with conditional guarantees. arXiv preprint arXiv:2305.12616, 2023.
strength_weakness: strength_weakness: The main weaknesses and scope for improvement are wrt the empirical evaluation:
1. Lack of ablations
- While the experiments include comparison with the split conformal calibration method of Mohri and Hashimoto [2] for the Wikipedia biographies dataset, I did not see comparison of the level-adaptive method with the fixed level conditional conformal procedure in [1] (where $\mathcal{F}$ can probably just be a linear combination of group indicators?). I believe this would also help understand the contribution of the level-adaptive method.
- How do different sub-claim scoring functions compare to each other in practice?

2.  Lack of justification behind the choice of score functions and function class $\mathcal{F}$
- Why is the conformity score chosen as naive absolute score value in Fig 4, 7? How would the results change if a better score function is selected? While the validity will always hold true, the empirical performance can give better practical insights (as is the intended goal of the paper).

3. Additional comment on organization of results: In its current form, it is hard to understand the experimental setup and variations of the method used for different figures. The experiments section can be organized better for greater clarity.


**References**

[1]  I. Gibbs, J. J. Cherian, and E. J. Candès. Conformal prediction with conditional guarantees. arXiv preprint arXiv:2305.12616, 2023.
&nbsp;

[2] C. Mohri and T. Hashimoto. Language models with conformal factuality guarantees.  arXiv preprint arXiv:2402.10978, 2024.
questions: questions: 1. It seems that both methods require an additional step of data splitting. Would this introduce high variance if there are not enough samples in some subgroups? (it would also be helpful to mention the number of samples in each group e.g. in Fig 2, where there are just 381 total test points)

2. Is there any specific reason why experiments were not performed on other real datasets studied in Mohri and Hashimoto?

3. Typo: shouldn't it be $Y_{n+1}$ in Theorem 2.1?
limitations: limitations: The authors discuss limitations in the Limitations section.
paper_summary: paper_summary: The paper introduces two new conformal prediction methods aimed at enhancing the validity of large language models. The first method generalizes the conditional conformal procedure to issue weaker guarantees when necessary, thereby preserving utility. The second method improves the quality of the scoring function through a novel algorithm designed to differentiate the conditional conformal procedure. The proposed methods are validated using both synthetic and real-world datasets, addressing deficiencies in existing approaches by ensuring conditional validity and retaining valuable and accurate claims.
strength_weakness: strength_weakness: - The methodology assumes the existence of an annotated calibration set of prompt-response-claim-annotation tuples, which may raise questions about the generalizability of the approach to different datasets or domains.
- Some readers may not be familiar with the metrics used to evaluate the method. Providing additional explanations for these metrics would enhance clarity and understanding.
questions: questions: How sensitive is the methodology's performance to variations in the size and composition of the calibration set? How representative is this dataset of real-world large language model outputs?
limitations: limitations: The authors adequately address the limitations of their work in Section 5.
paper_summary: paper_summary: The paper proposes a new way to filter out LLM generations such that the resulting text only contains a set number of invalid claims with a certain probability. To do so, the authors adapt a new conformal mechanism to be level adaptive i.e. conditioned on the prompts rarity for example. They also propose a boosted version which additionally reduces the number of wrongly removed items in the generations set of claims. They then conduct experiments on synthetic and wikipedia data to confirm they claims.
strength_weakness: strength_weakness: -  The paper starts off unfairly in figure 1, where the authors fixed a level of 90% for the baseline and 76% for the proposed method. This is misleading as one could easily also pick a lower coverage rate for the baseline and it would potentially look much less bad. This is concerning as it misleads the reader quite drastically until one reads the caption. Could you please explain why you chose 90% for the baseline but then only 80% for yours? Maybe i misunderstood your intentions with this figure.
- Secondly, I would like to note that the original conformal guarantees are finite sample however, if i understood correctly, this is no longer the case here eq (3), thm2.1. Hence my question is that are there any other baselines to compare against that are not conformal? I believe that this paper misses a substantial related works section.
- Thirdly, the experiments in the wikipedia dataset were choses with at most 3 wrong claims. Why did you choose 3  and not 0, 1 or 2 ? The fact that these experiments werent added in the appendix as ablation makes me question that 3 was chosen specifically to show the benefits of this paper. Please add these additional experiments for completeness as this number 3 was chosen out of nowhere. This also leads me to my next concern which is that of, even if we have at most 3 wrong claims, we can still not point to which one is wrong ... Could the authors please elaborate on the usefulness of this in the first place? Shouldnt you set the threshold to 0 wrong claims? This is a major concern from my side as this guarantee doesnt allow me to do anything useful in practice.
-  Fourthly, I also agree with the authors that the exchangeable assumption is a big drawback of this method in practice. The method that needs to be trained with the conditional boosting, is fixed for a given type data. This can be quite limiting.
- Lastly, there are not sufficient experimental results to support your claims. You have a single toy experiment with some Wiki dataset. Additional experiments or at least extensive ablation studies would be needed to convince me about the usefulness of this method.
questions: questions: Please see above.
I am more than happy to raise my score if the above have been addressed.
limitations: limitations: Yes

Comments: title: Thanks for clarification
Response
Response
Further clarification
Thanks for rebuttal
Reply to 4-5
Reply to 1-3
Response
comment: Thank the authors for clarification! After reading other reviews and thinking with the clarified points, I remain positive on the paper and raise score to 6.
Thank you for your continued openness and engagement. We hope that these responses address your concerns.

1) The technical difference is that the previous method issues a fixed $1 - \alpha$ guarantee for each test point, while ours issues a data-dependent guarantee. We would first point out that this is itself a novel theoretical goal. It may be easiest to contextualize our contribution in the more canonical regression setting. Translating our results to this task, our work shows how to generate a calibrated prediction set whose size is consistently small. Independently of the LLM problem, our method presents a new approach to an active research area in conformal prediction: prediction set efficiency. Rather than designing conformity scores that we hope will lead to small prediction sets (which is not always possible), we can adjust the coverage guarantee to achieve this same goal. 

    Second, we do not believe that it is obvious how to define and achieve a meaningful level-adaptive guarantee. For example, another reviewer asked why we cannot simply run the conditional calibration procedure at the fixed level given by the $\alpha(\cdot)$ function estimated using the first data split. Unfortunately, this approach subtly breaks the exchangeability argument underpinning the proof of Gibbs, Cherian, and Candes. Our procedure circumvents this obstacle by estimating a data-dependent quantile for each calibration point, thereby preserving the symmetry of the algorithm. Achieving the calibration result we present in this paper requires us to not only modify the quantile regression presented in Gibbs, Cherian, and Candes, but also to think carefully about how one might design the function class used in their procedure. In our experiments, for example, we show that it is possible to add polynomials and group-indicators in $\alpha(\cdot)$ to $\mathcal{F}$ in order to achieve so-called smooth and binned calibration error guarantees.

2) We believe that the reviewer has misunderstood. Finite-sample does not require that the theoretical guarantee depends on the number of data points or that it must not hold in expectation. In particular, finite-sample guarantees can be exact (i.e., there is no error depending on $n$) and any guarantee that is stated in terms of a probability can be rewritten as an expectation over an indicator function.

    The conformal guarantee that the reviewer refers to is $$1 - \alpha \leq \mathbb{P}(Y_{n + 1} \in \hat{C}(X_{n + 1})) \leq 1 - \alpha + \frac{1}{n + 1}.$$ Here the probability is taken over both the randomness in the test point and the calibration set used, i.e., it holds in expectation over both sets of random variables. However, a minor auxiliary randomization yields an exact finite-sample guarantee for conformal prediction, i.e., $\mathbb{P}(Y_{n + 1} \in \hat{C}\_\{\text\{rand.\}\}(X_{n + 1})) = 1 - \alpha$. Our procedure is also randomized to achieve an exact finite-sample guarantee (this is why you do not see any $1/n$ terms). It is possible to define a non-random construction for our quantile estimator, but we do not describe this method in the paper. Compared to the typical conformal guarantee, the upper bound would be modified from $1/(n + 1)$ to $\frac{d}{n + 1} \cdot \frac{1}{\mathbb{E}[\max_{i \in [n + 1]} f(X_{n + 1})]}$ where $d$ is the dimensionality of $\mathcal{F}$ (e.g., the number of groups). If $\mathcal{F}$ is chosen to be some collection of group-indicators, note that the second fraction in this upper bound is equal to $1$.

3) Though we agree that some users may not find the output of the $0$-error guarantee useful, we re-emphasize that the only degradation is in the nominal level offered (30-50\% instead of 80-95\%). Our method remains well-calibrated and retains ~70\% of the original claims. Even if the reviewer believes that relaxed error guarantees are not useful, we contend that there is value in honestly quantifying the high level of uncertainty inherent to issuing strong guarantees via deficient claim scoring methods.

4) We will do so. Apologies for any confusion.
1. I thank the authors for their explanations. So to be clear, alpha is adaptive per sample and hence each sample will have a difference guarantee. In that case, could the authors please clarify what the exact technical contributions are compared to [Gibbs, Cherian, and Candes 2023]. Please elaborate the exact technical contribution as to me it looks like a simple extension, but i might be wrong here.
2. The authors said "The theorems stated in our work are finite-sample exact guarantees that match the style and assumptions of those given in the conformal literature." If something holds in expectation it is not finite sample ? Finite sample means that the theoretical guarantee is dependent on the number of calibration datapoints. I am just confused how you can call this finite sample and also "holds in expectation"? What i mean by finite sample is that there is a term such as 1/n in the upper/lower bound, as is present in the original conformal guarantee. Did i misunderstand something?
3. Here i believe we have to agree to disagree. I do not disagree that the guarantee still holds, what i am saying is that even if a guarantee holds the resulting output can be useless. This is like having a relatively bad classifier for Cifar10 and then outputting all 10 labels in the conformal set. The guarantee still holds but the output is useless, which is what i am suspecting will happen when you choose error = 0 in the experiments in the paper. However if that is not true, i would encourage the authors to add these experiments in the final version of the paper. 
4. I do not believe i understand this, in such a condensed manner and hope the authors will add a thorough discussion in the final version of the paper.
5. Agree, i do see the appeal of adaptive scores now. please clarify for my 1. in terms of relationship with existing work.

The rebuttal has convinced me to some extend, however i would like the authors to add these additional experiments, mentioned above, in the final version of their paper if the paper indeed get accepted. However, if the results turn out significantly different than the authors claimed in "The results look very similar (i.e., our methods are well-calibrated and give consistently above-target claim preservation) when the number of errors is chosen to be " that the authors will retract their paper. 

Hence i am willing to increase my score and after careful discussion with other reviewers would consider raising the score more.
We thank the reviewer for their considered response and hope that the clarifications below address both of their questions.

1) We will revise Section 3.1 to precisely describe the similarities and differences between our work and previous methods. In short, conformal risk control generalizes split conformal prediction to **marginally** control a monotone loss. Analogously, Section 3.1 shows how to generalize the conditional conformal method (Gibbs, Cherian, and Candes 2023) in order to obtain **conditional** control of a monotone loss. We agree that one could apply conformal risk control to this problem, but the resulting guarantee would not match the one provided in Section 3.1.

2) We believe that the reviewer has misunderstood our contribution. Our method is not equivalent to running split conformal prediction on some adaptive choice of conformity score. Instead, given any pre-defined conformity score, our paper shows how to compute a conditionally valid and calibrated estimate of its quantile. For context, because it only targets marginal validity, split conformal prediction uses the sample quantile (i.e., a particular sorted conformity score) in place of our more sophisticated estimator. 

    Running a method analogous to conformal training requires us to differentiate our quantile estimator, but it is not obvious that this derivative exists. This is because our estimate is given by the solution to an optimization problem with a non-differentiable objective. Our contribution is to show that despite this challenge, our final quantile estimate is locally linear in the calibration scores.
I would like to thank the authors for the clarifications.

My concerns 1,3,4,5 are addressed, but for Q2 and Q6, I appreciate additional clarifications:

Q2: In conformal risk control paper, the conformal guarantee is valid for any risk function and any parameterized generation algorithm. Therefore, the method can be exactly tailored for the problem here. Concretely, the algorithm can be exactly cutting off claims with low scores with the parameter as the threshold. By running conformal risk control, we can identify the sets of parameters (i.e., thresholds for cutting off) which achieve valid hallucination risk. In this sense, the contribution in sec 3.1 is not the first trial in the conformal literature and I would like that the authors clarify more on the novelties for Sec 3.1.

Q6: I do not understand why the objective leads to additional challenges. The difference that paper made compared to standard conformal prediction is to use another adaptive loss function as the conformity scores. Why this will lead to a non-differentiability challenge? In particular, why is this not resolved with differentiable sorting as conformal training paper?
I thank the authors for addressing the questions and for sharing additional experiments. I look forward to the revision with suggested changes in future versions. I remain positive about the work and would like to keep my score as above.
Thanks for the clarification. I remain positive about the work.
4) In order to streamline the paper, we did not give an in-depth discussion of the connection between our guarantees and covariate shift. The work of Gibbs, Cherian, and Candes (2023), which introduces these conformal coverage targets extensively discusses the relationship between the conditional guarantees we consider and robustness to covariate shift. We will look to include information about this connection between our results and covariate shift robustness in our revision.\
For now, to understand this connection we remark that our method gives robustness to covariate shifts in which the training data $\\{(P_i,R_i,\\mathbf\{C\}\_i,\\mathbf\{W\}\_i)\\}\_{i=1}^n$ are sampled i.i.d. from a distribution $Q$, while the test point is sampled from the covariate shifted distribution $(P\_\{n+1\},R\_\{n+1\}) \sim f(P\_\{n+1\},R\_\{n+1\}) dQ\_\{(P,R)\}$ and $(\mathbf\{C\}\_\{n+1\},\mathbf\{W\}\_\{n+1\}) \sim Q_\{(\mathbf\{C\},\mathbf\{W\}) | (P,R)}$. Here, we use the notation $f(P\_\{n+1},R_{n+1\}) dQ\_\{(P,R\)}$ to refer to the distribution in which the covariate space is re-weighted by $f$. More precisely, using the subscript $f$ to denote the re-weighting, we have that for any set $A$, 
$$
\\mathbb\{P\}\_f((P\_\{n+1\},R\_\{n+1\}) \in A) = \\frac{\\mathbb{E}\_Q[f((P,R)) \\mathbf\{1\}[(P,R) \in A]]\}{\\mathbb\{E\}\_Q[f(P,R)]\}.
$$
Using these definitions, our Theorem 3.1 has the immediate corollary that (under the assumptions and setting stated in the theorem),
$$
\\mathbb\{P\}\_f(L(\\hat\{F\}(\\mathbf\{C\}\_\{n+1\} ; \\hat\{\tau\}\_\{\\text\{rand\}\}(X\_\{n+1\}) ), \\mathbf\{W\}\_\{n+1\}) \\leq \\lambda ) = 1-\\alpha,
$$
for all non-negative functions $f \in \mathcal{F}$ with $0 <\mathbb{E}_Q[f(P,R)] < \infty$. This means that for all covariate shifts belonging to the class $\mathcal{F}$, the filtering procedure is guaranteed to control the loss with probability $1-\alpha$.

5) Following our response to point $1$, if we used e.g., the mode of the histogram, as a single fixed level for $\alpha$, the results would be unnecessarily liberal for many test points and would fail to retain a sufficient number of claims for others.
Thank you for the feedback and your openness to further discussion. We hope that these responses fully address your concerns.

1) One could certainly pick the fixed level of $1-\alpha$ based on a heuristic using the calibration data. For example, one may choose $1-\alpha$ to be the mean or median of the fitted function $1-\hat{\alpha}(X_{n+1})$. We will include these comparisons in the appendix. But as shown in the histograms attached to the global rebuttal, we find that $1-\hat{\alpha}(X_{n+1})$ takes on a large range of values (between 0.5-0.9 for the **MedLFQA** dataset and between 0.84-0.97 for the **FActscore** dataset). The only way to ensure good claim retention on all test examples would be to use the minimum value of $1-\hat{\alpha}(X_{n+1})$ (i.e. 0.5 for **MedLFQA** and 0.84 for **FActscore**). However, this would be needlessly liberal for many of the test points. Figure 6 on page 15 of the submission demonstrates that this level adaptivity is qualitatively important. The plotted points display the level at which 80\% of claims are retained; note that this level depends strongly on the number of views of the associated Wikipedia article. This figure shows that a single choice of level would not perform similarly to our method, and we will point the reader to this plot in order to emphasize this point in the main text.

    One may also envision a simple theoretical setting in which test-time level adaptivity is required. Consider a two-groups model in which we have systematically higher claim scores for one group vs. another. We cannot issue guarantees at a constant level *and* preserve an equal number of claims in both groups.

    Last, the goal of Figure 1 is to demonstrate that we cannot issue the typical "high probability" conformal guarantee while still retaining most claims. The final panel then shows what our method does. We prominently display the weaker guarantee of our method, so it is unclear to us what the reviewer means by misleading the reader. 

2) The guarantee associated with conformal prediction holds in expectation over the calibration set (see: Proposition 1 in Shafer and Vovk's tutorial, Eq. 1 in Angelopoulos and Bates' Introduction). The previous work of Gibbs, Cherian, and Candes (2023), where the conditional targets we consider were originally introduced, shows that a larger calibration set allows the user to target a richer set of conditional guarantees, i.e. a richer function class $\mathcal{F}$. In particular, Figure 3 of that paper shows that if the calibration dataset is too small relative to the dimension of $\mathcal{F}$ the intervals (in a regression setting) or the number of filtered claims (in the LLM setting) will be quite large. Reviewer R2Vh also asked about this and in our revision we will look to update the article with a discussion that points readers to that reference.


3) The results look very similar (i.e., our methods are well-calibrated and give consistently above-target claim preservation) when the number of errors is chosen to be $0$. Unfortunately, OpenReview will not allow us to upload additional figures at this time, but we emphasize that we choose to display the $3$ error output primarily because we believe that a larger value for $1-\alpha$ would lead to a more interpretable statement for the reader. We disagree with the reviewer's claim that we chose this value because it makes our results look good. The guarantees of our method hold regardless; the low probability guarantee demonstrates that existing claim scoring functions are insufficiently accurate for this particular dataset, not that our method has significant flaws. In addition, there are many problems where we believe that such a guarantee is reasonable. Imagine we asked an LLM for a list of options, e.g., a list of $20$ restaurants suitable for a vegetarian. We are using the LLM to assemble a plausible list for further follow-up work, so some (though not too many) errors are tolerable.

    We do not intend for this example to be a prescriptive description of how our method must be used, but rather an example of one possible application and loss function. The contribution of our paper is a framework for filtering claims from LLMs with rigorous guarantees.
1. Thanks for the clarification, however in practice one could simply pick alpha based on a heuristic i.e. i want to retain x% of the sentence and hence i can simply pick that. This would simple require a few easy heuristic steps from the calibration data which is on par with your additional need for compute to do boosting. What i am saying is this is purposefully taken to make baseline methods look bad. In practice if someone were to take 90% and see that they only retain so little claims, they would simply lower alpha. From this perspective can the authors please explain how this is not a trivial heuristic to compare against? Happy to keep this discussion in case i missed something, but the fact that you simply use 90% and then the adaptive method uses mostly around 70-80 is just misleading to me. I could easily find a fixed heuristic that does pretty much the same. I want to see concrete experiments where this slight adaptation towards the test sample benefits the end user in a significant manner.
2. If it is truly finite sample, could the authors please tell me how the intervals scale with increased calibration data? The theorem has an expectation.
3. The authors did not address why 3 was chosen except to make the results look good. I see in the attached pdf that you have results on the medical data that have 0 errors. I agree in settings where the model is presumably decent, this is achievable. In the Wikipedia dataset i assume that using 0 errors will make the whole method somewhat useless at below 50% guarantees. My main question is, if you say you have at most 3 errors, and cant tell the user which ones are the errors, what can the user possibly do with that information? The only use case is the 0 errors.
4. Can the authors explain this covariate shift theory in more detail please. i might have missed that part.
5. I thank the reviewer for the additional experiments. However as mentioned previsouly a simple heuristic of trying to pick the desired alpha based on how many sentences to retain would be just as usable. and hence my main question here is what the concrete advantages of this adaptive nature is. Looking at the histograms the nominal values seems to be unimodal. I am not saying to use this as a guide but a separate computation (heuristic compared to your adaptive method) where given some calibration data, we go over alpha [10, 20, ... 90%] and then pick the alpha which fits the desired retention level seems like a basic baselines to me.

Happy to keep this discussion going as there might be some parts i might have missed or misunderstood. but i believe the above is still valid and would like the hear the authors answers to them before increasing the score.