Gradient-enhanced kriging explained

Gradient-enhanced kriging (GEK) is a surrogate modeling technique used in engineering. A surrogate model (alternatively known as a metamodel, response surface or emulator) is a prediction of the output of an expensive computer code.[1] This prediction is based on a small number of evaluations of the expensive computer code.

Introduction

Adjoint solvers are now becoming available in a range of computational fluid dynamics (CFD) solvers, such as Fluent, OpenFOAM, SU2 and US3D. Originally developed for optimization, adjoint solvers are now finding more and more use in uncertainty quantification.

Linear speedup

An adjoint solver allows one to compute the gradient of the quantity of interest with respect to all design parameters at the cost of one additional solve. This, potentially, leads to a linear speedup: the computational cost of constructing an accurate surrogate decrease, and the resulting computational speedup

s

scales linearly with the number

d

of design parameters.

The reasoning behind this linear speedup is straightforward. Assume we run

N

primal solves and

N

adjoint solves, at a total cost of

2N

. This results in

N+dN

data;

N

values for the quantity of interest and

d

partial derivatives in each of the

N

gradients. Now assume that each partial derivative provides as much information for our surrogate as a single primal solve. Then, the total cost of getting the same amount of information from primal solves only is

N+dN

. The speedup is the ratio of these costs:[2] [3]

s=

N+dN
2N

=

1
2

+

1
2

d.

A linear speedup has been demonstrated for a fluid-structure interaction problem [2] and for a transonic airfoil.[3]

Noise

One issue with adjoint-based gradients in CFD is that they can be particularly noisy.[4] [5] When derived in a Bayesian framework, GEK allows one to incorporate not only the gradient information, but also the uncertainty in that gradient information.[6]

Approach

When using GEK one takes the following steps:

  1. Create a design of experiment (DoE): The DoE or 'sampling plan' is a list of different locations in the design space. The DoE indicates which combinations of parameters one will use to sample the computer simulation. With Kriging and GEK, a common choice is to use a Latin Hypercube Design (LHS) design with a 'maximin' criterion. The LHS-design is available in scripting codes like MATLAB or Python.
  2. Make observations: For each sample in our DoE one runs the computer simulation to obtain the Quantity of Interest (QoI).
  3. Construct the surrogate: One uses the GEK predictor equations to construct the surrogate conditional on the obtained observations.

Once the surrogate has been constructed it can be used in different ways, for example for surrogate-based uncertainty quantification (UQ) or optimization.

Predictor equations

In a Bayesian framework, we use Bayes' Theorem to predict the Kriging mean and covariance conditional on the observations. When using GEK, the observations are usually the results of a number of computer simulations. GEK can be interpreted as a form of Gaussian process regression.

Kriging

Along the lines of, [7] we are interested in the output

X

of our computer simulation, for which we assume the normal prior probability distribution:

X\siml{N}(\mu,P),

with prior mean

\mu

and prior covariance matrix

P

. The observations

y

have the normal likelihood:

Y\midx\siml{N}(Hx,R),

with

H

the observation matrix and

R

the observation error covariance matrix, which contains the observation uncertainties. After applying Bayes' Theorem we obtain a normally distributed posterior probability distribution, with Kriging mean:

\operatornameE(X\midy)=\mu+K(y-H\mu),

and Kriging covariance:

\operatorname{cov}(X\midy)=(I-KH)P,

where we have the gain matrix:

K=PHT(R+HPHT)-1.

In Kriging, the prior covariance matrix

P

is generated from a covariance function. One example of a covariance function is the Gaussian covariance:

Pij=\sigma2

\exp\left(-\sum
k|\xijk-\xiik|2
2
2
\theta
k

\right),

where we sum over the dimensions

k

and

\xi

are the input parameters. The hyperparameters

\mu

,

\sigma

and

\theta

can be estimated from a Maximum Likelihood Estimate (MLE).[8] [9]

Indirect GEK

There are several ways of implementing GEK. The first method, indirect GEK, defines a small but finite stepsize

h

, and uses the gradient information to append synthetic data to the observations

y

, see for example. Indirect Kriging is sensitive to the choice of the step-size

h

and cannot include observation uncertainties.

Direct GEK (through prior covariance matrix)

Direct GEK is a form of co-Kriging, where we add the gradient information as co-variables. This can be done by modifying the prior covariance

