Learning Surrogates for Offline Black-Box Optimization via Gradient Matching

Minh Hoang, Azza Fadhel, Aryan Deshwal, Jana Doppa, Trong Nghia Hoang

Introduction

In numerous scientific and engineering domains—from discovering new drugs to designing advanced materials—finding the optimal design is often prohibitively expensive. Researchers frequently rely on Offline Black-Box Optimization, where a fixed dataset of previous experiments is used to find a new, superior design without conducting costly new lab tests.

The standard approach involves training a "surrogate" model (a digital twin of the experiment) on the offline data and then using gradient ascent to find the surrogate's maximum. However, these surrogates are notoriously prone to "hallucinations" outside the training data distribution. Even if a surrogate predicts objective values reasonably well, its gradients—the directional compass guiding the optimizer—are often highly inaccurate. This misdirection leads the optimization process into dead zones of poor performance.

This paper asks a fundamental question: Can we mathematically bound this performance gap, and can we train models to have a better directional compass? To address this, the authors introduce MATCH-OPT, a novel approach that focuses on matching the latent gradient field of a target function rather than just its scalar values.

The MATCH-OPT Methodology

The authors present two major contributions to tackle the offline optimization challenge: a theoretical bound and a practical algorithm.

1. Theoretical Bound on Optimization Risk The paper introduces a new theorem demonstrating that the "optimization risk"—the performance gap between the true optimum and the optimum found by the surrogate—is directly bounded by how well the surrogate’s gradients match the true function's gradients. This shifts the focus from purely minimizing value prediction error to minimizing gradient prediction error.

2. The MATCH-OPT Algorithm Because true gradients are unknown in an offline setting, the authors employ a clever technique based on the fundamental theorem of line integrals. They observe that the difference in objective values between two points is approximately the integral of the gradient along the path connecting them.

MATCH-OPT Pipeline
  • Gradient Matching Loss: The model is trained so that its projected gradient along a path matches the observed change in objective values between data points.
  • Monotonic Paths: Instead of computing losses across all possible pairs of data points, the algorithm synthesizes "trajectories" of data points with strictly increasing values. This focuses the model's learning capacity on the gradients in regions most relevant to finding the maximum.
  • Hybrid Objective: The final MATCH-OPT algorithm combines this novel gradient matching loss with standard regression (value matching) to achieve the best of both worlds.

Experimental Setup

The authors rigorously evaluated MATCH-OPT using the Design-Bench benchmark, which encompasses six diverse real-world tasks across continuous and discrete input spaces:

  • Biology: TF-Bind-8 and TF-Bind-10 (optimizing DNA binding activity).
  • Morphology/Robotics: Ant and D’Kitty (optimizing robot morphology for movement).
  • Physics: Superconductor (discovering molecules with high critical temperatures).
  • Control: Hopper Controller (optimizing neural network weights for locomotion).

Key Insights and Results

The core insight of the paper is that the gradient is the compass. By shifting the focus from mere value accuracy to directional accuracy, MATCH-OPT creates a more reliable landscape for optimization.

Gradient Error Comparison
  • Reduced Gradient Error and OOD Robustness: Synthetic experiments demonstrated that as test data drifts further from the training distribution (Out-of-Distribution), the gradient matching approach maintains significantly lower gradient error compared to standard regression across various settings.
  • Superior Reliability and Ranking: While baseline methods might occasionally find a high-performing point by chance, MATCH-OPT consistently achieved the lowest Mean Normalized Rank (MNR) across all benchmarks. It ranked #1 at both the 100th percentile (maximum solution) and 50th percentile (median solution), proving to be the most trustworthy algorithm across varied problem domains.
  • Ablation Success: The hybrid approach proved essential. Adding the regression regularizer to the gradient matching loss performed better than using gradient matching alone on the majority of the tasks.

Limitations and Future Work

While highly effective, MATCH-OPT comes with computational trade-offs. The gradient matching process requires evaluating pairs of points along paths, which is more computationally intensive than standard point-wise regression (taking roughly 1.3 hours to run in their setup). Theoretically, the number of pairs grows quadratically ($N^2$) with dataset size, though sampling monotonic paths successfully mitigates this bottleneck in practice.

Looking forward, the authors suggest applying these gradient-matching principles to domains like Safe Bayesian Optimization and Safe Reinforcement Learning, where accurately understanding the "shape" and gradients of the landscape is critical for avoiding dangerous or suboptimal regions.

Summary updated

BibTeX
@inproceedings{hoang2024learning,
  author = {Minh Hoang and Azza Fadhel and Aryan Deshwal and Jana Doppa and Trong Nghia Hoang},
  title = {{Learning Surrogates for Offline Black-Box Optimization via Gradient Matching}},
  booktitle = {International Conference on Machine Learning},
  year = {2024},
  url = {https://openreview.net/forum?id=mv9beA1wDF},
}
Figure