NeurIPS 2026QuestionsPapersAreasAboutMarkdown

Beyond Average Flatness: Domain-wise Flatness for Domain Generalization

Seungjun Choi, Heeyoung Kim

NeurIPS page · OpenReview · Open on the map

Category: Optimization & Federated Learning › Neural Network Optimization · Type: new method · Keywords: domain generalization, flatness, sharpness, Hessian eigenvectors, regularization

Areas: Continual Learning & Adaptation › Domain Shift Adaptation › Domain Shift Adaptation

Summary

The paper introduces Cancellation Gap Minimization (CGM), a domain-wise flatness objective that reduces sharpness imbalance and aligns Hessian eigenvectors, improving domain generalization performance.

Explained to a 5-year-old

In machine learning, we teach computers to guess things by looking at lots of examples. Sometimes the computer learns a rule that works for one kind of picture but not another. The paper noticed that a common way to fix this only looks at the average of all pictures, which can hide problems. They created a new way to check each kind of picture separately and make sure the computer is not too picky on any one kind. This helps the computer do better on new pictures it has never seen before.

Explained to a 5-year-old, longer

Imagine you have a toy that can recognize different animals, like cats and dogs. You show it many pictures of cats in one style and many pictures of dogs in another style. When you try the toy on a new picture of a cat that looks a bit different, it might get confused. The researchers looked at a popular method that tries to make the toy’s guesses stable by looking at the average of all pictures. They found that this average method can hide problems because it only cares about the overall picture, not each animal separately. The toy might seem stable overall, but it could still be shaky when looking at a single animal. To fix this, the researchers thought of checking each animal’s pictures separately and measuring how stable the toy is for each one. They also noticed that sometimes the stability measure could be small even if the toy wasn’t really aligned, especially when one animal had many more pictures than the other. To avoid this, they added a new rule that makes sure the stability is balanced across all animals. This new rule helps the toy learn a better, more consistent way to guess. As a result, the toy works better on new pictures it has never seen before. The researchers tested this idea on many different sets of pictures and found it performed better than other methods.

For a technical reader

The paper examines a common regularization technique for domain generalization that encourages flat minima across domains. It shows that this average flatness objective can inadvertently favor solutions where each domain’s sharp directions are misaligned, harming generalization. The authors propose a domain-wise flatness objective that decomposes the original loss into an average term plus a cancellation gap, and they add a coefficient-of-variation regularizer to prevent imbalance. Empirical evaluations on standard benchmarks demonstrate that the new approach consistently outperforms strong baselines and yields better alignment of Hessian eigenvectors. The work provides both a theoretical insight into when flatness translates to good generalization and a practical recipe for building more robust domain-generalized models.

Problem

Domain generalization methods that rely on average flatness can favor solutions where domain-wise sharpness directions are misaligned, leading to poor generalization despite appearing flat on average.

Method

The approach penalizes the average domain-wise sharpness, decomposes the objective into the average flatness term plus a cancellation gap, and adds a squared coefficient-of-variation regularizer to discourage sharpness imbalance across domains.

Results

CGM achieves the best average performance across standard domain generalization benchmarks compared to strong baselines, and diagnostic analyses confirm reduced domain-wise sharpness and better alignment of Hessian eigenvectors.

Contributions

The paper identifies a geometric limitation of average flatness, introduces a domain-wise flatness objective with a cancellation gap, proposes a CV2 regularizer to mitigate sharpness imbalance, and demonstrates superior performance on domain generalization benchmarks.

Limitations and assumptions

The cancellation gap may become small without improving alignment when sharpness is highly imbalanced across domains, requiring additional regularization.

This page was written by language models from the title and abstract of each paper, and the answers were checked by two other models. It can be wrong: check the paper itself. Suggest a correction