NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

Shape Guided Gradient Voting for Domain Generalization

Jiaqi Xu, Yuwang Wang, Xuejin ChenarXiv 2023 · DOI

Introduction

Deep learning models, particularly Convolutional Neural Networks (CNNs), often struggle with Domain Generalization (DG). While humans can easily recognize an object regardless of its artistic style—be it a photo, a sketch, or an oil painting—CNNs are notoriously "texture-biased." They prioritize local pixel patterns (like fur texture or color) over global structural information. This paper introduces Shape Guided Gradient Voting (SGGV), a novel training strategy designed to shift this bias toward robust, shape-invariant features.

Methodology: Shape Guided Gradient Voting

The SGGV framework operates on the principle that gradients represent the task's underlying requirements. By manipulating these gradients during training, we can curate what the model learns.

Multi-Input Shape Guidance

For every training instance, the model is provided with three distinct versions of the input:

  1. Raw Image: The original source data.
  2. Shape-Distilled Input: An explicit representation of edges and contours (e.g., via Sobel operators or sketch models).
  3. Texture-Augmented Input: A version where textures are corrupted (via jittering or blurring) to emphasize structure.

Gradient Voting Strategy

Instead of standard gradient summation, SGGV employs a "majority voting" mechanism. For each dimension in the gradient vector, the model evaluates the directions suggested by the three inputs. If a clear majority agrees on a direction (governed by a threshold $\tau$), the update is applied. Conflicting or weak signals are zeroed out. This "gradient surgery" filters out domain-specific noise, ensuring weight updates only reflect features consistent across both raw and shape-distilled domains.

Overview of the SGGV training pipeline, illustrating the multi-input guidance and the gradient voting mechanism.

Experimental Evaluation

The authors evaluated SGGV on standard DG benchmarks, including PACS (Photo, Art, Cartoon, Sketch), VLCS, and OfficeHome, using AlexNet as a backbone.

Key Results on PACS

SGGV demonstrated superior performance compared to standard "Deep-All" training and other gradient surgery methods like Agr-Sum. On the PACS dataset, SGGV achieved an average accuracy of 73.34%, significantly outperforming the 66.71% baseline. Notably, on the "Sketch" domain—the most challenging due to its total lack of texture—SGGV improved accuracy by over 11%.

Performance comparison on the PACS dataset. SGGV consistently outperforms baseline methods across various input combinations.

Discussion and Insights

Qualitative analysis using GradCAM visualizations confirms that SGGV encourages the network to focus on global boundaries rather than local high-contrast textures. By treating gradients as task representations and using paired inputs, the model effectively identifies which neurons correspond to robust shape features versus domain-specific clutter.

While SGGV introduces some training overhead due to the triple-input processing, it requires no additional computation during inference. Future work may involve end-to-end learning of the shape-distillation process to further improve robustness against noisy edge extraction.

Conclusion

Shape Guided Gradient Voting provides a powerful mechanism for enforcing shape-bias in CNNs. By aligning the model's learning process with human-like structural recognition, SGGV achieves state-of-the-art performance in domain generalization tasks without sacrificing inference efficiency.

Summary updated

BibTeX
@misc{xu2023shape,
  author = {Jiaqi Xu and Yuwang Wang and Xuejin Chen},
  title = {{Shape Guided Gradient Voting for Domain Generalization}},
  year = {2023},
  eprint = {2306.10809},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2306.10809},
}
Figure