Griewank function
![]() | This article has multiple issues. Please help improve it or discuss these issues on the talk page. (Learn how and when to remove these messages)
|

In mathematics, the Griewank function is often used in testing of optimization. It is defined as follows:[1]
The following paragraphs display the special cases of first, second and third order Griewank function, and their plots.
First-order Griewank function
The first order Griewank function has multiple maxima and minima.[2]
Let the derivative of Griewank function be zero:
Find its roots in the interval [−100..100] by means of numerical method,
In the interval [−10000,10000], the Griewank function has 6365 critical points.
Second-order Griewank function


Third-order Griewank function

Non-Smooth Variant of the Griewank Function
A non-smooth version of the Griewank function[3] has been developed to emulate the characteristics of objective functions frequently encountered in machine learning (ML) optimization problems. These functions often exhibit piecewise smooth or non-smooth behavior due to the presence of regularization terms, activation functions, or constraints in learning models.
The non-smooth variant of the Griewank function is defined as:
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
- ^ Griewank, A. O. "Generalized Descent for Global Optimization." J. Opt. Th. Appl. 34, 11–39, 1981
- ^ Locatelli, M. "A Note on the Griewank Test Function." J. Global Opt. 25, 169–174, 2003
- ^ Bosse, Torsten F.; Bücker, H. Martin (2024-10-29). "A piecewise smooth version of the Griewank function". Optimization Methods and Software: 1–11. doi:10.1080/10556788.2024.2414186. ISSN 1055-6788.