<?xml version="1.0" encoding="utf-8"?><feed xmlns="http://www.w3.org/2005/Atom" ><generator uri="https://jekyllrb.com/" version="3.10.0">Jekyll</generator><link href="https://jiwoncpark.github.io/feed.xml" rel="self" type="application/atom+xml" /><link href="https://jiwoncpark.github.io/" rel="alternate" type="text/html" /><updated>2026-07-28T06:32:52+00:00</updated><id>https://jiwoncpark.github.io/feed.xml</id><title type="html">Ji Won Park</title><subtitle>personal description</subtitle><author><name>Ji Won Park</name></author><entry><title type="html">Shapes of conformal sets in high dimensions</title><link href="https://jiwoncpark.github.io/posts/2025/02/shapes-conformal/" rel="alternate" type="text/html" title="Shapes of conformal sets in high dimensions" /><published>2025-04-05T00:00:00+00:00</published><updated>2025-04-05T00:00:00+00:00</updated><id>https://jiwoncpark.github.io/posts/2025/02/shapes-of-conformal-sets</id><content type="html" xml:base="https://jiwoncpark.github.io/posts/2025/02/shapes-conformal/"><![CDATA[<h1 id="shapes-of-conformal-sets-in-high-dimensions">Shapes of conformal sets in high dimensions</h1>

<p>I became curious about the shapes of multivariate conformal regions when working on <a href="https://arxiv.org/abs/2411.02114">Semiparametric conformal prediction (AISTATS 2025)</a> [1]. Included as a baseline in this paper is a simple way to extend conformal prediction to multiple response variables: to define a <strong>scalar</strong> non-conformity score.</p>

<p>If you are not familiar with conformal prediction, let’s briefly review the conformal calibration procedure for a single response variable (\(d=1\)). Suppose we have a point (uncalibrated) predictor \(\hat f: \mathcal{X} \to \mathbb{R}\) and an exchangeable calibration set \(\{(x^{(i)}, y^{(i)})\}_{i=1}^n\). We define a non-conformity score \(V(x, y, \hat f)\) which says how “strange” the prediction \(\hat f(x)\) is relative to \(y\). One simple example is the absolute residual \(V(x, y, \hat f) = |y - \hat f(x)|\). We evaluate this score on the calibration set to obtain a set of \(n\) scores. Then, given a user-specified miscoverage rate of \(\alpha\), we compute the empirical \(1-\alpha\) quantile of the scores. This quantile, which we denote \(q_\alpha\), sets the width of the conformal prediction interval for a test point \(x^*\), defined by</p>
<div> \[ C_{1-\alpha}(x^*) \equiv \{y\in \mathbb{R}: S(x^*, y, \hat f) \leq q \}. \tag{1} \] </div>
<p>For the absolute residual, this is simply the interval \([\hat f(x) - q, \hat f(x) + q]\). Provided that the test instances are exchangeable with the calibration ones, this set is guaranteed to cover the truth \(y^*\) with probability at least \(1-\alpha\).</p>

<p>Now, when the response variable takes values in \(\mathbb{R}^d\) for \(d&gt;1\), we can define a scalar non-conformity score by taking the norm of the signed error vector \(y - \hat f(x) \in \mathbb{R}^d\). That is, we generalize the score to</p>
<div> \[ S(x, y, \hat f) = ||y - \hat f(x)||_p,  \tag{2} \] </div>
<p>where \(||\cdot||_p\) indicates the \(p\)-norm. The rest of the procedure proceeds the same way, by computing the empirical \(1-\alpha\)-quantile \(q_p\) of the scalarized scores and constructing the prediction region as in Equation \(\text{(1)}\) with \(q=q_p\). There are “smarter” ways to do the scalarization, by first transforming the score space, for instance [2], but we focus on simple \(L_p\)-norm scalarizations here.</p>

