Characterizing Out-of-Distribution Error via Optimal Transport

Out-of-distribution (OOD) data poses serious challenges in deployed machine learning models, so methods of predicting a model's performance on OOD data without labels are important for machine learning safety. While a number of methods have been proposed by prior work, they often underestimate the actual error, sometimes by a large margin, which greatly impacts their applicability to real tasks. In this work, we identify pseudo-label shift, or the difference between the predicted and true OOD label distributions, as a key indicator to this underestimation. Based on this observation, we introduce a novel method for estimating model performance by leveraging optimal transport theory, Confidence Optimal Transport (COT), and show that it provably provides more robust error estimates in the presence of pseudo-label shift. Additionally, we introduce an empirically-motivated variant of COT, Confidence Optimal Transport with Thresholding (COTT), which applies thresholding to the individual transport costs and further improves the accuracy of COT's error estimates. We evaluate COT and COTT on a variety of standard benchmarks that induce various types of distribution shift -- synthetic, novel subpopulation, and natural -- and show that our approaches significantly outperform existing state-of-the-art methods with an up to 3x lower prediction error.

Paper

References (47)

Scroll for more · 35 remaining

Similar papers

Peer review

Reviewer chpC5/10 · confidence 3/52023-07-06

Summary

In this work, the authors aim to predict model’s performance on out-of-distribution (OOD) data without access to labels during testing. Specifically, they identify pseudo-label shift, which gauges the difference between the predicted and the true OOD label distributions, to indicate the under-estimation issue suffered by the existing methods. Based on the obervision, they propose Confidence Optimal Transport (COT) and an empirically-motivated variant of COT, Confidence Optimal Transport with Thresholding (COTT), for more robust OOD error estimation. Experiments are conducted on 10 datasets with various types of distribution shift to verify the effectiveness of the proposed method.

Strengths

1. The motivation in this work is clear. The authors explain the under-estimation issue encountered by previous studies through the lens of pseudo-label drift, and propose a method leveraging optimal transport theory based on the observision. 2. The code is available with the submission which improves the reproducibility index of the paper.

Weaknesses

1. Since this paper contains many mathematical symbols, the meaning of some symbols is confused, which increases the difficulty of understanding. For example, in Section 2.1, you mention to predict the error $\epsilon = 1-\alpha$, but later the predicted error is denoted as $\hat{\epsilon}$. Comparing Figure 1 with Section 3.1, I find the assumption changes from $P_T(\vec{y}) \approx P_S(\vec{y})$ to $P_T(\vec{c}) \approx P_S(\vec{y})$. Is the meaning of $P_T(\vec{y})$ equivalent to that of $P_T(\vec{c})$? In addition, in Section 3.1, what is the meaning of $\hat{P}_S(\vec{y})$ and $\hat{P}_T(\vec{y})$? I suggest that the authors explain them after every equation and use harmonized symbols. 2. The relationships between pseudo-label drift and the true target error is not clear. In Section 2.4, you briefly mention that the pseudo-label shift is a lower bound of the true target error of the model. Can you explain the property in details? Specifically, I prefer to know the relationships between your method (or miscalibration) and the true target error. Can you give some insights? 3. This work is potentially vulnerable to two cases: 1) imbalanced test set. 2) The label space of the test set is only the subset of that of the training set.

Questions

See the weaknesses.

Rating

5: Borderline accept: Technically solid paper where reasons to accept outweigh reasons to reject, e.g., limited evaluation. Please use sparingly.

Confidence

3: You are fairly confident in your assessment. It is possible that you did not understand some parts of the submission or that you are unfamiliar with some pieces of related work. Math/other details were not carefully checked.

Soundness

2 fair

Presentation

3 good

Contribution

2 fair

Limitations

The author provides the limitations of their work. It would be better if the authors discuss more cases such as the two cases mentioned in the main review.

Reviewer dn4Z6/10 · confidence 3/52023-07-06

Summary

Authors develop a methodology for estimating the accuracy of a classifier in the case where the distribution of the test set is different from the one used in the training data. Their methodology is based on computing a certain Wasserstein distance between suitable distributions on labels. Authors argue this definition is robust to pseudo label shift and validate their claims through extensive experimental validation.

Strengths

StrengthsI think overall it is a good, strong paper. It addresses an important problem and it provides a highly innovative perspective on that problem. Experiments are compelling and make a strong point that the method is able to combat otherwise pervasive underestimation of error for of out of distribution samples.

Weaknesses

The main weakness is the lack of sufficient clarity. The entire argument is subtle and required a super clear explanation. Unfortunately, the way the manuscript is written does not help much. Another weakness is that while this is promoted as an OT based method, the theoretical results (while seemingly correct) don’t enlighten much about what the role of Optimal transport is.

Questions

