Shape-Texture Debiased Neural Network Training

Yingwei Li, Qihang Yu, Mingxing Tan, Jieru Mei, Peng Tang, Wei Shen, Alan L. Yuille, Cihang Xie

This ICLR 2021 paper tackles a fundamental quirk of Convolutional Neural Networks (CNNs): their tendency to "cheat" by over-relying on either the shape or the texture of an object to make a prediction.

TL;DR

CNNs are often biased toward either shape or texture, which limits their ability to generalize to new environments. By training models on "cue-conflict" images (e.g., a chimpanzee-shaped object with a lemon texture) and providing supervision for both cues simultaneously, the authors significantly improve model accuracy and robustness across a wide range of benchmarks.

What Problem Does This Paper Address?

Humans recognize objects using a holistic mix of shape and texture. However, research has shown that CNNs trained on standard datasets like ImageNet are often heavily biased toward texture. Conversely, models trained specifically to ignore texture (like those trained on "Stylized-ImageNet") become overly biased toward shape.

This bias is a double-edged sword. As illustrated below, a shape-biased model might mistake a fur coat for a "poncho" based purely on its outline, while a texture-biased model might look at the same coat and predict "Egyptian cat" because of the fur pattern.

Comparison of model predictions based on shape and texture biases.

This paper aims to "debias" neural networks, forcing them to learn a more balanced representation that values both cues. This leads to better performance on clean data and much higher resilience to image corruptions and adversarial attacks.

Methods

The authors propose a simple yet effective training framework to overcome these biases:

  1. Cue-Conflict Image Generation: They use style transfer (specifically AdaIN) to create synthetic training images where the shape comes from one class (e.g., a chimpanzee) and the texture comes from another (e.g., a lemon).
  2. Dual-Label Supervision: This is the core innovation. Instead of telling the network the image is just a chimpanzee or just a lemon, they use a soft label: $$\tilde{y} = \gamma \cdot y_s + (1 - \gamma) \cdot y_t$$ where $y_s$ is the shape label, $y_t$ is the texture label, and $\gamma$ is a hyperparameter (found to be optimal at $0.8$). This forces the network to acknowledge both components during backpropagation.

  3. Auxiliary Batch Normalization: To handle the "domain gap" between natural images and these synthetic cue-conflict images, they use an auxiliary Batch Normalization (BN) layer specifically for the augmented data, a trick that helps stabilize training.

Key Insights and Ideas

  • Biased Models are Complementary: The authors discovered that shape-biased and texture-biased models fail in completely different ways. This suggests that the information needed for perfect recognition is present in the data, but standard training fails to capture both simultaneously.
  • Labeling is More Important than Data: Simply adding cue-conflict images to the training set isn't enough. If you label a "chimpanzee-shaped lemon" as just a "chimpanzee," the model learns to ignore texture even more. The dual-labeling strategy is essential to prevent the model from simply switching from one bias to another.
  • Orthogonality to Other Augmentations: The method works harmoniously with other popular techniques like Mixup and CutMix, providing an additive boost in performance.

Key Results

The models were evaluated across a rigorous suite of benchmarks (ImageNet, ImageNet-A/C/R/Sketch, Stylized-ImageNet, and PASCAL VOC). The results across the board were impressive, particularly for robustness:

  • Standard Accuracy: A ResNet-152 trained with this method saw a +1.2% boost on top-1 ImageNet accuracy (reaching 79.8%).
  • Robustness Gains: The same model saw massive improvements on "hard" datasets: +5.2% on ImageNet-A (natural adversarial examples), +8.3% on ImageNet-C (common corruptions), and +11.1% on Stylized-ImageNet.
  • Adversarial Defense: It improved resistance to FGSM adversarial attacks by a staggering +14.4%.
  • Segmentation: On PASCAL VOC, the method improved mIOU by 1.1%, showing that "debiasing" helps the model better understand object boundaries and textures in complex scenes.

Limitations and Future Work

  • Computational Overhead: Training with this method effectively doubles the amount of data the model sees per epoch, increasing training time (though the authors show it outperforms a "vanilla" model trained for twice as long).
  • Hyperparameter Tuning: The balance between shape and texture ($\gamma$) is a manual hyperparameter. While $0.8$ worked well for ImageNet, different datasets might require different balances.
  • Future Directions: The authors suggest this framework could be extended to other computer vision tasks beyond classification and segmentation, potentially helping models in robotics or medical imaging where cue-reliance is critical.

Summary updated

BibTeX
@inproceedings{li2021shape,
  author = {Yingwei Li and Qihang Yu and Mingxing Tan and Jieru Mei and Peng Tang and Wei Shen and Alan L. Yuille and Cihang Xie},
  title = {{Shape-Texture Debiased Neural Network Training}},
  booktitle = {International Conference on Learning Representations},
  year = {2021},
  url = {https://openreview.net/forum?id=hp5YrsFlkM9},
}
Figure