Conformal Generative Modeling with Improved Sample Efficiency through Sequential Greedy Filtering

## Abstract

Abstract Generative models lack rigorous statistical guarantees for their outputs and are therefore unreliable in safety-critical applications. In this work, we propose S equential Co nformal P r e diction for Gen erative Models ( SCOPE-Gen ), a sequential conformal prediction method producing prediction sets that satisfy a rigorous statistical guarantee called conformal admissibility control. This guarantee states that with high probability, the prediction sets contain at least one admissible (or valid) example. To this end, our method first samples an initial set of i.i.d. examples from a black box generative model. Then, this set is iteratively pruned via so-called greedy filters. As a consequence of the iterative generation procedure, admissibility of the final prediction set factorizes as a Markov chain. This factorization is crucial, because it allows to control each factor separately, using conformal prediction. In comparison to prior work, our method demonstrates a large reduction in the number of admissibility evaluations during calibration. This reduction is important in safety-critical applications, where these evaluations must be conducted manually by domain experts and are therefore costly and time consuming. We highlight the advantages of our method in terms of admissibility evaluations and cardinality of the prediction sets through experiments in natural language generation and molecular graph extension tasks.

### 1 Introduction

Generative models have found extensive applications across various domains, including the generation of images (Rombach et al., ), molecules (Vignac et al., ), and natural language (Achiam et al., ). While these models are becoming increasingly performant, caution is required when decisions are based on generated outputs. This is particularly relevant for scenarios where errors have severe consequences. A prime example is the phenomenon of “confabulations” (or “hallucintations”) in large language models—responses that lack factual support, potentially leading to substantial harm if trusted (Bai et al., ; Weidinger et al., ). Therefore, developing effective measures to ensure strong statistical guarantees on the predictions of these models is imperative.

The field devoted to obtaining rigorous statistical guarantees for the predictions of machine learning models is called risk control (Angelopoulos et al., ; ; Bates et al., ). A prominent line of work within this field is called conformal prediction (Vovk et al., ; Shafer & Vovk, ). Conformal prediction techniques typically use a heuristic uncertainty estimate from a black box machine learning model to construct a non-conformity measure (e.g., Kato et al. ) that allows for generating prediction sets by selecting examples in the prediction space $\mathcal{Y}$ based on their non-conformity values. A typical guarantee is that with high probability, the true label $y\in\mathcal{Y}$ (as sampled from the generative process) for a test example $x$ is contained in this prediction set. Conformal prediction is appealing due to its simplicity and strong non-asymptotic, distribution-free guarantees (Angelopoulos & Bates, ). However, conformal prediction methods are typically designed for classification or low-dimensional regression tasks and they suffer from the curse of dimensionality when the prediction space $\mathcal{Y}$ is combinatorially large or infinite, as it is the case for drug design or natural language generation.

Figure: Figure 1: SCOPE-Gen for Radiology Report Generation. The sequential prediction procedure can be separated into two stages: In the generation stage ($s=0$), i.i.d. text reports (blue tokens) are drawn from the generative model. In the filter stage $(s\in\{1,2\})$, the prediction set from the previous step $s-1$ is refined to remove examples with low quality (removing the false response in red) and examples with high similarity to already sampled texts (the answers in green are similar). Each step is performed via iterative (sub-)sampling in a given order (indicated by the purple circles), until the value of a non-conformity threshold $\lambda_{(s)}^{*}$ is exceeded.
Refer to caption: x1.png

Addressing this problem, Quach et al. () have recently introduced a method called conformal language modeling (CLM)(^1^11Notably, despite its name, CLM is not based on conformal prediction in a strict sense.). Rather than evaluating a non-conformity measure on each point in the prediction space (which is intractable for textual data), CLM calibrates a stopping rule parameter $\lambda_{(0)}$ that decides how many samples $y$ are required from a generative model $G$, conditionally on features $x$ (for example, an image or a text query). These samples then make up the prediction set, which fulfills a statistical guarantee with respect to containing at least one admissible (correct/non-hallucinated) example. The method further introduces rejection sampling to ensure that the prediction set satisfies desired properties. The sampling is controlled by two calibration parameters $\lambda_{(1)}$ and $\lambda_{(2)}$ that ensure

- 1.
Quality: If a new sample has too low quality, it is rejected. The quality threshold is given by $\lambda_{(1)}$.
- 2.
Diversity: If a new sample from the generative model is too similar to an already sampled one, it is rejected. The similarity threshold is given by $\lambda_{(2)}$.

Conformal prediction cannot be applied with multi-dimensional calibration parameters, as noted by Angelopoulos et al. (). To address this limitation, CLM calibrates all parameters $\bm{\lambda}\coloneqq(\lambda_{(0)},\lambda_{(1)},\lambda_{(2)})$ using Pareto testing (Laufer-Goldshtein et al., ), a technique derived from the learn-then-test framework with fixed sequence testing for family-wise error rate control (Angelopoulos et al., ). In broad strokes, Pareto testing divides the calibration data into two sets: The first set is used to estimate the Pareto frontier of different configurations for $\bm{\lambda}$ over mean prediction set size (to be minimized) and admissibility (to be controlled). The estimated Pareto frontier is used to construct a fixed sequence whose elements are tested in order, on the second data set. For testing, the null hypothesis corresponds to not controlling the admissibility at a given level. The returned solution for $\bm{\lambda}$ is the last configuration in the sequence for which this null hypothesis is rejected.

While CLM offers a notion of admissibility control in generative models, it has a practical limitation. Specifically, during calibration, CLM necessitates sampling and evaluating admissibility for a fixed number of times per instance $x$ in the calibration set. In safety-critical applications, such as medicine, the factual integrity of admissibility checks based on n-gram (Lin, ; Papineni et al., ) or machine learning methods (Smit et al., ) remains a concern (Zhang et al., ), necessitating manual assessments by human domain experts for accurate calibration. Reducing the number of these costly admissibility checks is thus paramount (Settles, ; Mosqueira-Rey et al., ).

Recognizing the need to enhance efficiency, we propose a method called Sequential Conformal Prediction for Generative Models (SCOPE-Gen), visualized in Fig. 1. This method differs in two major ways from CLM: (1) Prediction set generation is performed sequentially and can be split up into an initial generation stage and a filter stage. The generation stage proposes i.i.d. candidates from the generative model (blue tokens in Fig. 1), the filter stage applies so-called greedy filters in order to sub-sample the prediction set from the previous step. (2) We apply conformal prediction instead of learn-then-test. This can be done due to the fact that the admissibility of our final prediction set factorizes as a Markov chain. In this chain, each factor can be controlled separately. Thus, the desired level of admissibility for the final prediction set can be controlled by separately calibrating the individual
prediction step parameters according to the Markov chain factorization.

Importantly, our prediction procedure has the significant advantage of reducing the number of admissibility checks involved in oracle-in-the-loop(^2^22This means that an oracle can be queried on demand by the algorithm.) scenarios (we explain this in detail in § 4.2).

In summary, we highlight the following contributions:

- •
We introduce Sequential Conformal Admissibility Control for Generative Models (SCOPE-Gen), a sequential conformal prediction approach that satisfies admissibility control (§ 2) for black box generative models (§ 4).
- •
SCOPE-Gen requires significantly fewer queries of an admission function, in comparison to prior work. In addition, its computational complexity is lower ($\mathcal{O}(K)$ in comparison to $\mathcal{O}(g^{K})$, where $K$ is the number of calibration parameters (typically $K=3$) and $g$ is the size of a parameter grid).
- •
We experimentally demonstrate the advantages of SCOPE-Gen in comparison to various baselines and prior work on molecular scaffold extension and natural language generation tasks (§ 5).

##### Overview.

Section § 2 introduces (conformal) admissibility control, which is the main objective of the present work. Thereafter, we present conformal prediction in Section § 3. These sections set the stage for presenting our method in Section § 4. Upon establishing the main principles, we demonstrate the sub-sampling and non-conformity update functions used for filtering (§ 4.1), the algorithmic details of the calibration (§ 4.2). Thereafter, we experimentally demonstrate the advantages of our approach in comparison to prior work in Section § 5, followed by a section dedicated to related work (§ 6). Finally, we discuss limitations in Section § 7 and conclude in Section § 8.

### 2 Objective

We consider generating a prediction set $\mathcal{C}_{\bm{\lambda}}(X)=\{Y_{i}\}$, parameterized by a calibration parameter $\bm{\lambda}\in\mathbb{R}^{K}$ computed from a labeled i.i.d. calibration set $\{(X_{i},Y^{t}_{i})\}_{i=1}^{n}$ with feature variable $X_{i}$ and ground truth prediction $Y^{t}_{i}$. The main objective of the present work is for $\mathcal{C}_{\bm{\lambda}}$ to be admissible for a new example, with high probability. Formally, we say that $\bm{\lambda}$ satisfies (conformal) admissibility control at a given level $\alpha\in(0,1)$ if

$$ $\mathbb{P}(\exists Y\in\mathcal{C}_{\bm{\lambda}}(X_{n+1}):a(Y,\,Y_{n+1}^{t})= 1)\geq 1-\alpha,$ (1) $$

where $(X_{n+1},Y^{t}_{n+1})$ is an additional independent sample from the same distribution as the calibration set and $a:\mathcal{Y}^{2}\mapsto\{0,1\}$ measures admissibility between generated sample $Y\in\mathcal{Y}$ and $Y^{t}_{n+1}\in\mathcal{Y}$ (Fisch et al., ). For instance, $a$ could measure whether a textual response from a language model $Y$ for the input $X$ is similar to a ground truth textual response $Y_{n+1}^{t}$. For completeness, we demonstrate the relationship between admissibility control 1 and the more general notion called conformal risk control (Angelopoulos et al., ) in App. A. For notational convenience, we introduce the set-level admissibility

$$ $A(\mathcal{C}_{\bm{\lambda}}(x),y^{t})\;\coloneqq\;\mathbbm{1}\{\exists y\in \mathcal{C}_{\bm{\lambda}}(x):a(y,y^{t})=1\}.$ (2) $$

We will generally drop dependence of $A$ on $x$ and $y^{t}$ and simply write $A(\mathcal{C}_{\bm{\lambda}})$ instead of $A(\mathcal{C}_{\bm{\lambda}}(x),y^{t})$. We also introduce the (total) admissibility

$$ $\mathcal{A}(\bm{\lambda})\;\coloneqq\;\mathbb{P}(A(\mathcal{C}_{\bm{\lambda}}( X_{n+1}),Y_{n+1}^{t})),$ (3) $$

which is the quantity we desire to bound from below by $1-\alpha$.

### 3 Preliminary : Conformal Prediction

