Temperature of a categorical distribution with given logits and entropy

192 Views Asked by At

Let's consider a probability mass function $p(x)$ over integers $1\leq x\leq n$ and its entropy $h$, parameterized by the logits $l\in\mathbb{R}^n$ and the inverse temperature $\beta\in\mathbb{R}_+,\beta>0$, $$ p(x)=\frac{e^{\beta l_x}}{\sum_{y=1}^n e^{\beta l_y}}, \qquad h=\sum_{x=1}^n p(x)\ln p(x). $$ Given the logits $l$ and the entropy $h$, is it possible to solve for $\beta$ in closed form? If not, why?