Edge Rewrite
// HTMLRewriter · presentation

This page was redesigned at the edge.

Cloudflare fetched the original article and streamed it through HTMLRewriter to apply an entirely new visual system without rebuilding the source page.

// request.cf · coarse context

A page that knows where it met you.

Only coarse request metadata is shown. This demo does not display or persist visitor IP addresses.

Country
US
Cloudflare location
CMH
Connection
HTTP/2
Language
Not provided

Ray ID: a400587a2a89ee28

Jump to content

// Workers AI · dad joke modeWhat did the Griewank function say? "I'm griev-ously complicated".

From Wikipedia, the free encyclopedia
2D Plot of the one dimensional Griewank function

In mathematics, the Griewank test function is a smooth multidimensional mathematical function used in unconstrained optimization. It is commonly employed to evaluate the performance of global optimization algorithms. The function is defined as[1]

where and . The non-linear and non-convex function is characterized by its unique multimodal structure, featuring multiple local minima and maxima around its single global minimum at , where the function has minimal value . The number of stationary points increases as the dimensionality grows.

3D plot of the two dimensional Griewank function

For instance, the one-dimensional Griewank function has 6365 critical points in the interval , where the first derivative vanishes. These points satisfy the equation

.
Contour plot of the two dimensional Griewank function

The multimodal structure of the Griewank function presents a challenge for many deterministic optimization algorithms, which may become trapped in one of the numerous local minima. This is particularly problematic for gradient-based methods. The Griewank function is commonly used to benchmark global optimization algorithms, such as genetic algorithms or particle swarm optimization. In addition to the original version, there are several variants of the Griewank function specifically designed to test algorithms in high-dimensional optimization scenarios.[2]

Non-smooth variant

[edit]

A non-smooth version of the Griewank function has been developed to emulate the characteristics of objective functions frequently encountered in optimization problems from machine learning.[3] These functions often exhibit piecewise smooth or non-smooth behavior due to the presence of regularization terms, activation functions, or constraints in learning models.

A non-smooth variant of the Griewank function is the following:

By incorporating non-smooth elements, such as absolute values in the cosine and sine terms, this function mimics the irregularities present in many ML loss landscapes. It offers a robust benchmark for evaluating optimization algorithms, especially those designed to handle the challenges of non-convex, non-smooth, or high-dimensional problems, including sub-gradient, hybrid, and evolutionary methods.

The function's resemblance to practical ML objective functions makes it particularly valuable for testing the robustness and efficiency of algorithms in tasks such as hyperparameter tuning, neural network training, and constrained optimization.

References

[edit]
  1. Griewank, A. O. (1981). "Generalized descent for global optimization". Journal of Optimization Theory and Applications. 34 (1): 11–39. doi:10.1007/BF00933356.
  2. Locatelli, M. (2003). "A note on the Griewank test function". Journal of Global Optimization. 25 (2): 169–174. doi:10.1023/A:1021956306041.
  3. Bosse, Torsten F.; Bücker, H. Martin (2026). "A piecewise smooth version of the Griewank function". Optimization Methods and Software. 41 (2): 347–357. doi:10.1080/10556788.2024.2414186.