Open AIchberger opened 1 year ago
Hi @lorenzkuhn, I have the same question on semantic entropy computation in the repo as compared to the description in the paper. Can you please give intuition behind the implementation in a different way as proposed in the paper?
Thanks!
Hi @lorenzkuhn,
I have a concern regarding the computation of the semantic entropy as part of the function
get_predictive_entropy_over_concepts:
llh_shift = torch.tensor(5.0)
aggregated_likelihoods = torch.tensor(aggregated_likelihoods) - llh_shift
entropy = - torch.sum(aggregated_likelihoods, dim=0) / torch.tensor(aggregated_likelihoods.shape[0])
In this case,
aggregated_likelihoods
represents the log likelihoods of the semantic sets:log(p(c|x))
, shifted by the constantllh_shift.
The entropy is then computed as the average negative log likelihood across the semantic sets, which does not follow the standard concept of entropy-sum[p(c|x)*log(p(c|x))]
. Could you elaborate on this in more detail?