Overview
This paper introduces a superior method for training Prior Networks—models designed to efficiently mimic the uncertainty estimates of an ensemble using only a single network. By switching the training objective from forward to reverse KL-divergence, the authors enable these networks to scale to complex datasets with many classes. Furthermore, this approach provides a powerful new defense against adversarial attacks by forcing the model to explicitly signal uncertainty when it encounters tampered inputs.
The Problem: Overconfidence and Scaling Limits
Deep learning models are notoriously overconfident, often assigning high probabilities to incorrect predictions or when evaluating out-of-distribution (OOD) data they have never seen before. While "ensembles" (running multiple models and averaging their predictions) provide much better uncertainty estimates, they are computationally expensive to train and deploy.
Prior Networks (PNs) were designed to solve this efficiency problem. They use a single network to predict the parameters of a distribution—specifically a Dirichlet distribution—over possible output probabilities. However, the original training method for PNs relied on "forward" KL-divergence. This introduced a major flaw: in regions where classes overlap (known as data uncertainty), the forward KL objective forced the model to become "confused," degrading its overall classification accuracy. To compensate, previous researchers had to rely on "auxiliary losses" (like standard cross-entropy) as a crutch. This workaround made the models difficult to scale to datasets with many classes, such as CIFAR-100.
Proposed Method: Reverse KL-Divergence
The authors propose a fundamental shift in the mathematical objective function used to train Prior Networks:
- Reverse KL-Divergence (RKL): Unlike the forward version, which tries to cover all possible "modes" of a target distribution (often leading to blurred, low-precision results), RKL is "mode-seeking." The authors prove mathematically that RKL induces a geometric mixture of distributions. This crucial property allows the model to maintain high precision and accuracy even when training data is noisy or overlapping, completely eliminating the need for auxiliary losses.
- Generalized Adversarial Training: Leveraging the precision of RKL, the authors treat adversarial attacks as a special type of OOD data. During training, they expose the model to adversarial examples and optimize it to output a flat, high-entropy distribution for these inputs. This forces the model to signal high "knowledge uncertainty" when it detects an attack, rather than making a confident but incorrect prediction.
Key Insights: Decomposing Uncertainty
A major advantage of the RKL-trained Prior Network is its ability to successfully separate different types of uncertainty.
- Data Uncertainty vs. Knowledge Uncertainty: The model can distinguish between an image that inherently looks like two different classes (Data Uncertainty, e.g., a blurry image of a cat/dog) and an image of a completely unknown class (Knowledge Uncertainty, e.g., a truck presented to a model trained only on pets).
- The "Arithmetic vs. Geometric" Difference: Forward KL creates an arithmetic mixture of targets, resulting in a multi-modal distribution that a single Dirichlet distribution cannot represent well. Reverse KL creates a geometric mixture, resulting in a single, well-behaved Dirichlet distribution that perfectly captures the "average" of the overlapping classes.
- Raising the Bar for Attackers: To fool a standard neural network, an attacker simply needs to perturb the input enough to flip the predicted label. To fool a Prior Network, an attacker faces a "double constraint": they must flip the label and keep the model's uncertainty measures low. This makes crafting successful "adaptive" whitebox attacks significantly more computationally expensive.
Experimental Setup and Datasets
The researchers evaluated their approach across several standard image recognition benchmarks to test both scaling and OOD detection:
- MNIST & SVHN: Used for simple and medium-complexity digit recognition.
- CIFAR-10 & CIFAR-100: Standard object recognition datasets, specifically used to test the model's ability to scale to many classes.
- TinyImageNet: A more complex dataset featuring 200 distinct classes.
- OOD Pairs: The authors tested how well a model trained on CIFAR-10 could detect "unseen" data from SVHN, LSUN, and TinyImageNet.
Key Results
- Scaling Success: Prior Networks trained with RKL (PN-RKL) achieved classification errors nearly identical to standard Deep Neural Networks (DNNs) and Ensembles, even on complex datasets like CIFAR-100 and TinyImageNet where previous Prior Networks had failed.
- Superior OOD Detection: On CIFAR-10, PN-RKL achieved an AUROC of 98.2% for detecting SVHN images, significantly outperforming Deep Ensembles (89.5%).
- Adversarial Robustness: In whitebox attack scenarios, the "Joint Success Rate" (the attacker's ability to both change the label and evade uncertainty detection) was drastically lower for PN-RKL. On CIFAR-10, even after 1,000 iterations of an adaptive attack, the attacker's success rate remained around 25%. In contrast, standard models are typically compromised in fewer than 100 iterations.
Limitations and Future Work
The authors note that while PN-RKL is highly robust, it is currently most effective against strong $L_\infty$ attacks (attacks that can change any pixel up to a specific maximum limit). They suggest that future research should investigate how well these networks hold up against other types of adversarial perturbations, such as $L_2$ (Carlini & Wagner) or $L_1$ (EAD) attacks. Additionally, the overall performance of the model remains somewhat dependent on the quality and selection of the "OOD training data" used during the training phase.
Summary updated