Exploiting Reuse in Pipeline-Aware Hyperparameter Tuning.

Liam Li, Evan R. Sparks, Kevin G. Jamieson, Ameet TalwalkararXiv 2019

TL;DR

This paper introduces a "pipeline-aware" approach to hyperparameter tuning that significantly speeds up the process by intelligently reusing intermediate computations across different pipeline configurations. By optimizing both the design of these pipelines and their execution through novel methods like gridded random search and early-stopping, they achieve over an order-of-magnitude speedup compared to traditional independent evaluation.

What Problem Does This Paper Address?

Modern machine learning workflows often involve complex, multi-stage pipelines where each stage has hyperparameters that need tuning. This process is computationally expensive because evaluating a single pipeline configuration can take a long time, and doing this for many configurations quickly becomes prohibitive. The core problem is the massive redundancy in computation when evaluating numerous pipeline configurations, especially when these configurations share common initial stages or intermediate computations. The paper aims to tackle this computational burden by exploiting this inherent redundancy.

Methods

The authors propose a three-pronged approach to maximize computational reuse:

  1. Designing Reusable DAGs (Directed Acyclic Graphs): To encourage reuse, they introduce gridded random search. This hybrid method balances the exploration of random search with the structured prefix sharing of grid search, by controlling the branching factor of hyperparameter choices at each stage. This helps create more overlapping "prefixes" in the pipeline DAGs.
  2. Designing Balanced DAGs: To mitigate the impact of expensive late-stage computations (like model training), they adapt early-stopping hyperparameter tuning techniques. This effectively breaks down a single expensive training step into multiple, cheaper partial training stages, making the overall computation profile more "front-loaded" and thus more amenable to caching. They highlight the Successive Halving algorithm as a prime example.
  3. Exploiting Reuse via Caching: They formulate the problem of caching intermediate results in ML pipelines as a cache-dependent generalized paging problem. This is then posed as a mixed integer linear program (ILP) to find the optimal caching policy. Recognizing the computational cost of solving ILPs, they also evaluate and propose practical online caching heuristics, finding that standard LRU (Least Recently Used) is suboptimal for ML pipelines.

Datasets

The paper uses the following datasets for evaluation:

  • OpenML datasets: 20 classification datasets were used to compare gridded random search with standard random search.
  • 20 Newsgroups: A text classification dataset used for evaluating caching strategies.
  • Amazon Reviews: A dataset used for evaluating caching strategies.
  • TIMIT speech dataset: Used to evaluate the full pipeline-aware approach, particularly its ability to handle tasks not initially amenable to reuse.

No new benchmarks were introduced; rather, existing datasets were used to demonstrate the effectiveness of their proposed methods.

Key Insights and Ideas

  • The structure of ML pipelines is key: The paper highlights that the computational graph (DAG) of ML pipelines is not just an execution detail but a crucial element that can be optimized for reuse.
  • Gridded random search is a sweet spot: It offers a practical way to encourage shared prefixes in pipeline configurations without sacrificing too much search space coverage, unlike pure grid or random search.
  • Early stopping isn't just for speed, it's for cacheability: By making computations more front-loaded, early-stopping techniques make intermediate results more likely to be cached and reused effectively.
  • LRU is a poor fit for ML pipelines: The standard LRU caching strategy, common in many libraries, performs poorly because it doesn't account for the variable costs and sizes of ML pipeline components.
  • WRECIPROCAL is a strong contender: This caching heuristic, which considers both cost and size, shows significantly better performance than LRU and is more robust than RECIPROCAL.

Key Results

  • Significant Speedups: The pipeline-aware approach offers over an order-of-magnitude speedup (e.g., 70x for text classification, over 17x for a speech task) compared to evaluating each pipeline configuration independently.
  • Gridded Random Search Performance: Gridded random search performed comparably to standard random search on OpenML datasets, with differences in accuracy typically below 1%.
  • Caching Effectiveness: For text classification tasks, RECIPROCAL and WRECIPROCAL achieved up to 70x speedup. Even for the TIMIT task, which was initially less amenable to reuse, Successive Halving combined with caching yielded speedups of over 17x.
  • ILP vs. Heuristics: While solving the ILP for optimal caching is computationally expensive, it provides a benchmark. Online heuristics like WRECIPROCAL closely approximate the optimal solution for practical scenarios.

Limitations and Future Work

  • ILP Scalability: Solving the mixed integer linear program for optimal caching is NP-hard and becomes infeasible for large numbers of pipelines.
  • Future Work:
    • Develop relaxations of the ILP to approximate optimal solutions for larger problems.
  • Incorporate meta-learning to predict costs and memory requirements, enabling a "perfect information" setting for caching.
  • Integrate alternative caching strategies like RECIPROCAL and WRECIPROCAL into popular ML libraries (e.g., scikit-learn, MLlib).
  • Explore more advanced online caching strategies.

Summary updated

BibTeX
@misc{li2019exploiting,
  author = {Liam Li and Evan R. Sparks and Kevin G. Jamieson and Ameet Talwalkar},
  title = {{Exploiting Reuse in Pipeline-Aware Hyperparameter Tuning.}},
  year = {2019},
  eprint = {1903.05176},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/1903.05176},
}
Figure