Jacopo Teneggi, Matthew Tivnan, Webster J. Stayman, Jeremias Sulam
Poster Session 2 #203 @ ICML 2023


How to Trust Your Diffusion Model:
A Convex Optimization Approach to Conformal Risk Control
Motivation


From Song et el. "Score-Based Generative Modeling through Stochastic Differential Equations" (2021)
Diffusion models can generate
varied and high-quality images
Setting
Stochastic image denoising
y=x+v, v∼N(0,Iσ02)
sample x from y via reverse-time diffusion
F(y)∼Qy≈p(x∣y)


x
y
F(y)

x
y
F(y)
x
y
F(y)
x
y
F(y)
Open Questions
Reverse-time diffusion
F(y)∼Qy≈p(x∣y)
Q1: How concentrated are the
samples on the same observation?
Q2: How far are the reconstructed images from the ground truth?
↓
Calibrated Quantiles
Provide Entrywise Coverage


Lemma (informal). For a miscoverage level α∈(0,1), the entrywise calibrated quantiles over F(y)(1),…,F(y)(m)
Iα(y)j=[l^j,α/2,u^j,1−α/2]
guarantee that for each feature j∈[d]
P[F(y)j∈Iα(y)j]≥1−α
Optimal Mean Length Risk Control
Risk Controlling Prediction Set (RCPS) [Bates et al., 2021]
Risk level ϵ and failure probability δ
λ^=inf{λ∈R: UCB(Scal,λ,δ)≤ϵ, ∀λ′≥λ}
guarantees conformal risk control
P[E[number of pixels not in intervals]≤ϵ]≥1−δ
Define
Iλ(y)j=[l^j−λ,u^j+λ], λ∈R
Q: How many ground truth features xj are outside I(y)j?
Optimal Mean Length Risk Control
Limitation: choosing a scalar λ is suboptimal
for the mean interval length of Iλ(y)
Extend to λ∈Rd with
Iλ(y)j=[l^j−λj,u^j+λ], λj∈R
and minimize mean interval length
λ^=λ^∈Rdargminj∈[d]∑λj s.t. risk is controlled
Optimal Mean Length Risk Control
Limitation: choosing a scalar λ is suboptimal
for the mean interval length of Iλ(y)
Extend to λ∈Rd with
Iλ(y)j=[l^j−λj,u^j+λ], λj∈R
and minimize mean interval length
λ^=λ^∈Rdargminj∈[d]∑λj s.t. risk is controlled
The constraint set is not convex
Optimal Mean Length Risk Control
We propose a convex upper bound
ℓγ(x,Iλ(y))


Optimal Mean Length Risk Control

risk is
controlled
risk is not controlled
K-RCPS procedure
0. User-defined
risk tolerance ϵ, failure probability δ
partition matrix M∈{0,1}d×K
Optimal Mean Length Risk Control

risk is
controlled
risk is not controlled
K-RCPS procedure
1. Solve
λ~K=λ∈RKargmink∈[K]∑nkλk s.t. convex upper bound≤ϵ
0. User-defined
risk tolerance ϵ, failure probability δ
partition matrix M∈{0,1}d×K
Optimal Mean Length Risk Control

risk is
controlled
risk is not controlled
K-RCPS procedure
1. Solve
λ~K=λ∈RKargmink∈[K]∑nkλk s.t. convex upper bound≤ϵ
0. User-defined
risk tolerance ϵ, failure probability δ
partition matrix M∈{0,1}d×K
2. Backtrack along Mλ~K+β1
β^=inf{β∈R: UCB(Scal,Mλ~K+β′1,δ)<ϵ, ∀β′≥β}

risk is
controlled
risk is not controlled
Optimal Mean Length Risk Control

risk is
controlled
risk is not controlled
K-RCPS procedure
1. Solve
λ~K=λ∈RKargmink∈[K]∑nkλk s.t. convex upper bound≤ϵ
0. User-defined
risk tolerance ϵ, failure probability δ
partition matrix M∈{0,1}d×K
2. Backtrack along Mλ~K+β1
β^=inf{β∈R: UCB(Scal,Mλ~K+β′1,δ)<ϵ, ∀β′≥β}
3. Output
λ^K=Mλ~K+β^1

risk is
controlled
risk is not controlled
λ^K
Optimal Mean Length Risk Control

RCPS (λ1=λ2=λ)
K-RCPS
gain
Optimal Mean Length Risk Control
Theorem (informal). For any partition matrix M∈{0,1}d×K,
λ^K=Mλ~K+β^1
with
λ~K=λ∈RKargmink∈[K]∑nkλk s.t. convex upper bound≤ϵ
and
β^=inf{β∈R: UCB(Scal,Mλ~+β′1,δ)<ϵ, ∀β′≥β}
provide risk control at level ϵ with failure probability δ
Optimal Mean Length Risk Control



Thank you!

Jacopo Teneggi

Matt Tivnan

Web Stayman

Jeremias Sulam
Poster #203
Poster Session 2, Tue. July 25

Link to code
How to Trust Your Diffusion Model
By Jacopo Teneggi
How to Trust Your Diffusion Model
- 89