TL;DR
Tuning hyperparameters for deep neural networks (DNNs) is notoriously expensive, often requiring hundreds of training runs. This paper introduces HTS (Hyperparameter Transfer using Surrogates), a method that automatically maps optimal hyperparameters from a previously optimized "source" dataset to a new "target" dataset. By learning this transfer function with a small neural network instead of relying on hand-crafted dataset features, HTS cuts the number of required hyperparameter evaluations by up to 5x.
What Problem Does This Paper Address?
Finding the right hyperparameters (e.g., learning rate, dropout, layer sizes) can make or break a deep learning model. Standard hyperparameter optimization (HPO) techniques like Bayesian Optimization or grid search typically require over a hundred evaluations to find near-optimal settings. When a single state-of-the-art model takes days to train, evaluating a hundred configurations becomes completely impractical.
While we can intuitively reuse hyperparameter settings from similar datasets, the optimal values often vary drastically in scale and location due to "domain shift." Previous attempts to automate this knowledge transfer relied heavily on hand-crafted dataset "metafeatures" (like statistical properties of the dataset). However, these hand-designed features often rely on rigid assumptions that fail in practice. This paper addresses the challenge of transferring hyperparameter knowledge across different datasets without relying on hand-crafted features.
Methods
The authors propose Hyperparameter Transfer using Surrogates (HTS). Instead of manually defining what makes two datasets similar, HTS learns the relationship directly from how the model performs on them.
Here is how the algorithm works:
- Surrogate Modeling: Because evaluating the true validation error is expensive, HTS uses Radial Basis Function (RBF) surrogate models to approximate the hyperparameter-to-error distribution for both the source dataset ($S_S$) and the target dataset ($S_T$).
- Rank-Based Alignment: The goal is to find a transfer function $g(x)$ that maps a source hyperparameter configuration $x$ to a target configuration $\hat{x}$ such that their performance is highly correlated. To train a neural network to do this without complex backpropagation through the surrogates, the authors use a clever trick: they sample 10,000 configurations using Latin Hypercube Sampling (LHS), sort them by performance on the source surrogate, sort them by performance on the target surrogate, and pair them up by rank.
- Neural Network Learning: A small neural network (one hidden layer with 20k neurons) is trained on this sorted dataset to minimize the mean squared distance between configurations of the same rank.
- Iterative Optimization: HTS uses the trained network to map the top-performing configurations from the source dataset over to the target dataset, evaluates them on the actual target task, updates the target surrogate model, and repeats the process iteratively.
Datasets
The method was evaluated using a Convolutional Neural Network (CNN) across three classic computer vision benchmark datasets:
- MNIST: Grayscale images of handwritten digits (relatively easy, low validation error baseline).
- SVHN (Street View House Numbers): Color images of house numbers cropped from real-world scenes (moderate difficulty).
- CIFAR-10: Color images of 10 everyday object classes (high complexity, higher validation error baseline).
Key Insights and Ideas
- Moving Beyond Metafeatures: Deep learning has repeatedly proven that learned features outperform hand-designed ones. HTS applies this philosophy to HPO by learning a transfer function directly from performance surfaces rather than relying on 46+ manual dataset metafeatures.
- Handling Scale and Complexity Shifts: HTS successfully transfers knowledge even when the baseline errors are vastly different. For example, a simple CNN gets ~2% error on MNIST but ~37% on CIFAR-10. The learned transfer function successfully accounts for these massive shifts in scale.
- The Failure of Naive Transfer: Simply taking the best hyperparameters from a source dataset and applying them directly to a target dataset (linear/naive mapping) yields poor results. The relationship between datasets is highly non-linear, justifying the need for a neural network mapping function.
Key Results
The authors optimized 8 hyperparameters of a CNN (learning rate, momentum, four dropout rates, and node counts for two fully-connected layers).
- CIFAR-10 Optimization: When transferring knowledge from SVHN to CIFAR-10, HTS reached the optimal validation error using five times fewer evaluations than the baseline method (HORD) operating without transfer learning.
- SVHN Optimization: When transferring from MNIST to SVHN, HTS achieved low validation errors using three times fewer evaluations than the baseline.
As seen in the performance curves below, the HTS mapping functions (yellow and teal solid lines) converge to low error rates much faster than optimizing from scratch (purple line) or using unadapted source parameters (dashed lines):
Limitations and Future Work
While HTS significantly speeds up optimization, the authors note a few limitations and areas for improvement:
- Initial Target Bootstrapping: The target surrogate model still requires an initial set of $m$ random evaluations on the target dataset to bootstrap the process, which represents a fixed upfront computational cost.
- Surrogate Generalization: If the top-performing source samples are clustered too closely together in the hyperparameter space, the transfer function might struggle to generalize. Incorporating some random source samples could alleviate this.
- Scope of Evaluation: Due to computational constraints, the CNNs in the experiments were only trained for 10 epochs. Testing HTS on larger architectures (like ResNets) and across a broader, more diverse set of datasets remains an open direction for future work.
Summary updated