第12章最適化アルゴリズム
12.2.2. Properties12.2.2 性質
Convex functions have many useful properties. We describe a few commonly-used ones below.
英語のヒント
凸関数には役に立つ性質がたくさんある。以下では、よく使われるものをいくつか説明する。
12.2.2.1. Local Minima Are Global Minima12.2.2.1 局所的な最小値は大域的な最小値である
First and foremost, the local minima of convex functions are also the global minima. We can prove it by contradiction as follows.
英語のヒント
何よりもまず、凸関数の局所的な最小値は大域的な最小値でもある。これは次のように背理法で証明できる。
Consider a convex function defined on a convex set . Suppose that is a local minimum: there exists a small positive value so that for that satisfies we have .
英語のヒント
凸集合上で定義された凸関数を考える。が局所的な最小値であるとする。つまり、小さな正の値があって、を満たすについてが成り立つ。
Assume that the local minimum is not the global minimum of : there exists for which . There also exists such as so that .
英語のヒント
局所的な最小値がの大域的な最小値ではないと仮定する。つまり、となるがある。また、となるような、たとえばもある。
However, according to the definition of convex functions, we have
英語のヒント
しかし、凸関数の定義により、次が成り立つ。
(12.2.5)
which contradicts with our statement that is a local minimum. Therefore, there does not exist for which . The local minimum is also the global minimum.
英語のヒント
これは、が局所的な最小値であるという主張と矛盾する。したがって、となるは存在しない。局所的な最小値は大域的な最小値でもある。
For instance, the convex function has a local minimum at , which is also the global minimum.
英語のヒント
たとえば、凸関数はで局所的な最小値をとり、それは大域的な最小値でもある。
f = lambda x: (x - 1) ** 2
d2l.set_figsize()
d2l.plot([x, segment], [f(x), f(segment)], 'x', 'f(x)')The fact that the local minima for convex functions are also the global minima is very convenient. It means that if we minimize functions we cannot “get stuck”. Note, though, that this does not mean that there cannot be more than one global minimum or that there might even exist one. For instance, the function attains its minimum value over the interval . Conversely, the function does not attain a minimum value on : for it asymptotes to , but there is no for which .
英語のヒント
凸関数の局所的な最小値が大域的な最小値でもあるという事実は、とても都合がよい。それは、関数を最小化するときに「はまり込む」ことがありえないという意味である。しかし、これは、大域的な最小値が一つしかありえないという意味でも、そもそも大域的な最小値が存在するという意味でもないことに注意してほしい。たとえば、関数は区間全体で最小値をとる。逆に、関数は上で最小値をとらない。のときに漸近するが、となるはない。
12.2.2.2. Below Sets of Convex Functions Are Convex12.2.2.2 凸関数の下位集合は凸である
We can conveniently define convex sets via below sets of convex functions. Concretely, given a convex function defined on a convex set , any below set
英語のヒント
凸関数の下位集合を使うと、凸集合を手軽に定義できる。具体的には、凸集合上で定義された凸関数が与えられたとき、次の下位集合を考える。
(12.2.6)
is convex.
英語のヒント
このような下位集合は、どれも凸である。
Let’s prove this quickly. Recall that for any we need to show that as long as . Since and , by the definition of convexity we have
英語のヒント
これを手早く証明しよう。どのについても、である限りとなることを示せばよいことを思い出そう。かつなので、凸性の定義により次が成り立つ。
(12.2.7)
12.2.2.3. Convexity and Second Derivatives12.2.2.3 凸性と2階導関数
Whenever the second derivative of a function exists it is very easy to check whether is convex. All we need to do is check whether the Hessian of is positive semidefinite: , i.e., denoting the Hessian matrix by , for all . For instance, the function is convex since , i.e., its Hessian is an identity matrix.
英語のヒント
関数の2階導関数が存在するときはいつでも、が凸かどうかを確かめるのはとても簡単である。のヘッセ行列が半正定値かどうか、つまりかどうかを確かめればよい。これは、ヘッセ行列をで表すと、すべてのについてとなることである。たとえば、関数は凸である。、つまりそのヘッセ行列が単位行列だからである。
Formally, a twice-differentiable one-dimensional function is convex if and only if its second derivative . For any twice-differentiable multidimensional function , it is convex if and only if its Hessian .
英語のヒント
形式的には、2回微分可能な1次元の関数が凸であるのは、その2階導関数がとなるとき、かつそのときに限る。2回微分可能な任意の多次元の関数が凸であるのは、そのヘッセ行列がとなるとき、かつそのときに限る。
First, we need to prove the one-dimensional case. To see that convexity of implies we use the fact that
英語のヒント
まず、1次元の場合を証明する必要がある。の凸性からが導かれることを見るには、次の事実を使う。
(12.2.8)
Since the second derivative is given by the limit over finite differences it follows that
英語のヒント
2階導関数は有限差分の極限で与えられるので、次が導かれる。
(12.2.9)
To see that implies that is convex we use the fact that implies that is a monotonically nondecreasing function. Let be three points in , where and . According to the mean value theorem, there exist and such that
英語のヒント
からが凸であることが導かれるのを見るには、ならが単調非減少の関数であるという事実を使う。の三つの点をとし、かつとする。平均値の定理により、次を満たすとが存在する。
(12.2.10)
By monotonicity , hence
英語のヒント
単調性によりなので、次が成り立つ。
(12.2.11)
Since , we have
英語のヒント
なので、次が成り立つ。
(12.2.12)
thus proving convexity.
英語のヒント
こうして凸性が証明された。
Second, we need a lemma before proving the multidimensional case: is convex if and only if for all
英語のヒント
第二に、多次元の場合を証明する前に、補題が一つ要る。が凸であるのは、すべてのについて、
(12.2.13)
is convex.
英語のヒント
が凸であるとき、かつそのときに限る。
To prove that convexity of implies that is convex, we can show that for all (thus )
英語のヒント
の凸性からが凸であることが導かれるのを証明するには、すべてのについて(したがって)次が成り立つことを示せばよい。
(12.2.14)
To prove the converse, we can show that for all
英語のヒント
逆を証明するには、すべてのについて次が成り立つことを示せばよい。
(12.2.15)
Finally, using the lemma above and the result of the one-dimensional case, the multidimensional case can be proven as follows. A multidimensional function is convex if and only if for all , where , is convex. According to the one-dimensional case, this holds if and only if () for all , which is equivalent to per the definition of positive semidefinite matrices.
英語のヒント
最後に、上の補題と1次元の場合の結果を使うと、多次元の場合は次のように証明できる。多次元の関数が凸であるのは、すべてのについて、としたが凸であるとき、かつそのときに限る。1次元の場合により、これが成り立つのは、すべてのについて()となるとき、かつそのときに限る。これは、半正定値行列の定義によりと同値である。