The model has to find an optimal location to attend at time \(t\)  before observing the corresponding glimpse. Hence, we consider an expected information gain (EIG) over the generating distribution of \(g\) . An EIG is also a measure of Bayesian surprise [1]}, [2]}.
\(EIG(l) &= \mathbb {E}_{p(g|l, h_{t-1})} D_{\mathrm {KL}}\big [p(y|g, l, h_{t-1})||p(y|h_{t-1})\big ] \\ &= \mathbb {E}_{p(f(l)| h_{t-1})} D_{\mathrm {KL}}\big [p(y|f(l), h_{t-1})||p(y|h_{t-1})\big ]\) 
