Sampling Methods

This chapter introduces several fundamental concepts related to sampling methods. In particular, the statistical properties of the Monte Carlo estimator are discussed (Monte Carlo (MC)) and strategies for multilevel and multifidelity sampling are introduced within this context. Hereafter, multilevel refers to the possibility of exploiting distinct discretization levels (i.e. space/time resolution) within a single model form, whereas multifidelity involves the use of more than one model form. In Multifidelity Monte Carlo, we describe the multifidelity Monte Carlo and its single fidelity model version, the control variate Monte Carlo, that we align with multifidelity sampling, and in Multilevel Monte Carlo, we describe the multilevel Monte Carlo algorithm that we align with multilevel sampling. In A multilevel-multifidelity approach, we show that these two approaches can be combined to create multilevel-multifidelity sampling approaches. Finally, this chapter discusses Quasi-Monte Carlo (QMC) or low-discrepancy sampling.

Monte Carlo (MC)

Monte Carlo is a popular algorithm for stochastic simulations due to its simplicity, flexibility, and the provably convergent behavior that is independent of the number of input uncertainties. A quantity of interest Q:ΞR, represented as a random variable (RV), can be introduced as a function of a random vector ξΞRd. The goal of any MC simulation is computing statistics for Q, e.g. the expected value E[Q]. The MC estimator Q^NMC for E[Q] is defined as follows

(37)Q^NMC=1Ni=1NQ(i),

where Q(i)=Q(ξ(i)) and N is used to indicate the number of realizations of the model.

The MC estimator is unbiased, i.e., its bias is zero and its convergence to the true statistics is O(N1/2). Moreover, since each set of realizations for Q is different, another crucial property of any estimator is its own variance:

(38)Var(Q^NMC)=Var(Q)N.

Furthermore, it is possible to show, in the limit N, that the error (E[Q]Q^NMC)Var(Q)NN(0,1), where N(0,1) represents a standard normal RV. As a consequence, it is possible to define a confidence interval for the MC estimator which has an amplitude proportional to the standard deviation of the estimator. Indeed, the variance of the estimator plays a fundamental role in the quality of the numerical results: the reduction of the estimator variance correspond to an error reduction in the statistics.

Multifidelity Monte Carlo

A closer inspection of Eq. (38) indicates that only an increase in the number of simulations N might reduce the overall variance, since Var(Q) is an intrinsic property of the model under analysis. However, more sophisticated techniques have been proposed to accelerate the convergence of a MC simulation. For instance, an incomplete list of these techniques can include stratified sampling, importance sampling, Latin hypercube, deterministic Sobol’ sequences and control variates (see [Owe13]). In particular, the control variate approach, is based on the idea of replacing the RV Q with one that has the same expected value, but with a smaller variance. The goal is to reduce the numerator in Eq. (38), and hence the value of the estimator variance without requiring a larger number of simulations. In a practical setting, the control variate makes use of an auxiliary RV G=G(ξ) for which the expected value E[G] is known. Indeed, the alternative estimator can be defined as

(39)Q^NMCCV=Q^NMCβ(G^NMCE[G]),whereβR.

The MC control variate estimator Q^NMCCV is unbiased, but its variance now has a more complex dependence not only on the Var(Q), but also on Var(G) and the covariance between Q and G since

Var(Q^NMCCV)=1N(Var(Q^NMC)+β2Var(G^NMC)2βCov(Q,G)).

The parameter β can be used to minimize the overall variance leading to

β=Cov(Q,G)Var(G),

for which the estimator variance follows as

Var(Q^NMCCV)=Var(Q^NMC)(1ρ2).