P

or by modifying the observation matrix

H

; both approaches lead to the same GEK predictor. When we construct direct GEK through the prior covariance matrix, we append the partial derivatives to

y

, and modify the prior covariance matrix

P

such that it also contains the derivatives (and second derivatives) of the covariance function, see for example [10] .The main advantages of direct GEK over indirect GEK are: 1) we do not have to choose a step-size, 2) we can include observation uncertainties for the gradients in

R

, and 3) it is less susceptible to poor conditioning of the gain matrix

K

.

Direct GEK (through observation matrix)

Another way of arriving at the same direct GEK predictor is to append the partial derivatives to the observations

y

and include partial derivative operators in the observation matrix

H

, see for example.[11]

Gradient-enhanced kriging for high-dimensional problems (Indirect method)

Current gradient-enhanced kriging methods do not scale well with the number of sampling points due to the rapid growth in the size of the correlation matrix, where new information is added for each sampling point in each direction of the design space. Furthermore, they do not scale well with the number of independent variables due to the increase in the number of hyperparameters that needs to be estimated.To address this issue, a new gradient-enhanced surrogate model approach that drastically reduced the number of hyperparameters through the use of the partial-least squares method that maintains accuracy is developed. In addition, this method is able to control the size of the correlation matrix by adding only relevant points defined through the information provided by the partial-least squares method. For more details, see.[12] This approach is implemented into the Surrogate Modeling Toolbox (SMT) in Python (https://github.com/SMTorg/SMT), and it runs on Linux, macOS, and Windows. SMT is distributed under the New BSD license.

Augmented gradient-enhanced kriging (direct method)

A universal augmented framework is proposed in [13] to append derivatives of any order to the observations. This method can be viewed as a generalization of Direct GEK that takes into account higher-order derivatives. Also, the observations and derivatives are not required to be measured at the same location under this framework.

Example: Drag coefficient of a transonic airfoil

As an example, consider the flow over a transonic airfoil.[3] The airfoil is operating at a Mach number of 0.8 and an angle of attack of 1.25 degrees. We assume that the shape of the airfoil is uncertain; the top and the bottom of the airfoil might have shifted up or down due to manufacturing tolerances. In other words, the shape of the airfoil that we are using might be slightly different from the airfoil that we designed.

On the right we see the reference results for the drag coefficient of the airfoil, based on a large number of CFD simulations. Note that the lowest drag, which corresponds to 'optimal' performance, is close to the undeformed 'baseline' design of the airfoil at (0,0).

After designing a sampling plan (indicated by the gray dots) and running the CFD solver at those sample locations, we obtain the Kriging surrogate model. The Kriging surrogate is close to the reference, but perhaps not as close as we would desire.

In the last figure, we have improved the accuracy of this surrogate model by including the adjoint-based gradient information, indicated by the arrows, and applying GEK.

Applications

GEK has found the following applications:

Notes and References

  1. Mitchell . M. . Morris . M. . Bayesian design and analysis of computer experiments: two examples . Statistica Sinica . 1992 . 2 . 359–379.
  2. de Baar . J.H.S. . Scholcz . T.P. . Verhoosel . C.V. . Dwight . R.P. . van Zuijlen . A.H. . Bijl . H. . Efficient uncertainty quantification with gradient-enhanced Kriging: Applications in FSI . ECCOMAS, Vienna, Austria, September 10–14 . 2012.
  3. de Baar . J.H.S. . Scholcz . T.P. . Dwight . R.P. . 2015 . Exploiting Adjoint Derivatives in High-Dimensional Metamodels . AIAA Journal . 53 . 5 . 1391–1395 . 10.2514/1.J053678. 2015AIAAJ..53.1391D .
  4. Dwight . R. . Brezillon . J. . Effect of Approximations of the Discrete Adjoint on Gradient-Based Optimization . AIAA Journal . 44 . 12 . 3022–3031 . 2006. 10.2514/1.21744 . 10.1.1.711.4761 . 2006AIAAJ..44.3022D .
  5. Giles . M. . Duta . M. . Muller . J. . Pierce . N. . 2106397 . Algorithm Developments for Discrete Adjoint Methods . AIAA Journal . 41 . 2 . 198–205 . 2003. 10.2514/2.1961 . 2003AIAAJ..41..198G .
  6. de Baar . J.H.S. . Dwight . R.P. . Bijl . H. . 2014 . Improvements to gradient-enhanced Kriging using a Bayesian interpretation . International Journal for Uncertainty Quantification . 4 . 3 . 205–223 . 10.1615/Int.J.UncertaintyQuantification.2013006809. free .
  7. Wikle . C.K. . Berliner . L.M. . 2007 . A Bayesian tutorial for data assimilation . Physica D . 230 . 1–2. 1–16 . 10.1016/j.physd.2006.09.017. 2007PhyD..230....1W .
  8. Book: Dwight . R.P. . Han . Z.-H. . 2009 . Efficient uncertainty quantification using gradient-enhanced Kriging . 11th AIAA Non-Deterministic Approaches Conference, Palm Springs, California, 4–7 May . 10.2514/6.2009-2276. 978-1-60086-975-4 . 59019628 .
  9. Zhang . Sheng . Yang . Xiu . Tindel . Samy . Lin . Guang . Augmented Gaussian random field: Theory and computation . Discrete & Continuous Dynamical Systems - S . 2021 . 15 . 4 . 931 . 10.3934/dcdss.2021098. 2009.01961 . 221507566 .
  10. Laurenceau . J. . Sagaut . P. . 17895486 . 2008 . Building efficient response surfaces of aerodynamic functions with Kriging and coKriging . AIAA Journal . 46 . 2 . 498–507 . 10.2514/1.32308. 2008AIAAJ..46..498L .
  11. de Baar . J.H.S. . 2014 . Stochastic Surrogates for Measurements and Computer Models of Fluids . PhD Thesis, Delft University of Technology . 99–101 .
  12. Bouhlel . M.A. . Martins . J.R.R.A. . 2018 . Gradient-enhanced kriging for high-dimensional problems . Engineering with Computers . 35 . 157–173 . 10.1007/s00366-018-0590-x. 1708.02663 . 3540630 .
  13. Zhang . Sheng . Yang . Xiu . Tindel . Samy . Lin . Guang . Augmented Gaussian random field: Theory and computation . Discrete & Continuous Dynamical Systems - S . 2021 . 15 . 4 . 931 . 10.3934/dcdss.2021098. 2009.01961 . 221507566 .
  14. Morris . M.D. . Mitchell . T.J. . Ylvisaker . D. . 1993 . Bayesian Design and Analysis of Computer Experiments: Use of Derivatives in Surface Prediction . Technometrics . 35 . 3 . 243–255 . 10.1080/00401706.1993.10485320.
  15. Chung . H.-S. . Alonso . J.J. . 2002 . Using Gradients to Construct Cokriging Approximation Models for High-Dimensional Design Optimization Problems . AIAA 40th Aerospace Sciences Meeting and Exhibit . 2002–0317. 10.2514/6.2002-317. 10.1.1.12.4149 .
  16. Han . Z.-H. . Gortz . S. . Zimmermann . R. . 2013 . Improving variable-fidelity surrogate modeling via gradient-enhanced kriging and a generalized hybrid bridge function . 10.1016/j.ast.2012.01.006 . Engineering with Computers . 32 . 1 . 15–34 .
  17. Ulaganathan . S. . Couckuyt . I. . Dhaene . T. . Degroote . J. . Laermans . E. . 2016 . Performance study of gradient-enhanced Kriging . Aerospace Science and Technology . 25 . 1 . 177–189 .
  18. Laurent . L. . Le Riche . R. . Soulier . B. . Boucard . P.-A. . 2017 . An overview of gradient-enhanced metamodels with applications . Archives of Computational Methods in Engineering . 26 . 1–46 . 10.1007/s11831-017-9226-3. 54625655 .
  19. Lockwood . B.A. . Anitescu . M. . 2012. Gradient-Enhanced Universal Kriging for Uncertainty Propagation . Nuclear Science and Engineering. 170. 2. 168–195. 10.13182/NSE10-86. 10.1.1.187.6097 . 18465024 .
  20. Raggi . G. . Fdez. Galván . I. . Ritterhoff . C. L. . Vacher . M. . Lindh . R. . 2020 . Restricted-Variance Molecular Geometry Optimization Based on Gradient-Enhanced Kriging . Journal of Chemical Theory and Computation . 16 . 6 . 3989–4001 . 10.1021/acs.jctc.0c00257. 32374164 . 7304864 . free .