Skip to main navigation Skip to search Skip to main content

Moment Alignment: Unifying Gradient and Hessian Matching for Domain Generalization

  • Yuen Chen
  • , Haozhe Si
  • , Guojun Zhang
  • , Han Zhao

Research output: Contribution to journal › Conference article › peer-review

Abstract

Domain generalization (DG) seeks to develop models that generalize well to unseen target domains, addressing 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 a theory of moment alignment for DG. Grounded in transfer measure, a principled framework for quantifying generalizability between domains, we prove that aligning derivatives across domains improves transfer measure. Moment alignment provides a unifying understanding of Invariant Risk Minimization, gradient matching, and Hessian matching, three previously disconnected approaches. We further establish the duality between feature moments and derivatives of the classifier head. Building upon our theory, we introduce Closed-Form Moment Alignment (CMA), a novel DG algorithm that aligns domainlevel 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 our theory and algorithm through quantitative and qualitative experiments.

Original languageEnglish (US)
Pages (from-to)705-717
Number of pages13
JournalProceedings of Machine Learning Research
Volume286
StatePublished - 2025
Event41st Conference on Uncertainty in Artificial Intelligence, UAI 2025 - Rio de Janeiro, Brazil
Duration: Jul 21 2025 → Jul 25 2025

ASJC Scopus subject areas

  • Software
  • Control and Systems Engineering
  • Statistics and Probability
  • Artificial Intelligence

Fingerprint

Dive into the research topics of 'Moment Alignment: Unifying Gradient and Hessian Matching for Domain Generalization'. Together they form a unique fingerprint.

Cite this