Generalizing Importance Weighting to A Universal Solver for Distribution Shift Problems

Distribution shift (DS) may have two levels: the distribution itself changes, and the support (i.e., the set where the probability density is non-zero) also changes. When considering the support change between the training and test distributions, there can be four cases: (i) they exactly match; (ii) the training support is wider (and thus covers the test support); (iii) the test support is wider; (iv) they partially overlap. Existing methods are good at cases (i) and (ii), while cases (iii) and (iv) are more common nowadays but still under-explored. In this paper, we generalize importance weighting (IW), a golden solver for cases (i) and (ii), to a universal solver for all cases. Specifically, we first investigate why IW might fail in cases (iii) and (iv); based on the findings, we propose generalized IW (GIW) that could handle cases (iii) and (iv) and would reduce to IW in cases (i) and (ii). In GIW, the test support is split into an in-training (IT) part and an out-of-training (OOT) part, and the expected risk is decomposed into a weighted classification term over the IT part and a standard classification term over the OOT part, which guarantees the risk consistency of GIW. Then, the implementation of GIW consists of three components: (a) the split of validation data is carried out by the one-class support vector machine, (b) the first term of the empirical risk can be handled by any IW algorithm given training data and IT validation data, and (c) the second term just involves OOT validation data. Experiments demonstrate that GIW is a universal solver for DS problems, outperforming IW methods in cases (iii) and (iv).

Paper

Similar papers

Peer review

Reviewer G7Ea8/10 · confidence 5/52023-07-03

Summary

The paper studied importance weighting that is a fundamental technique in machine learning and data mining. It pointed out a serious issue of existing importance weighting methods that has not been realized or considered carefully --- the support of the training distribution may not fully enclose the support of the test distribution. Then, it proposed a generalized version of importance weighting that can solve the serious issue and has some nice theoretical properties.

Strengths

The motivation is clear. People employ importance weighting where the importance weights are defined as pte(x,y)/ptr(x,y), and people assume pte(x,y)=0 whenever ptr(x,y)=0, to avoid unbounded importance weights. Consider the case that the support of the training distribution may not fully enclose the support of the test distribution. Since the importance weights are only used for the training distribution, even though they become ill-defined when pte(x,y)>0 and ptr(x,y)=0, importance weighting itself is still well-defined and it seems to be fine... However, this paper pointed out that in such a case the importance-weighting "identity" becomes an "inequality", which means that what we minimize for training will not be an approximation of the original risk and thus training may be biased. Indeed, this paper constructed a toy example (Figure 2 and Proposition 3) where training is still unbiased or totally biased. I like Proposition 3 very much that emphasizes what people have overlooked so far. The idea is novel. It splits the validation data coming from the test distribution into two parts based on one-class classification and pretrained representation (note that pretraining is on the distribution-shifted training data and the proposed method is still end-to-end). Then, the original importance-weighting term is based on one part of the validation data and there is a second term based on the other part of the validation data. In such a way, what we minimize for training is an approximation of the original risk and thus training is still unbiased, as long as the split of validation data is not wrong. As far as I know, this idea or a similar idea has not been explored in importance-weighting research. The experiments look very interesting. The Color-MNIST experiments (both the design and the results) are thought-provoking.

Weaknesses

The experiments are all done on benchmark datasets at the MNIST/CIFAR scale and there is no big data experiment like ImageNet. The biggest model in the experiments is ResNet-18 and there is no big model experiment involving WideResNet, DenseNet, or ViT.

Questions

A point in the motivation should be clarified. As I mentioned above in "the motivation is clear", when the importance weights are ill-defined outside the training distribution, importance weighting itself is still well-defined. So have people not noticed the serious issue of importance weighting, or have they noticed it but thought it not a big deal and then ignored it? BTW, you only argued that "IW methods become ill-defined and problematic", which is not enough as an explanation. The importance weights may be ill-defined, but those ill-defined importance weights will not be used for training. As a result, IW methods are not ill-defined, but they are not good for training and may lead to poor trained classifiers. However, if we are lucky, they can lead to good trained classifiers, as shown in Figure 2. Am I right? Before Proposition 3, you have assumed that "the classifier would transfer its knowledge about ptr(x,y) to pte(x,y) in the simplest manner". Why do you need this assumption, or can you explain the implicit meaning of this assumption? If I am not wrong, importance weighting can only train linear classifiers given such training and validation data. In this paper, the definition of importance weighting is to use pte(x,y)/ptr(x,y) as the importance weights. There is a more general definition of importance weighting: weighting the loss function on training data to emphasize the loss on some or de-emphasize it on others with the objective of correcting the mismatch between the training and test distributions (see Corinna Cortes, Yishay Mansour, Mehryar Mohri, "Learning Bounds for Importance Weighting", NIPS 2010). This more general definition can include your "IW-like methods" as IW methods. You theoretically and empirically analyzed when and why IW methods can succeed/may fail. Can your results still hold for this more general definition? I think importance weighting is not good at the case where the support of the training distribution may not fully enclose the support of the test distribution. This is the motivation of generalizing importance weighting in this paper. However, transfer learning and domain adaptation should also be good at the case which importance weighting is not good at and generalized importance weighting is good at. I found transfer learning or domain adaptation was not mentioned or discussed in this paper. So can you comment on their potential and compare their ability with generalized importance weighting?

