HPC Research Project for Global Optimization
The full report can be found here
To compile the program just run make in the root of the repo:
makeOnce the library is built, the executable takes the following 8 argument:
argv[1] = lower_bound
argv[2] = upper_bound
argv[3] = bfgs_maxiter
argv[4] = pso_iters
argv[5] = number of required converged particles
argv[6] = number_of_optimizations
argv[7] = tolerance
argv[8] = seed
For example:
./main -5.12 5.12 10000 10 100 131072 1e-6 12345The program will ask which function to use and how many dimensions. Currently, we only have BFGS activated.
To generate a resource usage report, install R and Quarto then use:
quarto render memory.qmd
-
Require:
- Objective function
$f: \mathbb{R}^n \rightarrow \mathbb{R}$ - Gradient of the function
$\nabla f: \mathbb{R}^n \rightarrow \mathbb{R}^n$ - Initial guess
$x_0$
- Objective function
-
Ensure: Local minimum
$x^*$ of$f$
- Set
$k = 0$ - Choose an initial approximation
$H_0$ to the inverse Hessian - the identity matrix - While not converged:
- Compute the search direction:
$p_k = -H_k \nabla f(x_k)$ - Calculate step size
$\alpha_k$ using Line Search - Update the new point:
$x_{k+1} = x_k + \alpha_k p_k$ - Compute
$\delta x = x_{k+1} - x_k$ - Compute
$\delta g = \nabla f(x_{k+1}) - \nabla f(x_k)$ - Update formula for
$H_{k+1}$ $k = k + 1$
- Compute the search direction:
- Return
$x_k$ as the local minimum
The primary goal of DFP is to update the approximation of the inverse of the Hessian matrix.
The update formula is:
positive rank-1 update:
negative rank-2 update:
The BFGS method is another Quasi-Newton method that approximates the inverse of the Hessian using a combination of rank-1 updates.
The formula is:
which can be expanded:
L-BFGS (Limited-memory Broyden-Fletcher-Goldfarb-Shanno) is an optimization algorithm for unconstrained optimization problems.
It is a member of the quasi-Newton family and is particularly well-suited for high-dimensional machine learning tasks aimed at minimizing a differentiable scalar function
Unlike the full BFGS algorithm, which requires storing a dense
The algorithm starts with an initial estimate
is used to approximate the inverse Hessian and identify the direction of steepest descent.
The L-BFGS update for the inverse Hessian
where
L-BFGS-B is an extension of L-BFGS that can handle bound constraints, i.e., constraints of the form
The Rosenbrock function is a commonly used test problem for optimization algorithms due to its non-convex nature and the difficulty in converging to the global minimum.
10 Dimensional Rosenbrock Summation
We expect to see a difference in the amount of resources used by each algorithm as we increase the number of dimensions. The limited memory variant of BFGS, L-BFGS stores only a few vectors that implicitly represent the approximation of the inverse Hessian matrix. It should be highly suitable for high-dimensional problems.