Is negative sum of logarithms of softmax functions convex? I am trying to prove that
$$f(\mathbf{x}) = -\frac{1}{n}\sum_{i=1}^{n}\ln\left(\frac{e^{x_i}}{\sum_{j=i}^{n}e^{x_{j}}}\right) \quad \forall\;\mathbf{x} \in \mathbb{R}^{n}$$
is convex. I have already tried to show it via the definition of convex function, via monotonicity of the gradient and via Hessian matrix. None of the above methods allowed me to show that the function is convex. Is it really non-convex or I am missing something?

We have
$$
f(x) = \frac1n \sum_{i = 1}^n \ln\left( \sum_{j=i}^n e^{x_j - x_i} \right),$$
(why?). Can you finish from here?
