Open In App

Local Vs Global Optimum in Uni-variate Optimization

Last Updated : 11 Feb, 2024
Improve
Improve
Like Article
Like
Save
Share
Report

Univariate optimization refers to a specific case of nonlinear optimization where the problem does not involve any constraints. It focuses on finding the optimal value for a single decision variable.

                                                                                 min f(x) such that x ∈ R

where, f(x) = Objective function to be minimized,

 x = Decision variable 

The constraint x \in         R specifies that the decision variable is a continuous scalar that can take any real value.

In univariate optimization, the problem is typically written in the form min f(x), where f(x) is the objective function to be minimized. The variable x, known as the decision variable, is continuous and can take any value on the real number line. Since this is a univariate optimization problem, x is a scalar variable, not a vector.

What is univariate optimization?

Univariate optimization refers to the optimization of a function of a single variable. In mathematical terms, you have a function f(x) where x is a single variable, and the goal is to find the value of x that either maximizes or minimizes the function.

Local and Global Optimum

An optimum signifies the optimal or extreme value of an objective function, representing the best possible solution.Under certain circumstances, pinpointing the exact optimum value may pose a challenge. In such instances, when the objective function attains a value greater than its neighboring points, it is identified as a local optima.

The global optimum is what is best for the system’s overall performance, whereas the local optimum is what is best for the performance of a single component.

Local Optima 

A local optimum refers to a point within the domain of a function where the function attains the lowest (or highest) value in its local neighborhood. Mathematically, a point x* is said to be a local minimum (maximum) if there exists a neighborhood around x* such that f(x*) \leq         f(x) (or f(x*) \geq         f(x)) for all x within that neighborhood. In other words, a local optimum is a point where the function is lower (or higher) than its neighboring points.

Global Optima 

The global optimum of a function refers to the point within its domain where the function attains the lowest (or highest) value over the entire function. In other words, it is the overall best solution for the optimization problem. a common form for a global maximum is a concave downward quadratic function:f(x)= -a(x-b)^2 + c         , where a > 0 determines the concavity, b is the x-coordinate of the maximum, and c is the maximum value of the function.

Types of Objective Functions 

In optimization, an objective function is a function that represents the quantity to be maximized or minimized. It is the function that measures the performance or quality of a solution. Depending upon the problem we can formulate our objective function in different types. ​

Convex Objective Function

We say a function is convex if, for any two points within its domain, the line segment connecting the two points lies below or on the graph of the function. In other words, a function f(x) is convex if, for any x1 and x2 within its domain and for any value t in the range [0, 1], the following condition holds:

f(tx1 + (1-t)x2) ≤ tf(x1) + (1-t)f(x2)

The convex function has a bowl-shaped graph that has an upward opening also, The slope of the function is increasing or non-decreasing as we move from left to right along the graph.

Non-convex Objective Function

We say a function is a Non-convex function if it does not satisfy the property of convexity. A Non-convex function can have various shapes and curvatures, such as multiple peaks, valleys, or irregular patterns. These functions do not exhibit the property that the line segment connecting any two points on the graph lies below or on the graph itself. 

Local and Global Optimum in Convex and Non-Convex function 

Convex Function 

In a convex or concave function since the graph is bowl-shaped both the local optimum value and global optimum are the same value we can see in the below graph that the graph has only-one valley so we easily find the optimum value. According to the need, we can transform our objective function from convex to concave if we want to find the maximum of the objective function and vice versa if we want to find the minimum of the objective function.

Local And global minimum in convex function

Local(or global) minimum in convex function 

What we have done here is on the x-axis, we have different values for the decision variable x, and on the y-axis, we have the function value. And when you plot this you can quite easily notice in the graph that marked the point at which this function attains its minimum value.

So, there is no question of multiple minima to choose from there is only one minimum here, and that is marked in the graph. So, in this case, we would say that this minimum is both a local minimum and also a global minimum

In fact, we can say it is a local minimum because, in the vicinity of this point, this is the best solution that you can get. And if the solution that we get in the vicinity of this point is also the best solution globally then we also call it the global minimum.

Thus, a point can be both a local and a global minimum if it outperforms its neighbors and stands as the best solution globally.

Non-convex Function

Non-convex optimization poses significant challenges due to the presence of multiple local optima. Various optimization algorithms, such as genetic algorithms, simulated annealing, and particle swarm optimization, are utilized to explore the search space and find good solutions. However, none of these methods guarantee finding the global optimum, and their effectiveness depends on the specific characteristics of the problem at hand.

Now, take a look at the graph below. Here we have a function and again it is a univariate optimization problem. So, on the x-axis, we have different values of the decision variable and on the y-axis, we plot the function. Now, we may notice that there are two points where the function attains a minimum. Accordingly, we can see

  • Local Minimum (x1):* This is a point, denoted as x1*, where the function has a lower value than at any nearby points in its immediate vicinity. In the neighborhood of x1*, the function does not attain a lower value. However, x1* might not be the absolute lowest point for the entire function, as there could be other points with even lower values in different regions.
  • Global Minimum (x2):* This is the absolute lowest point of the entire function, considering all possible values over its entire domain. In our description, x2* is the global minimum because it represents the lowest point for the entire function, surpassing the values at x1* and any other potential local minima.


Local-Vs-Global-Optimum-in-Uni-variate-Optimization

Why this concept is important for Data Science? 

The concept of finding global optima in the context of data science, particularly in training neural networks, is crucial. Here’s a connection between the discussed mathematical optimization concepts and the challenges faced in data science:

  • Optimization Challenges in Neural Networks (90s):
    • Local Minima Issue: Training neural networks in the 90s faced challenges with local minima, where the optimization process often converged to suboptimal solutions, hindering their effectiveness for complex problems.
    • Limited Global Optimality: Neural networks trained to local optima struggled to provide globally optimal solutions, impacting generalization and overall performance.
  • Advancements in Optimization (Recent Years):
    • Improved Techniques: Recent years have seen the development of better optimization algorithms, advanced neural network architectures, and refined training strategies, collectively addressing the historical issue of converging to suboptimal local minima.
    • Aim for Global Optimality: Modern approaches emphasize achieving global optimality in neural network training, employing techniques such as enhanced optimization algorithms and regularization methods to improve performance and applicability.

More on univariate optimization and its implementation can be found here .

Frequently Asked Questions (FAQs)

Q.What is univariate optimization?

Univariate optimization refers to the process of optimizing a function that depends on a single variable. The goal is to find the value of that variable that minimizes or maximizes the function.

Q. What is the difference between local and global optima?

A local optimum is a point where a function has the lowest (or highest) value in its local neighborhood. In contrast, a global optimum is the point where the function has the lowest (or highest) value over its entire domain.

Q.How does the convexity of a function impact optimization?

A convex function has a bowl-shaped graph, and finding the optimum in a convex function is relatively straightforward. The global minimum of a convex function is also its only local minimum.

Q. Why is finding the global optimum important in data science?

In data science, particularly in training neural networks, finding the global optimum is crucial for achieving the best overall performance. Modern optimization techniques and algorithms aim to overcome challenges related to local minima in neural network training.

Q. How does the concept of local and global minima apply to real-world problems?

In real-world problems, finding local minima may lead to suboptimal solutions. To address this, advancements in optimization algorithms and strategies aim to ensure convergence to global minima, improving the overall performance of models in data science applications.



Like Article
Suggest improvement
Previous
Next
Share your thoughts in the comments

Similar Reads