Therefore, the overall variance of the estimator Q^NMCCV is proportional to the variance of the standard MC estimator Q^NMC through a factor 1ρ2 where ρ=Cov(Q,G)Var(Q)Var(G) is the Pearson correlation coefficient between Q and G. Since 0<ρ2<1, the variance Var(Q^NMCCV) is always less than the corresponding Var(Q^NMC). The control variate technique can be seen as a very general approach to accelerate a MC simulation. The main step is to define a convenient control variate function which is cheap to evaluate and well correlated to the target function. For instance, function evaluations obtained through a different (coarse) resolution may be employed or even coming from a more crude physical/engineering approximation of the problem. A viable way of building a well correlated control variate is to rely on a low-fidelity model (i.e. a crude approximation of the model of interest) to estimate the control variate using estimated control means (see [NgW14, PTSW14] for more details). In this latter case, clearly the expected value of the low-fidelity model is not known and needs to be computed.

With a slight change in notation, it is possible to write

Q^CVMC=Q^+α1(Q^1μ^1),

where Q^ represents the MC estimator for the high-fidelity model, Q^1 the MC estimator for the low-fidelity model and μ^1 a different approximation for E[Q1]. If N samples are used for approximating Q^ and Q^1 and a total of r1N samples for the low-fidelity models are available, an optimal solution, which guarantees the best use of the low-fidelity resources, can be obtained following [NgW14] as

α1=ρ1Var[Q]Var[Q1]
r1=CC1ρ121ρ12,

where C and C1 represent the cost of evaluating the high- and low-fidelity models, respectively and ρ1 is the correlation between the two models. This solution leads to the following expression for the estimator variance

Var[Q^CVMC]=Var[Q^](1r11r1ρ12),

which shows similarities with the variance of a control variate estimator with the only difference being the term r11r1 that, by multiplying the correlation ρ1, effectively penalizes the estimator due to the need for estimating the low-fidelity mean.

Another common case encountered in practice is the availability of more than a low-fidelity model. In this case, the multifidelity Monte Carlo can be extended following [PWG16, PWG18] as

Q^MFMC=Q^+i=1Mαi(Q^iμ^i),

where Q^i represents the generic ith low-fidelity model.

The MFMC estimator is still unbiased (similarly to MC) and share similarities with CVMC; indeed one can recover CVMC directly from it. For each low-fidelity model we use Niri samples, as in the CVMC case, however for i2, the term Qi^ is approximated with exactly the same samples of the previous model, while each μ^i is obtained by adding to this set a number of (riri1)Ni additional independent samples. Following [PWG16] the weights can be obtained as

(40)αi=ρiVar[Q]Var[Qi].

The optimal resource allocation problem is also obtainable in closed-form if, as demonstrated in [PWG16] the following conditions, for the models’ correlations and costs, hold

|ρ1|>|ρ2|>>|ρM|
Ci1Ci>ρi12ρi2ρi2ρi+12,

leading to

ri=CCiρi2ρi+121ρ12.

Multilevel Monte Carlo

In general engineering applications, the quantity of interest Q is obtained as the result of the numerical solution of a partial partial differential equation (possibly a system of them). Therefore, the dependence on the physical xΩRn and/or temporal tTR+ coordinates should be included, hence Q=Q(x,ξ,t). A finite spatial/temporal resolution is always employed to numerically solve a PDE, implying the presence of a discretization error in addition to the stochastic error. The term discretization is applied generically with reference to either the spatial tessellation, the temporal resolution, or both (commonly, they are linked). For a generic tessellation with M degrees-of-freedom (DOFs), the PDE solution of Q is referred to as QM. Since QMQ for M, then E[QM]E[Q] for M with a prescribed order of convergence. A MC estimator in presence of a finite spatial resolution and finite sampling is

Q^M,NMC=1Ni=1NQM(i)

for which the mean square error (MSE) is

E[(Q^M,NMCE[Q])2]=N1Var(QM)+(E[QMQ])2,

where the first term represents the variance of the estimator, and the second term (E[QMQ])2 reflects the bias introduced by the (finite) spatial discretization. The two contributions appear to be independent of each other; accurate MC estimates can only be obtained by drawing the required N number of simulations of QM(ξ) at a sufficiently fine resolution M. Since the numerical cost of a PDE is related to the number of DOFs of the tessellation, the total cost of a MC simulation for a PDE can easily become intractable for complex multi-physics applications that are computationally intensive.

Multilevel Monte Carlo for the mean