<p>The \(\geq 1-\alpha\) coverage requirement is trivially satisfied by just returning the entire space \(\mathbb{R}^d\) as the prediction set, which would not be useful. The smaller the size (or the <em>hypervolume</em> in \(d\) dimensions) of the prediction set, the better in the sense that it’s more precise. This post is about how to choose \(p\) such that precision is maximized (i.e., the hypervolume of the prediction set is minimized).</p>

<p>As Equation \(\text{(1)}\) suggests, shapes of prediction regions in \(d\) dimensions using the \(L_p\) norm of \(y - \hat f(x)\) as the non-conformity score are \(p\)-norm balls,</p>
<div> \[ B_p(a) \equiv \{y\in \mathbb{R}^d: ||y||_p \leq a \}, \tag{3} \] </div>
<p>with radius \(a=q_p\) and centered at the original prediction \(\hat f(x)\). For \(d=2\), the \(L_1\) norm for the scalar score in Equation \(\text{(2)}\) yields a diamond-shaped prediction region with distance \(q_1\) from center to the corner, with area \(2 q_1^2\). The \(L_2\) norm yields a circle with radius \(q_2\), which has area \(\pi q_2^2\). The \(L_\infty\) norm yields a square with side length \(2 q_\infty\), which has area \(4 q_\infty^2\). The shapes for \(d=2\) and \(p=1, 2, 4, \infty\) look like the below, assuming \(y - \hat f(x) \sim \mathcal{N}(0, I_2)\).</p>

<p><img src="/assets/images/L_p_ball_2d.png" alt="Shapes in 2D" /></p>

<p>Similarly, for \(d=3\), the \(L_1\) norm for the scalar score yields a cross polytope with distance \(q_1\) from center to the corner, which has volume \(\frac{2^d}{d!}\). The \(L_2\) norm yields a ball with radius \(q_2\), which has volume \(\frac{4 }{3} \pi q_2^3\). The \(L_\infty\) norm yields a hypercube with side length \(2 q_\infty\), which has volume \(8 q_\infty^3\). The shapes for \(d=3\) and \(p=1, 2, 4, \infty\) look like the below, assuming \(y - \hat f(x) \sim \mathcal{N}(0, I_3)\).</p>

<p><img src="/assets/images/L_p_ball_3d.png" alt="Shapes in 3D" /></p>

<p>The general formula for the (hyper)volume of a \(d\)-dimensional \(p\)-ball of radius \(a\) in Equation \(\text{(3)}\) is</p>
<div> \[ {\rm Vol} \left(B_p(a) \right) = \frac{ \left( 2 \Gamma\left(1 + \frac{1}{p} \right) \right)^d}{\Gamma\left(1 + \frac{d}{p} \right)} a^d. \tag{4} \] </div>
<p>The radius \(a\) to use is the quantile, \(q_p\), of the \(L_p\)-scalarized scores. This leads one to wonder if, given a distribution of signed error vectors \(y - \hat f(x)\) in \(\mathbb{R}^d\), it’s possible to “win” some precision by choosing \(p\) that gives the smallest \({\rm Vol} \left(B_p(q_p) \right)\). One observation is that, while \({\rm Vol} \left(B_p(a) \right)\) increases with \(p\) for a fixed radius \(a\), the quantile value \(q_p\) decreases monotonically with \(p\), since \(||y||_{p_1} \geq ||y||_{p_2}\) for \(p_1 \leq p_2\).</p>

<p>Recalling that \(q_p\) is the \(1-\alpha\) quantile of the \(p\)-norm of signed error vectors \(y - \hat f(x)\), we know that its value must depend on the distribution of the errors. For simplicitly, let us assume the errors are independent across the \(d\) response variables, and consider ones that are distributed according to the radially symmetric density</p>
<div> \[ f(z) \propto e^{-||z||_{p^*}^{p^*}}, \] </div>
<p>which is Gaussian when \(p^*=2\).</p>