1)Proposition 2 is nice but it is unclear how such lower bound can be ever applied. In other words, the estimated error could be 1 always and the result is useless. Authors should elaborate more on the significance of this result. 2)Similarly, Corollary 1 is helpful (line 189) but again, doesn't say the proposed method is always good. What AC got it just right while COT overestimates the error? The fact that there is a GAP between great experimental results and these somewhat weak theoretical results is a bit too bad and authors (although perhaps not here) should aim to clarify this. 3)Authors may try to better explain the role of the Wasserstein infinity distance here. Is there anything special about this metric space that makes things work or it is just a mathematical convenience? The proofs are based on geometrical intuitions, but is there anything special about the Wasserstein geometry here? 4) It would be great if the authors could elaborate more on why the Pseudo label shift is the right quantity to focus on.  By line 147 I am worried that the observed correlation showed in the experiments could be an artifact of the fact that the pseudo label shift is bounded by \epsilon. How can this be ruled out? 5) The definition of Pppseuudi in line 95 page 3 is awkward as it is not immediately clear whether it refers to domain X or Y. 6) inline equation in line 188 page 5 seems wrong. Could you please correct?

Rating

6: Weak Accept: Technically solid, moderate-to-high impact paper, with no major concerns with respect to evaluation, resources, reproducibility, ethical considerations.

Confidence

3: You are fairly confident in your assessment. It is possible that you did not understand some parts of the submission or that you are unfamiliar with some pieces of related work. Math/other details were not carefully checked.

Soundness

3 good

Presentation

2 fair

Contribution

3 good

Limitations

n.a.

Reviewer 1ruP5/10 · confidence 2/52023-07-07

Summary

This paper proposed Confidence Optimal Transport (COT) and a variant, Confidence Optimal Transport with Thresholding (COTT) based on pseudo-label shift to characterize the error between predicted and true OOD label distribution.

Strengths

1. The idea of using pseudo-label shift to characterize error is natural and straight-forward. 2. Experiment results are reasonable.

Weaknesses

1. This work does not have sufficient theoretical support for the method. 2. I am not fully convinced that the main assumption of same source label distribution and target label distribution is reasonable.

Questions

1. I don't understand the assumption: "the target label distribution is close to the source label distribution" and think this assumption conflicts with the purpose of detecting OOD error --the test set should be assumed to behave differently from the training set and that's where the error come from. I wonder if authors could help clarify this assumption. 2. Figure 2 and 3 do not seem clear to me, could authors elaborate more on the purpose of including types of corruption in the figure?

Rating

5: Borderline accept: Technically solid paper where reasons to accept outweigh reasons to reject, e.g., limited evaluation. Please use sparingly.

Confidence

2: You are willing to defend your assessment, but it is quite likely that you did not understand the central parts of the submission or that you are unfamiliar with some pieces of related work. Math/other details were not carefully checked.

Soundness

3 good

Presentation

2 fair

Contribution

3 good

Limitations

Yes, the authors have addressed their limitations.

Reviewer 1Jqy7/10 · confidence 3/52023-07-14

Summary

The paper proposes to compute OOD error estimates using a Wassertein distance between the target label distribution and the distribution of confidence vectors. This is in contrast to AC-MC which compare the pseudo-label distribution and the confidence distribution. The paper motivates COT (confidence optimal transport) and COT - threshold to handle outliers and shows they are useful metrics in understanding OOD error. The paper does a variety of experiments to evaluate how the proposed methods do in fact estimate OOD error bettter than existing work.

Strengths

1. The experiments in the paper show clear advantage of COT and COTT for predicting OOD error using unlabelled samples. 2. The presentation in the paper is clear, barring some organization issues. 3. The paper tackles the important problem of estimating OOD error without labels and the proposed method is not very complicated.

Weaknesses

1. The paper does not specify the kind of distribution shift under which the method works; causal shift, anticausal shift, covariate etc.. For example, there are distribution shifts where p_S(X) = p_T(X), which, given good prediction, would mean small COT and COTT (because confidences are concentrated around the correct label). Could the authors explain how this may not be an issue? Better, could the authors evaluate the methods on a dataset like ColoredMNIST with a flipped spurious correlation between train and test. 2. The writing could be improved by introducing COT and COTT before showing plots with them. 3. I'm a little fuzzy on the intuition of which AC-MC does not work as well as COT. Is it that the confidence distribution becomes more diffuse with distribution shift and AC-MC does not scale with that "diffusion" because the pseudo-label distribution also depends on the confidence distribution, but COT being that it looks at the $p_T(Y)$, breaks that dependennce?

Questions

See weaknesses.

Rating

7: Accept: Technically solid paper, with high impact on at least one sub-area, or moderate-to-high impact on more than one areas, with good-to-excellent evaluation, resources, reproducibility, and no unaddressed ethical considerations.

Confidence

3: You are fairly confident in your assessment. It is possible that you did not understand some parts of the submission or that you are unfamiliar with some pieces of related work. Math/other details were not carefully checked.

Soundness

3 good

Presentation

3 good

Contribution

3 good

Limitations

In one sense. The weaknesses section outlines the issue of understanding what kind of OOD the method is really testing.

Reviewer HB657/10 · confidence 3/52023-07-22

Summary