Conformal prediction (specifically, split conformal prediction (Papadopoulos et al., ; Lei et al., )) provides a way of generating a prediction set $\mathcal{C}_{\lambda}(x)=\{y_{i}\}$, parameterized by a one-dimensional calibration parameter $\lambda\in\mathbb{R}$. The typical setup in conformal prediction is to control (marginal) coverage, which is defined as

$$ $\mathbb{P}(Y^{t}_{n+1}\in\mathcal{C}_{\lambda}(X_{n+1}))\geq 1-\alpha.$ (4) $$

Conformal prediction techniques assume a (possibly random) non-conformity measure $\nu(x,y)$, which is typically chosen as a heuristic estimate for how incompatible $x$ and $y$ are. For instance, if $\mathcal{Y}$ is a finite set of labels and $X$ corresponds to the feature variable (e.g., an image), a simple choice for $\nu$ is to consider the softmax scores of a classifier and use $\nu(x,y)=1-\texttt{softmax}(x,y)$. Given a choice of non-conformity $\nu$ and a calibration parameter $\lambda$, the prediction set is constructed as

$$ $\mathcal{C}_{\lambda}(x)\coloneqq\{y\in\mathcal{Y}\,:\,\nu(x,y)\leq\lambda\}.$ (5) $$

It can be shown that 4 is satisfied (independent of the choice of $\nu$) when calibrating $\lambda$ as follows:

$$ $\lambda^{\ast}\left(\left\{\nu(x_{i},y_{i})\right\}_{i=1}^{n};\alpha\right)= \widehat{\text{quantile}}\left(\left\{\nu(x_{i},y_{i})\right\}_{i=1}^{n}\;;\; \frac{\lceil(1-\alpha)(n+1)\rceil}{n}\right),$ (6) $$

where $\widehat{\text{quantile}}$ denotes the empirical quantile of $\nu$, evaluated at the calibration points $\left\{\nu(x_{i},y_{i})\right\}_{i=1}^{n}$.

We note that 4 can be seen as a special case of admissibility control 1, where the function $a(y,y^{t})$ 2 returns $1$ if and only if $y$ and $y^{t}$ are identical. In the current study, we extend this concept to accommodate the typically vast output space $\mathcal{Y}$ — for instance, encompassing all possible sentences in natural language. This extension allows the function $a$ to accommodate cases where $y$ and $y^{t}$ are not identical but are semantically equivalent or similar. Without such a generalization, prediction sets would need to be excessively large to ensure admissibility control at the desired level 1, since they would have to account for all possible variations in structuring a sentence.

### 4 Sequential Conformal Prediction for Generative Models

SCOPE-Gen relies on i.i.d. calibration data $\{(x_{i},y^{t}_{i})\}_{i=1}^{n}$ from the true generating process. In order to control $\mathcal{A}(\bm{\lambda})$ 3 at level $\alpha$, we utilize conformal prediction § 3. The main challenge of our setting is that the output space $\mathcal{Y}$ is combinatorially large or even infinite. This means that the prediction set determined as in 5 (with $\bm{\lambda}=\lambda\in\mathbb{R}$) is intractable. Thus, we construct a prediction set directly from i.i.d. samples from a generative model $G$.

##### Sequential Prediction ( Alg. 1 ).

The underlying idea of SCOPE-Gen is to construct the prediction set $\mathcal{C}_{\bm{\lambda}}$ in multiple sequential steps $s=0,1,2$, as shown in Alg. 1 and Fig. 1. On a higher level, this process can be divided into two stages:

- 1.
Generation Stage ($s=0$): An initial prediction set $\mathcal{C}_{(0)}$ is generated by iteratively adding new i.i.d. samples from a generative model $G$, conditioned on $x$ (Alg. 1 and Alg. 1). A new sample $y$ is added until the value of a non-conformity measure $\nu$, which is updated at each iteration of the while loop (Alg. 1), exceeds the value of the calibration parameter $\lambda_{(0)}$ (Alg. 1). We assume that $\nu$ is increasing at each iteration.
- 2.
Filter Stage ($s>0$): A generated prediction set $\mathcal{C}_{(s-1)}$ is filtered (or pruned) to $\mathcal{C}_{(s)}$, as to further reduce prediction set size (i.e., $|\mathcal{C}_{(s)}|\leq|\mathcal{C}_{(s-1)}|$). In this stage, filters $s=1,2$ are be applied sequentially. Each filter is parameterized by an individual calibration parameter $\lambda_{(s)}$ and is computed by means of a sub-sampling operation $\texttt{sub_sample}(\mathcal{C}_{(s)},\mathcal{C}_{(s-1)})$. This sub-sampling is performed (Alg. 1) until the non-conformity value $\nu$ exceeds $\lambda_{(s)}$ (Alg. 1; analogous to the generation stage) or there are no more samples left to add (Alg. 1).

Figure: Algorithm 1 predict

This sequential prediction provides a remedy for the intractibility of the conformal prediction set as computed in 5. However, it poses the challenge that the total admissibility $\mathcal{A}(\bm{\lambda})$ is parameterized by a multi-dimensional calibration parameter $\bm{\lambda}$, which cannot be directly calibrated via conformal prediction 6. This is the case because conformal prediction crucially depends on the assumption that the loss is controlled by a one-dimensional parameter (Angelopoulos et al., ).

##### Markov Chain Factorization.

We address this issue by noting that in our sequential prediction procedure, the total admissibility $\mathcal{A}(\bm{\lambda})$ factorizes as a Markov chain

$$ $\mathcal{A}(\bm{\lambda})=\underbrace{\mathbb{P}(A(\mathcal{C}_{\lambda_{(0)}} )=1)}_{\eqqcolon\;\mathcal{A}(\lambda_{(0)})}\underbrace{\mathbb{P}(A(\mathcal {C}_{\lambda_{(1)}})=1\,|\,A(\mathcal{C}_{\lambda_{(0)}})=1)}_{\eqqcolon\; \mathcal{A}(\lambda_{(1)})}\underbrace{\mathbb{P}(A(\mathcal{C}_{\lambda_{(2)} })=1\,|\,A(\mathcal{C}_{\lambda_{(1)}})=1)}_{\eqqcolon\;\mathcal{A}(\lambda_{( 2)})}.$ (7) $$

This means that the probability that the final prediction set $\mathcal{C}_{(2)}$ contains an admissible example is determined by the probability that the first step generates at least one admissible example and the probabilities that none of the consecutive steps filter out all admissible examples. Consequently, we can control the total admissibility $\mathcal{A}(\bm{\lambda})$ at level $\alpha$ by controlling each individual admissibility $\mathcal{A}(\lambda_{(s)})$ for univariate $\lambda_{(s)}\in\mathbb{R}$ and for $s\in\{0,1,2\}$, separately, where the individual levels $\alpha_{(s)}$ are chosen such that $\alpha=1-\prod_{s=0}^{2}\left(1-\alpha_{(s)}\right)$. We discuss the choice of $\alpha_{(s)}$ in § C.1.

##### Employing Conformal Prediction.

We now proceed to show how we use conformal prediction to control the individual admissibilites $\mathcal{A}(\lambda_{(s)})$. First, we note that the prediction sets in SCOPE-Gen are created at each step $s$ such that they grow incrementally, meaning that $\mathcal{C}_{(s)}^{j}\subset\mathcal{C}_{(s)}^{j+1}$,
where $\mathcal{C}_{(s)}^{j}$ is the prediction set $\mathcal{C}_{(s)}$ after $j$ iterations of sampling in a while loop of Alg. 1. As a result, we conclude that admissibility can be reformulated for $s=0$ as

$$ $\mathbb{P}(A(\mathcal{C}_{(0)}^{j})=1)=\mathbb{P}(\text{``$l\leq j$ samples are required to satisfy admissibility''}),$ (8) $$

and analagously for $s>0$. Thus, just as in vanilla conformal prediction 5, we generate the prediction set over integers that controls the right-hand side of 8

$$ $\tilde{\mathcal{C}}_{(s)}(x)\,=\,\{l\in\mathbb{N}:\nu(x,l)\leq\lambda^{\ast}\} \,=\,\{1,2,...,j\},$ (9) $$

where $\lambda^{\ast}$ is the calibrated parameter 6 and we recall that $\nu$ is increasing in $l$, for fixed $x$(^3^33We note that computing $\tilde{\mathcal{C}}_{(s)}(x)$ in 9 would generally be intractable for non-increasing $\nu$.). We see that sampling the prediction set $\mathcal{C}_{(s)}$ by sampling $\mathop{\mathrm{argmax}}_{l}\tilde{\mathcal{C}}_{(s)}$ many examples controls the individual admissibility $\mathcal{A}(\lambda_{(s)})$ at level $\alpha_{(s)}$, which is equivalent to adding new samples to $\mathcal{C}_{(s)}$ until the non-conformity measure $\nu$ exceeds $\lambda_{(s)}$, as done in Alg. 1.

##### Non-Conformity Measures.

A crucial aspect for the performance of conformal prediction methods lies in the choice of the non-conformity measure, which is parameterized by the update function in Alg. 1. Here, we only discuss the choice of this function at the generation level (i.e., $\texttt{update}_{(0)}$) and refer to § 4.1 for the non-conformity measures used during filtering. For generation, we take inspiration from Quach et al. () and consider the following update functions:

$$ $\displaystyle\texttt{update}(\nu,y,j)$ $\displaystyle=\begin{cases}j,&\text{({count})}\[6.0pt] \nu\;+\;q(y)\;+\;\gamma j,&\text{({sum})}\[6.0pt] \max\left\{\nu,\;q(y)\right\}\;+\;\gamma j,\qquad\qquad&\text{({max})}\end{cases}$ (10) $$

where $\gamma>0$ and $q$ with $q(y)>0,\forall y$ denotes a quality estimate of point $y$, such as an estimate of $p(y|x)$ by the generative model. We note that the sum and max updates are slightly different from Quach et al. () due to the $+\gamma j$ term. The reason is that our prediction sets are not naturally limited in terms of size. Without this size regularization, prediction sets could become large.

#### 4.1 Greedy Filters

A core ingredient of SCOPE-Gen lies in the greedy filters. The term greedy reflects the incremental growth of the set of filtered points, $\mathcal{C}_{(s)}$, over the iterations $j$ in Alg. 1. We consider two types of filters: 1) quality filter and 2) diversity filter. Both of them are defined via a sub-sampling function sub_sample and a non-conformity update function update.

##### Diversity Filter.

We take inspiration from farthest point (sub-)sampling, which is common in computer vision applications (e.g., Moenning & Dodgson (); Qi et al. ()):