Rating

8: Strong Accept: Technically strong paper, with novel ideas, excellent impact on at least one area, or high-to-excellent impact on multiple areas, with excellent evaluation, resources, and reproducibility, and no unaddressed ethical considerations.

Confidence

5: You are absolutely certain about your assessment. You are very familiar with the related work and checked the math/other details carefully.

Soundness

3 good

Presentation

3 good

Contribution

3 good

Limitations

Labeled validation data coming from the test distribution are required for estimating the importance weights and training. Such validation data may be hard to obtain in practice.

Reviewer jhs47/10 · confidence 4/52023-07-04

Summary

This paper focuses on an important technique in the field of learning under distribution shift. Compared to previous importance weighting techniques, this paper consider more general scenarios: support shift. This paper first investigates how the previous techniques fail on general support-shift scenarios, then proposes a theoretical-justified objective to consider such scenarios. To this end, the whole pipeline is proposed based the objective. In the experiments, necessary empirical justification is included, verifying the effectiveness of the proposed method.

Strengths

1. The problem setting is interesting and important to the field. In the real world, cases (iii) and (iv) are very common. However, previous techniques do not consider such scenarios. 2. This paper contributes a principle to the field: what kind of objective is classifier-consistency when solving the general distribution-shift problem (i.e., the support-shift problem). 3. The experiments justify the proposed component. The selected baselines cover a lot of existing methods, which is very appreciated.

Weaknesses

1. The four cases are clearly defined. However, potential practical scenarios can be justified better. In my opinion, test distribution’s support set containing training distribution’s support set might less happen in the current era (as researchers tend to train networks with a lot data). Case (iv) is the most common one, instead of case (iii). 2. In Figure 2, the word “unseen” will cause confusion. We indeed have validation data that come from the test distribution. Thus, it is better to use training data instead of seen/unseen data in Figure 2, or clearly show the decision boundary to avoid potential confusion. 3. It is not well-motivated why we need to introduce risk consistency/inconsistency from label-noise literature. It is a plain definition and should be motivated from its own. 4. Theorem 4 is important to justify the designed objective. However, the most important part, how estimation/observation of s influences the generalization ability is not explored. Necessary discussions should be considered to strengthen the theoretical contribution of this paper. 5. In the experiment, the considered dataset is relatively small. Tasks from partial domain adaptation problem can be used for validating the performance on case (iii). Some large training sets should be considered, e.g., ImageNet. 6. It is unclear how the performance of one-class classifier influences the performance of the proposed method. More experimental analysis should be considered towards this direction.

Questions

1. It is not well-motivated why we need to introduce risk consistency/inconsistency from label-noise literature. It is a plain definition and should be motivated from its own. 2. Theorem 4 is important to justify the designed objective. However, the most important part, how estimation/observation of s influences the generalization ability is not explored. Necessary discussions should be considered to strengthen the theoretical contribution of this paper. 3. In the experiment, the considered dataset is relatively small. Tasks from partial domain adaptation problem can be used for validating the performance on case (iii). Some large training sets should be considered, e.g., ImageNet. 4. It is unclear how the performance of one-class classifier influences the performance of the proposed method. More experimental analysis should be considered towards this direction.

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

4: You are confident in your assessment, but not absolutely certain. It is unlikely, but not impossible, that you did not understand some parts of the submission or that you are unfamiliar with some pieces of related work.

Soundness

4 excellent

Presentation

3 good

Contribution

3 good

Limitations

This paper does not have potential negative societal impact to be addressed. Paper’s technical limitations can be found in the above comments.

Reviewer uQtu6/10 · confidence 2/52023-07-06

Summary

The paper introduces a Generalized Importance Weighting (GIW) method designed to address distribution shift problems, where the support of the probability density function varies between training and test data. The authors demonstrate that GIW outperforms existing methods in scenarios where the test support is wider or partially overlaps with the training support.

Strengths

**Originality**: The paper introduces a novel method called Generalized Importance Weighting (GIW) that extends the traditional Importance Weighting (IW) method. **Quality**: The paper is well-structured and provides a thorough analysis of why IW may fail in certain cases and how GIW addresses these issues. **Clarity**: This paper is well-written and easy to follow.

Weaknesses

