Venue: NeurIPS 2021 Conference

Reviews:

final_score: rating: 6: Marginally above the acceptance threshold
review_content: summary: This paper considers the domain generalization setting where data in all domains can be transformed into one another by a transformation G. Then, authors then propose to learn a predictor invariant to this transformation. Experimental results show some encouraging results.
Overall approach presented is interesting, stimulating and the use of different optimization techniques to formulate the problem is pleasant. However, there is a ‘fatal’ problem in the framework, either by a mathematical mistake (i.e., moving from Eq 31 to 32 in the appendix), or authors have failed to declare a very strong assumption that that p(y|x) = p(y | G(x,e)) (see detailed comments below). If this point can be clarified, I would be willing to reconsider my rating.

----- post-rebuttal
I want to thank the reviewer for their thorough rebuttal. While I still want to see some solid analysis on the effect of the transform G and the assumption, the new discussions made sense and early empirical results on testing far domains are encouraging. The authors, please, make sure you factor them into the paper as they will not only enhance the understanding but also increase the validity of your work.

main_review: The authors implicitly assume that: after transport x ~ P(x) by transformation G( . , e), the labeling mechanism is unchanged, i.e., P(Y | x) = P(Y | G(x,e)) (Proposition 4.3)

This assumption allows authors to sample from a common distribution, i.e., (x, y) ~ P(x, y) instead of sample directly from distribution of each domain, i.e., (x, y) ~ P^e(x, y) (Proposition 4.3, equation 32). Concretely, we will derive an equivalent sampling process to (x, y) ~ P^e(x, y) as follow:
(x, y) ~ P^e(x, y) can be cast into: first x ~ P^e(x), then y ~ P^e(Y|x) (Proposition 4.3, equation 28)
Due to Assumption 4.1, P^e(Y|x) = P(Y|x) for all x, the sampling process is: first x ~ P^e(x), then y ~ P(Y|x) (Proposition 4.3, equation 30)
Due to Assumption 4.2, there is some G(. , e) that transports P(x) to P^e(x). This means the sampling process x ~ P^e(x) can be replaced by x ~ P(x), then passing G(x, e) to the label generative process. Therefore, the labeling mechanism must be y ~ P(Y| G(x, e)). The whole process is x ~ P(x), y ~ P(Y| G(x, e)), and is equivalent to (x, y) ~ P^e(x, y).
However, the authors instead sample label as y ~ P(Y| x) with x is from P(x), and G(x, e) is only used in the loss function (Proposition 4.3, equation 30, inner-loop expectation). This leads to sampling process x ~ P(x), y ~ P(Y| x) is not equivalent to x ~ P(x), y ~ P(Y| G(x, e)) due to the change in labeling mechanism.

Authors’ derivation can work under further assumption that P(Y|X) is G-invariant: “P(Y| x) = P(Y| G(x, e)) for all x and e”. However, this is a rather strong assumption, for example it doesn’t hold when there is a large shift in label marginals. Note that this requirement is an additional assumption, and is not coincide with Assumption 4.1, since Assumption 4.1 says all domains e must use the same set of condition distributions, i.e., P^e(Y|x) = P(Y|x) for all x, but it doesn’t require P(Y|x) = P(Y|x’) for 2 different x, x’.

To illustrate further, let R be the data space and {-1, 1} be the label set. Moreover, all domains P^e(x,y) must share the same conditional P(Y|X), that if X<0, assign Y = -1, and if X>0, assign Y=1. Considering P^e(x, y) with P^e(x) = Uniform[0,1], we have for all x ~ P^e(x), label y=1. Furthermore, let P(x,y) be another distribution with P(x) = Uniform[-1,0], then for all x ~ P(x), label y = -1. Next, we will find a sampling process equivalent to (x, y) ~ P^e(x, y). We can first sample from x ~ P(x), and then shift data by G(x) = x+1 to obtain P^e(x). However, if we label by y ~ P(Y|x), all labels will be -1, because X<0 and P(Y = -1 | X<0) =1, and hence we do not obtain the equivalence of (x, y) ~ P^e(x, y). The correct sampling process must be x ~ P(x), transport to G(x), and then label y ~ P(Y|G(x)), which will now return y=1, since G(x)>0 and P(Y = 1 | X>0) =1. This toy experiment shows that this paper’s approach might fail in situations where domains have different label margins.

