# Autoencoder-Based Semantic Novelty Detection: Towards Dependable AI-Based Systems
## 1 Introduction
In the scenario of Figure 1, the safety task of the quantitative monitor intuitively indicates whether the system is currently processing actual real input data \(x\), which are from a reliability perspective similar enough (\(semantic\_similar(x,y)\geq threshold_{semantic\_similarity}\)) to the (ground truth) training input data (\(y\)) used for ML, so that the produced actual output information of the machine-learned interpretation function \(if_{ml}(x)\) can be assumed to be correct and safe. If this is not the case, the AI-based system is possibly in an unsafe state. Providing a measure for the semantic similarity of input data that serve as an argument for the output information reliability is a challenge (\(semantic\_similar(x,y)\)). Novelty detection to automatically identify new relevant test data differing from the available training data becomes an interesting approach to realize such a semantic similarity measure. Very promising novelty detection approaches use AI-technologies, such as an autoencoder or generative adversarial network approaches [7]. The basic principle for autoencoder-based novelty detection was introduced by [PERSON] et al. [8]. An autoencoder was trained to minimize the error between an input image and a reconstructed input image. Known images were used to train the autoencoder. After training, the autoencoder was fed with new images. If the difference between the original image and the reconstructed image was higher than a given threshold value, the new image was suspected to be novel. [PERSON] et al. [9] trained an autoencoder with known images of handwritten digits. Their autoencoder-based novelty detection approach could identify images of letters with nonstandard fonts as novel. [PERSON] et al. [10] demonstrated the same with images from known daytime versus novel nighttime driving situations. These \"naive\" autoencoder-based novelty detection approaches can meaningfully generalize a family of input images with a common structure and classify input images with different structures as novel data. However, a significant structural difference in input data does not necessarily correlate with a different output information class. To guarantee the dependability of an AI-based system, we must ensure that there are sufficient comprehensive training input data for each relevant output information, regardless of how large the structural difference in input data is. For instance, as illustrated in Figure 2, completely different traffic situations (output information) frequently have similar images (input data). On the right-hand side, the AV has to stop and let the pedestrians pass the zebra crossing. On the left-hand side, the AV can pass the zebra crossing. Figure 2: Similar images of pedestrians represent different situations [11]. AI-based systems are generally known to lack robustness, for example, in the case that the training data, rarely or completely, did not cover critical situations. The challenging task is, if a new image represents a data example for an unknown driving situation (relevant new output information), it must be identified as novel, regardless of how similar it is to an existing one. To mitigate this problem, we propose a new architecture for autoencoder-based semantic novelty detection with two innovations: (a) architectural guidelines for a semantic autoencoder topology that provokes the autoencoder to reconstruct novel input data with a distinct sufficient reconstruction error and (b) an architectural blueprint for a semantic error calculation as novelty criteria that calculates the difference between the original and the reconstructed input based on the resulting error of the corresponding output information. We demonstrate that such a sophisticated autoencoder-based semantic novelty detection approach is much more powerful than existing \"naive\" autoencoder-based novelty detection approaches, such as the approach by [PERSON] et al. [9]. To compare our results with the \"naive\" autoencoder-based approach, we apply the same setting as [PERSON] et al.