# Iterative Oblique Decision Trees Deliver Explainable RL Models
## 4 Results
### Explainability for Oblique Decision Trees in RL
#### 4.4.3 Sensitivity Analysis  
An individual rule of an oblique tree is simple in mathematical terms (it is a linear inequality). It is, nevertheless, difficult to interpret for humans. This is because the individual input features (usually different physical quantities) are multiplied with weights and added up, which has no direct physical interpretation. For example, the single-node tree of CartPole has the rule  
\[4.904x-0.1829 vs.+19.1497\theta+1.5203\omega\leq-0.0003 \tag{2}\]  
\[\Leftrightarrow\qquad w_{x}x+w_{v}vs.+w_{\theta}\theta+w_{\omega}\omega\quad \leq\quad\tau\]  
which does not directly tell which input features are important for success and is as such difficult to interpret. However, due to the simple mathematical relationship, we may vary each weight \(w_{i}\) or the threshold \(\tau\) individually and measure the effect on the reward. This is shown in Figure 10. The weights are varied in a wide range of \([-100\%,200\%]\) of their nominal value, the threshold \(\tau\) (being close to 0) is varied in the range \(\tau-\overline{w}+[0\%,200\%]\cdot\overline{w}\), where \(\overline{w}\) is the mean of all weight magnitudes \(|w_{i}|\) of the node. From Figure 10a, we learn that the angle \(\theta\) is the most important input feature. If \(w_{\theta}\) is below its nominal value, performance starts to degrade, while a higher \(w_{\theta}\) keeps the optimal reward. The most important parameter is the threshold \(\tau\), which has to be close to 0; otherwise, performance quickly degrades on both sides. This makes sense because the essential control strategy for the CartPole is to react to slightly positive or negative \(\theta\) with the opposite action. On the other hand, the weight for velocity \(v\) is the least important parameter; varying it in Figure 10a does not change the reward, and setting its weight \(w_{v}\) to 0 and varying the other weights leads to essentially the same picture in Figure 10b. One could object that these sensitivity analyses results could have also been read off directly from Equation (2) because \(\theta\) has the largest, and \(v\) has the most negligible weight in magnitude. However, this is only an accidental coincidence. For many other nodes that we examined using sensitivity analysis, the most/least important feature in terms of mean return did _not_ coincide with the largest/smallest weight. Figure 9: Distance plot for Acrobot. The tree has only one node. Suppose an OPCT has more than one node, e.g., for LunarLander at depth \(d=2\) with its three split nodes. In that case, we can perform a sensitivity analysis for each node separately, or vary the respective weights and thresholds for all nodes simultaneously. The latter is shown in Figure 11. We see that strengthening their weights (setting them to higher values than nominal ones) only leads to slow degradation for all input features. A faster degradation occurs when lowering the weight for a certain input feature. The features \(v_{y}\), \(\theta\), and \(v_{x}\) (in this order) are the most important in that respect. On the other hand, the legs (boolean variables signaling the ground-contact of the lander's legs), are least important. The curves in Figure 11b only change slightly if the legs are removed from the decisions by setting their weights to zero. This makes sense because the legs have a constant _no-contact_ value during the majority of episode steps (and when the legs do reach ground-contact, the success or failure of an episode is usually already determined). Note that the sensitivity analysis shown here is, in a sense, more detailed than a Shapley value analysis [32] because it allows us to disentangle the effects of intensifying or weakening an input feature. In contrast, the Shapley value only compares the presence or absence of a feature. (It is of course also less detailed, because it does not take coalitions of features into account as Shapley does.)