Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Convexity of log to sum of exponentials

1,284 views
Skip to first unread message

Benjamin Biegel

unread,
Jul 9, 2010, 3:41:38 AM7/9/10
to
My question is:

the function f(x) = log(x) is concave

the function h(z) = log(sum(exp(g_i)) is convex, as long as the functions g_i are convex (the log to a sum of exponentials to convex functions)

How is the last true? The outer function log() is concave and nondecreasing, while the inner function is convex. There is no composition rule for this...

Thansk :)

Benjamin

Rob Johnson

unread,
Jul 9, 2010, 5:51:45 AM7/9/10
to
In article <1757664510.93425.12786...@gallium.mathforum.org>,

Let D be a derivative in any particular direction. Then applying
the chain rule twice, we get

D^2 log(sum(exp(g_i)))

1
= D( ------------- sum(exp(g_i)Dg_i) )
sum(exp(g_i))

1
= - --------------- (sum(exp(g_i) Dg_i))^2
sum(exp(g_i))^2

1
+ ------------- sum(exp(g_i) (Dg_i)^2)
sum(exp(g_i))

1
+ ------------- sum(exp(g_i) D^2 g_i) [1]
sum(exp(g_i))

The third summand in [1] is positive since each g_i is convex, so we
only need to show that the sum of the first two summands is positive.
This is simply Jensen's inequality with the measure

exp(g_i)
m_i = ------------- [2]
sum(exp(g_i))

That is,

1
- --------------- (sum(exp(g_i) Dg_i))^2
sum(exp(g_i))^2

1
+ ------------- sum(exp(g_i) (Dg_i)^2)
sum(exp(g_i))

= - (sum(m_i Dg_i))^2

+ sum(m_i (Dg_i)^2)

>= 0 [3]

Since x^2 is convex.

Rob Johnson <r...@trash.whim.org>
take out the trash before replying
to view any ASCII art, display article in a monospaced font

Dan Cass

unread,
Jul 9, 2010, 12:02:45 PM7/9/10
to

Note that for a single function g_1 we have
.. log( exp(g_1) ) = g_1, so that at least for one
function, the log part just undoes the exp part,
resulting in a convex function if g_1 was supposed convex.

This leads me to believe that after the sum is
taken of exp( g_i ), the taking of log of the sum
has little to do with the fact that log is concave,
but more to do with log being the inverse function to exp.

Dan Cass

unread,
Jul 9, 2010, 12:24:55 PM7/9/10
to

The result holds for two functions.
Call them f and g (for your g_1 and g_2).
Then the second derivative of log( exp(f)+exp(g) )
has a denominator which is the square of a function,
while the numerator contains:
** two terms of the form f '' * positive
** two terms of the form g '' * positive
**three more terms which together factor as
[f' - g']^2 * exp(f) * exp(g).

The assumption that f and g are convex means that
the two second derivatives f '' and g '' are positive,
making the overall second derivative of
log(exp(f)+exp(g)) come out positive, so that the latter
is convex, given that f and g are each convex.

Benjamin Biegel

unread,
Jul 9, 2010, 12:28:16 PM7/9/10
to
Ahh that is a great answer, many thanks for looking into this Dan! :)

Dan Cass

unread,
Jul 10, 2010, 11:42:05 AM7/10/10
to
> > My question is:
> >
> > the function f(x) = log(x) is concave
> >
> > the function h(z) = log(sum(exp(g_i)) is convex,
> as
> > long as the functions g_i are convex (the log to a
> > sum of exponentials to convex functions)
> >
> > How is the last true? The outer function log() is
> > concave and nondecreasing, while the inner
> function
> > is convex. There is no composition rule for
> this...
> >
> > Thansk :)
> >
> > Benjamin
>
The following is a re-post with a typo fixed...
> The general case resembles the two-function case:
> Write w for sum(exp(g_i))
> Then the second derivative of log(w) has denominator
> w^2,
> and the numerator, after some algebra, is
> \sum_k (g_k)'' * exp(u_k) * w
> + \sum_{i<j} [g_i' - g_j']^2 * exp(g_i + g_j).
> Hence if each g_k is convex, so that the (g_k)'' are
> positive, then the second derivative of log(w) is
> positive, making log(w) convex as stated.

Dan Cass

unread,
Jul 10, 2010, 11:40:04 AM7/10/10
to

The general case resembles the two-function case:


Write w for sum(exp(g_i))
Then the second derivative of log(w) has denominator w^2,
and the numerator, after some algebra, is
\sum_k (g_k)'' * exp(u_k) * w
+ \sum_{i<j} [g_i' - g_j']^2 * exp(g_i + g_j).

Hence if each g_k is convex, so that the (g_j)'' are

lucky.t...@gmail.com

unread,
May 27, 2019, 7:51:12 AM5/27/19
to
Hi,
I am not sure about the exp(concave) function. Is it convex? Please see the link below which proves that the function is convex.
0 new messages