\subsection{Convexity}
\label{sec:convexity}
The sections above illustrated how a method for bound constraints can be used with first derivatives of a Gaussian process $f$ to enforce 
\REVISION{$\partial f/ \partial{x_{i}} \ge 0$} and thereby monotonicity for the GP $f$, either globally as in Section \ref{sec:splines_monotonic} or at a finite set of virtual points as in Sections \ref{constrained_likelihood_with_derivative_information} and \ref{daveiga_monotonic}. Similar nonnegativity constraints can be applied to higher derivatives of $f$ as well. In one dimension, this can be used to enforce convexity via the constraint
\begin{equation}\label{eq:one_dimension_convexity}
\frac{\partial^2 f}{\partial x^2} \ge 0,
\end{equation}
treating the left-hand side as a GP with covariance kernel 
\begin{equation}
\frac{\partial^4 k}{\partial x^2 \partial {x'}^2}(x,x').
\end{equation}

Although monotonicity can be enforced in arbitrary dimensions, convexity presents a challenge in dimensions greater than one, since it cannot be expressed as a simple linear inequality involving the derivatives of $f$ as in \eqref{eq:one_dimension_convexity}.
As \citet{daveiga} point out, enforcing convexity in higher dimensions requires that \eqref{eq:one_dimension_convexity} be replaced by the condition that the Hessian of $f$ be positive semidefinite. Sylvester's criterion yields the equivalent condition that each leading principal minor determinant of the Hessian be positive. Such inequality constraints involve \emph{polynomials} in partial derivatives of $f$. As polynomial functions of GPs are no longer GPs, the bound constraint methods in Section \ref{sec:bound_constraints} no longer apply. 

While higher dimensional convexity constraints are outside the scope of this survey, several references we have mentioned discuss the implementation of convexity constrained Gaussian processes in greater detail. 
\citet{daveiga} discuss how convexity in one dimension of the form \eqref{eq:one_dimension_convexity} can be enforced at virtual points

using the (partially) truncated multinormal, in a way analogous to Section \ref{daveiga_monotonic},
while convexity in two dimensions can be enforced using the elliptically truncated multinormal distribution.


\citet{maatouk} and \citet{lopez2018} point out that for the spline basis considered in Section \ref{sec:splines}, convexity in one dimension amounts to requiring that the successive differences of the values at the spline knots are increasing in magnitude, i.e. 
\begin{equation}
\xi_{k+1}-\xi_{k} \geq \xi_{k}-\xi_{k-1} \text{ for all } k.
\end{equation}
This is equivalent to requiring that the second-order finite differences be positive. This can also easily be applied in higher dimensions to guarantee that the second partial derivatives are positive globally, although this does not imply convexity.
{"config": "arxiv", "file": "2006.09319/convexity.tex"}