Using rather unrealistic assumption that labeling mechanism is unchanged after transforming x into G(x, e), for all x ~ P(x) and for all domain e, authors define the key optimization problem (Problem 4.6) in Proposition 4.5, which seek to find a function f that is also invariant to transformation G, i.e., f(x) = f(G(x, e)). However, as demonstrated before, assumption “P(Y| x) = P(Y| G(x, e)) for all x and e” is unrealistic, therefore this optimization problem doesn’t guarantee to reflect real datasets.

Generalization of G is critical to generalization of f, which is expressed in the infinite-dimensional constraint term in the Lagragian. However, in the empirical version, this constraint is approximated by summing over training domains, which is usually of small number in most real datasets. Therefore, G could learn to transform between these training domains, but might not be able to do so for target domains, notably target domains of large dissimilarity to training domains, because G is a map between high-dimensional input space, trained using only a small number of domains. Therefore, for these “distant” target domains, it is unlikely that f generalizes, and f can only work on target domains closely similar to training domains. It is therefore interesting to see (1) the performance of predictor f in the case where the target domain is very different to each training domain, (2) performance of this method on other datasets with more diverse domains, and (3) how the number of training domains affects the generalization of f.

The form of distance d is not discussed.
Typos and other errors
Line 217, P(\mathcal{E}_{all}) is not explicitly defined.
Line 926, expectation over P^e(x) is missing
Line 973, eq 54, drop expectation over risk difference



limitations_and_societal_impact: The author didn’t adequately address the limitation of the transformation G. Moreover, since there is an implicit assumption, this method might not work properly in some situation (shifted label marginals)
review_title: null

final_score: rating: 7: Good paper, accept
review_content: summary: This paper proposes a new model specifically designed for Out-of-Domain (OOD) detection. The authors start by setting up the domain generalization problem by explaining that (x,y) ~ p_e(x,y) is sampled from different domains ‘e’ in the training and test phase. Making certain assumptions such as (1) the inter-domain variation is only because of p(x), and (2) existing a transformative network g(x,e) that can map observation x to different domains e, the authors propose to slightly modify the problem definition which they call “Model-Based Domain Generalization”. This problem is slightly easier to deal with and under certain conditions, guarantees optimality. The authors finally do an extensive set of experiments to demonstrate the proposed algorithms significantly improves OOD detection results over previous models, as well as the role of regularizing theta with the distance regularizer. 
main_review: [Overall Comment]

I think this is a good paper. OOD Detection is definitely both an important and popular topic in the field, especially given that, as the authors point out, it’s impact on ML safety. So I certainly think the OOD community can benefit from the findings of this paper. The transition from problem 3.1 to 4.6 certainly makes sense and I think it’s quite elegant. I applaud the authors given that I think this is a lot of content for a single paper, and overall, I think the authors did a good job condensing their theoretical and experimental contributions while ensuring that things are as clear as possible. Given both the methodology and the improvements of the OOD results, I’m happy to recommend acceptance.

[Minor Comments]

-The problem was set-up quite well. I’m not too familiar with the OOD detection field so I found Section 3 quite useful and easy to read (Figure 1 in particular). 

-Could the authors comment on the distinction between OOD detection in discriminative models (which is the setting in the current manuscript) and in purely generative models like Flows and VAEs etc? 

-While I understand the space constraints, having no conclusion or discussion that summarizes the work is something I would consider a major flaw given the venue, especially given the fact NeurIPS allowed an additional page this year. I will  leave to the AC and other reviews to determine to what extent this is acceptable. 

-The supplementary contains the main manuscript as well. 

-I think the related work was discussed very well. 

[Clarity]

The paper reads well overall. Even though this is a lot of content for a single paper, I think overall the authors did a good job at condensing the materials while making sure that the presented ideas are mostly clear.  

Typos:
Page 5, (C3) “We do ‘NOT’ have access to the set of all domains ...”

[Significance]

