Standard deep learning models are notoriously brittle. A model trained on clean images might fail completely if you just add a bit of blur or noise. While researchers have developed many techniques to make models robust to these "elemental" corruptions, the real world rarely presents just one problem at a time. Think of driving in a storm: you might face rain, fog, and low light all at once.
In their paper, "Modularity Trumps Invariance for Compositional Robustness," Ian Mason and his colleagues from MIT and Fujitsu explore whether our current best ideas for robustness actually hold up when corruptions start stacking.
TL;DR
Neural networks struggle to generalize to unseen combinations of image corruptions (like blur plus noise), even when trained on each corruption individually. This paper demonstrates that the standard approach of seeking "invariant representations" fails this task, whereas a modular architecture that explicitly "undoes" individual corruptions generalizes significantly better.
What Problem Does This Paper Address?
Most research on model robustness focuses on single corruptions (e.g., the ImageNet-C benchmark). However, visual space is inherently compositional. If a model is robust to "Blur" and robust to "Noise," we expect it to be robust to "Blur + Noise."
The authors identify a gap: standard Domain Generalization (DG) methods usually try to learn invariant representations—features that look the same regardless of the corruption. The authors question if this "one-size-fits-all" invariant representation is actually sufficient for compositional tasks, or if we need architectures that better reflect the underlying structure of the data.
Methods
The researchers compared three distinct training strategies:
- Empirical Risk Minimization (ERM): The standard baseline—training on all elemental corruptions jointly.
- Contrastive Training (Invariance): A popular DG approach using a pairwise contrastive loss (similar to SimCLR). This forces the network to map a "blurred" image and a "noisy" version of the same image to the exact same point in latent space, theoretically building invariance.
- Modular Approach: Instead of one monolithic network, they used a shared backbone with specific modules for each corruption. Each module is trained to "undo" its specific corruption in the network's latent space. At test time, if an image has three corruptions, the model sequentially applies the three corresponding modules.
Datasets
The authors evaluated these methods across three diverse image classification tasks:
- EMNIST: Handwritten characters (47 classes).
- CIFAR-10: General objects (10 classes).
- FACESCRUB: Face recognition (388 classes).
For each dataset, they defined 7 training domains (Identity + 6 elemental corruptions like Swirl, Invert, and Gaussian Blur) and 160 test domains consisting of compositions of 2 to 6 corruptions.
Key Insights and Ideas
- Invariance is not a Silver Bullet: The most striking "aha moment" is that forcing a model to be invariant to elemental corruptions during training does not make it robust to their combinations.
- The Correlation Gap: The authors found no meaningful correlation between how invariant a representation was on training data and how well it performed on out-of-distribution compositions. This challenges a central pillar of Domain Generalization theory.
- Structure over Statistics: The modular approach wins because its architecture mirrors the compositional nature of the problem. By treating each corruption as a separate "mechanism" to be undone, the model can handle combinations it has never seen before.
Key Results
The quantitative results across all datasets tell a consistent story:
- Modularity Wins: The modular approach consistently outperformed both ERM and Contrastive training. As the number of corruptions in a composition increased (making the task harder), the performance gap between modular and monolithic models widened.
- The "Invariance" Marginalia: Contrastive training—the industry standard for building robust representations—offered only marginal improvements over basic ERM.
- Complexity Ceiling: For all methods, accuracy drops sharply as compositions become more complex. While models handle 2-3 corruptions relatively well, they still struggle with 5-6 simultaneous corruptions, often falling toward chance levels.
Limitations and Future Work
While modularity is the clear winner here, the authors acknowledge several hurdles for real-world deployment:
- The "Oracle" Assumption: Currently, the modular model needs to be told which corruptions are present in a test image to apply the right modules. A truly autonomous system would need to infer this on the fly.
- Sensitivity to Order: The order in which modules are applied matters, particularly for non-commutative corruptions.
- Module Placement: The performance of the modular approach is sensitive to where the modules are inserted in the network hierarchy.
- Future Direction: The ultimate goal is to move toward "learning to decompose"—developing systems that can automatically discover these modular mechanisms from unstructured, real-world data without manual labels for every corruption.
Summary updated