- This paper evaluates GIW on a few small datasets. However, it would be beneficial to evaluate the method on a large and complex dataset such as ImageNet. This would provide a more comprehensive understanding of the performance and applicability of GIW. - All experiments in this paper are based on small models LetNet-5 and resnet-18. It would be beneficial to evaluate the method on other modern architectures such as vision transformers and VGG. This would provide a more comprehensive understanding of whether the proposed method is sensitive to model architectures.

Questions

- Can the proposed GIM perform well on other model architectures such as VGG/Vision Transfomer and large real-world datasets such as ImageNet? - The authors utilize O-SVM to split D_v to IT and OOT validation data. How to make sure the O-SVM correctly split the D_v set and how does the quality of O-SVM splitting affect the performance of the proposed GIW?

Rating

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

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

2 fair

Presentation

2 fair

Contribution

2 fair

Limitations

The authors adequately addressed the limitations.

Reviewer UAYX6/10 · confidence 3/52023-07-09

Summary

The paper considers a distribution shift problem where the test distribution $D_\text{te}$ is different from the training distribution $D_\text{tr}$. Specifically, the learner is given training data sampled according to $D_\text{tr}$ and (typically a much smaller size of) validation data sampled according to $D_\text{te}$, and is required to output a classifier with small generalization error (measured by $D_\text{te}$). The paper first exemplifies a particular pair of $D_\text{tr}$ and $D_\text{te}$ such that the existing method called the importance weighting fails, and then improves the method to better handle such hard cases.

Strengths

Give a hard example where the existing method has significantly poor performance but the proposed method has reasonable performance. Revise the objective function so as to be risk-consistent, and then propose its empirical version to be minimized, which gives a learning algorithm that outperforms the existing method in experiments.

Weaknesses

First of all, Theorem 4, claimed as the main theorem, is just a simple rewrite of the generalization risk and thus straightforward. Moreover, the theorem does not give any justification of the proposed method. Instead, the consistency of the estimator (the empirical objective) should be investigated. (Generally, the notion of consistency is defined for esitimators.) I do not think that the expectation of $\hat J_G(f)$ coincides $R(f)$. --- My concern is addressed thru the discussion with the authors.

Questions

I wonder why the authors divide the problems into four cases according to the supports of $D_\text{tr}$ and $D_\text{te}$. Apparently, any distribution $D$ with support $S$ is empirically indistinguishable from a distribution $D'$ with support $S'$ if $D$ (and $D'$, resp.) has very small but non-zero probability mass for all $x \notin S'$ ($x \notin S$, resp.).

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

3 good

Contribution

3 good

Limitations

It seems to be impossible to establish a perfectly risk-consistent estimator in general. So we may need to put some assumptions about the difference between $D_\text{tr}$ and $D_\text{te}$ and investigate to what extent an estimator is risk-consistent.

Area Chair 9Cnm2023-08-11

Reviewer-author discussion

Dear Reviewers, Please take a moment to read the authors' responses. Your insights and feedback are crucial in ensuring a comprehensive evaluation. Thanks. AC

Authorsrebuttal2023-08-15

Dear Reviewer G7Ea, Thank you for the reply. It's great to hear that we have answered your questions. Authors

Authorsrebuttal2023-08-15

Dear Reviewer jhs4, Thank you for the reply. It's great to hear that we have answered your questions. Authors

Authorsrebuttal2023-08-15

Slightly more discussion

We'd like to talk slightly more about why we divided the set of distribution shift problems into four cases according to support shift. As you pointed out, we cannot empirically detect any small support shift; in fact, even if the support shift is huge, we cannot empirically detect it either (under joint shift). The only empirically distinguishable support shift is covariate shift ("a learning based hypothesis test for harmful covariate shift", ICLR 2023), where the hypothesis test method is learning-based and specially designed, so that it doesn't work for more complex joint shift. Therefore, dividing distribution shift into four cases according to support shift is not a bug, it's a feature of our submission. The proposed GIW is a strictly more general case of the standard IW and it's safer to be used when we're not sure whether the problem is Case 1/2 or it's Case 3/4 --- even if we can empirically distinguish the four cases, we don't have/need to do so.

Area Chair 9Cnm2023-08-20

Reviewer UAYX's comments

It is unfortunate that, for some unknown reasons, Reviewer UAYX was not able to respond to the authors during the reviewer-authors discussion phase. However, after reading the authors' response, I think the authors have done a good job clarifying the concerns regarding the consistency of the estimator and the proposed four case studies. If Reviewer UAYX still has any additional concerns during the remaining time, please utilize this time to engage further with the authors. Thanks. AC

Authorsrebuttal2023-08-21

Sincere thanks

Thank you for taking your precious time and reviewing our submission. Unfortunately, there is still a non-responsive reviewer leaving a very negative review. You gave us a professional review with a high score, and we feel that you are an expert on our research topic. We would greatly appreciate your continued support of our submission during the reviewer-AC discussion.

Authorsrebuttal2023-08-21

Sincere thanks

Thank you for taking your precious time and reviewing our submission. Unfortunately, there is still a non-responsive reviewer leaving a very negative review. You gave us a professional review with a high score, and we feel that you are an expert on our research topic. We would greatly appreciate your continued support of our submission during the reviewer-AC discussion.

Authorsrebuttal2023-08-21

Sincere thanks

Thank you for taking your precious time and reviewing our submission. Unfortunately, there is still a non-responsive reviewer leaving a very negative review. You gave us a professional review with a high score, and we feel that you are an expert on our research topic. We would greatly appreciate your continued support of our submission during the reviewer-AC discussion.

Reviewer UAYX2023-08-21

I'm very sorry for the late resonse. I've been extremely busy these days. I went through the rebuttal by the authors and now I understand that the authors consider Fisher's consistency. (Honestly I'm unfamiliar with the notion.) So, I can raise the rating to "weak accept". Stil, I believe that it's better to investigate the consistency of $\hat{J}_G(f)$ from the algorithmic point of view. You claimed in footnote 3 in page 7 (sorry, I missed it) that $\hat {J}_G(f)$ is statistically consistent. Then I wonder why you do not make this claim as the (main) theorem. Anyway I think we have no time for further discussions. Sorry again for the late comment.

