semi-exact control functionals from sard’s methodsemi-exact control functionals from sard’s...

40
Semi-Exact Control Functionals From Sard’s Method Leah F. South 1 , Toni Karvonen 2 , Chris Nemeth 3 , Mark Girolami 4,2 , Chris. J. Oates 5,2 1 Queensland University of Technology, Australia 2 The Alan Turing Institute, UK 3 Lancaster University, UK 4 University of Cambridge, UK 5 Newcastle University, UK January 8, 2021 Abstract This paper focuses on the numerical computation of posterior expected quantities of interest, where existing approaches based on ergodic averages are gated by the asymptotic variance of the integrand. To address this challenge, a novel technique is proposed to post-process Markov chain Monte Carlo output, based on Sard’s approach to numerical integration and the control functional method. The use of Sard’s approach ensures that our control functionals are exact on all polynomials up to a fixed degree in the Bernstein- von-Mises limit, so that the reduced variance estimator approximates the behaviour of a polynomially-exact (e.g. Gaussian) cubature method. The proposed method is shown to combine the robustness of parametric control variates with the flexibility of non-parametric control functionals across a selection of Bayesian inference tasks. All methods used in this paper are available in the R package ZVCV. Keywords: control variate; Stein operator; variance reduction. 1 Introduction This paper focuses on computing the integral I (f )= R f (x)p(x)dx of a functional f of interest with respect to a distribution admitting a Lebesgue density p that is positive and continuously differentiable on R d . In particular, we assume that both p and its gradient can be evaluated pointwise up to an intractable normalization constant. The standard approach to computing I (f ) in this context is to simulate the first m steps of a p-invariant Markov chain (x (i) ) i=1 , possibly after an initial burn-in period, and to take the average along the sample path as an approximation 1 arXiv:2002.00033v3 [stat.CO] 7 Jan 2021

Upload: others

Post on 02-Oct-2020

2 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Semi-Exact Control Functionals From Sard’s MethodSemi-Exact Control Functionals From Sard’s Method Leah F. South 1, Toni Karvonen2, Chris Nemeth , Mark Girolami3 ;4, Chris.J. Oates5

Semi-Exact Control Functionals FromSard’s Method

Leah F. South1, Toni Karvonen2, Chris Nemeth3,Mark Girolami4,2, Chris. J. Oates5,2

1Queensland University of Technology, Australia

2The Alan Turing Institute, UK

3Lancaster University, UK

4University of Cambridge, UK

5Newcastle University, UK

January 8, 2021

Abstract

This paper focuses on the numerical computation of posterior expectedquantities of interest, where existing approaches based on ergodic averages aregated by the asymptotic variance of the integrand. To address this challenge,a novel technique is proposed to post-process Markov chain Monte Carlooutput, based on Sard’s approach to numerical integration and the controlfunctional method. The use of Sard’s approach ensures that our controlfunctionals are exact on all polynomials up to a fixed degree in the Bernstein-von-Mises limit, so that the reduced variance estimator approximates thebehaviour of a polynomially-exact (e.g. Gaussian) cubature method. Theproposed method is shown to combine the robustness of parametric controlvariates with the flexibility of non-parametric control functionals across aselection of Bayesian inference tasks. All methods used in this paper areavailable in the R package ZVCV.

Keywords: control variate; Stein operator; variance reduction.

1 Introduction

This paper focuses on computing the integral I(f) =∫f(xxx)p(xxx)dxxx of a functional

f of interest with respect to a distribution admitting a Lebesgue density p that ispositive and continuously differentiable on Rd. In particular, we assume that bothp and its gradient can be evaluated pointwise up to an intractable normalizationconstant. The standard approach to computing I(f) in this context is to simulatethe first m steps of a p-invariant Markov chain (xxx(i))∞i=1, possibly after an initialburn-in period, and to take the average along the sample path as an approximation

1

arX

iv:2

002.

0003

3v3

[st

at.C

O]

7 J

an 2

021

Page 2: Semi-Exact Control Functionals From Sard’s MethodSemi-Exact Control Functionals From Sard’s Method Leah F. South 1, Toni Karvonen2, Chris Nemeth , Mark Girolami3 ;4, Chris.J. Oates5

to the integral:

I(f) ≈ IMC(f) =1

m

m∑i=1

f(xxx(i)). (1)

See Chapters 6–10 of Robert and Casella (2013) for background. In this paper E,V and C respectively denote expectation, variance and covariance with respect tothe law P of the Markov chain. Under regularity conditions on p that ensure theMarkov chain (xxx(i))∞i=1 is aperiodic, irreducible and reversible, the convergence ofIMC(f) to I(f) as m→∞ is described by a central limit theorem

√m(IMC(f)− I(f))→ N (0, σ(f)2) (2)

where convergence occurs in distribution and, if the chain starts in stationarity,

σ(f)2 = V[f(xxx(1))] + 2∞∑i=2

C[f(xxx(1)), f(xxx(i))]

is the asymptotic variance of f along the sample path. See Theorem 4.7.7 of Robertand Casella (2013) and more generally Meyn and Tweedie (1993) for theoreticalbackground. Note that for all but the most trivial function f we have σ(f)2 > 0and hence, to achieve an approximation error of OP (ε), a potentially large numberO(ε−2) of calls to f and p are required.

One approach to reduce the computational cost is through the control variatemethod (Ripley, 1987; Hammersley and Handscomb, 1964), which involves findingan approximation fm to f which can be exactly integrated under p, such thatσ(f − fm)2 � σ(f)2. Given a choice of fm, the standard estimator (1) is replacedwith

ICV(f) =1

m

m∑i=1

[f(xxx(i))− fm(xxx(i))] +

∫fm(xxx)p(xxx)dxxx︸ ︷︷ ︸

(∗)

, (3)

where (∗) is exactly computed. This last requirement makes it challenging to de-velop control variates for general use, particularly in Bayesian statistics where oftenthe density p can only be accessed in its un-normalized form. In the Bayesiancontext, Assaraf and Caffarel (1999); Mira et al. (2013) and Oates et al. (2017)addressed this challenge by using fm = cm + Lgm where cm ∈ R, gm is a user-chosen parametric or non-parametric function and L is an operator, for examplethe Langevin Stein operator (Stein, 1972; Gorham and Mackey, 2015), that dependson p through its gradient and satisfies

∫(Lgm)(xxx)p(xxx)dxxx = 0 under regularity condi-

tions (see Lemma 1). Convergence of ICV(f) to I(f) has been studied under (strong)regularity conditions and, in particular (i) if gm is chosen parametrically, then ingeneral lim inf σ(f − fm)2 > 0 so that, even if asymptotic variance is reduced, con-vergence rates are unaffected; (ii) if gm is chosen in an appropriate non-parametricmanner then lim supσ(f − fm)2 = 0 and a smaller number O(ε−2+δ), 0 < δ < 2,of calls to f , p and its gradient are required to achieve an approximation error ofOP (ε) for the integral (see Oates et al., 2019; Mijatovic et al., 2018; Belomestnyet al., 2017, 2019b,a). In the parametric case Lgm is called a control variate whilein the non-parametric case it is called a control functional.

2

Page 3: Semi-Exact Control Functionals From Sard’s MethodSemi-Exact Control Functionals From Sard’s Method Leah F. South 1, Toni Karvonen2, Chris Nemeth , Mark Girolami3 ;4, Chris.J. Oates5

Practical parametric approaches to the choice of gm have been well-studied inthe Bayesian context, typically based on polynomial regression models (Assaraf andCaffarel, 1999; Mira et al., 2013; Papamarkou et al., 2014; Oates et al., 2016; Brosseet al., 2019), but neural networks have also been proposed recently (Wan et al.,2019; Si et al., 2020). In particular, existing control variates based on polynomialregression have the attractive property of being semi-exact, meaning that there is awell-characterized set of functions f ∈ F for which fm can be shown to exactly equalf after a finite number of samples m have been obtained. For the control variatesof Assaraf and Caffarel (1999) and Mira et al. (2013) the set F contains certain loworder polynomials when p is a Gaussian distribution on Rd. Those authors termtheir control variates “zero variance”, but we prefer the term “semi-exact” since ageneral integrand f will not be an element of F . Regardless of terminology, semi-exactness of the control variate is an appealing property because it implies that theapproximation ICV(f) to I(f) is exact on F . Intuitively, the performance of thecontrol variate method is related to the richness of the set F on which it is exact.For example, polynomial exactness of cubature rules is used to establish their highorder convergence rates using a Taylor expansion argument (e.g. Hildebrand, 1987,Chapter 8).

The development of non-parametric approaches to the choice of gm has to-datefocused on kernel methods (Oates et al., 2017; Barp et al., 2018), piecewise con-stant approximations (Mijatovic et al., 2018) and non-linear approximations basedon selecting basis functions from a dictionary (Belomestny et al., 2017; South et al.,2019). Non-parametric approaches can be motivated using the “double descent”phenomena recently exposed in Belkin et al. (2019), where a regression model basedon a large number of features which are sufficiently regularized can, in some cir-cumstances, achieve better predictive performance compared to regression modelswith a smaller number of predictors selected based on a bias-variance trade-off.Theoretical analysis of non-parametric control variates was provided in the paperscited above, but compared to parametric methods, practical implementations ofnon-parametric methods are less well-developed.

In this paper we propose a semi-exact control functional method. This con-stitutes the “best of both worlds”, where at small m the semi-exactness propertypromotes stability and robustness of the estimator ICV(f), while at large m thenon-parametric regression component can be used to accelerate the convergence ofICV(f) to I(f). In particular we argue that, in the Bernstein-von-Mises limit, theset F on which our method is exact is precisely the set of low order polynomi-als, so that our method can be considered as an approximately polynomially-exactcubature rule developed for the Bayesian context.

Our motivation comes from the approach to numerical integration due to Sard(1949). Many numerical integration methods are based on constructing an approx-imation fm to the integrand f that can be exactly integrated. In this case theintegral I(f) is approximated using (∗) in (3). In Gaussian and related cubatures,the function fm is chosen in such a way that polynomial exactness is guaranteed(Gautschi, 2004, Section 1.4). On the other hand, in kernel cubature and relatedapproaches, fm is an element of a reproducing kernel Hilbert space chosen suchthat an error criterion is minimized (Larkin, 1970). The contribution of Sard was

3

Page 4: Semi-Exact Control Functionals From Sard’s MethodSemi-Exact Control Functionals From Sard’s Method Leah F. South 1, Toni Karvonen2, Chris Nemeth , Mark Girolami3 ;4, Chris.J. Oates5

to combine these two concepts in numerical integration by choosing fm to enforceexactness on a low-dimensional space F of functions and use the remaining degreesof freedom to find a minimum-norm interpolant to the integrand.

The remainder of the paper is structured as follows: Section 2.1 recalls Sard’sapproach to integration and Section 2.2 how Stein operators can be used to constructa control functional. The proposed semi-exact control functional estimator ISECF

is presented in Section 2.3 and its polynomial exactness in the Bernstein-von-Miseslimit is discussed in Section 2.4. A closed-form expression for the resulting estimatorICV is provided in Section 2.5. The statistical and computational efficiency of theproposed semi-exact control functional method is compared with that of existingcontrol variates and control functionals using several simulation studies in Section 3.Practical diagnostics for the proposed method are established in Section 4. Thepaper concludes with a discussion in Section 5.

2 Methods

In this section we provide background details on Sard’s method and Stein operatorsbefore describing the semi-exact control functional method.

2.1 Sard’s Method

Many popular methods for numerical integration are based on either (i) enforc-ing exactness of the integral estimator on a finite-dimensional set of functions F ,typically a linear space of polynomials, or on (ii) integration of a minimum-norminterpolant selected from an infinite-dimensional set of functions H. In each case,the result is a cubature method of the form

INI(f) =m∑i=1

wif(xxx(i)) (4)

for weights {wi}mi=1 ⊂ R and points {xxx(i)}mi=1 ⊂ Rd. Classical examples of methodsin the former category are the univariate Gaussian quadrature rules (Gautschi, 2004,Section 1.4), which are determined by the unique {(wi,xxx(i))}mi=1 ⊂ R×Rd such thatINI(f) = I(f) whenever f is a polynomial of order at most 2m− 1, and Clenshaw–Curtis rules (Clenshaw and Curtis, 1960). Methods of the latter category specifya suitable normed space (H, ‖ · ‖H) of functions, construct an interpolant fm ∈ Hsuch that

fm ∈ arg minh∈H

{‖h‖H : h(xxx(i)) = f(xxx(i)) for i = 1, . . . ,m

}(5)

and use the integral of fm to approximate the true integral. Specific examples in-clude splines (Wahba, 1990) and kernel or Gaussian process based methods (Larkin,1970; O’Hagan, 1991; Briol et al., 2019).

If the set of points {xxx(i)}mi=1 is fixed, the cubature method in (4) has m degrees offreedom corresponding to the choice of the weights {wi}mi=1. The approach proposedby Sard (1949) is a hybrid of the two classical approaches just described, calling

4

Page 5: Semi-Exact Control Functionals From Sard’s MethodSemi-Exact Control Functionals From Sard’s Method Leah F. South 1, Toni Karvonen2, Chris Nemeth , Mark Girolami3 ;4, Chris.J. Oates5

for q ≤ m of these degrees of freedom to be used to ensure that INI(f) is exact forf in a given q-dimensional linear function space F and, if q < m, allocating theremaining m − q degrees of freedom to select a minimal norm interpolant from alarge class of functions H. The approach of Sard is therefore exact for functions inthe finite-dimensional set F and, at the same time, suitable for the integration offunctions in the infinite-dimensional set H. Further background on Sard’s methodcan be found in Larkin (1974) and Karvonen et al. (2018).

However, it is difficult to implement Sard’s method, or indeed any of the classicalapproaches just discussed, in the Bayesian context, since

