Lune

ICCV2023Top-tier venue

Understanding Hessian Alignment for Domain Generalization

Sobhan Hemati, Guojun Zhang, Amir Hossein Estiri, Xi Chen

Abstract

Out-of-distribution (OOD) generalization is a critical ability for deep learning models in many real-world scenarios including healthcare and autonomous vehicles. Recently, different techniques have been proposed to improve OOD generalization. Among these methods, gradient-based regularizers have shown promising performance compared with other competitors. Despite this success, our understanding of the role of Hessian and gradient alignment in domain generalization is still limited. To address this shortcoming, we analyze the role of the classifier’s head Hessian matrix and gradient in domain generalization using recent OOD theory of transferability. Theoretically, we show that spectral norm between the classifier’s head Hessian matrices across domains is an upper bound of the transfer measure, a notion of distance between target and source domains. Furthermore, we analyze all the attributes that get aligned when we encourage similarity between Hessians and gradients. Our analysis explains the success of many regularizers like CORAL, IRM, V-REx, Fish, IGA, and Fishr as they regularize part of the classifier’s head Hessian and/or gradient. Finally, we propose two simple yet effective methods to match the classifier’s head Hessians and gradients in an efficient way, based on the Hessian Gradient Product (HGP) and Hutchinson’s method (Hutchinson), and without directly calculating Hessians. We validate the OOD generalization ability of proposed methods in different scenarios, including transferability, severe correlation shift, label shift and diversity shift. Our results show that Hessian alignment methods achieve promising performance on various OOD benchmarks. The code is available here.

Ask Lune

Know this paper in minutes, not an afternoon.

Lune can read every page of it and the top-tier papers that cite it, and gives you its claims, its evidence and its limits, each one cited to the paper it comes from. No skimming, no AI slop.

8 top-tier papers have cited it since. Know what they found before your reviewers do.

Questions to start from

Lune can draw on

the full paper · the top-tier papers that cite it · related work

Get the answer

Free to start. No credit card required.

Lineage

  • Out-of-Distribution Generalization via Risk Extrapolation (REx) cites In Search of Lost Domain Generalization
  • One-Step Generalization Ratio Guided Optimization for Domain Generalization cites Out-of-Distribution Generalization via Risk Extrapolation (REx)
  • One-Step Generalization Ratio Guided Optimization for Domain Generalization cites Gradient Matching for Domain Generalization
  • One-Step Generalization Ratio Guided Optimization for Domain Generalization cites Moment Matching for Multi-Source Domain Adaptation
  • One-Step Generalization Ratio Guided Optimization for Domain Generalization cites In Search of Lost Domain Generalization
  • Gradient Matching for Domain Generalization cites Moment Matching for Multi-Source Domain Adaptation
  • Δ Energy: Optimizing Energy Change During Vision-Language Alignment Improves both OOD Detection and OOD Generalization cites CRoFT: Robust Fine-Tuning with Concurrent Optimization for OOD Generalization and Open-Set OOD Detection
  • Δ Energy: Optimizing Energy Change During Vision-Language Alignment Improves both OOD Detection and OOD Generalization cites In Search of Lost Domain Generalization
  • FedGTST: Boosting Global Transferability of Federated Models via Statistics Tuning cites Gradient Matching for Domain Generalization
  • FedGTST: Boosting Global Transferability of Federated Models via Statistics Tuning cites Moment Matching for Multi-Source Domain Adaptation
  • In Search of Lost Domain Generalization cites Moment Matching for Multi-Source Domain Adaptation
Builds onCited byLeft to right by year; the more cited, the higher.

Cited by top-tier papers8

  1. CRoFT: Robust Fine-Tuning with Concurrent Optimization for OOD Generalization and Open-Set OOD DetectionLin Zhu, Yifeng Yang, Qinying Gu, Xinbing Wang et al.ICML 2024 · 10 citations
  2. Δ Energy: Optimizing Energy Change During Vision-Language Alignment Improves both OOD Detection and OOD GeneralizationLin Zhu, Yifeng Yang, Xinbing Wang, Qinying Gu et al.NeurIPS 2025 · 2 citations
  3. FedGTST: Boosting Global Transferability of Federated Models via Statistics TuningEvelyn Ma, Chao Pan, S. Rasoul Etesami, Han Zhao et al.NeurIPS 2024 · 1 citation
  4. One-Step Generalization Ratio Guided Optimization for Domain GeneralizationSumin Cho, Dongwon Kim, Kwangsu KimICML 2025
  5. SCISSOR: Mitigating Semantic Bias through Cluster-Aware Siamese Networks for Robust ClassificationShuo Yang, Bardh Prenkaj, Gjergji KasneciICML 2025

Builds on10

  1. Moment Matching for Multi-Source Domain AdaptationXingchao Peng, Qinxun Bai, Xide Xia, Zijun Huang et al.ICCV 2019 · 2,239 citations
  2. In Search of Lost Domain GeneralizationIshaan Gulrajani, David Lopez-PazICLR 2021 · 1,416 citations
  3. Out-of-Distribution Generalization via Risk Extrapolation (REx)David Krueger, Ethan Caballero, Jörn-Henrik Jacobsen, Amy Zhang et al.ICML 2021 · 1,163 citations
  4. Learning from Failure: De-biasing Classifier from Biased ClassifierJun Hyun Nam, Hyuntak Cha, Sungsoo Ahn, Jaeho Lee et al.NeurIPS 2020 · 428 citations
  5. Gradient Matching for Domain GeneralizationYuge Shi, Jeffrey Seely, Philip H. S. Torr, Siddharth Narayanaswamy et al.ICLR 2022 · 358 citations

Related papers

  1. Fishr: Invariant Gradient Variances for Out-of-Distribution GeneralizationAlexandre Ramé, Corentin Dancette, Matthieu CordICML 2022 · 262 citations
  2. An Empirical Investigation of Domain Generalization with Empirical Risk MinimizersRamakrishna Vedantam, David Lopez-Paz, David J. SchwabNeurIPS 2021 · 49 citations
  3. On the Connection between Invariant Learning and Adversarial Training for Out-of-Distribution GeneralizationShiji Xin, Yifei Wang, Jingtong Su, Yisen WangAAAI 2023 · 14 citations
  4. Density-driven Regularization for Out-of-distribution DetectionWenjian Huang, Hao Wang, Jiahao Xia, Chengyan Wang et al.NeurIPS 2022 · 17 citations
  5. Quantifying and Improving Transferability in Domain GeneralizationGuojun Zhang, Han Zhao, Yaoliang Yu, Pascal PoupartNeurIPS 2021 · 56 citations
Dusk over the sea between two cliffs drawn in fine vertical lines