RED PANDA: DISAMBIGUATING IMAGE ANOMALY DE-TECTION BY REMOVING NUISANCE FACTORS

Abstract

Anomaly detection methods strive to discover patterns that differ from the norm in a meaningful way. This goal is ambiguous as different human operators may find different attributes meaningful. An image differing from the norm by an attribute such as pose may be considered anomalous by some operators while others may consider the attribute irrelevant. Breaking from previous research, we present a new anomaly detection method that allows operators to exclude an attribute when detecting anomalies. Our approach aims to learn representations which do not contain information regarding such nuisance attributes. Anomaly scoring is performed using a density-based approach. Importantly, our approach does not require specifying the attributes where anomalies could appear, which is typically impossible in anomaly detection, but only attributes to ignore. An empirical investigation is presented verifying the effectiveness of our approach 1 .

1. INTRODUCTION

Anomaly detection, discovering unusual patterns in data, is a key capability for many machine learning and computer vision applications. In the typical setting, the learner is provided with training data consisting only of normal samples, and is then tasked with classifying new samples as normal or anomalous. It has emerged that the representations used to describe data are key for anomaly detection in images and videos (Reiss et al., 2021) . Advances in deep representation learning (Huh et al., 2016) have been used to significantly boost anomaly detection performance on standard benchmarks. However, these methods have not specifically addressed biases in the used data. Anomaly detection methods which suffer from the existence of such biases may produce more overall errors, and incorrectly classify as anomalies some types of samples more than others. A major source for such biases is the presence of additional, nuisance factors (Lee & Wang, 2020). One of the most important and unsolved challenges of anomaly detection is resolving the ambiguity between relevant and nuisance attributes. As a motivating example let us consider the application of detecting unusual vehicles using road cameras. Normal samples consist of images of known vehicle types. When aiming to detect anomalies, we may encounter two kinds of difficulties: (i) The distribution of unknown vehicles (anomalies) is not known at training time. E.g., unexpected traffic may come in many forms: a horse cart, heavy construction equipment, or even wild animals. This is the standard problem addressed by most anomaly detection methods (Ruff et al., 2018; Reiss et al., 2021; Tack et al., 2020) . (ii) The normal data may be biased. For example, assume all agricultural machinery appearing during the collection of normal data was moved towards the farmlands. During inference performed on another season, we may see the same equipment moving to the other side (and from a different angle). This novel view might be incorrectly perceived as an anomaly. Unlike previous works, we aim to disambiguate between true anomalies (e.g., unseen vehicle types) and unusual variations of nuisance attributes in normal data (e.g., a known vehicle observed previously only in another direction). Detecting normal but unusual variations according to nuisance attributes as anomalies may be a source of false positive alarms. In addition, they may introduce an undesirable imbalance in the detected anomalies, or even discriminate against certain groups. There are many



The presented benchmarks are available on github under: https://github.com/NivC/RedPANDA. 1