The manuscript studies the challenges caused by out-of-distribution (OOD) data in machine learning models. They identify "the difference between the predicted and true OOD label distributions" (called pseudo-label shift) as the main reason many existing works underestimate OOD errors. They propose a new approach called Confidence Optimal Transport (COT), which uses optimal transport theory to provide more robust error estimates in the presence of pseudo-label shift. Another approach they propose is COT with Thresholding (COTT), which further applies thresholding to individual transport costs to improve the accuracy of COT's error estimates. The authors present impressive experiments to conclude that the COTT approach outperforms existing state-of-the-art OOD error-predicting methods. Predicting a classifier's performance on out-of-distribution (OOD) data is a significant challenge in machine learning, so this manuscript is timely and important.

Strengths

- Due to the use of the Wassienstien distance, COT is robust to miscalibration, meaning it performs well even when the predicted probabilities of the model are not well-calibrated. This is a significant advantage as most other metrics are sensitive to miscalibration. - It looks like COT and COTT are better at handling pseudo-label shifts, i.e., when there are differences between the predicted and true OOD label distributions. Table 1 extensively compares COT and COTT against other metrics for measuring the OOD errors. - It is very welcomed that COT provides some performance guarantee. Under the assumption that the true and predicted label distributions are the same, COT predicts an error of less than half the Wasserstein distance between the pseudo-label distribution and the true label distribution

Weaknesses

- The computation of COT and COTT involves solving a linear program of optimal transport. Yes, the authors propose a batching technique to make their methods scalable, but there is a concern that COTT is computationally infeasible for large-scale inputs. - In most practical setups, COT doesn't have any performance guarantees because the assumption that the true and predicted label distributions are the same is rarely valid.

Questions

- The performance of COTT depends on the threshold. The choice of the threshold could impact the performance of COTT. How sensitive is COTT to the threshold value? Is thresholding effective in reducing the impact of outliers?

Rating

7: Accept: Technically solid paper, with high impact on at least one sub-area, or moderate-to-high impact on more than one areas, with good-to-excellent evaluation, resources, reproducibility, and no unaddressed ethical considerations.

Confidence

3: You are fairly confident in your assessment. It is possible that you did not understand some parts of the submission or that you are unfamiliar with some pieces of related work. Math/other details were not carefully checked.

Soundness

3 good

Presentation

3 good

Contribution

3 good

Limitations

The paper has a particular section addressing the limitations of this work.

Reviewer HB652023-08-13

Thanks for the response

Dear Authors, thanks a lot for the detailed responses. I decide the keep my scorings.

Reviewer 1ruP2023-08-16

I thank the authors for addressing my concerns and decide to stick to my rating as 5.

Reviewer 1Jqy2023-08-18

Thanks for the response. I have updated my score. I had one major concern left that another reviewer points out: the assumption that " the target label distribution is close to the source label distribution". I am inclined to not consider this a very serious issue after 1) the authors pointed out their main concern is covariate shift and also that label shift correct is well-studied and could be applied orthogonal to the method. Could the authors comment on my thinking here and write their own response to the concern that " the target label distribution is close to the source label distribution" is a strong assumption?

Authorsrebuttal2023-08-19

Reply to Reviewer 1Jqy's Inquiry

We thank you for acknowledging our rebuttal and for raising the score! We are glad that you requested further clarifications of our assumption that “the target label distribution is close to the source label distribution”, as this assumption is an important part of our paper. Your thoughts on the assumption make sense to us. We also think that for covariate shifts, assuming the target label distribution is close to the source label distribution is a natural one. However, while we do agree that label shift correction is well-studied, we would like to note that these correction methods [1] assume there are no covariate shifts, i.e., p(x|y) does not change. Thus, we do not think we can directly use existing methods to relax our assumption. While this is unfortunate, we think this also helps to support our claim that finding the right assumption is critical in making progress on tackling distribution shifts. We would address the concern by pointing out: 1) the assumption that “the target label distribution is close to the source label distribution” is a natural assumption for covariate shifts as we observe it to be true in various real-world benchmark datasets we experimented with. 2) the assumption is a powerful one that, when held true, allows us to compute pseudo-label shift, a lower bound of true error, and to propose COT/COTT that provides strong empirical performance and some theoretical guarantee. 3) proposing this assumption has great value, as the community currently working on the problem of estimating OOD error finds it challenging to specify under what circumstances their proposed methods are guaranteed to work. Confidence-based methods mainly rely on the model being well-calibrated, which is rarely true on OOD datasets [2] and can be extremely unreliable as shown in our paper. 4) we plan to work on methods to relax this assumption in the future to make COT/COTT robust to even extreme distribution shifts. Thanks again for your reply. Please let us know if our reply addressed your concerns. [1] Lipton, Zachary, Yu-Xiang Wang, and Alexander Smola. "Detecting and correcting for label shift with black box predictors." International conference on machine learning. PMLR, 2018. [2] Ovadia, Yaniv, et al. "Can you trust your model's uncertainty? evaluating predictive uncertainty under dataset shift." Advances in neural information processing systems 32 (2019).

Program Chairsdecision2023-09-21

Decision

Accept (poster)

© 2026 NYSGPT2525 LLC