Statistical Hardware Design With Multi-model Active Learning

Alireza Ghaffari, Masoud Asgharian, Yvon SavariaarXiv 2023

TL;DR

Designing efficient hardware is a slow, multi-objective balancing act where testing a single configuration can take hours. This paper introduces a multi-model active learning framework that combines Bayesian optimization, transfer learning, and bootstrapping to find optimal hardware settings with up to 65% fewer samples than traditional methods, effectively navigating design spaces containing billions of possibilities.

What Problem Does This Paper Address?

Modern hardware design is a "black box" optimization nightmare. Engineers must balance competing goals—like maximizing throughput while minimizing power consumption and area—across a massive space of discrete parameters (e.g., cache sizes, number of arithmetic units, clock frequencies).

Because these parameters are discrete, the objective function isn't differentiable, ruling out standard gradient-based optimization like Stochastic Gradient Descent. Furthermore, "synthesizing" a hardware design to measure its actual performance is computationally expensive and time-consuming. Brute-force searching through billions of possible combinations is impossible, and while meta-heuristic methods like Genetic Algorithms can find good solutions, they fail to provide a predictive mathematical model of how parameters interact.

Methods

The authors propose a Model-Based Active Learning framework that treats hardware design as a multi-objective problem. Key components include:

  • Multi-Model Bayesian Optimization: Instead of one giant model, the system maintains separate Gaussian Process (GP) models for different objectives (e.g., one for power, one for area). This allows the algorithm to map the "Pareto frontier"—the set of optimal trade-offs between competing goals.
  • Active Learning: The algorithm doesn't just guess; it iteratively selects the most "informative" parameter sets to query from the synthesis tool, gradually refining its surrogate model of the hardware's behavior.
  • Bayesian Transfer Learning: This is a "shortcut" mechanism. If the model has already learned how a CPU performs on one task (the source), it can transfer that knowledge to speed up the optimization of a new, unseen task (the target).
  • Gaussian Regression Bootstrapping: To further reduce the need for expensive real-world samples, the authors use the GP surrogate to generate "synthetic" data. This allows them to perform complex statistical analyses (like LASSO regression for variable selection) using a fraction of the actual hardware synthesis runs.
Fig. 1. Statistical modeling of hardware using Multi-model Bayesian Active Learning. The framework also incorporates an optional Bayesian Transfer Learning setup to improve the accuracy of the Bayesian models.

Datasets

The framework was evaluated on two primary hardware design scenarios:

  1. OpenCL Kernels for FPGAs: Benchmarks included Matrix Multiplication, FIR filters, Sobel filters, and Mergesort. Parameters included SIMD size, unrolling factors, and the number of compute units.
  2. CPU Micro-architecture (SPEC2k): Using the SPEC2k benchmark suite (e.g., ammp, gcc, gzip, mesa), the authors explored a design space of roughly one billion points involving 12 parameters like cache sizes and functional unit latencies.

Key Insights and Ideas

  • DSE vs. Performance Modeling: The authors distinguish between Design Space Exploration (finding the best point) and Performance Modeling (predicting values everywhere). Their framework handles both, but they note that DSE is often "easier" because you only need to find the peak, not map every valley accurately.
  • The Power of Correlation: Transfer learning works here because hardware performance is highly correlated across different software tasks. If a micro-architecture is fast for a Java benchmark, it’s statistically likely to be fast for a C++ benchmark. The authors quantify this with high correlation coefficients (ρ) and low p-values.
  • Bootstrapping as a Data Multiplier: By resampling the Bayesian model, the authors could perform high-fidelity regression analysis (like Random Forest or LASSO) with only 700 real samples, whereas previous state-of-the-art methods required 2,000.
Fig. 2. (a) Performance modeling (regression) setting where the accuracy of the model is evaluated with the Mean Squared Error (MSE) and (b) Design space exploration setting where the algorithm tries to find the parameters that correspond to the design with maximum performance.

Key Results

  • Efficiency Gains: In performance prediction tasks, the method achieved a 65% reduction in required samples (700 vs. 2,000) while maintaining predictive power.
  • DSE Speed: For CPU micro-architecture exploration, the algorithm found optimal parameter settings in less than 50 samples for most benchmarks.
  • Superior Latency: In OpenCL FPGA benchmarks, the proposed method consistently found lower latency configurations than previous hybrid methods like GWO-BO (e.g., 34.198 ms vs 36.891 ms for Matrix Multiplication).
  • Pareto Accuracy: The framework successfully estimated the Pareto frontier for multi-objective problems, showing the clear trade-off between throughput and logic utilization.
Objective space of Matrix Multiplication showing the estimated Pareto frontier (red triangles).

Limitations and Future Work

While the paper demonstrates robustness, the authors acknowledge that the choice of the covariance kernel (e.g., Squared Exponential vs. Matern) can impact accuracy depending on the "smoothness" of the underlying hardware data. Although they show their method is relatively robust to these changes in Appendix B, specific applications might still require kernel tuning.

Future work could involve exploring even more complex non-smooth objective functions or extending the transfer learning capabilities to bridge entirely different hardware architectures (e.g., transferring knowledge from a GPU model to an NPU model).

Summary updated

BibTeX
@misc{ghaffari2023statistical,
  author = {Alireza Ghaffari and Masoud Asgharian and Yvon Savaria},
  title = {{Statistical Hardware Design With Multi-model Active Learning}},
  year = {2023},
  eprint = {2303.08054},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2303.08054},
}
Figure