  Density ratio estimation serves as an important technique in the unsupervised
machine learning toolbox. However, such ratios are difficult to estimate for
complex, high-dimensional data, particularly when the densities of interest are
sufficiently different. In our work, we propose to leverage an invertible
generative model to map the two distributions into a common feature space prior
to estimation. This featurization brings the densities closer together in
latent space, sidestepping pathological scenarios where the learned density
ratios in input space can be arbitrarily inaccurate. At the same time, the
invertibility of our feature map guarantees that the ratios computed in feature
space are equivalent to those in input space. Empirically, we demonstrate the
efficacy of our approach in a variety of downstream tasks that require access
to accurate density ratios such as mutual information estimation, targeted
sampling in deep generative models, and classification with data augmentation.