1. the density p can be evaluated pointwise only up to an intractable normaliza-tion constant;

2. to construct weights one needs to evaluate the integrals of basis functions of Fand of the interpolant fm, which can be as difficult as evaluating the originalintegral.

To circumvent these issues, in this paper we propose to combine Sard’s approachto integration with Stein operators (Stein, 1972; Gorham and Mackey, 2015), thuseliminating the need to access normalization constants and to exactly evaluate in-tegrals. A brief background on Stein operators is provided next.

2.2 Stein Operators

Let · denote the dot product aaa·bbb = aaa>bbb, ∇xxx denote the gradient ∇xxx = [∂x1 , . . . , ∂xd ]>

and ∆xxx denote the Laplacian ∆xxx = ∇xxx · ∇xxx. Let ‖xxx‖ = (xxx · xxx)1/2 denote theEuclidean norm on Rd. The construction that enables us to realize Sard’s methodin the Bayesian context is the Langevin Stein operator L (Gorham and Mackey,2015) on Rd, defined for sufficiently regular g and p as

(Lg)(xxx) = ∆xxxg(xxx) +∇xxxg(xxx) · ∇xxx log p(xxx). (6)

We refer to L as a Stein operator due to the use of equations of the form (6) (upto a simple substitution) in the method of Stein (1972) for assessing convergencein distribution and due to its property of producing functions whose integrals withrespect to p are zero under suitable conditions such as those described in Lemma 1.

Lemma 1. If g : Rd → R is twice continuously differentiable, log p : Rd → Ris continuously differentiable and ‖∇xxxg(xxx)‖ ≤ C‖xxx‖−δp(xxx)−1 is satisfied for someC ∈ R and δ > d− 1, then ∫

(Lg)(xxx)p(xxx)dxxx = 0,

where L is the Stein operator in (6).

The proof is provided in Appendix A. Although our attention is limited to (6), thechoice of Stein operator is not unique and other Stein operators can be derivedusing the generator method of Barbour (1988) or using Schrodinger Hamiltonians

5

Page 6: Semi-Exact Control Functionals From Sard’s MethodSemi-Exact Control Functionals From Sard’s Method Leah F. South 1, Toni Karvonen2, Chris Nemeth , Mark Girolami3 ;4, Chris.J. Oates5

(Assaraf and Caffarel, 1999). Contrary to the standard requirements for a Steinoperator, the operator L in control functionals does not need to fully characterizeconvergence and, as a consequence, a broader class of functions g can be consideredthan in more traditional applications of Stein’s method (Stein, 1972).

It follows that, if the conditions of Lemma 1 are satisfied by gm : Rd → R, theintegral of a function of the form fm = cm + Lgm is simply cm, the constant. Themain challenge in developing control variates, or functionals, based on Stein opera-tors is therefore to find a function gm such that the asymptotic variance σ(f − fm)2

is small. To explicitly minimize asymptotic variance, Mijatovic et al. (2018); Be-lomestny et al. (2019a) and Brosse et al. (2019) restricted attention to particularMetropolis–Hastings or Langevin samplers for which asymptotic variance can beexplicitly characterized. The minimization of empirical variance has also been pro-posed and studied in the case where samples are independent (Belomestny et al.,2017) and dependent (Belomestny et al., 2019a,b). For an approach that is nottied to a particular Markov kernel, authors such as Assaraf and Caffarel (1999) andMira et al. (2013) proposed to minimize mean squared error along the sample path,which corresponds to the case of an independent sampling method. In a similarspirit, the constructions in Oates et al. (2017, 2019) and Barp et al. (2018) werebased on a minimum-norm interpolant, where the choice of norm is decoupled fromthe mechanism from where the points are sampled.

In this paper we combine Sard’s approach to integration with a minimum-norminterpolant construction in the spirit of Oates et al. (2017) and related work; thisis described next.

2.3 The Proposed Method

In this section we first construct an infinite-dimensional space H and a finite-dimensional space F of functions; these will underpin the proposed semi-exactcontrol functional method.

For the infinite-dimensional component, let k : Rd × Rd → R be a positive-definite kernel, meaning that (i) k is symmetric, with k(xxx,yyy) = k(yyy,xxx) for allxxx,yyy ∈ Rd, and (ii) the kernel matrix [KKK]i,j = k(xxx(i),xxx(j)) is positive-definite forany distinct points {xxx(i)}mi=1 ⊂ Rd and any m ∈ N. Recall that such a k induces aunique reproducing kernel Hilbert space G(k). This is a Hilbert space that consistsof functions g : Rd → R and is equipped with an inner product 〈·, ·〉G(k). The kernelk is such that k(·,xxx) ∈ G(k) for all xxx ∈ Rd and it is reproducing in the sensethat 〈g, k(·,xxx)〉G(k) = g(xxx) for any g ∈ G(k) and xxx ∈ Rd. For ααα ∈ Nd

0 the multi-index notation xxxααα := xα1

1 · · ·xαdd and |α| = α1 + · · · + αd will be used. If k is

twice continuously differentiable in the sense of Steinwart and Christmann (2008,Definition 4.35), meaning that the derivatives

∂αααxxx∂αααyyy k(xxx,yyy) =

∂2|ααα|

∂xxxααα∂yyyαααk(xxx,yyy)

exist and are continuous for every multi-index ααα ∈ Nd0 with |ααα| ≤ 2, then

k0(xxx,yyy) = LxxxLyyyk(xxx,yyy), (7)

6

Page 7: Semi-Exact Control Functionals From Sard’s MethodSemi-Exact Control Functionals From Sard’s Method Leah F. South 1, Toni Karvonen2, Chris Nemeth , Mark Girolami3 ;4, Chris.J. Oates5

where Lxxx stands for application of the Stein operator defined in (6) with respect tovariable xxx, is a well-defined and positive-definite kernel (Steinwart and Christmann,2008, Lemma 4.34). The kernel in (7) can be written as

k0(xxx,yyy) = ∆xxx∆yyyk(xxx,yyy) + uuu(xxx)>∇xxx∆yyyk(xxx,yyy)

+ uuu(yyy)>∇yyy∆xxxk(xxx,yyy) + uuu(xxx)>[∇xxx∇>yyy k(xxx,yyy)

]uuu(yyy),

(8)

where ∇xxx∇>yyy k(xxx,yyy) is the d×d matrix with entries [∇xxx∇>yyy k(xxx,yyy)]i,j = ∂xi∂yjk(xxx,yyy)and uuu(xxx) = ∇xxx log p(xxx). If k is radial then (8) can be simplified; see Appendix B.Lemma 2 establishes conditions under which the functions xxx 7→ k0(xxx,yyy), yyy ∈ Rd,and hence elements of the Hilbert space G(k0) reproduced by k0, have zero integral.Let ‖MMM‖OP = sup‖xxx‖=1 ‖MMMxxx‖ denote the operator norm of a matrix MMM ∈ Rd×d.

Lemma 2. If k : Rd×Rd → R is twice continuously differentiable in each argument,log p : Rd → R is continuously differentiable, ‖∇xxx∇>yyy k(xxx,yyy)‖OP ≤ C(yyy)‖xxx‖−δp(xxx)−1

and ‖∇xxx∆yyyk(xxx,yyy)‖ ≤ C(yyy)‖xxx‖−δp(xxx)−1 are satisfied for some C : Rd → (0,∞), andδ > d− 1, then ∫

k0(xxx,yyy)p(xxx) dxxx = 0 (9)

for every yyy ∈ Rd, where k0 is defined in (7).

The proof is provided in Appendix D. The infinite-dimensional space H used in thiswork is exactly the reproducing kernel Hilbert space G(k0). The basic mathematicalproperties of k0 and the Hilbert space it reproduces are contained in Appendix Cand these can be used to inform the selection of an appropriate kernel.

For the finite-dimensional component, let Φ be a linear subspace of twice-continuously differentiable functions with dimension q − 1, q ∈ N, and a basis{φi}q−1i=1 . Define then the space obtained by applying the differential operator (6)to Φ as LΦ = span{Lφ1, . . . ,Lφq−1}. If the pre-conditions of Lemma 1 are satis-fied for each basis function g = φi then linearity of the Stein operator implies that∫

(Lφ)dp = 0 for every φ ∈ Φ. Typically we will select Φ = Pr as the polynomialspace Pr = span{xxxααα : ααα ∈ Nd

0, 0 < |ααα| ≤ r} for some non-negative integer r.Note that constant functions are excluded from Pr since they are in the null spaceof L; when required we let Pr0 = span{1} ⊕ Pr denote the larger space with theconstant functions included. The finite-dimensional space F is then taken to beF = span{1} ⊕ LΦ = span{1,Lφ1, . . .Lφq−1}.

It is now possible to state the proposed method. Following Sard, we approximatethe integrand f with a function fm that interpolates f at the locations xxx(i), isexact on the q-dimensional linear space F , and minimises a particular (semi-)normsubject to the first two constraints. It will occasionally be useful to emphasisethe dependence of fm on f using the notation fm(·) = fm(·; f). The proposedinterpolant takes the form

fm(xxx) = b1 +

q−1∑i=1

bi+1(Lφi)(xxx) +m∑i=1

aik0(xxx,xxx(i)), (10)

where the coefficients aaa = (a1, . . . , am) ∈ Rm and bbb = (b1, . . . , bq) ∈ Rq are selectedsuch that the following two conditions hold:

7

Page 8: Semi-Exact Control Functionals From Sard’s MethodSemi-Exact Control Functionals From Sard’s Method Leah F. South 1, Toni Karvonen2, Chris Nemeth , Mark Girolami3 ;4, Chris.J. Oates5

−3 0 3

0

1

Interpolation

f(x)

f5(x)

f(x(i))

−3 0 3

−3

0

3

k0(·, 0)

−3 0 3

−3

0

3

k0(·, 1)

Figure 1: Left : The interpolant fm from (10) at m = 5 points to the functionf(x) = sin(0.5π(x−1))+exp(−(x−0.5)2) for the Gaussian density p(x) = N (x; 0, 1).The interpolant uses the Gaussian kernel k(x, y) = exp(−(x−y)2) and a polynomialparametric basis with r = 2. Center & right : Two translates k0(·, y), y ∈ {0, 1}, ofthe kernel (7).

1. fm(xxx(i); f) = f(xxx(i)) for i = 1, . . . ,m (interpolation);

2. fm(·; f) = f(·) whenever f ∈ F (semi-exactness).

Since F is q-dimensional, these requirements correspond to the total of m + qconstraints. Under weak conditions, discussed in Section 2.5, the total number ofdegrees of freedom due to selection of aaa and bbb is equal to m + q and the aboveconstraints can be satisfied. Furthermore, the corresponding function fm can beshown to minimise a particular (semi-)norm on a larger space of functions, subjectto the interpolation and exactness constraints (to limit scope, we do not discussthis characterisation further but the semi-norm is defined in (16) and the readercan find full details in Wendland, 2004, Theorem 13.1). Figure 1 illustrates onesuch interpolant. The proposed estimator of the integral is then

ISECF(f) =

∫fm(xxx)p(xxx) dxxx, (11)

a special case of (3) (the interpolation condition causes the first term in (3) tovanish) that we call a semi-exact control functional. The following is immediatefrom (10) and (11):

Corollary 1. Under the hypotheses of Lemma 1 for each g = φi, i = 1, . . . , q −1, and Lemma 2, it holds that, whenever the estimator ISECF(f) is well-defined,ISECF(f) = b1, where b1 is the constant term in (10).

The earlier work of Assaraf and Caffarel (1999) and Mira et al. (2013) correspondsto aaa = 000, while setting bbb = 000 in (10) and ignoring the semi-exactness requirementrecovers the unique minimum-norm interpolant in the Hilbert space H = G(k0)where k0 is reproducing, in the sense of (5). The work of Oates et al. (2017)corresponds to bi = 0 for i = 2, . . . , q. It is therefore clear that the proposedapproach is a strict generalization of existing work and can be seen as a compromisebetween semi-exactness and minimum-norm interpolation.

8

Page 9: Semi-Exact Control Functionals From Sard’s MethodSemi-Exact Control Functionals From Sard’s Method Leah F. South 1, Toni Karvonen2, Chris Nemeth , Mark Girolami3 ;4, Chris.J. Oates5

2.4 Polynomial Exactness in the Bernstein-von-Mises Limit

A central motivation for our approach is the prototypical case where p is the densityof a posterior distribution Pxxx|y1,...,yn for a latent variable xxx given independent andidentically distributed data y1, . . . , yn ∼ Py1,...,yn|xxx. Under regularity conditionsdiscussed in Section 10.2 of van der Vaart (1998), the Bernstein-von-Mises theoremstates that ∥∥∥Pxxx|y1,...,yn −N (xxxn, n−1I(xxxn)−1

)∥∥∥TV→ 0

where xxxn is a maximum likelihood estimate for xxx, I(xxx) is the Fisher informationmatrix evaluated at xxx, ‖ · ‖TV is the total variation norm and convergence is inprobability as n → ∞ with respect to the law Py1,...,yn|xxx of the dataset. In thislimit, polynomial exactness of the proposed method can be established. Indeed, fora Gaussian density p with mean xxxn ∈ Rd and precision nI(xxxn), if φ(xxx) = xxxααα for amulti-index ααα ∈ Nd

0, then

(Lφ)(xxx) =d∑i=1

αi

[(αi − 1)xαi−2

i − n

2Pi(xxx)xαi−1

i

]∏j 6=i

xαj

j ,

where Pi(xxx) = 2eee>i I(xxxn)(xxx − xxxn) and eeei is the ith coordinate vector in Rd. Thisallows us to obtain the following result, whose proof is provided in Appendix E:

Lemma 3. Consider the Bernstein-von-Mises limit and suppose that the Fisherinformation matrix I(xxxn) is non-singular. Then, for the choice Φ = Pr, r ∈ N, theestimator ISECF is exact on F = Pr0 .

Thus the proposed estimator is polynomially exact up to order r in the Bernstein-von-Mises limit. At finite n, when the limit has not been reached, the above argu-ment can only be expected to approximately hold.

2.5 Computation for the Proposed Method

The purpose of this section is to discuss when the proposed estimator is well-definedand how it can be computed. Define the m× q matrix

PPP =

1 Lφ1(xxx(1)) · · · Lφq−1(xxx(1))

......

. . ....

1 Lφ1(xxx(m)) · · · Lφq−1(xxx(m))

,which is sometimes called a Vandermonde (or alternant) matrix corresponding tothe linear space F . Let KKK0 be the m×m matrix with entries [KKK0]i,j = k0(xxx

(i),xxx(j))and let fff be the m-dimensional column vector with entries [fff ]i = f(xxx(i)).

Lemma 4. Let the m ≥ q points xxx(i) be distinct and F-unisolvent, meaning that thematrix PPP has full rank. Let k0 be a positive-definite kernel for which (9) is satisfied.Then ISECF(f) is well-defined and the coefficients aaa and bbb are given by the solutionof the linear system [

KKK0 PPPPPP> 000

][aaabbb

]=

[fff000

]. (12)

9

Page 10: Semi-Exact Control Functionals From Sard’s MethodSemi-Exact Control Functionals From Sard’s Method Leah F. South 1, Toni Karvonen2, Chris Nemeth , Mark Girolami3 ;4, Chris.J. Oates5

In particular,ISECF(f) = eee>1 (PPP>KKK−10 PPP )−1PPP>KKK−10 fff. (13)

The proof is provided in Appendix F. Notice that (13) is a linear combination ofthe values in fff and therefore the proposed estimator is recognized as a cubaturemethod of the form (4) with weights

www = KKK−10 PPP (PPP>KKK−10 PPP )−1eee1. (14)

The requirement in Lemma 4 for the xxx(i) to be distinct precludes, for example,the direct use of Metropolis–Hastings output. However, as emphasized in Oateset al. (2017) for control functionals and studied further in Liu and Lee (2017);Hodgkinson et al. (2020), the consistency of ISECF does not require that the Markovchain is p-invariant. It is therefore trivial to, for example, filter out duplicate statesfrom Metropolis–Hastings output.

The solution of linear systems of equations defined by an m × m matrix KKK0

and a q × q matrix PPP>KKK−10 PPP entails a computational cost of O(m3 + q3). In somesituations this cost may yet be smaller than the cost associated with evaluation off and p, but in general this computational requirement limits the applicability ofthe method just described. In Appendix G we therefore propose a computationallyefficient approximation, IASECF, to the full method, based on a combination of theNystrom approximation (Williams and Seeger, 2001) and the well-known conjugategradient method, inspired by the recent work of Rudi et al. (2017). All proposedmethods are implemented in the R package ZVCV (South, 2020).

3 Empirical Assessment

A detailed comparison of existing and proposed control variate and control func-tional techniques was performed. Three examples were considered; Section 3.1considers a Gaussian target, representing the Bernstein-von-Mises limit; Section3.2 considers a setting where non-parametric control functional methods performwell; Section 3.3 considers a setting where parametric control variate methods areknown to be successful. In each case we determine whether or not the proposedsemi-exact control functional method is competitive with the state-of-the-art.

Specifically, we compared the following estimators, which are all instances ofICV in (3) for a particular choice of fm, which may or may not be an interpolant:

• Standard Monte Carlo integration, (1), based on Markov chain output.

• The control functional estimator recommended in Oates et al. (2017), ICF(f) =(111>KKK−10 111)−1111>KKK−10 fff .

• The “zero variance” polynomial control variate method of Assaraf and Caffarel(1999) and Mira et al. (2013), IZV(f) = eee>1 (PPP>PPP )−1PPP>fff .

• The “auto zero variance” approach of South et al. (2019), which uses 5-foldcross validation to automatically select (a) between the ordinary least squaressolution IZV and an `1-penalised alternative (where the penalisation strength

10

Page 11: Semi-Exact Control Functionals From Sard’s MethodSemi-Exact Control Functionals From Sard’s Method Leah F. South 1, Toni Karvonen2, Chris Nemeth , Mark Girolami3 ;4, Chris.J. Oates5

is itself selected using 10-fold cross-validation within the test dataset), and(b) the polynomial order.

• The proposed semi-exact control functional estimator, (13).

• An approximation, IASECF, of (13) based on the Nystrom approximation andthe conjugate gradient method, described in Appendix G.

Open-source software for implementing all of the above methods is available inthe R package ZVCV (South, 2020). The same sets of m samples were used for allestimators, in both the construction of fm and the evaluation of ICV. For methodswhere there is a fixed polynomial basis we considered only orders r = 1 and r = 2,following the recommendation of Mira et al. (2013). For kernel-based methods,duplicate values of xxxi were removed (as discussed in Section 2.5) and Frobeniusregularization was employed whenever the condition number of the kernel matrixKKK0 was close to machine precision (Higham, 1988). Several choices of kernel wereconsidered, but for brevity in the main text we focus on the rational quadratickernel k(xxx,yyy;λ) = (1 + λ−2‖xxx − yyy‖2)−1. This kernel was found to provide thebest performance across a range of experiments; a comparison to the Matern andGaussian kernels is provided in Appendix H. The parameter λ was selected using 5-fold cross-validation, based again on performance across a spectrum of experiments;a comparison to the median heuristic (Garreau et al., 2017) is presented in AppendixH.

To ensure that our assessment is practically relevant, the estimators were com-pared on the basis of both statistical and computational efficiency relative to thestandard Monte Carlo estimator. Statistical efficiency E(ICV) and computationalefficiency C(ICV) of an estimator ICV of the integral I are defined as

E(ICV) =E[(IMC − I)2

]E[(ICV − I)2

] , C(ICV) = E(ICV)TMC

TCV

where TCV denotes the combined wall time for sampling the xxx(i) and computing theestimator ICV. For the results reported below, E and C were approximated usingaverages E and C over 100 realizations of the Markov chain output.

3.1 Gaussian Illustration

Here we consider a Gaussian integral that serves as an analytically tractable carica-ture of a posterior near to the Bernstein-von-Mises limit. This enables us to assessthe effect of the sample size m and dimension d on each estimator, in a setting thatis not confounded by the idiosyncrasies of any particular MCMC method. Specif-ically, we set p(xxx) = (2π)−d/2 exp(−‖xxx‖2/2) where xxx ∈ Rd. For the parametriccomponent we set Φ = Pr, so that (from Lemma 3) ISECF is exact on polynomialsof order at most r; this holds also for IZV. For the integrand f : Rd → R, d ≥ 3, wetook

f(xxx) = 1 + x2 + 0.1x1x2x3 + sin(x1) exp[−(x2x3)2] (15)

in order that the integral is analytically tractable (I(f) = 1) and that no methodwill be exact.

11

Page 12: Semi-Exact Control Functionals From Sard’s MethodSemi-Exact Control Functionals From Sard’s Method Leah F. South 1, Toni Karvonen2, Chris Nemeth , Mark Girolami3 ;4, Chris.J. Oates5

1

10

100

10 100 1000m

ε

(a)

1

10

100

3 10 30 100d

ε

(b)

Polynomial Order1 or NA 2

MethodMonte CarloZero−Variance

Auto Zero−VarianceControl Functionals

Semi−Exact Control FunctionalsApproximate Semi−Exact Control Functionals

Figure 2: Gaussian example (a) estimated statistical efficiency with d = 4 and (b)estimated statistical efficiency with m = 1000 for integrand (15).

Figure 2 displays the statistical efficiency of each estimator for 10 ≤ m ≤ 1000and 3 ≤ d ≤ 100. Computational efficiency is not shown since exact sampling fromp in this example is trivial. The proposed semi-exact control functional methodperforms consistently well compared to its competitors for this non-polynomial in-tegrand. Unsurprisingly, the best improvements are for high m and small d, wherethe proposed method results in a statistical efficiency over 100 times better thanthe baseline estimator and up to 5 times better than the next best method.

3.2 Capture-Recapture Example

The two remaining examples, here and in Section 3.3, are applications of Bayesianstatistics described in South et al. (2019). In each case the aim is to estimateexpectations with respect to a posterior distribution Pxxx|yyy of the parameters xxx ofa statistical model based on yyy, an observed dataset. Samples xxx(i) were obtainedusing the Metropolis-adjusted Langevin algorithm (Roberts et al., 1996), which isa Metropolis-Hastings algorithm with proposal N (xxx(i−1) + h2 1

2ΣΣΣ∇xxx logPxxx|yyy(xxx

(i−1) |yyy), h2ΣΣΣ). Step sizes of h = 0.72 for the capture-recapture example and h = 0.3 forthe sonar example (see Section 3.3) were selected and an empirical approximationof the posterior covariance matrix was used as the pre-conditioner ΣΣΣ ∈ Rd×d. Sincethe proposed method does not rely on the Markov chain being Pxxx|yyy-invariant wealso repeated these experiments using the unadjusted Langevin algorithm (Parisi,1981; Ermak, 1975), with similar results reported in Appendix I.

In this first example, a Cormack–Jolly–Seber capture-recapture model (Lebretonet al., 1992) is used to model data on the capture and recapture of the bird speciesCinclus Cinclus (Marzolin, 1988). The integrands of interest are the marginalposterior means fi(xxx) = xi for i = 1, . . . , 11, where xxx = (φ1, . . . , φ5, p2, . . . , p6, φ6p7),φj is the probability of survival from year j to j + 1 and pj is the probability of

12

Page 13: Semi-Exact Control Functionals From Sard’s MethodSemi-Exact Control Functionals From Sard’s Method Leah F. South 1, Toni Karvonen2, Chris Nemeth , Mark Girolami3 ;4, Chris.J. Oates5

1

10

100

1000

10000

100 300 1000 3000m

ε

(a)

1

10

100

1000

100 300 1000 3000m

c

(b)

Polynomial Order1 or NA 2

MethodMonte CarloZero−Variance

Auto Zero−VarianceControl Functionals

Semi−Exact Control FunctionalsApproximate Semi−Exact Control Functionals

Figure 3: Capture-recapture example (a) estimated statistical efficiency and (b)estimated computational efficiency. Efficiency here is reported as an average overthe 11 expectations of interest.

being captured in year j. The likelihood is

`(yyy|xxx) ∝6∏i=1

χdii

7∏k=i+1

φipk k−1∏m=i+1

φm(1− pm)

yik ,where di = Di −

∑7k=i+1 yik, χi = 1 −∑7

k=i+1 φipk∏k−1

m=i+1 φm(1 − pm) and thedata yyy consists of Di, the number of birds released in year i, and yik, the numberof animals caught in year k out of the number released in year i, for i = 1, . . . , 6and k = 2, . . . , 7. Following South et al. (2019), parameters are transformed tothe real line using xi = log(xj/(1 − xj)) and the adjusted prior density for xj isexp(xj)/(1 + exp(xj))

2, for j = 1, . . . , 11.South et al. (2019) found that non-parametric methods outperform standard

parametric methods for this 11-dimensional example. The estimator ISECF combineselements of both approaches, so there is interest in determining how the methodperforms. It is clear from Figure 3 that all variance reduction approaches arehelpful in improving upon the vanilla Monte Carlo estimator in this example. Thebest improvement in terms of statistical and computational efficiency is offered byISECF, which also has similar performance to ICF.

3.3 Sonar Example

Our final application is a 61-dimensional logistic regression example using data fromGorman and Sejnowski (1988) and Dheeru and Karra Taniskidou (2017). To usestandard regression notation, the parameters are denoted βββ ∈ R61, the matrix ofcovariates in the logistic regression model is denoted XXX ∈ R208×61 where the firstcolumn is all 1’s to fit an intercept and the response is denoted yyy ∈ R208. In thisapplication, XXX contains information related to energy frequencies reflected fromeither a metal cylinder (y = 1) or a rock (y = 0). The log likelihood for this model

13

Page 14: Semi-Exact Control Functionals From Sard’s MethodSemi-Exact Control Functionals From Sard’s Method Leah F. South 1, Toni Karvonen2, Chris Nemeth , Mark Girolami3 ;4, Chris.J. Oates5

0.3

1.0

3.0

100 300 1000 3000m

ε

(a)

0.01

0.10

1.00

100 300 1000 3000m

c

(b)

Method Monte CarloZero−Variance

Auto Zero−VarianceControl Functionals

Semi−Exact Control FunctionalsApproximate Semi−Exact Control Functionals

Figure 4: Sonar example (a) estimated statistical efficiency and (b) estimated com-putational efficiency.

is