The multilevel Monte Carlo (MLMC) algorithm has been introduced, starting from the control variate idea, for situation in which additional discretization levels can be defined. The basic idea, borrowed from the multigrid approach, is to replace the evaluation of the statistics of QM with a sequence of evaluations at coarser levels. If it is possible to define a sequence of discretization levels {M:=0,,L} with M0<M1<<ML=defM, the expected value E[QM] can be decomposed, exploiting the linearity of the expected value operator as

E[QM]=E[QM0]+=1LE[QMQM1].

If the difference function Y is defined according to

Y={QM0if=0QMQM1if0<L,

the expected value E[QM]==0LE[Y]. A multilevel MC estimator is obtained when a MC estimator is adopted independently for the evaluation of the expected value of Y on each level. The resulting multilevel estimator Q^MML is

Q^MML==0LY^,NMC==0L1Ni=1NY(i).

Since the multilevel estimator is unbiased, the advantage of using this formulation is in its reduced estimator variance =0LN1Var(Y): since QMQ, the difference function Y0 as the level increases. Indeed, the corresponding number of samples N required to resolve the variance associated with the th level is expected to decrease with .

The MLMC algorithm can be interpreted as a strategy to optimally allocate resources. If the total cost of the MLMC algorithm is written as

C(Q^MML)==0LNC,

with C being the cost of the evaluation of Y (involving either one or two discretization evaluations), then the following constrained minimization problem can be formulated where an equality constraint enforces a stochastic error (from MLMC estimator variance) equal to the residual bias error (ε2/2)

(41)f(N,λ)==0LNC+λ(=0LN1Var(Y)ε2/2).

using a Lagrange multiplier λ. This equality constraint reflects a balance between the two contributions to MSE, reflecting the goal to not over-resolve one or the other. The result of the minimization is

N=2ε2[k=0L(Var(Yk)Ck)1/2]Var(Y)C,

defining an optimal sample allocation per discretization level.

MLMC extension to the variance

Despite the original introduction of the MLMC approach for the computation of the mean estimator in [Gil08, Gil15], it is possible to estimate higher-order moments with a MLMC sampling strategy, as for instance the variance.

A single level unbiased estimator for the variance of a generic QoI at the highest level ML of the hierarchy can be written as

(42)Var[QML]1NML1i=1NML(QML(i)E[QL])2.

The multilevel version of Eq. (42) can be obtained via a telescopic expansion in term of difference of estimators over subsequent levels. To simplify the notation and for simplicity of exposure from now on we only indicate the level, i.e. M=.

The expansion is obtained by re-writing Eq. (42) as

Var[QL]1NL1i=1NL(QL(i)E[QL])2=0L1N1((Q(i)E[Q])2(Q1(i)E[Q1])2).

It is important here to note that since the estimators at the levels and 1 are computed with the same number of samples both estimators use the factor 1/(N1) to obtain their unbiased version. Moreover, each estimator is indeed written with respect to its own mean value, i.e. the mean value on its level, either or 1. This last requirement leads to the computation of a local expected value estimator with respect to the same samples employed for the difference estimator. If we now denote with Q^,2 the sampling estimator for the second order moment of the QoI Q we can write

(43)Var[QL]Q^L,2ML==0LQ^,2Q^1,2,

where

(44)Q^,2=1N1i=1N(Q(i)Q^)2andQ^1,2=1N1i=1N(Q1(i)Q^1)2.

Note that Q^,2 and Q^1,2 are explicitly sharing the same samples N.

For this estimator we are interested in minimizing its cost while also prescribing its variance as done for the expected value. This is accomplished by evaluating the variance of the multilevel variance estimator Q^L,2ML

Var[Q^L,2ML]==0LVar[Q^,2Q^1,2]==0LVar[Q^,2]+Var[Q^1,2]2Cov(Q^,2,Q^1,2),

where the covariance term is a result of the dependence described in (44).

The previous expression can be evaluated once the variance for the sample estimator of the second order order moment Var[Q^,2] and the covariance term Cov(Q^,2,Q^1,2) are known. These terms can be evaluated as:

Var[Q^,2]1N(Q^,4N3N1(Q^,2)2),

where Q^,4 denotes the sampling estimator for the fourth order central moment.

The expression for the covariance term is more involved and can be written as

Cov(Q^,2,Q^1,2)1NE[Q^,2,Q^1,2]+1NN1(E[QQ1]22E[QQ1]E[Q]E[Q1]+(E[Q]E[Q1])2).

The first term of the previous expression is evaluated by estimating and combining several sampling moments as

E[Q^,2,Q^1,2]=1N(E[Q2Q12])E[Q2]E[Q12]2E[Q1]E[Q2Q1]+2E[Q12]E[Q2]2E[Q]E[QQ12]+2E[Q]2E[Q12]+4E[Q]E[Q1]E[QQ1]4E[Q]2E[Q1]2.

It is important to note here that the previous expression can be computed only if several sampling estimators for product of the QoIs at levels and 1 are available. These quantities are not required in the standard MLMC implementation for the mean and therefore for the estimation of the variance more data need to be stored to assemble the quantities on each level.

An optimization problem, similar to the one formulated for the mean in the previous section, can be written in the case of variance

(45)minN=0LCNs.t.Var[Q^L,2ML]=ε2/2.

This optimization problem can be solved in two different ways, namely an analytical approximation and by solving a non-linear optimization problem. The analytical approximation follows the approach described in [PKN17] and introduces a helper variable

V^2,:=Var[Q^,2]N.

Next, the following constrained minimization problem is formulated

(46)f(N,λ)==0LNC+λ(=0LN1V^2,ε2/2),

and a closed form solution is obtained

(47)N=2ε2[k=0L(V^2,kCk)1/2]V^2,C,

similarly as for the expected value in (41).

The second approach uses numerical optimization directly on the non-linear optimization problem (45) to find an optimal sample allocation. Dakota uses OPTPP as the default optimizer and switches to NPSOL if it is available.

Both approaches for finding the optimal sample allocation when allocating for the variance are currently implemented in Dakota. The analytical solution is employed by default while the optimization is enabled using a keyword. We refer to the reference manual for a discussion of the keywords to select these different options.

MLMC extension to the standard deviation

The extension of MLMC for the standard deviation is slightly more complicated by the presence of the square root, which prevents a straightforward expansion over levels.

One possible way of obtaining a biased estimator for the standard deviation is

σ^LML==0LQ^,2Q^1,2.

To estimate the variance of the standard deviation estimator, it is possible to leverage the result, derived in the previous section for the variance, and write the variance of the standard deviation as a function of the variance and its estimator variance. If we can estimate the variance Q^L,2 and its estimator variance Var[Q^L,2], the variance for the standard deviation σ^LML can be approximated as

Var[σ^LML]14Q^L,2Var[Q^L,2].

Similarly to the variance case, a numerical optimization problem can be solved to obtain the sample allocation for the estimator of the standard deviation given a prescribed accuracy target.

MLMC extension to the scalarization function

Often, especially in the context of optimization, it is necessary to estimate statistics of a metric defined as a linear combination of mean and standard deviation of a QoI. A classical reliability measure cML[Q] can be defined, for the quantity Q, starting from multilevel (ML) statistics, as

cLML[Q]=Q^LML+ασ^LML.

To obtain the sample allocation, in the MLMC context, it is necessary to evaluate the variance of cLML[Q], which can be written as

Var[cLML[Q]]=Var[Q^LML]+α2Var[σ^LML]+2αCov[Q^LML,σ^LML].

This expression requires, in addition to the already available terms Var[Q^LML] and Var[σ^LML], also the covariance term Cov[Q^LML,σ^LML]. This latter term can be written knowing that shared samples are only present on the same level

Cov[Q^LML,σ^LML]=Cov[=0LQ^Q^1,=0Lσ^σ^1]==0LCov[Q^Q^1,σ^σ^1],

which leads to the need for evaluating the following four contributions

Cov[Q^Q^1,σ^σ^1]=Cov[Q^,σ^]Cov[Q^,σ^1]Cov[Q^1,σ^]+Cov[Q^1,σ^1].

In Dakota, we adopt the following approximation, for two arbitrary levels and κ{1,,+1}

ρ[Q^,σ^κ]ρ[Q^,Q^κ,2]

(we indicate with Q^κ,2 the second central moment for Q at the level κ), which corresponds to assuming that the correlation between expected value and variance is a good approximation of the correlation between the expected value and the standard deviation. This assumption is particularly convenient because it is possible to obtain in closed form the covariance between expected value and variance and, therefore, we can adopt the following approximation

Cov[Q^,σ^κ]Var[Q^]Var[σ^κ]Cov[Q^,Q^κ,2]Var[Q^]Var[Q^κ,2]Cov[Q^,σ^κ]Cov[Q^,Q^κ,2]Var[σ^κ]Var[Q^κ,2].

Finally, we can derive the term Cov[Q^,Q^κ,2] for all possible cases

Cov[Q^,Q^κ,2]={1N(E[QQκ2]E[Q]E[Qκ2]2E[Qκ]E[QQκ]+2E[Q]E[Qκ2]),if κQ^,3N,if κ=.

Even for this case, the sample allocation problem can be solved by resorting to a numerical optimization given a prescribed target.

A multilevel-multifidelity approach

The MLMC approach described in Multilevel Monte Carlo can be related to a recursive control variate technique in that it seeks to reduce the variance of the target function in order to limit the sampling at high resolution. In addition, the difference function Y for each level can itself be the target of an additional control variate (refer to Multifidelity Monte Carlo). A practical scenario is when not only different resolution levels are available (multilevel part), but also a cheaper computational model can be used (multifidelity part). The combined approach is a multilevel-multifidelity algorithm [FDKI17, GIE15, NT15], and in particular, a multilevel-control variate Monte Carlo sampling approach.

Yl correlations

If the target QoI can be generated from both a high-fidelity (HF) model and a cheaper, possibly biased low-fidelity (LF) model, it is possible to write the following estimator

(48)E[QMHF]=l=0LHFE[YHF]l=0LHFY^HF=l=0LHFYHF,,

where

YHF,=YHF+α(Y^LFE[YLF]).

The estimator YHF, is unbiased with respect to Y^HF, hence with respect to the true value E[YHF]. The control variate is obtained by means of the LF model realizations for which the expected value can be computed in two different ways: Y^LF and E[YLF]. A MC estimator is employed for each term but the estimation of E[YLF] is more resolved than Y^LF. For Y^LF, we choose the number of LF realizations to be equal to the number of HF realizations, NHF. For the more resolved E[YLF], we augment with an additional and independent set of realizations ΔLF, hence NLF=NHF+ΔLF. The set ΔLF is written, for convenience, as proportional to NHF by means of a parameter rR0+

NLF=NHF+ΔLF=NHF+rNHF=NHF(1+r).

The set of samples ΔLF is independent of NHF, therefore the variance of the estimator can be written as (for further details see [GIE15])

(49)Var(Q^MMLMF)=l=0LHF(1NHFVar(YHF)+α2r(1+r)NHFVar(YHF)+2αr2(1+r)NHFρVar(YHF)Var(YLF)),

The Pearson’s correlation coefficient between the HF and LF models is indicated by ρ in the previous equations. Assuming the vector r as a parameter, the variance is minimized per level, mimicking the standard control variate approach, and thus obtaining the optimal coefficient as α=ρVar(YHF)Var(YLF). By making use of the optimal coefficient α, it is possible to show that the variance Var(YHF,) is proportional to the variance Var(YHF) through a factor Λ(r), which is an explicit function of the ratio r:

(50)Var(Q^MMLMF)=l=0LHF1NHFVar(YHF)Λ(r)whereΛ(r)=(1r1+rρ2).

Note that Λ(r) represents a penalty with respect to the classical control variate approach presented in Multifidelity Monte Carlo, which stems from the need to evaluate the unknown function E[YLF]. However, the ratio r/(r+1) is dependent on the additional number of LF evaluations ΔLF, hence it is fair to assume that it can be made very close to unity by choosing an affordably large r, i.e., ΔLF>>NHF.

The optimal sample allocation is determined taking into account the relative cost between the HF and LF models and their correlation (per level). In particular the optimization problem introduced in Eq. (41) is replaced by

argminNHF,r(L),whereL==0LHFNHFCeq+λ(=0LHF1NHFVar(YHF)Λ(r)ε2/2),

where the optimal allocation is obtained as well as the optimal ratio r. The cost per level includes now the sum of the HF and LF realization cost, therefore it can be expressed as Ceq=CHF+CLF(1+r).

If the cost ratio between the HF and LF model is w=CHF/CLF then the optimal ratio is

r=1+ρ21ρ2w,

and the optimal allocation is

NHF,=2ε2[k=0LHF(Var(YkHF)CkHF1ρ2)1/2Λk(rk)](1ρ2)Var(YHF)CHF.

It is clear that the efficiency of the algorithm is related not only to the efficiency of the LF model, i.e. how fast a simulation runs with respect to the HF model, but also to the correlation between the LF and HF model.

Ql correlations

A potential refinement of the previous approach [GEI17] consists in exploiting the QoI on each pair of levels, and 1, to build a more correlated LF function. For instance, it is possible to use

Y˚LF=γQLFQ1LF

and maximize the correlation between YHF and Y˚LF through the coefficient γ.

Formally the two formulations are completely equivalent if YLF is replaced with Y˚LF in Eq. (48) and they can be linked through the two ratios

θ=Cov(YHF,Y˚LF)Cov(YHF,YLF)τ=Var(Y˚LF)Var(YLF),

obtaining the following variance for the estimator

Var(Q^MMLMF)=1NHFVar(YHF)(1r1+rρ2θ2τ).

Therefore, a way to increase the variance reduction is to maximize the ratio θ2τ with respect to the parameter γ. It is possible to solve analytically this maximization problem obtaining

γ=Cov(YHF,Q1LF)Cov(QLF,Q1LF)Var(Q1LF)Cov(YHF,QLF)Var(QLF)Cov(YHF,Q1LF)Cov(YHF,QLF)Cov(QLF,Q1LF).

The resulting optimal allocation of samples across levels and model forms is given by

r=1+ρl2θ2τ1ρ2θ2τw,wherew=CHF/CLFΛ=1ρ2θ2τr1+rNHF,=2ε2[k=0LHF(Var(YkHF)CkHF1ρ2θ2τ)1/2Λk(rk)](1ρ2θ2τ)Var(YHF)CHF

Quasi-Monte Carlo (QMC)

Quasi-Monte Carlo methods are equal-weight quadrature rules to approximate E[Q] with deterministically well-chosen sample points to beat the notoriously slow convergence of a method that uses random MC samples. They are of the form

(51)Q^NQMC=1Ni=1NQ(t(i)),

which is seemingly identical to the form of the classic MC method from Eq. (37), however, the N s-dimensional points t(i) are now carefully chosen inside the domain ΞRd. With carefully chosen we mean that the points have a low discrepancy D(t(0),t(1),,t(N1)). This discrepancy is important, because it directly appears in the error bound of a QMC method, i.e., we have the Koksma-Hlawka inequality [Nie92]

(52)|E[Q]Q^NQMC|D(t(0),t(1),,t(N1))V(f).

The QMC error thus consists of two parts: a factor that only depends on the point set (in particular, on the discrepancy of the point set) and a factor depending only on the function f we are trying to integrate (the so-called variation of the function f).

Some famous examples of low-discrepancy point sets are Sobol points [Sobol67], Halton points [HS64] and Hammersley points [Ham13]. The advantage of using such a low-discrepancy point set is faster convergence: classic theory states that a QMC method may converge like (logN)d/N, for sufficiently smooth functions f, see [DP10]. Compare this to the classic MC method, that converges like 1/N, and it is easy to see why QMC methods are so appealing.

Unfortunately, the classic QMC theory is not adequate in high dimensions (large d): for (logN)d/N to be smaller than 1/N, we require, for example, N>exp(d), an unrealistically large number in high dimensions. Furthermore, in many problems, the variation V(f) is infinite, making the error bound in (52) practically useless.

Then, in 1995, a 360-dimensional integral originating from financial mathematics was computed very efficiently by Paskov and Traub, see [PT96]. This led to many new theoretical developments, including the notion of weighted function spaces and low effective dimension: although the problem is high-dimensional, not all dimensions are equally important. In the work by Sloan and Woźniakowski [SWozniakowski98], this decreasing importance is quantified in terms of weights γj associated to each dimension j, and where one assumes γ1γ2γd0. Contemporary QMC analysis is then performed by analyzing the problem in a function space that incorporates these weights. A reinterpretation of (52) in the weighted space setting with weights γ is then

|E[Q]Q^NQMC|eγ(t(0),t(1),,t(N1))fγ,

where eγ is the so-called worst-case error, and fγ is the norm of the function in the weighted function space. The question then becomes one of (strong) tractability: under which conditions on the weights is the worst-case error bounded independent of the dimension d? The philosophy of modern QMC is therefore to choose the weights according to the problem at hand, and then construct a QMC method that yields good performance for all functions that belong to this weighted function space, see [DP10].

QMC methods come in two major flavors: lattice rules and digital nets. We will now briefly discuss these two construction methods.

Rank-1 lattice rules and sequences

An N-point rank-1 lattice rule in d dimensions generates points according to

(53)t(i)={izN}=izmodNN

where {} denotes the fractional part, i.e., {x}=xx, and where z=(z1,z2,,zd) is an d-dimensional vector with integers, called the generating vector. Rank-1 lattices were introduced by Korobov [Kor59] and Hlawka [Hla62], as the method of good lattice points.

The performance of the lattice rule depends critically on the choice of the generating vector z. We assume that zUNd, where UN={zZ:1zN1andgcd(z,N)=1}, to ensure that every one-dimensional projection of the N points on one of the coordinate axes has N distinct values. It can be shown that the number of elements inside the set UN is given by the Euler totient function φ(N). For number theoretical reasons, N is usually restricted to be a prime number, such that the number of elements is φ(N)=N1. In that case, there are an astounding (N1)d possible choices for the generating vector z. Since it is impossible to perform an exhaustive search over all possible choices for large N and s to find the best possible generating vector z, we resort to construction schemes that deliver good choices for z. An example of such a scheme is the component-by-component (CBC) construction [Kor63, SJ94]. The algorithm works as follows:

  1. Set z1=1.

  2. With z1 fixed, pick z2UN such that eγ(z1,z2) is minimized.

  3. With z1 and z2 fixed, pick z3UN such that eγ(z1,z2,z3) is minimized.

Hence, this algorithm constructs the components of the generating vector for the lattice rule one at a time: the (j+1)th component is obtained by successive one-dimensional searches, with the previous j components kept fixed. It can be proven that the CBC algorithm constructs generating vectors that, when used in a lattice rule, achieve the desired convergence close to 1/N, in some weighted function space, see [Kuo03].

For some particular choices of the weights γ (called product weights), the cost of the CBC algorithm is O(dNlogN) operations, i.e., linear in the dimension d and almost linear in the number of points N, due to a fast CBC construction by Nuyens and Cools, see [CKN06, NC06]. The idea for the fast construction is that the CBC construction requires the evaluation of a matrix-vector multiplication with a circulant matrix, hence reducing the cost of the matrix-vector product from O(N2) to O(NlogN) by using FFT.

Fig. 64 Applying a (1/10,1/3)-shift to a 21-point Fibonacci lattice in two dimensions. Take the original lattice (left), apply a random shift (middle) and wrap the points back onto the unit square (right).

The lattice points given in (53) can be randomized by adding a random shift vector. If Δ is a d-dimensional vector of standard normal random variables, we construct the shifted lattice points as

tn={nzN+Δ}.

This procedure is illustrated in Fig. 64. Note that the first untransformed point in the sequence will be t(0)=(0,0,,0).

For the lattice points to be practically useful, we would like to transform the lattice rule into a lattice sequence, that allows us to generate well-distributed points for an arbitrary number of points N. To this end, Eq. (53) is adapted to

t(i)={ϕb(i)z},

where ϕb(i) denotes the so-called radical inverse function in base b (usually, b=2). This function transforms a number i=(i2i1)b in its base-b representation to ϕb(i)=(0.i1i2)b. Note that the radical inverse function agrees with the original formulation when N=bm for any m0.

Digital nets and sequences

Digital nets and sequences were introduced by Niederreiter, building upon earlier work by Sobol and Faure [Nie87]. In the digital construction scheme, a sequence in d dimensions generates points t(i)=(ti,0,ti,1,,ti,d), where the jth component ti,j is constructed as follows:

  1. Write i in its base-b representation, i.e.,

i=(i3i2i1)b=i1+i2b+i3b2+
  1. Compute the matrix-vector product

(y1y2y3)=Cj(i1i2i3)

where all additions and multiplications are performed in base b.

  1. Set the jth component of the ith points to

tj(i)=y1b+y2b2+y3b3+=(0.y1y2y3)b

The matrices Cj, j=1,2,,d are known as generating matrices, see [DP10].

We can encode the generating matrices as an integer matrix as follows. The number of rows in the matrix determines the maximum dimension of the lattice rule. The number of columns in the matrix determines the log2 of the maximum number of points. An integer on the jth row and mth column encodes the mth column of the jth generating matrix Cj. Since the mth column of Cj is a collection of 0’s and 1’s, it can be represented as an integer with t bits, where t is the number of rows in the jth generating matrix Cj. By default, the encoding assumes the integers are stored with least significant bit first (LSB), so that the first integer on the jth row is 1. This LSB representation has two advantages.

  • The integers can be reused if the number of bits t in the representation changes.

  • It generally leads to smaller, human-readable numbers in the first few entries.

The Sobol sequence is a particularly famous example of a digital net [Sobol67]. A computer implementation of a Sobol sequence generator in Fortran 77 was given by Bratley and Fox [BF88] as Algorithm 659. This implementation allowed points of up to 40 dimensions. It was extended by Joe and Kuo to allow up to 1111 dimensions in [JK03] and up to 21201 dimensions in [JK08]. In the Dakota implementation of the algorithm outlined above, we use the iterative construction from Antonov and Saleev [AS79], that generates the points in Gray code ordering. Knowing the current point with (Gray code) index n, the next point with index n+1 is obtained by XOR’ing the current point with the kth column of the jth generating matrix, i.e.,

tj(n+1)=tj(n)Cj,k

where k is the rightmost zero-bit of n (the position of the bit that will change from index n to n+1 in Gray code).

The digital net points can be randomized by adding a digital shift vector. If Δ is a d-dimensional vector of standard normal random variables, we construct the shifted lattice points as t(i)Δ, where is the element-wise b-ary addition (or XOR) operator, see [DP10]. Note that the first untransformed point in the sequence will be t(0)=(0,0,,0).

Ideally, the digital net should preserve the structure of the points after randomization. This can be achieved by scrambling the digital net. Scrambling can also improve the rate of convergence of a method that uses these scrambled points to compute the mean of the model response. Owen’s scrambling [Owe98] is the most well-known scrambling technique. A particular variant is linear matrix scrambling, see [Matouvsek98], which is implemented in Dakota. In linear matrix scrambling, we left-multiply each generating matrix with a lower-triangular random scramble matrix with 1s on the diagonal, i.e.,

1 0 0 0 0
x 1 0 0 0
x x 1 0 0
x x x 1 0
x x x x 1

Finally, for the digital net points to be practically useful, we would like to transform the digital net into a digital sequence, that allows us to generate well-distributed points for an arbitrary number of points N. One way to do this is to generate the points in Gray code ordering, as discussed above.