Moment Alignment: Unifying Gradient and Hessian Matching for Domain Generalization
Not on the map. Why?
Abstract (arXiv)
Domain generalization (DG) seeks to develop models that generalize well to unseen target domains, addressing the prevalent issue of distribution shifts in real-world applications. One line of research in DG focuses on aligning domain-level gradients and Hessians to enhance generalization. However, existing methods are computationally inefficient and the underlying principles of these approaches are not well understood. In this paper, we develop the theory of moment alignment for DG. Grounded in textittransfer measure, a principled framework for quantifying generalizability between two domains, we first extend the definition of transfer measure to domain generalization that includes multiple source domains and establish a target error bound. Then, we prove that aligning derivatives across domains improves transfer measure both when the feature extractor induces an invariant optimal predictor across domains and when it does not. Notably, moment alignment provides a unifying understanding of Invariant Risk Minimization, gradient matching, and Hessian matching, three previously disconnected approaches to DG. We further connect feature moments and derivatives of the classifier head, and establish the duality between feature learning and classifier fitting. Building upon our theory, we introduce Closed-Form Moment Alignment (CMA), a novel DG algorithm that aligns domain-level gradients and Hessians in closed-form. Our method overcomes the computational inefficiencies of existing gradient and Hessian-based techniques by eliminating the need for repeated backpropagation or sampling-based Hessian estimation. We validate the efficacy of our approach through two sets of experiments: linear probing and full fine-tuning. CMA demonstrates superior performance in both settings compared to Empirical Risk Minimization and state-of-the-art algorithms.
Key facts. Cited by 2 papers in the map (data through 14 Oct 2026). Builds on 44 of its 66 references that are in the map. First posted on arXiv 9 Jun 2025.
Builds on
44 of 66 references.
References · 44
- 2020An Image is Worth 16x16 Words: Transformers for Image Recognition at Scalecited by 30,186
- 2014Deep Learning Face Attributes in the Wildcited by 3,693
- 2015Domain-Adversarial Training of Neural Networkscited by 3,044
- 2017A Broad-Coverage Challenge Corpus for Sentence Understanding through Inferencecited by 2,682
- 2019Invariant Risk Minimizationcited by 1,854
- 2018Moment Matching for Multi-Source Domain Adaptationcited by 1,331
- 2015Learning Transferable Features with Deep Adaptation Networkscited by 1,329
- 2017Adversarial Discriminative Domain Adaptationcited by 1,311
- 2019Distributionally Robust Neural Networks for Group Shifts: On the Importance of Regularization for Worst-Case Generalizationcited by 1,247
- 2016Deep CORAL: Correlation Alignment for Deep Domain Adaptationcited by 1,200
- 2017CyCADA: Cycle-Consistent Adversarial Domain Adaptationcited by 1,082
- 2020In Search of Lost Domain Generalizationcited by 1,054
32 more
- 2017Deeper, Broader and Artier Domain Generalizationcited by 986
- 2020Out-of-Distribution Generalization via Risk Extrapolation (REx)cited by 742
- 2018Annotation Artifacts in Natural Language Inference Datacited by 671
- 2018Recognition in Terra Incognitacited by 658
- 2013Domain Generalization via Invariant Feature Representationcited by 623
- 2021How to train your ViT? Data, Augmentation, and Regularization in Vision Transformerscited by 569
- 2020The Risks of Invariant Risk Minimizationcited by 262
- 2021Gradient Matching for Domain Generalizationcited by 258
- 2015Domain Generalization for Object Recognition with Multi-task Autoencoderscited by 253
- 2021Invariance Principle Meets Information Bottleneck for Out-of-Distribution Generalizationcited by 220
- 2017Central Moment Discrepancy (CMD) for Domain-Invariant Representation Learningcited by 192
- 2020Invariant Risk Minimization Gamescited by 188
- 2021Fishr: Invariant Gradient Variances for Out-of-Distribution Generalizationcited by 186
- 2019Quantifying the effects of data augmentation and stain color normalization in convolutional neural networks for computational pathologycited by 173
- 2017Invariant Causal Prediction for Nonlinear Modelscited by 140
- 2020Learning explanations that are hard to varycited by 132
- 2018Dark Model Adaptation: Semantic Image Segmentation from Daytime to Nighttimecited by 122
- 2021Does Invariant Risk Minimization Capture Invariance?cited by 116
- 2021Evading the Simplicity Bias: Training a Diverse Set of Models Discovers Solutions with Superior OOD Generalizationcited by 83
- 2019Do Image Classifiers Generalize Across Time?cited by 59
- 2020When is invariance useful in an Out-of-Distribution Generalization problem ?cited by 52
- 2022Prompt Vision Transformer for Domain Generalizationcited by 52
- 2020Detect and Correct Bias in Multi-Site Neuroimaging Datasetscited by 45
- 2022Are Vision Transformers Robust to Spurious Correlations?cited by 36
- 2021Quantifying and Improving Transferability in Domain Generalizationcited by 35
- 2022Self-Distilled Vision Transformer for Domain Generalizationcited by 35
- 2022Provable Domain Generalization via Invariant-Feature Subspace Recoverycited by 32
- 2021Causal-based Time Series Domain Generalization for Vehicle Intention Predictioncited by 17
- 2023Understanding Hessian Alignment for Domain Generalizationcited by 15
- 2023Winning Prize Comes from Losing Tickets: Improve Invariant Learning by Exploring Variant Parameters for Out-of-Distribution Generalizationcited by 12
- 2023A Causal Framework to Unify Common Domain Generalization Approachescited by 3
- 2023Invariant-Feature Subspace Recovery: A New Class of Provable Domain Generalization Algorithmscited by 1
Built on by
Citing papers per year: 2025: 1; 2026: 1.
2 papers.