Does resistance to style-transfer equal Global Shape Bias? Measuring network sensitivity to global shape configuration

Ziqi Wen, Tianqin Li, Zhi Jing, Tai Sing Lee

TL;DR

This paper introduces a new benchmark, the Disrupted Structure Testbench (DiST), to directly measure how well deep learning models understand global object shapes, moving beyond the limitations of existing style-transfer based evaluations. They find that resistance to style transfer doesn't necessarily equate to true global shape understanding, and that self-supervised learning, particularly Masked Autoencoders, significantly improves Vision Transformers' ability to grasp global structures.

What Problem Does This Paper Address?

Deep learning models, especially Convolutional Neural Networks (CNNs), are known to have a strong "texture bias." This means they tend to rely more on the surface details (texture) of an object than its overall form (global shape) for recognition. Humans, on the other hand, are much better at recognizing objects based on their global shape, even when textures are altered.

Previous methods for evaluating a model's "global shape bias" often involved using "cue-conflict" images, where an object's texture is replaced with that of a different object (e.g., a cat with dog fur). The assumption was that if a model could still correctly identify the object despite the texture mismatch, it must be relying on its global shape. However, this paper argues that this approach is flawed. Models trained to resist style transfer might simply learn to focus on local features that remain consistent across different textures, rather than truly understanding the global structure. This leaves a gap in our understanding of how well models truly grasp object shape.

Methods

The core contribution of this paper is the Disrupted Structure Testbench (DiST). DiST works by taking original images and creating new versions where the global shape is intentionally distorted while preserving the original texture. This is achieved using a texture synthesis program (based on Gatys et al., 2015) that matches local features but randomizes the global configuration.

For evaluation, DiST uses an "odd-man-out" task. Models are presented with one original image and two structure-disrupted variants. The model's task is to identify the original image. The metric used is the accuracy of this oddity detection. The authors also propose DiSTinguish, a supervised training method that explicitly trains models to differentiate between original and structure-disrupted images by treating them as separate classes.

Datasets

  • ImageNet-1K: The original dataset used as a source for creating DiST images.
  • Disrupted Structure Testbench (DiST): A newly introduced dataset consisting of original images and their texture-preserving, structure-disrupted counterparts. The paper uses 2400 images from ImageNet-1K to create the DiST evaluation set.
  • Cue-Conflict Dataset (SIN-1K): Used for comparison with existing style-transfer based evaluation methods.

Key Insights and Ideas

  • Resistance to style transfer ≠ Global shape understanding: Models that perform well on cue-conflict datasets (i.e., resist style transfer) don't necessarily have a strong grasp of global shape. They might be using local feature shortcuts.
  • Vision Transformers (ViTs) aren't inherently shape-aware: Supervised ViTs, despite their self-attention mechanisms and positional embeddings, don't show a significant advantage over CNNs on DiST. This suggests that positional embeddings alone don't guarantee global structure perception.
  • Self-supervised learning (SSL) is key for ViTs: Masked Autoencoders (MAE) significantly boost the global structure sensitivity of ViTs, even outperforming human performance on DiST in some cases.
  • Global structure and texture robustness are orthogonal: Improving a model's ability to understand global shapes (via DiST) is independent of its ability to resist texture changes (via style transfer). These are complementary goals.
  • DiSTinguish training is effective: Explicitly training models to distinguish between original and disrupted structures leads to improved performance on DiST.

Key Results

  • Human performance: Humans achieve a high DiST accuracy of 85.5%, significantly outperforming most deep learning models.
  • Style-trained models falter on DiST: ResNet50-SIN, which excels on cue-conflict datasets, performs poorly on DiST, indicating its robustness comes from local feature focus, not global shape understanding.
  • ViT performance: Supervised ViTs perform similarly to CNNs on DiST. However, ViT-B trained with MAE achieves a remarkable 93.7% DiST accuracy.
  • DiSTinguish effectiveness: Training with DiSTinguish significantly improves DiST accuracy (e.g., achieving 98.6% on DiST for ResNet50) while maintaining comparable performance on standard and style-transferred datasets.
  • Orthogonality demonstrated: Combining DiSTinguish training with stylized augmentation leads to strong performance on both DiST and style-transferred benchmarks, showing their complementary nature.

Limitations and Future Work

  • Approximation for DiSTinguish: Generating full structure-disrupted ImageNet-1K datasets is computationally expensive. The paper uses a 10-step optimization for texture synthesis as an approximation, which shows good results but is not a perfect substitute for full optimization.
  • Challenging DiST cases: Some generated structure-disrupted images are difficult for both humans and models to distinguish from the original, particularly when objects and backgrounds are similar. These cases might be less informative for evaluating global shape sensitivity.
  • Future Work: The authors suggest that combining DiST training with style-transfer training can lead to models that are both globally shape-aware and robust to texture variations. Further exploration of SSL methods for enhancing ViT's global structure perception is also implied.

Summary updated

BibTeX
@inproceedings{wen2024does,
  author = {Ziqi Wen and Tianqin Li and Zhi Jing and Tai Sing Lee},
  title = {{Does resistance to style-transfer equal Global Shape Bias? Measuring network sensitivity to global shape configuration}},
  booktitle = {Re-Align @ ICLR},
  year = {2024},
  url = {https://openreview.net/forum?id=in4qCYNWp9},
}
Figure