---
title: Simulation Functions in Computer Experiments
url: https://www.emergentmind.com/topics/simulation-functions-sfs
type: topic
---

# Simulation Functions in Computer Experiments

In the design of computer experiments, a simulation function is the expensive simulator response \(y(x)\) generated by a computer code at an input \(x \in \chi \subset \mathbb{R}^d\). The modern treatment of such functions assumes that the simulator is deterministic but insufficiently sampled, so the unknown response surface is emulated statistically—primarily with a Gaussian process (GP)—and new simulator evaluations are chosen sequentially by maximizing an objective-specific expected improvement (EI) criterion. Within this framework, simulation functions are not studied only for interpolation; they are interrogated for features such as global optima, contours \(S(a)=\{x:y(x)=a\}\), target-matching input sets, feasibility regions, robust designs, and related constrained or multi-fidelity objectives [1601.05887].

## 1. Formal setting and scientific objectives

A computer experiment begins with a simulator or computer code that maps an input vector \(x\) to an output \(y(x)\), possibly one scalar output of interest extracted from a larger multivariate response. The central methodological assumption is that the simulator is expensive to run, so direct dense exploration of \(\chi\) is infeasible, especially in moderate or high dimension. The practical problem is therefore not merely to approximate \(y(x)\), but to allocate a small run budget toward a specific scientific goal [1601.05887].

The canonical objectives are global optimization, contour or level-set estimation, and target matching. Global optimization seeks \(\min_{x\in\chi} y(x)\) or \(\max_{x\in\chi} y(x)\), with maximization typically handled by minimizing \(-y(x)\). Contour estimation seeks the input set
$$
S(a)=\{x:y(x)=a\},
$$
which is also the natural formalization of inverse design or “moving the output to a target.” The same framework extends to simultaneous multiple contour estimation, percentile contours, constrained optimization, robust design, noisy-simulator optimization, and multi-fidelity settings [1601.05887].

Although the simulator is deterministic, the methodology models the unknown response surface as random away from sampled inputs. This stochasticity is epistemic rather than physical: rerunning the code at the same \(x\) yields the same output, but uncertainty persists because only finitely many inputs have been evaluated. A plausible implication is that the statistical model is not a replacement for the simulator; it is a device for deciding where the next simulator run is most informative.

## 2. Gaussian-process emulation of the simulation function

The default surrogate is a Gaussian process emulator,
$$
Y(x)=\mu(x)+Z(x),
$$
where \(\mu(x)\) is a mean or regression function and \(Z(x)\) is a zero-mean GP with variance \(\sigma^2\). In the applications discussed, the mean is taken to be constant and the correlation is stationary power-exponential,
$$
R(x,x')=\exp\left(-\sum_{j=1}^d \theta_j |x_j-x_j'|^{p_j}\right),
$$
with \(\theta_j \ge 0\) governing sensitivity to the \(j\)-th input and \(1\le p_j\le 2\) governing smoothness in that dimension [1601.05887].

After \(n\) simulator runs, the predictive distribution at a new input is
$$
Y(x)\mid \text{data} \sim N(\hat y(x), s^2(x)).
$$
Under Gaussian assumptions, \(\hat y(x)\) and \(s^2(x)\) are the conditional mean and conditional variance. Even without strict normality, \(\hat y(x)\) is the best linear unbiased predictor and \(s^2(x)\) its associated mean squared prediction error. For deterministic simulators, the emulator interpolates: at any observed design point, \(s(x)=0\) [1601.05887].

The GP contains unknown mean, correlation, and variance parameters, usually estimated by maximum likelihood or Bayesian methods. The paper emphasizes that plug-in estimation makes the predictive distribution only approximately normal and may understate uncertainty if correlation-parameter uncertainty is ignored. This matters operationally because EI is computed from \(\hat y(x)\) and \(s(x)\); if either is poorly estimated, the sequential design can misallocate expensive evaluations. Transformations of the response can therefore be essential. In the volcano example, the output \(z\) is transformed to \(y=\sqrt z\) after cross-validation comparisons with \(z\) and \(\log(z+1)\) [1601.05887].

