  Knockoffs are a popular statistical framework that addresses the challenging
problem of conditional variable selection in high-dimensional settings with
statistical control. Such statistical control is essential for the reliability
of inference. However, knockoff guarantees rely on an exchangeability
assumption that is difficult to test in practice, and there is little
discussion in the literature on how to deal with unfulfilled hypotheses. This
assumption is related to the ability to generate data similar to the observed
data. To maintain reliable inference, we introduce a diagnostic tool based on
Classifier Two-Sample Tests. Using simulations and real data, we show that
violations of this assumption occur in common settings for classical Knockoffs
generators, especially when the data have a strong dependence structure. We
show that the diagnostic tool correctly detects such behavior. To fix knockoff
generation, we propose a nonparametric, computationally-efficient alternative
knockoff construction, which is based on constructing a predictor of each
variable based on all others. We show that this approach achieves asymptotic
exchangeability with the original variables under standard assumptions on the
predictive model. We show empirically that the proposed approach restores error
control on simulated data.
