Training state-of-the-art deep learning models is often an exercise in gluttony: we feed them massive datasets, requiring clusters of GPUs and weeks of compute. But do we really need every single image in a dataset like ImageNet to learn effectively? Probably not.
In their paper, DynaMS: Dynamic Margin Selection for Efficient Deep Learning, researchers argue that the most "informative" data is a moving target. By dynamically selecting samples based on their distance to the classification boundary, they achieve better accuracy with significantly less data.
TL;DR
DynaMS is a data selection framework that identifies the most informative training samples by calculating their "classification margin"—how close they are to the decision boundary. Unlike static methods that pick a subset once, DynaMS dynamically updates the training set as the model evolves. It uses a clever "Parameter Sharing Proxy" (PSP) to keep the computational overhead of this repeated selection nearly negligible.
What Problem Does This Paper Address?
Deep learning thrives on data, but much of that data is redundant. "Coreset" selection aims to find a small subset of data that yields the same performance as the full set. Existing methods usually fall into two camps, both with significant drawbacks:
- Static Selection: You pick a subset (e.g., based on high loss or gradient norm) before training starts. The problem is that as the model learns, the "hard" samples it needed at Epoch 1 might become "easy" by Epoch 50, making the fixed subset outdated.
- Dynamic Selection: You re-evaluate the whole dataset periodically. The problem here is computational: evaluating millions of images every few epochs is often more expensive than just training on all of them.
The authors tackle the "what to select" (strategy) and the "how to do it cheaply" (efficiency) simultaneously.
Methods: DynaMS and PSP
The authors introduce two primary innovations to solve the data selection bottleneck:
1. Dynamic Margin Selection (DynaMS)
The core idea is Margin Selection (MS). Intuitively, samples near the decision boundary are the most influential in defining where that boundary lies. DynaMS calculates the distance of each sample to the boundary in feature space.
The Dynamic Twist: The authors observed that the overlap between "informative" subsets in consecutive selections is only about 70-80%. This means the model literally "outgrows" its training data.
To account for this, DynaMS re-selects the subset every $Q$ epochs to ensure the training data remains challenging and relevant to the model's current state.
2. Parameter Sharing Proxy (PSP)
To solve the overhead problem of dynamic selection, the authors avoid using the full model to evaluate the data. Instead, they use a Parameter Sharing Proxy.
By using "slimmable training" techniques, they create a thinner version of the main model (e.g., 25% of the width) that shares the same weights. Because the proxy and the main model share parameters, the proxy’s "view" of the data stays perfectly aligned with the main model’s progress, but it can evaluate samples much faster (up to 93% fewer FLOPs).
Key Insights and Results
DynaMS was evaluated on standard computer vision benchmarks, including CIFAR-10 and ImageNet (using ResNet-18 and ResNet-50 architectures), consistently outperforming state-of-the-art data selection methods like GraNd, EL2N, and Forget scores.
- The "Moving Target" of Information: The paper provides both empirical evidence and theoretical proofs showing that dynamic selection leads to better generalization than static selection. A model trained on a dynamic subset actually learns a better decision boundary than one stuck with a fixed "hard" subset.
- Easy-to-Hard Curriculum: Visualizations show that early in training, DynaMS keeps "easy," prototypical samples. As training progresses, it automatically pivots to "harder" samples—those that are atypical, blurred, or contain interfering objects.
- Gradient Alignment: The PSP isn't just fast; its gradients are highly correlated with the main model's gradients. This ensures that the samples the proxy thinks are important are actually the ones the main model needs.
- Accuracy on ImageNet: Using only 60% of the data, DynaMS achieved 74.56% Top-1 accuracy on ResNet-50. This outperformed the "Forget" baseline (73.50%) and was only 1.4% shy of training on 100% of the data.
- Efficiency: When using the PSP (0.25x width), the computational cost of evaluating the data for selection was reduced by 93.75%.
Limitations and Future Work
- Architecture Specificity: While the method works well for CNNs, the paper focuses primarily on ResNet architectures. Extending this to Vision Transformers (ViTs) or Large Language Models (LLMs) would be a natural next step.
- Subset Scheduling: The authors experimented with linear and power-law schedules for reducing the subset size over time. However, finding the optimal schedule for a new dataset still requires some manual tuning.
- Proxy Complexity: While PSP is efficient, the "slimmable" training adds a small amount of complexity to the training pipeline compared to standard training.
In summary, DynaMS suggests that in the era of "Big Data," we should focus on the "Right Data"—and acknowledge that what is "right" changes every step of the way.
Summary updated