Surrogate Model Based Hyperparameter Tuning for Deep Learning with SPOT

Thomas Bartz-BeielsteinarXiv 2021

Abstract

Hyperparameter tuning in deep learning is often treated as a "black box" process of trial and error. This paper introduces a structured workflow using the Sequential Parameter Optimization Toolbox (SPOT) in R to apply surrogate model-based optimization to Keras/TensorFlow models. Beyond merely identifying optimal settings, this approach utilizes SPOT as a "datascope" to visualize and interpret how different hyperparameters interact and drive model performance. We demonstrate this workflow on the MNIST dataset, showing how statistical analysis can reveal the underlying sensitivity of deep learning architectures.

The Challenge of Hyperparameter Tuning

Deep Learning (DL) models are notoriously sensitive to architecture-level choices—hyperparameters such as the number of layers, dropout rates, and learning rates. Unlike model weights, which are optimized via backpropagation, hyperparameters must be defined before training begins.

Practitioners face several significant hurdles:

  1. The Curse of Dimensionality: Traditional grid search becomes exponentially expensive as more hyperparameters are added.
  2. Lack of Unified Theory: There is no comprehensive theory for choosing these values, often leaving researchers to rely on "expert intuition."
  3. Optimization vs. Understanding: Most tools focus exclusively on finding a single best configuration (Hyperparameter Optimization or HPO). However, researchers often need to understand the sensitivity and interactions of these parameters (Hyperparameter Tuning or HPT) to build more robust models.

Methodology: Surrogate Model Based Optimization (SMBO)

The proposed approach utilizes Surrogate Model Based Optimization (SMBO). Rather than blindly sampling configurations, the system constructs a "model of the model" to guide the search process. To bridge the gap between high-performance DL and rigorous statistical analysis, the workflow combines TensorFlow/Keras (for neural network implementation) with R via the tfruns and SPOT packages.

The SMBO Loop

The tuning process follows an iterative cycle:

  1. Initialization: Select an initial set of hyperparameter configurations.
  2. Evaluation: Train the DL model and measure validation loss for each configuration.
  3. Surrogate Modeling: Fit a surrogate model (such as Kriging/Gaussian Processes or Random Forests) to the observed results.
  4. Prediction: Use the surrogate to predict regions of the hyperparameter space likely to contain optimal settings.
  5. Iteration: Repeat the process until the computational budget is exhausted.

To maintain formal consistency throughout this process, the authors utilize a standardized notation for the hyperparameter space and response surfaces.

Table of notation used in the SMBO framework.

The "Datascope" Concept

A key contribution of this work is the use of statistical tools—such as regression trees, surface plots, and box plots—to analyze the "route to the solution." This "datascope" allows practitioners to distinguish between "tunable" parameters (those with high impact) and redundant ones.

By fitting regression models to the tuning data, the authors can provide statistical evidence (such as p-values) for each hyperparameter. For example, analysis might reveal that the dropout rate, learning rate, and batch size are the primary drivers of performance, while other factors remain secondary. This insight exploits the "low effective dimensionality" often found in DL models, where only a few dimensions truly matter for performance.

Experimental Results: MNIST Case Study

The authors applied this workflow to the MNIST dataset (60,000 images of handwritten digits). While MNIST is a standard benchmark, it serves as a clear, reproducible environment to showcase the tuning workflow without requiring prohibitive GPU resources.

  • Performance: The SPOT-tuned model achieved a best validation loss of approximately 0.0685 and a test accuracy of 96.38%.
  • Efficiency: With a budget of 480 evaluations, the Kriging surrogate model successfully guided the search toward lower loss regions significantly faster than manual or exhaustive search methods.
  • Sensitivity Analysis: Linear regression on the tuning results statistically proved that the dropout rate had a highly significant effect on the loss function, validating the importance of specific "knobs" in the architecture.

Conclusion and Future Work

This approach demonstrates that hyperparameter tuning should be viewed as a statistical analysis task rather than just a search problem. By using SPOT in R, researchers can gain deeper insights into their models' behavior.

Future research directions include investigating Optimal Computing Budget Allocation (OCBA) to handle the inherent noise in DL training (stochasticity from weight initialization and batching) more efficiently. Additionally, the authors advocate for the development of a "CRISP-DL" standard—a formalized process for Deep Learning development—to integrate these systematic tuning workflows into industry practice.

Summary updated

BibTeX
@misc{bartzbeielstein2021surrogate,
  author = {Thomas Bartz-Beielstein},
  title = {{Surrogate Model Based Hyperparameter Tuning for Deep Learning with SPOT}},
  year = {2021},
  eprint = {2105.14625},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2105.14625},
}
Figure