Given both the the extensive theoretical studies and the improvements of the OOD results, I think the paper can make a valuable contribution to NeurIPS.



limitations_and_societal_impact: The authors sufficiently discussed the potential impact of OOD.
review_title: null

final_score: rating: 6: Marginally above the acceptance threshold
review_content: summary: This paper proposes a framework for domain generalization which involves learning a transformation between domains and optimizing the worst case loss over these transformations. They formulate this as a min max optimization problem and eventually solve the dual of a relaxed version of the problem. Empirically, they find that their algorithm improves a lot for ColoredMNIST and Camelyon-WILDS especially, which are datasets where the domain transformations are somewhat simple (color shift). They get a modest gain on a satellite dataset FMoW-WILDS.
main_review: Significance

Domain generalization is an important problem, although it's unclear whether it is feasible to make meaningful progress. Implicitly, this paper shows that for particular domain generalization problems with simple transformation shifts, we can learn these transformations well and generalize OOD. Indeed, we shouldn't expect to be able to learn transformations between domains for general shifts, which can be very complex and hard to generalize across domains. The paper could state this more clearly, that the method needs to take advantage of some structure in the transformations (like color shift). 

Originality

The overall setup is quite similar to [1], which learns generative perturbations of the data for adversarial learning. The difference is that the learning perturbations here use the different domains. [1] uses PGD adversarial training to optimize the min-max problem; this brings to question whether the primal-dual iterations are needed in the MBDG framework, and whether the problem in Prop 4.3 can be optimized directly through adversarial training.

Quality

The paper has some good ablations, for example it shows empirically that learned transformations on the training domains (using MUNIT) improve over fixed augmentations such as RandAugment for the MBDG framework. They give a mathematical derivation of the framework through the language of optimization, although it's unclear whether we can get theoretical insights from the general mathematical framework beyond suggesting an optimization algorithm (which perhaps could be replaced with adversarial training?). 

- When testing the regularization version of MBDG, the paper shows that with $\lambda =1.0$ the performance isn't as good as MBDG with primal-dual iterations, but it's not clear whether $\lambda$ is varied. A proper comparison would have a sweep over $\lambda$, with some protocol for selecting $\lambda$ (some kind of validation accuracy, either ID or OOD).
- While the abstract states improvements "up to 30\%", the range of improvement is pretty wide (30\% on ColoredMNIST. 20\% on Camelyon17 but 1% on FMoW), and care should be taken when presenting these results faithfully. 
- According to Figure 4, RandAugment with color is quite effective with MBDG for Camelyon. What is the comparison with ERM + RandAugment? 
- The MBDG model improves on average over the PACS domains, but the improvement is mostly driven by improvement on sketch. This suggests that the MBDG model is best suited for particular shifts (yet to be characterized).
- For example, the G-invariance is the main special part of the theory, and it's clear from the relaxation formulation that when the G-invariance margin is small, then the gap is smaller between the relaxed problem and the original. The theory has some limitations, like that the hypothesis classes are of finite VC dimension, so it doesn't hold for deep models.
- G-invariance seems stronger than what is needed to solve the problem in Prop 4.3. In particular, it isn't necessary that $f(x) = f(G(x,e))$, but that for all $e, e' \in \varepsilon_{all}$, $f(G(x,e)) = f(G(x,e'))$. Maybe G-invariance works better in practice, but it's unclear from a formulation standpoint why this is formulated this way.

Clarity

The paper is clearly written, although the paper seems a little unfinished, with no conclusion. Secion 7.3 (PACS) lacks an adequate description of the task. 


[1] Eric Wong and J. Zico Kolter. Learning Perturbation Sets for Robust Machine Learning, 2020.
limitations_and_societal_impact: 
While invariance and generalization to new domains could improve real world tasks like Camelyon, the authors mention that invariance is not always a desirable property, and models could be overly invariant / enforcing invariance can worsen extrapolation or at least change the inductive bias. They do not believe that there will be negative societal impacts relative to the body of work that already exists.
review_title: null

Meta-review: The reviewers reached a consensus that the paper has an interesting and novel idea and achieved good improvements over prior works on many (though not all) benchmark datasets. The AC recommends acceptance. 
Decision: Accept (Poster)