Venue: NeurIPS 2021 Conference

Reviews:

final_score: rating: 7: Good paper, accept
review_content: summary: The authors suggest a different regularizer than IRM based on the gradient  - which has been shown to have failure modes
They instead propose calibration and, focusing on classification (but also with some regression experiments),
(i) show for linear model that under similar conditions as the general position condition for IRM, for k > 2 d_sp a multi-domain calibrated w has zero coefficient on the spurious features
(ii) use MMCE for nonlinear setting on WILDS dataset that illustrate that their method works. 

*Update:* I've carefully read the author's response that has addressed my comments and I still think it's a good paper and should be accepted.

main_review: Strengths
- Clearly and well written
- principled derivation for using multi-class calibration (in practice via the MMCE proxy), quick glance at the proof makes sense 
- good experiments demonstrating impressive effectiveness of calibration on WILDs dataset, comparing also with some alternative calibration methods

Critical comments: 

In terms of theory
- Theorem (that calibration works for sufficiently different training environments) is not surprising given IRM Theorem, uses similar technique -> don’t really see it as a really novel or groundbreaking contribution
- In contrast, more useful/convincing for their story would have been a theorem that shows where calibration works but IRM does not

In terms of methodological contribution 
- the numbers in orig column for Camelyon 17 in Table 2 are not matching the WILDS - in the appendix you can find that the problem is in the choice of the training dataset, i.e. you are using 4 rather than 3 training environments. in the original WILDS paper with 3 training environments ERM had best OOD generalization. how does Clove+ERM compare with IRM for example, for different (i.e. smaller) number of training environments? how about other architectures?
- would be good to add a discussion about computational costs compared to other methods 

Experimental details:
- need some more experimental details on how you use the clove regularizer in practice even though one can guess that you use the same settings as in Kumar et al, Laplace kernel …? it would greatly improve reproducibility (no code was given to us)
- how have the authors chosen the parameters for measuring ECE and for post-hoc calibration (e.g. number of bins)?
- what if you don’t use Clove as fine-tuning but e.g. the IRMv1 regularizer on the entire network when trained from scratch? 
generally: are there scenarios in which post-hoc calibration fails to perform better than methods that exploit multi-domain information during training (e.g. GroupDRO, DeepCORAL, IRM)? what is characteristic for these failure cases? moreover, when does a decrease in ECE not imply an improvement in OOD accuracy?

Minor comments:
- important typo odd classifiers: f(1,-1) = - f(-1,1) - the minus was missing
- in Theorem 1, it would be much clearer to write x \in R^{d_{sp}} (apart from the fact that the subscript sp was a typo). 
- in appendix d_e = d_sp
- the label set for binary classification is not consistent across the paper (sometimes it’s {0, 1}, other times {-1, 1})

limitations_and_societal_impact: They could have a more thorough discussion about limitations (as proposed in detailed comments). Potential negative societal impact same as out-of-distribution detection in general.
review_title: null

final_score: rating: 7: Good paper, accept
review_content: summary: The paper proposes out-of-domain (OOD) generalization of the machine learning models by calibrating them across multiple domains. The paper argues that multi-domain calibration makes the model learn invariant features and therefore free of spurious correlations. The relationship between calibration and invariance has been clearly stated via lemma. The authors prove how multi-domain calibration makes the model free of spurious correlations in the case of a linear Gaussian model and in two different scenarios. Different ways of practically achieving multi-domain calibration, i.e., during model selection, as post-processing techniques on the trained model, and during training have been proposed. Experimental results on the WILDS OOD benchmark and Colored MNIST dataset illustrate the efficacy of the proposed ways for calibrating a model on multi-domains for OOD generalization.

main_review: Strengths:
1) All the definitions and lemmas are very well written.
2) The novel theoretical results on the relation between multi-domain calibration and spurious correlation are a promising step towards OOD generalization.
3) The paper is not restricted to the theory of why multi-domain calibration works for OOD generalization but also proposes practical ways of achieving it during model selection, as post-processing techniques on the trained model, or during training.
4) The experimental results are quite rich and good.

Weakness:
1) The paper is not so easy to follow due to the lack of background or citation(s) for the definitions of causal, anti-causal, spurious features, and isotonic regression, etc. Also, a small paragraph on the mathematical notations used throughout the paper would be helpful. Adding an exact reference to the appendix sections will be helpful to link the paper with the appendix.
2) The motivation for using the causal graph in Figure 1 of Section 2.1 (problem definition) is missing. Is it the standard causal graph used to describe the relationship between the types of features, environment, and the label? Also, the causal graphs used in Section 3 for proving that multi-domain calibrated models are free of spurious features are different from the one in Figure 1. Why did the authors split the graph used in defining the problem statement into two and then proved the properties for these two sub-graphs? The justification for doing so is missing in the paper. Is it possible to prove the desired properties on the entire graph from Figure 1?
3) The authors use invariance and free of spurious correlations interchangeably in the paper. A lemma for invariance <=> free of spurious correlations would be good.
4) Theorem 1 and 2 are proved for binary classifier and regression, respectively. Do both of these theorems hold for multi-class classifier and regression?
5) The authors mention that CLOvE is a calibration technique applicable during training in Line 247. But in experiments, they use CLOvE as a fine-tuning approach on the models already trained with the existing OOD generalization techniques. This has been acknowledged in conclusion (Line369) but it would be good to evaluate the effectiveness of CLOvE by using it in training models from scratch (not based on other OOD generalization techniques).
6) There is a disconnect between the theorems (1 and 2) on calibrated models and the proposed ways of calibrating models on multi-domains. Do the proposed way of calibrating models satisfy the conditions required in the theorems?