## 3. Expected improvement as the sequential design principle

The core idea is to define an improvement function \(I(x)\) that quantifies the value of running the simulator at a candidate input \(x\). Because the output at \(x\) is unknown before evaluation, \(I(x)\) is random under the GP predictive distribution. The design criterion is its expectation,
$$
E[I(x)] = \int I(x)\, f(y\mid x)\, dy,
$$
and the next run is chosen at
$$
x_{n+1}=\arg\max_{x\in\chi} E[I(x)].
$$
This is the general EI template [1601.05887].

For optimization, if \(y_n\) is the best observed value so far under minimization,
$$
y_n=\min\{y(x^{(1)}),\dots,y(x^{(n)})\},
$$
the improvement is
$$
I(x)=\max\{y_n-y(x),0\}.
$$
Under the GP predictive model,
$$
E[I(x)] = s(x)\phi(u) + (y_n-\hat y(x))\Phi(u),
$$
with
$$
u=\frac{y_n-\hat y(x)}{s(x)}.
$$
The first term, \(s(x)\phi(u)\), is the exploration term; the second, \((y_n-\hat y(x))\Phi(u)\), is the exploitation term. The method therefore balances uncertain regions against currently promising regions without collapsing to either pure uncertainty sampling or pure surrogate optimization [1601.05887].

This balance is the main reason EI is used for simulation functions rather than simply optimizing \(\hat y(x)\). Near an already sampled optimum, \(s(x)\) is small or zero, so expected improvement can vanish even if the predictive mean is favorable. Conversely, highly uncertain regions are not automatically selected unless they have a plausible chance of improving the current objective.

## 4. Objective-specific EI criteria

For contour estimation or target matching at level \(a\), the improvement function is defined by
$$
I(x)=\epsilon^2(x)-\min\{(y(x)-a)^2,\epsilon^2(x)\},
$$
with
$$
\epsilon(x)=\alpha s(x),
$$
for some positive constant such as \(\alpha=1.96\). Positive improvement occurs only when the output lies within an uncertainty-scaled tolerance band around the target. Under the GP model, the expected improvement is
$$
\begin{aligned}
E[I(x)] &= [\epsilon^2(x)-(\hat y(x)-a)^2]\left(\Phi(u_2)-\Phi(u_1)\right) \\
&\quad + s^2(x)\left[(u_2\phi(u_2)-u_1\phi(u_1))-(\Phi(u_2)-\Phi(u_1))\right] \\
&\quad + 2(\hat y(x)-a)s(x)\left(\phi(u_2)-\phi(u_1)\right),
\end{aligned}
$$
where
$$
u_1=\frac{a-\hat y(x)-\epsilon(x)}{s(x)}, \qquad
u_2=\frac{a-\hat y(x)+\epsilon(x)}{s(x)}.
$$
The first term mainly favors points near the predicted contour; the last term can favor more distant but highly uncertain points; the second term is typically less influential [1601.05887].

The same construction extends to multiple contours by replacing the squared deviation from a single target with the minimum squared deviation from several targets:
$$
I(x)=\epsilon^2(x)-\min\left\{(y(x)-a_1)^2,\ldots,(y(x)-a_k)^2,\epsilon^2(x)\right\}.
$$
Percentile contour estimation uses
$$
I^g(x)=\epsilon^g(x)-\min\{(y(x)-\hat\nu_p)^g,\epsilon^g(x)\},
$$
where \(\hat\nu_p\) is the current estimate of the \(100p\)-th percentile of the simulator output and therefore changes during the sequential procedure [1601.05887].

For constrained optimization, an expensive constraint function \(c(x)\) can be emulated separately, feasibility \(a<c(x)<b\) is represented through its predictive probability, and optimization EI is multiplied by that feasibility probability. For noisy or stochastic simulators, the paper cites a quantile-based objective using
$$
\hat q(x)=\hat y(x)-1.96\,s(x),
$$
with improvement defined relative to the smallest lower-quantile estimate observed so far. Robust design replaces a single deterministic response target with objectives involving \(\mu(x_c)\) or \(\sigma^2(x_c)\) for controllable variables \(x_c\), and multi-fidelity settings use augmented EI to trade off fidelity against evaluation cost [1601.05887].

