HYPPO: Using Equivalences to Optimize Pipelines in Exploratory Machine Learning

Antonios Kontaxakis, Dimitris Sacharidis, Alkis Simitsis, Alberto Abelló, Sergi Nadal

Abstract

Exploratory Machine Learning (EML) is a trial-and-error process where data scientists iteratively refine preprocessing, feature selection, and model hyperparameters. This iterative nature leads to substantial time and financial costs. While existing optimization systems utilize result caching and materialization, they are limited to exact-match reuse. We introduce HYPPO (Hypergraph Pipeline Optimizer), a system that leverages logical equivalences—different computational paths producing the same result—to optimize execution. By representing workloads as directed hypergraphs, HYPPO identifies alternative execution paths, achieving speedups of 10x to 100x over traditional methods with minimal overhead.

Introduction

The development of machine learning models is rarely a linear path. Instead, it is a cycle of experimentation where small changes are frequently made to various stages of the pipeline. These iterations are computationally expensive. Current state-of-the-art systems attempt to mitigate these costs through artifact reuse and strategic materialization. However, these systems typically operate on Directed Acyclic Graphs (DAGs) and only look for exact matches in execution history.

A significant opportunity for optimization lies in "equivalences." For instance, a preprocessing step like scaling might be implemented in Scikit-learn, TensorFlow, or a custom library. If a system has already computed and stored the result of a TensorFlow scaler, it should be able to substitute it for a Scikit-learn scaler in a new pipeline. Traditional DAGs cannot easily represent these "OR" choices, where multiple distinct tasks can produce the same artifact.

Methods

HYPPO addresses these limitations by modeling ML pipelines using directed hypergraphs and implementing a robust optimization framework.

Directed Hypergraph Representation

Unlike standard DAGs, hypergraphs allow for a more flexible mapping of multi-input and multi-output tasks. In HYPPO's representation, nodes represent artifacts (data, models, etc.) and hyperedges represent tasks. This structure naturally supports "OR" semantics: an artifact node can be the target of multiple alternative hyperedges, representing different ways to compute that specific result.

Hypergraph representation of ML pipelines, history, and augmentation.

System Architecture and Pipeline Augmentation

The HYPPO architecture consists of several components designed to transform raw code into an optimized execution plan. When a user submits pipeline code, the Parser converts it into a logical graph. The Augmenter then searches the History (H) for equivalent tasks or previously materialized artifacts, merging them into an Augmentation (A) graph. This graph represents the full search space of possible execution paths.

The HYPPO system architecture showing the flow from pipeline code to execution.

Optimal Plan Discovery

Finding the most cost-effective execution plan within the augmented hypergraph is a complex search problem. Formally, this is related to the NP-hard Steiner Tree problem. HYPPO utilizes an efficient exact algorithm called OPTIMIZE. By employing pruning techniques tailored to the typical structure of ML pipelines, the system can find optimal plans in under 10 milliseconds, ensuring that the optimization process itself does not become a bottleneck.

Smart Materialization

To decide which artifacts are worth storing for future use, HYPPO employs a greedy materialization strategy. It evaluates the "savings benefit" of an artifact by weighing the time saved by reuse against the cost of storage and loading. The system also prioritizes "locality"—artifacts closer to the data source (like initial preprocessing results) are favored because they are more likely to remain stable across multiple experiments.

Evaluation and Results

The authors evaluated HYPPO using real-world datasets (HIGGS and TAXI) and synthetic workloads to test scalability.

  • Massive Speedups: HYPPO consistently generated execution plans that were 10x to 100x faster and cheaper than non-optimized baselines.
  • Outperforming State-of-the-Art: Compared to existing systems like Collab and Helix, HYPPO was up to an order of magnitude faster because it could find equivalent paths those systems ignored.
  • Benefit Without Storage: Even in "cold start" scenarios where no artifacts were materialized, HYPPO reduced costs by 3–4x simply by identifying cheaper equivalent tasks within the same experiment.
  • Low Overhead: Despite the underlying problem being NP-hard, the plan generator consistently found optimal solutions in under 10 milliseconds for real-world pipeline sizes.

Conclusion

HYPPO represents a significant shift in ML pipeline optimization. By moving beyond simple caching to a hypergraph-based model that recognizes logical equivalences, it unlocks massive efficiency gains in exploratory machine learning. Future work will focus on extending these concepts to stochastic tasks and refining cost models for cross-framework data translation.

Summary updated

BibTeX
@inproceedings{kontaxakis2024hyppo,
  author = {Antonios Kontaxakis and Dimitris Sacharidis and Alkis Simitsis and Alberto Abelló and Sergi Nadal},
  title = {{HYPPO: Using Equivalences to Optimize Pipelines in Exploratory Machine Learning}},
  booktitle = {ICDE},
  year = {2024},
  doi = {10.1109/icde60146.2024.00024},
}
Figure