Introduction
Sampling from a probability density π ( x ) ∝ e − f ( x ) \pi(x) \propto e^{-f(x)} π ( x ) ∝ e − f ( x ) given only the negative log-density f f f is a foundational problem across Bayesian inference, statistical physics, and computational biology, among many other fields. Traditionally, this problem has been approached with sampling algorithms such as time-invariant Markov chain Monte Carlo, annealing methods, and tempering algorithms. More recently, the field of data-free score-based diffusion has offered an alternative method: sampling from the target density by reversing a noising process of Gaussian convolution. Implementing such a sampling algorithm requires estimating the noised score function with only knowledge of f f f .
Consider a random variable U U U defined by a linear combination of a sample from π \pi π and a Gaussian random variable,
U = a X + 1 − a 2 Z , a ∈ [ 0 , 1 ] , X ∼ π , Z ∼ N ( 0 , I ) . (1) U = aX + \sqrt{1-a^2}Z, \quad a \in[0,1], X \sim\pi, Z \sim N(0,I). \tag*{(1)} U = a X + 1 − a 2 Z , a ∈ [ 0 , 1 ] , X ∼ π , Z ∼ N ( 0 , I ) . (1)
Let p a p_a p a denote the density of U U U at signal level a a a , and write s ( u , a ) = ∇ u log p a ( u ) s(u,a) = \nabla_u \log p_a(u) s ( u , a ) = ∇ u log p a ( u ) for its score. The ability to estimate s ( u , a ) s(u,a) s ( u , a ) for various inputs u u u and a a a is what facilitates sampling from π \pi π via score-based diffusion [21 ] .
The score is equal to an expectation over the reverse conditional density p a ( x ∣ u ) p_a(x\mid u) p a ( x ∣ u ) using Tweedie’s formula [18 ] . This has motivated a line of diffusion-based Monte Carlo methods in which the score of the noised target is estimated pointwise by a random estimator s ^ ( u , a ) \hat{s}(u,a) s ^ ( u , a ) computed with knowledge of f f f alone. This estimator should be considered a random variable with internal randomness: when queried at a fixed u u u and a a a value, it will return a value with some probability distribution. With knowledge of f f f , this estimator can be a form of importance sampling (IS) [17 ] , rejection sampling (RS) [9 ] , or Markov chain Monte Carlo (MCMC) [10 , 11 , 8 ] approximating an empirical average of Tweedie’s formula to estimate the score.
The reverse conditional density p a ( x ∣ u ) p_a(x\mid u) p a ( x ∣ u ) which defines the expectation in Tweedie’s formula is often high-dimensional and multimodal, making it particularly difficult to estimate for sampling-based score estimators. Although such estimators may draw hundreds or thousands of proposal points, often only a handful contribute meaningfully to the empirical average. The effective sample size is therefore much smaller than the number of proposal points, and it grows little as more samples are drawn. As a result, these estimators suffer from high bias and variance at practical sample sizes, with significant error reduction only at sample sizes exponentially large in the state space dimension.
In this paper, we consider an alternative route to reducing bias and variance: querying the estimator at a fixed location u u u across multiple signal levels { a i } i = 0 N \{a_i\}_{i=0}^{N} { a i } i = 0 N , and pooling the resulting estimates { s ^ ( u , a i ) } i = 0 N \{\hat{s}(u,a_i)\}_{i=0}^{N} { s ^ ( u , a i ) } i = 0 N together with the known terminal values s ( u , 0 ) = − u s(u,0)=-u s ( u , 0 ) = − u and s ( u , 1 ) = − ∇ f ( u ) s(u,1)=-\nabla f(u) s ( u , 1 ) = − ∇ f ( u ) . For any vector h ∈ R N + 1 h\in\mathbb{R}^{N+1} h ∈ R N + 1 , g ∈ R 2 g\in\mathbb{R}^{2} g ∈ R 2 , ν ∈ R \nu\in\mathbb{R} ν ∈ R we define an affine post-processor as any estimation rule
s ˉ ( u , a 0 ) = ∑ i = 0 N h i s ^ ( u , a i ) + g 0 s ( u , 0 ) + g 1 s ( u , 1 ) − ν . (2) \bar{s}(u,a_0)=\sum_{i=0}^{N}h_i\hat{s}(u,a_i)+g_0s(u,0)+g_1s(u,1)-\nu. \tag*{(2)} s ˉ ( u , a 0 ) = i = 0 ∑ N h i s ^ ( u , a i ) + g 0 s ( u , 0 ) + g 1 s ( u , 1 ) − ν . (2)
It is a form of linear smoother or ridge regression performing bias and variance reduction via a shrinkage procedure. We refer to the signal level a 0 a_0 a 0 as the on-policy level, and the queries s ^ ( u , a i ) \hat{s}(u,a_i) s ^ ( u , a i ) , i ≠ 0 i\ne0 i = 0 as off-policy evaluations.
The choice of parameters h = e 0 h=e_0 h = e 0 , g = 0 g=0 g = 0 , ν = 0 \nu=0 ν = 0 , where e 0 = ( 1 , 0 , … , 0 ) ∈ R N + 1 e_0=(1,0,\ldots,0)\in\mathbb{R}^{N+1} e 0 = ( 1 , 0 , … , 0 ) ∈ R N + 1 , we call “pure on-policy estimation” at s ^ ( u , a 0 ) \hat{s}(u,a_0) s ^ ( u , a 0 ) , so simply relying on the score estimator’s on-policy estimate is already a form of affine post-processing. If there is an alternative choice of ( h , g , ν ) (h,g,\nu) ( h , g , ν ) which strictly reduces the average squared bias and variance at a signal level, then it reduces the path-averaged score error that controls the sampling error bound, which we observe as a reduction in terminal Wasserstein distance (W 2 W_2 W 2 ). We demonstrate that:
The optimal choice of smoothing parameters relies on knowledge of the bias and variance of the base estimator. It can be written down in closed form, which we call the Wiener oracle post-processor. If it is not equal to ( e 0 , 0 , 0 ) (e_0,0,0) ( e 0 , 0 , 0 ) , then optimally chosen affine post-processing strictly reduces score estimation error.
We show pure on-policy estimation is optimal only under a specific zero-gradient condition most estimators will violate. In particular, for any unbiased estimator with non-zero variance, pure on-policy estimation is not optimal among affine post-processors.
We construct practical, non-oracle post-processors via ridge regression in the Legendre polynomial basis, and in our experiments their score error captures most of the improvement available to the Wiener oracle.
Post-processing is compared at matched computation cost: a fixed MCMC budget of N e v a l \mathcal{N}_{\mathrm{eval}} N eval evaluations is split across the N + 1 N+1 N + 1 query levels, and the pooled estimate is compared to a single on-policy estimate given the full N e v a l \mathcal{N}_{\mathrm{eval}} N eval budget. The effective sample size grows slowly in N e v a l \mathcal{N}_{\mathrm{eval}} N eval , thus the on-policy estimator gains little from the extra budget, while the split-and-pool estimator reduces score estimation error substantially.
Empirically, diffusion-based samplers built on pure on-policy score estimation degrade quickly as dimension grows. The Tweedie integral becomes hard to estimate directly in high dimensions, and base score estimates carry large bias and large variance. Post-processing is a general procedure that can be applied on top of any base score estimator. We run experiments with IS and Reverse Diffusion Monte Carlo (RDMC) [10 ] as base estimators in high-dimensional problems. Post-processing reduces score estimation error substantially, and improves sample quality with W 2 W_2 W 2 distance up to two orders of magnitude smaller at equal compute. This makes diffusion-based samplers practical in dimensions where their base estimators would otherwise fail.
Background
Diffusion Models
Fix a horizon T > 0 T > 0 T > 0 and a decreasing signal level schedule α : [ 0 , T ] → ( 0 , 1 ] \alpha: [0,T] \to(0,1] α : [ 0 , T ] → ( 0 , 1 ] , with α ( 0 ) = 1 \alpha(0) = 1 α ( 0 ) = 1 . The forward stochastic process
d X t = α ˙ ( t ) α ( t ) X t d t + 2 α ˙ ( t ) α ( t ) d B t , X 0 ∼ π , (3) dX_t = \frac{\dot{\alpha}(t)}{\alpha(t)} X_t\,dt + \sqrt{\frac{2\dot{\alpha}(t)}{\alpha(t)}}\,dB_t,\qquad X_0 \sim\pi, \tag*{(3)} d X t = α ( t ) α ˙ ( t ) X t d t + α ( t ) 2 α ˙ ( t ) d B t , X 0 ∼ π , (3)
has marginals X t = d α ( t ) X 0 + 1 − α ( t ) 2 Z X_t \mathrel{\overset{d}{=}} \alpha(t)X_0 + \sqrt{1-\alpha(t)^2}Z X t = d α ( t ) X 0 + 1 − α ( t ) 2 Z with Z ∼ N ( 0 , I ) Z \sim N(0,I) Z ∼ N ( 0 , I ) independent of X 0 X_0 X 0 , so X t ∼ p α ( t ) X_t \sim p_{\alpha(t)} X t ∼ p α ( t ) ; it is the variance-preserving Ornstein–Uhlenbeck process run on the clock α \alpha α . By the time-reversal of diffusions [21 , 12 ] , the reverse process
d Y t = − α ˙ ( T − t ) α ( T − t ) ( Y t + 2 s ( Y t , α ( T − t ) ) ) d t + − 2 α ˙ ( T − t ) α ( T − t ) d B t , Y 0 ∼ p α ( T ) , (4) dY_t = -\frac{\dot{\alpha}(T-t)}{\alpha(T-t)}\left(Y_t + 2s(Y_t,\alpha(T-t))\right)dt + \sqrt{\frac{-2\dot{\alpha}(T-t)}{\alpha(T-t)}}\,dB_t,\qquad Y_0 \sim p_{\alpha(T)}, \tag*{(4)} d Y t = − α ( T − t ) α ˙ ( T − t ) ( Y t + 2 s ( Y t , α ( T − t )) ) d t + α ( T − t ) − 2 α ˙ ( T − t ) d B t , Y 0 ∼ p α ( T ) , (4)
satisfies Y t ∼ p α ( T − t ) Y_t \sim p_{\alpha(T-t)} Y t ∼ p α ( T − t ) , so that Y T ∼ π Y_T \sim\pi Y T ∼ π . Different α \alpha α time schedules are reparametrizations of the same reverse dynamics; the schedule decides only which signal levels a discretization visits. We note there are additional small errors introduced by initializing at Y 0 ∼ N ( 0 , I ) ≠ p α ( T ) Y_0 \sim N(0,I) \ne p_{\alpha(T)} Y 0 ∼ N ( 0 , I ) = p α ( T ) and terminating at time t ′ < T t' < T t ′ < T which are considered fully in the discrete process error analysis theory [20 , 14 , 5 , 4 , 1 , 6 , 22 ] .
In this work we use the linear schedule α ( t ) = 1 − t \alpha(t) = 1-t α ( t ) = 1 − t , for which − α ˙ / α = 1 / α -\dot{\alpha}/\alpha= 1/\alpha − α ˙ / α = 1/ α . Specializing to the natural parameter schedule of the reverse process, the reverse process runs over signal levels a a a directly, with a a a increasing and a → 1 a \to1 a → 1 approaching a sample from the target density
d Y a = 1 a ( Y a + 2 s ( Y a , a ) ) d a + 2 a d W a , (5) dY_a = \frac{1}{a}\left(Y_a + 2s(Y_a,a)\right)da + \sqrt{\frac{2}{a}}\,dW_a, \tag*{(5)} d Y a = a 1 ( Y a + 2 s ( Y a , a ) ) d a + a 2 d W a , (5)
Given a score estimator s ^ \hat{s} s ^ and a grid 0 < a 0 < a 1 < ⋯ < a M < 1 0 < a_0 < a_1 < \cdots< a_M < 1 0 < a 0 < a 1 < ⋯ < a M < 1 with h k = a k + 1 − a k h_k = a_{k+1}-a_k h k = a k + 1 − a k , we initialize y 0 ∼ N ( 0 , I ) ≈ p a 0 y_0 \sim N(0,I) \approx p_{a_0} y 0 ∼ N ( 0 , I ) ≈ p a 0 and take Euler–Maruyama steps
y k + 1 = y k + h k a k ( y k + 2 s ^ ( y k , a k ) ) + 2 h k a k ξ k , ξ k ∼ N ( 0 , I ) . (6) y_{k+1} = y_k + \frac{h_k}{a_k}\left(y_k + 2\hat{s}(y_k,a_k)\right) + \sqrt{\frac{2h_k}{a_k}}\,\xi_k,\qquad\xi_k \sim N(0,I). \tag*{(6)} y k + 1 = y k + a k h k ( y k + 2 s ^ ( y k , a k ) ) + a k 2 h k ξ k , ξ k ∼ N ( 0 , I ) . (6)
We use a non-uniform grid which follows the exponential-decay design of Chen et al. [4 ] , Benton et al. [1 ] , He et al. [9 ] , which was shown to be optimal and prevents numerical instability in (5) , see Appendix § 12 .§ 1 for a precise definition.
Monte Carlo Score Estimators
With knowledge of f f f , the score can be written as a posterior expectation using Tweedie’s formula [18 ] ,
s ( u , a ) = E [ − u − a X 1 − a 2 ∣ U = u ] = ∫ − ( u − a x 1 − a 2 ) e − f ( x ) − 1 2 ( 1 − a 2 ) ∥ u − a x ∥ 2 ∫ e − f ( x ′ ) − 1 2 ( 1 − a 2 ) ∥ u − a x ′ ∥ 2 d x ′ d x , (7) s(u,a)=\mathbb{E}\left[-\frac{u-aX}{1-a^2}\mid U=u\right]=\int-\left(\frac{u-ax}{1-a^2}\right)\frac{e^{-f(x)-\frac{1}{2(1-a^2)}\lVert u-ax\rVert^2}}{\int e^{-f(x')-\frac{1}{2(1-a^2)}\lVert u-ax'\rVert^2}\,dx'}\,dx, \tag*{(7)} s ( u , a ) = E [ − 1 − a 2 u − a X ∣ U = u ] = ∫ − ( 1 − a 2 u − a x ) ∫ e − f ( x ′ ) − 2 ( 1 − a 2 ) 1 ∥ u − a x ′ ∥ 2 d x ′ e − f ( x ) − 2 ( 1 − a 2 ) 1 ∥ u − a x ∥ 2 d x , (7)
where the expectation is over the reverse conditional density p a ( x ∣ u ) ∝ e − f ( x ) e − ∥ u − a x ∥ 2 / 2 ( 1 − a 2 ) p_a(x\mid u)\propto e^{-f(x)}e^{-\lVert u-ax\rVert^2/2(1-a^2)} p a ( x ∣ u ) ∝ e − f ( x ) e − ∥ u − a x ∥ 2 /2 ( 1 − a 2 ) . Every base score estimator we consider replaces this expectation with an empirical average of a set of sampled proposal points. Each estimator generates proposal points { z i } i = 1 n \{z_i\}_{i=1}^n { z i } i = 1 n and non-negative weights { ω i } i = 1 n \{\omega_i\}_{i=1}^n { ω i } i = 1 n summing to 1 1 1 , and estimates the score as the average s ^ ( u , a ) = − u 1 − a 2 + a 1 − a 2 ∑ i = 1 n ω i z i \hat{s}(u,a)=-\frac{u}{1-a^2}+\frac{a}{1-a^2}\sum_{i=1}^n\omega_i z_i s ^ ( u , a ) = − 1 − a 2 u + 1 − a 2 a ∑ i = 1 n ω i z i . The estimators differ only in how the ( z i , ω i ) (z_i,\omega_i) ( z i , ω i ) are produced. IS draws z i z_i z i i.i.d. from the Gaussian proposal N ( u / a , 1 − a 2 a 2 I ) \mathcal{N}(u/a,\frac{1-a^2}{a^2}I) N ( u / a , a 2 1 − a 2 I ) and sets ω i ∝ e − f ( z i ) \omega_i\propto e^{-f(z_i)} ω i ∝ e − f ( z i ) . RS [9 ] draws from the same proposal, accepts each point with probability proportional to e − f ( z i ) e^{-f(z_i)} e − f ( z i ) , and places equal weight on the accepted points, which are exact draws from p a ( x ∣ u ) p_a(x\mid u) p a ( x ∣ u ) . RDMC [10 ] runs an unadjusted Langevin chain of length K K K on p a ( x ∣ u ) p_a(x\mid u) p a ( x ∣ u ) , using ∇ f \nabla f ∇ f , and takes z i z_i z i to be the chain iterates with equal weights; unlike IS and RS the z i z_i z i are correlated, so the estimator is a time average along one trajectory.
Ridge Regression
Fix a location u u u and a coordinate j j j , which we suppress. The score s ( u , a ) = s j ( u , a ) s(u,a)=s_j(u,a) s ( u , a ) = s j ( u , a ) is a smooth function of a ∈ [ 0 , 1 ] a\in[0,1] a ∈ [ 0 , 1 ] , and the base estimator returns noisy, possibly biased observations s ^ ( u ) = ( s ^ ( u , a 0 ) , … , s ^ ( u , a N ) ) \hat{s}(u)=(\hat{s}(u,a_0),\ldots,\hat{s}(u,a_N)) s ^ ( u ) = ( s ^ ( u , a 0 ) , … , s ^ ( u , a N )) of that function at the design levels a 0 , … , a N a_0,\ldots,a_N a 0 , … , a N . Its two endpoint values are known exactly, v ( u ) = ( s ( u , 0 ) , s ( u , 1 ) ) = ( − u , − ∂ f ( u ) ) v(u)=(s(u,0),s(u,1))=(-u,-\partial f(u)) v ( u ) = ( s ( u , 0 ) , s ( u , 1 )) = ( − u , − ∂ f ( u )) . Estimating a function at a target point from noisy evaluations elsewhere is a classical problem, and there are two equivalent expressions. Choose weights h = h ( a 0 ) ∈ R N + 1 h=h(a_0)\in\mathbb{R}^{N+1} h = h ( a 0 ) ∈ R N + 1 and g = g ( a 0 ) ∈ R 2 g=g(a_0)\in\mathbb{R}^2 g = g ( a 0 ) ∈ R 2 and return the linear combination
s ˉ ( u , a 0 ) = ⟨ h , s ^ ( u ) ⟩ + ⟨ g , v ( u ) ⟩ . (8) \bar{s}(u,a_0)=\langle h,\hat{s}(u)\rangle+\langle g,v(u)\rangle. \tag*{(8)} s ˉ ( u , a 0 ) = ⟨ h , s ^ ( u )⟩ + ⟨ g , v ( u )⟩ . (8)
This is the affine post-processor (2) with ν = 0 \nu=0 ν = 0 . The weights depend on a 0 a_0 a 0 and the design levels but not on u u u or on the observed values.
Fix an orthogonal functional basis { ϕ k } k ≥ 0 \{\phi_k\}_{k\geq0} { ϕ k } k ≥ 0 of L 2 [ 0 , 1 ] L^2[0,1] L 2 [ 0 , 1 ] (we use shifted Legendre polynomials) and a degree K ≤ N K\leq N K ≤ N . Fit coefficients β ∈ R K + 1 \beta\in\mathbb{R}^{K+1} β ∈ R K + 1 by weighted ridge regression of the observations onto the basis, constrained to pass through the endpoints, and evaluate the fitted polynomial at a 0 a_0 a 0 :
s ˉ ( u , a 0 ) = ∑ k = 0 K β k ∗ ( u ) ϕ k ( a 0 ) = ⟨ b , β ∗ ( u ) ⟩ , b = ( ϕ 0 ( a 0 ) , … , ϕ K ( a 0 ) ) . (9) \bar{s}(u,a_0)=\sum_{k=0}^{K}\beta_k^*(u)\phi_k(a_0)=\langle b,\beta^*(u)\rangle,\qquad b=(\phi_0(a_0),\ldots,\phi_K(a_0)). \tag*{(9)} s ˉ ( u , a 0 ) = k = 0 ∑ K β k ∗ ( u ) ϕ k ( a 0 ) = ⟨ b , β ∗ ( u )⟩ , b = ( ϕ 0 ( a 0 ) , … , ϕ K ( a 0 )) . (9)
Writing Φ i , k = ϕ k ( a i ) \Phi_{i,k}=\phi_k(a_i) Φ i , k = ϕ k ( a i ) for the design matrix and Ψ e , k = ϕ k ( e ) \Psi_{e,k}=\phi_k(e) Ψ e , k = ϕ k ( e ) , e ∈ { 0 , 1 } e\in\{0,1\} e ∈ { 0 , 1 } , for the basis at the endpoints, the ridge solution is linear in the data: β ∗ ( u ) = M 1 s ^ ( u ) + M 2 v ( u ) \beta^*(u)=M_1\hat{s}(u)+M_2v(u) β ∗ ( u ) = M 1 s ^ ( u ) + M 2 v ( u ) for matrices M 1 , M 2 M_1,M_2 M 1 , M 2 that depend only on Φ , Ψ \Phi,\Psi Φ , Ψ , and the penalties. Substituting into (9),
s ˉ ( u , a 0 ) = ⟨ M 1 T b , s ^ ( u ) ⟩ + ⟨ M 2 T b , v ( u ) ⟩ , (10) \bar{s}(u,a_0)=\langle M_1^{\mathsf{T}}b,\hat{s}(u)\rangle+\langle M_2^{\mathsf{T}}b,v(u)\rangle, \tag*{(10)} s ˉ ( u , a 0 ) = ⟨ M 1 T b , s ^ ( u )⟩ + ⟨ M 2 T b , v ( u )⟩ , (10)
which is (8) with h = M 1 T b h=M_1^{\mathsf{T}}b h = M 1 T b and g = M 2 T b g=M_2^{\mathsf{T}}b g = M 2 T b . Every ridge fit is therefore a linear smoother. Theorem 2 gives the converse direction and the explicit correspondence: the smoother weights ( h , g ) (h,g) ( h , g ) solve their own quadratic program, in which the ridge penalty on β \beta β becomes a penalty on how far ( h , g ) (h,g) ( h , g ) is from reproducing each basis function at a 0 a_0 a 0 .
Estimating a function at a target point by a linear combination of noisy evaluations elsewhere is classical statistics: it is the Wiener–Kolmogorov filtering problem [23 , 13 ] , kriging in geostatistics [16 , 24 ] , and the theory of linear smoothers in nonparametric regression [19 , 3 ] . The equivalence between fitting a penalized regression and optimizing the weights directly is made explicit in the optimal-recovery literature [7 ] and in balancing-weight estimators from causal inference [25 , 2 ] . Our contribution is to specialize this machinery to combine multiple score estimates with an affine map.
Affine Post-Processing Theory
The performance of the base score estimator is captured by its coordinate-wise bias and variance functions B B B and V V V . Note the estimator s ^ \hat{s} s ^ has internal randomness, and the input value U U U is itself a random variable. Throughout, E [ ⋅ ] E[\cdot] E [ ⋅ ] and Var ( ⋅ ) \operatorname{Var}(\cdot) Var ( ⋅ ) without subscripts denote expectation and variance over this internal randomness with ( u , a ) (u,a) ( u , a ) held fixed; averages over the population are always written with an explicit subscript, E U ∼ p a [ ⋅ ] E_{U\sim p_a}[\cdot] E U ∼ p a [ ⋅ ] . At a signal level a a a and coordinate j j j , we refer to the population average squared bias and the population average variance over U ∼ p a U\sim p_a U ∼ p a as B ~ j 2 \widetilde{B}_j^2 B j 2 and V ~ j \widetilde{V}_j V j :
B j ( u , a ) = E [ s ^ j ( u , a ) ] − s j ( u , a ) V j ( u , a ) = Var ( s ^ j ( u , a ) ) (11) B_j(u,a) = E[\hat{s}_j(u,a)] - s_j(u,a) \qquad V_j(u,a) = \operatorname{Var}(\hat{s}_j(u,a)) \tag*{(11)} B j ( u , a ) = E [ s ^ j ( u , a )] − s j ( u , a ) V j ( u , a ) = Var ( s ^ j ( u , a )) (11)
B ~ j 2 ( a ) = E U ∼ p a [ B j 2 ( U , a ) ] V ~ j ( a ) = E U ∼ p a [ V j ( U , a ) ] . (12) \widetilde{B}_j^2(a) = E_{U\sim p_a}[B_j^2(U,a)] \qquad\widetilde{V}_j(a) = E_{U\sim p_a}[V_j(U,a)]. \tag*{(12)} B j 2 ( a ) = E U ∼ p a [ B j 2 ( U , a )] V j ( a ) = E U ∼ p a [ V j ( U , a )] . (12)
In a score-based diffusion, which is a discrete approximation to a continuous SDE, the terminal KL error between the target π \pi π and the density produced by sampling can be decomposed into three contributions: discrete step size error, initialization error, and path averaged score error [20 , 14 , 5 , 4 , 1 , 6 , 22 ] . The third source of error is a property of the quality of the score estimator and can be expressed for some weight function ω \omega ω as the average of population-wide squared bias and variance,
∫ 0 1 ω ( a ) E U ∼ p a [ E [ ∥ s ^ ( u , a ) − s ( u , a ) ∥ 2 ] ] d a = ∑ j ∫ 0 1 ω ( a ) ( B ~ j 2 ( a ) + V ~ j ( a ) ) d a . (13) \int_0^1 \omega(a) E_{U\sim p_a}\left[E\left[\lVert\hat{s}(u,a)-s(u,a)\rVert^2\right]\right] \, da = \sum_j \int_0^1 \omega(a)\left(\widetilde{B}_j^2(a) + \widetilde{V}_j(a)\right) \, da. \tag*{(13)} ∫ 0 1 ω ( a ) E U ∼ p a [ E [ ∥ s ^ ( u , a ) − s ( u , a ) ∥ 2 ] ] d a = j ∑ ∫ 0 1 ω ( a ) ( B j 2 ( a ) + V j ( a ) ) d a . (13)
The score error decomposes by coordinate j j j , and our affine post-processor fits each coordinate j j j independently. As such, we now suppress the index j j j from our notation and consider this method as repeated in each coordinate. We define L 2 L^2 L 2 error of an affine post-processing vector as the functional
J ( h , g , ν , a 0 ) = E U ∼ p a [ E [ ( s ˉ ( u , a 0 ) − s ( u , a 0 ) ) 2 ] ] . (14) J(h,g,\nu,a_0) = E_{U\sim p_a}\left[E\left[(\bar{s}(u,a_0)-s(u,a_0))^2\right]\right]. \tag*{(14)} J ( h , g , ν , a 0 ) = E U ∼ p a [ E [ ( s ˉ ( u , a 0 ) − s ( u , a 0 ) ) 2 ] ] . (14)
Oracle Theory: The Wiener Post-Processor
Fix an on-policy signal level a 0 a_0 a 0 and denote the on-policy U U U -dependent random variables B ( u ) = B ( u , a 0 ) B(u)=B(u,a_0) B ( u ) = B ( u , a 0 ) , s ( u ) = s ( u , a 0 ) s(u)=s(u,a_0) s ( u ) = s ( u , a 0 ) . Since the terminal scores are observations with zero bias and variance, we stack them into a larger observation vector s ^ = ( s ^ ( u , a i ) ) i = 0 N , s ( u , 0 ) , s ( u , 1 ) ∈ R N + 3 \hat{s}=(\hat{s}(u,a_i))_{i=0}^N,s(u,0),s(u,1)\in\mathbb{R}^{N+3} s ^ = ( s ^ ( u , a i ) ) i = 0 N , s ( u , 0 ) , s ( u , 1 ) ∈ R N + 3 with weights h ^ = ( h 0 , … , h N , g 0 , g 1 ) ∈ R N + 3 \hat{h}=(h_0,\ldots,h_N,g_0,g_1)\in\mathbb{R}^{N+3} h ^ = ( h 0 , … , h N , g 0 , g 1 ) ∈ R N + 3 . Define the random variable m ~ ( u ) ∈ R N + 3 \widetilde{m}(u)\in\mathbb{R}^{N+3} m ( u ) ∈ R N + 3 and population average on- and off-policy variance V ∈ R ( N + 3 ) × ( N + 3 ) \mathcal{V}\in\mathbb{R}^{(N+3)\times(N+3)} V ∈ R ( N + 3 ) × ( N + 3 ) as
m ~ i ( u ) = E [ s ^ ( u , a i ) ] = s ( u , a i ) + B ( u , a i ) , V i i = E U ∼ p a 0 [ V ( U , a i ) ] , i = 0 , … , N (15) \widetilde{m}_i(u) = E[\hat{s}(u,a_i)] = s(u,a_i) + B(u,a_i), \qquad\mathcal{V}_{ii}=E_{U\sim p_{a_0}}[V(U,a_i)], \quad i=0,\ldots,N \tag*{(15)} m i ( u ) = E [ s ^ ( u , a i )] = s ( u , a i ) + B ( u , a i ) , V ii = E U ∼ p a 0 [ V ( U , a i )] , i = 0 , … , N (15)
m ~ N + 1 ( u ) = s ( u , 0 ) , m ~ N + 2 ( u ) = s ( u , 1 ) , V i i = 0 , i = N + 1 , N + 2. (16) \widetilde{m}_{N+1}(u)=s(u,0), \qquad\widetilde{m}_{N+2}(u)=s(u,1), \qquad\mathcal{V}_{ii}=0, \quad i=N+1,N+2. \tag*{(16)} m N + 1 ( u ) = s ( u , 0 ) , m N + 2 ( u ) = s ( u , 1 ) , V ii = 0 , i = N + 1 , N + 2. (16)
Then the affine post-processing estimator can be expressed as s ˉ ( u , a 0 ) = ⟨ h ^ , s ^ ( u ) ⟩ − ν \bar{s}(u,a_0)=\langle\hat{h},\hat{s}(u)\rangle-\nu s ˉ ( u , a 0 ) = ⟨ h ^ , s ^ ( u )⟩ − ν with mean ⟨ h ^ , m ~ ( u ) ⟩ − ν \langle\hat{h},\widetilde{m}(u)\rangle-\nu ⟨ h ^ , m ( u )⟩ − ν , and we write J ( h ^ , ν , a 0 ) J(\hat{h},\nu,a_0) J ( h ^ , ν , a 0 ) . Since h ^ , ν \hat{h},\nu h ^ , ν are signal-level dependent but not U U U dependent, they factor out of U U U expectations. As such, J J J can be expressed as a convex quadratic in h ^ , ν \hat{h},\nu h ^ , ν with a single closed form minimizer called the Wiener oracle.
Theorem 1. Writing z = ( h ~ , ν ) ∈ R N + 4 z=(\tilde{h},\nu)\in\mathbb{R}^{N+4} z = ( h ~ , ν ) ∈ R N + 4 and m ~ = m ~ ( U ) \tilde{m}=\tilde{m}(U) m ~ = m ~ ( U ) , s = s ( U ) s=s(U) s = s ( U ) , J J J is the explicit convex quadratic
J ( z , a 0 ) = z T M ( a 0 ) z + μ ( a 0 ) T z + E U ∼ p a 0 [ s 2 ] , (17) J(z,a_0)=z^{\mathsf{T}}\mathcal{M}(a_0)z+\mu(a_0)^{\mathsf{T}}z+E_{U\sim p_{a_0}}[s^2], \tag*{(17)} J ( z , a 0 ) = z T M ( a 0 ) z + μ ( a 0 ) T z + E U ∼ p a 0 [ s 2 ] , (17) M = ( E U ∼ p a 0 [ m ~ m ~ T ] + V − E U ∼ p a 0 [ m ~ ] − E U ∼ p a 0 [ m ~ ] T 1 ) , μ = ( − 2 Cov U ∼ p a 0 [ m ~ s ] 0 ) . (18) \mathcal{M}=\begin{pmatrix} E_{U\sim p_{a_0}}[\tilde{m}\tilde{m}^{\mathsf{T}}]+\mathcal{V} & -E_{U\sim p_{a_0}}[\tilde{m}] \\ -E_{U\sim p_{a_0}}[\tilde{m}]^{\mathsf{T}} & 1 \end{pmatrix},\qquad
\mu=\begin{pmatrix} -2\operatorname{Cov}_{U\sim p_{a_0}}[\tilde{m}s] \\ 0 \end{pmatrix}. \tag*{(18)} M = ( E U ∼ p a 0 [ m ~ m ~ T ] + V − E U ∼ p a 0 [ m ~ ] T − E U ∼ p a 0 [ m ~ ] 1 ) , μ = ( − 2 Cov U ∼ p a 0 [ m ~ s ] 0 ) . (18) The minimum of J J J is always attained. When Cov U ∼ p a 0 ( m ~ ) + V \operatorname{Cov}_{U\sim p_{a_0}}(\tilde{m})+\mathcal{V} Cov U ∼ p a 0 ( m ~ ) + V is invertible the minimizer is unique and given by the Wiener estimator below; otherwise, replacing the inverse by the Moore–Penrose pseudo-inverse gives the minimum-norm minimizer.
h ~ ∗ ( a 0 ) = [ Cov U ∼ p a 0 ( m ~ ) + V ] − 1 Cov U ∼ p a 0 ( m ~ , s ) , ν ∗ ( a 0 ) = h ~ ∗ ( a 0 ) T E U ∼ p a 0 [ m ~ ] . (19) \tilde{h}^{*}(a_0)=\left[\operatorname{Cov}_{U\sim p_{a_0}}(\tilde{m})+\mathcal{V}\right]^{-1}\operatorname{Cov}_{U\sim p_{a_0}}(\tilde{m},s),\qquad
\nu^{*}(a_0)=\tilde{h}^{*}(a_0)^{\mathsf{T}}E_{U\sim p_{a_0}}[\tilde{m}]. \tag*{(19)} h ~ ∗ ( a 0 ) = [ Cov U ∼ p a 0 ( m ~ ) + V ] − 1 Cov U ∼ p a 0 ( m ~ , s ) , ν ∗ ( a 0 ) = h ~ ∗ ( a 0 ) T E U ∼ p a 0 [ m ~ ] . (19)
Corollary 1. With m ~ \tilde{m} m ~ , s s s , B B B as U U U dependent random variables as in Theorem 1, let z o n = ( e 0 , 0 ) z_{\mathrm{on}}=(e_0,0) z on = ( e 0 , 0 ) , with e 0 = ( 1 , 0 , … , 0 ) ∈ R N + 3 e_0=(1,0,\ldots,0)\in\mathbb{R}^{N+3} e 0 = ( 1 , 0 , … , 0 ) ∈ R N + 3 , denote the on-policy estimator. The gradient of J J J at z o n z_{\mathrm{on}} z on is
∂ ν J ( z o n , a 0 ) = − 2 E U ∼ p a 0 [ B ] ∂ h ~ 0 J ( z o n , a 0 ) = 2 ( Cov U ∼ p a 0 [ B s ] + J ( z o n , a 0 ) ) , (20) \partial_{\nu}J(z_{\mathrm{on}},a_0)=-2E_{U\sim p_{a_0}}[B]\qquad
\partial_{\tilde{h}_0}J(z_{\mathrm{on}},a_0)=2\left(\operatorname{Cov}_{U\sim p_{a_0}}[Bs]+J(z_{\mathrm{on}},a_0)\right), \tag*{(20)} ∂ ν J ( z on , a 0 ) = − 2 E U ∼ p a 0 [ B ] ∂ h ~ 0 J ( z on , a 0 ) = 2 ( Cov U ∼ p a 0 [ B s ] + J ( z on , a 0 ) ) , (20) ∂ h ~ i J ( z o n , a 0 ) = 2 E U ∼ p a 0 [ B m ~ i ] , i = 1 , … , N + 2. (21) \partial_{\tilde{h}_i}J(z_{\mathrm{on}},a_0)=2E_{U\sim p_{a_0}}[B\tilde{m}_i],\qquad i=1,\ldots,N+2. \tag*{(21)} ∂ h ~ i J ( z on , a 0 ) = 2 E U ∼ p a 0 [ B m ~ i ] , i = 1 , … , N + 2. (21) The on-policy estimator is the Wiener optimal solution if and only if
E U ∼ p a 0 [ B ] = 0 , Cov U ∼ p a 0 ( B , s ) = − J ( z o n , a 0 ) , (22) E_{U\sim p_{a_0}}[B]=0,\qquad\operatorname{Cov}_{U\sim p_{a_0}}(B,s)=-J(z_{\mathrm{on}},a_0), \tag*{(22)} E U ∼ p a 0 [ B ] = 0 , Cov U ∼ p a 0 ( B , s ) = − J ( z on , a 0 ) , (22) E U ∼ p a 0 [ B m ~ i ] = 0 , i = 1 , … , N + 2. (23) E_{U\sim p_{a_0}}[B\tilde{m}_i]=0,\qquad i=1,\ldots,N+2. \tag*{(23)} E U ∼ p a 0 [ B m ~ i ] = 0 , i = 1 , … , N + 2. (23) If any of these fails, some z = ( h ~ , ν ) z=(\tilde{h},\nu) z = ( h ~ , ν ) , depending only on the signal level a 0 a_0 a 0 , strictly reduces the population-average squared bias and variance relative to pure on-policy estimation.
Corollary 2. Assume the base estimator is unbiased, E [ s ^ ( u , a ) ] = s ( u , a ) E[\hat{s}(u,a)]=s(u,a) E [ s ^ ( u , a )] = s ( u , a ) for all ( u , a ) (u,a) ( u , a ) . If E U ∼ p a 0 [ V ( U , a 0 ) ] > 0 E_{U\sim p_{a_0}}[\mathcal{V}(U,a_0)]>0 E U ∼ p a 0 [ V ( U , a 0 )] > 0 , then z o n z_{\mathrm{on}} z on is not the Wiener optimal solution: some affine post-processor has strictly smaller population-average squared bias and variance than pure on-policy estimation.
Non-Oracle Post-Processors: Legendre Polynomial Regression
The Wiener estimator cannot be computed in practice, since it requires knowledge of the score itself as well as other population average quantities which are not known. As such, other sub-optimal choices of h ~ \tilde{h} h ~ must be implemented, and we set ν = 0 \nu=0 ν = 0 throughout.
Fix an orthogonal functional basis { ϕ k } k ≥ 0 \{\phi_k\}_{k\geq0} { ϕ k } k ≥ 0 on L 2 [ 0 , 1 ] L^2[0,1] L 2 [ 0 , 1 ] such as Legendre polynomials. For some finite degree K K K , define the design matrix Φ i , k = ϕ k ( a i ) \Phi_{i,k}=\phi_k(a_i) Φ i , k = ϕ k ( a i ) whose columns are the basis functions evaluated at the signal levels, and the rows are evaluations at the same signal level. We denote the top row (row 0) of the design matrix as the vector, b = ( ϕ 0 ( a 0 ) , … , ϕ K ( a 0 ) ) b=(\phi_0(a_0),\ldots,\phi_K(a_0)) b = ( ϕ 0 ( a 0 ) , … , ϕ K ( a 0 )) , the on-policy evaluations of the functional basis. Denote the terminal evaluations of the basis functions as Ψ ∈ R 2 × ( K + 1 ) \Psi\in\mathbb{R}^{2\times(K+1)} Ψ ∈ R 2 × ( K + 1 ) , Ψ 0 , k = ϕ k ( 0 ) \Psi_{0,k}=\phi_k(0) Ψ 0 , k = ϕ k ( 0 ) , Ψ 1 , k = ϕ k ( 1 ) \Psi_{1,k}=\phi_k(1) Ψ 1 , k = ϕ k ( 1 ) . Write s ^ ( u ) = ( s ^ ( u , a 0 ) , … , s ^ ( u , a N ) ) \hat{\mathbf{s}}(u)=(\hat{s}(u,a_0),\ldots,\hat{s}(u,a_N)) s ^ ( u ) = ( s ^ ( u , a 0 ) , … , s ^ ( u , a N )) for the vector of score queries and v ( u ) = ( s ( u , 0 ) , s ( u , 1 ) ) v(u)=(s(u,0),s(u,1)) v ( u ) = ( s ( u , 0 ) , s ( u , 1 )) for the known terminal scores. For weights ( h , g ) (h,g) ( h , g ) , the defect vector δ ( h , g ) = Φ T h + Ψ T g − b ∈ R K + 1 \delta(h,g)=\Phi^{\mathsf{T}}h+\Psi^{\mathsf{T}}g-b\in\mathbb{R}^{K+1} δ ( h , g ) = Φ T h + Ψ T g − b ∈ R K + 1 measures how far the post-processor is from reproducing each basis function exactly at a 0 a_0 a 0 .
The affine post-processor can be constructed by fitting a set of coefficients in the functional basis and evaluating at the location a 0 a_0 a 0 , or fitting the ( h , g ) (h,g) ( h , g ) vector directly in an adjoint minimization problem.
Theorem 2. Assume Φ \Phi Φ has full column rank (N ≥ K N \ge K N ≥ K ) and Ψ \Psi Ψ has full row rank. Let Σ ∈ R ( N + 1 ) × ( N + 1 ) \Sigma\in\mathbb{R}^{(N+1)\times(N+1)} Σ ∈ R ( N + 1 ) × ( N + 1 ) be symmetric positive definite, and λ > 0 \lambda> 0 λ > 0 . Let Ω \Omega Ω be diagonal with Ω k , k ∈ ( 0 , ∞ ) \Omega_{k,k} \in(0,\infty) Ω k , k ∈ ( 0 , ∞ ) for k ∉ K k \notin\mathcal{K} k ∈ / K and Ω k , k = ∞ \Omega_{k,k} = \infty Ω k , k = ∞ for k ∈ K k \in\mathcal{K} k ∈ K , with the convention 1 / ∞ = 0 1/\infty= 0 1/∞ = 0 , so that the coefficients indexed by K ⊂ { 0 , … , K } \mathcal{K} \subset\{0,\ldots,K\} K ⊂ { 0 , … , K } are unpenalized. Consider ridge regression constrained to reproduce the terminal scores,
β ∗ ( u ) = arg min β ∈ R K + 1 ( s ^ ( u ) − Φ β ) T Σ − 1 ( s ^ ( u ) − Φ β ) + λ β T Ω − 1 β s.t. Ψ β = v ( u ) , (24) \beta^*(u) = \underset{\beta\in\mathbb{R}^{K+1}}{\arg\min}\;(\hat{s}(u)-\Phi\beta)^{\mathsf{T}}\Sigma^{-1}(\hat{s}(u)-\Phi\beta)+\lambda\beta^{\mathsf{T}}\Omega^{-1}\beta\quad\text{s.t.}\quad\Psi\beta=v(u), \tag*{(24)} β ∗ ( u ) = β ∈ R K + 1 arg min ( s ^ ( u ) − Φ β ) T Σ − 1 ( s ^ ( u ) − Φ β ) + λ β T Ω − 1 β s.t. Ψ β = v ( u ) , (24) and its adjoint problem
( h ∗ , g ∗ ) = arg min h ∈ R N + 1 , g ∈ R 2 ∑ k ∉ K Ω k , k δ k ( h , g ) 2 + λ h T Σ h s.t. δ k ( h , g ) = 0 , k ∈ K . (25) (h^*,g^*)=\underset{h\in\mathbb{R}^{N+1},\,g\in\mathbb{R}^{2}}{\arg\min}\;\sum_{k\notin\mathcal{K}}\Omega_{k,k}\delta_k(h,g)^2+\lambda h^{\mathsf{T}}\Sigma h \quad\text{s.t.}\quad\delta_k(h,g)=0,\ k\in\mathcal{K}. \tag*{(25)} ( h ∗ , g ∗ ) = h ∈ R N + 1 , g ∈ R 2 arg min k ∈ / K ∑ Ω k , k δ k ( h , g ) 2 + λ h T Σ h s.t. δ k ( h , g ) = 0 , k ∈ K . (25) Both problems have unique solutions, and for every realization of s ^ ( u ) \hat{s}(u) s ^ ( u ) ,
s ˉ ( u , a 0 ) = ∑ k = 0 K β k ∗ ( u ) ϕ k ( a 0 ) = ∑ i = 0 N h i ∗ s ^ ( u , a i ) + g 0 ∗ s ( u , 0 ) + g 1 ∗ s ( u , 1 ) . (26) \bar{s}(u,a_0)=\sum_{k=0}^{K}\beta_k^*(u)\phi_k(a_0)=\sum_{i=0}^{N}h_i^*\hat{s}(u,a_i)+g_0^*s(u,0)+g_1^*s(u,1). \tag*{(26)} s ˉ ( u , a 0 ) = k = 0 ∑ K β k ∗ ( u ) ϕ k ( a 0 ) = i = 0 ∑ N h i ∗ s ^ ( u , a i ) + g 0 ∗ s ( u , 0 ) + g 1 ∗ s ( u , 1 ) . (26) Writing A = Φ T Σ − 1 Φ + λ Ω − 1 A=\Phi^{\mathsf{T}}\Sigma^{-1}\Phi+\lambda\Omega^{-1} A = Φ T Σ − 1 Φ + λ Ω − 1 , G = Ψ A − 1 Ψ T G=\Psi A^{-1}\Psi^{\mathsf{T}} G = Ψ A − 1 Ψ T and P = I − A − 1 Ψ T G − 1 Ψ P=I-A^{-1}\Psi^{\mathsf{T}}G^{-1}\Psi P = I − A − 1 Ψ T G − 1 Ψ , the solutions are
β ∗ ( u ) = P A − 1 Φ T Σ − 1 s ^ ( u ) + A − 1 Ψ T G − 1 v ( u ) , (27) \beta^*(u)=PA^{-1}\Phi^{\mathsf{T}}\Sigma^{-1}\hat{s}(u)+A^{-1}\Psi^{\mathsf{T}}G^{-1}v(u), \tag*{(27)} β ∗ ( u ) = P A − 1 Φ T Σ − 1 s ^ ( u ) + A − 1 Ψ T G − 1 v ( u ) , (27) h ∗ = Σ − 1 Φ A − 1 P T b , g ∗ = G − 1 Ψ A − 1 b . (28) h^*=\Sigma^{-1}\Phi A^{-1}P^{\mathsf{T}}b,\qquad g^*=G^{-1}\Psi A^{-1}b. \tag*{(28)} h ∗ = Σ − 1 Φ A − 1 P T b , g ∗ = G − 1 Ψ A − 1 b . (28) Proof. See a further discussion of the ridge regression theory in Appendix A.2, and a full proof in Lemma 5 which follows from the KKT conditions for constrained convex minimization problems.
In practice we take Ω \Omega Ω and Σ \Sigma Σ diagonal, with K = { 0 } \mathcal{K}=\{0\} K = { 0 } so the fit reproduces constants exactly, and Ω k , k = k − 3 \Omega_{k,k}=k^{-3} Ω k , k = k − 3 for k ≥ 1 k\ge1 k ≥ 1 , so that λ ∑ k ≥ 1 k 3 β k 2 \lambda\sum_{k\ge1}k^3\beta_k^2 λ ∑ k ≥ 1 k 3 β k 2 acts as a roughness penalty on the fitted polynomial. For Σ \Sigma Σ we use either Σ = I \Sigma=I Σ = I , which costs nothing but assumes equal variance at every design level, or the diagonal estimate Σ ^ i , i ( u ) = Var ( s ^ ( u , a i ) ) \hat{\Sigma}_{i,i}(u)=\operatorname{Var}(\hat{s}(u,a_i)) Σ ^ i , i ( u ) = Var ( s ^ ( u , a i )) from repeated calls to the base estimator, which turns the fit into inverse-variance weighted regression at the cost of extra queries. With V i ∈ { 1 , Σ ^ i , i } V_i\in\{1,\hat{\Sigma}_{i,i}\} V i ∈ { 1 , Σ ^ i , i } the adjoint problem (25) becomes
min h ∈ R N + 1 , g ∈ R 2 ∑ k = 1 K 1 k 3 ( ∑ i = 0 N h i ϕ k ( a i ) + g 0 ϕ k ( 0 ) + g 1 ϕ k ( 1 ) − ϕ k ( a 0 ) ) 2 + λ ∑ i = 0 N V i h i 2 \underset{h\in\mathbb{R}^{N+1},\,g\in\mathbb{R}^{2}}{\min}\;\sum_{k=1}^{K}\frac{1}{k^3}\left(\sum_{i=0}^{N}h_i\phi_k(a_i)+g_0\phi_k(0)+g_1\phi_k(1)-\phi_k(a_0)\right)^2+\lambda\sum_{i=0}^{N}V_i h_i^2 h ∈ R N + 1 , g ∈ R 2 min k = 1 ∑ K k 3 1 ( i = 0 ∑ N h i ϕ k ( a i ) + g 0 ϕ k ( 0 ) + g 1 ϕ k ( 1 ) − ϕ k ( a 0 ) ) 2 + λ i = 0 ∑ N V i h i 2 s.t. ∑ i = 0 N h i ϕ k ( a i ) + g 0 ϕ k ( 0 ) + g 1 ϕ k ( 1 ) = ϕ k ( a 0 ) , k = 0. (29) \text{s.t.}\quad\sum_{i=0}^{N}h_i\phi_k(a_i)+g_0\phi_k(0)+g_1\phi_k(1)=\phi_k(a_0),\qquad k=0. \tag*{(29)} s.t. i = 0 ∑ N h i ϕ k ( a i ) + g 0 ϕ k ( 0 ) + g 1 ϕ k ( 1 ) = ϕ k ( a 0 ) , k = 0. (29) The solution ( h ∗ , g ∗ ) (h^*,g^*) ( h ∗ , g ∗ ) depends on a 0 a_0 a 0 , the design levels and V V V , but not on the observed values s ^ ( u ) \hat{s}(u) s ^ ( u ) or v ( u ) v(u) v ( u ) : it is a fixed rule applied to every score query at signal level a 0 a_0 a 0 , which is clear from the adjoint form and hidden in the β \beta β form. Appendix A.2 gives the full ridge-regression derivation.
Experiments We evaluate post-processing along three axes, each stressed by its own family of targets (defined in Appendix C). Section 4.1 tests ill-conditioning , on a Gaussian N ( 0 , Λ κ ) \mathcal{N}(0,\Lambda_\kappa) N ( 0 , Λ κ ) with eigenvalues log-spaced over [ 1 , κ ] [1,\kappa] [ 1 , κ ] , and geometry , on a banana-shaped (twisted) Gaussian, a zero-mean mixture
of Gaussians with orthogonally oriented covariances, and an ill-conditioned ellipsoidal shell. Section 4.2 tests multimodality , on a two-component anisotropic mixture under increasing separation, an eight-mode mixture of Gaussians with unequal widths at the vertices of a rotated hypercube, and a 40-mode mixture of narrow isotropic Gaussians. In both sections we demonstrate improved dimension dependence.
Baselines and protocol. We consider diffusion-based samplers including RDMC [10 ] and IS as the score estimator, with and without post-processing. Due to the poor dimension dependence of the rejection sampling estimator ZODMC [9 ] we skip this score estimator in our analysis. The samplers share the same M = 20 M = 20 M = 20 -step reverse loop in (6), in order to isolate the score estimation. We also test classical samplers: unadjusted Langevin (LMC), no U-turn sampler (NUTS), and parallel tempering (PT). All samplers are compute-matched to the same number of gradient evaluations (60K per score query, 1.2M per particle) and hyperparameters are detailed in Table 1 . Unless stated otherwise, we report the Wasserstein distance (W 2 W_2 W 2 ) averaged over 3 seeds, with error bars for the minimum and maximum across seeds.
Table 1. Choice of hyperparameters for different methods
Post-Processing improves score estimation for unimodal targets
Although diffusion-based samplers excel at sampling from low-dimensional multimodal targets [9 ] , in high-dimensional unimodal situations their performance can be underwhelming. We demonstrate that post-processing can address this issue and that its advantages grow with dimension.
Improved condition number dependence: On the ill-conditioned Gaussian we sweep both dimension and condition number. Figure 1 reports the results of this experiment. For both IS and RDMC post-processing increases the accuracy of the generated samples, at high dimensions showing an order of magnitude reduction in W 2 W_2 W 2 and noticeably more concentrated samples to the ground truth density.
Figure 1. (a),(b) Mean W 2 W_2 W 2 for an Ill-conditioned Gaussian against the condition number κ \kappa κ . Post-processing improves dependency against dimension and κ \kappa κ . (c), (d) The base estimators generate scattered samples projected onto two dimensions, our approach recovers the true distribution.
We recall the L 2 L^2 L 2 error function of an affine post-processor J \mathcal{J} J defined in (14). In Figure 2 we plot the average across dimension J \mathcal{J} J for the base estimator, the Wiener oracle post-processing (maximal signal that could be recovered) and compare it to our post-processed score. We find that our estimator can recover a significant portion of the Wiener oracle. Interestingly, different base estimators have distinct J \mathcal{J} J profiles depending on the time region where the score is hardest to estimate.
Figure 2. Score error for a log-concave target at d = 10 d = 10 d = 10 , κ = 10 \kappa= 10 κ = 10 . Left: Average score error, for the base estimator, ours and the Wiener oracle. Right: Normalized weight of linear smoother vector ∣ h ∣ |h| ∣ h ∣ , each column is a vector, optimal allocations do not place all the weight on a single point.
Improved geometry adherence: We next test the three geometry targets, whose mass concentrates on non-elliptical regions. Classical chains mix well on such targets, so we would expect them to outperform a diffusion sampler. The main comparison for these examples is diffusion sampling with and without post processing.
Figure 3 shows that the IS base diffusion sampler fails on all three targets, and fails more as the dimension grows. RDMC performs poorly on the Banana target and better on the other two. For instance, at the largest dimension, W 2 W_2 W 2 distance of IS is more than an order of magnitude worse than the classical methods on every target, and RDMC is as far off on the banana. Post-processing the same estimators closes this gap: at every dimension both samplers match the classical methods, with the relative improvements growing with the dimension. This experiment demonstrates that although the base estimators may not explore the space well enough to estimate the score accurately, they carry enough information to construct an accurate estimation when post-processed. Figure 4 confirms this by looking at the score error itself on the orthogonal mixture and the 40-mode mixture of § 4.2 : post-processing lowers it at almost every noise level, and captures most of the improvement available when compared to the Wiener oracle.
Figure 3. Geometry targets, W 2 W_2 W 2 against dimension. The base diffusion samplers degrade with dimension; post-processing closes the gap to the classical methods.
Figure 4. Average score error. When compared to the base estimator, post-processing reduces the score estimation error. The orange band denotes possible improvement given the evaluated samples.
Post-Processing improves score estimation for multimodal targets
Improved dimension dependence on multimodal targets: We consider two multimodal targets: a specifically chosen 8-mode GMM target with separated modes, and a 40-mode GMM with randomly generated modes. On the eight-mode mixture we sweep d d d from 10 to 100 using 1,000 particles. We report W 2 W_2 W 2 on the 7-dimensional span of their centers to better capture the mode structure.
Figure 5 (a,b) shows the result. Raw importance sampling degrades quickly with dimension, while post-processing the same estimator keeps its W 2 W_2 W 2 roughly constant from d = 10 d = 10 d = 10 to d = 100 d = 100 d = 100 , furthermore, plotting the first two PCA components of the generated samples demonstrate that all modes were sampled from although not uniformly. On the other hand, RDMC suffers from metastability on this target and struggles to sample from each mode. In such a case, post-processing is not able to improve the generation as the space does not get explored appropriately as with IS. Panels (c) and (d) repeat this analysis on the 40-mode mixture, whose modes are closer together but more numerous. Plotting the first two coordinates at d = 30 d = 30 d = 30 shows that both IS and RDMC place almost no samples on the modes, while their post-processed versions do and stay on par with the classical chains.
Figure 5. W 2 W_2 W 2 against dimension and samples. (a,b) the hypercube mixture and (c,d) the 40-mode GMM. In high dimensions base diffusion samplers miss most modes; post-processing finds them.
Where the method stops improving upon the base estimator. We evaluate the sampler’s ability to sample under increasing mode separation , using the two-component anisotropic mixture with 0.7/0.3 weights and sweeping the Mahalanobis distance between its modes. At lower levels of separation our method significantly outperforms the base sampler. We also see the post processing vector is spreading mass across signal levels at low separation levels in Figure 6 (b) and (c).
Figure 6. Two-component mixture at d = 10 d = 10 d = 10 . (a) W 2 W_2 W 2 against mode separation. (b)–(e) Weights ∣ h i ∣ |h_i| ∣ h i ∣ per design level (rows) and query level a 0 a_0 a 0 (columns). At separation 64 the Wiener oracle puts almost all its weight on the on-policy query, so no affine post-processor can improve on it.
However, as observed in Figure 6 panels (d) and (e), as the separation increases, the Wiener oracle estimation collapses to the on-policy estimator. In this case, spending the full estimation budget on-policy offers slight improvement over splitting the budget and post-processing: Figure 6 (a) shows on-policy computation matched estimation with lower W 2 W_2 W 2 levels.
Conclusion and Future Works
We introduce an affine post-processing approach to score estimation. We demonstrate, with a random score estimator with nonzero bias and variance, on-policy estimation is almost never the best use of a fixed computation budget for score estimation. Splitting a compute budget across queries and fitting an affine combination of the values gives a lower error. This allows us to scale diffusion-based approaches to higher dimensions, while retaining the benefits of the score-based samplers.
Post-processing is an additional step built on top of a base score estimator. When the base queries become so corrupted they supply little useful off-policy information, the optimal post-processing rule can collapse to pure on-policy estimation. In this case, the sample budget spent on off-policy queries is not utilized, and some small improvement is seen by spending the full estimation budget on-policy to slightly increase the effective sample size. For this reason, improving the base estimator’s exploration of the space is an area that still admits further exploration. Future work includes choosing the design levels adaptively, and deriving theoretical bounds for score estimation error for the practical, non-oracle rule.
AI use statement
Generative AI was utilized for verifying proofs, formulating mathematical claims, assisting in the writing of proofs, suggesting edits to mathematical formulations, and designing or providing feedback on research methodology and experiments. All theorems and proofs originated as constructs by the authors, with AI-suggested edits and changes added after the fact. Proofs are verified as correct by the authors and also independently verified by AI checks. Proofs are never copied entirely from AI sources without modification. Generative AI proofs are read by the authors as secondary sources, and relevant suggestions incorporated into a preexisting human generated proof as an improvement for clarity.
The decomposition of the population-wide error into a quadratic form in Theorem 1 was first constructed by the authors, but AI assisted literature review suggested the name of the Wiener form and connection to past literature.
Additionally, Generative AI was used for summarizing or analyzing existing literature, discovering research topics or identifying gaps, brainstorming, sourcing/searching for information, editing to improve readability, and identifying relevant literature.
Generative AI was not utilized to generate synthetic data sets, help develop theoretical models or conceptual frameworks, provide critical ingredients for proving mathematical claims, propose or refine hypotheses, assist with translation, clean and reformat datasets, support qualitative and thematic data analysis, or interpret results. The distinction between “provide critical ingredients for proving mathematical claims” and “assist in the writing of proofs” for the authors is that no mathematical formulations originated as a purely Generative AI construct, but all contributions added on top of an original human generated concept or proof as a refinement.
For the experimental code, the authors first wrote a base implementation of the estimators, samplers, and evaluation pipeline. Generative AI was subsequently used to write the scripts that launch and organize experimental runs (e.g., sweeps over hyperparameters, seeds, and problem dimensions), to revise the existing code base, and to produce the plotting code. All AI-generated or AI-modified code was reviewed by the authors. Generative AI was also used as a writing aid, offering edits to improve the clarity and readability of the text.
We take responsibility for the final content of this work, including text, claims or artifacts produced with the aid of generative AI.
Acknowledgments
We gratefully acknowledge the support of the NSF for FODSI through grant DMS-2023505, of the NSF and the Simons Foundation for the Collaboration on the Theoretical Foundations of Deep Learning through awards DMS-2031883 and 814639, and of the ONR through MURI award N000142112431, and a research grant from Bridgewater to the Simons Institute.
Appendix
Oracle Smoother Theory Proofs and Supporting Lemmas
Proof of Theorem 1
Proof. Fix the on-policy signal level a 0 a_0 a 0 , the grid of off-policy signal levels ( a i ) i = 1 N + 2 (a_i)_{i=1}^{N+2} ( a i ) i = 1 N + 2 , and a coordinate j j j whose index is suppressed in the notation throughout the proof. Note that z z z is not a U U U dependent object. Denote random variables for the score estimates as s ^ i ( u ) = s ^ ( u , a i ) \hat{s}_i(u)=\hat{s}(u,a_i) s ^ i ( u ) = s ^ ( u , a i ) , and let s ( u ) = s ( u , a 0 ) s(u)=s(u,a_0) s ( u ) = s ( u , a 0 ) be the true score. The expected L 2 L^2 L 2 error for the affine post-processing estimator is then
J ( z , a 0 ) = E U ∼ p a 0 [ E [ ( s ( U ) − z T ( s ^ ( U ) − 1 ) ) 2 ] ] , (30) J(z,a_0)=\mathbb{E}_{U\sim p_{a_0}}\left[\mathbb{E}\left[\left(s(U)-z^{T}\begin{pmatrix}\hat{s}(U)\\-1\end{pmatrix}\right)^2\right]\right], \tag*{(30)} J ( z , a 0 ) = E U ∼ p a 0 [ E [ ( s ( U ) − z T ( s ^ ( U ) − 1 ) ) 2 ] ] , (30)
where the outer expectation is over locations U U U distributed according to the marginal p a 0 p_{a_0} p a 0 , and the inner expectation is over the internal randomness of the score estimator at a fixed U U U value. Assume at a fixed U U U all s ^ i ( U ) \hat{s}_i(U) s ^ i ( U ) are independent queries to the score estimator and are independent random variables. Perform a bias-variance decomposition on the inner expectation over internal randomness,
E U ∼ p a 0 [ ( s ( U ) − z T ( m ~ ( U ) − 1 ) ) 2 + Var ( h ~ T s ^ ) ] . (31) E_{U\sim p_{a_0}}\left[(s(U)-z^{T}\begin{pmatrix}\tilde{m}(U)\\-1\end{pmatrix})^2+\operatorname{Var}(\tilde{h}^{T}\hat{s})\right]. \tag*{(31)} E U ∼ p a 0 [ ( s ( U ) − z T ( m ~ ( U ) − 1 ) ) 2 + Var ( h ~ T s ^ ) ] . (31)
By the independence of the s ^ \hat{s} s ^ estimators the variance of the sum decomposes into the sum of the variances. Expand the squared bias term and we have expression,
E U ∼ p a 0 [ z T ( m ~ ( U ) − 1 ) ( m ~ ( U ) − 1 ) T z − 2 z T ( s ( U ) m ~ ( U ) − s ( U ) ) + s ( U ) 2 + h T V ( u , a i ) h ] . (32) E_{U\sim p_{a_0}}\left[z^{T}\begin{pmatrix}\tilde{m}(U)\\-1\end{pmatrix}\begin{pmatrix}\tilde{m}(U)\\-1\end{pmatrix}^{T}z-2z^{T}\begin{pmatrix}s(U)\tilde{m}(U)\\-s(U)\end{pmatrix}+s(U)^2+h^{T}V(u,a_i)h\right]. \tag*{(32)} E U ∼ p a 0 [ z T ( m ~ ( U ) − 1 ) ( m ~ ( U ) − 1 ) T z − 2 z T ( s ( U ) m ~ ( U ) − s ( U ) ) + s ( U ) 2 + h T V ( u , a i ) h ] . (32)
Bring the non-U U U dependent object z z z outside the U U U expectation and this is expressed as a quadratic in z z z ,
z T ( ( E U ∼ p a 0 [ m ~ m ~ T ] + V − E U ∼ p a 0 [ m ~ ] − E U ∼ p a 0 [ m ~ ] 1 ) ) z + z T ( − 2 E U ∼ p a 0 [ s m ~ ] 2 E U ∼ p a 0 [ s ] ) + E U ∼ p a 0 [ s 2 ] (33) z^{T}\left(\begin{pmatrix}E_{U\sim p_{a_0}}[\tilde{m}\tilde{m}^{T}]+\mathcal{V}&-E_{U\sim p_{a_0}}[\tilde{m}]\\-E_{U\sim p_{a_0}}[\tilde{m}]&1\end{pmatrix}\right)z+z^{T}\begin{pmatrix}-2E_{U\sim p_{a_0}}[s\tilde{m}]\\2E_{U\sim p_{a_0}}[s]\end{pmatrix}+E_{U\sim p_{a_0}}[s^2] \tag*{(33)} z T ( ( E U ∼ p a 0 [ m ~ m ~ T ] + V − E U ∼ p a 0 [ m ~ ] − E U ∼ p a 0 [ m ~ ] 1 ) ) z + z T ( − 2 E U ∼ p a 0 [ s m ~ ] 2 E U ∼ p a 0 [ s ] ) + E U ∼ p a 0 [ s 2 ] (33)
= z T M ( a 0 ) z + z T μ ( a 0 ) + E U ∼ p a 0 [ s 2 ] . (34) = z^{T}\mathcal{M}(a_0)z+z^{T}\mu(a_0)+E_{U\sim p_{a_0}}[s^2]. \tag*{(34)} = z T M ( a 0 ) z + z T μ ( a 0 ) + E U ∼ p a 0 [ s 2 ] . (34)
Note the score is mean 0 with respect to its own density by fundamental theorem of calculus,
E U ∼ p a 0 [ s ] = ∫ ∂ u j p a 0 ( u ) d u = 0 (35) E_{U\sim p_{a_0}}[s]=\int\partial_{u_j}p_{a_0}(u)\,du=0 \tag*{(35)} E U ∼ p a 0 [ s ] = ∫ ∂ u j p a 0 ( u ) d u = 0 (35)
as such the first vector of terms in μ ( a 0 ) \mu(a_0) μ ( a 0 ) is a proper covariance, a product with a mean 0 random variable, and the final term is 0.
Assuming M ( a 0 ) \mathcal{M}(a_0) M ( a 0 ) is a full rank matrix, the expression is strictly convex function of z z z and has a unique minimizer. Taking the z z z gradient and setting it to zero gives condition for the critical point
M ( a 0 ) z + 1 2 μ ( a 0 ) = 0 , (36) \mathcal{M}(a_0)z+\frac{1}{2}\mu(a_0)=0, \tag*{(36)} M ( a 0 ) z + 2 1 μ ( a 0 ) = 0 , (36)
which gives conditions on h ~ , ν \tilde{h},\nu h ~ , ν of
( E U ∼ p a 0 [ m ~ m ~ T ] + V ) h ~ − E U ∼ p a 0 [ m ~ ] ν − Cov U ∼ p a 0 [ m ~ , s ] = 0 (37) \left(E_{U\sim p_{a_0}}[\tilde{m}\tilde{m}^{T}]+\mathcal{V}\right)\tilde{h}-E_{U\sim p_{a_0}}[\tilde{m}]\nu-\operatorname{Cov}_{U\sim p_{a_0}}[\tilde{m},s]=0 \tag*{(37)} ( E U ∼ p a 0 [ m ~ m ~ T ] + V ) h ~ − E U ∼ p a 0 [ m ~ ] ν − Cov U ∼ p a 0 [ m ~ , s ] = 0 (37)
− h ~ T E U ∼ p a 0 [ m ~ ] + ν = 0. (38) -\tilde{h}^{T}E_{U\sim p_{a_0}}[\tilde{m}]+\nu=0. \tag*{(38)} − h ~ T E U ∼ p a 0 [ m ~ ] + ν = 0. (38)
Solving for ν \nu ν in terms of h ~ \tilde{h} h ~ we must have
ν = E U ∼ p a 0 [ m ~ ] T h ~ . (39) \nu=E_{U\sim p_{a_0}}[\tilde{m}]^{T}\tilde{h}. \tag*{(39)} ν = E U ∼ p a 0 [ m ~ ] T h ~ . (39)
Substituting this expression for ν \nu ν back into equation (37) turns the second moment term E U ∼ p a 0 [ m ~ m ~ T ] E_{U\sim p_{a_0}}[\tilde{m}\tilde{m}^{T}] E U ∼ p a 0 [ m ~ m ~ T ] into a proper covariance term Cov U ∼ p a 0 [ m ~ ] \operatorname{Cov}_{U\sim p_{a_0}}[\tilde{m}] Cov U ∼ p a 0 [ m ~ ] , which yields solution for h ~ \tilde{h} h ~ as
h ~ ∗ = [ Cov U ∼ p a 0 ( m ~ ) + V ] − 1 Cov U ∼ p a 0 ( m ~ , s ) . (40) \tilde{h}^{*}=\left[\operatorname{Cov}_{U\sim p_{a_0}}(\tilde{m})+\mathcal{V}\right]^{-1}\operatorname{Cov}_{U\sim p_{a_0}}(\tilde{m},s). \tag*{(40)} h ~ ∗ = [ Cov U ∼ p a 0 ( m ~ ) + V ] − 1 Cov U ∼ p a 0 ( m ~ , s ) . (40)
Lemma 1 (Gradient of J J J ). For any h ~ ∈ R N + 3 \tilde{h} \in\mathbb{R}^{N+3} h ~ ∈ R N + 3 and ν ∈ R \nu\in\mathbb{R} ν ∈ R , the partial derivatives of J J J are,
∂ h ~ i J ( h ~ , ν , a 0 ) = 2 ( ∑ j = 0 N + 2 E U ∼ p a 0 [ m ~ i m ~ j ] h ~ j + V i , i h ~ i − E U ∼ p a 0 [ m ~ i ] ν − Cov U ∼ p a 0 [ m ~ i , s ] ) . (41) \partial_{\tilde{h}_i}J(\tilde{h},\nu,a_0)=2\left(\sum_{j=0}^{N+2}E_{U\sim p_{a_0}}[\tilde{m}_i\tilde{m}_j]\tilde{h}_j+V_{i,i}\tilde{h}_i-E_{U\sim p_{a_0}}[\tilde{m}_i]\nu-\operatorname{Cov}_{U\sim p_{a_0}}[\tilde{m}_i,s]\right). \tag*{(41)} ∂ h ~ i J ( h ~ , ν , a 0 ) = 2 ( j = 0 ∑ N + 2 E U ∼ p a 0 [ m ~ i m ~ j ] h ~ j + V i , i h ~ i − E U ∼ p a 0 [ m ~ i ] ν − Cov U ∼ p a 0 [ m ~ i , s ] ) . (41) ∂ ν J ( h ~ , ν , a 0 ) = − 2 ( ∑ j = 0 N + 2 E U ∼ p a 0 [ m ~ j ] h ~ j − ν ) . (42) \partial_{\nu}J(\tilde{h},\nu,a_0)=-2\left(\sum_{j=0}^{N+2}E_{U\sim p_{a_0}}[\tilde{m}_j]\tilde{h}_j-\nu\right). \tag*{(42)} ∂ ν J ( h ~ , ν , a 0 ) = − 2 ( j = 0 ∑ N + 2 E U ∼ p a 0 [ m ~ j ] h ~ j − ν ) . (42) Since J J J is a convex quadratic, ( h , ν ) (h,\nu) ( h , ν ) is the Wiener estimator if and only if all N + 4 N+4 N + 4 derivatives vanish.
Proof. This expression follows from the gradient of a quadratic term
∇ z J ( z , a 0 ) = 2 M ( a 0 ) z + μ ( a 0 ) . (43) \nabla_zJ(z,a_0)=2\mathcal{M}(a_0)z+\mu(a_0). \tag*{(43)} ∇ z J ( z , a 0 ) = 2 M ( a 0 ) z + μ ( a 0 ) . (43) Reading the expressions coordinate by coordinate and using the forms of M ( a 0 ) , μ ( a 0 ) \mathcal{M}(a_0),\mu(a_0) M ( a 0 ) , μ ( a 0 ) as in Theorem 1 gives the equivalent form.
Proof of Corollary 1
Proof. This corollary follows from the gradient expression lemma specialized to z o n = ( e 0 , 0 ) z_{\mathrm{on}}=(e_0,0) z on = ( e 0 , 0 ) . Recall the on-policy score is mean 0 under the density. The partial derivatives specialize to
∂ h ~ i J ( z o n , a 0 ) = 2 ( E U ∼ p a 0 [ m ~ i m ~ 0 ] + V 0 , 0 1 { i = 0 } − Cov U ∼ p a 0 [ m ~ i , s ] ) (44) \partial_{\tilde{h}_i}J(z_{\mathrm{on}},a_0)=2\left(E_{U\sim p_{a_0}}[\tilde{m}_i\tilde{m}_0]+V_{0,0}1\{i=0\}-\operatorname{Cov}_{U\sim p_{a_0}}[\tilde{m}_i,s]\right) \tag*{(44)} ∂ h ~ i J ( z on , a 0 ) = 2 ( E U ∼ p a 0 [ m ~ i m ~ 0 ] + V 0 , 0 1 { i = 0 } − Cov U ∼ p a 0 [ m ~ i , s ] ) (44)
= 2 ( E U ∼ p a 0 [ m ~ ( U , a i ) ( B ( u , a 0 ) + s ( u , a 0 ) ) ] − E U ∼ p a 0 [ m ~ ( U , a i ) s ( u , a 0 ) ] + 2 V 0 , 0 1 { i = 0 } ) (45) =2\left(E_{U\sim p_{a_0}}[\tilde{m}(U,a_i)(B(u,a_0)+s(u,a_0))]-E_{U\sim p_{a_0}}[\tilde{m}(U,a_i)s(u,a_0)]+2V_{0,0}1\{i=0\}\right) \tag*{(45)} = 2 ( E U ∼ p a 0 [ m ~ ( U , a i ) ( B ( u , a 0 ) + s ( u , a 0 ))] − E U ∼ p a 0 [ m ~ ( U , a i ) s ( u , a 0 )] + 2 V 0 , 0 1 { i = 0 } ) (45)
= 2 ( E U ∼ p a 0 [ m ~ i B ] + V 0 , 0 1 { i = 0 } ) . (46) =2\left(E_{U\sim p_{a_0}}[\tilde{m}_iB]+V_{0,0}1\{i=0\}\right). \tag*{(46)} = 2 ( E U ∼ p a 0 [ m ~ i B ] + V 0 , 0 1 { i = 0 } ) . (46)
For i ≠ 0 i\ne0 i = 0 this is equal to 2 E U ∼ p a 0 [ B m ~ i ] 2E_{U\sim p_{a_0}}[B\tilde{m}_i] 2 E U ∼ p a 0 [ B m ~ i ] . For i = 0 i=0 i = 0 , the on-policy expected L 2 L^2 L 2 error is exactly
J ( z o n , a 0 ) = E U ∼ p a 0 [ B 2 ] + V 0 , 0 , (47) J(z_{\mathrm{on}},a_0)=E_{U\sim p_{a_0}}[B^2]+V_{0,0}, \tag*{(47)} J ( z on , a 0 ) = E U ∼ p a 0 [ B 2 ] + V 0 , 0 , (47)
and the derivative can be expressed as 2 ( E U ∼ p a 0 [ B s ] + J ( z o n , a 0 ) ) 2(E_{U\sim p_{a_0}}[Bs]+J(z_{\mathrm{on}},a_0)) 2 ( E U ∼ p a 0 [ B s ] + J ( z on , a 0 )) . The ν \nu ν derivative is expressed as,
∂ ν J ( h ~ , ν , a 0 ) = − 2 E U ∼ p a 0 [ m ~ 0 ] = − 2 E U ∼ p a 0 [ B ] . (48) \partial_{\nu}J(\tilde{h},\nu,a_0)=-2E_{U\sim p_{a_0}}[\tilde{m}_0]=-2E_{U\sim p_{a_0}}[B]. \tag*{(48)} ∂ ν J ( h ~ , ν , a 0 ) = − 2 E U ∼ p a 0 [ m ~ 0 ] = − 2 E U ∼ p a 0 [ B ] . (48)
Proof of Corollary 2
Proof. We take the expressions for the derivative from Corollary 1 and set B = 0 B=0 B = 0 in all cases. Setting the gradient equal to 0, the conditions for the on-policy estimator to be optimal are already satisfied for the h ~ i \tilde{h}_i h ~ i , i ≠ 0 i\ne0 i = 0 derivatives and the ν \nu ν derivative. The only derivative condition to check is the h ~ 0 \tilde{h}_0 h ~ 0 derivative. This derivative is equal to 0 if and only if
J ( z o n , a 0 ) = 0. (49) J(z_{\mathrm{on}},a_0)=0. \tag*{(49)} J ( z on , a 0 ) = 0. (49)
Since there is no bias by assumption, this L 2 L^2 L 2 error is only on-policy variance V 0 , 0 V_{0,0} V 0 , 0 . This population variance is non-negative, and thus the on-policy estimator is the optimal solution if and only if
V 0 , 0 = E U ∼ p a 0 [ Var ( s ^ ( U , a 0 ) ) ] = 0 , (50) V_{0,0}=E_{U\sim p_{a_0}}[\operatorname{Var}(\hat{s}(U,a_0))]=0, \tag*{(50)} V 0 , 0 = E U ∼ p a 0 [ Var ( s ^ ( U , a 0 ))] = 0 , (50)
which means the estimator has no variance. Combined with the unbiased assumption, this would mean the estimator s ^ \hat{s} s ^ returns perfect score readings. For any random, unbiased estimator with some variance so that V 0 , 0 > 0 V_{0,0}>0 V 0 , 0 > 0 , the on-policy estimator is not Wiener optimal.
Additional Ridge Regression Theory
To further connect the two forms of β ∗ \beta^* β ∗ as a coefficient in the functional basis and h ∗ , g ∗ h^*,g^* h ∗ , g ∗ as linear smoother directly on the score estimates, we consider the penalty matrices Σ \Sigma Σ and Ω \Omega Ω as diagonal. We will construct the equivalent ridge regression and adjoint optimization problem in Theorem 2 by first starting with the unconstrained ridge regression solution and then imposing the terminal constraints.
We first review standard ridge regression constructions. Assume initially that g = 0 g=0 g = 0 so we do not impose any terminal constraints and we only fit the h h h vector. Consider that for a fixed u u u and fixed dimension j j j , s j ( u , a ) s_j(u,a) s j ( u , a ) is a continuous function in a ∈ [ 0 , 1 ] a\in[0,1] a ∈ [ 0 , 1 ] . Each s ^ j ( u , a i ) \hat{s}_j(u,a_i) s ^ j ( u , a i ) is a noisy observation of that function, and we can perform ridge regression in a finite K K K basis, which amounts to minimizing the quadratic objective
min β ( s ^ − Φ β ) T Σ − 1 ( s ^ − Φ β ) + λ β T Ω − 1 β . (51) \min_{\beta}(\hat{s}-\Phi\beta)^T\Sigma^{-1}(\hat{s}-\Phi\beta)+\lambda\beta^T\Omega^{-1}\beta. \tag*{(51)} β min ( s ^ − Φ β ) T Σ − 1 ( s ^ − Φ β ) + λ β T Ω − 1 β . (51)
The minimizing parameter via standard ridge regression theory is the vector of estimates put through the linear operator,
β ∗ = ( Φ T Σ − 1 Φ + λ Ω − 1 ) − 1 Φ T Σ − 1 s ^ . (52) \beta^*=(\Phi^T\Sigma^{-1}\Phi+\lambda\Omega^{-1})^{-1}\Phi^T\Sigma^{-1}\hat{s}. \tag*{(52)} β ∗ = ( Φ T Σ − 1 Φ + λ Ω − 1 ) − 1 Φ T Σ − 1 s ^ . (52)
The vector of fit values at each of the observed a i a_i a i locations is then the s ^ \hat{s} s ^ vector put through the shrinkage projection matrix H H H ,
s ˉ = Φ β ∗ = Φ ( Φ T Σ − 1 Φ + λ Ω − 1 ) − 1 Φ T Σ − 1 s ^ ≡ H s ^ . (53) \bar{s}=\Phi\beta^*=\Phi(\Phi^T\Sigma^{-1}\Phi+\lambda\Omega^{-1})^{-1}\Phi^T\Sigma^{-1}\hat{s}\equiv H\hat{s}. \tag*{(53)} s ˉ = Φ β ∗ = Φ ( Φ T Σ − 1 Φ + λ Ω − 1 ) − 1 Φ T Σ − 1 s ^ ≡ H s ^ . (53)
Define b b b as the first row of the Φ \Phi Φ matrix. The evaluation of s ˉ \bar{s} s ˉ at the a 0 a_0 a 0 signal level, which is the first entry of the s ˉ \bar{s} s ˉ vector, is the inner product with the fixed vector h ∗ h^* h ∗ , which is the first row of the matrix H H H ,
s ˉ ( u , a 0 ) = ⟨ h ∗ , s ^ ( u ) ⟩ h ∗ = Σ − 1 Φ ( Φ T Σ − 1 Φ + λ Ω − 1 ) − 1 b . (54) \bar{s}(u,a_0)=\langle h^*,\hat{s}(u)\rangle\qquad h^*=\Sigma^{-1}\Phi(\Phi^T\Sigma^{-1}\Phi+\lambda\Omega^{-1})^{-1}b. \tag*{(54)} s ˉ ( u , a 0 ) = ⟨ h ∗ , s ^ ( u )⟩ h ∗ = Σ − 1 Φ ( Φ T Σ − 1 Φ + λ Ω − 1 ) − 1 b . (54)
We can also construct this h ∗ h^* h ∗ as the solution to its own minimization problem. It is first helpful to decompose the pointwise bias of the affine post-processing estimator into two terms, the transmitted bias and the reproduction error.
Lemma 2 (Bias–variance decomposition). For an affine post-processor with weights h h h , define the transmitted bias and reproduction error
T B ( u , a 0 ) = ∑ i = 0 N h i B ( u , a i ) ρ ( u , a 0 ) = ∑ i = 0 N h i s ( u , a i ) − s ( u , a 0 ) . (55) T_B(u,a_0)=\sum_{i=0}^{N}h_iB(u,a_i) \qquad\rho(u,a_0)=\sum_{i=0}^{N}h_is(u,a_i)-s(u,a_0). \tag*{(55)} T B ( u , a 0 ) = i = 0 ∑ N h i B ( u , a i ) ρ ( u , a 0 ) = i = 0 ∑ N h i s ( u , a i ) − s ( u , a 0 ) . (55) Then, by independence of the queries,
E [ s ˉ ( u , a 0 ) ] − s ( u , a 0 ) = T B ( u , a 0 ) + ρ ( u , a 0 ) , Var ( s ˉ ( u , a 0 ) ) = ∑ i = 0 N h i 2 V ( u , a i ) , (56) \mathbb{E}[\bar{s}(u,a_0)]-s(u,a_0)=T_B(u,a_0)+\rho(u,a_0), \qquad\operatorname{Var}(\bar{s}(u,a_0))=\sum_{i=0}^{N}h_i^2V(u,a_i), \tag*{(56)} E [ s ˉ ( u , a 0 )] − s ( u , a 0 ) = T B ( u , a 0 ) + ρ ( u , a 0 ) , Var ( s ˉ ( u , a 0 )) = i = 0 ∑ N h i 2 V ( u , a i ) , (56) so the expected squared error at ( u , a 0 ) (u,a_0) ( u , a 0 ) is ( T B + ρ ) 2 + ∑ i h i 2 V ( u , a i ) (T_B+\rho)^2+\sum_i h_i^2V(u,a_i) ( T B + ρ ) 2 + ∑ i h i 2 V ( u , a i ) . Post-processing improves on the on-policy estimate at ( u , a 0 ) (u,a_0) ( u , a 0 ) exactly when this is below B ( u , a 0 ) 2 + V ( u , a 0 ) B(u,a_0)^2+V(u,a_0) B ( u , a 0 ) 2 + V ( u , a 0 ) , the value at h = e 0 h=e_0 h = e 0 .
Assume that the score estimator is unbiased, then there is no transmitted bias T B T_B T B and the bias is fully the reproduction error. Set λ = 0 \lambda= 0 λ = 0 . Then if Σ = I \Sigma= I Σ = I , b = Φ T e 0 b = \Phi^{T}e_0 b = Φ T e 0 , h h h is the projection of e 0 e_0 e 0 into the span of the design matrix,
h = Φ ( Φ T Φ ) − 1 Φ T e 0 . (57) h = \Phi(\Phi^{T}\Phi)^{-1}\Phi^{T}e_0. \tag*{(57)} h = Φ ( Φ T Φ ) − 1 Φ T e 0 . (57)
Assume the true score is expressed in the functional basis as
s ( u , a ) = ∑ k ≥ 0 α k ( u ) ϕ k ( a ) . (58) s(u,a) = \sum_{k \ge0} \alpha_k(u)\phi_k(a). \tag*{(58)} s ( u , a ) = k ≥ 0 ∑ α k ( u ) ϕ k ( a ) . (58)
Then assume it has no terms k > K k > K k > K . This assumes the true score vector at the on-policy and off-policy locations is in the span of the design matrix. Define the defect terms
δ k ( a ) = ∑ i = 0 N h i ϕ k ( a i ) − ϕ k ( a 0 ) = ( Φ T h ) k − b k . (59) \delta_k(a) = \sum_{i=0}^{N} h_i\phi_k(a_i) - \phi_k(a_0) = (\Phi^{T}h)_k - b_k. \tag*{(59)} δ k ( a ) = i = 0 ∑ N h i ϕ k ( a i ) − ϕ k ( a 0 ) = ( Φ T h ) k − b k . (59)
This term penalizes the h h h smoother for not perfectly recreating proper elements of the finite K K K basis. If the true score was exactly represented in the finite K K K basis s = ∑ k = 0 K α k ϕ k s = \sum_{k=0}^{K}\alpha_k\phi_k s = ∑ k = 0 K α k ϕ k , the reproduction error which determines the bias is ρ ( u , a ) = ∑ k = 0 K δ k ( a ) α k ( u ) \rho(u,a) = \sum_{k=0}^{K}\delta_k(a)\alpha_k(u) ρ ( u , a ) = ∑ k = 0 K δ k ( a ) α k ( u ) . Thus the minimization problem,
min h ∥ b − Φ T h ∥ 2 (60) \min_h \lVert b - \Phi^{T}h \rVert^2 \tag*{(60)} h min ∥ b − Φ T h ∥ 2 (60)
is exactly penalizing h h h for introducing defect terms. This expression penalizes each defect degree k k k equally, so a diagonal matrix Ω \Omega Ω penalizes different degree k k k defects differently,
min h ∑ k = 0 K Ω k , k ( ( Φ T h ) k − b k ) 2 . (61) \min_h \sum_{k=0}^{K}\Omega_{k,k}((\Phi^{T}h)_k - b_k)^2. \tag*{(61)} h min k = 0 ∑ K Ω k , k (( Φ T h ) k − b k ) 2 . (61)
We then introduce a λ \lambda λ penalty on the norm of h h h in a Σ \Sigma Σ norm,
min h ∑ k = 0 K Ω k , k ( ( Φ T h ) k − b k ) 2 + λ ∑ i = 0 N Σ i , i h i 2 . (62) \min_h \sum_{k=0}^{K}\Omega_{k,k}((\Phi^{T}h)_k - b_k)^2 + \lambda\sum_{i=0}^{N}\Sigma_{i,i}h_i^2. \tag*{(62)} h min k = 0 ∑ K Ω k , k (( Φ T h ) k − b k ) 2 + λ i = 0 ∑ N Σ i , i h i 2 . (62)
λ = 0 \lambda= 0 λ = 0 forces the h h h vector to only focus on minimizing the defect terms, which amounts in a hard constraint ( Φ T h ) k = b k (\Phi^{T}h)_k = b_k ( Φ T h ) k = b k for each k k k . By introducing a non-zero λ \lambda λ , the h h h vector shrinks its norm while introducing defects into the reproduction term. This is a pure bias-variance tradeoff. The solution here is a standard quadratic program, though not as directly stated as the ridge regression theory for β ∗ \beta^* β ∗ , so we state the result as a proper lemma.
Lemma 3. Let Φ ∈ R ( N + 1 ) × ( K + 1 ) \Phi\in\mathbb{R}^{(N+1)\times(K+1)} Φ ∈ R ( N + 1 ) × ( K + 1 ) , let Σ ∈ R ( N + 1 ) × ( N + 1 ) \Sigma\in\mathbb{R}^{(N+1)\times(N+1)} Σ ∈ R ( N + 1 ) × ( N + 1 ) and Ω ∈ R ( K + 1 ) × ( K + 1 ) \Omega\in\mathbb{R}^{(K+1)\times(K+1)} Ω ∈ R ( K + 1 ) × ( K + 1 ) be symmetric positive definite, and let λ > 0 \lambda> 0 λ > 0 . The problem
min h ∈ R N + 1 ( Φ T h − b ) T Ω ( Φ T h − b ) + λ h T Σ h (63) \min_{h \in\mathbb{R}^{N+1}}(\Phi^{T}h-b)^{T}\Omega(\Phi^{T}h-b)+\lambda h^{T}\Sigma h \tag*{(63)} h ∈ R N + 1 min ( Φ T h − b ) T Ω ( Φ T h − b ) + λ h T Σ h (63) has the unique solution
h ∗ = ( Φ Ω Φ T + λ Σ ) − 1 Φ Ω b = Σ − 1 Φ ( Φ T Σ − 1 Φ + λ Ω − 1 ) − 1 b . (64) h^* = (\Phi\Omega\Phi^{T}+\lambda\Sigma)^{-1}\Phi\Omega b = \Sigma^{-1}\Phi(\Phi^{T}\Sigma^{-1}\Phi+\lambda\Omega^{-1})^{-1}b. \tag*{(64)} h ∗ = ( ΦΩ Φ T + λ Σ ) − 1 ΦΩ b = Σ − 1 Φ ( Φ T Σ − 1 Φ + λ Ω − 1 ) − 1 b . (64)
Proof. Write C = Φ Ω Φ T + λ Σ C = \Phi\Omega\Phi^{T} + \lambda\Sigma C = ΦΩ Φ T + λ Σ and A = Φ T Σ − 1 Φ + λ Ω − 1 A = \Phi^{T}\Sigma^{-1}\Phi+ \lambda\Omega^{-1} A = Φ T Σ − 1 Φ + λ Ω − 1 . Since Φ Ω Φ T \Phi\Omega\Phi^{T} ΦΩ Φ T and Φ T Σ − 1 Φ \Phi^{T}\Sigma^{-1}\Phi Φ T Σ − 1 Φ are positive semi-definite and λ Σ \lambda\Sigma λ Σ , λ Ω − 1 \lambda\Omega^{-1} λ Ω − 1 are positive definite, both C C C and A A A are positive definite, hence invertible.
The objective is a quadratic in h h h with Hessian 2 C ≻ 0 2C \succ0 2 C ≻ 0 , so it is strictly convex and its unique minimizer solves the first-order condition
2 Φ Ω ( Φ T h − b ) + 2 λ Σ h = 0 ⟺ C h = Φ Ω b , (65) 2\Phi\Omega(\Phi^{T}h-b)+2\lambda\Sigma h=0 \quad\Longleftrightarrow\quad Ch=\Phi\Omega b, \tag*{(65)} 2ΦΩ ( Φ T h − b ) + 2 λ Σ h = 0 ⟺ C h = ΦΩ b , (65)
so h ∗ = C − 1 Φ Ω b h^{*}=C^{-1}\Phi\Omega b h ∗ = C − 1 ΦΩ b .
For the second form, expand
Φ Ω A = Φ Ω Φ T Σ − 1 Φ + λ Φ = ( Φ Ω Φ T + λ Σ ) Σ − 1 Φ = C Σ − 1 Φ . (66) \Phi\Omega A=\Phi\Omega\Phi^{T}\Sigma^{-1}\Phi+\lambda\Phi=(\Phi\Omega\Phi^{T}+\lambda\Sigma)\Sigma^{-1}\Phi=C\Sigma^{-1}\Phi. \tag*{(66)} ΦΩ A = ΦΩ Φ T Σ − 1 Φ + λ Φ = ( ΦΩ Φ T + λ Σ ) Σ − 1 Φ = C Σ − 1 Φ. (66)
Multiplying on the left by C − 1 C^{-1} C − 1 and on the right by A − 1 A^{-1} A − 1 gives C − 1 Φ Ω = Σ − 1 Φ A − 1 C^{-1}\Phi\Omega=\Sigma^{-1}\Phi A^{-1} C − 1 ΦΩ = Σ − 1 Φ A − 1 . Applying both sides to b b b gives h ∗ = Σ − 1 Φ A − 1 b h^{*}=\Sigma^{-1}\Phi A^{-1}b h ∗ = Σ − 1 Φ A − 1 b as an equivalent form, which is also the expression for the h h h smoother derived from the ridge regression problem with β ∗ \beta^{*} β ∗ .
Penalizing each defect term equally Ω k , k = 1 \Omega_{k,k}=1 Ω k , k = 1 corresponds to penalizing the norm of each β k \beta_k β k in ridge regression equally. An identity Σ i , i = 1 \Sigma_{i,i}=1 Σ i , i = 1 matrix corresponds to unweighted regression. Thus, we have paired minimization problems,
min h ∑ k = 0 K Ω k , k ( ( Φ T h ) k − b k ) 2 + λ ∑ i = 0 N h i 2 Σ i , i (67) \min_h \sum_{k=0}^{K}\Omega_{k,k}\left((\Phi^{T}h)_k-b_k\right)^2+\lambda\sum_{i=0}^{N}h_i^2\Sigma_{i,i} \tag*{(67)} h min k = 0 ∑ K Ω k , k ( ( Φ T h ) k − b k ) 2 + λ i = 0 ∑ N h i 2 Σ i , i (67)
min β ∑ i = 0 N 1 Σ i , i ( s ^ ( u , a i ) − ∑ k = 0 K β k ϕ k ( a i ) ) 2 + λ ∑ k = 0 K 1 Ω k , k β k 2 (68) \min_\beta\sum_{i=0}^{N}\frac{1}{\Sigma_{i,i}}\left(\hat{s}(u,a_i)-\sum_{k=0}^{K}\beta_k\phi_k(a_i)\right)^2+\lambda\sum_{k=0}^{K}\frac{1}{\Omega_{k,k}}\beta_k^2 \tag*{(68)} β min i = 0 ∑ N Σ i , i 1 ( s ^ ( u , a i ) − k = 0 ∑ K β k ϕ k ( a i ) ) 2 + λ k = 0 ∑ K Ω k , k 1 β k 2 (68)
We then specialize to terminal score constraints by setting certain Σ i , i \Sigma_{i,i} Σ i , i values to 0, and hard defect constraints by setting setting certain Ω k , k \Omega_{k,k} Ω k , k penalties to infinity.
Consider extending the s ^ \hat{s} s ^ vector of score observations with two more values s ( u , 0 ) s(u,0) s ( u , 0 ) and s ( u , 1 ) s(u,1) s ( u , 1 ) as perfect observations of the score terminal values. Include two more coefficients h ~ = ( h , g ) \tilde{h}=(h,g) h ~ = ( h , g ) in the smoothing vector. Then these s ^ N + 1 = s ( u , 0 ) , s ^ N + 2 = s ( u , 1 ) \hat{s}_{N+1}=s(u,0),\hat{s}_{N+2}=s(u,1) s ^ N + 1 = s ( u , 0 ) , s ^ N + 2 = s ( u , 1 ) act no differently in the above equations than any other observation. Define Ψ 0 \Psi_0 Ψ 0 and Ψ 1 \Psi_1 Ψ 1 as the vector of the basis functions evaluated at 0 and 1. We can write equivalent optimization problems with additional terms singling out the contribution of the g g g term and these additional two observations
min h , g ∑ k = 0 K Ω k , k ( ( Φ T h ) k + ( Ψ T g ) k − b k ) 2 + λ ∑ i = 0 N h i 2 Σ i , i + λ ∑ i = 0 1 Σ N + i , N + i g i 2 (69) \min_{h,g}\sum_{k=0}^{K}\Omega_{k,k}\left((\Phi^{T}h)_k+(\Psi^{T}g)_k-b_k\right)^2+\lambda\sum_{i=0}^{N}h_i^2\Sigma_{i,i}+\lambda\sum_{i=0}^{1}\Sigma_{N+i,N+i}g_i^2 \tag*{(69)} h , g min k = 0 ∑ K Ω k , k ( ( Φ T h ) k + ( Ψ T g ) k − b k ) 2 + λ i = 0 ∑ N h i 2 Σ i , i + λ i = 0 ∑ 1 Σ N + i , N + i g i 2 (69)
min β ∑ i = 0 N 1 Σ i , i ( s ^ ( u , a i ) − ∑ k = 0 K β k ϕ k ( a i ) ) 2 + λ ∑ k = 0 K 1 Ω k , k β k 2 + ∑ i = 0 1 1 Σ N + i , N + i ( s ( u , i ) − Ψ i T β ) 2 . (70) \min_\beta\sum_{i=0}^{N}\frac{1}{\Sigma_{i,i}}\left(\hat{s}(u,a_i)-\sum_{k=0}^{K}\beta_k\phi_k(a_i)\right)^2+\lambda\sum_{k=0}^{K}\frac{1}{\Omega_{k,k}}\beta_k^2+\sum_{i=0}^{1}\frac{1}{\Sigma_{N+i,N+i}}\left(s(u,i)-\Psi_i^{T}\beta\right)^2. \tag*{(70)} β min i = 0 ∑ N Σ i , i 1 ( s ^ ( u , a i ) − k = 0 ∑ K β k ϕ k ( a i ) ) 2 + λ k = 0 ∑ K Ω k , k 1 β k 2 + i = 0 ∑ 1 Σ N + i , N + i 1 ( s ( u , i ) − Ψ i T β ) 2 . (70)
Setting Σ N + 1 , N + 1 , Σ N + 2 , N + 2 \Sigma_{N+1,N+1},\Sigma_{N+2,N+2} Σ N + 1 , N + 1 , Σ N + 2 , N + 2 to 0 forces a hard constraint on the β \beta β basis to exactly match the terminal constraints, and results in g g g as a slack variable with no Σ \Sigma Σ penalty in the h , g h,g h , g minimization problem.
Lemma 4. Let Ψ ∈ R 2 × ( K + 1 ) \Psi\in\mathbb{R}^{2\times(K+1)} Ψ ∈ R 2 × ( K + 1 ) contain the basis evaluated at the terminal levels, Ψ 0 , k = ϕ k ( 0 ) \Psi_{0,k}=\phi_k(0) Ψ 0 , k = ϕ k ( 0 ) , Ψ 1 , k = ϕ k ( 1 ) \Psi_{1,k}=\phi_k(1) Ψ 1 , k = ϕ k ( 1 ) , assume Ψ \Psi Ψ has full row rank, and let v ( u ) = ( s ( u , 0 ) , s ( u , 1 ) ) v(u)=(s(u,0),s(u,1)) v ( u ) = ( s ( u , 0 ) , s ( u , 1 )) . Append the terminal scores to the observations as extra rows of the design matrix, with smoothing vector h ~ = ( h , g ) \tilde{h}=(h,g) h ~ = ( h , g ) and
variances Σ N + 1 , N + 1 = Σ N + 2 , N + 2 = ε > 0 \Sigma_{N+1,N+1}=\Sigma_{N+2,N+2}=\varepsilon>0 Σ N + 1 , N + 1 = Σ N + 2 , N + 2 = ε > 0 . Applying Lemma 3 to this extended problem gives the paired problems
min h , g ( Φ T h + Ψ T g − b ) T Ω ( Φ T h + Ψ T g − b ) + λ h T Σ h + λ ε ∥ g ∥ 2 , (71) \min_{h,g}\;(\Phi^{\mathsf{T}}h+\Psi^{\mathsf{T}}g-b)^{\mathsf{T}}\Omega(\Phi^{\mathsf{T}}h+\Psi^{\mathsf{T}}g-b)+\lambda h^{\mathsf{T}}\Sigma h+\lambda\varepsilon\lVert g\rVert^2, \tag*{(71)} h , g min ( Φ T h + Ψ T g − b ) T Ω ( Φ T h + Ψ T g − b ) + λ h T Σ h + λ ε ∥ g ∥ 2 , (71)
min β ( s ^ ( u ) − Φ β ) T Σ − 1 ( s ^ ( u ) − Φ β ) + 1 ε ∥ v ( u ) − Ψ β ∥ 2 + λ β T Ω − 1 β . (72) \min_{\beta}\;(\hat{s}(u)-\Phi\beta)^{\mathsf{T}}\Sigma^{-1}(\hat{s}(u)-\Phi\beta)+\frac{1}{\varepsilon}\lVert v(u)-\Psi\beta\rVert^2+\lambda\beta^{\mathsf{T}}\Omega^{-1}\beta. \tag*{(72)} β min ( s ^ ( u ) − Φ β ) T Σ − 1 ( s ^ ( u ) − Φ β ) + ε 1 ∥ v ( u ) − Ψ β ∥ 2 + λ β T Ω − 1 β . (72)
As ε → 0 \varepsilon\to0 ε → 0 , their solutions converge to the unique solutions of
β ∗ ( u ) = arg min β ∈ R K + 1 ( s ^ ( u ) − Φ β ) T Σ − 1 ( s ^ ( u ) − Φ β ) + λ β T Ω − 1 β s.t. Ψ β = v ( u ) , (73) \beta^*(u)=\underset{\beta\in\mathbb{R}^{K+1}}{\arg\min}\;(\hat{s}(u)-\Phi\beta)^{\mathsf{T}}\Sigma^{-1}(\hat{s}(u)-\Phi\beta)+\lambda\beta^{\mathsf{T}}\Omega^{-1}\beta\quad\text{s.t.}\quad\Psi\beta=v(u), \tag*{(73)} β ∗ ( u ) = β ∈ R K + 1 arg min ( s ^ ( u ) − Φ β ) T Σ − 1 ( s ^ ( u ) − Φ β ) + λ β T Ω − 1 β s.t. Ψ β = v ( u ) , (73)
( h ∗ , g ∗ ) = arg min h ∈ R N + 1 , g ∈ R 2 ( Φ T h + Ψ T g − b ) T Ω ( Φ T h + Ψ T g − b ) + λ h T Σ h , (74) (h^*,g^*)=\underset{h\in\mathbb{R}^{N+1},\,g\in\mathbb{R}^2}{\arg\min}\;(\Phi^{\mathsf{T}}h+\Psi^{\mathsf{T}}g-b)^{\mathsf{T}}\Omega(\Phi^{\mathsf{T}}h+\Psi^{\mathsf{T}}g-b)+\lambda h^{\mathsf{T}}\Sigma h, \tag*{(74)} ( h ∗ , g ∗ ) = h ∈ R N + 1 , g ∈ R 2 arg min ( Φ T h + Ψ T g − b ) T Ω ( Φ T h + Ψ T g − b ) + λ h T Σ h , (74)
so the terminal values are reproduced exactly and g g g is unpenalized. Thus, linear constraints in the functional ridge regression yield free parameters in the adjoint problem.
Furthermore, dropped β \beta β penalties via Ω k , k → ∞ \Omega_{k,k}\to\infty Ω k , k → ∞ result in hard constraints on the defect terms. In our problem, we impose hard constraints on the 0 order defect terms. We penalize degree k ≥ 1 k\geq1 k ≥ 1 β k \beta_k β k terms with a cubic penalty Ω k , k = 1 k 3 \Omega_{k,k}=\frac{1}{k^3} Ω k , k = k 3 1 .
Lemma 5. In the setting of Lemma 4, assume in addition that Φ \Phi Φ has full column rank (N ≥ K N\geq K N ≥ K ) and that Ω \Omega Ω is diagonal, and let K ⊂ { 0 , … , K } \mathcal{K}\subset\{0,\ldots,K\} K ⊂ { 0 , … , K } index coefficients that are left unpenalized: Ω k , k ∈ ( 0 , ∞ ) \Omega_{k,k}\in(0,\infty) Ω k , k ∈ ( 0 , ∞ ) for k ∉ K k\notin\mathcal{K} k ∈ / K and Ω k , k = ∞ \Omega_{k,k}=\infty Ω k , k = ∞ for k ∈ K k\in\mathcal{K} k ∈ K , with the convention 1 / ∞ = 0 1/\infty=0 1/∞ = 0 , so that Ω − 1 \Omega^{-1} Ω − 1 is diagonal with ( Ω − 1 ) k , k = 0 (\Omega^{-1})_{k,k}=0 ( Ω − 1 ) k , k = 0 for k ∈ K k\in\mathcal{K} k ∈ K . Consider
β ∗ ( u ) = arg min β ∈ R K + 1 ( s ^ ( u ) − Φ β ) T Σ − 1 ( s ^ ( u ) − Φ β ) + λ ∑ k ∉ K β k 2 Ω k , k s.t. Ψ β = v ( u ) , (75) \beta^*(u)=\underset{\beta\in\mathbb{R}^{K+1}}{\arg\min}\;(\hat{s}(u)-\Phi\beta)^{\mathsf{T}}\Sigma^{-1}(\hat{s}(u)-\Phi\beta)+\lambda\sum_{k\notin\mathcal{K}}\frac{\beta_k^2}{\Omega_{k,k}}\quad\text{s.t.}\quad\Psi\beta=v(u), \tag*{(75)} β ∗ ( u ) = β ∈ R K + 1 arg min ( s ^ ( u ) − Φ β ) T Σ − 1 ( s ^ ( u ) − Φ β ) + λ k ∈ / K ∑ Ω k , k β k 2 s.t. Ψ β = v ( u ) , (75) and, writing δ ( h , g ) = Φ T h + Ψ T g − b \delta(h,g)=\Phi^{\mathsf{T}}h+\Psi^{\mathsf{T}}g-b δ ( h , g ) = Φ T h + Ψ T g − b for the defect vector,
( h ∗ , g ∗ ) = arg min h ∈ R N + 1 , g ∈ R 2 ∑ k ∉ K Ω k , k δ k ( h , g ) 2 + λ h T Σ h s.t. δ k ( h , g ) = 0 , k ∈ K . (76) (h^*,g^*)=\underset{h\in\mathbb{R}^{N+1},\,g\in\mathbb{R}^2}{\arg\min}\;\sum_{k\notin\mathcal{K}}\Omega_{k,k}\delta_k(h,g)^2+\lambda h^{\mathsf{T}}\Sigma h\quad\text{s.t.}\quad\delta_k(h,g)=0,\ k\in\mathcal{K}. \tag*{(76)} ( h ∗ , g ∗ ) = h ∈ R N + 1 , g ∈ R 2 arg min k ∈ / K ∑ Ω k , k δ k ( h , g ) 2 + λ h T Σ h s.t. δ k ( h , g ) = 0 , k ∈ K . (76) Unpenalized coefficients in the ridge regression become hard constraints on the defects of the linear smoother. Both problems have unique solutions, and for every realization of s ^ ( u ) \hat{s}(u) s ^ ( u ) ,
s ˉ ( u , a 0 ) = ∑ k = 0 K β k ∗ ( u ) ϕ k ( a 0 ) = ∑ i = 0 N h i ∗ s ^ ( u , a i ) + g 0 ∗ s ( u , 0 ) + g 1 ∗ s ( u , 1 ) . (77) \bar{s}(u,a_0)=\sum_{k=0}^{K}\beta_k^*(u)\phi_k(a_0)=\sum_{i=0}^{N}h_i^*\hat{s}(u,a_i)+g_0^*s(u,0)+g_1^*s(u,1). \tag*{(77)} s ˉ ( u , a 0 ) = k = 0 ∑ K β k ∗ ( u ) ϕ k ( a 0 ) = i = 0 ∑ N h i ∗ s ^ ( u , a i ) + g 0 ∗ s ( u , 0 ) + g 1 ∗ s ( u , 1 ) . (77) Writing A = Φ T Σ − 1 Φ + λ Ω − 1 A=\Phi^{\mathsf{T}}\Sigma^{-1}\Phi+\lambda\Omega^{-1} A = Φ T Σ − 1 Φ + λ Ω − 1 , G = Ψ A − 1 Ψ T G=\Psi A^{-1}\Psi^{\mathsf{T}} G = Ψ A − 1 Ψ T and P = I − A − 1 Ψ T G − 1 Ψ P=I-A^{-1}\Psi^{\mathsf{T}}G^{-1}\Psi P = I − A − 1 Ψ T G − 1 Ψ , the solutions are
β ∗ ( u ) = P A − 1 Φ T Σ − 1 s ^ ( u ) + A − 1 Ψ T G − 1 v ( u ) , (78) \beta^*(u)=PA^{-1}\Phi^{\mathsf{T}}\Sigma^{-1}\hat{s}(u)+A^{-1}\Psi^{\mathsf{T}}G^{-1}v(u), \tag*{(78)} β ∗ ( u ) = P A − 1 Φ T Σ − 1 s ^ ( u ) + A − 1 Ψ T G − 1 v ( u ) , (78) h ∗ = Σ − 1 Φ A − 1 P T b , g ∗ = G − 1 Ψ A − 1 b . (79) h^*=\Sigma^{-1}\Phi A^{-1}P^{\mathsf{T}}b,\qquad g^*=G^{-1}\Psi A^{-1}b. \tag*{(79)} h ∗ = Σ − 1 Φ A − 1 P T b , g ∗ = G − 1 Ψ A − 1 b . (79) This proves the form of the problem stated in Theorem 2.
Proof. Throughout, Σ ≻ 0 \Sigma\succ0 Σ ≻ 0 , λ > 0 \lambda>0 λ > 0 , Φ \Phi Φ has full column rank and Ψ \Psi Ψ has full row rank. Write c ( u ) = Φ T Σ − 1 s ^ ( u ) c(u)=\Phi^{\mathsf{T}}\Sigma^{-1}\hat{s}(u) c ( u ) = Φ T Σ − 1 s ^ ( u ) . Both forms of β ∗ \beta^* β ∗ and ( h ∗ , g ∗ ) (h^*,g^*) ( h ∗ , g ∗ ) follow from the KKT conditions applied to linear constrained convex minimization problems.
Invertibility of Matrices
Since Φ \Phi Φ has full column rank, the matrix Φ T Σ − 1 Φ ≻ 0 \Phi^{T}\Sigma^{-1}\Phi\succ0 Φ T Σ − 1 Φ ≻ 0 is positive definite, while the matrix λ Ω − 1 ⪰ 0 \lambda\Omega^{-1} \succeq0 λ Ω − 1 ⪰ 0 is positive semi-definite with some 0 entries on the diagonal. Therefore the matrix A = Φ T Σ − 1 Φ + λ Ω − 1 ≻ 0 A = \Phi^{T}\Sigma^{-1}\Phi+ \lambda\Omega^{-1} \succ0 A = Φ T Σ − 1 Φ + λ Ω − 1 ≻ 0 is positive definite and invertible. Since Ψ \Psi Ψ has full row rank and A − 1 ≻ 0 A^{-1} \succ0 A − 1 ≻ 0 , also G = Ψ A − 1 Ψ T ≻ 0 G = \Psi A^{-1}\Psi^{T} \succ0 G = Ψ A − 1 Ψ T ≻ 0 is positive definite and invertible. Therefore, A A A , G G G , A − 1 A^{-1} A − 1 , G − 1 G^{-1} G − 1 , and P P P are well defined.
The β \beta β optimization problem.
Expanding the β \beta β form, the objective is β T A β − 2 β T c ( u ) \beta^{T}A\beta- 2\beta^{T}c(u) β T A β − 2 β T c ( u ) plus a constant independent of β \beta β . It is strictly convex since A ≻ 0 A \succ0 A ≻ 0 , and the constraint Ψ β = v ( u ) \Psi\beta= v(u) Ψ β = v ( u ) is affine and feasible since Ψ \Psi Ψ has full row rank. So the minimizer exists, is unique, and is characterized by the KKT conditions. The KKT conditions for this problem state for some vector ν ∈ R 2 \nu\in\mathbb{R}^{2} ν ∈ R 2 , the pair ( β , ν ) (\beta,\nu) ( β , ν ) solves the equations:
A β − c ( u ) = Ψ T ν , Ψ β = v ( u ) . (80) A\beta- c(u) = \Psi^{T}\nu,\qquad\Psi\beta= v(u). \tag*{(80)} A β − c ( u ) = Ψ T ν , Ψ β = v ( u ) . (80)
The first equation gives β = A − 1 ( c ( u ) + Ψ T ν ) \beta= A^{-1}(c(u)+\Psi^{T}\nu) β = A − 1 ( c ( u ) + Ψ T ν ) . Substituting into the second gives Ψ A − 1 c ( u ) + G ν = v ( u ) \Psi A^{-1}c(u)+G\nu= v(u) Ψ A − 1 c ( u ) + G ν = v ( u ) , so ν = G − 1 ( v ( u ) − Ψ A − 1 c ( u ) ) \nu= G^{-1}(v(u)-\Psi A^{-1}c(u)) ν = G − 1 ( v ( u ) − Ψ A − 1 c ( u )) . Therefore
β ∗ ( u ) = A − 1 c ( u ) + A − 1 Ψ T G − 1 ( v ( u ) − Ψ A − 1 c ( u ) ) = P A − 1 c ( u ) + A − 1 Ψ T G − 1 v ( u ) , (81) \beta^{*}(u) = A^{-1}c(u) + A^{-1}\Psi^{T}G^{-1}(v(u)-\Psi A^{-1}c(u)) = PA^{-1}c(u) + A^{-1}\Psi^{T}G^{-1}v(u), \tag*{(81)} β ∗ ( u ) = A − 1 c ( u ) + A − 1 Ψ T G − 1 ( v ( u ) − Ψ A − 1 c ( u )) = P A − 1 c ( u ) + A − 1 Ψ T G − 1 v ( u ) , (81)
using A − 1 − A − 1 Ψ T G − 1 Ψ A − 1 = ( I − A − 1 Ψ T G − 1 Ψ ) A − 1 = P A − 1 A^{-1} - A^{-1}\Psi^{T}G^{-1}\Psi A^{-1} = (I-A^{-1}\Psi^{T}G^{-1}\Psi)A^{-1} = PA^{-1} A − 1 − A − 1 Ψ T G − 1 Ψ A − 1 = ( I − A − 1 Ψ T G − 1 Ψ ) A − 1 = P A − 1 .
The adjoint problem
Let D D D be the diagonal matrix with D k , k = Ω k , k D_{k,k} = \Omega_{k,k} D k , k = Ω k , k for k ∉ K k \notin\mathcal{K} k ∈ / K and D k , k = 0 D_{k,k} = 0 D k , k = 0 for k ∈ K k \in\mathcal{K} k ∈ K , so the objective is F ( h , g ) = δ T D δ + λ h T Σ h F(h,g) = \delta^{T}D\delta+\lambda h^{T}\Sigma h F ( h , g ) = δ T D δ + λ h T Σ h with δ = δ ( h , g ) \delta= \delta(h,g) δ = δ ( h , g ) . F F F is convex (as D ⪰ 0 D \succeq0 D ⪰ 0 and Σ ≻ 0 \Sigma\succ0 Σ ≻ 0 ) and the constraints δ k = 0 \delta_k = 0 δ k = 0 , k ∈ K k \in\mathcal{K} k ∈ K , are affine in ( h , g ) (h,g) ( h , g ) . For such problems the KKT conditions are both necessary and sufficient for optimality. Introducing multipliers 2 μ k 2\mu_k 2 μ k for the constraints and using ∂ δ / ∂ h = Φ T \partial\delta/\partial h = \Phi^{T} ∂ δ / ∂ h = Φ T , ∂ δ / ∂ g = Ψ T \partial\delta/\partial g = \Psi^{T} ∂ δ / ∂ g = Ψ T , the KKT conditions read
Φ w + λ Σ h = 0 , Ψ w = 0 , δ k = 0 ( k ∈ K ) , (82) \Phi w + \lambda\Sigma h = 0,\qquad\Psi w = 0,\qquad\delta_k = 0\ (k \in\mathcal{K}), \tag*{(82)} Φ w + λ Σ h = 0 , Ψ w = 0 , δ k = 0 ( k ∈ K ) , (82)
where w ∈ R K + 1 w \in\mathbb{R}^{K+1} w ∈ R K + 1 has entries w k = Ω k , k δ k w_k = \Omega_{k,k}\delta_k w k = Ω k , k δ k for k ∉ K k \notin\mathcal{K} k ∈ / K and w k = μ k w_k = \mu_k w k = μ k for k ∈ K k \in\mathcal{K} k ∈ K . Since ( Ω − 1 ) k , k = 1 / Ω k , k (\Omega^{-1})_{k,k} = 1/\Omega_{k,k} ( Ω − 1 ) k , k = 1/ Ω k , k for k ∉ K k \notin\mathcal{K} k ∈ / K and ( Ω − 1 ) k , k = 0 (\Omega^{-1})_{k,k} = 0 ( Ω − 1 ) k , k = 0 for k ∈ K k \in\mathcal{K} k ∈ K , the definition of w w w together with the constraints is equivalent to the single equation δ = Ω − 1 w \delta= \Omega^{-1}w δ = Ω − 1 w with w w w free on K \mathcal{K} K . Hence ( h , g ) (h,g) ( h , g ) is optimal if and only if there exists w ∈ R K + 1 w \in\mathbb{R}^{K+1} w ∈ R K + 1 with
(i) Φ w + λ Σ h = 0 , (ii) Ψ w = 0 , (iii) Φ T h + Ψ T g − b = Ω − 1 w . (83) \text{(i) }\ \Phi w + \lambda\Sigma h = 0,\qquad\text{(ii) }\ \Psi w = 0,\qquad\text{(iii) }\ \Phi^{T}h + \Psi^{T}g - b = \Omega^{-1}w. \tag*{(83)} (i) Φ w + λ Σ h = 0 , (ii) Ψ w = 0 , (iii) Φ T h + Ψ T g − b = Ω − 1 w . (83)
From (i), h = − λ − 1 Σ − 1 Φ w h = -\lambda^{-1}\Sigma^{-1}\Phi w h = − λ − 1 Σ − 1 Φ w . Substituting into (iii),
− λ − 1 Φ T Σ − 1 Φ w + Ψ T g − b = Ω − 1 w (84) -\lambda^{-1}\Phi^{T}\Sigma^{-1}\Phi w + \Psi^{T}g - b = \Omega^{-1}w \tag*{(84)} − λ − 1 Φ T Σ − 1 Φ w + Ψ T g − b = Ω − 1 w (84)
⟺ λ − 1 A w = Ψ T g − b (85) \Longleftrightarrow\lambda^{-1}Aw = \Psi^{T}g - b \tag*{(85)} ⟺ λ − 1 A w = Ψ T g − b (85)
⟺ w = − λ A − 1 ( b − Ψ T g ) . (86) \Longleftrightarrow w = -\lambda A^{-1}(b-\Psi^{T}g). \tag*{(86)} ⟺ w = − λ A − 1 ( b − Ψ T g ) . (86)
Substituting into (ii), Ψ A − 1 ( b − Ψ T g ) = 0 \Psi A^{-1}(b-\Psi^{T}g)=0 Ψ A − 1 ( b − Ψ T g ) = 0 , i.e. G g = Ψ A − 1 b Gg = \Psi A^{-1}b G g = Ψ A − 1 b , so
g = G − 1 Ψ A − 1 b = g ∗ . (87) g = G^{-1}\Psi A^{-1}b = g^{*}. \tag*{(87)} g = G − 1 Ψ A − 1 b = g ∗ . (87)
Then b − Ψ T g ∗ = ( I − Ψ T G − 1 Ψ A − 1 ) b = P T b b-\Psi^{T}g^{*}=(I-\Psi^{T}G^{-1}\Psi A^{-1})b= P^{T}b b − Ψ T g ∗ = ( I − Ψ T G − 1 Ψ A − 1 ) b = P T b , so w = − λ A − 1 P T b w=-\lambda A^{-1}P^{T}b w = − λ A − 1 P T b and
h = − λ − 1 Σ − 1 Φ w = Σ − 1 Φ A − 1 P T b = h ∗ . (88) h=-\lambda^{-1}\Sigma^{-1}\Phi w=\Sigma^{-1}\Phi A^{-1}P^{T}b=h^{*}. \tag*{(88)} h = − λ − 1 Σ − 1 Φ w = Σ − 1 Φ A − 1 P T b = h ∗ . (88)
Every step was an equivalence with A A A and G G G invertible, so the KKT system has exactly one solution ( h ∗ , g ∗ , w ) (h^{*},g^{*},w) ( h ∗ , g ∗ , w ) . By sufficiency of the KKT conditions ( h ∗ , g ∗ ) (h^{*},g^{*}) ( h ∗ , g ∗ ) is a minimizer, and by necessity every minimizer solves the KKT system, so it is the unique minimizer. Condition (iii) with ( Ω − 1 ) k , k = 0 (\Omega^{-1})_{k,k}=0 ( Ω − 1 ) k , k = 0 confirms δ k ( h ∗ , g ∗ ) = 0 \delta_k(h^{*},g^{*})=0 δ k ( h ∗ , g ∗ ) = 0 for k ∈ K k \in\mathcal{K} k ∈ K .
Measured bias and variance of the post-processed score
The relevant term to control the terminal KL error of a score-based sampler is the expected L 2 L^2 L 2 error J ( h ~ , ν , a ) J(\tilde{h},\nu,a) J ( h ~ , ν , a ) defined in (14) . This squared error can be decomposed into a bias and variance. While it is clear the affine post-processing estimator reduces the overall squared error in most of our experiments, it is of interest if this reduction is mostly bias reduction, variance reduction, or a bias-variance trade off where the estimator slightly inflates bias to reduce variance and overall squared error. For any affine ( h ~ , ν ) (\tilde{h},\nu) ( h ~ , ν ) the error functional (14) decomposes exactly as
J ( h ~ , ν , a 0 ) = E U ∼ p a 0 [ ( h ~ T m ~ ( U ) − ν − s ( U ) ) 2 ] ⏟ bias 2 + h ~ T V h ~ ⏟ variance , (89) J(\tilde{h},\nu,a_0)=\underbrace{\mathbb{E}_{U\sim p_{a_0}}\left[(\tilde{h}^{\mathsf{T}}\tilde{m}(U)-\nu-s(U))^2\right]}_{\text{bias}^2}+\underbrace{\tilde{h}^{\mathsf{T}}\mathcal{V}\tilde{h}}_{\text{variance}}, \tag*{(89)} J ( h ~ , ν , a 0 ) = bias 2 E U ∼ p a 0 [ ( h ~ T m ~ ( U ) − ν − s ( U ) ) 2 ] + variance h ~ T V h ~ , (89)
because m ~ ( U ) \tilde{m}(U) m ~ ( U ) is the conditional mean of the base estimates and V \mathcal{V} V their conditional covariance. The on-policy rule h ~ = e 0 \tilde{h}=e_0 h ~ = e 0 , ν = 0 \nu=0 ν = 0 returns B ~ 0 2 + V 00 \tilde{B}_0^2+\mathcal{V}_{00} B ~ 0 2 + V 00 , the base estimator’s own bias and variance. Both terms are computed from the same estimated quadratic forms that produce the J J J curves of Figure 4 . Here Figure 7 and Figure 8 rearrange those curves rather than reporting a separate experiment. At a grid of signal levels, the total J J J error is scaled so the full bar is 100% and that error is split into it’s bias and variance proportion. We compare this to the bias and variance of the affine post processing vector scaled by the same value.
Figure 7. Orthogonal-covariance mixture at d = 8 d=8 d = 8 . Solid bars are the base estimator and hatched bars the post-processed rule, each scaled so the base totals 100% at that signal level. Importance sampling (a) is variance-dominated at every level and post-processing removes most of that variance; RDMC (b) is bias-dominated at low signal, where little can be removed.
Figure 8. Forty-mode mixture at d = 10 d = 10 d = 10 , drawn as in Figure 7 . The two targets differ in the RDMC panel: here the bias share is large at both ends of the signal range and dips near a 0 ≈ 0.6 a_0 \approx0.6 a 0 ≈ 0.6 , so the deepest cuts land in the middle band rather than at high signal.
We see in these figures the dominant method of reducing the L 2 L^2 L 2 error is variance reduction rather than bias reduction, and indeed we do see some bias inflation in certain cases. This is to be expected for a shrinkage estimator, the h h h smoothing vector always has norm less than 1, so we may interpret the variance term as the weighted average of the on and off-policy variances scaled by the norm of h h h
∥ h ∥ 2 ∑ i = 0 N h i 2 ∥ h ∥ 2 V i , i . (90) \lVert h\rVert^2 \sum_{i=0}^{N} \frac{h_i^2}{\lVert h\rVert^2}\mathcal{V}_{i,i}. \tag*{(90)} ∥ h ∥ 2 i = 0 ∑ N ∥ h ∥ 2 h i 2 V i , i . (90)
In many cases we see the chosen h h h vector roughly maintains the bias while drastically reducing the variance with a small norm.
This is however not always the case. We see in Figure 8 the affine post-processing estimator does drastically reduce the bias of the on-policy estimator. This is most likely via the use of the terminal conditions s ( u , 0 ) s(u,0) s ( u , 0 ) , s ( u , 1 ) s(u,1) s ( u , 1 ) which can be relied on more heavily when the score estimates are structurally incorrect.
Target Densities
Write Λ κ = diag i = 1 d ( κ ( i − 1 ) / ( d − 1 ) ) \Lambda_\kappa= \operatorname{diag}_{i=1}^{d}\left(\kappa^{(i-1)/(d-1)}\right) Λ κ = diag i = 1 d ( κ ( i − 1 ) / ( d − 1 ) ) for the diagonal matrix with eigenvalues log-spaced over [ 1 , κ ] [1,\kappa] [ 1 , κ ] and R θ R_\theta R θ for the 2 × 2 2 \times2 2 × 2 rotation by θ \theta θ . Every target except the banana and the shell is a Gaussian mixture π = ∑ i w i N ( μ i , Σ i ) \pi= \sum_i w_i \mathcal{N}(\mu_i,\Sigma_i) π = ∑ i w i N ( μ i , Σ i ) , so the noised density is available in closed form,
p a ( u ) = ∑ i w i N ( u ; a μ i , a 2 Σ i + ( 1 − a 2 ) I ) , p_a(u) = \sum_i w_i \mathcal{N}\left(u; a\mu_i, a^2\Sigma_i + (1-a^2)I\right), p a ( u ) = i ∑ w i N ( u ; a μ i , a 2 Σ i + ( 1 − a 2 ) I ) ,
which gives the exact score s ( u , a ) s(u,a) s ( u , a ) used to compute J J J , and exact samples for W 2 W_2 W 2 . The banana and the shell have no closed-form p a p_a p a , so we report only W 2 W_2 W 2 on them.
Ill-conditioned Gaussian. π = N ( 0 , Λ κ ) \pi= \mathcal{N}(0,\Lambda_\kappa) π = N ( 0 , Λ κ ) , swept over d d d and κ \kappa κ .
Banana. The Haario twisted Gaussian in d d d dimensions: x 1 ∼ N ( 0 , s 1 2 ) x_1 \sim\mathcal{N}(0,s_1^2) x 1 ∼ N ( 0 , s 1 2 ) , x 2 ∣ x 1 ∼ N ( γ ( x 1 2 − s 1 2 ) , 1 ) x_2 \mid x_1 \sim\mathcal{N}(\gamma(x_1^2-s_1^2),1) x 2 ∣ x 1 ∼ N ( γ ( x 1 2 − s 1 2 ) , 1 ) , and x 3 , … , x d ∼ N ( 0 , 1 ) x_3,\ldots,x_d \sim\mathcal{N}(0,1) x 3 , … , x d ∼ N ( 0 , 1 ) i.i.d., with s 1 = 3 s_1=3 s 1 = 3 and γ = 0.1 \gamma=0.1 γ = 0.1 . The curvature lives in the ( x 1 , x 2 ) (x_1,x_2) ( x 1 , x 2 ) plane and the remaining d − 2 d-2 d − 2 coordinates are standard normal, so the dimension sweep adds isotropic directions to a fixed twist rather than changing the twist itself. The map u 1 = x 1 / s 1 u_1=x_1/s_1 u 1 = x 1 / s 1 , u 2 = x 2 − γ ( x 1 2 − s 1 2 ) u_2=x_2-\gamma(x_1^2-s_1^2) u 2 = x 2 − γ ( x 1 2 − s 1 2 ) , u i = x i u_i=x_i u i = x i for i ≥ 3 i\geq3 i ≥ 3 is an invertible reparametrisation of an i.i.d. standard Gaussian with constant Jacobian determinant s 1 s_1 s 1 , so log π \log\pi log π is available in closed form and ground-truth samples are drawn ancestrally.
Orthogonal-covariance mixture (x_gmm). In d = 2 k d=2k d = 2 k , an equal-weight mixture of 2 k 2k 2 k zero-mean Gaussians whose covariances are block diagonal with 2 × 2 2\times2 2 × 2 blocks R ± 45 ∘ diag ( 3 2 , 0.3 2 ) R ± 45 ∘ T R_{\pm45^\circ}\operatorname{diag}(3^2,0.3^2)R_{\pm45^\circ}^{\mathsf{T}} R ± 4 5 ∘ diag ( 3 2 , 0. 3 2 ) R ± 4 5 ∘ T . The components share a mean, so they differ only in shape.
Ellipsoidal shell (ell_shell). π ( x ) ∝ exp ( − ( ρ ( x ) − r ) 2 / 2 σ 2 ) \pi(x)\propto\exp(-( \rho(x)-r)^2/2\sigma^2) π ( x ) ∝ exp ( − ( ρ ( x ) − r ) 2 /2 σ 2 ) with ρ ( x ) = x T Σ − 1 x \rho(x)=\sqrt{x^{\mathsf{T}}\Sigma^{-1}x} ρ ( x ) = x T Σ − 1 x and Σ = Q Λ κ Q T \Sigma=Q\Lambda_\kappa Q^{\mathsf{T}} Σ = Q Λ κ Q T , so the mass lies on an ellipsoid rather than at a point. We use r = 4 r=4 r = 4 , σ = 0.3 \sigma=0.3 σ = 0.3 , κ = 50 \kappa=50 κ = 50 and Q Q Q a fixed random rotation. Exact samples come from drawing the Mahalanobis radius by inverse CDF and a uniform direction on the sphere.
Forty-mode mixture (random_gmm). π = 1 40 ∑ i = 1 40 N ( μ i , 0.05 2 I ) \pi=\frac{1}{40}\sum_{i=1}^{40}\mathcal{N}(\mu_i,0.05^2I) π = 40 1 ∑ i = 1 40 N ( μ i , 0.0 5 2 I ) with μ i ∼ Unif ( [ 0 , 2 ] d ) \mu_i\sim\operatorname{Unif}([0,2]^d) μ i ∼ Unif ([ 0 , 2 ] d ) , held fixed across seeds.
Separated anisotropic mixture (sep_gmm). π = 0.7 N ( 2 3 δ , Q Λ κ Q T ) + 0.3 N ( − 1 3 δ , Q Λ ~ κ Q T ) \pi=0.7\mathcal{N}(\frac{2}{3}\delta,Q\Lambda_\kappa Q^{\mathsf{T}})+0.3\mathcal{N}(-\frac{1}{3}\delta,Q\widetilde{\Lambda}_\kappa Q^{\mathsf{T}}) π = 0.7 N ( 3 2 δ , Q Λ κ Q T ) + 0.3 N ( − 3 1 δ , Q Λ κ Q T ) , with Q Q Q a fixed random rotation, Λ ~ κ \widetilde{\Lambda}_\kappa Λ κ equal to Λ κ \Lambda_\kappa Λ κ in reverse order (so the two components have their stiff and loose directions swapped) and κ = 10 \kappa=10 κ = 10 . The offset δ = sep ⋅ v / v T Σ ‾ − 1 v \delta=\operatorname{sep}\cdot v/\sqrt{v^{\mathsf{T}}\overline{\Sigma}^{-1}v} δ = sep ⋅ v / v T Σ − 1 v , with v = Q 1 v=Q1 v = Q 1 and Σ ‾ \overline{\Sigma} Σ the average of the two covariances, makes sep the Mahalanobis distance between the modes at every d d d .
Hypercube-vertex mixture (vertex_gmm). π = 1 8 ∑ k = 1 8 N ( μ k , σ k 2 I ) \pi=\frac{1}{8}\sum_{k=1}^{8}\mathcal{N}(\mu_k,\sigma_k^2I) π = 8 1 ∑ k = 1 8 N ( μ k , σ k 2 I ) with μ k = c Q v k + τ r ‾ u \mu_k=cQv_k+\tau\overline{r}u μ k = c Q v k + τ r u . Here v 1 , … , v 8 v_1,\ldots,v_8 v 1 , … , v 8 are vertices of { ± 1 } d \{\pm1\}^d { ± 1 } d with an even number of − 1 -1 − 1 entries, chosen by farthest-point sampling from a random start (among 4,096 random such vertices when d > 20 d>20 d > 20 ). Q Q Q is a fixed random rotation, and c c c scales the centers so the closest pair is Δ = 12 \Delta=12 Δ = 12 apart. The shift by τ = 0.25 \tau=0.25 τ = 0.25 times the mean radius r ‾ = 1 8 ∑ k ∥ c Q v k ∥ \overline{r}=\frac{1}{8}\sum_k\lVert cQv_k\rVert r = 8 1 ∑ k ∥ c Q v k ∥ , along a random unit vector u u u , puts the modes at different distances from the origin. The widths are σ k = ρ s k / d \sigma_k=\rho^{s_k/d} σ k = ρ s k / d , where ρ = 10 − 2 \rho=10^{-2} ρ = 1 0 − 2 and ( s k ) (s_k) ( s k ) is a random permutation of { 0 , 1 7 , … , 1 } \{0,\frac{1}{7},\ldots,1\} { 0 , 7 1 , … , 1 } , so the volume ratio σ min d / σ max d = ρ \sigma_{\min}^d/\sigma_{\max}^d=\rho σ m i n d / σ m a x d = ρ is the same at every d d d .
Four-mode anisotropic mixture (zodmc). The two-dimensional mixture of He et al. [9 ] , π = ∑ i = 1 4 w i N ( sep m i , Σ i ) \pi=\sum_{i=1}^{4}w_i\mathcal{N}(\operatorname{sep}m_i,\Sigma_i) π = ∑ i = 1 4 w i N ( sep m i , Σ i ) with w = ( 0.1 , 0.2 , 0.3 , 0.4 ) w=(0.1,0.2,0.3,0.4) w = ( 0.1 , 0.2 , 0.3 , 0.4 ) , m i ∈ { ( 0 , 0 ) , ( 0 , 11 ) , ( 9 , 9 ) , ( 11 , 0 ) } m_i\in\{(0,0),(0,11),(9,9),(11,0)\} m i ∈ {( 0 , 0 ) , ( 0 , 11 ) , ( 9 , 9 ) , ( 11 , 0 )} and Σ 1 = ( 1 0.5 0.5 1 ) \Sigma_1=\begin{pmatrix}1&0.5\\0.5&1\end{pmatrix} Σ 1 = ( 1 0.5 0.5 1 ) , Σ 2 = ( 0.3 − 0.2 − 0.2 0.3 ) \Sigma_2=\begin{pmatrix}0.3&-0.2\\-0.2&0.3\end{pmatrix} Σ 2 = ( 0.3 − 0.2 − 0.2 0.3 ) , Σ 3 = ( 1 0.3 0.3 1 ) \Sigma_3=\begin{pmatrix}1&0.3\\0.3&1\end{pmatrix} Σ 3 = ( 1 0.3 0.3 1 ) , Σ 4 = ( 1.2 − 1 − 1 1.2 ) \Sigma_4=\begin{pmatrix}1.2&-1\\-1&1.2\end{pmatrix} Σ 4 = ( 1.2 − 1 − 1 1.2 ) . sep = 1 \operatorname{sep}=1 sep = 1 recovers their original means.
Does the covariance have to be estimated?
In our experiments, the weights h , g h,g h , g solve the minimization problem
( h ∗ , g ∗ ) = h ∈ R N + 1 , g ∈ R p arg min ∑ k ∉ K Ω k , k δ k ( h , g ) 2 + λ h T Σ h s.t. δ k ( h , g ) = 0 , k ∈ K . (91) (h^\ast,g^\ast)=\underset{h\in\mathbb{R}^{N+1},\,g\in\mathbb{R^p}{\operatorname{arg\,min}}}\ \sum_{k\notin\mathcal{K}}\Omega_{k,k}\delta_k(h,g)^2+\lambda h^{\mathsf{T}}\Sigma h\quad\text{s.t.}\quad\delta_k(h,g)=0,\ k\in\mathcal{K}. \tag*{(91)} ( h ∗ , g ∗ ) = h ∈ R N + 1 , g ∈ R p arg min k ∈ / K ∑ Ω k , k δ k ( h , g ) 2 + λ h T Σ h s.t. δ k ( h , g ) = 0 , k ∈ K . (91)
We use Σ \Sigma Σ as an empirically estimated covariance matrix of the score estimator s ^ \hat{s} s ^ at the different { a i } i = 0 N \{a_i\}_{i=0}^{N} { a i } i = 0 N design levels. This requires multiple calls to the score estimator to estimate the covariance matrix.
We ablate it by replacing Σ ^ \hat{\Sigma} Σ ^ with three progressively coarser surrogates, holding nodes, degree, λ \lambda λ , misfit weights, endpoint anchors and oracle budget fixed: diag ( Σ ^ ) \operatorname{diag}(\hat{\Sigma}) diag ( Σ ^ ) , which keeps the per-level variances and drops the cross-level correlations; c I cI c I with c = 1 n ∑ i Σ ^ i i c = \frac{1}{n}\sum_i \hat{\Sigma}_{ii} c = n 1 ∑ i Σ ^ ii , which keeps only the overall scale of the estimated covariance and discards its shape; and I I I , which measures nothing. The budget is unchanged throughout, since the replicate groups already feed the reported estimate. Note that c I cI c I and I I I are not the same rule: μ \mu μ tracks tr Σ \operatorname{tr}\Sigma tr Σ , so the solve is invariant to rescaling Σ \Sigma Σ everywhere except the exact endpoint rows, whose variance is an absolute quantity that does not rescale. Forcing the interior to unit scale therefore multiplies the trust placed in the endpoint anchors by 1 / c 1/c 1/ c , which is inert when c ≈ 1 c \approx1 c ≈ 1 and severe on stiff targets.
Figure 9 reports W 2 W_2 W 2 against dimension for the four models; the comparisons quoted below are per-seed ratios to Σ ^ \hat{\Sigma} Σ ^ . Two things stand out. The correlations are worth nothing: diag ( Σ ^ ) \operatorname{diag}(\hat{\Sigma}) diag ( Σ ^ ) sits on unity in every panel at every dimension, so estimating n ( n + 1 ) / 2 n(n+1)/2 n ( n + 1 ) /2 entries buys nothing over estimating the n n n diagonal terms. This is consistent with Appendix § 9 : Σ \Sigma Σ enters only the variance half of the error, and that half shrinks as the base estimator’s importance weights degenerate, so an inverse-variance tilt optimises a diminishing share of the error while distorting h h h away from the allocation that reproduces the basis.
Figure 9. Covariance ablation: W 2 W_2 W 2 against dimension for the four choices of Σ \Sigma Σ , at a matched oracle budget. Bars are [min, max] over 3 seeds and the vertex panel reports span W 2 W_2 W 2 . Σ ^ \hat{\Sigma} Σ ^ and diag ( Σ ^ ) \operatorname{diag}(\hat{\Sigma}) diag ( Σ ^ ) coincide to within about 1%, as do c I cI c I and I I I , so each model carries its own dash pattern and marker.
Score Estimation Subroutine
Algorithm 1 gives the post-processed score s ˉ ( u , a 0 ) \bar{s}(u,a_0) s ˉ ( u , a 0 ) that replaces the base estimator in the reverse process of (6) , written in the form of the constrained quadratic program (29) of § 3.2 , so that line 6 returns the weights ( h ∗ , g ∗ ) (h^*,g^*) ( h ∗ , g ∗ ) of Theorem 2 and line 7 is the affine combination (26) . Each design level is queried N b a t c h N_{\mathrm{batch}} N batch times independently, each query being one full estimate from n n n Monte Carlo draws, for a budget of N b a t c h ( N + 1 ) n N_{\mathrm{batch}}(N+1)n N batch ( N + 1 ) n draws per score (2 × 6 × 5,000 = 60,000 2 \times6 \times5{,}000 = 60{,}000 2 × 6 × 5 , 000 = 60 , 000 in our experiments). The spread between replicates at the same level gives the variances V i V_i V i , and their mean is the data the weights are applied to.
Algorithm 1 Post-processed score s ˉ ( u , a 0 ) \bar{s}(u,a_0) s ˉ ( u , a 0 ) . The values used in the experiments are collected in Table 1 .
Require: location u ∈ R d u \in\mathbb{R}^d u ∈ R d ; signal level a 0 a_0 a 0 ; base estimator s ^ ( u , a ; n ) \hat{s}(u,a;n) s ^ ( u , a ; n ) ; grid of N + 1 N+1 N + 1 levels uniform on [ a , a ˉ ] [a,\bar{a}] [ a , a ˉ ] ; Legendre basis ϕ 0 , … , ϕ K \phi_0,\ldots,\phi_K ϕ 0 , … , ϕ K ; replicates N b a t c h N_{\mathrm{batch}} N batch ; ridge weight λ \lambda λ .
Replace the grid level nearest a 0 a_0 a 0 by a 0 a_0 a 0 , giving design levels ( a 0 , … , a N ) (a_0,\ldots,a_N) ( a 0 , … , a N )
s ^ r , i ← s ^ ( u , a i ; n ) \hat{s}_{r,i} \leftarrow\hat{s}(u,a_i;n) s ^ r , i ← s ^ ( u , a i ; n ) for i = 0 , … , N i=0,\ldots,N i = 0 , … , N and r = 1 , … , N b a t c h r=1,\ldots,N_{\mathrm{batch}} r = 1 , … , N batch ▹ \triangleright ▹ independent calls
s ˉ i ← 1 N b a t c h ∑ r s ^ r , i \bar{s}_i \leftarrow\frac{1}{N_{\mathrm{batch}}}\sum_r \hat{s}_{r,i} s ˉ i ← N batch 1 ∑ r s ^ r , i
V i ← 1 ( N b a t c h − 1 ) d ∑ r ∥ s ^ r , i − s ˉ i ∥ 2 V_i \leftarrow\frac{1}{(N_{\mathrm{batch}}-1)d}\sum_r\lVert\hat{s}_{r,i}-\bar{s}_i\rVert^2 V i ← ( N batch − 1 ) d 1 ∑ r ∥ s ^ r , i − s ˉ i ∥ 2 ▹ \triangleright ▹ variance of the base estimator at level a i a_i a i
v 0 ← − u v_0 \leftarrow-u v 0 ← − u , v 1 ← ∇ log π ( u ) v_1 \leftarrow\nabla\log\pi(u) v 1 ← ∇ log π ( u ) ▹ \triangleright ▹ exact scores at a = 0 , 1 a=0,1 a = 0 , 1
( h , g ) ← arg min h ∈ R N + 1 , g ∈ R 2 ∑ k = 1 K 1 k 3 ( ∑ i = 0 N h i ϕ k ( a i ) + g 0 ϕ k ( 0 ) + g 1 ϕ k ( 1 ) − ϕ k ( a 0 ) ) 2 + λ ∑ i = 0 N V i h i 2 (h,g)\leftarrow\underset{h\in\mathbb{R}^{N+1},\,g\in\mathbb{R}^2}{\operatorname{arg\,min}}\ \sum_{k=1}^{K}\frac{1}{k^3}\left(\sum_{i=0}^{N}h_i\phi_k(a_i)+g_0\phi_k(0)+g_1\phi_k(1)-\phi_k(a_0)\right)^2+\lambda\sum_{i=0}^{N}V_i h_i^2 ( h , g ) ← h ∈ R N + 1 , g ∈ R 2 arg min ∑ k = 1 K k 3 1 ( ∑ i = 0 N h i ϕ k ( a i ) + g 0 ϕ k ( 0 ) + g 1 ϕ k ( 1 ) − ϕ k ( a 0 ) ) 2 + λ ∑ i = 0 N V i h i 2 , subject to ∑ i = 0 N h i ϕ k ( a i ) + g 0 ϕ k ( 0 ) + g 1 ϕ k ( 1 ) = ϕ k ( a 0 ) \sum_{i=0}^{N}h_i\phi_k(a_i)+g_0\phi_k(0)+g_1\phi_k(1)=\phi_k(a_0) ∑ i = 0 N h i ϕ k ( a i ) + g 0 ϕ k ( 0 ) + g 1 ϕ k ( 1 ) = ϕ k ( a 0 ) , k = 0 k=0 k = 0 ; problem (29)
return s ˉ ( u , a 0 ) = ∑ i = 0 N h i s ˉ i + g 0 v 0 + g 1 v 1 \bar{s}(u,a_0)=\sum_{i=0}^{N}h_i\bar{s}_i+g_0v_0+g_1v_1 s ˉ ( u , a 0 ) = ∑ i = 0 N h i s ˉ i + g 0 v 0 + g 1 v 1 ▹ \triangleright ▹ eq. (26)
Implementation details. Here we present some minor implementation modifications that we found helpful in practice.
The penalty is placed on the misfit rather than on the variance. Writing h ~ = ( h , g ) \tilde{h}=(h,g) h ~ = ( h , g ) , A ~ = [ ϕ ( a 0 ) , … , ϕ ( a N ) , ϕ ( 0 ) , ϕ ( 1 ) ] \tilde{A}=[\phi(a_0),\ldots,\phi(a_N),\phi(0),\phi(1)] A ~ = [ ϕ ( a 0 ) , … , ϕ ( a N ) , ϕ ( 0 ) , ϕ ( 1 )] with ϕ ( a ) = ( ϕ 0 ( a ) , … , ϕ K ( a ) ) ⊤ \phi(a)=(\phi_0(a),\ldots,\phi_K(a))^\top ϕ ( a ) = ( ϕ 0 ( a ) , … , ϕ K ( a ) ) ⊤ , b = ϕ ( a 0 ) b=\phi(a_0) b = ϕ ( a 0 ) and W = diag ( w 0 , 1 − 3 , 2 − 3 , … , K − 3 ) W=\operatorname{diag}(w_0,1^{-3},2^{-3},\ldots,K^{-3}) W = diag ( w 0 , 1 − 3 , 2 − 3 , … , K − 3 ) , the implementation solves
h ~ ∗ = arg min h ~ h ~ ⊤ Σ ~ h ~ + μ ∥ W 1 / 2 ( A ~ h ~ − b ) ∥ 2 = μ ( Σ ~ + μ A ~ ⊤ W A ~ ) − 1 A ~ ⊤ W b , μ = λ tr Σ N + 1 . (92) \tilde{h}^{*}=\underset{\tilde{h}}{\operatorname{arg\,min}}\ \tilde{h}^{\top}\tilde{\Sigma}\tilde{h}+\mu\lVert W^{1/2}(\tilde{A}\tilde{h}-b)\rVert^2
=\mu(\tilde{\Sigma}+\mu\tilde{A}^{\top}W\tilde{A})^{-1}\tilde{A}^{\top}Wb,\qquad\mu=\lambda\frac{\operatorname{tr}\Sigma}{N+1}. \tag*{(92)} h ~ ∗ = h ~ arg min h ~ ⊤ Σ ~ h ~ + μ ∥ W 1/2 ( A ~ h ~ − b ) ∥ 2 = μ ( Σ ~ + μ A ~ ⊤ W A ~ ) − 1 A ~ ⊤ W b , μ = λ N + 1 tr Σ . (92)
Dividing through by μ \mu μ shows this is the objective of line 6, i.e. the adjoint problem (25) with Ω k , k = k − 3 \Omega_{k,k}=k^{-3} Ω k , k = k − 3 and K = { 0 } \mathcal{K}=\{0\} K = { 0 } , with ridge weight 1 / μ 1/\mu 1/ μ and the degree-0 constraint replaced by a large weight w 0 = 10 4 w_0=10^4 w 0 = 1 0 4 on its misfit; the closed form is then the soft-constraint counterpart of ( h ∗ , g ∗ ) (h^*,g^*) ( h ∗ , g ∗ ) in (28). We use the large weight rather than an exact constraint so that the weights are given by a single linear solve, which stays well conditioned even though the endpoint rows of Σ ~ \tilde{\Sigma} Σ ~ have zero variance. The factor tr ( Σ ) / ( N + 1 ) \operatorname{tr}(\Sigma)/(N+1) tr ( Σ ) / ( N + 1 ) makes the trade-off between the two terms invariant to the overall scale of the base estimator’s variance, which differs by orders of magnitude across targets and along a single reverse trajectory. Without it a single λ \lambda λ would be nearly unbiased on one target and heavily shrunk on another. By doing so we are able to off load the tuning of λ \lambda λ to the overall scale of the base estimator’s variance. We report this λ \lambda λ in Table 1 and Appendix § 12 .
The endpoint constraints are soft. Theorem 2 treats the exact scores s ( u , 0 ) = − u s(u,0)=-u s ( u , 0 ) = − u and s ( u , 1 ) = ∇ log π ( u ) s(u,1)=\nabla\log\pi(u) s ( u , 1 ) = ∇ log π ( u ) as hard constraints, equivalently as observations of zero variance. The implementation gives them the small variances ϵ e = ϵ ∥ v e ∥ 2 / d \epsilon_e=\epsilon\lVert v_e\rVert^2/d ϵ e = ϵ ∥ v e ∥ 2 / d , e ∈ { 0 , 1 } e\in\{0,1\} e ∈ { 0 , 1 } , with ϵ = 10 − 4 \epsilon=10^{-4} ϵ = 1 0 − 4 , so that Σ ~ \tilde{\Sigma} Σ ~ is blkdiag ( Σ , ϵ 0 , ϵ 1 ) \operatorname{blkdiag}(\Sigma,\epsilon_0,\epsilon_1) blkdiag ( Σ , ϵ 0 , ϵ 1 ) in (92); ϵ → 0 \epsilon\to0 ϵ → 0 recovers the hard constraint. This is done for numerical stability and does not affect the final solution in practice.
Hyperparameter Selection
Our algorithm has several hyperparameters that need to be chosen. Specifically, we have to choose the hyperparameters for the base estimator, which for importance sampling and rejection sampling it is simply a constant M M M saying how any Monte Carlo samples to use. Then there is the size of the grid K K K , and the degree of the polynomial K d e g K_{\mathrm{deg}} K deg , as well as the number of batches N N N to estimate the covariance matrix, and finally the hyperparameter λ \lambda λ for the regression objective.
Because N N N the number of batches needed to estimate the covariance matrix for the regression problem, before tuning anything downstream we first check how well Σ \Sigma Σ itself is estimated, since every other hyperparameter will depend on it.
The reverse grid
We place the 20 levels of (6) by the step-size rule
τ k = c min { t k , 1 } , t k = − log a k , (93) \tau_k = c \min\{t_k,1\}, \qquad t_k = -\log a_k, \tag*{(93)} τ k = c min { t k , 1 } , t k = − log a k , (93)
in the diffusion time t t t of the equivalent variance-preserving process, so that t k t_k t k is the distance to the data end a = 1 a=1 a = 1 : steps are uniform in t t t while the noise dominates, and shrink in proportion to t k t_k t k once t k < 1 t_k<1 t k < 1 . This is the exponentially decreasing schedule of Chen et al. [4 ] , He et al. [9 ] , Benton et al. [1 ] , where it is what gives the optimal dependence on the early-stopping time.
We use c = 0.85 c=0.85 c = 0.85 , which places the grid close to uniform in the log signal-to-noise ratio λ = log ( a 2 / ( 1 − a 2 ) ) \lambda=\log(a^2/(1-a^2)) λ = log ( a 2 / ( 1 − a 2 )) , the spacing used by Kingma et al. [12 ] and Lu et al. [15 ] . The levels then run from a 0 = 6.7 × 10 − 3 a_0=6.7\times10^{-3} a 0 = 6.7 × 1 0 − 3 to a 19 = 0.999 a_{19}=0.999 a 19 = 0.999 with h k / a k ≤ 0.68 h_k/a_k\le0.68 h k / a k ≤ 0.68 throughout. We do not tune c c c or the grid any further.
The configuration used in the experiments
Table 1 collects the set of hyperparameters ran/sweep for different methods across all of our experiments. The compute budget is stated in target-gradient evaluations and is matched across samplers: each particle costs 60,000 × \times × 20 = 1.2 =1.2 = 1.2 M evaluations, whether they are spent as importance-sampling draws, as RDMC inner-chain steps, or as moves of a classical chain.
Every number reported for the ill-conditioned Gaussian uses one configuration, unchanged across all 16 cells of the d × κ d\times\kappa d × κ grid:
Design levels. N + 1 = 6 N+1=6 N + 1 = 6 nodes on a uniform grid over b ∈ [ 0.05 , 0.95 ] b\in[0.05,0.95] b ∈ [ 0.05 , 0.95 ] , with the query level a 0 a_0 a 0 substituted for whichever grid point is nearest to it. Substituting rather than appending matters: appending lets two design levels coincide when a 0 a_0 a 0 falls near a grid point, which makes two rows of Σ ^ \widehat{\Sigma} Σ near-identical and the solve ill-conditioned.
Degree. K d e g = 5 K_{\mathrm{deg}}=5 K deg = 5 , the largest degree the node count supports (A A A is ( K d e g + 1 ) × ( N + 1 ) (K_{\mathrm{deg}}+1)\times(N+1) ( K deg + 1 ) × ( N + 1 ) , so K d e g ≤ N K_{\mathrm{deg}}\le N K deg ≤ N is required for A h = b Ah=b A h = b to be solvable).
Covariance batches. N b a t c h = 2 N_{\mathrm{batch}}=2 N batch = 2 replicate groups, pooled across the particle batch, and the mean of those groups is reused as the data h h h is applied to rather than drawing a further independent group. Reuse costs a plug-in bias of order 1 / N b a t c h 1/N_{\mathrm{batch}} 1/ N batch but cuts the reported estimate’s variance by the same factor and saves N + 1 N+1 N + 1 calls; measured, it was worth roughly 20% in W 2 W_2 W 2 .
Misfit weights. w k ∝ k − 3 w_k\propto k^{-3} w k ∝ k − 3 , with the degree-0 constraint enforced exactly. By the primal-dual identity of § 3.2 this is exactly a k 3 k^3 k 3 ridge on the fitted coefficients, expressed in the dual variables.
Endpoint anchors. The two exactly known scores s ( u , 0 ) = − u s(u,0)=-u s ( u , 0 ) = − u and s ( u , 1 ) = ∇ log π ( u ) s(u,1)=\nabla\log\pi(u) s ( u , 1 ) = ∇ log π ( u ) enter as extra design nodes with variance ϵ = 10 − 4 1 s e n d 2 \epsilon=10^{-4}\frac{1}{s_{\mathrm{end}}^2} ϵ = 1 0 − 4 s end 2 1 . They cost no Monte Carlo, so the budget is unchanged. The ϵ → 0 \epsilon\to0 ϵ → 0 limit – treating them as exact, zero-variance constraints – diverges on targets with a stiff score, because ∇ log π \nabla\log\pi ∇ log π is unbounded while the base estimate is implicitly bounded by the proposal geometry; scaling ϵ \epsilon ϵ by the anchor’s own magnitude penalizes its contribution rather than its weight, and is inert where the anchor is well-scaled.
Together these cost N b a t c h ( N + 1 ) = 12 N_{\mathrm{batch}}(N+1) = 12 N batch ( N + 1 ) = 12 base-estimator calls per reverse step, against raw’s one, and the per-call Monte Carlo budget is divided by 12 so the total spend per step matches.
On not tuning λ \lambda λ per target. λ \lambda λ is the one hyperparameter whose optimum visibly moves across the grid, and it would be easy to report the best value in each cell. We do not, because that is an oracle choice a deployed sampler does not get. The cost of fixing it is small and worth stating: selecting the best λ ∈ { 1 , 10 } \lambda\in\{1,10\} λ ∈ { 1 , 10 } per cell improves the geometric-mean gain over raw from 1.94× to 2.09× across the grid, and by 0–14% in each cell where the method wins. We report the untuned λ = 1 \lambda= 1 λ = 1 number throughout.
A configuration we exclude. Large λ \lambda λ (≥ 100 \ge100 ≥ 100 ) is unstable: across the grid it diverges on a subset of seeds in five separate cells, with a seed standard deviation comparable to or larger than the mean, while λ ∈ { 1 , 10 } \lambda\in\{1,10\} λ ∈ { 1 , 10 } is stable in the same cells. Large λ \lambda λ drives the fit toward exact mean preservation and away from variance damping, which is the same regime in which the ϵ → 0 \epsilon\to0 ϵ → 0 endpoint limit fails. We exclude it rather than report a number produced by a diverging run.
Convergence of the Estimated Score Covariance
Setup. Fix a target from Appendix § 10 and a set of M ∈ { 10 , 50 , 150 } M \in\{10,50,150\} M ∈ { 10 , 50 , 150 } points x 1 , … , x M x_1,\ldots,x_M x 1 , … , x M drawn on-trajectory at a reference noise level b b b (i.e. x i = a b x 0 ( i ) + s b z ( i ) x_i = a_b x_0^{(i)} + s_b z^{(i)} x i = a b x 0 ( i ) + s b z ( i ) for x 0 ( i ) ∼ π x_0^{(i)} \sim\pi x 0 ( i ) ∼ π ). Given N N N independent replicate score evaluations at each of the N ℓ = 5 N_\ell= 5 N ℓ = 5 evaluation levels b ∈ { 0.1 , 0.3 , 0.5 , 0.7 , 0.9 } b \in\{0.1,0.3,0.5,0.7,0.9\} b ∈ { 0.1 , 0.3 , 0.5 , 0.7 , 0.9 } , pooled over the M M M points and the coordinate dimension, we form the empirical covariance
Σ ^ N [ i , j ] = 1 ( N − 1 ) M d ∑ g = 1 N ∑ m = 1 M ∑ k = 1 d ( s ^ g ( x m , b i ) − s ˉ ( x m , b i ) ) ( s ^ g ( x m , b j ) − s ˉ ( x m , b j ) ) \widehat{\Sigma}_N[i,j] = \frac{1}{(N-1)Md}\sum_{g=1}^{N}\sum_{m=1}^{M}\sum_{k=1}^{d}\left(\widehat{s}_g(x_m,b_i)-\bar{s}(x_m,b_i)\right)\left(\widehat{s}_g(x_m,b_j)-\bar{s}(x_m,b_j)\right) Σ N [ i , j ] = ( N − 1 ) M d 1 g = 1 ∑ N m = 1 ∑ M k = 1 ∑ d ( s g ( x m , b i ) − s ˉ ( x m , b i ) ) ( s g ( x m , b j ) − s ˉ ( x m , b j ) )
the same weighted-covariance quantity used internally by the regression. We draw the N N N replicate groups such that the sequence Σ ^ 2 , Σ ^ 5 , … , Σ ^ 500 \widehat{\Sigma}_2,\widehat{\Sigma}_5,\ldots,\widehat{\Sigma}_{500} Σ 2 , Σ 5 , … , Σ 500 is a sequence converging to the same value.
Metric. We compute the absolute Frobenius error ∥ Σ ^ N − Σ ∥ F \lVert\widehat{\Sigma}_N-\Sigma\rVert_F ∥ Σ N − Σ ∥ F against a reference Σ : = Σ ^ 500 \Sigma:= \widehat{\Sigma}_{500} Σ := Σ 500 , as a function of N N N . We repeat this procedure 5 times, and plot the median along with the range [min, max] range of the error.
Comparison. We compare two base estimators: importance sampling with 1000 Monte Carlo samples per time and rejection sampling with 3000 samples per time , this larger per-point number was chosen to off-set the low acceptance rate of the rejection sampler. We vary the pooling size M ∈ { 10 , 50 , 150 } M \in\{10,50,150\} M ∈ { 10 , 50 , 150 } to see how using more groups changes the convergence picture as a function of the group size N N N .
Figure 11. Σ ^ \widehat{\Sigma} Σ -convergence, orthogonal-covariance mixture (x_gmm, d = 2 d = 2 d = 2 ). Same layout as Figure 10 .
Figure 10. Σ ^ \widehat{\Sigma} Σ -convergence, ill-conditioned Gaussian (d = 2 d=2 d = 2 , κ = 1000 \kappa=1000 κ = 1000 ). Rows: IS (top) vs. rejection sampling (bottom). Columns: pooling size (a) M = 10 M=10 M = 10 , (b) M = 50 M=50 M = 50 , (c) M = 150 M=150 M = 150 . Each curve is one reference noise level b b b ; markers are the median and error bars the full range over 5 independent trials.
Figure 12. Σ ^ \widehat{\Sigma} Σ -convergence, four-mode anisotropic mixture (zodmc, sep = 11 = 11 = 11 ). Same layout as Figure 10 .
Findings. Across all three targets, importance sampling’s Σ ^ \widehat{\Sigma} Σ converges quickly: by N ≈ 150 N \approx150 N ≈ 150 replicate draws its absolute Frobenius error to the N = 500 N = 500 N = 500 reference is at or below 10 − 2 10^{-2} 1 0 − 2 for every M M M and b b b we tried. Rejection sampling’s Σ ^ \widehat{\Sigma} Σ is noisier and slower converging in every target, which is expected considering the acceptance rate. We find that the group size M M M has a smaller effect in this regime; on the other hand, the choice of N N N is more important. A precise Σ ^ \widehat{\Sigma} Σ takes tens of replicates. A crude estimate of Σ \Sigma Σ , however, is enough to set the weights, consistent with the observation in Appendix § 10 .§ 1 that Σ = I \Sigma= I Σ = I performs comparably well. We therefore estimate it with only N b a t c h = 2 N_{\mathrm{batch}} = 2 N batch = 2 replicates in our experiments, which keeps each replicate’s Monte Carlo sample large and so limits the bias of self-normalized importance sampling. When more compute is available, more replicates can be used.
Optimal weight allocation on the geometry targets
Figure 4 reports how much of the recoverable error the constrained estimator captures. Figure 13 shows how it does so, and what the unrestricted optimum would do instead. Each column is a query level a 0 a_0 a 0 , each row a design level, coloured by ∣ h i ∣ |h_i| ∣ h i ∣ normalized within the column – so a column reads as the recipe for that query’s estimate.
Figure 13. Weight allocation on the orthogonal mixture and the 40-mode mixture, at the high-dimensional cell of each. Panels alternate ours and the Wiener oracle – the minimum over all affine post-processors – for each target. Colour scale is shared across all four panels.
Two features recur from the ill-conditioned Gaussian. The oracle spreads its weight more evenly across design levels than the constrained rule does, which concentrates on the levels nearest the query and leans increasingly on the on-policy estimate as a 0 a_0 a 0 grows. And at small a 0 a_0 a 0 – where the recoverable gap is largest – the oracle draws on distant levels that mean preservation forbids, which is where the residual 12–24% of unrecovered error sits. The two allocations agree most closely in the mid-range, which is also where the J J J curves of Figure 4 are closest together.
Figure 14. Samples at d = 10 d = 10 d = 10 on the banana, the orthogonal mixture and the 40-mode mixture, first two coordinates, with the target in gray behind each panel. Equal compute, one seed; W 2 W_2 W 2 is quoted above each panel. Figure 5 (d) shows the 40-mode mixture at d = 30 d = 30 d = 30 .