Extremely Simple Activation Shaping for Out-of-Distribution Detection

  • 2022-09-20 18:09:49
  • Andrija Djurisic, Nebojsa Bozanic, Arjun Ashok, Rosanne Liu
  • 42


The separation between training and deployment of machine learning modelsimplies that not all scenarios encountered in deployment can be anticipatedduring training, and therefore relying solely on advancements in training hasits limits. Out-of-distribution (OOD) detection is an important area thatstress-tests a model's ability to handle unseen situations: Do models know whenthey don't know? Existing OOD detection methods either incur extra trainingsteps, additional data or make nontrivial modifications to the trained network.In contrast, in this work, we propose an extremely simple, post-hoc, on-the-flyactivation shaping method, ASH, where a large portion (e.g. 90%) of a sample'sactivation at a late layer is removed, and the rest (e.g. 10%) simplified orlightly adjusted. The shaping is applied at inference time, and does notrequire any statistics calculated from training data. Experiments show thatsuch a simple treatment enhances in-distribution and out-of-distribution sampledistinction so as to allow state-of-the-art OOD detection on ImageNet, and doesnot noticeably deteriorate the in-distribution accuracy. We release alongsidethe paper two calls for explanation and validation, believing the collectivepower to further validate and understand the discovery. Calls, video and codecan be found at: https://andrijazz.github.io/ash


Quick Read (beta)

loading the full paper ...