paper-with-me

홈 › Papers

A Flexible Nadaraya-Watson Head Can Offer Explainable and Calibrated Classification

2022-12-07 · Alan Q. Wang, Mert R. Sabuncu

In this paper, we empirically analyze a simple, non-learnable, and nonparametric Nadaraya-Watson (NW) prediction head that can be used with any neural network architecture. In the NW head, the prediction is a weighted average of labels from a support set. The weights are computed from distances between the query feature and support features. This is in contrast to the dominant approach of using a learnable classification head (e.g., a fully-connected layer) on the features, which can be challenging to interpret and can yield poorly calibrated predictions. Our empirical results on an array of computer vision tasks demonstrate that the NW head can yield better calibration with comparable accuracy compared to its parametric counterpart, particularly in data-limited settings. To further increase inference-time efficiency, we propose a simple approach that involves a clustering step run on the training set to create a relatively small distilled support set. Furthermore, we explore two means of interpretability/explainability that fall naturally from the NW head. The first is the label weights, and the second is our novel concept of the ``support influence function,'' which is an easy-to-compute metric that quantifies the influence of a support element on the prediction for a given query. As we demonstrate in our experiments, the influence function can allow the user to debug a trained model. We believe that the NW head is a flexible, interpretable, and highly useful building block that can be used in a range of applications.

📄 PDF Abstract BibTeX arXiv:2212.03411

Code (1)

alanqrwang/nwhead 공식 구현 pytorch

Similar Papers 제목 키워드 기반

Heterogeneous Treatment Effect with Trained Kernels of the Nadaraya-Watson Regression

2022-07-19 · Andrei V. Konstantinov, Stanislav R. Kirpichenko, Lev V. Utkin

A new method for estimating the conditional average treatment effect is proposed in the paper. It is called TNW-CATE (the Trainable Nadaraya-Watson regression for CATE) and based on the assumption that the number of cont…

regressionTransfer Learning

Learning Invariant Representations with a Nonparametric Nadaraya-Watson Head

2023-09-23 · NeurIPS 2023 11 · Alan Q. Wang, Minh Nguyen, Mert R. Sabuncu

Machine learning models will often fail when deployed in an environment with a data distribution that is different than the training distribution. When multiple environments are available during training, many methods ex…

Domain Generalization

Understanding the Mixture-of-Experts with Nadaraya-Watson Kernel

2025-09-30 · Chuanyang Zheng, Jiankai Sun, Yihang Gao, Enze Xie 외 arxiv

Mixture-of-Experts (MoE) has become a cornerstone in recent state-of-the-art large language models (LLMs). Traditionally, MoE relies on $\mathrm{Softmax}$ as the router score function to aggregate expert output, a design…

Iterative Nadaraya-Watson Distribution Transfer for Colour Grading

2020-06-15 · Hana Alghamdi, Rozenn Dahyot

We propose a new method with Nadaraya-Watson that maps one N-dimensional distribution to another taking into account available information about correspondences. We extend the 2D/3D problem to higher dimensions by encodi…

Multi-Head Attention as Ensemble Nadaraya-Watson Estimation: Variance Reduction, Decorrelation, and Optimal Head Diversity

2026-05-18 · Ernest Fokoué arxiv

We develop a rigorous statistical theory of multi-head attention (MHA) as an ensemble of Nadaraya-Watson (NW) kernel regression estimators. Building on the algebraic identity between single-head softmax attention and the…

Ensemble Learning