# Attention to Fires: Multi-Channel Deep Learning Models for Wildfire Severity Prediction
## 4 Experimental Results
### Multi-Channel Attention-Based Analysis
Then, the _high-low_ attention threshold has been selected by looking at the median value of the distribution of all the values of the attention feature maps get when spanning all the dataset images. Despite the two layers present different median distributions, as shown in Figure 6, we decide to fix a single threshold for both. As the second network result depends on the first one, we chose this value as the binary-class backbone distribution median, namely 0.43. Finally, Figure 7 reports the binary step results. As for performance evaluation metrics, Recall, Precision, F1 score, and IoU were used for the binary classification step. Each plot represents the distribution of the results compared when using normal images, full-channel occl  
Figure 6: Values distributions for each attention level of the regression backbone. The dashed lines represents the medians of the two distributions. sion ones (marked as all_occluded) and the ones obtained by removing the high-attention (up_attention_occluded) and the low-attention points (down_attention_occluded). A detailed discussion is provided in Section 4.6.1. To measure the channel's relevance in the attention-guided prediction, we also evaluate the distance between the results distributions obtained considering the up- and down-threshold pixels. We focus this analysis on the first step of the architecture because the second step's results strongly depend on the first network's performance. To this aim, we can define \(P\) as the probability distribution associated with the results in terms of IoU obtained from the neural network without occlusions in the input. Analogous distributions trying to approximate the first one after a loss of information would be the ones obtained after the up_attention, down_attention, and all occlusions, which we can define as \(Q^{+}\), \(Q^{-}\) and \(Q^{\text{all}}\). To quantify the distance between them, we can introduce the Kullback-Leibler divergence \(\text{D}_{\text{KL}}\), which is usually adopted in information theory and mathematical statistics to evaluate the distance between a real data probability distribution \(P\) and its approximation \(Q\)[81]. This metric, given the distributions \(P\), \(Q\) and the associated densities \(p(x)\), \(q(x)\) with domain \(\chi\), is defined as  
\[\text{D}_{\text{KL}}(P||Q)=\int_{x}dx\ p(x)\log\biggl{(}\frac{p(x)}{q(x)} \biggr{)}\,. \tag{1}\]  
In our case, the density functions \(p(x)\) and \(q^{*}(x)\) (where \(*\) stays for all, up and down) can be estimated from the discrete samples using Kernel density estimation (KDE) algorithm. The domain of the functions derived in this way is ideally the set of all the real values, but we know that metrics generated from the confusion matrix can assume values from 0 to 1. Therefore, the densities are negligible when evaluated far from this range and we can truncate them. For this reason, all the integrals are evaluated between the aforementioned values with padding of half of the distance between the left and right limit on both sides, obtaining for the first step of the double-step analysis \(\chi_{\text{bin}}=x\in[-0.5,1.5]\). Finally, starting from the \(\text{D}_{\text{KL}}\), which by definition is always greater or equal to 0, we can derive a metric to evaluate the goodness of the attention layer as the variation between this metric calculated when removing the high- and down-attention pixels, namely,  
\[\Delta\text{D}_{\text{KL}} =\text{D}_{\text{KL}}(P||Q^{+})-\text{D}_{\text{KL}}(P||Q^{-}) \tag{2}\] \[=\int_{x}dx\ p(x)\log\biggl{(}\frac{p(x)}{q^{+}(x)}\biggr{)}-\int _{x}dx\ p(x)\log\biggl{(}\frac{p(x)}{q^{-}(x)}\biggr{)}\] \[=\int_{x}dx\ p(x)\log\biggl{(}\frac{q^{-}(x)}{q^{+}(x)}\biggr{)}\,.\]  
As we assume a greater distance between \(Q^{+}\) and \(P\) than between the down counterpart, we want this metric to be greater or equal to one for an effective attention layer. In the following sections, we present the results of this analysis for the first Backbone network and the direct consequences on the second one.