Minor comments:
1) All the definitions given in the paper are for a binary classifier. Are they generalizable for a multi-class classifier?
2) What is w* in line 111?
3) There is a notation mismatch for R^d_{sp} in lines 152 and 164.
4) 6 - 9 in line 278 should be 5 - 9.
5) What is table S1 in the appendix? It is not referred to anywhere.
6) It should be "Section 6" instead of "Section 7" in line 847 of the appendix.

limitations_and_societal_impact: The motivation for OOD generalization in Line 23 of the introduction states that "a medical diagnosis system trained on patient data from a few hospitals could fail when deployed in a new hospital.".  OOD generalization might increase trust in the use of these models in the medical domain. The medical domain is one of the most safety-critical domains. The question to be asked here by these multi-domain calibrated models is: Are they good enough to be trusted in safety-critical domains?
review_title: null

final_score: rating: 7: Good paper, accept
review_content: summary: This paper draws an important connection between out-of-domain generalization and calibrated models. Specifically, it is argued that calibrated models are related to invariant representations w.r.t spuriously correlated features, which is necessary for generalization across multiple domains. The paper proves this statement in the case of a multivariate linear-Gaussian model. The authors empirically find a correlation between the Expected Calibration Error (ECE) and OOD performance on Colored MNNIST. Based on these insights, the authors propose three methods for achieving multi-domain calibration of trained models in practice: Approach #1 suggests doing model selection based on the Expected Calibration Error; Approach #2 is intended to augment the trained model by post-processing calibration methods and Approach #3 introduces a calibration objective at train time. In multiple experiments across 5 datasets, reported results suggest that their method outperforms the baselines algorithms without calibration on OOD test environments. 

main_review: **Originality:** To the best of my knowledge this work is an original and novel contribution in relating the problem of finding invariant representations for out-of-domain generalization with the field of calibrated models. It offers important insights, both theoretically and practically and proposes approaches that are agnostic to well-known baseline algorithms in OOD generalization. The related work seems to be adequately covered but I am not familiar enough with the entire literature.

**Quality:** This paper seems technically correct and the claims are well supported and motivated by theorems in the case of a multivariate linear gaussian model. The proposed methods appear to be the effective approaches once the link between calibration and OOD generalization has been established. I did not find any technical flaws in the experiments both on Coloured MNIST and the four chosen datasets from the WILDS Benchmark. Analysis and discussion of the experimental results are adequate. The theoretical claims are somewhat limited in that they are constrained to linear models but the authors are upfront about this and the experiments support that calibration still offers benefits beyond linear settings. 

**Clarity:** I found most parts of this work clearly written and well organized.

I had some problems parsing section 5.3 and how the CLOvE method works in detail. From reading this part, I assumed this method trains the models from scratch under the proposed CLOvE regularizer but in the experiments you only applied it as a fine-tuning method, which confused me because training from scratch seems to be the natural first choice to test this method. What was the reason for this particular choice of only fine tuning the top layers? 

Additionally, I think the paper could benefit if the assumed graph and problem setting in 2.1 is supported or accompanied with a concrete simple example, as with the hospital example in the introduction. This could help to get some intuition about what could be a spurious or non-spurious feature and why we would like to avoid them.

**Significance:** I can imagine results in this paper are clearly important from a theoretical and practical point of view as this work establishes an interesting link with a seemingly unrelated field. While the proposed method already shows improvements upon existing algorithms this opens up a path for further research w.r.t to theory and improved methods.

----
Update: I want to thank the authors for their response and running the additional experiments. I also read the other reviews and remain very positive about this work and will therefore maintain my score. 
limitations_and_societal_impact: There is a very brief discussion on limitations in section 7, which could be discussed more prominently in the respective sections. Societal Impact is addressed properly.
review_title: null

final_score: rating: 7: Good paper, accept
review_content: summary: This work suggests that for well calibrated models will achieve better performance on OOD data. It is shown empirically that expected calibration error (ECE) is negatively correlated with OOD performance, and various methods of selecting calibrated models are suggested. The best performing method involves regulation to encourage calibration during training.
main_review: This paper is clearly written and explores interesting ideas. The naive and rob. calibration methods make excellent baselines, and the empirical performance gain, in particular for FMoW/Camelyon17, is impressive. Limitations are addressed, in particular that only fine-tuning is explored and that theoretical findings are limited to the linear setting. A few questions:

- Are these models still calibrated out of distribution? This would strengthen the argument.
- Why does this work only consider OOD performance. Could this be a method to improve the calibration of models during training instead of needing to apply post-processing? Does it result in lower ECE than standard post processing, or could this method negatively impact accuracy?
- As I am less familiar with these ideas, I would have appreciated additional intuition. I did not find the motivating hospital example particularly obvious/insightful. The following motivation makes more sense to me: If I have two classifiers which have similar accuracy but one is more calibrated, I would rather choose the calibrated classifier as I would assume it is using the right information. However, I am not sure why multi-domain is important for this motivation or method?

-- Added --

I acknowledge the response and will keep my score as is
limitations_and_societal_impact: Adequately addressed.
review_title: null

Meta-review: Authors make substantive contributions to the connections between out-of-distribution generalization and calibration. I agree with the reviewers that the contributions are significant and interesting. To make the paper more accessible, I encourage the authors to make the exposition (at least the first few sections) more friendly to readers who don’t have a causal inference background.
Decision: Accept (Poster)