DEUPRepresentation

class probly.method.deup.DEUPRepresentation(*args, **kwargs)[source]

Bases: Representation, Protocol, Generic

Representation of a DEUP model output.

Holds the two quantities needed for uncertainty quantification: softmax probabilities of the base classifier and a scalar predicted cross-entropy error score from the DEUP error head.

Following the paper’s classification setup ([LJN+23], Sec. 4.3.1), the aleatoric component is taken to be zero – estimating \(H[P(Y|x)]\) of the ground-truth conditional would require label replicates which are unavailable for standard image classification. Total and epistemic uncertainty therefore both coincide with the predicted error score.

property error_score: T

Predicted per-sample expected cross-entropy, shape (batch,).

property softmax: CategoricalDistribution

Softmax probabilities of the base classifier, shape (batch, num_classes).