TL;DR
This paper introduces Deep Weighted Averaging Classifiers (DWACs), a novel approach to deep learning that enhances interpretability and robustness by predicting labels based on a weighted average of training instances in a learned embedding space. DWACs offer transparent explanations for predictions and provide a more reliable measure of confidence, especially for out-of-domain data, without sacrificing accuracy.
What Problem Does This Paper Address?
Deep learning models have achieved remarkable success in various domains, but they often suffer from a lack of interpretability, poor calibration, and brittleness to adversarial examples or out-of-distribution data. This makes it difficult to understand why a model makes a certain prediction and to trust its outputs, especially in critical applications. Existing methods for interpretability often provide approximations or require inherently simpler models. The authors aim to bridge this gap by proposing a deep learning architecture that is both accurate and inherently interpretable, offering a clear rationale for its predictions.
Methods
The core of the DWAC approach is to replace the traditional softmax output layer of a deep neural network with a weighted averaging mechanism. Instead of directly outputting probabilities, the model learns an embedding for each input instance. Predictions are then made by taking a weighted sum of the labels of the training instances, where the weights are determined by the distance between the test instance's embedding and the training instances' embeddings in this learned space. This is inspired by nonparametric kernel regression (specifically, Nadaraya-Watson estimation).
Key aspects of the method include:
- Learned Embedding Space: A standard deep learning architecture (e.g., CNNs for images, RNNs for text) is used to learn a low-dimensional representation (embedding) of the input data.
- Weighted Averaging: Predictions are made by averaging the labels of training instances, weighted by their similarity (inverse distance) in the learned embedding space.
- Conformal Methods Integration: The framework is integrated with conformal prediction methods to provide theoretical guarantees on error rates and to develop a novel measure of "credibility."
- Novel Nonconformity Measure: The authors propose a new measure of nonconformity based on the weighted sum of training labels, which is shown to be more effective for detecting out-of-domain data than traditional probability-based measures.
Datasets
The authors evaluate their DWAC models on a diverse set of datasets spanning tabular, image, and text domains:
- Tabular: Adult Income, Covertype, Lending Club
- Image: Fashion MNIST, CIFAR-10
- Text: Subjectivity, Stack Overflow, IMDB, Amazon (product reviews)
For out-of-domain testing, they also use the original MNIST digits dataset against models trained on Fashion MNIST, and TinyImages against CIFAR-10.
Key Insights and Ideas
- Interpretability via Exemplars: The weighted averaging approach naturally provides explanations in terms of "closest" training examples, offering a human-understandable rationale for predictions.
- Credibility as a Robustness Signal: The proposed credibility measure, derived from conformal methods and the DWAC's weighted sum, is significantly better at identifying out-of-domain data compared to standard softmax probabilities. This is because it reflects how "unusual" an instance is relative to the training data distribution.
- Flexibility in Embedding Dimensionality: DWACs allow for tuning the dimensionality of the learned embedding space, enabling a trade-off between model complexity/interpretability and performance.
- No Accuracy Compromise: The DWAC approach achieves accuracy comparable to standard softmax models of equivalent size, demonstrating that enhanced interpretability doesn't necessitate a performance hit.
Key Results
- Accuracy: DWAC models achieved accuracy indistinguishable from equivalent-sized softmax models on most datasets.
- Calibration: Calibration (measured by Mean Absolute Error) was comparable, with DWAC sometimes slightly better or worse, but generally well-calibrated.
- Interpretability: The model provides explicit explanations by showing the most influential training instances and their weights. Figure 3 and Table 3 illustrate these explanations for image and text data, respectively.
- Robustness to Out-of-Domain Data: DWAC models, particularly with the proposed credibility measure, showed a much stronger ability to assign low credibility to out-of-domain samples compared to softmax models (Figures 5, 7, and 8). This is a significant advantage for real-world deployment.
- Approximate Explanations: Using only the top-k nearest neighbors for prediction yielded high agreement with the full model's prediction, suggesting that approximate explanations are feasible and efficient.
Limitations and Future Work
- Computational Cost: While test-time inference can be efficient by pre-computing embeddings, training DWACs can be more computationally intensive than standard softmax models due to the need to compute pairwise distances within minibatches.
- User Studies Needed: The authors acknowledge that empirical work, particularly user studies, is required to fully evaluate the effectiveness of the explanations provided by DWACs.
- Future Directions: The authors suggest extending the DWAC framework to regression and multi-label problems, and further exploring class-conditional guarantees for conformal prediction. They also note the potential for building on existing interpretability techniques by choosing appropriate base models for the embedding function.
Summary updated