[link]
Liang et al. propose a perturbationbased approach for detecting outofdistribution examples using a network’s confidence predictions. In particular, the approaches based on the observation that neural network’s make more confident predictions on images from the original data distribution, indistribution examples, than on examples taken from a different distribution (i.e., a different dataset), outdistribution examples. This effect can further be amplified by using a temperaturescaled softmax, i.e., $ S_i(x, T) = \frac{\exp(f_i(x)/T)}{\sum_{j = 1}^N \exp(f_j(x)/T)}$ where $f_i(x)$ are the predicted logits and $T$ a temperature parameter. Based on these softmax scores, perturbations $\tilde{x}$ are computed using $\tilde{x} = x  \epsilon \text{sign}(\nabla_x \log S_{\hat{y}}(x;T))$ where $\hat{y}$ is the predicted label of $x$. This is similar to “onestep” adversarial examples; however, in contrast of minimizing the confidence of the true label, the confidence in the predicted label is maximized. This, applied to indistribution and outdistribution examples is illustrated in Figure 1 and meant to emphasize the difference in confidence. Afterwards, in and outdistribution examples can be distinguished using simple thresholding on the predicted confidence, as shown in various experiment, e.g., on Cifar10 and Cifar100. https://i.imgur.com/OjDVZ0B.png Figure 1: Illustration of the proposed perturbation to amplify the difference in confidence between in and outdistribution examples. Also find this summary at [davidstutz.de](https://davidstutz.de/category/reading/).
Your comment:

[link]
## Task Add '**rejection**' output to an existing classification model with softmax layer. ## Method 1. Choose some threshold $\delta$ and temperature $T$ 2. Add a perturbation to the input x (eq 2), let $\tilde x = x  \epsilon \text{sign}(\nabla_x \log S_{\hat y}(x;T))$ 3. If $p(\tilde x;T)\le \delta$, rejects 4. If not, return the output of the original classifier $p(\tilde x;T)$ is the max prob with temperature scailing for input $\tilde x$ $\delta$ and $T$ are manually chosen. 