SlowGuess/NeurIPS_2023_OCR huggingface dataset:
A.3 Conformal prediction
A very closely related field is conformal prediction, where the goal is to give a coverage set that contains the true label with a certain probability. Theoretically, the goal of conformal prediction is no harder than our quantile prediction task since correct quantiles induce desired coverage sets, while empirically different measurements are considered: the conformal prediction cares about giving the sharpest covering set rather than specifying which quantiles are estimated. For the regression problem, there is an "impossible triangle" summarized in a concurrent work [Gibbs et al., 2023]: (i) a conditional/individual coverage (as our Definition 3) (ii) no assumptions on the underlying distribution (iii) a finite-sample guarantee and asymptotic consistency. Such a triangle is shown by Vovk [2012], Foygel Barber et al. [2021] to be impossible to achieve simultaneously. Some works in the conformal prediction literature aim to reconcile the impossibility: Romano et al. [2019] consider the marginal/average case (as defined in Definition 1), which greatly relaxes (i). Gibbs et al. [2023] violates (i) in a milder but different way, focusing on a midway between marginal coverage and conditional coverage defined by the linear function class.
The most related paper to ours may be Feldman et al. [2021]: both theirs and ours attempt to address the minimum cost of keeping the requirement (i). Before diving into the detailed comparison, we summarize the main difference first: Feldman et al. [2021] relaxes the remaining two, while our paper keeps (iii) and relaxes (ii) in a much milder way. Feldman et al. [2021] achieves a theoretical guarantee that the true conditional quantile is the minimizer of the regularized population loss under a realizability assumption (that is, the true conditional quantiles lie in the function class considered) and an assumption that the conditional distribution is continuous with respect to features. However, its theoretical results have several limitations. First, it achieves only asymptotic consistency compared to our finite-sample guarantee in Theorem 1, which means that Feldman et al. [2021] violates requirement (iii). Besides, it only achieves a necessary condition that the true conditional quantile is the minimizer of the population loss but not vice versa. Second, Feldman et al. [2021] violates (ii) to a much deeper content than ours. Note that the key assumptions made in Feldman et al. [2021] are the zero-approximation-error assumption and the continuity assumption. The former means that there should be no model misspecification at all, which is not a weak one in the statistical learning theory and limits the guarantee from a desirable "distribution-free" property. On the contrary, our algorithm can have a finite-sample guarantee with only three very general assumptions summarized in Assumption 1. Furthermore, our Lipschitz assumption is made only to achieve a finite-sample guarantee (of which the necessity is supported by Theorem 6), while it can still be relaxed to a weaker one than Feldman et al. [2021] to reach the same asymptotic result. To see that, our result only requires the conditional quantile to be continuous, while Feldman et al. [2021] requires continuity for the whole conditional distribution. Third, the regularization term in Feldman et al. [2021] is related to a zero-one indicator, which is discontinuous for gradient descent. The authors twist their algorithm by replacing it with a smooth approximation to overcome the issue without any formal guarantee on the twisted one. In contrast, our theory accompanies the exact same algorithm that we propose.
Our paper can also serve as a starting point for understanding the empirical success of the "split" procedure that is common among the conformal prediction algorithms. As summarized before, most conformal prediction methods theoretically abandon requirement (i) with only a marginal coverage guarantee. But a tricky point is that if one only needs the marginal coverage, it suffices to merely use the empirical quantile without the splitting step at all. Why does the learner bother to "split"? Empirically, the splitting procedure helps to obtain a more homogeneous coverage across the whole
feature space, while our paper is the first theoretical justification up to our knowledge: to reduce the Lipschitz constant  $L$  and smooth the target. Such an intuition is justified by Theorem 1 and Theorem 2 from both the upper and the lower bounds.
B Failure of Existing Algorithms in Individual Calibration
In this subsection, we will give a brief discussion of the existing methods in regression calibration literature. We give a close inspection of the existing calibration algorithms, proving that they cannot achieve a desirable result (or even avoid naive and meaningless ones).
Some methods assume that the underlying distribution is Gaussian [Cui et al., 2020, Zhao et al., 2020]. The most straightforward drawback one can think of is that these Gaussian-based methods are not consistent once the Gaussian assumption is violated. However, we will prove with some counter-examples that they cannot prevent the naive or meaningless prediction even if the underlying model is Gaussian.
Cui et al. [2020] use a two-step procedure to estimate the conditional distribution, where at each step the underlying model is a neural network predicting the mean  $\mu (x)$  and variance  $\sigma^2 (x)$ . The first step is simply fitting the observed  $\{(X_i,Y_i)\}_{i = 1}^n$  into the model, getting an initial guess of  $\mu$  and  $\sigma$ . The second step utilizes the maximum mean discrepancy (MMD) principle. To be more specific, the second step iterates the following steps until convergence: first generate  $N$  new samples  $\{\hat{Y}_i\}_{i = 1}^N$  from the estimated Gaussian model  $\mathcal{N}(\hat{\mu} (X_i),\hat{\sigma}^2 (X_i))$ , then update the model estimation  $(\hat{\mu},\hat{\sigma}^{2}$  to minimize the empirical MMD  $\| \frac{1}{N}\sum_{i = 1}^{N}\phi (Y_i) - \frac{1}{N}\sum_{i = 1}^{N}\phi (\hat{Y}_i)\|$ . But the problem is: the corresponding relation between each  $\{(X_i,Y_i)\}$  pair is wiped out from the model by calculating the empirical MMD. In other words, the procedure produces the same result even if one permute  $n$  estimated conditional distributions  $\{(\hat{\mu} (X_i),\hat{\sigma} (X_i))\}$  arbitrarily. This can lead to a failure in predicting the true conditional distribution even under the Gaussian condition, especially when they use multi-layer neural networks which are well-known universal approximators that can fit any continuous function [Hornik et al., 1989].
Zhao et al. [2020] try to give a randomized prediction of the cdf (in their paper denoted by  $h[x,r](\cdot)$ , where  $r$  is some Unif[0,1] random variable). The idea behind this is that if one gets a good cdf estimation, then  $\hat{F}_x(Y)$  should be close to the uniform distribution. So the target is to minimize the empirical absolute difference between  $h[x,r](y)$  and  $r$  (denoted by  $L_{1}$ ). If  $L_{1} < \epsilon$  with probability at least  $1 - \delta$ , then they call it  $(\epsilon, \delta)$ -probably approximately individual calibrated (PAIC). But minimizing  $L_{1}$  alone cannot avoid being trapped by a naive and meaningless calibration:  $h[x,r](y) \equiv r$ . So they combine the loss with another maximum likelihood type loss  $L_{2}$  (negative logarithm of likelihood, by assuming the underlying distribution of  $Y$  is Gaussian). But combining that loss cannot guarantee a meaningful calibration. To illustrate this, one just needs to consider the continuous distribution case, where each  $X_{i} = x_{i}$  is only observed once almost surely. A global minimizer for the empirical loss  $L_{1} = \sum_{i=1}^{n} \frac{1}{n} |h[x_{i},r_{i}](y_{i}) - r_{i}|$  is obtained if one predicts  $h[x_{i},r_{i}](\cdot)$  to be  $\mathcal{N}(y_i - \sigma \Phi^{-1}(r_i),\sigma^2)$ , where  $\mathcal{N}$  is the Gaussian and  $\Phi(\cdot)$  is the cdf of standard Gaussian. It can be easily checked that this Gaussian distribution's  $r_{i}^{\mathrm{th}}$  quantile is exactly  $y_{i}$ . The maximum likelihood type loss  $L_{2}$  is now  $\frac{1}{2}\log(\sigma^2) + \frac{1}{n}\sum_{i=1}^{n}\Phi^{-1}(r_i)^2 = \frac{1}{2}\log(\sigma^2) + \text{constant}$ . Minimizing it means that the  $\sigma^2$  term will asymptotically go to zero, leading to an overfit and meaningless result of  $h[x_i,r_i](\cdot) \to \delta_{y_i}$ . Again, this overfitting problem can be exacerbated by the fact that they train the model via a neural network, which is commonly believed to be highly overparametrized that can fit into any data nowadays. We must also point out that although Zhao et al. [2020] claims that they prove the existence of an  $(\epsilon, \delta)$ -PAIC predictor, the existence is only guaranteed by the existence of another monotonically PAIC (where monotonicity requires  $h[x,r](y)$  is monotonically increasing with respect to  $r$ ) predictor (see their Theorem 1). But they do not provide the existence of any non-trivial mPAIC predictor other than the trivial solution  $h[x,r](y) \equiv r$ . Therefore, we think their argument is at least incomplete, if not suspicious.
For those existing methods that do not assume Gaussian distributions, unfortunately, they are still inconsistent from an individual calibration perspective [Kuleshov et al., 2018, Chung et al., 2021].
Kuleshov et al. [2018] develop an isotonic regression way to calibrate the quantiles in the regression setting, which is inspired by the widely used isotonic regression in the classification setting, hence is a recalibration method based on some initial estimation of all quantiles (say  $\{\tilde{Q}\}_{\tau} = \hat{F}^{-1}(\tau)$ ).
Then the authors propose an isotonic regression method that learns a monotonically increasing function  $g(\tau_{\mathrm{expected}}) = \tau_{\mathrm{observed}}$ , where  $\tau_{\mathrm{observed}} = \frac{1}{n}\sum_{i=1}^{n}\mathbb{1}\{Y_i \leq \tilde{Q}_{\tau_{\mathrm{expected}}}\}$ . The final output is  $\hat{Q}_{\tau} = \tilde{Q}_{g^{-1}(\tau)}$ . The major drawback of their method is that it heavily relies on the initial calibration  $\tilde{Q}_{\tau}$ . Hence the final marginal (or individual) recalibration result is only valid when the function class  $\{\tilde{Q}_{\tau} : \tau \in [0,1]\}$  contains a marginal (or individual) calibrated prediction. Despite the marginal case, such a realizability condition is too strong to obtain in the individual calibration set, leading to the failure of their recalibration methods in the individual case.
Chung et al. [2021] propose a combined loss in their Section 3.2 with respect to both average calibration and sharpness. The first term minimizes the calibration error:  $L_{1} = \mathbb{1}\{\frac{1}{n}\sum_{i = 1}^{n}\mathbb{1}\{Y_{i}\leq \hat{Q}_{\tau}\} < \tau \} \cdot \frac{1}{n}\sum_{i = 1}^{n}[(Y_{i} - \hat{Q}_{\tau}(X_{i}))\mathbb{1}\{Y_{i} > \hat{Q}_{\tau}(X_{i})\}] + \mathbb{1}\{\frac{1}{n}\sum_{i = 1}^{n}\mathbb{1}\{Y_{i}\leq \hat{Q}_{\tau}\} >\tau \} \cdot \frac{1}{n}\sum_{i = 1}^{n}[(-Y_{i} + \hat{Q}_{\tau}(X_{i}))\mathbb{1}\{Y_{i} < \hat{Q}_{\tau}(X_{i})\}]$ . Note that  $L_{1}$  is zero if the prediction  $\hat{Q}_{\tau}$  is marginally calibrated. The second term is  $L_{2} = \frac{1}{n}\sum_{i = 1}^{n}\hat{Q}_{\tau}(X_{i}) - \hat{Q}_{1 - \tau}(X_{i})$ , called sharpness regularization term. But that combined loss  $L = (1 - \lambda)L_{1} + \lambda L_{2}$  will fail even for calibrating such a simple instance:  $X\sim \mathrm{Unif}[0,1]$ ,  $u\sim \mathrm{Unif}[-1,1]$ , and  $Y = uX$ . Any  $\tau^{\mathrm{th}}(\tau >0.5)$  quantile should be  $Q_{\tau}(F_x) = (\tau -0.5)x$ , while minimizing their proposed loss for  $\lambda \in [0,\lambda_0]$  ends up with  $\hat{Q}_{\tau} = x$  for those  $x < \tau -0.5$  and  $\hat{Q}_{\tau} = 0$  for those  $x\geq \tau -0.5$ . For larger  $\lambda \in [\lambda_0,1]$ , minimizing their proposed loss will lead to an all-zero meaningless prediction  $\hat{Q}_{\tau} = 0$ . The detailed calculation can be found in Appendix.
Finally, we point out another issue that using the training residuals as errors to estimate the error distribution will lead to a biased (usually over-confident) estimation. For example, the Section 3.1 of Chung et al. [2021] proposes a combined method of first training a regression model  $\hat{f}$  on  $\{(X_i,Y_i)\}_{i=1}^n$  and then train a regression model on  $\mathrm{res}_i = Y_i - \hat{f}(X_i)$ . But they use the same set of data to do both steps of training, leading to a statistically inconsistent estimator. The inconsistency becomes especially severe for modern highly overparametrized machine learning models that can fit into even random data [Zhang et al., 2021].
Remark 1. Many researchers [Chung et al., 2021, Zhao et al., 2020] argue that combining a sharpness regularization term with the average calibration loss will help to force the calibration model to stay away from marginal calibration. However, in this section, we show that those combining methods fail to provide a meaningful individually calibrated quantile prediction. In conclusion, a sharpness regularization term may help to achieve a marginal calibration, while it does no good for the goal of individual calibration.
C Discussions on Negative/Impossibility Results for Individual Calibration
Before elaborating on those impossibility results, we adopt the lower bound result from the nonparametric (mean) estimation literature Györfi et al. [2002], showing that any estimator may suffer from an arbitrarily slow convergence rate without additional assumptions on the underlying estimation, even in a noiseless setting. The original result is established for the conditional mean regression, and the same result holds for the conditional quantile estimator in our case.
Theorem 6 (Theorem 3.1 in Györfi et al. [2002], rephrased). For any sequence of conditional quantile estimators  $\{\hat{Q}_{\tau,n}\}$  and any arbitrarily slow convergence rate  $\{a_n\}$  with  $\lim_{n\to\infty}a_n = 0$  and  $a_1 \geq a_2 \geq \cdots > 0$ ,  $\exists \mathcal{P}$ , s.t.  $X \sim \mathrm{Unif}[0,1]$ ,  $U|X \sim \delta_{g(X)}$  (hence  $Q_{\tau}(U|X = x) = g(x), \forall \tau > 0$ ), where  $g(X) \in \{-1, +1\}$ , and
$$
\limsup_{n\to \infty}\frac{\mathbb{E}\left[|\hat{Q}_{\tau,n}(X) - g(X)|^{2}\right]}{a_{n}}\geq 1.
$$
Such a negative result further justifies our Assumption 1 in a way that one cannot achieve any meaningful convergence rate guarantee without making any assumptions on the underlying distribution.
Discussions on Zhao et al. [2020]: The negative result obtained by Zhao et al. [2020] (their Proposition 1) is for the target of estimating the conditional distribution's cdf. The authors argue that the quality of an estimation  $\hat{F}_x(\cdot)$  should be measured via how close the distribution  $\hat{F}_x(Y)$  is to the uniform distribution Unif[0,1]. The measurement of closeness is defined by the Wasserstein-1 distance.
Their counter-example is constructed in a way that  $\mathcal{P}_{Y|X = x}$  is a singleton (say, a delta distribution on the point  $g(x)$ , where  $g(x)$  is chosen adversarially by the nature). They prove that any learner cannot distinguish between the true distribution and the adversarially chosen distribution from the observed data, thus any algorithm that claims a small closeness between  $\hat{F}_x(Y)$  and Unif[0,1] cannot guarantee that the observed data are not sampled from the adversarial distribution. Since the Wasserstein-1 distance between a delta distribution and Unif[0,1] is at least  $\frac{1}{4}$ , the closeness claim is false for at least the adversarial distribution. We need to note that the measurement they take is a little suspicious: if the conditional distribution itself is a delta distribution, then the closeness of  $F_x(Y)$  to the uniform distribution cannot be regarded as a good measurement of distribution calibration, since even the oracle will also suffer an at least  $\frac{1}{4}$  Wasserstein distance. Although a certain negative result when  $Y|X \sim \delta_{g(X)}$  is also made in our Theorem 6, we need to note that the closeness of  $\hat{F}_x(Y)$  to Unif[0,1] can only be a good calibration measurement if the conditional distribution is continuous. On the contrary, for the general continuous conditional distributions (with only those mild assumptions), our methods can achieve a minimax optimal rate individual calibration guarantee with respect to any quantile (Theorem 1).
Discussions on Lei and Wasserman [2014], Vovk [2012]: Vovk [2012]'s impossibility result (their Proposition 4) is a version of Lemma 1 in Lei and Wasserman [2014]. Thus we will only discuss Lemma 1 in Lei and Wasserman [2014] here. The impossibility result is established for those distributions which have continuous marginal distributions  $\mathcal{P}_X$ . They focus on a conditional coverage condition, meaning that one should obtain a  $(1 - p)$  coverage set  $\hat{C}(X_{\mathrm{test}})$  such that  $\mathbb{P}(Y_{\mathrm{test}} \in \hat{C}(X_{\mathrm{test}}) | X_{\mathrm{test}} = x) \geq 1 - p$  for any  $x \in \mathcal{X}$  almost surely. Lei and Wasserman [2014] prove that for any distribution  $\mathcal{P}$  and its any continuous point  $x_0$ , for any finite  $n$ , such an almost sure conditional coverage must result in an infinite expected length of covering set with respect to Lebesgue measure. This negative result seems to be disappointing for individual calibration at first glance. However, an almost sure guarantee in a finite sample case is usually too strong in practice. Our results are established for two weaker but more practical settings: either the strong consistency in the asymptotic case as  $n \to \infty$  or a mean squared error guarantee at the finite sample case. A similar spirit of relaxing the requirement in order to get a positive result can also be found in Lei et al. [2018], where the authors get an asymptotic result that the covering band will converge to the oracle under certain assumptions. Note that their requirement is to get the sharpest covering band, meaning that they need to estimate the probability density function, which leads to their more restricted assumptions and different analysis, compared to ours.
D Comparison with Other Results
In this subsection, we make a comparison of the technical contributions with other related literature such as concentration of order statistics and Kernel Density Estimation (KDE).
Current quantile concentration analyses are all based on the i.i.d. assumption, which is not applicable to the continuous case conditional quantile estimation problem, where the learner almost surely does not observe identical features. But to complete our discussions, we give a brief introduction to the existing quantile concentration methods. There are two lines of research, which we call vertical and horizontal correspondingly. Vertical concentration guarantee is based on curving the convergence rate of the Smirnov process (the process of the empirical cdf converges to the true cdf) and applying the Dvoretzky-Kiefer-Wolfowitz inequality [Dvoretzky et al., 1956, Massart, 1990] to get a sharp coverage along the vertical line (in regards to cdf function value), that is, the get a sharp  $\delta > 0$  such that  $\hat{Q}_{\tau - \delta} \leq Q_{\tau} \leq \hat{Q}_{\tau + \delta}$  with high probability [Szorenyi et al., 2015, Altschuler et al., 2019]. But turning such a vertical guarantee that guarantees the coverage probability into a horizontal one that guarantees the estimation error is highly non-trivial. By assuming the cdf to be strictly increasing and continuous, Szorenyi et al. [2015], Torossian et al. [2019], Kolla et al. [2019], Howard and Ramdas [2022] get a horizontal concentration of order  $\tilde{O}(1/\sqrt{n})$ . Cassel et al. [2018] assume a Lipschitz cdf (hence an upper bound for pdf) and get a rate of  $\tilde{O}(1/\sqrt{n})$ . Altschuler et al. [2019] directly assumes a function (which they call  $R$ ) of the cdf to transform the vertical concentration into a horizontal one. Another line of quantile concentration is to directly get a horizontal guarantee. Yu and Nikolova [2013] use Chebyshev's inequality to prove the horizontal concentration while remaining coarse-grained compared to Hoeffding type guarantee. Zhang and Ong [2021] utilize an alternative assumption and analysis of Boucheron and Thomas [2012] that relates to a certain
type of distribution with non-decreasing hazard rate (or monotone hazard rate, MHR). Although the MHR assumption is common in survival analysis, such an assumption is no longer appropriate for many other distributions, such as Gaussian. In our proof, we make a combination of the finite sample theory of the M-estimator and the local strong convexity of the conditional expected pinball loss to derive a new proof for the concentration of empirical conditional quantile around the true conditional quantile. We do not assume the upper bound or lower bound on the pdf, the strict increasing cdf, or the non-decreasing hazard rate. We also generalize the i.i.d. setting of quantile concentration to the independent but not identical setting, which is the first one to our knowledge in the quantile concentration literature.
Another important line of research is the kernel density estimation (KDE) literature focuses on giving a full characterization of the conditional distribution. Such a goal is aligned with the need for the full characterization of pdf in some downstream tasks. For example, if one wants to find the sharpest covering set (or covering band, if one further assumes the conditional distribution is univariate), then one must identify the probability density function so that thresholding can thus be constructed [Lei and Wasserman, 2014, Lei et al., 2018]. But for a simpler and probably wider class of downstream tasks, such as decision-making based on quantiles (newsvendor problem) and evaluating and minimizing the quantiles (robust optimization), an accurate estimation of the conditional quantiles should suffice.
From the point of developing practical algorithms, KDE methods are often computationally intractable for conditional quantile estimations. To get a quantile estimation, one has to integrate the full probability density function. The whole procedure is highly costly even if one discretized the integration. Another point is that theoretical guarantees in the KDE literature are often established with respect to the mean integrated squared error (MISE), while it does not simultaneously guarantee convergence with respect to some quantile. Consider a simple instance where the estimated probability density function  $\hat{p}(y)$  differs from true probability density function  $p(y)$  by a factor of  $O\left(\frac{1}{\sqrt{n}} \cdot \frac{1}{|y|}\right)$ .
The MISE converges with a rate of  $O\left(\frac{1}{n}\right)$ . However, the cumulative pdf estimation error (denoted by  $\int_{-\infty}^{y} |\hat{p}(t) - p(t)| \, \mathrm{d}t$  may diverge (since  $\int_{-\infty}^{0} \frac{1}{|t|} \, \mathrm{d}t$  is a divergent integration)). The divergence is caused by the non-exchangeability between the square and the integration.
Since the final goal is to get an estimation of the conditional quantile, we can relax the assumptions in the KDE literature largely. For those nonparametric methods such as Lei and Wasserman [2014], they require the smoothness (to be more specific, Hölderness) of the underlying conditional pdf with respect to  $y$  and the Lipschitzness with respect to  $x$  in the infinite norm, which is a far stronger assumption than our case. Instead, we only assume that the conditional quantile (rather than the full pdf with respect to the sup norm) is Lipschitz. For those methods that establish the KDE convergence results in a generalization bound via complexity arguments, our assumption is still much weaker. For example, Bilodeau et al. [2021] make a realizability assumption (that the true pdf must lie in the hypothesis class) to achieve a generalization bound, while our assumption just requires the true conditional quantile lies in a bounded set  $[-M, M] \subset \mathbb{R}$ .