<p>Given this error distribution, what is the optimal \(p\) to choose? In other words, what is the \(p\) that would yield the minimum \({\rm Vol} \left(B_p(q_p) \right)\), where \(q_p\) is the \(1-\alpha\) quantile of the \(p\)-norm of the errors?</p>

<p>The answer is \(p^*\) – proof to follow. This means that you can inspect the distribution of errors, specifically the slope of its density, and match the order \(p\) of the scalarizing norm. If the errors are approximately Gaussian, use their \(L_2\) norm as the non-conformity score. If they are Laplace, use the \(L_1\) norm. The radially symmetric density assumes that the scales of errors are the same across the \(d\) response variables, but the logic of the proof extends to settings with differing scales, such as ones where a response variable is particularly difficult to predict. In fact, up to monotone transformations, it applies to general convex \(r(z)\) associated with a log-concave density \(f(z) \propto e^{-r(z)}\). The result can be understood in terms of the isoperimetric inequality applied to log-concave densities [3]; for any other \(p \neq p^*\), the geometry of the \(p\)-ball is misaligned with the level sets of the density \(f\), so we pay a penalty in volume. <strong>Basically, the best scalarizing scheme is one that matches the shape of the error distribution.</strong></p>

<p>We want to show that, for a random variable \(Z\) distributed according to the density \(f(z) = C e^{-||z||_{p^*}^{p^*}}\) for some constant \(C &gt; 0\), the volume \({\rm Vol} \left(B_p(q_p) \right)\) in Equation \(\text{(4)}\) with radius \(q_p\) chosen to satisfy</p>
<div> \[ \int_{B_p} f(z) dz = \mathbb{P}(|| Z ||_p \leq q_p) = 1-\alpha, \] </div>
<p>is minimized if and only if \(p = p^*\).</p>

<p>The proof essentially depends on a well-known result that states that, for any density \(f(z)\), among all measurable sets \(A\) satisfying \(\int_A f(z) dz = 1-\alpha,\) the set that minimizes the hypervolume (the Lebesgue measure) is the highest-density region, or the superlevel set \(A^* = \{z \in \mathbb{R}^d: f(z) \geq k \}\) where \(k\) is chosen so that \(A^*\) contains mass \(1-\alpha\).</p>

<p>First, consider the set,</p>
<div> \[ B_{p^*}(r_{p^*}) \equiv \{z \in \mathbb{R}^d: ||z||_{p^*} \leq r_{p^*} \}, \] </div>
<p>where \(r_{p^*}\) is chosen to satisfy \(\int_{B_{p^*}(r_{p^*})} f(z) dz = 1-\alpha\). This is a highest-density region, because \(||z||_{p^*} \leq r_{p^*} \iff f(z) \geq C e^{-r_{p^*}}\). This means that, for any other measurable set \(A\) satisfying \(\int_A f(z) dz = 1-\alpha\), we have \({\rm Vol} \left( B_{p^*}(r_{p^*}) \right) \leq {\rm Vol}(A)\). This includes sets of the form \(B_p(q_p)\) with \(q_p\) chosen to satisfy \(\int_{B_p(q_p)} f(z) dz = 1-\alpha\). The minimum volume for \(B_p(q_p)\) occurs at \(p = p^*\).</p>

<h3 id="references">References</h3>

<p>[1] Park, Ji Won, Robert Tibshirani, and Kyunghyun Cho. “Semiparametric conformal prediction.” AISTATS (2025).</p>

<p>[2] Feldman, Shai, Stephen Bates, and Yaniv Romano. “Calibrated multiple-output quantile regression with representation learning.” JMLR (2023).</p>

