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:
- Raw Image: The original source data.
- Shape-Distilled Input: An explicit representation of edges and contours (e.g., via Sobel operators or sketch models).
- 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.
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%.
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