log `(yyy,XXX|βββ) =208∑i=1

(yiXXX i,·βββ − log(1 + exp(XXX i,·βββ))

).

We use a N (0, 52) prior for the predictors (after standardising to have standarddeviation of 0.5) and N (0, 202) prior for the intercept, following South et al. (2019);Chopin and Ridgway (2017), but we focus on estimating the more challenging in-tegrand f(βββ) = (1 + exp(−XXXβββ))−1, which can be interpreted as the probabilitythat observed covariates XXX emanate from a metal cylinder. The gold standard ofI ≈ 0.4971 was obtained from a 10 million iteration Metropolis-Hastings (Hastings,1970) run with multivariate normal random walk proposal.

Figure 4 illustrates the statistical and computational efficiency of estimatorsfor various m in this example. It is interesting to note that ISECF and IASECF offersimilar statistical efficiency to IZV, especially given the poor relative performance ofICF. Since it is inexpensive to obtain the m samples using the Metropolis-adjustedLangevin algorithm in this example, IZV and IASECF are the only approaches whichoffer improvements in computational efficiency over the baseline estimator for themajority of m values considered, and even in these instances the improvements aremarginal.

4 Theoretical Properties and Convergence Assess-

ment

In this section we provide a convergence result and discuss diagnostics that can beused to monitor the performance of the proposed method. To this end, we introduce

14

Page 15: Semi-Exact Control Functionals From Sard’s MethodSemi-Exact Control Functionals From Sard’s Method Leah F. South 1, Toni Karvonen2, Chris Nemeth , Mark Girolami3 ;4, Chris.J. Oates5

the semi-norm

|f |k0,F = inff=h+g

h∈F , g∈G(k0)

‖g‖G(k0), (16)

which is well-defined when the infimum is taken over a non-empty set, otherwisewe define |f |k0,F =∞.

4.1 Finite Sample Error and a Practical Diagnostic

The following proposition provides a finite sample error bound:

Proposition 1. Let k0 be a positive-definite kernel for which (9) is satisfied. Thenthe integration error satisfies the bound

|I(f)− ISECF(f)| ≤ |f |k0,F (www>KKK0www)1/2 (17)

where the weights www, defined in (14), satisfy

www = arg minvvv∈Rm

(vvv>KKK0vvv)1/2 s.t.m∑i=1

vih(xxx(i)) =

∫h(xxx)p(xxx) dxxx for every h ∈ F .

The proof is provided in Appendix J. The first quantity |f |k0,F in (17) canbe approximated by |fm|k0,F when fm is a reasonable approximation for f andthis can in turn can be bounded as |fm|k0,F ≤ (aaa>KKK0aaa)1/2. The second quantity(www>KKK0www)1/2 in (17) is computable and is recognized as a kernel Stein discrepancybetween the empirical measure

∑mi=1wiδ(xxx

(i)) and the distribution whose densityis p, based on the Stein operator L (Chwialkowski et al., 2016; Liu et al., 2016).Note that our choice of Stein operator differs to that in Chwialkowski et al. (2016)and Liu et al. (2016). There has been substantial recent research into the useof kernel Stein discrepancies for assessing algorithm performance in the Bayesiancomputational context (Gorham and Mackey, 2017; Chen et al., 2018, 2019; Singhalet al., 2019; Hodgkinson et al., 2020) and one can also exploit this discrepancy as adiagnostic for the performance of the semi-exact control functional. The diagnosticthat we propose to monitor is the product (www>KKK0www)1/2(aaa>KKK0aaa)1/2. This approachto error estimation was also suggested (outside the Bayesian context) in Section 5.1of Fasshauer (2011).

Empirical results in Figure 5 suggest that this diagnostic provides a conservativeapproximation of the actual error. Further work is required to establish whetherthis diagnostic detects convergence and non-convergence in general.

4.2 Consistency of the Estimator

In this section we establish that, even in the biased sampling setting, the proposedestimator is consistent. The proof exploits a recent theoretical contribution inHodgkinson et al. (2020). Let Π be the matrix that projects orthogonally onto thecolumns of [Ψ]i,j := Lφj(x(i)) in the inner product 〈·, ·〉K−1

0, defined as 〈u,v〉K−1

0=

u>K−10 v.

15

Page 16: Semi-Exact Control Functionals From Sard’s MethodSemi-Exact Control Functionals From Sard’s Method Leah F. South 1, Toni Karvonen2, Chris Nemeth , Mark Girolami3 ;4, Chris.J. Oates5

0.03

0.10

0.30

1.00

100 300 1000m

●● ●●mean absolute error mean upper bound

Figure 5: The mean absolute error and mean of the approximate upper bound(www>KKK0www)1/2(aaa>KKK0aaa)1/2, for different values ofm in the sonar example of Section 3.3.Both are based on the semi-exact control functional method with Φ = P1.

Theorem 1. Let q be a probability density with p/q > 0 on Rd. Let V : Rd → [1,∞).Consider a q-invariant, V -uniformly ergodic transition Markov chain (x(i))mi=1, suchthat

A1. supxxx∈Rd V (xxx)−rk0(xxx,xxx)2 <∞ for some 0 < r < 1;

A2. the points (xxx(i))mi=1 are almost surely distinct and F-unisolvent.

A3. lim supm→∞ ‖Π1‖K−10/‖1‖K−1

0< 1 almost surely.

Assume, in addition, that the hypotheses of Lemma 2 are satisfied and that

A4. |f |k0,F <∞;

Then ISECF(f)→ I(f) in probability as m→∞.

The proof is provided in Appendix K. Assumption A1 serves to ensure thatq is not too far removed from p, with respect to generating suitable states xxx(i) forapproximating integrals with respect to p, and are discussed in detail in Hodgkinsonet al. (2020). Assumption A2 is used to ensure that the finite sample size bound(17) is well-defined. Assumption A3 ensures the points in the sequence (x(i))mi=1

distinguish (asymptotically) the constant function from the functions {φi}q−1i=1 , whichis a weak technical requirement. Assumption A4 ensures a solution to the Steinequation, sufficient conditions for which are discussed in Mackey et al. (2016); Siet al. (2020).

5 Discussion

The problem of approximating posterior expectations is well-studied and powerfulcontrol variate and control functional methods exist to improve the accuracy ofMonte Carlo integration. However, it is a priori unclear which of these methods

16

Page 17: Semi-Exact Control Functionals From Sard’s MethodSemi-Exact Control Functionals From Sard’s Method Leah F. South 1, Toni Karvonen2, Chris Nemeth , Mark Girolami3 ;4, Chris.J. Oates5

is most suitable for any given task. This paper demonstrates how both parametricand non-parametric approaches can be combined into a single estimator that re-mains competitive with the state-of-the-art in all regimes we considered. Moreover,we highlighted polynomial exactness in the Bernstein-von-Mises limit as a usefulproperty that we believe can confer robustness of the estimator in a broad range ofapplied contexts. The multitude of applications for these methods, and their avail-ability in the ZVCV package (South, 2020), suggests they are well-placed to have apractical impact.

Several possible extensions of the proposed method can be considered. Forexample, the parametric component Φ could be adapted to the particular f andp using a dimensionality reduction method. Likewise, extending cross-validationto encompass the choice of kernel and even the choice of control variate or controlfunctional estimator may be useful. The potential for alternatives to the Nystromapproximation to further improve scalability of the method can also be explored. Interms of the points xxx(i) on which the estimator is defined, these could be optimallyselected to minimize the error bound in (17), for example following the approachesof Chen et al. (2018, 2019). Finally, we highlight a possible extension to the casewhere only stochastic gradient information is available, following Friel et al. (2016)in the parametric context.

Acknowledgements CJO is grateful to Yvik Swan for discussion of Stein’s method.TK was supported by the Aalto ELEC Doctoral School and the Vilho, Yrjo andKalle Vaisala Foundation. MG was supported by a Royal Academy of Engi-neering Research Chair and by the Engineering and Physical Sciences ResearchCouncil grants EP/T000414/1, EP/R018413/2, EP/P020720/2, EP/R034710/1,EP/R004889/1. TK, MG and CJO were supported by the Lloyd’s Register Founda-tion programme on data-centric engineering at the Alan Turing Institute, UK. CNand LFS were supported by the Engineering and Physical Sciences Research Councilgrants EP/S00159X/1 and EP/V022636/1. The authors are grateful for feedbackfrom three anonymous Reviewers, an Associate Editor and an Editor, which led toan improved manuscript.

References

Adams, R. A. and Fournier, J. J. (2003). Sobolev Spaces. Elsevier.

Alaoui, A. and Mahoney, M. W. (2015). Fast randomized kernel ridge regressionwith statistical guarantees. In Proceedings of the 29th Conference on NeuralInformation Processing Systems, volume 28, pages 775–783.

Assaraf, R. and Caffarel, M. (1999). Zero-variance principle for Monte Carlo algo-rithms. Physical Review Letters, 83(23):4682–4685.

Barbour, A. D. (1988). Stein’s method and Poisson process convergence. Journalof Applied Probability, 25(A):175–184.

17

Page 18: Semi-Exact Control Functionals From Sard’s MethodSemi-Exact Control Functionals From Sard’s Method Leah F. South 1, Toni Karvonen2, Chris Nemeth , Mark Girolami3 ;4, Chris.J. Oates5

Barp, A., Oates, C., Porcu, E., Girolami, M., et al. (2018). A Riemannian-Steinkernel method. arXiv preprint arXiv:1810.04946.

Belkin, M., Hsu, D., Ma, S., and Mandal, S. (2019). Reconciling modern machine-learning practice and the classical bias–variance trade-off. Proceedings of theNational Academy of Sciences, 116(32):15849–15854.

Belomestny, D., Iosipoi, L., Moulines, E., Naumov, A., and Samsonov, S. (2019a).Variance reduction for Markov chains with application to MCMC. arXiv preprintarXiv:1910.03643.

Belomestny, D., Iosipoi, L., and Zhivotovskiy, N. (2017). Variance reduction viaempirical variance minimization: convergence and complexity. arXiv preprintarXiv:1712.04667.

Belomestny, D., Moulines, E., Shagadatov, N., and Urusov, M. (2019b). Variancereduction for MCMC methods via martingale representations. arXiv preprintarXiv:1903.07373.

Berlinet, A. and Thomas-Agnan, C. (2011). Reproducing Kernel Hilbert Spaces inProbability and Statistics. Springer Science & Business Media.

Briol, F.-X., Oates, C. J., Girolami, M., Osborne, M. A., and Sejdinovic, D. (2019).Probabilistic integration: A role in statistical computation? (with discussion andrejoinder). Statistical Science, 34(1):1–22.

Brosse, N., Durmus, A., Meyn, S., Eric Moulines, and Radhakrishnan, A. (2019).Diffusion approximations and control variates for MCMC. arXiv preprintarXiv:1808.01665.

Chen, W. Y., Barp, A., Briol, F.-X., Gorham, J., Girolami, M., Mackey, L., Oates,C., et al. (2019). Stein point Markov chain Monte Carlo. In Proceedings of the36th International Conference on Machine Learning.

Chen, W. Y., Mackey, L., Gorham, J., Briol, F.-X., and Oates, C. J. (2018). Steinpoints. In Proceedings of the 35th International Conference on Machine Learning.

Chopin, N. and Ridgway, J. (2017). Leave Pima Indians alone: binary regressionas a benchmark for Bayesian computation. Statistical Science, 32(1):64–87.

Chwialkowski, K., Strathmann, H., and Gretton, A. (2016). A kernel test of good-ness of fit. In Proceedings of the 33rd International Conference on Machine Learn-ing. JMLR: Workshop and Conference Proceedings.

Clenshaw, C. W. and Curtis, A. R. (1960). A method for numerical integration onan automatic computer. Numerische Mathematik, 2(1):197–205.

Dheeru, D. and Karra Taniskidou, E. (2017). UCI machine learning repository.

Dick, J., Kuo, F. Y., and Sloan, I. H. (2013). High-dimensional integration: Thequasi-Monte Carlo way. Acta Numerica, 22:133–288.

18

Page 19: Semi-Exact Control Functionals From Sard’s MethodSemi-Exact Control Functionals From Sard’s Method Leah F. South 1, Toni Karvonen2, Chris Nemeth , Mark Girolami3 ;4, Chris.J. Oates5

Ermak, D. L. (1975). A computer simulation of charged particles in solution. I. Tech-nique and equilibrium properties. The Journal of Chemical Physics, 62(10):4189–4196.

Fasshauer, G. E. (2011). Positive-definite kernels: Past, present and future.Dolomites Research Notes on Approximation, 4:21–63.

Fasshauer, G. E. and Ye, Q. (2011). Reproducing kernels of generalized Sobolevspaces via a Green function approach with distributional operators. NumerischeMathematik, 119(3):585–611.

Friel, N., Mira, A., Oates, C. J., et al. (2016). Exploiting multi-core architecturesfor reduced-variance estimation with intractable likelihoods. Bayesian Analysis,11(1):215–245.

Garreau, D., Jitkrittum, W., and Kanagawa, M. (2017). Large sample analysis ofthe median heuristic. arXiv preprint arXiv:1707.07269.

Gautschi, W. (2004). Orthogonal Polynomials: Computation and Approximation.Numerical Mathematics and Scientific Computation. Oxford University Press.

Gorham, J. and Mackey, L. (2015). Measuring sample quality with Stein’s method.In Proceedings of the 28th Conference on Neural Information Processing Systems,volume 28, pages 226–234.

Gorham, J. and Mackey, L. (2017). Measuring sample quality with kernels. InProceedings of the 34th International Conference on Machine Learning, pages1292–1301.

Gorman, R. P. and Sejnowski, T. J. (1988). Analysis of hidden units in a layerednetwork trained to classify sonar targets. Neural Networks, 1(1):75–89.

Hammersley, J. M. and Handscomb, D. C. (1964). Monte Carlo Methods. Chapman& Hall.

Hastings, W. K. (1970). Monte Carlo sampling methods using Markov chains andtheir applications. Biometrika, 57(1):97–109.

Higham, N. J. (1988). Computing a nearest symmetric positive semidefinite matrix.Linear Algebra and Its Applications, 103:103–118.

Hildebrand, F. B. (1987). Introduction to Numerical Analysis. Courier Corporation.

Hodgkinson, L., Salomone, R., and Roosta, F. (2020). The reproducing Stein kernelapproach for post-hoc corrected sampling. arXiv preprint arXiv:2001.09266.

Karvonen, T., Oates, C. J., and Sarkka, S. (2018). A Bayes–Sard cubature method.In Proceedings of the 32nd Conference on Neural Information Processing Systems,volume 31, pages 5882–5893.

19

Page 20: Semi-Exact Control Functionals From Sard’s MethodSemi-Exact Control Functionals From Sard’s Method Leah F. South 1, Toni Karvonen2, Chris Nemeth , Mark Girolami3 ;4, Chris.J. Oates5

Larkin, F. M. (1970). Optimal approximation in Hilbert spaces with reproducingkernel functions. Mathematics of Computation, 24(112):911–921.

Larkin, F. M. (1974). Probabilistic error estimates in spline interpolation andquadrature. In Information Processing 74: Proceedings of IFIP Congress 74,pages 605–609. North-Holland.

Lebreton, J. D., Burnham, K. P., Clobert, J., and Anderson, D. R. (1992). Mod-eling survival and testing biological hypotheses using marked animals: a unifiedapproach with case studies. Ecological Monographs, 61(1):67–118.

Liu, Q. and Lee, J. (2017). Black-box importance sampling. In Proceedings ofthe 20th International Conference on Artificial Intelligence and Statistics, pages952–961.

Liu, Q., Lee, J., and Jordan, M. (2016). A kernelized Stein discrepancy for goodness-of-fit tests. In Proceedings of the 33rd International Conference on MachineLearning, pages 276–284.

Mackey, L., Gorham, J., et al. (2016). Multivariate Stein factors for a class ofstrongly log-concave distributions. Electronic Communications in Probability,21(56).

Marzolin, G. (1988). Polygynie du cincle plongeur (cinclus cinclus) dans le cotes deLoraine. Oiseau et la Revue Francaise d’Ornithologie, 58(4):277–286.

Meyn, S. P. and Tweedie, R. L. (1993). Markov Chains and Stochastic Stability.Springer-Verlag.

Mijatovic, A., Vogrinc, J., et al. (2018). On the Poisson equation for Metropolis–Hastings chains. Bernoulli, 24(3):2401–2428.

Mira, A., Solgi, R., and Imparato, D. (2013). Zero variance Markov chain MonteCarlo for Bayesian estimators. Statistics and Computing, 23(5):653–662.

Oates, C. J., Cockayne, J., Briol, F.-X., and Girolami, M. (2019). Convergence ratesfor a class of estimators based on Stein’s method. Bernoulli, 25(2):1141–1159.

Oates, C. J., Girolami, M., and Chopin, N. (2017). Control functionals for MonteCarlo integration. Journal of the Royal Statistical Society: Series B (StatisticalMethodology), 79(3):695–718.

Oates, C. J., Papamarkou, T., and Girolami, M. (2016). The controlled thermody-namic integral for Bayesian model evidence evaluation. Journal of the AmericanStatistical Association, 111(514):634–645.

Oettershagen, J. (2017). Construction of Optimal Cubature Algorithms with Appli-cations to Econometrics and Uncertainty Quantification. PhD thesis, Universityof Bonn.

20

Page 21: Semi-Exact Control Functionals From Sard’s MethodSemi-Exact Control Functionals From Sard’s Method Leah F. South 1, Toni Karvonen2, Chris Nemeth , Mark Girolami3 ;4, Chris.J. Oates5

O’Hagan, A. (1991). Bayes–Hermite quadrature. Journal of Statistical Planningand Inference, 29(3):245–260.

Papamarkou, T., Mira, A., Girolami, M., et al. (2014). Zero variance differentialgeometric Markov chain Monte Carlo algorithms. Bayesian Analysis, 9(1):97–128.

Parisi, G. (1981). Correlation functions and computer simulations. Nuclear PhysicsB, 180(3):378–384.

Ripley, B. (1987). Stochastic Simulation. John Wiley & Sons.

Robert, C. and Casella, G. (2013). Monte Carlo Statistical Methods. SpringerScience & Business Media.

Roberts, G. O., Tweedie, R. L., et al. (1996). Exponential convergence of Langevindistributions and their discrete approximations. Bernoulli, 2(4):341–363.

Rudi, A., Camoriano, R., and Rosasco, L. (2015). Less is more: Nystrom computa-tional regularization. In Proceedings of the 29th Conference on Neural Informa-tion Processing Systems, pages 1657–1665.

Rudi, A., Carratino, L., and Rosasco, L. (2017). FALKON: An optimal large scalekernel method. In Proceedings of the 31st Conference on Neural InformationProcessing Systems, pages 3888–3898.

Sard, A. (1949). Best approximate integration formulas; best approximation for-mulas. American Journal of Mathematics, 71(1):80–91.

Si, S., Oates, C. J., Duncan, A. B., Carin, L., and Briol, F.-X. (2020). Scalablecontrol variates for monte carlo methods via stochastic optimization. arXiv.

Singhal, R., Lahlou, S., and Ranganath, R. (2019). Kernelized complete conditionalStein discrepancy. arXiv preprint arXiv:1904.04478.

Smola, A. J. and Scholkopf, B. (2000). Sparse greedy matrix approximation formachine learning. In Proceedings of the 17th International Conference on MachineLearning.

South, L. F. (2020). ZVCV: Zero-Variance Control Variates. R package version2.1.0.

South, L. F., Oates, C. J., Mira, A., and Drovandi, C. (2019). Regularised zero-variance control variates for high-dimensional variance reduction. arXiv preprintarXiv:1811.05073.

Stein, C. (1972). A bound for the error in the normal approximation to the distribu-tion of a sum of dependent random variables. In Proceedings of the 6th BerkeleySymposium on Mathematical Statistics and Probability, volume 2, pages 583–602.University of California Press.

21

Page 22: Semi-Exact Control Functionals From Sard’s MethodSemi-Exact Control Functionals From Sard’s Method Leah F. South 1, Toni Karvonen2, Chris Nemeth , Mark Girolami3 ;4, Chris.J. Oates5

Steinwart, I. and Christmann, A. (2008). Support Vector Machines. InformationScience and Statistics. Springer.

van der Vaart, A. (1998). Asymptotic Statistics. Cambridge series on statistical andprobabilistic mathematics. Cambridge University Press.

Wahba, G. (1990). Spline Models for Observational Data. Number 59 in CBMS-NSF Regional Conference Series in Applied Mathematics. Society for Industrialand Applied Mathematics.

Wan, R., Zhong, M., Xiong, H., and Zhu, Z. (2019). Neural control variates forvariance reduction. In European Conference on Machine Learning and Principlesand Practice of Knowledge Discovery in Databases.

Wendland, H. (2004). Scattered Data Approximation, volume 17. Cambridge uni-versity press.

Williams, C. K. I. and Seeger, M. (2001). Using the Nystrom method to speed upkernel machines. In Proceedings of the 14th Conference on Neural InformationProcessing Systems, pages 682–688.

22

Page 23: Semi-Exact Control Functionals From Sard’s MethodSemi-Exact Control Functionals From Sard’s Method Leah F. South 1, Toni Karvonen2, Chris Nemeth , Mark Girolami3 ;4, Chris.J. Oates5

Supplementary Material

A Proof of Lemma 1

Lemmas 1 and 2 are stylised versions of similar results that can be found in earlierwork, such as Chwialkowski et al. (2016); Liu et al. (2016); Oates et al. (2017).Our presentation differs in that we provide a convenient explicit sufficient condi-tion, on the tails of ‖∇g‖ for Lemma 1, and on the tails of ‖∇x∇>y k(xxx,yyy)‖ and‖∇xxx∆yyyk(xxx,yyy)‖ for Lemma 2, for their conclusions to hold.

Proof. The stated assumptions on the differentiability of p and g imply that thevector field p(xxx)∇xxxg(xxx) is continuously differentiable on Rd. The divergence theoremcan therefore be applied, over any compact set D ⊂ Rd with piecewise smoothboundary ∂D, to reveal that∫

D

(Lg)(xxx)p(xxx)dxxx =

∫D

[∆xxxg(xxx) +∇xxxg(xxx) · ∇xxx log p(xxx)]p(xxx)dxxx

=

∫D

[1

p(xxx)∇xxx · (p(xxx)∇xxxg(xxx))

]p(xxx)dxxx

=

∫D

∇xxx · (p(xxx)∇xxxg(xxx))dxxx

=

∮∂D

p(xxx)∇xxxg(xxx) · nnn(xxx)σ(dxxx),

where nnn(xxx) is the unit normal vector at xxx ∈ ∂D and σ(dxxx) is the surface elementat xxx ∈ ∂D. Next, we let D = DR = {xxx : ‖xxx‖ ≤ R} be the ball in Rd withradius R, so that ∂DR is the sphere SR = {xxx : ‖xxx‖ = R}. The assumption‖∇xxxg(xxx)‖ ≤ C‖xxx‖−δp(xxx)−1 in the statement of the lemma allows us to establish thebound∣∣∣∣∣∮SR

p(xxx)∇xxxg(xxx) · nnn(xxx)σ(dxxx)

∣∣∣∣∣ ≤∮SR

∣∣p(xxx)∇xxxg(xxx) · nnn(xxx)∣∣σ(dxxx) ≤

∮SR

p(xxx)∥∥∇xxxg(xxx)

∥∥σ(dxxx)

≤∮SR

C ‖xxx‖−δ σ(dxxx)

= CR−δ∮SR

σ(dxxx)

= CR−δ2πd/2

Γ(d/2)Rd−1,

where in the first and second inequalities we used Jensen’s inequality and Cauchy–Schwarz, respectively, and in the final equality we have made use of the surface areaof SR. The assumption that δ > d− 1 is then sufficient to obtain the result:∣∣∣∣∫ (Lg)(xxx)p(xxx)dxxx

∣∣∣∣ = limR→∞

∣∣∣∣∣∮SR

p(xxx)∇xxxg(xxx) · nnn(xxx)σ(dxxx)

∣∣∣∣∣ ≤ limR→∞

C2πd/2

Γ(d/2)Rd−1−δ = 0.

This completes the argument.

23

Page 24: Semi-Exact Control Functionals From Sard’s MethodSemi-Exact Control Functionals From Sard’s Method Leah F. South 1, Toni Karvonen2, Chris Nemeth , Mark Girolami3 ;4, Chris.J. Oates5

B Differentiating the Kernel

This appendix provides explicit forms of (8) for kernels k that are radial. First wepresent a generic result in Lemma 5 before specialising to the cases of the rationalquadratic (Section B.1), Gaussian (Section B.2) and Matern (Section B.3) kernels.

Lemma 5. Consider a radial kernel k, meaning that k has the form

k(xxx,yyy) = Ψ(z), z = ‖xxx− yyy‖2,where the function Ψ: [0,∞)→ R is four times differentiable and xxx,yyy ∈ Rd. Then(8) simplifies to

k0(xxx,yyy) = 16z2Ψ(4)(z) + 16(2 + d)zΨ(3)(z) + 4(2 + d)dΨ(2)(z)

+ 4[2zΨ(3)(z) + (2 + d)Ψ(2)(z)][uuu(xxx)− uuu(yyy)]>(xxx− yyy)

− 4Ψ(2)(z)uuu(xxx)>(xxx− yyy)(xxx− yyy)>uuu(yyy)− 2Ψ(1)(z)uuu(xxx)>uuu(yyy),

(18)

where uuu(xxx) = ∇xxx log p(xxx).

Proof. The proof is direct and based on have the following applications of the chainrule:

∇xxxk(xxx,yyy) = 2Ψ(1)(z)(xxx− yyy),

∇yyyk(xxx,yyy) = −2Ψ(1)(z)(xxx− yyy),

∆xxxk(xxx,yyy) = 4zΨ(2)(z) + 2dΨ(1)(z),

∆yyyk(xxx,yyy) = 4zΨ(2)(z) + 2dΨ(1)(z),

∂xi∂yjk(xxx,yyy) = −4Ψ(2)(z)(xi − yi)(xj − yj)− 2Ψ(1)(z)δij,

∇xxx∆yyyk(xxx,yyy) = 8zΨ(3)(z)(xxx− yyy) + 4(2 + d)Ψ(2)(z)(xxx− yyy),

∇yyy∆xxxk(xxx,yyy) = −8zΨ(3)(z)(xxx− yyy)− 4(2 + d)Ψ(2)(z)(xxx− yyy),

∆xxx∆yyyk(xxx,yyy) = 16z2Ψ(4)(z) + 16(2 + d)zΨ(3)(z) + 4(2 + d)dΨ(2)(z).

Upon insertion of these formulae into (8), the desired result is obtained.

Thus for kernels that are radial, it is sufficient to compute just the derivativesΨ(j) of the radial part.

B.1 Rational Quadratic Kernel

The rational quadratic kernel,

Ψ(z) = (1 + λ−2z)−1,

has derivatives Ψ(j)(z) = (−1)jλ−2jj!(1 + λ−2z)−j−1 for j ≥ 1.

B.2 Gaussian Kernel

For the Gaussian kernel we have Ψ(z) = exp(−z/λ2). Consequently,

Ψ(j)(z) = (−1)jλ−2j exp(−z/λ2),for j ≥ 1.

24

Page 25: Semi-Exact Control Functionals From Sard’s MethodSemi-Exact Control Functionals From Sard’s Method Leah F. South 1, Toni Karvonen2, Chris Nemeth , Mark Girolami3 ;4, Chris.J. Oates5

B.3 Matern Kernels

For a Matern kernel of smoothness ν > 0 we have

Ψ(z) = bcνzν/2 Kν(c√z ), b =

21−ν

Γ(ν), c =

√2ν

λ,

where Γ the Gamma function and Kν the modified Bessel function of the secondkind of order ν. By the use of the formula ∂zKν(z) = −Kν−1(z)− ν

zKν(z) we obtain

Ψ(j)(z) = (−1)jbcν+j

2jz(ν−j)/2 Kν−j(c

√z ),

for j = 1, . . . , 4. In order to guarantee that the kernel is twice continously differen-tiable, so that k0 in (7) is well-defined, we require that dνe > 2. As a Matern kernelinduces a reproducing kernel Hilbert space that is norm-equivalent to the standardSobolev space of order ν + d

2(Fasshauer and Ye, 2011, Example 5.7), the condition

dνe > 2 implies, by the Sobolev imbedding theorem (Adams and Fournier, 2003,Theorem 4.12), that the functions in G(k) are twice continuously differentiable. No-tice that Ψ(3)(z) and Ψ(4)(z) may not be defined at z = 0, in which case the terms16z2Ψ(4)(z), 16(2 + d)zΨ(3)(z) and 8zΨ(3)(z) in (18) must be interpreted as limitsas z → 0 from the right.

C Properties of H = G(k0)

The purpose of this appendix is to establish basic properties of the reproducingkernel Hilbert space H = G(k0) of the kernel k0 in (7). In Lemma 6 we clarify thereproducing kernel Hilbert space structure of H. Then in Lemma 7 we establishsquare integrability of the elements of H and in Lemma 8 we establish the localsmoothness of the elements of H.

To state these results we require several items of notation: The notation Cs(Rd)denotes the set of s-times continuously differentiable functions on Rd; i.e. ∂αααf ∈C0(Rd) for all |ααα| ≤ s where C0(Rd) denotes the set of continuous functions onRd. For two normed spaces V and W , let V ↪→ W denote that V is continuouslyembedded in W , meaning that ‖v‖W ≤ C‖v‖V for all v ∈ V and some constantC ≥ 0. In particular, we write V ' W if and only if V and W are equal as setsand both V ↪→ W and W ↪→ V . Let L2(p) denote the vector space of squareintegrable functions with respect to p and equip this with the norm ‖h‖L2(p) =(∫h(xxx)2p(xxx)dxxx)1/2. For h : Rd → R and D ⊂ Rd we let h|D : D → R denote the

restriction of h to D.First we clarify the reproducing kernel Hilbert space structure of H:

Lemma 6 (Reproducing kernel Hilbert space structure of H). Let k : Rd×Rd → Rbe a positive-definite kernel such that the regularity assumptions of Lemma 2 aresatisfied. Let H denote the normed space of real-valued functions on Rd with norm

‖h‖H = infh=Lgg∈G(k)

‖g‖G(k).

25

Page 26: Semi-Exact Control Functionals From Sard’s MethodSemi-Exact Control Functionals From Sard’s Method Leah F. South 1, Toni Karvonen2, Chris Nemeth , Mark Girolami3 ;4, Chris.J. Oates5

Then H admits the structure of a reproducing kernel Hilbert space with kernel κ :Rd×Rd → R given by κ(xxx,yyy) = k0(xxx,yyy). That is, H = G(k0). Moreover, for D 6= ∅,let H|D denote the normed space of real-valued functions on D with norm

‖h′‖H|D = infh|D=h′

h∈H

‖h‖H.

Then H|D is a reproducing kernel Hilbert space with kernel κ|D : D×D → R givenby κ|D(xxx,yyy) = k0(xxx,yyy). That is, H|D = G(κ|D).

Proof. The first statement is an immediate consequence of Theorem 5 in Section4.1 of Berlinet and Thomas-Agnan (2011). The second statement is an immediateconsequence of Theorem 6 in Section 4.2 of Berlinet and Thomas-Agnan (2011).

Next we establish when the elements of H are square-integrable functions withrespect to p.

Lemma 7 (Square integrability of H). Let κ be a radial kernel satisfying the pre-conditions of Lemma 5. If ui = ∇xi log p(x) ∈ L2(p) for each i = 1, . . . , d, thenH ↪→ L2(p).

Proof. From the representer theorem and Cauchy–Schwarz we have that∫h(xxx)2p(xxx)dxxx =

∫〈h, κ(·,xxx)〉2H p(xxx)dxxx ≤ ‖h‖2H

∫κ(xxx,xxx)p(xxx)dxxx. (19)

Now, in the special case k(xxx,yyy) = Ψ(z), z = ‖xxx − yyy‖2, the conclusion of Lemma 5gives that κ(xxx,xxx) = 4(2 + d)dΨ(2)(0)− 2Ψ(1)(0)‖uuu(xxx)‖2, from which it follows that

0 ≤∫κ(xxx,xxx)p(xxx)dxxx = 4(2 + d)dΨ(2)(0)− 2Ψ(1)(0)

∫‖uuu(xxx)‖2p(xxx)dxxx = C2. (20)

The combination of (19) and (20) establishes that ‖h‖L2(p) ≤ C‖h‖H, which is theclaimed result.

Finally we turn to the regularity of the elements of H, as quantified by theirsmoothness over suitable bounded sets D ⊂ Rd. In what follows we will let G(k)be a reproducing kernel Hilbert space of functions in L2(Rd), the space of squareLebesgue integrable functions on Rd, such that the norms

‖h‖G(k) ' ‖h‖W r2 (Rd) =

(∑|ααα|≤r ‖∂αααh‖2L2(Rd)

) 12

are equivalent. The latter is recognized as the standard Sobolev norm; this space isdenotedW r

2 (Rd). For example, the Matern kernel in Section B.3 corresponds to G(k)with r = ν + d

2. The Sobolev embedding theorem implies that W r

2 (Rd) ⊂ C0(Rd)whenever r > d

2.

The following result establishes the smoothness of H in terms of the differentia-bility of its elements. If the smoothness of f is known then k should be selected sothat the smoothness of H matches it.

26

Page 27: Semi-Exact Control Functionals From Sard’s MethodSemi-Exact Control Functionals From Sard’s Method Leah F. South 1, Toni Karvonen2, Chris Nemeth , Mark Girolami3 ;4, Chris.J. Oates5

Lemma 8 (Smoothness of H). Let r, s ∈ N be such that r > s + 2 + d2. If

G(k) ' W r2 (Rd) and log p ∈ Cs+1(Rd), then, for any open and bounded set D ⊂ Rd,

we have H|D ↪→ W s2 (D).

Proof. Under our assumptions, the kernel κ|D : D × D → R from Lemma 6 iss-times continuously differentiable in the sense of Definition 4.35 of Steinwart andChristmann (2008). It follows from Lemma 4.34 of Steinwart and Christmann(2008) that ∂αααxxxκ|D(·,xxx) ∈ H|D for all xxx ∈ D and |ααα| ≤ s. From the reproducingproperty in H|D and the Cauchy–Schwarz inequality we have that, for |ααα| ≤ s,

|∂αααf(xxx)| =∣∣〈f, ∂ααακ|D(·,xxx)〉H|D

∣∣ ≤ ‖f‖H|D∥∥∂ααακ|D(·,xxx)∥∥H|D

= ‖f‖H|D(∂αααxxx∂

αααyyy κ|D(xxx,yyy)|yyy=xxx

)1/2.

See also Corollary 4.36 of Steinwart and Christmann (2008). Thus it follows fromthe definition of W s

2 (D) and the reproducing property that

‖f‖2W s2 (D) =

∑|ααα|≤s

‖∂αααf‖2L2(D) ≤ ‖f‖2H|D∑|ααα|≤s

∥∥xxx 7→ ∂αααxxx∂αααyyy κ|D(xxx,yyy)|yyy=xxx

∥∥2L2(D)

= ‖f‖2H|D∥∥xxx 7→ κ|D(xxx,xxx)

∥∥2W s

2 (D).

Now, from the definition of κ and using the fact that k is symmetric, we have that

κ(xxx,xxx) = ∆xxx∆yyyk(xxx,yyy)|yyy=xxx + 2uuu(xxx)>∇xxx∆yyyk(xxx,yyy)|yyy=xxx + uuu(xxx)>[∇xxx∇>yyy k(xxx,yyy)|yyy=xxx

]uuu(xxx).

Our assumption that G(k) ' W r2 (Rd) with r > s + 2 + d

2implies that each of the

functions xxx 7→ ∆xxx∆yyyk(xxx,yyy)|yyy=xxx, ∇xxx∆yyyk(xxx,yyy)|yyy=xxx and ∇xxx∇>yyy k(xxx,yyy)|yyy=xxx, are Cs(Rd).In addition, our assumption that log p ∈ Cs+1(Rd) implies that xxx 7→ uuu(xxx) ∈ Cs(Rd).Thus xxx 7→ κ(xxx,xxx) is Cs(Rd) and in particular the boundedness of D implies that‖xxx 7→ κ|D(xxx,xxx)‖W s

2 (D) <∞ as required.

D Proof of Lemma 2

Proof. In what follows C is a generic positive constant, independent of xxx but pos-sibly dependant on yyy, whose value can differ each time it is instantiated. The aimof this proof is to apply Lemma 1 to the function g(xxx) = Lyyyk(xxx,yyy). Our task is toverify the pre-condition ‖∇xxxg(xxx)‖ ≤ C‖xxx‖−δp(xxx)−1 for some δ > d− 1. It will thenfollow from the conclusion of Lemma 1 that

∫k0(xxx,yyy)p(xxx) dxxx = 0 as required. To

this end, expanding the term ‖∇xxxg(xxx)‖2, we have that

‖∇xxxg(xxx)‖2 = ‖∇xxxLyyyk(xxx,yyy)‖2

=∥∥∇xxx∆yyyk(xxx,yyy) +∇xxx[∇yyy log p(yyy) · ∇yyyk(xxx,yyy)]

∥∥2= ‖∇xxx∆yyyk(xxx,yyy)‖2 + 2∇xxx

[∇yyy log p(yyy) · ∇yyyk(xxx,yyy)

]>∇xxx∆yyyk(xxx,yyy)

+∥∥∇xxx[∇yyy log p(yyy) · ∇yyyk(xxx,yyy)

]∥∥2= ‖∇xxx∆yyyk(xxx,yyy)‖2 + 2

{[∇xxx∇>yyy k(xxx,yyy)]>∇yyy log p(yyy)

}>∇xxx∆yyyk(xxx,yyy)

+∥∥[∇xxx∇>yyy k(xxx,yyy)]∇yyy log p(yyy)

∥∥227

Page 28: Semi-Exact Control Functionals From Sard’s MethodSemi-Exact Control Functionals From Sard’s Method Leah F. South 1, Toni Karvonen2, Chris Nemeth , Mark Girolami3 ;4, Chris.J. Oates5

≤ ‖∇xxx∆yyyk(xxx,yyy)‖2 + 2∥∥[∇xxx∇>yyy k(xxx,yyy)]>∇yyy log p(yyy)

∥∥‖∇xxx∆yyyk(xxx,yyy)‖+∥∥[∇xxx∇>yyy k(xxx,yyy)]∇yyy log p(yyy)

∥∥2(21)

≤ ‖∇xxx∆yyyk(xxx,yyy)‖2 + 2‖∇xxx∇>yyy k(xxx,yyy)‖OP‖∇yyy log p(yyy)‖‖∇xxx∆yyyk(xxx,yyy)‖+ ‖∇xxx∇>yyy k(xxx,yyy)‖2OP‖∇yyy log p(yyy)‖2

(22)

≤[C‖xxx‖−δp(xxx)−1

]2+ 2[C‖xxx‖−δp(xxx)−1

]‖∇yyy log p(yyy)‖

[C‖xxx‖−δp(xxx)−1

]+[C‖xxx‖−δp(xxx)−1

]2‖∇yyy log p(yyy)‖2(23)

≤ C‖xxx‖−2δp(xxx)−2

as required. Here (21) follows from the Cauchy–Schwarz inequality applied to thesecond term, (22) follows from the definition of the operator norm ‖ · ‖OP and (23)employs the pre-conditions that we have assumed.

E Proof of Lemma 3

Proof. Our first task is to establish that it is sufficient to prove the result in just theparticular case xxxn = 000 and n−1I(xxxn)−1 = III, where III is the d-dimensional identitymatrix. Indeed, if xxxn 6= 000 or n−1I(xxxn)−1 6= III, then let ttt(xxx) = WWW (xxx− xxxn) where WWWis a non-singular matrix satisfying WWW>WWW = nI(xxxn) so that ttt(xxx) ∼ N (000, III). Underthe same co-ordinate transformation the polynomial subspace

A = Pr0 = span{xxxααα : ααα ∈ Nd0, 0 ≤ |ααα| ≤ r}

becomes B = span{ttt(xxx)ααα : ααα ∈ Nd0, 0 ≤ |ααα| ≤ r}. Exact integration of functions in

A with respect to N (xxxn, III) corresponds to exact integration of functions in B withrespect to N (000, III). Thus our first task is to establish that B = A. Clearly B is alinear subspace of A, since elements of B can be expanded out into monomials andmonomials generate A, so it remains to argue that B is all of A. In what followswe will show that dim(B) = dim(A) and this will complete the first part of theargument.

The co-ordinate transform ttt is an invertible affine map on Rd. The action of sucha map ttt on a set S of functions on Rd can be defined as ttt(S) = {xxx→ s(ttt(xxx)) : s ∈ S}.Thus B = ttt(A). Let ttt∗(xxx) = WWW−1xxx+ xxxn and notice that this is also an invertibleaffine map on Rd with ttt∗(ttt(xxx)) = xxx being the identity map on Rd. The compositionof invertible affine maps on Rd is again an invertible affine map and thus ttt∗ttt is alsoan invertible affine map on Rd and its action on a set is well-defined. Consideringthe action of ttt∗ttt on the set A gives that ttt∗(ttt(A)) = A and therefore ttt(A) must havethe same dimension as A. Thus dim(A) = dim(t(A)) = dim(B) as claimed.

Our second task is to show that, in the case where p is the density of N (000, III) andthus ∇xxx log p(xxx) = −xxx, the set F = span{1} ⊕ LPr on which ICV is exact is equalto Pr0 . Our proof proceeds by induction on the maximal degree r of the polynomial.For the base case we take r = 1:

span{1} ⊕ LP1 = span{1} ⊕ span{Lxj : j = 1, . . . , d

}28

Page 29: Semi-Exact Control Functionals From Sard’s MethodSemi-Exact Control Functionals From Sard’s Method Leah F. South 1, Toni Karvonen2, Chris Nemeth , Mark Girolami3 ;4, Chris.J. Oates5

= span{1} ⊕ span{

∆xxxxj +∇xxx log p(xxx) · ∇xxx(xj) : j = 1, . . . , d}

= span{1} ⊕ span{

0− xxx · eeej : j = 1, . . . , d}

= span{1} ⊕ span{− xj : j = 1, . . . , d

}= P1

0 .

For the inductive step we assume that span{1} ⊕ LPr−1 = Pr−10 holds for a givenr ≥ 2 and aim to show that span{1} ⊕ LPr = Pr0 . Note that the action of Lon a polynomial of order r will return a polynomial of order at most r, so thatspan{1} ⊕ LPr ⊆ Pr0 and thus we need to show that Pr0 ⊆ span{1} ⊕ LPr. Underthe inductive assumption we have that

span{1} ⊕ LPr = span{1} ⊕(LPr−1 ⊕ span

{Lxxxααα : ααα ∈ Nd

0, |ααα| = r})

=(span{1} ⊕ LPr−1

)⊕ span

{Lxxxααα : ααα ∈ Nd

0, |ααα| = r}

= Pr−10 ⊕ span{Lxxxααα : ααα ∈ Nd

0, |ααα| = r}

= Pr−10 ⊕ span{

∆xxxxxxααα +∇xxxxxxααα · ∇xxx log p(xxx) : ααα ∈ Nd

0, |ααα| = r}

= Pr−10 ⊕ span

{d∑j=1

αj(αj − 1)xαj−2j

∏k 6=j

xαkk −

d∑j=1

αjxxxααα : ααα ∈ Nd

0, |ααα| = r

}= Pr−10 ⊕Qr.

To complete the inductive step we must therefore show that, for each ααα ∈ Nd0 with

|ααα| = r, we have xxxααα ∈ span{1} ⊕ LPr. Fix any ααα ∈ Nd0 such that |ααα| = r. Then

φ(xxx) =d∑j=1

αj(αj − 1)xαj−2j

∏k 6=j

xαkk −

d∑j=1

αjxxxααα ∈ Qr.

and

ϕ(xxx) =1

111>ααα

d∑j=1

αj(αj − 1)xαj−2j

∏k 6=j

xαkk ∈ Pr−10

because this polynomial is of order less than r. Since ϕ− (111>ααα)−1φ ∈ Pr−10 ⊕Qr =span{1} ⊕ LPr and

ϕ(xxx)− 1

111>αααφ(xxx) =

∑dj=1 αj

111>αααxxxααα = xxxααα,

we conclude that xxxααα ∈ span{1} ⊕ LPr. Thus we have shown that {xxxααα : ααα ∈Nd

0, |ααα| = r} ⊂ span{1} ⊕ LPr and this completes the argument.

F Proof of Lemma 4

Proof. The assumptions that the xxx(i) are distinct and that k0 is a positive-definitekernel imply that the matrixKKK0 is positive-definite and thus non-singular. Likewise,the assumption that the xxx(i) are F -unisolvent implies that the matrix PPP has fullrank. It follows that the block matrix in (12) is non-singular. The interpolationand semi-exactness conditions in Section 2.3 can be written in matrix form as

29

Page 30: Semi-Exact Control Functionals From Sard’s MethodSemi-Exact Control Functionals From Sard’s Method Leah F. South 1, Toni Karvonen2, Chris Nemeth , Mark Girolami3 ;4, Chris.J. Oates5

1. KKK0 aaa+PPPbbb = fff (interpolation);

2. PPP>aaa = 000 (semi-exact).

The first of these is merely (10) in matrix form. To see how PPP>aaa = 000 is related tothe semi-exactness requirement (fm = f whenever f ∈ F), observe that for f ∈ Fwe have fff = PPPccc for some ccc ∈ Rq. Consequently, the interpolation condition shouldyield bbb = ccc and aaa = 000. The condition PPP>aaa = 000 enforces that aaa = 000 in this case:multiplication of the interpolation equation with aaa> yields aaa>KKK0aaa+aaa>PPPbbb = aaa>PPPccc,which is then equivalent to aaa>KKK0aaa = 000. Because KKK0 is positive-definite, the onlypossible aaa ∈ Rm is aaa = 000 and PPP having full rank implies that bbb = ccc. Thus thecoefficients aaa and bbb can be cast as the solution to the linear system[

KKK0 PPPPPP> 000

][aaabbb

]=

[fff000

].

From (12) we getbbb = (PPP>KKK−10 PPP )−1PPP>KKK−10 fff,

where PPP>KKK−10 PPP is non-singular because KKK0 is non-singular and PPP has full rank.Recognising that b1 = eee>1 bbb for eee1 = (1, 0, . . . , 0) ∈ Rq completes the argument.

G Nystrom Approximation and Conjugate Gra-

dient

In this appendix we describe how a Nystrom approximation and the conjugategradient method can be used to provide an approximation to the proposed methodwith reduced computational cost. To this end we consider a function of the form

fm0(xxx) = b1 +

q−1∑i=1

bi+1Lφi(xxx) +

m0∑i=1

aik0(xxx,xxx(i)), (24)

where m0 � m represents a small subset of the m points in the dataset. Strategiesfor selection of a suitable subset are numerous (e.g., Alaoui and Mahoney, 2015;Rudi et al., 2015) but for simplicity in this work a uniform random subset wasselected. Without loss of generality we denote this subset by the first m0 indicesin the dataset. The coefficients aaa and bbb in the proposed method (10) can be char-acterized as the solution to a kernel least-squares problem, the details of which arereserved for Appendix G.1. From this perspective it is natural to define the reducedcoefficients aaa and bbb in (24) also as the solution to a kernel least-squares problem,the details of which are reserved for Appendix G.2. In taking this approach, the(m+Q)-dimensional linear system in (12) becomes the (m0 +Q)-dimensional linearsystem[

KKK0,m0,mKKK0,m,m0 +PPPm0PPP>m0

KKK0,m0,mPPPPPP>KKK0,m,m0 PPP>PPP

][aaa

bbb

]=

[KKK0,m0,mfffPPP>fff

]. (25)

30

Page 31: Semi-Exact Control Functionals From Sard’s MethodSemi-Exact Control Functionals From Sard’s Method Leah F. South 1, Toni Karvonen2, Chris Nemeth , Mark Girolami3 ;4, Chris.J. Oates5

Here KKK0,r,s denotes the matrix formed by the first r rows and the first s columns ofKKK0. Similarly PPP r denotes the first r rows of PPP . It can be verified that there is noapproximation error when m0 = m, with aaa = aaa and bbb = bbb. This is a simple instanceof a Nystrom approximation and it can be viewed as a random projection method(Smola and Scholkopf, 2000; Williams and Seeger, 2001).

The computational complexity of computing this approximation to the proposedmethod is

O(mm20 +mQ2 +m3

0 +Q3),

which could still be quite high. For this reason, we now consider iterative, asopposed to direct, linear solvers for (25). In particular, we employ the conjugategradient method to approximately solve this linear system. The performance ofthe conjugate gradient method is determined by the condition number of the linearsystem, and for this reason a preconditioner should be employed1. In this work weconsidered the preconditioner [

BBB1 000000 BBB2

].

Following Rudi et al. (2017), BBB1 is the lower-triangular matrix resulting from aCholesky decomposition

BBB1BBB>1 =

(m

m0

KKK20,m0,m0

+PPPm0PPP>m0

)−1,

the latter being an approximation to the inverse of KKK0,m0,mKKK0,m,m0 +PPPm0PPP>m0

andobtained at O(m3

0 +Qm20) cost. The matrix BBB2 is

BBB2BBB>2 =

(PPP>PPP

)−1,

which uses the pre-computed matrix PPP>PPP and is of O(Q3) complexity. Thus weobtain a preconditioned linear system[BBB>1 (KKK0,m0,mKKK0,m,m0 +PPPm0PPP

>m0

)BBB1 BBB>1KKK0,m0,mPPPBBB2

BBB>2 PPP>KKK0,m,m0BBB1 III

][˜aaa˜bbb

]=

[BBB>1KKK0,m0,mfffBBB>2 PPP

>fff

].

The coefficients aaa and bbb of fm0 are related to the solution (˜aaa,˜bbb) of this preconditioner

linear system via ˜aaa = BBB−11 aaa and˜bbb = BBB−12 bbb, which is an upper-triangular linear

system solved at quadratic cost.The above procedure leads to a more computationally (time and space) efficient

procedure, and we denote the resulting estimator as IASECF(f) = b1. Further ex-tensions could be considered; for example non-uniform sampling for the randomprojection via leverage scores (Rudi et al., 2015).

For the examples in Section 3, we consider m0 = d√m e where d·e denotes theceiling function. We use the R package Rlinsolve to perform conjugate gradient,

1A linear system AAAxxx = bbb can be preconditioned by an invertible matrix PPP to produce PPP>AAAPPPzzz =PPP>bbb. The solution zzz is related to xxx via xxx = PPPzzz.

31

Page 32: Semi-Exact Control Functionals From Sard’s MethodSemi-Exact Control Functionals From Sard’s Method Leah F. South 1, Toni Karvonen2, Chris Nemeth , Mark Girolami3 ;4, Chris.J. Oates5

where we specify the tolerance to be 10−5. The initial value for the conjugate gra-

dient procedure was the choice of ˜aaa and˜bbb that leads to the Monte Carlo estimate,

˜aaa = 000 and˜bbb = BBB−12 eee1

1m

∑mi=1 f(xxx(i)). In our examples, we did not see a computa-

tional speed up from the use of conjugate gradient, likely due to the relatively smallvalues of m involved.

G.1 Kernel Least-Squares Characterization

Here we explain how the interpolant fm in (10) can be characterized as the solutionto the constrained kernel least-squares problem

arg minaaa,bbb

1

m

m∑i=1

[f(xxx(i))− fm(xxx(i))

]2s.t. fm = f for all f ∈ F .

To see this, note that similar reasoning to that in Appendix F allows us to formulatethe problem using matrices as

arg minaaa,bbb

‖fff −KKK0aaa−PPPbbb‖2 s.t. PPP>aaa = 000. (26)

This is a quadratic minimization problem subject to the constraint PPP>aaa = 000 andtherefore the solution is given by the Karush–Kuhn–Tucker matrix equation KKK2

0 KKK0PPP PPPPPP>KKK0 PPP>PPP 000PPP> 000 000

aaabbbccc

=

KKKfffPPP>fff

000

. (27)

Now, we are free to add a multiple, PPP , of the third row to the first row, whichproduces KKK2

0 +PPPPPP> KKK0PPP PPPPPP>KKK0 PPP>PPP 000PPP> 000 000

aaabbbccc

=

KKKfffPPP>fff

000

.Next, we make the ansatz that ccc = 000 and seek a solution to the reduced linearsystem [

KKK20 +PPPPPP> KKK0PPPPPP>KKK0 PPP>PPP

][aaabbb

]=

[KKKfffPPP>fff

].

This is the same as[KKK0 PPPPPP> 000

][KKK0 PPPPPP> 000

]=

[KKK0 PPPPPP> 000

][fff000

]and thus, if the block matrix can be inverted, we have[

KKK0 PPPPPP> 000

]=

[fff000

](28)

as claimed. Existence of a solution to (28) establishes a solution to the originalsystem (27) and justifies the ansatz. Moreover, the fact that a solution to (28)exists was established in Lemma 4.

32

Page 33: Semi-Exact Control Functionals From Sard’s MethodSemi-Exact Control Functionals From Sard’s Method Leah F. South 1, Toni Karvonen2, Chris Nemeth , Mark Girolami3 ;4, Chris.J. Oates5

G.2 Nystrom Approximation

To develop a Nystrom approximation, our starting point is the kernel least-squarescharacterization of the proposed estimator in (26). In particular, the same least-squares problem can be considered for the Nystrom approximation in (24):

arg minaaa,bbb

‖fff −KKK0,m,m0aaa−PPPbbb‖22 s.t. PPP>m0aaa = 000.

This least-squares problem can be formulated as

arg minaaa,bbb

(fff −KKK0,m,m0aaa−PPPbbb)>(fff −KKK0,m,m0aaa−PPPbbb)

= arg minaaa,bbb

[fff>fff − fff>KKK0,m,m0aaa− fff>PPPbbb− aaa>KKK0,m0,mfff + aaa>KKK0,m0,mKKK0,m,m0aaa

+aaa>KKK0,m0,mPPPbbb− bbb>PPP>fff − bbb>PPP>KKK0,m,m0aaa− bbb

>PPP>PPPbbb

]

= arg minaaa,bbb

[aaa

bbb

]> [KKK0,m0,mKKK0,m,m0 KKK0,m0,mPPPPPP>KKK0,m,m0 PPP>PPP

][aaa

bbb

]− 2

[KKK0,m0,mfffPPP>fff

][aaa

bbb

]+ fff>fff

This is a quadratic minimization problem subject to the constraint PPP>m0aaa = 000 and

so the solution is given by the Karush–Kuhn–Tucker matrix equation KKK0,m0,mKKK0,m,m0 KKK0,m0,mPPP PPPm0

PPP>KKK0,m,m0 PPP>PPP 000PPP>m0

000 000

aaa

bbbccc

=

KKK0,m0,mfffPPP>fff

000

. (29)

Following an identical argument to that in Appendix G.1, we first add PPPm0 timesthe third row to the first row to obtain KKK0,m0,mKKK0,m,m0 +PPPm0PPP

>m0

KKK0,m0,mPPP PPPm0

PPP>KKK0,m,m0 PPP>PPP 000PPP>m0

000 000

aaa

bbbccc

=

KKK0,m0,mfffPPP>fff

000

.Taking again the ansatz that ccc = 000 requires us to solve the reduced linear system[

KKK0,m0,mKKK0,m,m0 +PPPm0PPP>m0

KKK0,m0,mPPPPPP>KKK0,m,m0 PPP>PPP

][aaa

bbb

]=

[KKK0,m0,mfffPPP>fff

]. (30)

As in Appendix G.1, the existence of a solution to (30) implies a solution to (29)and justifies the ansatz.

H The Effect of the Kernel and Tuning Approach

In this appendix we investigate the sensitivity of kernel-based methods (ICF, ISECF

and IASECF) to the kernel and its parameter using the Gaussian example of Sec-tion 3.1. Specifically we compare the three kernels described in Appendix B, the

33

Page 34: Semi-Exact Control Functionals From Sard’s MethodSemi-Exact Control Functionals From Sard’s Method Leah F. South 1, Toni Karvonen2, Chris Nemeth , Mark Girolami3 ;4, Chris.J. Oates5

Gaussian, Matern and rational quadratic kernels, when the parameter, λ, is chosenusing either cross-validation or the median heuristic (Garreau et al., 2017). For theMatern kernel, we fix the smoothness parameter at ν = 4.5.

In the cross-validation approach,

λCV ∈ arg min5∑i=1

m5∑j=1

[f(xxx(i,j))− fi,λ(xxx(i,j))

]2, (31)

where m5 = bm/5c, fi,λ denotes an interpolant of the form (10) to f at the points{xxx(i,j) : j = 1, . . . ,m5

}with kernel parameter λ, and xxx(i,j) is the jth point in the

ith fold. In general (31) is an intractable optimization problem and we thereforeperform a grid-based search. Here we consider λ ∈ 10{−1.5,−1,−0.5,0,0.5,1}.

The median heuristic described in Garreau et al. (2017) is the choice of thebandwidth

λ =

√1

2Med

{‖xxx(i) − xxx(j)‖2 : 1 ≤ i < j ≤ m

}for functions of the form k(xxx,yyy) = ϕ(‖xxx−yyy‖/λ), where Med is the empirical median.This heuristic can be used for the Gaussian, Matern and rational quadratic kernels,which all fit into this framework.

Figures 6 and 7 show the statistical efficiency of each combination of kernel andtuning approach for m = 1000 and d = 4, respectively. The outcome that theperformance of ISECF and IASECF are less sensitive to the kernel choice than ICF

is intuitive when considering the fact that semi-exact control functionals enforceexactness on f ∈ F .

34

Page 35: Semi-Exact Control Functionals From Sard’s MethodSemi-Exact Control Functionals From Sard’s Method Leah F. South 1, Toni Karvonen2, Chris Nemeth , Mark Girolami3 ;4, Chris.J. Oates5

3

10

30

100

300

3 10 30 100d

ε(a)

10

30

100

300

3 10 30 100d

ε

(b)

10

30

100

300

3 10 30 100d

ε

(c)

10

30

50

3 10 30 100d

ε

(d)

10

30

50

3 10 30 100d

ε

(e)

TuningCross−validation Median heuristic

KernelGaussian Matern Rational quadratic

Figure 6: Gaussian example, estimated statistical efficiency for N = 1000 usingdifferent kernels and tuning approaches. The estimators are (a) ICF, (b) ISECF withpolynomial order r = 1, (c) ISECF with r = 2, (d) IASECF with r = 1 and (e) IASECF

with r = 2.

1

10

100

10 100 1000m

ε

(a)

10

30

100

300

10 100 1000m

ε

(b)

3

10

30

100

10 100 1000m

ε

(c)

0.3

1.0

3.0

10.0

30.0

10 100 1000m

ε

(d)

3

10

30

10 100 1000m

ε

(e)

TuningCross−validation Median heuristic

KernelGaussian Matern Rational quadratic

Figure 7: Gaussian example, estimated statistical efficiency for d = 4 using dif-ferent kernels and tuning approaches. The estimators are (a) ICF, (b) ISECF withpolynomial order r = 1, (c) ISECF with r = 2, (d) IASECF with r = 1 and (e) IASECF

with r = 2.

35

Page 36: Semi-Exact Control Functionals From Sard’s MethodSemi-Exact Control Functionals From Sard’s Method Leah F. South 1, Toni Karvonen2, Chris Nemeth , Mark Girolami3 ;4, Chris.J. Oates5

I Empirical Results for the Unadjusted Langevin

Algorithm

Recall that the proposed method does not require that the xxx(i) form an empiricalapproximation to p. It is therefore interesting to investigate the behaviour of themethod when the (xxx(i))∞i=1 arise as a Markov chain that does not leave p invariant.Figures 8 and 9 show results when the unadjusted Langevin algorithm is used ratherthan the Metropolis-adjusted Langevin algorithm which is behind Figures 3 and 4of the main text. The benefit of the proposed method for samplers that do not leavep invariant is evident through its reduced bias compared to IZV and IMC in Figure10. Recall that the unadjusted Langevin algorithm (Parisi, 1981; Ermak, 1975) isdefined by

xxx(i+1) = xxx(i) +h2

2ΣΣΣ∇xxx logPxxx|yyy(xxx

(i) | yyy) + εi+1,

for i = 1, . . . ,m − 1 where xxx(1) is a fixed point with high posterior support andεi+1 ∼ N (000, h2ΣΣΣ). Step sizes of h = 0.9 for the sonar example and h = 1.1 for thecapture-recapture example were selected.

36

Page 37: Semi-Exact Control Functionals From Sard’s MethodSemi-Exact Control Functionals From Sard’s Method Leah F. South 1, Toni Karvonen2, Chris Nemeth , Mark Girolami3 ;4, Chris.J. Oates5

1

10

100

1000

10000

100 300 1000 3000m

ε

(a)

1

10

100

1000

100 300 1000 3000m

c

(b)

Polynomial Order1 or NA 2

MethodMonte CarloZero−Variance

Auto Zero−VarianceControl Functionals

Semi−Exact Control FunctionalsApproximate Semi−Exact Control Functionals

Figure 8: Recapture example (a) estimated statistical efficiency and (b) estimatedcomputational efficiency when the unadjusted Langevin algorithm is used in placeof the Metropolis-adjusted Langevin algorithm. Efficiency here is reported as anaverage over the 11 expectations of interest.

1

2

3

100 300 1000 3000m

ε

(a)

0.001

0.010

0.100

1.000

100 300 1000 3000m

c

(b)

Method Monte CarloZero−Variance

Auto Zero−VarianceControl Functionals

Semi−Exact Control FunctionalsApproximate Semi−Exact Control Functionals

Figure 9: Sonar example (a) estimated statistical efficiency and (b) estimated com-putational efficiency when the unadjusted Langevin algorithm is used in place ofthe Metropolis-adjusted Langevin algorithm.

37

Page 38: Semi-Exact Control Functionals From Sard’s MethodSemi-Exact Control Functionals From Sard’s Method Leah F. South 1, Toni Karvonen2, Chris Nemeth , Mark Girolami3 ;4, Chris.J. Oates5

●●

●●

●●

●●

●●

●●

●●

●●

●●

●●

●●

●●●

●●

●●●

●●●●

●●●●

●●

●●●

●●

●●●

●●

●●

●●

● ●●

●●●●●●●●

●●●

0.65

0.70

0.75

0.80

0.85

50 100 250 500 750 1000 2500m

I

(a)

●●

●●●●

●●●

●●

●●

●●●

●●●●

●●

●●

●●

●●●●

●●●●

●●

●●

●●

●●●●

●●

0.70

0.75

0.80

0.85

50 100 250 500 750 1000 2500m

I

(b)

MethodMonte CarloZero−Variance (r=1)

Auto Zero−VarianceControl Functionals

Semi−Exact Control Functionals (r=1)Approximate Semi−Exact Control Functionals (r=1)

Figure 10: Recapture example (a) boxplots of 100 estimates of∫x1Pxxx|yyydxxx when

the Metropolis-adjusted Langevin algorithm is used for sampling and (b) boxplotsof 100 estimates of

∫x1Pxxx|yyydxxx when the unadjusted Langevin algorithm is used for

sampling. The black horizontal line represents the gold standard of approximation.

38

Page 39: Semi-Exact Control Functionals From Sard’s MethodSemi-Exact Control Functionals From Sard’s Method Leah F. South 1, Toni Karvonen2, Chris Nemeth , Mark Girolami3 ;4, Chris.J. Oates5

J Proof of Proposition 1

Proof. For any weights vvv = (v1, . . . , vm) ∈ Rm and g ∈ G(k0) there is a standardworst-case error decomposition (e.g., Dick et al., 2013, Section 3)∣∣∣∣ ∫ g(xxx)p(xxx) dxxx−

m∑i=1

vig(xxx(i))

∣∣∣∣ ≤‖g‖G(k0) e(vvv) (32)

where

e(vvv) = sup‖g‖G(k0)≤1

∣∣∣∣ ∫ g(xxx)p(xxx) dxxx−m∑i=1

vig(xxx(i))

∣∣∣∣is the worst-case integration error in G(k0). Due to the reproducing kernel Hilbertspace structure of G(k0) the worst-case error has the explicit form (Oettershagen,2017, Corollary 3.6)

e(vvv) =

(∫ ∫k0(xxx,yyy)p(xxx)p(yyy) dxxx dyyy − 2

m∑i=1

vi

∫k0(xxx,xxx

(i))p(xxx) dxxx+ vvv>KKK0vvv

)1/2

.

(33)From (9) it follows that the first two terms in (33) vanish

e(vvv) = (vvv>KKK0vvv)1/2. (34)

Let fm(·; f) denote the interpolant (10), making the (linear) dependence on f ex-plicit. The interpolant is a linear operator and the semi-exactness property meansthat fm(·;h) = h for all h ∈ F . Thus if f = h+ g with h ∈ F and g ∈ G(k0), thenit follows from (32) and (34) that

|I(f)− ISECF(f)| = |I(f)− I(fm(·; f))|= |I(h+ g)− I(fm(·;h+ g))|= |I(h+ g)− I(h+ fm(·; g))|= |I(h) + I(g)− I(h)− I(fm(·; g))|= |I(g)− I(fm[g])|≤‖g‖G(k0) e(www)

=‖g‖G(k0) (www>KKK0www)1/2.

Since this argument holds for any decomposition f = h+g with h ∈ F and g ∈ G(k0)we have that

|I(f)− ISECF(f)| ≤ inff=h+g

h∈F , g∈G(k0)

‖g‖G(k0)(www>KKK0www)1/2 = |f |k0,F (www>KKK0www)1/2

as claimed. Finally, that the www have minimal worst-case error among all weightsthat integrate functions in F exactly is a consequence of Theorem 2.7, where theweights wk are our www in (14), and Remark D.1 in Karvonen et al. (2018).

39

Page 40: Semi-Exact Control Functionals From Sard’s MethodSemi-Exact Control Functionals From Sard’s Method Leah F. South 1, Toni Karvonen2, Chris Nemeth , Mark Girolami3 ;4, Chris.J. Oates5

K Proof of Theorem 1

Proof. From Assumption A2 and Lemma 4 we have that (P>K−10 P )−1 is almostsurely well-defined. From Assumption A4 and Proposition 1 we have that

(I(f)− ISECF(f))2 ≤ |f |2k0,F www>KKK0www

and plugging in the expression for www in (14), we have that

(I(f)− ISECF(f))2 ≤ |f |2k0,F [(PPP>KKK−10 PPP )−1]11.

It therefore suffices to show that [(PPP>KKK−10 PPP )−1]11 → 0 in probability as m → ∞.To this end, let [Ψ]i,j := Lφj(x(i)) and consider the block matrix

P>K−10 P

1>K−10 1=

11>K−1

0 Ψ

1>K−10 1

Ψ>K−10 1

1>K−10 1

Ψ>K−10 Ψ

1>K−10 1

.

(35)

From the block matrix inversion formula we have that(P>K−10 P

1>K−10 1

)−11,1

=

[1− 1>K−10 Ψ(Ψ>K−10 Ψ)−1Ψ>K−10 1

1>K−10 1

]−1

=

[1−〈1,Π1〉K−1

0

〈1,1〉K−10

]−1. (36)

Since Π = Ψ(Ψ>K−10 Ψ)−1Ψ>K−10 and

‖Π1‖2K−1

0= 1>Π>K−10 Π1

= 1>K−10 Ψ(Ψ>K−10 Ψ)−1Ψ>K−10 Ψ(Ψ>K−10 Ψ)−1Ψ>K−10 1

= 1>K−10 Ψ(Ψ>K−10 Ψ)−1Ψ>K−10 1

= 1>K−10 Π1

= 〈1,Π1〉K−10,

our Assumption A3 implies that (36) is almost surely asymptotically bounded, sayby a constant C ∈ [0,∞). In other words, it almost surely holds that

[(PPP>KKK−10 PPP )−1]11 ≤ C(1>K−10 1)−1

for all sufficiently large m. The term (1>K−10 1)−1 on the right hand side is recog-nised as the (squared) kernel Stein discrepancy (Chwialkowski et al., 2016; Liu et al.,2016) of the empirical measure

∑mi=1wiδ(x

(i)) where the weights w = [w1, . . . , wm]>

minimise this discrepancy subject to 1>W = 1. Let w denote weights that min-imise this discrepancy subject to 1>w = 1 and w ≥ 0. From Assumption A1 andTheorem 1 of Hodgkinson et al. (2020), we have that the kernel Stein discrepancyof the empirical measure

∑mi=1 wiδ(x

(i)) converges to zero in probability as m→∞.Since the discrepancy associated to the weights w is no greater than that associatedto the weights w, it follows that (1>K−10 1)−1 → 0 in probability as m → ∞, asrequired.

40