Neighbor Regularized Bayesian Optimization for Hyperparameter Optimization

Lei Cui, Yangguang Li, Xin Lu, Dong An, Fenggang Liu · DOI

Abstract

Hyperparameter optimization (HPO) is a critical component of modern machine learning pipelines, yet it is often hindered by the inherent stochasticity of model training. Random weight initialization and data shuffling introduce noise into performance evaluations, causing standard Bayesian Optimization (BO) methods to overfit to "lucky" outliers or collapse in high-variance landscapes. We present Neighbor Regularized Bayesian Optimization (NRBO), a framework designed to denoise the optimization process without the computational overhead of repeated trials. NRBO introduces neighbor-based regularization, a density-aware acquisition function, and dynamic scheduling to filter noise and ensure robust exploration. Our results across 108 Bayesmark tasks and large-scale computer vision benchmarks demonstrate that NRBO consistently outperforms state-of-the-art methods like HEBO and Turbo, providing significant accuracy gains in noisy environments.

Introduction

Bayesian Optimization (BO) has emerged as the gold standard for black-box hyperparameter tuning. By constructing a surrogate model to predict performance and utilizing an acquisition function to guide sampling, BO efficiently navigates complex search spaces. However, the reliability of BO is fundamentally challenged by noise. In modern deep learning, identical hyperparameter settings can yield different results due to stochastic training processes.

Standard BO often becomes "distracted" by this noise, either over-exploiting spurious peaks or failing to model the underlying objective function accurately. While the variance could be mitigated by evaluating each configuration multiple times and averaging the results, this approach is computationally prohibitive for large-scale models. NRBO addresses this challenge by denoising the optimization process "for free," leveraging the spatial relationships between existing data points to estimate true performance.

Methodology

NRBO enhances the standard BO pipeline through three primary innovations designed to improve surrogate model stability and exploration efficiency.

1. Neighbor-based Regularization

Instead of training the surrogate model on raw, potentially noisy observations, NRBO applies a spatial smoothing technique. For any given sample point, the algorithm calculates a weighted average of that point and its k-nearest spatial neighbors. This acts as a local filter, dampening the impact of noisy outliers and providing the surrogate model with a more stable representation of the objective landscape.

2. Density-based Acquisition Function

The effectiveness of neighbor-based smoothing depends on the availability of nearby data points. To ensure that neighborhoods are sufficiently populated across the search space, NRBO utilizes a novel acquisition function that incorporates a "density reward." This mechanism explicitly encourages the solver to explore sparse regions where few samples have been collected, preventing the algorithm from prematurely clustering all samples in a single, potentially noisy sub-optimum.

3. Dynamic Scheduling

The optimization process in NRBO is governed by a dynamic schedule. At the beginning of the search, regularization strength is high, allowing the algorithm to focus on broad, global trends and ignore high-frequency noise. As the search progresses and the algorithm identifies promising regions, the regularization and density rewards are "annealed" or weakened. This transition allows the model to increase its resolution, eventually fitting subtle, high-resolution patterns to pinpoint the exact optimum.

Experimental Evaluation

The authors evaluated NRBO against a diverse set of benchmarks to test its versatility and robustness.

  • Bayesmark: A comprehensive HPO benchmark consisting of 108 tasks across various datasets (e.g., breast cancer, digits, iris) and model architectures (e.g., MLP, SVM, Random Forest).
  • Computer Vision Benchmarks: Large-scale evaluations on ImageNet, CIFAR-10, CIFAR-100, and Stanford Cars for classification, as well as Pascal VOC and MS-COCO for object detection.
  • Proxy-to-Full Transfer: For computationally intensive datasets like ImageNet and COCO, the authors optimized hyperparameters on "proxy" tasks (shortened training runs) and validated the results through full-scale training.

Key Results and Insights

NRBO demonstrated superior performance compared to established baselines such as HEBO and Turbo.

  • State-of-the-Art Performance: On the Bayesmark benchmark, NRBO achieved the highest average score (100.34) and the best normalized mean score across all 108 tasks, surpassing the previous leader, HEBO.
  • Object Detection Gains: In complex vision tasks, NRBO provided substantial improvements, achieving 2.1% and 2.36% higher accuracy on Pascal VOC and MS-COCO, respectively, compared to random search.
  • Robustness to Noise: Qualitative analysis shows that while standard Gaussian Process models often collapse when noise levels are high (e.g., reaching 0.8), NRBO maintains a smooth and accurate approximation of the ground truth performance landscape.

The core insight of NRBO is treating HPO as a spatial problem where the "wisdom of the crowd"—neighboring points—can be used to validate the performance of any single coordinate. By treating the search like a camera lens that moves from a blurry, wide-angle view to a sharp, high-detail focus, NRBO avoids the pitfalls of local sub-optima.

Conclusion and Future Work

NRBO provides a robust framework for hyperparameter optimization in the presence of noise, offering a significant advantage for large-scale machine learning tasks where repeated evaluations are impossible. While the method introduces new meta-hyperparameters, such as the initial neighbor radii, its performance remains competitive even in low-noise scenarios. Future research may focus on the automatic adaptation of these radii based on observed variance during the search, further automating the denoising process.

Summary updated

BibTeX
@inproceedings{cui2022neighbor,
  author = {Lei Cui and Yangguang Li and Xin Lu and Dong An and Fenggang Liu},
  title = {{Neighbor Regularized Bayesian Optimization for Hyperparameter Optimization}},
  booktitle = {BMVC},
  year = {2022},
  url = {https://openreview.net/forum?id=nPWHbmEXHOq},
}
Figure