  The application of machine learning models can be significantly impeded by
the occurrence of distributional shifts, as the assumption of homogeneity
between the population of training and testing samples in machine learning and
statistics may not be feasible in practical situations. One way to tackle this
problem is to use invariant learning, such as invariant risk minimization
(IRM), to acquire an invariant representation that aids in generalization with
distributional shifts. This paper develops methods for obtaining
distribution-free prediction regions to describe uncertainty estimates for
invariant representations, accounting for the distribution shifts of data from
different environments. Our approach involves a weighted conformity score that
adapts to the specific environment in which the test sample is situated. We
construct an adaptive conformal interval using the weighted conformity score
and prove its conditional average under certain conditions. To demonstrate the
effectiveness of our approach, we conduct several numerical experiments,
including simulation studies and a practical example using real-world data.
