## 3 Evaluation Method
### Local Metrics  
The metrics presented so far aggregate the quality of a decision map to a single scalar number. Although simple to interpret, such metrics only provide a _global_ assessment of the decision map. Since typical direct projections and inverse projections are nonlinear functions, large errors can occur _locally_ in such maps. Such local errors--if not too numerous--will not show up in global metrics. Moreover, the _position_ of such local errors is very important for interpreting a decision map. For example, errors appearing close to a decision boundary will influence the shape of this boundary and, subsequently, how one uses the map to interpret and/or improve a given ML model. To gain more insights into these local phenomena, one can use so-called _local metrics_. Introduced to study direct projections [39], these metrics evaluate the quality of a map at every 2D spatial position and typically display the result as a color-coded visualization. We propose three local metrics to assess the quality of decision maps, as described below (see also Figure 2). **Gradient map:** We display the gradient map \(G\), computed as explained in Section 3.1, to help understand the smoothness of the inverse projection and, as outlined earlier, check for the presence of high-gradient regions that are prone to creating errors in the map. **Distance to boundary:** Due to the nonlinearity of the mappings \(P\) and \(P^{-1}\), if a pixel is visually close to a decision boundary _in the map_, this does not necessarily mean that its corresponding data point is close to the classifier's decision boundary _in the data space_. Yet, a key aim of decision maps is precisely to indicate points that are close to decision boundaries, since these are prone to misclassifications upon slight changes in the data or model parameters. [PERSON] et al. [21] addressed this by computing the actual distance in the data space between the backprojection of each pixel and its closest decision boundary. However, the methods they proposed for doing this, based on an iterative search in the data space of the precise location of the decision boundaries, are both inexact and computationally very expensive. We mitigate this by computing the aforementioned distance to the boundary by resorting to an adversarial example generation technique [16; 40]. Specifically, we employ DeepFool [41]. An adversarial example of a given classifier is a synthetic data point \(\bar{\mathbf{x}}=\mathbf{x}+\Delta\mathbf{x}\), such that \(f(\bar{\mathbf{x}})\
eq f(\mathbf{x})\), where \(\|\Delta\mathbf{x}\|\) is as small as possible. Here, \(\Delta\mathbf{x}\) indicatesa small perturbation or change in the sample \(\mathbf{x}\). In practice, it is complicated to generate the smallest perturbation possible that generates an adversarial example so DeepFool approximates it instead for every map pixel \(\mathbf{p}\) as  
\[B(\mathbf{p})\approx\min_{\|\Delta\mathbf{x}\|}\text{ s.t. }f(P^{-1}(\mathbf{p})+ \Delta\mathbf{x})\
eq f(P^{-1}(\mathbf{p})) \tag{6}\]  
In other words, \(B(\mathbf{p})\) indicated how close \(P^{-1}(\mathbf{p})\) is to a change in the class predicted by \(f\), i.e., to the closest decision boundary to the backprojection of \(\mathbf{p}\). To compute the above, a differentiable classifier is needed. For this, we use a logistic regression classifier implemented in PyTorch. **Distance to data:** Besides knowing how close a decision-map pixel \(\mathbf{p}\) is to its closest decision boundary, it is also useful to know how close such a pixel is (via backprojection) to the nearest data point in the training set \(D_{t}\) used to construct \(f\). We compute this as  
\[N(\mathbf{p})=\min_{\mathbf{x}\in D_{t}}\lVert P^{-1}(\mathbf{p})-\mathbf{x}\rVert, \tag{7}\]  
that is, the smallest distance between the data point \(P^{-1}(\mathbf{x})\) corresponding to the pixel \(\mathbf{p}\) and samples in the training set \(D_{t}\).