<p>[3] Bobkov, S.G. “Isoperimetric and Analytic Inequalities for Log-Concave Probability Measures.”
Annals of Probability (1999).</p>]]></content><author><name>Ji Won Park</name></author><category term="calibration" /><summary type="html"><![CDATA[Shapes of conformal sets in high dimensions]]></summary></entry><entry><title type="html">Estimation as betting</title><link href="https://jiwoncpark.github.io/posts/2025/02/estimation-as-betting/" rel="alternate" type="text/html" title="Estimation as betting" /><published>2025-02-19T00:00:00+00:00</published><updated>2025-02-19T00:00:00+00:00</updated><id>https://jiwoncpark.github.io/posts/2025/02/estimation-as-betting</id><content type="html" xml:base="https://jiwoncpark.github.io/posts/2025/02/estimation-as-betting/"><![CDATA[<h1 id="estimation-as-betting">Estimation as betting</h1>

<p>I’ve been really enjoying the lecture series “A Martingale Theory of Evidence” by Aaditya Ramdas. <a href="https://youtu.be/H8nviC_cDAE?si=p5j_fLwCe0jPl63V">Part 2 of the series</a> was particularly eye-opening to me. He estimates the mean of a bounded random variable under a betting framework and demonstrates that estimation is essentially testing, which can be viewed as betting.</p>

<p>In this blog post, I will walk through his example of estimating the mean of a bounded random variable with betting. We can construct anytime-valid confidence sets, or confidence sequences, for the mean by testing the null hypothesis associated with every <em>candidate</em> mean. We will then derive the betting strategy for a different parameter, the M-estimator. I hope you can take away some intuition for designing betting strategies given a target parameter of interest.</p>

<p>Expressing probabilities in the language of betting and gambling has a long history. Ville’s 1939 thesis first connected measure-theoretic probability with betting. In fact, he put martingales on the map of probability theory in terms of betting strategies. See Appendix Section F of Waudby-Smith and Ramdas 2024 for a historical overview of betting and its applications.</p>

<h2 id="estimating-the-mean-of-a-bounded-random-variable-with-betting">Estimating the mean of a bounded random variable with betting</h2>

<p>\(K_0^{(m)} = 1\) is the initial capital. For each \(t\), we place the bet</p>
<div> \[ \lambda_t^{(m)} \in [-1/(1-m), 1/m], \] </div>
<p>and reveal incoming data \(x_t\).</p>

<p>The capital evolves as \(K_t^{(m)} = K_{t-1}^{(m)} \left( 1 + \lambda_t^{(m)} (x_t - m) \right)\).</p>

<p>Rescale (allowed b/c RV is bounded) so that \(m\) lies in \([0, 1]\). The confidence sequence for the true mean \(\mu\) is then</p>
<div> \[ C_t \equiv \{m \in [0, 1]: \prod_{i=1}^t (1 + \lambda_i (X_i - m)) &lt; 1/\alpha \} = \{m \in [0, 1]: K_t^{(m)} &lt; 1/\alpha \}. \tag{1} \] </div>
<p>This can be evaluated on a grid of \(m\).</p>

<h2 id="where-did-this-confidence-sequence-come-from">Where did this confidence sequence come from?</h2>

<p>Intuitively, for each candidate mean \(m \in [0, 1]\), we are testing the null \(H_0^{(m)}: \mathbb{E}_P[X_i\mid X_{1:i-1}] = m\).</p>

<p>We claim that \(C_t\) is a confidence sequence for \(\mu\). That is,</p>
<div> \[ \sup_{P \in \mathcal{P}^\mu} P\left(\exists t \in \mathbb{N}: \mu \notin C_t \right) \leq \alpha, \] </div>
<p>which conversely states that \(C_t\) contains \(\mu\) with high probability.</p>

<p>To prove this, let’s think about a special game that’s indexed by the true mean \(\mu\), which is \(K_t^{(\mu)}\). We can see that \(K_t^{(\mu)}\) is a non-negative martingale with initial value 1, the so-called “test martingale.”</p>
<ul>
  <li><em>Non-negative</em> because the bets were constrained to leave it non-negative.</li>
  <li><em>Martingale</em> because \(\mathbb{E}_P [K_t^{(\mu)}\mid K_{1:t-1}^{(\mu)}] = K_{t-1}^{(\mu)} \mathbb{E}_P [1 + \lambda_t^{(\mu)}(X_t - \mu)] = K_{t-1}^{(\mu)} \left(1 + \lambda_t^{(\mu)} (\underbrace{\mathbb{E}_P(X_t)}_{=\mu} - \mu) \right) = K_{t-1}^{(\mu)}\).</li>
  <li><em>Initial value \(1\)</em> because we started with an initial capital of \(1\), or \(K_0^{(\mu)} = 1\).</li>
