Introduction
Deep learning models are notoriously overconfident, often making high-certainty predictions even when they are incorrect or encountering data far outside their training distribution. While ensembles of multiple models provide reliable uncertainty estimates, their computational cost is prohibitive for many real-world applications. Prior Networks (PNs) were introduced to address this by using a single neural network to parameterize a Dirichlet distribution over the output, effectively emulating an ensemble's behavior. However, original training methods based on forward KL-divergence struggled to scale to complex datasets like CIFAR-100.
The Scaling Problem with Forward KL
The primary hurdle for Prior Networks has been the training objective. Forward KL-divergence is "zero-avoiding," meaning it attempts to cover all possible target distributions. When a model encounters overlapping data during training, this objective leads to multi-modal distributions that collapse the model's confidence across the board. To compensate, researchers often had to rely on auxiliary losses and "hacks" to maintain classification accuracy, which limited the architecture's scalability.
A New Objective: Reverse KL-Divergence
This paper proposes a fundamental shift: training Prior Networks using Reverse KL-Divergence (RKL). Mathematically, RKL induces a "geometric mixture" of distributions, ensuring the target remains a single, well-behaved Dirichlet distribution. This approach naturally interpolates between high-confidence and high-uncertainty states without requiring extra loss functions.
One key insight is that RKL is equivalent to standard cross-entropy plus a "precision" term. This term explicitly drives the model to be as confident as possible on clean data while maintaining the flexibility to flag anomalous data.
Uncertainty Decomposition
A major advantage of Prior Networks is their ability to separate different types of uncertainty. By parameterizing the Dirichlet distribution, the model can distinguish between Data Uncertainty (noise or ambiguity inherent in the input) and Knowledge Uncertainty (the model's lack of familiarity with the data type).
As shown in the figure above, RKL training allows the model to cleanly map these states: a sharp peak at a vertex for confident predictions, a central peak for ambiguous data, and a flat, broad distribution for out-of-distribution (OOD) samples.
Adversarial Robustness as OOD Detection
The authors extend this framework to adversarial defense through Generalized Adversarial Training. Instead of forcing the model to predict the correct label for a perturbed image, they train the Prior Network to output high knowledge uncertainty (a flat distribution) when it encounters an adversarial attack. This effectively treats adversarial examples as OOD events.
By training on simple, computationally cheap adversarial examples like FGSM, the model learns a robust boundary for "natural" data. This approach generalizes surprisingly well to sophisticated, iterative whitebox attacks.
Key Results
- Scalability: PN-RKL matches the classification accuracy of standard DNNs and ensembles on complex tasks like CIFAR-100 and TinyImageNet, overcoming the limitations of previous PN training methods.
- Superior OOD Detection: On CIFAR-10, the PN-RKL achieved an AUROC of 98.2% for detecting SVHN images, significantly outperforming standard ensembles (89.5%).
- Adversarial Robustness: Against adaptive whitebox attacks, where the attacker knows the defense mechanism, PN-RKL proved remarkably resilient. It required over 1,000 iterations of gradient descent for an attacker to begin bypassing the detection, whereas standard models were compromised almost instantly.
Conclusion
By switching to Reverse KL-Divergence, Prior Networks become a viable, scalable solution for uncertainty estimation in deep learning. This method provides a unified framework for high-accuracy classification, reliable OOD detection, and a powerful new defense against adversarial attacks, all within a single, efficient neural network pass.
Summary updated