A plausible implication is that “expected improvement” is not one fixed acquisition function but a family of objective-dependent utilities. What remains invariant is the logic: evaluate next where the predictive distribution implies the greatest expected gain relative to the feature of the simulation function that matters scientifically.

## 5. Sequential workflow and empirical illustrations

The practical workflow begins with an initial space-filling design, typically a maximin Latin hypercube. A heuristic mentioned in the paper is \(n=10d\) initial runs for input dimension \(d\). The simulator is evaluated at these initial points, a GP is fit—possibly after transforming the output—and EI is computed over candidate inputs. The next run is placed at the maximizer of EI, the surrogate is updated, and the process is repeated until the maximum EI becomes “small enough,” although no universal stopping rule is imposed [1601.05887].

The Bay of Fundy example illustrates optimization. The simulator returns average extractable tidal power as a function of turbine location \(x=(x_1,x_2)\), with \(x_1\in[0.75,0.95]\) along the tidal flow and \(x_2\in[0.2,0.8]\) perpendicular to it. Starting from a 20-point maximin Latin hypercube, the best observed value is \(y_{20}=109.7\) MW. The EI surface then selects \(x=(0.785,0.45)\), where the expected improvement is 13.9 MW, but the actual simulator value is 159.7 MW. The sequential design ultimately finds the global maximum on a \(13\times 41\) grid with far fewer than 533 full-grid runs. The example also demonstrates that emulator uncertainty can be underestimated near a sharp peak, so realized improvement may greatly exceed predicted improvement [1601.05887].

The volcano example illustrates contour estimation. Using TITAN2D, the inputs are pyroclastic flow volume and basal friction angle, the output is maximum flow height at a critical location, and the transformed response is \(y=\sqrt z\). With 32 initial simulator runs, the objective is to estimate the contour \(y(x)=1\). The contour EI criterion selects the next point near \((x_1,x_2)=(8.2,11.1)\), a location close to the predicted contour but with relatively large predictive standard error. This embodies the intended behavior of contour EI: refine the scientifically relevant level set where the emulator is informative but still uncertain [1601.05887].

## 6. Assumptions, limitations, and terminological scope

The methodology rests on a small number of consequential assumptions. The simulator is treated primarily as deterministic; the GP uncertainty is therefore epistemic. The standard closed-form EI expressions require the predictive distribution \(Y(x)\mid\text{data}\sim N(\hat y(x),s^2(x))\), but parameter estimation may make this only approximate. Transformations may be needed when GP assumptions are poor, and underestimation of predictive variance can mislead EI, as the tidal-power example shows. The framework is especially valuable in higher dimensions and small-budget settings, but it does not eliminate the need for model checking or careful surrogate specification [1601.05887].

The term “SF” also requires disambiguation. In the arXiv literature, the same acronym denotes optical and mid-infrared ensemble structure functions in AGN variability [2302.12437], scalar shrinkage functions in transform-domain image denoising [2004.10306], atom-centered symmetry functions and polynomial symmetry functions in HDNNPs [2010.14414], and scoring functions in knowledge graph embedding [1904.11682]. Within the computer-experiment context, however, the relevant meaning is the simulation function \(y(x)\): the expensive black-box mapping interrogated by GP emulation and sequential EI design.

This terminological overlap suggests an important editorial caution. “Simulation Functions (SFs)” in design-of-experiments literature refers neither to variability statistics, denoising nonlinearities, atomistic descriptors, nor KGE plausibility maps, even though all of those are established uses of the same acronym. In the present sense, the concept is inseparable from expensive deterministic simulation, surrogate modeling, and adaptive sampling under objective-specific expected improvement.

Source: https://www.emergentmind.com/topics/simulation-functions-sfs