Authorsrebuttal2023-08-21

Dear Reviewer UAYX, It's really great to hear your feedback! We will explain why we didn't make *statistical consistency* (we will use consistency for short in this reply) a second main theorem about GIW. The consistency of training with IW relies on two parts: the consistency of *weight estimation* and the consistency of *weighted classification*. Consider the second part by assuming we already have the first part. As long as the importance weight is upper bounded by a finite constant, the consistency of weighted classification will be almost the same as that of the standard ERM, where the *estimation error bound* of training with IW would be the est err bound of ERM times the above upper bound of importance weight times 2 (here, the bound is further doubled since the empirical risk estimator is only consistent but not unbiased, and *symmetrization* is not as tight as before). Thus, the convergence rate would be the same. The difficulty is the first part. Here, it is truly an estimation problem rather than an optimization problem, and the target is not defined by optimization like in the second part. The target must be the ratio of test density over training density, namely $p_{te}(x,y)/p_{tr}(x,y)$. As a consequence, when talking about the consistency of weight estimation or estimated weights, we have to consider *not only estimation error but also approximation error*. In the literature, we have upper bounds of the difference between estimated importance weights and true importance weights (for example, MSE between them). However, the upper bounds don't really converge to zero when the number of data approach infinity, due to the existence of approximation error. When deep models are used and *representation learning* is involved, there is another key issue: the *feature extractor* $\pi:(x,y)\mapsto z$ is obtained from representation learning, and $p_{te}(x,y)/p_{tr}(x,y)=p_{te}(z)/p_{tr}(z)$ only if $\pi$ is *invertible* (there are two other trivial assumptions, and "only if" becomes "if and only if" with all three assumptions). This assumption is really non-trivial but it is only needed for theoretical purposes. We tried to avoid introducing this assumption, because the practical algorithms don't require to use invertible deep networks or so-called *deep invertible networks*. Fortunately, IW methods have an amazing property: *weighted classification works as long as we have roughly good estimated importance weights*. For example, we know the analytic solution of weights under class-prior shift, and if we assume that the true label is deterministic (which is approximately true for MNIST and CIFAR-10) we also know the analytic solution of weights under class-posterior shift. Intuitively, under class-prior shift, all instances belonging to majority classes should have a very small weight and all instances belonging to minority classes should have a very large weight; under class-posterior shift, all mislabeled instances should have a zero weight and all correctly labeled instances should have a clearly non-zero weight. We can train fairly good classifiers as long as the estimated weights can tell the difference between majority and minority classes or between mislabeled and correctly labeled instances. In fact, in optimization for machine learning, a true (global or local) minimizer with zero gradient may not necessarily be better than a reasonably good solution with near-zero gradient near the true minimizer. The situation of weight estimation is the same, where the true importance weights may not necessarily be better than some reasonably good estimated weights near the true weights, since we have finite data for weighted classification and *what we care most is weighted classification but not weight estimation*. That was also why researchers here don't care too much the consistency of weight estimation. We didn't have enough space to include the above discussion in our original submission. We omitted it because we thought our readers should mainly be deep learning researchers who may not care about this issue. However, we will try our best to include the discussion into our final submission, to avoid any potential confusion. Hope our explanation can clarify your concern and also hope you can take care of yourself during your extremely busy days! When you have some time, as you have promised, hope you can remember to "raise the rating to weak accept". Authors

Program Chairsdecision2023-09-21

Decision

Accept (spotlight)

© 2026 NYSGPT2525 LLC