DDS-NAS: Dynamic Data Selection within Neural Architecture Search via On-line Hard Example Mining applied to Image Classification

Matt Poyser, Toby P. BreckonarXiv 2025

TL;DR

DDS-NAS drastically accelerates Neural Architecture Search (NAS) by up to 27x by dynamically selecting a smart subset of training data instead of using the entire dataset. By combining online hard example mining and curriculum learning via a low-dimensional autoencoder and $kd$-trees, it identifies the most informative images to train on in logarithmic time without sacrificing final model accuracy.

What Problem Does This Paper Address?

Neural Architecture Search (NAS) has revolutionized deep learning by automating the design of neural network topologies. However, NAS is notoriously resource-intensive, often requiring days or weeks of GPU compute time. While most research focuses on making the architectural search space more efficient, very little attention has been paid to the data pipeline itself.

Standard NAS frameworks repeatedly feed thousands of redundant or "easy" images to the network during the search phase. While Hard Example Mining (HEM) can filter out these redundant images by focusing only on data points that produce high loss, traditional HEM requires a full forward pass over the entire dataset at each iteration to identify these hard examples. This introduces a massive computational overhead, defeating the purpose of trying to speed up NAS.

Methods

The authors introduce DDS-NAS (Dynamic Data Selection within Neural Architecture Search), a framework that seamlessly integrates into existing gradient-based NAS methods (like DARTS, P-DARTS, and TAS).

Figure 1: Overview of the DDS-NAS search phase. After a given training iteration, we determine whether a sufficient percentage of the data in the current subset is correctly classified, according to some a priori mas- tery threshold. If the subset has been mastered, we reformulate it dynamically. Hard images in the current subset are retained, according to some a priori hard-ness threshold, while easy images are replaced with the most different image from the same class. To determine the most different image, we employ an (approxi- mate) furthest-neighbour kd-tree whereby each image is represented by the auto-encoded representation of its features within the latent space.

The core pipeline operates as follows:

  1. Mastery-Based Curriculum: The NAS model is trained on a small subset of data ($n'$ images) until it "masters" it (reaches a predefined accuracy threshold).
  2. Dynamic Resampling: Once mastered, the "hard" images (high cross-entropy loss) are retained, while the "easy" images are discarded and replaced.
  3. Dissimilarity as a Proxy for Hardness: To avoid evaluating the entire dataset to find replacements, the authors use a clever geometric trick: image dissimilarity. The intuition is that a network will perform poorly on images that look completely different from what it has already seen.
  4. Logarithmic Lookup via $kd$-Trees: Prior to NAS training, an adversarial autoencoder (GANomaly) embeds all dataset images into a compact latent space ($N=8$ or $32$). The authors construct class-specific $kd$-trees from these embeddings. Replacing an "easy" image simply requires an approximate furthest-neighbor lookup in the $kd$-tree, which runs in efficient $O(\log n)$ time.

Crucially, the authors note that standard autoencoders with skip-connections fail here because they bypass the bottleneck layer, ruining the clustering properties of the latent space. Removing skip-connections ensures that spatial similarity is preserved.

Datasets

The framework was evaluated on three standard image classification benchmarks:

  • MNIST
  • Fashion-MNIST
  • CIFAR-10

To demonstrate the robustness and generalization of the discovered architectures, the optimal cells found on CIFAR-10 were also transferred and evaluated on CIFAR-100 and ImageNet.

Key Insights and Ideas

  • Data-Centric Speedups for NAS: Optimizing what data the network sees is just as powerful as optimizing the search algorithm itself.
  • Decoupling Hardness from Model State: By treating image dissimilarity as a proxy for difficulty, the data selection process becomes independent of the model's current forward-pass performance. The embeddings are computed exactly once before NAS training begins, eliminating runtime overhead.
  • Inherent Robustness to Bias: Because the framework constructs one $kd$-tree per class and performs like-for-like class-aware resampling, it acts as an implicit undersampling technique, making the training naturally robust against biased datasets.

Key Results

DDS-NAS consistently reduces the search phase training cost by an order of magnitude across different datasets and NAS frameworks, with minimal to no impact on final accuracy or model complexity:

  • Massive Speedups: For P-DARTS on MNIST, the search cost plummeted from 1.89 GPU days to just 0.07 GPU days (a 27x speedup). On CIFAR-10, P-DARTS search time was cut from 0.65 to 0.095 GPU days.
  • Maintained Accuracy: On CIFAR-10, DDS-NAS applied to DARTS achieved 96.57% Top-1 accuracy compared to the original DARTS accuracy of 97.17%, while slashing the search cost from 1.78 to 0.36 GPU days.
  • Excellent Transferability: Architectures discovered using DDS-NAS on CIFAR-10 generalized well, achieving competitive performance when transferred to CIFAR-100 (e.g., 82.64% accuracy with DARTS) and ImageNet (76.26% accuracy).

Limitations and Future Work

  • Fine-Grained Classification: The compact autoencoder embeddings struggle to capture the highly specific, subtle features required for fine-grained classification tasks (such as distinguishing between specific aircraft models). As a result, the dissimilarity metric degrades into random sampling.
  • Long-Tailed Distributions: For datasets with severe class imbalances, rare classes won't have enough samples to populate a meaningful $kd$-tree, potentially leading to overfitting or noisy weight updates.
  • Future Directions: The authors suggest exploring alternative image similarity metrics, such as perceptual hashing, or combining rare classes into shared $kd$-trees to handle long-tailed data distributions.

Summary updated

BibTeX
@misc{poyser2025dds,
  author = {Matt Poyser and Toby P. Breckon},
  title = {{DDS-NAS: Dynamic Data Selection within Neural Architecture Search via On-line Hard Example Mining applied to Image Classification}},
  year = {2025},
  eprint = {2506.14667},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2506.14667},
}
Figure