Gumbel-Softmax Selective Networks

Mahmoud Salem, Mohamed Osama Ahmed, Frederick Tung, Gabriel L. OliveiraarXiv 2022

Abstract

ML models often operate within the context of a larger system that can adapt its response when the ML model is uncertain, such as falling back on safe defaults or a human in the loop. This commonly encountered operational context calls for principled techniques for training ML models with the option to abstain from predicting when uncertain. Selective neural networks are trained with an integrated option to abstain, allowing them to learn to recognize and optimize for the subset of the data distribution for which confident predictions can be made. However, optimizing selective networks is challenging due to the non-differentiability of the binary selection function (the discrete decision of whether to predict or abstain). This paper presents a general method for training selective networks that leverages the Gumbel-softmax reparameterization trick to enable selection within an end-to-end differentiable training framework. Experiments on public datasets demonstrate the potential of Gumbel-softmax selective networks for selective regression and classification.

Introduction

In high-stakes environments such as medical diagnosis or autonomous driving, an incorrect prediction can have severe consequences. Selective networks mitigate this risk by incorporating a "selection" gate alongside the standard prediction output. This gate allows the model to abstain from predicting on samples where uncertainty is high, enabling the system to fall back on human experts or safe defaults.

The primary technical hurdle in training these networks is the non-differentiability of the binary selection function. Standard backpropagation cannot pass gradients through a discrete "yes/no" decision. While previous state-of-the-art methods like SelectiveNet utilized "soft" selection (values between 0 and 1) during training, this approach introduces a training-inference gap: the model learns to weight samples continuously during training but must make a hard binary choice during deployment.

Methods: Gumbel-Softmax Selective Networks

To bridge the training-inference gap, the authors propose leveraging the Gumbel-softmax reparameterization trick. This method treats the selection gate as a stochastic process, sampling from a Bernoulli distribution.

Architecture of the Gumbel-Softmax Selective Network showing forward and backward passes.

As illustrated in the architecture diagram above, the framework enables "hard" selection in the forward pass while maintaining a "soft," differentiable approximation in the backward pass. A critical component of this framework is temperature annealing ($\tau$). Early in training, a high temperature makes the selection "soft" and exploratory. As training progresses, $ au$ is gradually reduced, making the selection increasingly discrete. This allows the network to "practice" making binary decisions during training while remaining fully end-to-end differentiable.

Experimental Results

The researchers evaluated Gumbel-softmax selective networks across both regression and classification tasks using four public datasets: Concrete Compressive Strength, California Housing, Ames Housing, and ImageNet-100.

Selective Regression

The proposed method demonstrated significant improvements over the SelectiveNet baseline across all three regression datasets. By forcing the model to handle binary selection during training, it develops a more robust abstention policy.

Performance comparison on regression tasks showing MSE and MAE across coverage levels.

As shown in the table above, the Gumbel-softmax approach consistently achieves lower Mean Squared Error (MSE) and Mean Absolute Error (MAE) across various coverage levels (the percentage of data the model predicts on). For instance, on the Concrete dataset at 70% coverage, the MSE was reduced from 18.59 to 16.17.

Selective Classification

On the ImageNet-100 classification task, the model outperformed the baseline at higher coverage levels (e.g., 89.76% accuracy vs. 88.68% at 90% coverage) and maintained comparable performance at lower coverage levels. Unlike many previous methods that are restricted to classification by adding an "extra class" for abstention, this Gumbel-softmax approach is task-agnostic and generalizes effectively to regression.

Conclusion and Future Work

Gumbel-softmax selective networks provide a principled way to close the training-inference gap in selective models. By learning to recognize parts of the data distribution where failure is likely, these models can guarantee higher confidence on the subsets they choose to predict.

Future research directions include integrating these networks into larger systems that feature out-of-distribution (OOD) detection and bias mitigation. Additionally, while the method is effective, the sensitivity to the temperature annealing schedule suggests that further work on automated hyperparameter tuning could simplify the training pipeline.

Summary updated

BibTeX
@misc{salem2022gumbel,
  author = {Mahmoud Salem and Mohamed Osama Ahmed and Frederick Tung and Gabriel L. Oliveira},
  title = {{Gumbel-Softmax Selective Networks}},
  year = {2022},
  eprint = {2211.10564},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2211.10564},
}
Figure