Introduction
Deep neural networks are notoriously "lazy," often relying on local textures rather than global shapes to make predictions. While humans can easily recognize a dog whether it’s a high-resolution photo, a charcoal sketch, or a stylized painting, Convolutional Neural Networks (CNNs) struggle. This "texture bias" leads to poor domain generalization: a model trained on photos often fails when tested on sketches or artistic renderings because the superficial features it relied on have vanished or changed.
Existing solutions often require complex adversarial training or massive amounts of stylized data. To address this, researchers introduce RandConv, a simple yet powerful data augmentation technique that passes images through random, non-learned convolutional filters to scramble local textures while preserving global structures. By forcing models to ignore these randomized textures, the authors achieve state-of-the-art performance in domain generalization, particularly on challenging "shape-only" tasks like sketch recognition.
Methods: The RandConv Approach
The core proposal is RandConv, a data augmentation strategy that uses a random convolution layer as the first step in the training pipeline to bake "shape-bias" into visual representations using only a single training domain.
- Randomized Textures: During training, an input image is convolved with a filter whose weights are sampled from a Gaussian distribution. Because these weights are random and change every time, the "texture" of the resulting image is essentially noise, but the spatial relationship between pixels remains largely intact.
- Multi-scale Design: The authors use a pool of different filter sizes ($k \times k$). Smaller filters (like $1 \times 1$) act as random color jittering, while larger filters distort local structures more aggressively.
- Mixing ($RC_{mix}$): To prevent the model from completely ignoring useful color information, the original image is often mixed with the RandConv output using a blending coefficient $\alpha$.
- Consistency Regularization: To ensure the model learns a truly invariant representation, three different RandConv-augmented versions of the same image are passed through the network. A Kullback-Leibler (KL) divergence loss is then used to force the predictions to be consistent across these variations.
Key Insights
- Random Convolutions are Shape-Preserving: The authors provide a theoretical justification based on the Johnson-Lindenstrauss lemma. They show that random linear projections (which a convolution is, locally) approximately preserve the relative distances between image patches. If two patches belong to the same shape, they remain "similar" even after being scrambled by random weights.
- Infinite Domains: Unlike "Style Transfer" augmentations that require a fixed set of artist styles, RandConv creates an infinite variety of synthetic domains. This prevents the model from over-fitting to any specific "look."
- The "Sketch" Breakthrough: The most striking insight is how well this works for sketches. Since sketches have no texture, a model trained with RandConv—which has learned to ignore texture entirely—is perfectly suited for the task.
Experimental Results
The authors evaluated their method across several rigorous benchmarks, including digit recognition (MNIST variants), PACS (Photo, Art Painting, Cartoon, Sketch), and ImageNet variants (ImageNet-Sketch and ImageNet-R).
- Digit Generalization: On the digit benchmarks, RandConv outperformed the previous state-of-the-art (M-ADA) by a massive 17% in average accuracy across unseen domains.
- PACS Sketch: On the notoriously difficult "Sketch" domain of PACS, their method improved the baseline by roughly 14% (moving from ~55% to ~69% accuracy).
- ImageNet-Sketch: When training on standard ImageNet and testing on sketches, RandConv improved Top-1 accuracy from 10.28% (baseline) to 18.09%, outperforming more complex "Stylized-ImageNet" methods.
- Robust Pretraining: A model pretrained on ImageNet using RandConv provides a much better starting point for downstream tasks. By using a RandConv-pretrained AlexNet, they achieved 76.11% accuracy on the PACS Sketch domain, which at the time was the best-reported performance for that architecture.
Limitations and Future Work
While highly effective for shape-based generalization, the authors acknowledge that for tasks where texture is the primary signal (e.g., fine-grained recognition of bird species or fabric textures), RandConv might hurt performance by encouraging the model to ignore relevant features. Additionally, while simpler than adversarial training, the method introduces new hyperparameters like the pool of filter sizes ($k$) and the mixing coefficient ($\alpha$).
Future work could explore how to disentangle shape and texture representations more explicitly, rather than just penalizing texture, and investigate whether the randomness in RandConv mimics biological mechanisms in the human visual system.
Summary updated