BoGraph: structured bayesian optimization from logs for expensive systems with many parameters

Sami Alabed, Eiko Yoneki

TL;DR

BoGraph is a novel auto-tuning framework that tackles the challenge of optimizing complex computer systems with numerous parameters and high evaluation costs. It achieves this by learning a system's component dependencies from logs, building a probabilistic graph, and then using this structure to guide Bayesian optimization, leading to significantly faster convergence and better performance.

What Problem Does This Paper Address?

Optimizing computer systems, such as hardware designs or database configurations, is a critical but challenging task. These systems often expose a vast number of tunable parameters, and evaluating a single configuration can be extremely time-consuming and expensive (minutes to hours). Traditional auto-tuning methods, like random search or reinforcement learning, struggle with this high dimensionality and cost, requiring too many evaluations to find optimal settings. While Bayesian Optimization (BO) is more sample-efficient, standard BO methods also face scalability issues with a large number of parameters and often require expert knowledge to encode system structure, which is difficult and error-prone. This paper addresses the need for an auto-tuner that can efficiently navigate large parameter spaces, learn system structure from readily available data (logs), and leverage expert knowledge when available, all while minimizing expensive system evaluations.

Methods

BoGraph builds upon Structured Bayesian Optimization (SBO) but introduces a novel pipeline to automate the discovery of system structure and probabilistic models. The core of BoGraph involves:

  • Structure Discovery from Logs: BoGraph processes system logs (e.g., from simulators like gem5) to identify dependencies between system components. This involves summarizing a large number of log entries into a manageable set of metrics, then using structure learning algorithms (specifically NoTears) to infer a Directed Acyclic Graph (DAG) representing these dependencies. This DAG can also incorporate expert-defined relationships.
  • Probabilistic DAG: The learned structure is then used to build a probabilistic DAG. Each node in this DAG represents a system component or metric and is modeled using probabilistic models, typically Gaussian Processes (GPs). This compartmentalization allows the system to scale to many parameters by reducing the effective dimensionality of each individual model.
  • Expert Knowledge Integration: BoGraph provides an API for experts to encode their knowledge, such as probabilistic models of specific components or known parameter dependencies. This hybrid approach combines learned structure with expert insights.
  • Optimization Loop: The framework then uses this probabilistic DAG to guide Bayesian Optimization. Instead of optimizing a single complex model, BoGraph samples from the probabilistic DAG and uses quasi-acquisition functions to propose configurations for evaluation.

What's new is the automated discovery of the system's probabilistic structure from logs, which significantly simplifies the process of applying SBO and allows it to handle systems where expert knowledge is incomplete or difficult to formalize.

Datasets

The primary dataset used for evaluation is the gem5-Aladdin simulator. The paper utilizes its logs, which contain over 1000 metrics, to learn the system's structure. The evaluation also involves a mix of data and compute workloads from MachSuite as benchmarks for the gem5-Aladdin simulator. No new benchmarks were introduced; instead, the focus was on applying BoGraph to an existing complex system and its associated logs.

Key Insights and Ideas

  • Learning Structure from Logs is Feasible and Powerful: The paper demonstrates that valuable structural information about complex systems can be extracted from readily available system logs. This bypasses the need for manual, error-prone expert encoding of system dependencies.
  • Probabilistic DAGs Enable Scalability: By decomposing the system into a graph of probabilistic models, BoGraph effectively reduces the dimensionality problem inherent in standard BO for high-dimensional systems. Each node's model can be trained and optimized more independently.
  • Hybrid Approach is Key: Combining learned structure with expert knowledge offers a robust auto-tuning solution. BoGraph's API allows experts to inject their insights, further accelerating convergence and improving interpretability.
  • Interpretability through Structure: The learned DAG provides an interpretable view of how system components influence each other and the final objectives, which is valuable for understanding system behavior.

Key Results

BoGraph achieved significant improvements in optimizing the gem5-Aladdin accelerator simulator for Energy-Delay Product (EDP):

  • Faster Convergence: BoGraph found optimal configurations in approximately 20 iterations, outperforming other methods that required up to 100 iterations.
  • Performance Improvement: BoGraph achieved a 5x-7x improvement in EDP over the default configurations across various tasks.
  • Efficiency: The auto-tuner's overhead (training and proposing configurations) was significantly less than the actual system evaluation time, making it practical for expensive systems.
  • Reduced Dimensionality: The learned structure learning process effectively reduced the maximum dimension of the models in the graph.

Limitations and Future Work

  • Pipeline Overhead: BoGraph's log processing and structure learning pipeline incurs some computational overhead. The authors suggest mitigation strategies like configurable frequency of structure discovery and running the pipeline on a helper instance.
  • Log Annotation: The current approach relies on users providing parsers for system logs. While simple regex parsers are sufficient for gem5 and PostgreSQL, systems with highly non-standard logging might require more effort.
  • Multi-objective Optimization: The paper suggests extending BoGraph to handle multi-objective optimization (e.g., optimizing both latency and energy simultaneously) as a promising future direction, noting that its DAG structure naturally supports this.
  • Computational Engine Improvement: Further work is planned to improve the computational efficiency of BoGraph's optimization engine, potentially through parallelization.
  • Broader Applicability: The authors are exploring applying BoGraph to other complex systems like PostgreSQL to demonstrate its general applicability.

Summary updated

BibTeX
@inproceedings{alabed2022bograph,
  author = {Sami Alabed and Eiko Yoneki},
  title = {{BoGraph: structured bayesian optimization from logs for expensive systems with many parameters}},
  booktitle = {EuroMLSys@EuroSys},
  year = {2022},
  doi = {10.1145/3517207.3526977},
}
Figure