</ul>

<p>Since \(K_t^{(\mu)}\) is a non-negative martingale, we can apply Ville’s inequality:</p>
<div> \[ \sup_{P \in \mathcal{P}^\mu} P\left(\exists t \in \mathbb{N}: K_t^{(\mu)} \geq 1/\alpha \right) \leq \alpha. \tag{2} \] </div>
<p>Note that \(C_t\) defined in \((1)\) is incorrect only if it excludes \(\mu\), which happens when \(K_t^{(\mu)} \geq 1/\alpha\). But this happens with probability \(\leq \alpha\) according to \((2)\). In other words, with high probability, \(C_t\) contains \(\mu\).</p>

<p><img src="/assets/images/payout.png" alt="Payout schematic" /></p>

<p><strong>Figure 1:</strong> The payout rarely goes above \(1/\alpha\).</p>

<h2 id="so-how-should-we-bet">So how should we bet?</h2>

<p>So far we haven’t discussed how we should actually bet (i.e., choose \(\lambda_t^{(m)}\)). One method is called growth rate adaptive to the particular alternative (GRAPA; Waudby-Smith and Ramdas 2024). We choose</p>
<div> \[ \lambda_t^{(m)}(P) \equiv \arg \max_{\lambda \in [-1, 1]} \mathbb{E}_P \left[ \log \left(1 + \lambda(X_t - m) \right) \mid \mathcal{F}_{t-1} \right]. \tag{3} \] </div>
<p>The main issue with evaluating the above \(\lambda_t^{(m)}\) is that we don’t know \(P\). But let’s just blindly differentiate through the expectation:</p>
<div> \[ \mathbb{E}_P[(X_t - m)/(1 + \lambda^*(X_t - m))] = 0. \] </div>
<p>The denominator begs for a Taylor expansion:</p>
<div> \[ \mathbb{E}_P [(X_t - m)\left(1 - \lambda^*(X_t - m) \right)] = 0. \] </div>
<p>Rearranging to solve for \(\lambda^*\), we have</p>
<div> \[ \lambda_t^{(m)} = \frac{\mathbb{E}_P[X_t - m]}{\mathbb{E}_P[(X_t-m)^2]} \approx \frac{\hat{\mu}_t - m}{\hat{\sigma}_t^2 + (\hat{\mu}_t - m)^2}, \] </div>
<p>where we use the plug-in empirical estimates for \(\hat{\mu}_t\) and \(\hat{\sigma}_t^2\) computed from the first \(t-1\) samples.</p>

<p>Figure 2 plots the GRAPA-chosen \(\lambda_t^{(m)}\) for five different values of \(m\), for the Bernoulli(1/2) and the Beta(1, 1) distributions. The dotted lines are “oracle” bets, where the plug-in empirical estimates \(\hat{\mu}, \hat{\sigma}^2\) have been replaced with their true values. Over time, bets converge to their oracle values.</p>

<p>Let’s focus on the left panel. The truth is \(\mu=0.5\), so when  \(m=0.5\) (green), we see that the bet quickly converges to zero, because there is no advantage to betting. When \(m&gt;0.5\) (\(m&lt;0.5\)), on the other hand, the bet converges to a negative (positive) value. The absolute values of the bets become more aggressive as you are betting against values that are farther from the truth.</p>

<p>Beta(1, 1) on the right panel has the same mean of 0.5 but lower variance than Bernoulli(1/2). Accordingly, the bets are more aggressive on the whole.</p>

