Barrier function

In constrained optimization, a field of mathematics, a barrier function is a continuous function whose value on a point increases to infinity as the point approaches the boundary of the feasible region (Nocedal and Wright 1999). It is used as a penalizing term for violations of constraints. The two most common types of barrier functions are inverse barrier functions and logarithmic barrier functions. Resumption of interest in logarithmic barrier functions was motivated by their connection with primal-dual interior point method.

When optimizing a function f(x), the variable x can be constrained to be strictly lower than some constant b by instead optimizing the function f(x) + g(x,b). Here, g(x,b) is the barrier function.

Logarithmic barrier function

For logarithmic barrier functions, g(x,b) is defined as -\log(b-x) when x < b and \infty otherwise (in 1 dimension. See below for a definition in higher dimensions). This essentially relies on the fact that log(t) tends to negative infinity as t tends to 0.

This introduces a gradient to the function being optimized which favors less extreme values of x (in this case values lower than b), while having relatively low impact on the function away from these extremes.

Logarithmic barrier functions may be favored over less computationally expensive inverse barrier functions depending on the function being optimized.

Higher dimensions

Extending to higher dimensions is simple, provided each dimension is independent. For each variable x_i which should be limited to be strictly lower than b_i, add -\log(b_i-x_i).

Formal definition

minimize : \bold c^Tx

subject to: \bold a_i^T x \le b_i, i = 1,\ldots,m

assume strictly feasible: \{\bold x|A x < b\}\ne\emptyset

define logarithmic barrier \Phi(x) = \begin{cases}

\sum_{i=1}^m -\log(b_i - a_i^Tx) & \text{for } Ax<b \\
+\infty & \text{otherwise}
\end{cases}

References

Wikimedia Commons has media related to Newton Method.