What loss function to use when labels are probabilities?
Actually, the cross-entropy loss function would be appropriate here, since it measures the &quot;distance&quot; between a distribution $q$ and the &quot;true&quot; distribution $p$.
You are right, though, that using a loss function called &quot;cross_entropy&quot; in many APIs would be a mistake. This is because these functions, as you said, assume a one-hot label. You would need to use the general cross-entropy function,
$$H(p,q)=-\sum_{x\in X} p(x) \log q(x).$$
$ $
Note that one-hot labels would mean that
$$
p(x) = 
\begin{cases}
1 &amp; \text{if }x \text{ is the true label}\\
0 &amp; \text{otherwise} 
\end{cases}$$
which causes the cross-entropy $H(p,q)$ to reduce to the form you're familiar with:
$$H(p,q) = -\log q(x_{label})$$