<p><img src="/assets/images/Pasted image 20250218201252.png" alt="Betting strategy" /></p>

<p><strong>Figure 2:</strong> Figure 10 from Waudby-Smith and Ramdas 2024</p>

<h2 id="what-about-other-estimators">What about other estimators?</h2>

<p>The setup presented above seems very contrived for the mean estimator. Let’s consider another estimator, the univariate M-estimator,</p>
<div> \[ \theta^* \equiv \arg \min_{\theta' \in \Theta} \mathbb{E}_P [ L(X, \theta') ], \] </div>
<p>for some “nice” loss function \(L\).* Our payout will look like</p>
<div> \[ K_t^{(\theta)} = K_{t-1}^{(\theta)} \left(1 + \lambda_t^{(\theta)} \nabla_\theta L(X_t, \theta) \right). \] </div>
<p>Now \(K_t^{(\theta^*)}\) is a non-negative martingale with an initial value of 1. The arguments for non-negative and initial value 1 are the same as above, and it’s a martingale, because</p>

<div> \[ \mathbb{E}_P [K_t^{(\theta^*)} \mid K_{1:t-1}^{(\theta^*)}] = K_{t-1}^{(\theta^*)} \left(1 + \lambda_t^{(\theta^*)} \underbrace{\mathbb{E}_P [\nabla L_\theta(X_i, \theta^*)]}_{=0} \right) = K_{t-1}^{(\theta^*)}, \] </div>
<p>where the underbrace equality holds because \(\theta^*\) is the minimizer of the expected loss, so \(\nabla_\theta \mathbb{E}_P [L(X_i, \theta^*)] = 0 \implies \mathbb{E}_P [\nabla_\theta L(X_i, \theta^*)] = 0.\) We can then write down the betting strategy similarly as \((3)\):</p>
<div> \[ \lambda_t^{(\theta)}(P) \equiv \arg \max_{\lambda \in [-1, 1]} \mathbb{E}_P [\log \left(1 + \lambda \nabla_\theta L(X_t, \theta)  \right) \mid \mathcal{F}_{t-1}]. \tag{4} \] </div>
<p>Following the GRAPA derivation of differentiating through the expectation and taking the Taylor approximation, we obtain</p>
<div> \[ \lambda_t^{(\theta)} = \frac{1}{\mathbb{E}_P[\nabla_\theta L(X, \theta)]} \approx \frac{t-1}{\sum_{i=1}^{t-1} \nabla_\theta L(X_i, \theta)}, \] </div>
<p>where we again use the plug-in empirical estimate using the first \(t-1\) samples, this time for the expected gradient of the loss. Based on the intuition we took away from the GRAPA figure, this result makes sense. If \(P\) is lower-variance, like the Beta(1, 1) distribution, the numerator will be smaller and the bets \(\lambda_t^{(\theta)}\) will become more aggressive.</p>

<h3 id="acknowledgments">Acknowledgments</h3>
<p>A huge thank you to Aaditya Ramdas for the great lecture series and <a href="https://arxiv.org/abs/2410.23614\midtextbook">textbook</a> on e-values. I also thank Clara Wong-Fannjiang for foraying into e-values with me in our aptly named (in our opinion) reading group, “Great Expectations.”</p>

<p>\(*\) A sufficient condition for “niceness” being that \(X\) is regular and \(\int \mathbb{E}_P[\mid \nabla_\theta L(X, \theta) \mid]\) is finite, by Fubini</p>

<h3 id="references">References</h3>

<p>[1] Waudby-Smith, I. &amp; Ramdas, A. (2024). Estimating means of bounded random variables by betting. JRSS Series B: Statistical Methodology, 86(1), 1-27.</p>]]></content><author><name>Ji Won Park</name></author><category term="hypothesis_testing" /><category term="e_values" /><summary type="html"><![CDATA[Estimation as betting]]></summary></entry></feed>