Unfortunately, computing \(I(X;Y)\)  is challenging since the joint probability density function \(p_{XY}(\mathbf {x},\mathbf {y})\)  and the marginals \(p_X(\mathbf {x}),p_Y(\mathbf {y})\)  are usually unknown, especially with high-dimensional data. Some recent techniques [1]} have shown the ability to estimate probability density functions, exploiting neural networks that model the data dependence. However, to evaluate the mutual information, it is sufficient to compute the density ratio
\(R(\mathbf {x},\mathbf {y}) = \frac{p_{XY}(\mathbf {x},\mathbf {y})}{p_X(\mathbf {x})\cdot p_Y(\mathbf {y})}\) 