$$ $\texttt{sub_sample}(\mathcal{C}_{(s)},\mathcal{C}_{(s-1)})=\begin{cases}\sim \text{Uniform}(\mathcal{C}_{(s-1)}),\quad&\text{if}\quad\mathcal{C}_{(s)}= \varnothing\\ \arg\displaystyle\max_{y^{\prime}\in\mathcal{C}_{(s-1)}\setminus\mathcal{C}_{( s)}}\;\displaystyle\min_{y^{\prime\prime}\in\mathcal{C}_{(s)}}d(y^{\prime},y^{ \prime\prime}),&\text{else.}\end{cases}$ $$

Intuitively, this method chooses the point in $\mathcal{C}_{(s-1)}\backslash\mathcal{C}_{(s)}$ with the maximum distance (as measured by some distance function $d$) from the already sampled subset $\mathcal{C}_{(s)}$, if $\mathcal{C}_{(s)}$ is non-empty. For empty $\mathcal{C}_{(s)}$, it chooses a point of $\mathcal{C}_{(s-1)}$, uniformly at random. For this filter, the update rule is specified as

$$ $\texttt{update}(\nu,y)=\begin{cases}-d_{\text{max}},\quad&\text{if}\quad\nu=0 \\ -\displaystyle\min_{y^{\prime}\in\mathcal{C}_{(s)}\setminus\{y\}}d(y,y^{\prime }),\quad&\text{else},\end{cases}$ $$

where $d_{\text{max}}$ is an upper bound on the distance function (see § C.2 for details).

##### Quality Filter.

Using a quality function $q$, we choose the point $\mathcal{C}_{(s-1)}\backslash\mathcal{C}_{(s)}$ with the maximum quality:

$$ $\texttt{sub_sample}(\mathcal{C}_{(s)},\mathcal{C}_{(s-1)})=\mathop{\mathrm{ argmax}}_{y^{\prime}\in\mathcal{C}_{(s-1)}\setminus\mathcal{C}_{(s)}}\;q(y^{ \prime}).$ $$

For the update function of the non-conformity, we introduce the natural choice

$$ $\texttt{update}(y)=-q(y).$ $$

By default, if both filters are applied, we first apply the diversity filter.

#### 4.2 Calibration

Figure: Figure 2: SCOPE-Gen Savings on Admissibility Checks. Samples in brackets denote samples that do not need to be assessed for admissibility (the ones sampled after the first admissible one). For the generation step (a), the $y_{i}^{(j)}$ are i.i.d. samples from the generative model $G$. For filter steps (b), the $y_{i}^{(j)}$ are examples from the previous prediction set $\mathcal{C}_{(s-1)}(x_{i})$, ordered according to sub_sample.
Refer to caption: x2.png

For calibration, we split the i.i.d. calibration data $\{(x_{i},y_{i}^{t})\}_{i=1}^{n}$ into three non-overlapping subsets:

$$ $\left\{(x_{i},y_{i}^{t})\right\}_{i=1}^{n_{(0)}},\,\left\{(x_{i},y_{i}^{t}) \right\}_{i=n_{(0)}}^{n_{(1)}},\,\left\{(x_{i},y_{i}^{t})\right\}_{i=n_{(1)}}^ {n_{(2)}},$ $$

where $n_{(2)}=n$. This step is paramount, since otherwise, the admissibility controls in 7 are not independent. The calibration happens sequentially ($s=0,1,2$), similarly to the prediction step, where calibration for $\lambda_{(s)}$ is performed using $\left\{(x_{i},y_{i}^{t})\right\}_{i=n_{(s-1)}}^{n_{(s)}}$. We now proceed to explain the algorithmic implementation of the generation and filter calibration, displayed in Alg. 2 and Alg. 3.

##### Generation Calibration ( Alg. 2 ).

As outlined (§ 4), for each $x_{i}$, we generate i.i.d. samples $y_{i}^{(j)}$ from $G\,|\,x_{i}$, until the first $y_{i}^{(j)}$ is admissible (Alg. 2). The resulting non-conformity values $\nu_{i}$ are then used to calibrate $\lambda_{(0)}$. In practice, we typically need to limit the maximum amount of samples drawn by $\texttt{max}\in\mathbb{N}$ (Alg. 2) to tackle “hard” cases, i.e., examples $(x_{i},y_{i}^{t})$ where the generative model is unable to generate an admissible prediction. For these examples, we cannot generate finite non-conformity values and set these values to $\infty$ (Alg. 2). Provided that such examples occur infrequently, the conformal quantile $\lambda^{\ast}_{(0)}$ 6 is not affected. Otherwise, SCOPE-Gen rejects the calibration(^4^44which amounts to returning the entire output space $\mathcal{Y}$.), as common for methods in the field of risk control (e.g., Angelopoulos et al. ()).

##### Filter Calibration ( Alg. 3 ).

The calibration of $\lambda_{(s)},\;s>0$ is analagous to the calibration of the generation step (Alg. 2). However, we see from the factorization in 7 that filter steps must be calibrated on the condition that the prediction set of the previous step is admissible ($A(\mathcal{C}_{\lambda_{(s-1)}})=1)$). Thus, we require sampling from the distribution with density

$$ $P(\mathcal{C}_{(s-1)}\,|\,A(\mathcal{C}_{(s-1)})=1)\propto\mathbbm{1}\{A( \mathcal{C}_{(s-1)})=1\}P(\mathcal{C}_{(s-1)}),$ (11) $$

where $P(\mathcal{C}_{(s-1)})$ denotes the density of the prediction set $\mathcal{C}_{(s-1)}$ as calibrated in the earlier step $s-1$. In practice, we sample from 11 through the acceptance-rejection method. To this end, we first sample a prediction set for $s-1$ (Alg. 3). Instead of assessing its admissibility right away (leading to $|\mathcal{C}_{(s-1)}|$ admissibility checks), we can be more efficient by integrating these checks into the evaluation of the non-conformity value $\nu_{i}$. Specifically, we gradually add samples to $\mathcal{C}_{(s)}$ using $\texttt{sub_sample}_{(s)}$ (Alg. 3). Once an admissible example is encountered, no more checks need to be performed because we know that $\mathcal{C}_{(s-1)}$ is admissible. If $\mathcal{C}_{(s-1)}$ is inadmissible, the sub-sampling is repeated until there are no more samples to add, i.e., $|\mathcal{C}_{(s)}|=|\mathcal{C}_{(s-1)}|$ (Alg. 3). In this case, no non-conformity value is generated (Alg. 3).

For all calibration steps, we thus only require to perform repeated sampling until the first admissible example is encountered, as visualized in Fig. 2.

Figure: Algorithm 2 calibrate_generation

### 5 Experiments

We compare our method against prior work and derived baselines to empirically demonstrate the advantages of SCOPE-Gen on real-world natural language tasks and a molecular generation task. As the motivation of the present work lies in sample efficiency, we generally focus on small calibration sets. The experiments in the main text consider the sum non-conformity measure with $\gamma=0.5$ 10. We show qualitative evaluations in App. F, further quantitative evaluations in § E.2 and an analysis of empirically achieved admissibility 3 in § E.1.

We compare our method against conformal language modeling (CLM; Quach et al. ()) and a baseline derived from it. CLM controls a different notion of admissibility than we do. Specifically, CLM controls

$$ $\mathbb{P}\left[\mathbb{P}\left(A(\mathcal{C}_{\bm{\lambda}})=1\,|\,D_{\text{ cal}}\right)\geq 1-\beta_{(1)}\right]\geq 1-\beta_{(2)},$ (12) $$

where $D_{\text{cal}}$ is shorthand for the calibration data $\{(x_{i},y_{i}^{t})\}_{i=1}^{n}$. We note that 12 controls admissibility 1 at level $\alpha$ if $\alpha=\beta_{(1)}+\beta_{(2)}-\beta_{(1)}\beta_{(2)}$ (we show this in App. B). In order to tighten the gap, we perform a grid search over combinations of $\beta_{(1)}$ and $\beta_{(2)}$ that correspond to $\alpha$ and choose the configuration that minimizes admissibility (more details in § C.3). We do this for each experiment separately and compare the optimal configuration to our method at level $\alpha$.

##### Metrics.

1) # Queries ($\downarrow$): Number of required queries to the admission function during calibration. 2) Time ($\downarrow$): Runtime (in seconds) for an entire calibration, excluding preprocessing (such as splitting data). 3) Set Size ($\downarrow$): Size of the final prediction set. 4) Frac. Reject ($\downarrow$): The fraction of rejected calibrations. For SCOPE-Gen, this can occur if the conformal quantile 6 is not finite (§ 4.2). For CLM, this occurs if the null hypothesis cannot be rejected even once.

##### Baselines.

1) CLM: Conformal Language Modeling (Quach et al., ). 2) CLM reduced max: This baseline assesses how CLM performs if we enforce a lower amount of admissibility checks during calibration by limiting max. Specifically, we choose $\texttt{max}=10$ as limit. 3) SCOPE-Gen gen.-only: We only perform SCOPE-Gen using the generation stage and do not apply any filters. 4) SCOPE-Gen flipped: We apply the quality filter first and the diversity filter second (§ 4.1; assessed when both filters are used). We present baselines 3) and 4) in the additional experiments (App. E).

#### 5.1 Setup

For sake of demonstration, all experiments shown here use automated admission functions. We leave experiments that involve admissibility checks made by human domain experts for future work. We only provide a general description in the main text and refer to § D.1 for details regarding the setup and § D.2 for illustrative examples of each task.

##### Natural Language Generation.

For all tasks, the default prediction upper bound is chosen as $\texttt{max}=20$. We adopt three tasks from Quach et al. () related to natural language generation. 1) TriviaQA (Joshi et al., ): Open-domain question answering using LLama-2 (7B) (Touvron et al., ), without fine-tuning. An answer $y$ is admissible if it exactly matches one of the ground truth answers $y^{t}$. 2) MIMIC-CXR (Johnson et al., ): Radiology report generation using a pre-trained vision transformer (Dosovitskiy, ) and GPT2-small (Radford et al., ). Admissibility is assessed using soft CheXbert labels (Smit et al., ). 3) CNN/DM (Hermann et al., ): News article summarization. A fine-tuned T5-XL model (Raffel et al., ) is used and its outputs are compared to manually generated summaries. Admissibility is assessed via ROUGE-L (Lin, ).

##### Molecular Graph Extension.

We use DiGress (Vignac et al., ), a discrete diffusion model for molecular graph generation that was trained on the MOSES data set (Polykovskiy et al., ), which consists of 1,936,962 drug-like compounds. We use a molecule $y^{t}$ from the calibration set and remove a single atom at random (subject to validity), leading to an “incomplete” compound $x$. We then condition DiGress on $x$ via masking to generate single-atom extensions $y$. An extension $y$ is considered admissible (i.e., $a(y,y^{t})=1$ 2) if it exactly matches $y^{t}$. For this experiment, we only apply a quality filter, where the quality function $q$ corresponds to the quantitative estimate of drug-likeness (QED; Bickerton et al. ()). The prediction upper bound is chosen as $\texttt{max}=40$.

