Spatial Transformer Networks for Curriculum Learning

Fatemeh Azimi, Jean-Francois Jacques Nicolas Nies, Sebastian Palacio, Federico Raue, Jörn Hees, Andreas Dengel · DOI · OpenReview

Abstract

Curriculum Learning (CL) has long been recognized for its potential to improve model convergence and generalization by presenting training examples in increasing order of difficulty. However, defining an objective measure of "difficulty" remains a significant challenge. This paper proposes an automated approach to CL using Sequential Spatial Transformer Networks (SSTNs). By leveraging the SSTN's ability to iteratively "clean" and center objects within cluttered images, the authors generate a spectrum of task difficulty. Training a classifier through an incremental difficulty schedule—starting with processed, simplified images and transitioning to raw, noisy data—yields substantial performance gains. On the Cluttered MNIST benchmark, this method achieves 95.0% accuracy, a 3.8 percentage point improvement over standard data augmentation.

Introduction

The core philosophy of Curriculum Learning (CL) is inspired by human education: mastering simple concepts before tackling complex ones. In deep learning, this often translates to faster training and the avoidance of poor local minima. Despite these benefits, CL is frequently hindered by the need for manual data ranking or the use of auxiliary "teacher" models to sort samples by difficulty.

This research addresses the automation of difficulty generation, particularly for visual tasks where objects are obscured by noise or clutter. The authors introduce a framework where a Sequential Spatial Transformer Network (SSTN) acts as a generative tool to create a "hard-to-easy" spectrum, facilitating a seamless curriculum without manual intervention.

Methodology: Sequential Spatial Transformer Networks

The proposed architecture centers on the Spatial Transformer Network (STN), which learns to apply affine transformations (scaling, rotation, translation) to input images. These transformations are designed to "normalize" the input, making it easier for a downstream classifier to process.

Architecture of the Sequential Spatial Transformer Network (SSTN) policy and its interaction with the bilinear sampler to produce transformed images.

The authors extend the standard STN into a Sequential STN (SSTN). In this setup, the transformation is decomposed into $T$ discrete steps. This sequential nature creates a natural "difficulty slider":

  • Step 0: Represents the original, cluttered, and difficult input image.
  • Step $T$: Represents the fully processed, centered, and de-cluttered "easy" version of the image.

By varying the number of transformation steps applied during training, the model can control the signal-to-noise ratio of the data presented to the classifier.

Automated Curriculum Strategies

Using the difficulty spectrum generated by the SSTN, the authors evaluate three distinct training strategies:

  1. Mixed-batch: Mini-batches contain a fixed ratio of original and SSTN-processed images throughout the entire training process.
  2. Dynamic Mixed-batch: The ratio of "easy" (processed) images to "hard" (original) images starts high and gradually decreases over time.
  3. Incremental Difficulty: This strategy proved most effective. Training begins exclusively on images that have undergone the maximum number of transformation steps ($T$). As training progresses, the number of steps is reduced according to a schedule until the model is training solely on the raw, original data.
Comparison between raw cluttered images (top) and the "cleaned" versions produced by the SSTN (bottom), illustrating the difficulty spectrum.

A key advantage of this approach is that the SSTN is only required during training. At inference time, the classifier operates independently on raw images, maintaining computational efficiency.

Experimental Setup and Results

The strategies were tested on two synthetic benchmarks: Cluttered MNIST and Cluttered Fashion-MNIST. In these datasets, target objects are randomly placed and surrounded by distracting fragments, requiring the model to learn robust visual attention.

The Incremental Difficulty strategy consistently outperformed both the raw baseline and standard data augmentation techniques.

Method Cluttered MNIST (Acc %) Cluttered Fashion-MNIST (Acc %)
Baseline (No Augmentation) 87.9 72.6
Baseline* (With Data Aug) 91.2 83.6
Incremental Difficulty (Ours) 95.0 84.9

On Cluttered MNIST, the proposed method provided a 3.8pp boost over data augmentation and a 7.1pp boost over the raw baseline. The results suggest that starting with high-signal images allows the network to learn a robust internal representation of the object first, which then serves as a strong prior when noise is introduced.

Discussion and Conclusion

The study highlights several critical insights for automated curriculum learning:

  • SSTNs as Teachers: Sequential transformers provide a granular, automated way to control task difficulty without manual labeling.
  • The Importance of the Target Distribution: It is essential to conclude the curriculum on the raw data distribution to ensure the model is optimized for real-world inference.
  • Scheduling: Simple linear decay of transformation steps was found to be more effective than more complex schedules like cosine or exponential decay.

While highly effective on synthetic clutter, future work remains to determine how these SSTN-based curricula scale to more complex, unstructured noise found in large-scale datasets like ImageNet. Nonetheless, this work provides a powerful template for leveraging architectural components to automate the "human-like" learning process in neural networks.

Summary updated

BibTeX
@misc{azimi2021spatial,
  author = {Fatemeh Azimi and Jean-Francois Jacques Nicolas Nies and Sebastian Palacio and Federico Raue and Jörn Hees and Andreas Dengel},
  title = {{Spatial Transformer Networks for Curriculum Learning}},
  year = {2021},
  eprint = {2108.09696},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2108.09696},
}
Figure