  Conformal prediction aims to determine precise levels of confidence in
predictions for new objects using past experience. However, the commonly used
exchangeable assumptions between the training data and testing data limit its
usage in dealing with contaminated testing sets. In this paper, we develop a
novel flow-based conformal inference (FCI) method to build predictive sets and
infer outliers for complex and high-dimensional data. We leverage ideas from
adversarial flow to transfer the input data to a random vector with known
distributions. Our roundtrip transformation can map the input data to a
low-dimensional space, meanwhile reserving the conditional distribution of
input data given each class label, which enables us to construct a
non-conformity score for uncertainty quantification. Our approach is applicable
and robust when the testing data is contaminated. We evaluate our method,
robust flow-based conformal inference, on benchmark datasets. We find that it
produces effective predictive sets and accurate outlier detection and is more
powerful relative to competing approaches.