#### 5.2 Results

SCOPE-Gen consistently outperforms CLM in terms of amount of admissibility checks (# Queries) and runtime (Time), as can be seen in Tab. 1. For instance, on MIMIC-CXR, SCOPE-Gen requires only $\frac{4.21}{20}\approx 21\%$ of the admissibility queries required for CLM. The “CLM reduced max” baseline demonstrates that counteracting this disadvantage by reducing the maximum sample size max comes at a high price to pay: The amount of rejected calibrations increases greatly (e.g., $81.7\%$ on MIMIC-CXR), while still being far from SCOPE-Gen in terms of performance. This decreased performance is due to the fact that the admissibility guarantee in CLM holds for this specified max parameter, also during inference. In the inference phase, however, an upper bound on the prediction set size is often irrelevant, because no more admissibility checks must be performed. In addition, SCOPE-Gen consistently generates smaller prediction sets when the count or sum non-conformity updates are chosen (see 10). The only setting where CLM outperforms SCOPE-Gen in terms of prediction set size is for the max baseline, but not across all experiments (shown in App. E).

**Table 1: Quantitative Evaluations. All metrics $\pm$ standard deviation of the different baselines from $300$ repeated evaluations. For each evaluation, we first sub-sample a calibration set of size $n=600$ and calibrate each method at coverage level $\alpha=0.3$ with sum non-conformity 10. Then, we take means for each metric on a test set of size $300$, sampled from the remaining data. Best is bold.**
| Method | Metric | TriviaQA | MIMIC-CXR | CNN/DM | Molecules |
| --- | --- | --- | --- | --- | --- |
| CLM | # Queries | $6.570\pm 0.210$ | $20.000\pm 0.000$ | $20.000\pm 0.000$ | $19.280\pm 0.223$ |
| Time | $2.710\pm 0.019$ | $113.677\pm 10.891$ | $105.907\pm 13.137$ | $15.853\pm 1.441$ |  |
| Set Size | $2.011\pm 0.388$ | $14.434\pm 2.229$ | $6.720\pm 2.244$ | $17.448\pm 3.645$ |  |
| Frac. Reject | $\bf{0.000}\pm 0.000$ | $0.240\pm 0.000$ | $\bf{0.023}\pm 0.000$ | $\bf{0.097}\pm 0.000$ |  |
| CLM reduced max | # Queries | $4.187\pm 0.106$ | $10.000\pm 0.000$ | $10.000\pm 0.000$ | $\bf{7.109}\pm 0.069$ |
| Time | $0.971\pm 0.012$ | $26.336\pm 1.615$ | $26.996\pm 1.354$ | $-$ |  |
| Set Size | $2.463\pm 0.776$ | $16.226\pm 1.790$ | $6.190\pm 1.792$ | $-$ |  |
| Frac. Reject | $0.020\pm 0.000$ | ${\color[rgb]{1,0,0}\definecolor[named]{pgfstrokecolor}{rgb}{1,0,0}0.817}\pm 0.<br>000$ | ${\color[rgb]{1,0,0}\definecolor[named]{pgfstrokecolor}{rgb}{1,0,0}0.207}\pm 0.<br>000$ | $1.000\pm 0.000$ |  |
| SCOPE-Gen | # Queries | $\bf{2.910}\pm 0.229$ | $\bf{4.214}\pm 1.011$ | $\bf{3.456}\pm 0.478$ | $8.606\pm 0.594$ |
| Time | $\bf{0.026}\pm 0.001$ | $\bf{0.072}\pm 0.030$ | $\bf{0.061}\pm 0.013$ | $\bf{0.093}\pm 0.002$ |  |
| Set Size | $\bf{1.202}\pm 0.164$ | $\bf{7.390}\pm 1.856$ | $\bf{3.669}\pm 0.910$ | $\bf{9.409}\pm 1.099$ |  |
| Frac. Reject | $\bf{0.000}\pm 0.000$ | $\bf{0.203}\pm 0.000$ | $0.057\pm 0.000$ | $\bf{0.097}\pm 0.000$ |  |

### 6 Related Work

Conformal prediction and the more general field known as distribution-free risk control have motivated a plethora of developments related to various aspects such as causality (Lei & Candès, ; Schröder et al., ), non-exchangeable data (Barber et al., ; Angelopoulos et al., ; Oliveira et al., ), conditional coverage (Vovk, ; Lei & Wasserman, ; Cauchois et al., ; Deutschmann et al., ), and many others. The present work is also closely related to active learning (Settles, ), which employs an oracle-in-the-loop framework to reduce the number of queries made to the oracle. To reduce the scope of this section, we proceed to highlight advancements in the applications of risk control in the context of sequential filtering and generative models.

Risk Control and Sequential Filtering. Sequential (or iterative/cascading) filtering procedures are ubiquitous in the machine learning literature, as demonstrated by, e.g., Deng & Rush (); Lahmiri et al. (); Choi & Yang (). Among these, the method that most closely aligns with our approach is that of Fisch et al. (). Similarly to the present work, Fisch et al. () sequentially filter a set of candidate solutions in order to obtain a prediction set that controls admissibility 1. In contrast to the present work, Fisch et al. () consider a classification scenario where filtering is done via increasingly complex classifiers to an initially assumed admissible set of candidates. This assumption contrasts with our setting, where we derive the initial set from a generative model without assuming admissibility. Moreover, Fisch et al. () treat each candidate solution independently, disregarding the order of sampling within each filter stage, which contrasts with our greedy filters (§ 4.1). This is a critical limitation when pruning prediction sets from generative models, as Fisch et al. () cannot take similarities between outputs into account.

Risk Control for Generative Models. One line of work constructs confidence intervals for generative models in the pixel space of images (Horwitz & Hoshen, ; Teneggi et al., ). These studies focus on image-to-image tasks, such as denoising, where upper and lower uncertainty bounds of conformal prediction intervals on the target image can be visualized well. Conformal prediction has also been applied to planning with diffusion models by utilizing conformal prediction for the reward estimate (Sun et al., ). Other applications include density estimation (Diamant et al., ) and detection of adversarial examples (Cai et al., ). Wang et al. () use generative models to create conformal prediction sets by determining a radius of a ball around each sample such that the union over all balls controls coverage. In contrast to our approach, the method proposed by Wang et al. () is not suitable for non-Euclidean or high-dimensional data. Another work uses normalizing flows to approximate conditional coverage for regression (Colombo, ).

Works other than the one by Quach et al. () that target language generation with a different scope to ours include the approach by Ulmer et al. () who consider language modeling for non-exchangeable data and  Gui et al. () who focus on conformal alignment of language models.

### 7 Discussion & Limitations

##### Data Splitting.

SCOPE-Gen partitions calibration data across the prediction steps to control the factors of the Markov chain 7. However, this segmentation leads to increased variance and looser conformal prediction sets due to reduced calibration set sizes at each step. A promising alternative could involve controlling the total risk through family-wise error rate control (Benjamini & Braun, ). This approach could be particularly advantageous when combined with our sequential filtering strategy, which only requires accounting for $K$ distinct tests rather than the $g^{K}$ tests required by the method of Quach et al. () (where $K$ is the amount of calibration parameters and $g$ is the amount of points on a parameter grid required for CLM).

##### Conformal Prediction vs. Learn-then-Test.

In general, the learn-then-test framework is more flexible than conformal prediction as it does not require assumptions of monotonicity or uni-dimensional calibration parameters. Nonetheless, the present work demonstrates that reformulating the given problem into multiple conformal prediction problems has benefits (as shown experimentally § 5). In addition, the intuitive admissibility guarantee of conformal prediction 1 requires specification of a single parameter only, in comparison to the complex two-parameter guarantee of learn-then-test 12. While the latter guarantee bounds the conformal admissibility guarantee, we note that the optimization strategy employed in our experiments (see § 5) would in practice have to be conducted on a separate data set (due to data contamination), leading to decreased sample efficiency.

### 8 Conclusion

In the present work, we introduced SCOPE-Gen, a sample-efficient conformal prediction method for generative models. This method sequentially prunes an initial prediction set from a generative model using greedy filters, allowing the total admissibility to factorize as a Markov chain. Consequently, each pruning step can be calibrated separately. Experimentally, SCOPE-Gen has shown to require fewer queries of an admissibility function to maintain control over the total admissibility at a desired level, compared to prior work. This efficiency is particularly valuable in domains where admissibility assessments are costly, such as those requiring evaluations by human domain experts. We hope that our work inspires further research in risk control for generative models, with a focus on integrating application-specific constraints and desiderata, such as sample efficiency.

### 9 Reproducibility Statement

Our anonymized source code is available in the supplementary material. Detailed instructions for reproducing all experiments are provided in the README.md file at the top level of the code directory. All parameters for running the experiments can be found in the config folders within the script folders of each experiment folder. In addition, we will release our code on GitHub upon acceptance of our manuscript.

## Appendix

### Appendix A Relationship between Risk Control and Admissibility Control

Conformal risk control (Angelopoulos et al., ) considers the generation of a prediction set $\mathcal{C}_{\bm{\lambda}}$ with calibration parameters $\bm{\lambda}$ computed from a labeled i.i.d. calibration set $\{(X_{i},Y_{i})\}_{i=1}^{n}$, a new input/condition $X_{n+1}$ with label $Y_{n+1}$ and a loss function $l$. The desired property of interest for $\mathcal{C}_{\bm{\lambda}}$ is called risk control, defined as

$$ $\mathbb{E}[l(\mathcal{C}_{\bm{\lambda}}(X_{n+1}),Y^{t}_{n+1})]<\alpha,$ (13) $$

where $\alpha>0$. A classic example is the coverage loss $l(\mathcal{C}_{\bm{\lambda}}(x),y^{t})=\mathbbm{1}\{y^{t}\notin\mathcal{C}_{
\bm{\lambda}}(x)\}$ (Vovk et al., ), which gives 13 the simple interpretation that $\mathcal{C}_{\bm{\lambda}}(X_{n+1})$ contains $Y_{n+1}$ with probability $\geq 1-\alpha$. In the present work, we consider the loss

$$ $l(\mathcal{C}_{\bm{\lambda}}(x),y^{t})\,=\,\mathbbm{1}\{\nexists y\in\mathcal{ C}_{\bm{\lambda}}(x)\,:\,a(y,y^{t})=1\}.$ (14) $$

When inserting 14 into 13, our definition of admissibility control 1 arises naturally:

$$ $\displaystyle\mathbb{E}[\mathbbm{1}\{\nexists Y\in\mathcal{C}_{\bm{\lambda}}(X _{n+1})\,:\,a(Y,Y^{t}_{n+1})=1\}]<\alpha$ $\displaystyle\iff$ $\displaystyle\mathbb{E}[\mathbbm{1}\{\exists Y\in\mathcal{C}_{\bm{\lambda}}(X_ {n+1})\,:\,a(Y,Y^{t}_{n+1})=1\}]\geq 1-\alpha$ $\displaystyle\iff$ $\displaystyle\mathbb{P}(\exists Y\in\mathcal{C}_{\bm{\lambda}}(X_{n+1}):a(Y,\, Y_{n+1}^{t})=1)\geq 1-\alpha.$ $$

### Appendix B Bounding Conformal Admissibility by Learn-then-Test Admissibility

###### Proof.

Let $\beta_{(1)}\in(0,1)$ and $\beta_{(2)}\in(0,1)$ be chosen arbitrarily, such that $\beta_{(1)}+\beta_{(2)}-\beta_{(1)}\beta_{(2)}=\alpha$. We further suppose that the learn-then-test guarantee

$$ $\mathbb{P}\left[\mathbb{P}\left(A(\mathcal{C}_{\bm{\lambda}})=1\,|\,D_{\text{ cal}}\right)\geq 1-\beta_{(1)}\right]\geq 1-\beta_{(2)}$ (15) $$

is satisfied. We now show that the admissibility is bounded from below as

$$ $\mathbb{E}[\mathbbm{1}\{A(\mathcal{C}_{\bm{\lambda}})=1\}]\geq 1-\alpha.$ $$

To this end, we observe that the admissibility

$$ $\mathbb{E}\left[\mathbbm{1}\{A(\mathcal{C}_{\bm{\lambda}})=1\}\right]\;=\; \mathbb{E}\left[\mathbb{P}\left[A(\mathcal{C}_{\bm{\lambda}})=1\,|\,D_{\text{ cal}}\right]\right]$ $$

can be split into two parts

$$ $\displaystyle\mathbb{E}\left[\mathbbm{1}\{\mathbb{P}\left[A(\mathcal{C}_{\bm{ \lambda}})=1|D_{\text{cal}}\right]\geq 1-\beta_{(1)}\}\mathbb{P}\left[A( \mathcal{C}_{\bm{\lambda}})=1\,|\,D_{\text{cal}}\right]\right]\;+$ (16) $\displaystyle\mathbb{E}\left[\mathbbm{1}\{\mathbb{P}\left[A(\mathcal{C}_{\bm{ \lambda}})=1|D_{\text{cal}}\right]<1-\beta_{(1)}\}\mathbb{P}\left[A(\mathcal{C }_{\bm{\lambda}})=1\,|\,D_{\text{cal}}\right]\right].$ (17) $$

We note that 17 is bounded from below by 0 0. We further bound 16 as follows

$$ $\displaystyle\mathbb{E}\left[\mathbbm{1}\{\mathbb{P}\left[A(\mathcal{C}_{\bm{ \lambda}})=1|D_{\text{cal}}\right]\geq 1-\beta_{(1)}\}\mathbb{P}\left[A( \mathcal{C}_{\bm{\lambda}})=1\,|\,D_{\text{cal}}\right]\right]$ $\displaystyle\geq\;$ $\displaystyle(1-\beta_{(1)})\cdot\mathbb{P}\left[\mathbb{P}\left[A(\mathcal{C} _{\bm{\lambda}})=1\,|\,D_{\text{cal}}\right]\geq 1-\beta_{(1)}\right]$ $\displaystyle\geq\;$ $\displaystyle(1-\beta_{(1)})\cdot(1-\beta_{(2)}),$ $$

where the last inequality holds by the learn-then-test guarantee 15.
∎

###### Proof.

### Appendix C Implementation Details

#### C.1 Choice of the Individual Admissibility Levels

The most straightforward choice is to equally distribute the risk among prediction steps, resulting in

$$ $\alpha_{(s)}\;=\;1-(1-\alpha)^{1/K},$ (18) $$

where $K$ is the amount of prediction steps (typically, $K=3$). We note that 18 is somewhat analagous to a Bonferroni correction in that it also equally distributes a correction. In practice, when working with a upper bound on the sample size max (outlined in § 4.2), however, lower admissibility levels can often be attained by different choice of $\alpha_{(s)}$. Specifically, we choose a larger risk level for the generation step ($s=0$) and distribute the remaining risk equally among the other step(s) ($s>0$). Specifically, we choose

$$ $\alpha_{(0)}=1-(1-\alpha)^{(M-1)/M}$ $$

and

$$ $\alpha_{(s)}=1-(1-\alpha)^{1/(M(K-1))},\;\forall s>0.$ $$

For all experiments (§ 5), we choose $M=5$.

#### C.2 Distance Upper Bound

All distance functions in the present work are derived from text-based similarity functions such as ROUGE (Lin, ). Such metrics typically range from 0 0 to $1$ and we can convert them to distance functions simply by negating them (such that they range from $-1$ to 0 0). Thus, for such metrics, we obtain a distance lower bound by choosing $d_{\text{max}}=-1$. If $d$ is not bounded, we can turn it into a bounded distance $\tilde{d}$, for example by taking

$$ $\tilde{d}(y,y^{\prime})\coloneqq-\frac{1}{1+d(y,y^{\prime})},$ $$

assuming positivity of $d$.

#### C.3 Grid Specification for CLM

In general, we observe empirically that coverage is minimized when $\beta_{(2)}$ is much smaller than $\beta_{(1)}$ (usually for $\beta_{(2)}\approx\beta_{(1)}/10$). For a given $\alpha$, we set the grid over $\beta_{(2)}$, denoted as $\bm{\beta}_{(2)}$, by selecting 10 equidistant points between $\alpha/15$ and $\alpha/5$. This can be mathematically represented as follows:

$$ $\bm{\beta}_{(2)}=\left[\alpha/15+i\cdot\frac{\alpha/5-\alpha/15}{9}:i=0,1, \dots,9\right].$ $$

The corresponding values $\bm{\beta}_{(1)}$, accordingly are

$$ $\bm{\beta}_{(1)}=\left[\frac{1-\alpha-\bm{\beta}^{(i)}_{(2)}}{1-\bm{\beta}^{(i )}_{(2)}}:i=0,1,\dots,9\right].$ $$

### Appendix D Experimental Details

#### D.1 Setup Details

##### Natural Language Generation.

All of our experiments regarding natural language generation roughly follow the setup from (Quach et al., ). Thus, we only highlight differences to the setup considered there:

TriviaQA. We remove duplicates automatically rather than calibrating a parameter to do this, in order to improve statistical efficiency of both methods. For CLM, we set the diversity parameter $\lambda_{(2)}=0.5$ such that all duplicates are removed and for SCOPE-Gen, we use a fixed duplicate removal filter instead of a diversity filter at the end of the prediction pipeline.

MIMIC-CXR. We slightly modify the admissibility criterion due to insufficient implementation details available. Following the approach by Quach et al. (), which uses exact CheXbert prediction matches as labels, we obtain few admissible examples ($\approx 30\%$). To address this problem, we adjust the setup by extracting soft labels from the CheXbert model (using weights from the [original work](https://stanfordmedicine.app.box.com/s/c3stck6w6dol3h36grdc97xoydzxd7w9)). Specifically, we employ a labeling function based on the F1 score

$$ $\text{F1}\;\coloneqq\;\frac{2}{\text{recall}^{-1}+\text{precision}^{-1}},$ (19) $$

where both precision and recall are computed from 14 clinically relevant labels output by the CheXbert model. This F1 score aligns with the evaluation metric used in the original work by Smit et al. (). We consider a prediction admissible if $\text{F1}>0.6$, a manually chosen threshold. We compare all baselines using the predictions of this model.

##### Molecular Graph Extension.

The weights of the used DiGress model can be found on the official [GitHub page](https://github.com/cvignac/DiGress?tab=readme-ov-file). In order to condition the generated molecular graphs on a given substructure, we employ a form of masking in the reverse diffusion process (from noise to data distribution). This is similar to masking approaches in computer vision, such as the one proposed by Lugmayr et al. (). However, unlike Lugmayr et al. (), we mask the given graph structure directly (rather than applying noise to it) and do not repeat the reverse diffusion process multiple times.

Analagously to TriviaQA, we filter out duplicates automatically. In addition, we treat invalid predictions by setting their quality estimate to 0 0. Invalid molecules are molecules that cannot be represented in a valid resonance form according to Kekulé’s rules.

In order to check whether two molecules are identical (criterion for admissibility), we convert both molecules to their canonical SMILES representations and check whether these are identical.

#### D.2 Examples

We demonstrate one specific example per experiment, where we show both condition $x$ and ground truth output $y^{t}$.

TriviaQA: The condition $x$ is a question in natural language, the ground truth target $y^{t}$ is a short phrase in natural language (with multiple aliases that are all considered admissible).

CNN/DM: The condition $x$ is a lengthy news report in natural language, the ground truth target $y^{t}$ is a manually generated summary (in natural language) of $x$.

MIMIC-CXR: The condition $x$ is a anterior to posterior or posterior to anterior chest X-ray image (recorded from the front or from the back, but not from the side), including a text prompt in natural language, which contains all text prior to either the “FINDINGS”, “IMPRESSION” or “FINDINGS AND IMPRESSION” keyword of the ground truth report. The ground truth target $y^{t}$ is all text starting from the identified keyword.

Molecules: The condition $x$ is given as a valid scaffold (i.e. a subgraph that adheres to the grammar of valid molecules) that results as a random removal of a single atom (including all of its connections; highlighted in cyan) from a compound $y^{t}$ in the calibration set.

### Appendix E Additional Experiments

#### E.1 Admissibility Analysis

We demonstrate the empirical admissibility levels for the MIMIC-CXR experiment at admissibility level $\alpha=0.3$, varying calibration set size $n$ and the used non-conformity measure. The rest of the experimental setup is identical to the setup used for all other experiments (see caption of Tab. 1)

As shown in the histograms of Fig. 3, for all non-conformity measures, the admissibility achieved by SCOPE-Gen (blue) is slightly conservative for low sample sizes and converges to the desired level as the calibration set size $n$ is increased from $300$ to $1200$. This is similar for CLM (orange), where the achieved admissibility (using the optimization strategy described in § 5) also becomes less conservative for large sample sizes. However, in contrast to SCOPE-Gen, CLM is generally more conservative. In addition, this conservativeness is highly influenced by the choice of non-conformity measure: While the CLM gap becomes tighter for the max and sum non-conformities, this is not the case for the count non-conformity, where a large gap persists even for $n=1200$.

A further observation is that SCOPE-Gen tends to reject far fewer calibration sets at small calibration set size ($n=300$). This can be seen from the bars at coverage $1.$, which indicate calibration sets that are rejected (rejecting a calibration set amounts to returning the entire output space $\mathcal{Y}$ (see § 2), which results in a $100\%$ admissibility). We see that the blue bar (SCOPE-Gen) tends to be smaller than the orange bar (CLM).

Figure: Figure 3: Admissibility Analysis for MIMIC-CXR. For all non-conformity scores, SCOPE-Gen (blue) becomes less conservative with respect to the desired admissibility level $1-\alpha$ (red dashed line) as the amount of calibration samples $n$ increases, as typical for methods based on conformal prediction. For CLM (orange), in contrast, conservativeness depends much on the chosen non-conformity measure.
Refer to caption: x7.png

#### E.2 Further Quantitative Evaluations

We demonstrate further experiments that showcase the performance for the different non-conformity measures (count and max ($\gamma=0.3$) in addition to sum ($\gamma=0.5$); see 10), including two more baselines (baselines 3) and 4) introduced in § 5).

We see in LABEL:tab:performance_further that typically either SCOPE-Gen or one of its ablations performs best in terms of the considered evaluation metrics. An exception occurs on the CNN/DM and Molecules experiment when the max non-conformity is used, where CLM performs best in terms of prediction set size (for CNN/DM, $2.751$ compared to $3.872$ achieved by “SCOPE-Gen gen. only”). Another noteworthy observation is that in some experiments, “SCOPE-Gen gen. only” generates the smallest prediction sets. For instance, on MIMIC-CXR, “SCOPE-Gen gen. only” achieves a mean set size of $6.003$ for the sum non-conformity in comparison to $7.390$ when using SCOPE-Gen with both filters. However, “SCOPE-Gen gen. only” is consistently more expensive in terms of admissibility queries than the standard version SCOPE-Gen, by a considerable gap. This can be explained by the fact that the filters require admissibility checks in a different order than the generation step, during calibration (visualized in Fig. 2). For instance, the quality filter orders the different examples from the previous prediction set according to their estimated quality. Typically, outputs with high quality estimates are also more likely to be admissible (we recall that we do not need to keep sampling beyond the first admissible example § 4.2). This lies in contrast to the order of samples considered in the calibration of the generation parameter, where such an ordering is not performed.

**Table 2: Further Quantitative Evaluations. See Tab. 1 for experimental setup. Best is bold.**
| Method | Metric | TriviaQA | MIMIC-CXR | CNN/DM | Molecules |
| --- | --- | --- | --- | --- | --- |
| Non-Conformity: sum |  |  |  |  |  |
| CLM | # Queries | $6.570\pm 0.210$ | $20.000\pm 0.000$ | $20.000\pm 0.000$ | $19.280\pm 0.223$ |
| Time | $2.710\pm 0.019$ | $113.677\pm 10.891$ | $105.907\pm 13.137$ | $15.853\pm 1.441$ |  |
| Set Size | $2.011\pm 0.388$ | $14.434\pm 2.229$ | $6.720\pm 2.244$ | $17.448\pm 3.645$ |  |
| Frac. Reject | $\bf{0.000}\pm 0.000$ | $0.240\pm 0.000$ | $0.023\pm 0.000$ | $0.097\pm 0.000$ |  |
| CLM reduced max | # Queries | $4.187\pm 0.106$ | $10.000\pm 0.000$ | $10.000\pm 0.000$ | $\bf{7.109}\pm 0.069$ |
| Time | $0.971\pm 0.012$ | $26.336\pm 1.615$ | $26.996\pm 1.354$ | $-$ |  |
| Set Size | $2.463\pm 0.776$ | $16.226\pm 1.790$ | $6.190\pm 1.792$ | $-$ |  |
| Frac. Reject | $0.020\pm 0.000$ | $0.817\pm 0.000$ | $0.207\pm 0.000$ | $1.000\pm 0.000$ |  |
| SCOPE-Gen gen. only | # Queries | $3.611\pm 0.166$ | $6.518\pm 0.310$ | $5.525\pm 0.297$ | $9.888\pm 0.412$ |
| Time | $\bf{0.005}\pm 0.000$ | $\bf{0.004}\pm 0.000$ | $\bf{0.004}\pm 0.001$ | $\bf{0.005}\pm 0.000$ |  |
| Set Size | $2.050\pm 0.184$ | $\bf{6.003}\pm 1.040$ | $\bf{3.302}\pm 0.579$ | $10.038\pm 0.984$ |  |
| Frac. Reject | $\bf{0.000}\pm 0.000$ | $\bf{0.000}\pm 0.000$ | $\bf{0.000}\pm 0.000$ | $\bf{0.000}\pm 0.000$ |  |
| SCOPE-Gen | # Queries | $\bf{2.910}\pm 0.229$ | $\bf{4.214}\pm 1.011$ | $\bf{3.456}\pm 0.478$ | $8.606\pm 0.594$ |
| Time | $0.026\pm 0.001$ | $0.072\pm 0.030$ | $0.061\pm 0.013$ | $0.093\pm 0.002$ |  |
| Set Size | $\bf{1.202}\pm 0.164$ | $7.390\pm 1.856$ | $3.669\pm 0.910$ | $\bf{9.409}\pm 1.099$ |  |
| Frac. Reject | $\bf{0.000}\pm 0.000$ | $0.203\pm 0.000$ | $0.057\pm 0.000$ | $0.097\pm 0.000$ |  |
| SCOPE-Gen flipped | # Queries | $-$ | $4.581\pm 1.121$ | $3.530\pm 0.531$ | $-$ |
| Time | $-$ | $0.048\pm 0.013$ | $0.044\pm 0.005$ | $-$ |  |
| Set Size | $-$ | $7.848\pm 1.976$ | $3.635\pm 0.924$ | $-$ |  |
| Frac. Reject | $-$ | $0.193\pm 0.000$ | $0.033\pm 0.000$ | $-$ |  |
| Non-Conformity: count |  |  |  |  |  |
| CLM | # Queries | $6.581\pm 0.210$ | $20.000\pm 0.000$ | $20.000\pm 0.000$ | $19.263\pm 0.217$ |
| Time | $2.260\pm 0.015$ | $90.593\pm 7.089$ | $84.864\pm 9.882$ | $16.118\pm 3.096$ |  |
| Set Size | $3.912\pm 1.104$ | $18.221\pm 1.616$ | $15.762\pm 3.265$ | $23.209\pm 3.153$ |  |
| Frac. Reject | $\bf{0.000}\pm 0.000$ | $0.213\pm 0.000$ | $0.020\pm 0.000$ | $0.087\pm 0.000$ |  |
| CLM reduced max | # Queries | $4.203\pm 0.109$ | $10.000\pm 0.000$ | $10.000\pm 0.000$ | $\bf{7.117}\pm 0.067$ |
| Time | $0.465\pm 0.007$ | $10.922\pm 0.325$ | $10.011\pm 0.332$ | $-$ |  |
| Set Size | $3.660\pm 0.880$ | $17.822\pm 1.462$ | $12.530\pm 3.353$ | $-$ |  |
| Frac. Reject | $0.043\pm 0.000$ | $0.800\pm 0.000$ | $0.190\pm 0.000$ | $1.000\pm 0.000$ |  |
| SCOPE-Gen | # Queries | $\bf{2.879}\pm 0.223$ | $\bf{4.466}\pm 1.038$ | $\bf{3.514}\pm 0.489$ | $8.530\pm 0.584$ |
| Time | $0.010\pm 0.000$ | $0.059\pm 0.033$ | $0.044\pm 0.016$ | $0.012\pm 0.001$ |  |
| Set Size | $\bf{1.255}\pm 0.169$ | $7.866\pm 1.909$ | $\bf{3.850}\pm 1.014$ | $\bf{9.853}\pm 1.268$ |  |
| Frac. Reject | $\bf{0.000}\pm 0.000$ | $0.163\pm 0.000$ | $0.027\pm 0.000$ | $\bf{0.000}\pm 0.000$ |  |
| SCOPE-Gen gen. only | # Queries | $3.611\pm 0.166$ | $6.518\pm 0.310$ | $5.525\pm 0.297$ | $9.888\pm 0.412$ |
| Time | $\bf{0.004}\pm 0.000$ | $\bf{0.004}\pm 0.000$ | $\bf{0.004}\pm 0.001$ | $\bf{0.004}\pm 0.001$ |  |
| Set Size | $2.106\pm 0.236$ | $\bf{6.693}\pm 1.083$ | $3.927\pm 0.731$ | $10.049\pm 0.969$ |  |
| Frac. Reject | $\bf{0.000}\pm 0.000$ | $\bf{0.000}\pm 0.000$ | $\bf{0.000}\pm 0.000$ | $\bf{0.000}\pm 0.000$ |  |
| SCOPE-Gen flipped | # Queries |  | $4.760\pm 1.160$ | $3.670\pm 0.570$ | $-$ |
| Time |  | $0.029\pm 0.013$ | $0.025\pm 0.006$ | $-$ |  |
| Set Size |  | $7.744\pm 2.025$ | $3.945\pm 0.995$ | $-$ |  |
| Frac. Reject | $-$ | $0.143\pm 0.000$ | $0.023\pm 0.000$ | $-$ |  |
| Non-Conformity: max |  |  |  |  |  |
| CLM | # Queries | $6.567\pm 0.196$ | $20.000\pm 0.000$ | $20.000\pm 0.000$ | $19.286\pm 0.230$ |
| Time | $2.782\pm 0.024$ | $113.662\pm 13.219$ | $106.804\pm 11.690$ | $15.086\pm 0.972$ |  |
| Set Size | $1.787\pm 0.330$ | $14.143\pm 1.998$ | $\bf{2.751}\pm 0.596$ | $\bf{2.264}\pm 1.258$ |  |
| Frac. Reject | $\bf{0.000}\pm 0.000$ | $0.223\pm 0.000$ | $0.027\pm 0.000$ | $0.080\pm 0.000$ |  |
| CLM reduced max | # Queries | $4.209\pm 0.117$ | $10.000\pm 0.000$ | $10.000\pm 0.000$ | $\bf{7.108}\pm 0.070$ |
| Time | $0.975\pm 0.010$ | $26.193\pm 1.702$ | $26.740\pm 1.540$ | $-$ |  |
| Set Size | $2.212\pm 0.662$ | $15.756\pm 2.014$ | $3.192\pm 0.692$ | $-$ |  |
| Frac. Reject | $0.033\pm 0.000$ | $0.823\pm 0.000$ | $0.223\pm 0.000$ | $1.000\pm 0.000$ |  |
| SCOPE-Gen | # Queries | $\bf{3.054}\pm 0.171$ | $\bf{4.176}\pm 1.006$ | $\bf{3.478}\pm 0.474$ | $8.510\pm 0.590$ |
| Time | $0.024\pm 0.001$ | $0.071\pm 0.031$ | $0.059\pm 0.013$ | $0.076\pm 0.002$ |  |
| Set Size | $\bf{1.351}\pm 0.143$ | $7.525\pm 1.922$ | $3.892\pm 0.960$ | $9.720\pm 1.283$ |  |
| Frac. Reject | $\bf{0.000}\pm 0.000$ | $0.230\pm 0.000$ | $0.043\pm 0.000$ | $\bf{0.000}\pm 0.000$ |  |
| SCOPE-Gen gen. only | # Queries | $3.611\pm 0.166$ | $6.518\pm 0.310$ | $5.525\pm 0.297$ | $9.888\pm 0.412$ |
| Time | $\bf{0.005}\pm 0.000$ | $\bf{0.004}\pm 0.000$ | $\bf{0.004}\pm 0.000$ | $\bf{0.005}\pm 0.000$ |  |
| Set Size | $3.061\pm 0.142$ | $\bf{6.549}\pm 0.987$ | $3.872\pm 0.497$ | $9.829\pm 0.964$ |  |
| Frac. Reject | $\bf{0.000}\pm 0.000$ | $\bf{0.000}\pm 0.000$ | $\bf{0.000}\pm 0.000$ | $\bf{0.000}\pm 0.000$ |  |
| SCOPE-Gen flipped | # Queries | $-$ | $4.395\pm 1.133$ | $3.629\pm 0.539$ | $-$ |
| Time | $-$ | $0.044\pm 0.013$ | $0.042\pm 0.005$ | $-$ |  |
| Set Size | $-$ | $7.460\pm 1.866$ | $3.955\pm 0.988$ | $-$ |  |
| Frac. Reject | $-$ | $0.220\pm 0.000$ | $0.033\pm 0.000$ | $-$ |  |

### Appendix F Qualitative Results

We show randomly chosen prediction sets from SCOPE-Gen in comparison to prediction sets generated by CLM. We demonstrate examples for TriviaQA and MIMIC-CXR.

#### F.1 TriviaQA

We calibrate both methods on a single (same) calibration set of size $1200$ and $\alpha=0.2$. Admissibility of an answer is denoted by the checkmark symbol ✓.

| Question | Prediction Set |  |
| --- | --- | --- |
|  | CLM | SCOPE-Gen |
|  |  |  |
| What former U.S. president is known for his staunch support of Habitat for Humanity? | {Jimmy Carter (✓)} | {Jimmy Carter (✓)} |
| What cat food “tastes so good, cats ask for it by name”? | {Friskies (✗), Sheba (✗), Whiskas (✗), Fancy Feast (✗), Felix (✗), Purina (✗)} | {Friskies (✗), Whiskas (✗), Fancy Feast (✗), Sheba (✗), Felix (✗)} |
| What is the name of the giraffe that Toys-r-us uses as its’ mascot? | {Geoffrey (✓), Geoffrey the Giraffe (✗), George (✗)} | {Geoffrey (✓)} |
| Where do you find the Bridal Veil, American, and Horseshoe Falls? | {Niagara Falls (✓), Niagara Falls, Canada (✓), Niagra Falls (✓), Niagara (✗)} | {Niagara Falls (✓), Niagara Falls, Canada (✓), Niagra Falls (✓)} |
| The worlds largest marketer of fruit juices, what is the juice arm of the Coca Cola company? | {Minute Maid (✓)} | {Minute Maid (✓)} |
| Whose backing band is known as The Miami Sound Machine? | {Gloria Estefan (✓), Gloria Estefan & Miami Sound Machine (✓), Gloria Estefan’s (✗), Gloria Estafan (✓)} | {Gloria Estefan (✓), Gloria Estefan & Miami Sound Machine (✓)} |
| With a motto of Always Ready, Always There, what US military branch had it’s founding on Dec 14, 1636? | {The Salvation Army (✗), US Marine Corps (✗), The Continental Army (✗), Marines (✗), The US Navy (✗), The National Guard (✓), The Coast Guard (✗), The Marine Corps (✗), The US Coast Guard (✗)} | {The National Guard (✓), The Coast Guard (✗), US Marine Corps (✗)} |
| Who tried to steal Christmas from the town of Whoville? | {The Grinch (✓)} | {The Grinch (✓)} |
| What is the name of the parson mentioned in the lyrics of the Christmas carol "Winter Wonderland"? | {Rev (✗), Father (✗), Frosty the Snowman (✗), Reverend Johnson (✗), Frosty (✗)} | {Father (✗), Rev (✗)} |
| In what outdoor sport, sanctioned by the NHPA, do you score 3 points for a ringer, 2 for a leaner, and the closet scores a point? | {Bocce (✗), Bowling (✗), Darts (✗), Ten-Pin Bowling (✗), Horseshoes (✓)} | {Bowling (✗), Darts (✗), Bocce (✗)} |

#### F.2 MIMIC-CXR

We demonstrate predictions sets for a single instance (study_id: 59999516, subject_id: 13541358), where we calibrate SCOPE-Gen and CLM on a single (same) calibration set of size $1200$ and $\alpha=0.35$. Admissibility of an answer is denoted by the checkmark symbol ✓. We remove all newline characters in the generated answers for improved readability. We stress that outputs of both methods are sets and have no internal order. We index answers for the purpose of obtaining identifiers for the different predictions.

|  |  |  |
| --- | --- | --- |
| Prompt |  |  |
| FINAL REPORT<br>EXAMINATION: CHEST (PORTABLE AP)<br>INDICATION: ___ year old woman with AMS of unclear cause, HCAP // Evaluate<br>interval change in RLL infiltrate Evaluate interval change in RLL<br>infiltrate<br>IMPRESSION: |  |  |
| Reference Report (“Ground Truth”) |  |  |
| Compared to prior chest radiographs ___ through ___.<br>New consolidation in the left lower lobe is accompanied by ipsilateral<br>mediastinal shift. Although that indicates a component of atelectasis, there<br>could be concurrent pneumonia in the left lower lobe particularly if patient<br>has aspirated. Right lung is clear. Heart size top-normal. Left pleural<br>effusion is presumed, but not large.<br>Left PIC line ends in the mid SVC. ET tube tip is one cm below optimal<br>placement with the chin down. Esophageal drainage tube ends in a nondistended<br>stomach. |  |  |
| SCOPE-Gen |  |  |
| Index | Generated | Admissible |
| 1 | Comparison to ___. The endotracheal tube has been slightly advanced. The tip of the device now projects approximately 5 cm above the carina. Mild retrocardiac atelectasis persists. Mild fluid overload but no overt pulmonary edema. No larger pleural effusions. Borderline size of the cardiac silhouette. The nasogastric tube has been removed. | ✓ |
| 2 | In comparison with the study of ___, the monitoring and support devices are essentially unchanged. Continued enlargement of the cardiac silhouette with pulmonary vascular congestion. Opacification at the left base is consistent with volume loss in the left lower lobe and probable small left pleural effusion. | ✓ |
| 3 | Compared to chest radiographs ___ through ___. Left lower lobe is still collapsed, either pneumonia or atelectasis. This could be the result of aspiration on ___ and subsequent development of lung abscess. Pleural effusion is minimal, if any. No pneumothorax. Heart is top-normal size. ET tube in standard placement. Nasogastric tube ends in the upper stomach. Left subclavian line ends in the upper right atrium. | ✗ |
| 4 | Tracheostomy is in place. Heart size and mediastinum are stable. Left lower lobe consolidation is present. Substantial left upper lobe atelectasis and more pronounced in the left perihilar region are unchanged. There is no pneumothorax. | ✓ |
| 5 | Comparison to ___. The lung volumes have increased, the areas of atelectasis, restricted to the left and right upper lobe continues to be minimally improved. Decrease in extent of a retrocardiac atelectasis. Signs of mild fluid overload but no overt pulmonary edema. . Stable size of the cardiac silhouette. | ✗ |
| CLM |  |  |
| Index | Report | Admissible |
| 1, 2, 3, 4, 5 | identical to 1, 2, 3, 4, 5 from SCOPE-Gen | see above |
| 6 | Compared to chest radiographs ___ through ___. ET tube, left PIC line, and upper enteric drainage tube all in standard<br>placements. Left lower lobe atelectasis unchanged, responsible for large leftward mediastinal shift. Mild cardiomegaly unchanged. Pulmonary vascular engorgement slightly improved since ___. Pleural effusions small if any. No evidence of pneumothorax. | ✓ |
| 7 | In comparison with the study of ___, there is little overall change except for increase in opacification at the left base consistent with some combination of pleural fluid and volume loss in the left lower lobe with underlying consolidations. The upper zone vessels are more prominent, consistent with greater vascular congestion. | ✓ |
| 8 | ET tube tip is 2 cm above the carinal. Left PICC line tip is at the level of mid SVC. NG tube tip passes below the diaphragm and most likely is in the stomach. Heart size and mediastinum are unchanged compared to previous study. The left upper lobe is collapsed. Small left pleural effusion is most likely present. | ✓ |
| 9 | Compared to chest radiographs ___ through ___. Previous mild to moderate pulmonary edema improved and left lower lobe atelectasis has decreased. Heart size top-normal unchanged. Pleural effusion small if any. No pneumothorax. ET tube, left PIC line, and esophageal drainage tubes are in standard positions. | ✓ |
| 10 | ET tube tip is 3.3 cm above the carinal. NG tube tip is in the stomach. Left PICC line tip is at the level of the mid to lower SVC. Hiatal hernia is still present. Since the prior study pulmonary vascular congestion has improved. Small amount of bilateral pleural effusion is more pronounced on the left than on the right, consistent with improved pulmonary vascular congestion. No pneumothorax is seen. | ✓ |
| 11 | In comparison with the study of ___, there is further increase in the opacification at the right base with silhouetting hemidiaphragm, consistent with worsening pneumonia or effusion or even pulmonary edema. Endotracheal tube has been removed. The left subclavian catheter again extends to about the level of the carina. | ✗ |
| 12 | ET tube tip is approximately 5 cm above the carinal pointing toward the right apex. NG tube tip is in the stomach. There is no pneumothorax. NOTIFICATION: The findings were discussed with ___, M.D. by ___<br>___, M.D. on the telephone on ___ at 10:07 AM, 2 minutes after discovery of the findings. | ✗ |
| 13 | Comparison to ___. The lung volumes have increased, the size of the cardiac silhouette is now at the upper range of normal, there has been development of a left basilar opacity. These abnormalities are visible with elevation of the left hemidiaphragm and the presence of small left pleural effusion. The right lung is moderately well inflated. No pleural effusions. No pneumonia. | ✗ |
| 14 | ET tube tip is 2.5 cm above the carinal. NG tube tip is in the stomach. Heart size is top-normal. Mediastinum is overall unremarkable with slight deviation of the left minor fissure to the left. There is no pneumothorax. | ✗ |
| 15 | No previous images. Endotracheal tube tip lies approximately 5 cm above the carina. Cardiomediastinal silhouette is within normal limits. Left pleural effusion with compressive basilar atelectasis, worse on the left, is essentially unchanged. | ✓ |
| 16 | Comparison to ___. There is minimally improved ventilation in the retrocardiac lung region. Otherwise the radiograph is unchanged. The patient has received an endotracheal tube and a nasogastric tube. | ✗ |
| 17 | ET tube tip is 3.5 cm above the carina. NG tube tip is in the stomach. There is left retrocardiac consolidation that could represent consolidation in the left lower lobe or infrahilar consolidation due to pneumonia. Followup radiograph is recommended. RECOMMENDATION(S): Followup radiograph is recommended. | ✗ |
| 18 | Compared to chest radiographs ___ through ___ at 07:47. Large left lower lobe pneumonia unchanged over several days. Pulmonary vascular congestion now appears mild. Heart size normal. No pneumothorax. ET tube in standard placement. Nasogastric drainage tube would need to be advanced at least 15 cm to move all the side ports into the stomach, if any. | ✗ |
| 19 | As compared to ___, no relevant change is seen. Improved ventilation of the left lower lobe. Unchanged size of the cardiac silhouette. | ✗ |

## Peer Reviews

confidence: 4
contribution: 3
initial_rating: 8
presentation: 3
questions: -- I might have missed it, but do at least a fraction of the experiments report some kind of human evaluation? I think to validate the method, at least some of it might be reasonable. While using another generative model (as a judge or to generate a calibration set) is popular, it still presents an incomplete analysis. 

-- The authors might also want to discuss the works on conditional language validity by Cherian https://arxiv.org/abs/2406.09714 and also the earlier work by Mohri and Hashimoto https://arxiv.org/abs/2402.10978. Further, there is also a literature on confidence scoring which is often used for fine-tuning and reducing hallucinations. e.g. Kuhn et al. https://arxiv.org/abs/2302.09664, Lin et al. https://arxiv.org/abs/2305.19187, Wang and Holmes https://web3.arxiv.org/abs/2406.05213. It would be useful to include a brief discussion of these and how conformal methods might be used to calibrate such scores. It would help to bridge the two somewhat separate lines of enquiry together.
soundness: 3
strengths: -- The paper is quite well-written and clear. Each of the steps are well-described and easy to follow. 

-- The method is novel along multiple axes: Wrappers generally make far more simplifying assumptions due to the intractability of conformal prediction directly in such settings; the admissibility control criteria and the connections to pareto methods are interesting and could provide straightforward avenues for future work.

-- While still compute intensive (since multiple generations are required), it could be tuned based on available data for some domain.
summary: This fairly well-explicated paper considers the following question of much recent interest: how could we obtain some semblance of guarantees for generative models' outputs i.e. in terms of factuality. This is related to the problem of hallucination control directly, since a method involving calibration for correctness could reduce hallucination if a suitable domain-specific calibration set were available. The approach of the paper is simple yet innovative. In a basic sense it does the following: In the first step, the method samples from the generative model conditioned on a fixed input. There is a calibration parameter that controls, based on a suitable non-conformity measure, that the generations contain at least one correct generation. Then, the generated set is pruned further using separate calibration parameters based on diversity and factuality considerations. Unlike some previous works, the sequential nature of the process permits the overall admissibility to be easily factorizable, permitting a direct application of conformal prediction proper. An interesting connection is also made to the pareto methods since there are multiple calibration parameters to be handled. The experiments report a general improvement datasets and are sufficient to demonstrate the applicability of the proposed method.
weaknesses: -- There are now a bunch of papers on using conformal wrappers for filtering long form generations by dividing them into segments and then scoring. I think it would have been great to evaluate on such tasks as well, as generally QA type tasks are a bit too easy.

-- Sampling multiple times and expecting a correct response can be quite compute-intensive.

---

confidence: 3
contribution: 2
initial_rating: 5
presentation: 3
questions: * The paper defines admissibility as including at least one (semantically) correct answer in the prediction set and aims to minimize the prediction set size while ensuring this inclusion. This is achieved by a “sub-sampling” technique, sampling answers based on a quality score ranking. Can the proposed method generalize to a broader admissibility definition, such as including multiple correct answers (e.g., 5 out of 10) or maximizing the fraction of correct answers? How would this method perform compared to baselines if the goal were to optimize the fraction of acceptable answers within a fixed prediction set size?
* How does the sequence of filtering stages (diversity vs. quality) impact performance? Why is diversity filtering prioritized in the proposed method?
soundness: 3
strengths: * This paper presents an efficient approach for generating prediction sets with admissibility guarantees by using a sequential generation and greedy filtering strategy.
* It reduces the number of admissibility checks during calibration compared to previous baselines, improving computational efficiency.
* Experimental results support the method’s effectiveness in reducing both query counts and prediction set sizes to meet admissibility criteria.
summary: The paper presents SCOPE-Gen, a sequential conformal prediction method designed to generate prediction sets that satisfy admissibility guarantees with high probability. The method operates in two main stages: a generation stage and a filtering stage. In the generation stage, i.i.d. samples are drawn from the generative model until a specified non-conformity measure (related to sample count or quality) surpasses a threshold set by calibration with ground-truth samples. In the filtering stage, the prediction set is refined in a greedy manner, optimizing for diversity and quality based on another threshold derived from calibration. To ensure admissibility, the approach leverages a Markov chain factorization for admissibility control, and calibration is conducted on independent, non-overlapping data subsets to enable this factorization. Experimental results demonstrate that SCOPE-Gen reduces both the number of queries to the admission function during calibration and the size of the prediction set needed to meet admissibility requirements, outperforming baseline methods like CLM.
weaknesses: * The paper lacks a theoretical analysis detailing how effectively the proposed method reduces the required admissibility checks and prediction set size.
* The sequential generation and filtering process may introduce additional computational costs by generating a large number of samples before the filtering stage.
* The calibration process, which involves sample splitting for generation and each filtering stage, may require extra ground-truth samples to determine accurate threshold (lambda) values.

---

confidence: 2
contribution: 2
initial_rating: 3
presentation: 3
questions: 1. One of the motivations for the method is the possible reliance on human oracle and expenses related to querying it. In the end the experiment use a non-human validation function. Related questions:
- Would not the human oracle make some of the assumptions invalid (e.g. the need for increasing update function)?
- As some point you mention that multiple queries over the same example need to be executed - wouldn't the human validation bring even more noise into the whole process and invalidate some of your probabilistic conclusions?
2. I do not understand equation (6). What level of quantile is this? What is the interpretation of the n-fracion in the right-hand side?
3. Is there a way to independently post-evaluate that the experimental results are really conformal with the $\alpha$ level you were trying to achieve. Or would you need to use your own calibration parameters? If it were possible, this would provide additional useful insight.
4. Please address the concerns mentioned under Weaknesses.
soundness: 2
strengths: The paper addresses an important problem of current stochastic generative models hallucinating non-factual responses. Formulating this problem within the risk-control framework can provide the mathematical means for addressing it. The experimental evaluation over the natural langauge tasks seems relevant.
summary: The paper proposes a heuristic algorithm to filter predictions of generative model to achieve conformal admissability. It argues that previous techniques need to evaluate the admissability multiple times per instance during the calibration phase, which is impractical when the admissability is evaluated by a human oracle. In their setup, the admissability factorizes into Markov chain and thus es requires fewer queries to the admission function (e.g. human oracle). The paper presents the algorithm for the filtering heuristic as well as the necessary calibration algorithms using two filters based on diversity and quality functions of the generated examples. The experiments over natural language generative tasks and molecular generation reporting favorable metrics in particular in terms of reduction in number of queries and runtime.
weaknesses: I find the empirical evaluation very difficult to asses both, on its own as well as in comparison to previous methods. To understand the effects of various parts of the proposed algorithms, it would be beneficial to perform ablation studies that could provide more insights into the effects of its individual components (e.g. the update function, the coverage level $\alpha$, etc.). 
I am not convinced about the benefits of the molecular example - when there is only one valid/admissable example, it seems to me that simple checking of the validity at the generation time for each generated specimen should be enough. I do not see the benefit of the proposed method in this setup. This also applies to the TriviaQA experiment.
The algorithm requires an independent calibration set which seems to be very difficult to obtain in practice. In the presented experiments either boils down to something very trivial (single example being the valid one) or relying on another model which itself may be of uncertain quality. Further, I see similar issue with the update and filter functions which seem difficult to formulate reasonable in realistic scenarios. For me these are major limitations of the method which shall be discussed. 

The main text of the paper (section 9) spills over to page 11. As per the call for papers, there is a strict 10 page limit on the main text and the call suggests a desk reject in case of violations of this limit.

---

confidence: 1
contribution: 2
initial_rating: 6
presentation: 3
questions: - Can the author clarify the results in Table 2 of the appendix? It appears that the performance gap between SCOPE and CLM is narrowing - can the authors explain why this might be happening?
soundness: 2
strengths: Generally well-written; it’s clear that the manuscript is largely inspired (and adopted) from the setup in Quach et al 2024. Nevertheless, the authors detailed differences to Quach et al 2024 and highlight the efficiency of their method by leveraging sequential factorization.
summary: This manuscript introduces a sequential conformal prediction method called SCOPE-Gen. SCOPE-Gen uses a sequential pruning approach to iteratively refine the prediction set, allowing for separate control over each factor in the Markov chain, and demonstrates a significant reduction in the number of admissibility evaluations required during calibration. The method has been experimentally validated in natural language generation and molecular graph extension tasks.
weaknesses: - (minor) Fig 1 is slightly unclear — the caption should at least include some explanation of \nu, which is not specified until Sec 3

Meta-review: This paper propose Sequential Conformal Prediction for Generative Models (SCOPE-Gen), that utilise conformal prediction techniques that operates sequentially, to obtain guarantees and controls for generative models. The proposed approach not only provide practical algorithmic guidelines, but also include interesting Markovian interpretations, well supported by improved experimental results. The reviewers reach the consensus that the contribution is significant and the paper is well-written. It is suggested to include the discussion in the revised manuscript and recommended to appear in ICLR conference.

Decision: Accept (Poster)