MLCask: Efficient Management of Component Evolution in Collaborative Data Analytics Pipelines

Zhaojing Luo, Sai Ho Yeung, Meihui Zhang, Kaiping Zheng, Lei Zhu, Gang Chen, Feiyi Fan, Qian Lin, Kee Yuan Ngiam, Beng Chin Ooi

TL;DR

MLCask is a version control system for machine learning pipelines that introduces Git-like branching and merging to collaborative data science. By implementing "metric-driven merging" and intelligent search tree pruning, it identifies the best-performing pipeline configurations while achieving up to 7.8x faster execution and 11.9x lower storage overhead compared to traditional methods.

What Problem Does This Paper Address?

Building machine learning pipelines is rarely a linear process. In a collaborative environment, data engineers might update pre-processing scripts while researchers experiment with new model architectures simultaneously. This leads to two major headaches:

  1. Redundant Effort: Frequent retraining due to "concept drift" (data changing over time) often results in re-running identical components and storing duplicate intermediate data, wasting time and money.
  2. The Merge Problem: Unlike software engineering, where merging code is about combining features, merging ML pipelines is about maximizing performance. Simply taking the "latest" version of every component doesn't guarantee the best result—certain versions of a feature extractor might be incompatible with, or simply perform poorly when paired with, specific model versions.

Existing tools like MLflow or ModelDB track experiments but lack the formal version control semantics (like branching and merging) needed to manage these non-linear evolutions efficiently.

Methods

The authors introduce MLCask, which treats an ML pipeline as a Directed Acyclic Graph (DAG) of versioned components. Key technical contributions include:

  • Semantic Versioning: Components are identified by [email protected]. This distinguishes between minor updates (increments) and major changes that alter data structure (schema).
  • Metric-Driven Merge: When merging two branches (e.g., HEAD and dev), MLCask doesn't just pick one. It searches for the optimal combination of components from both branches that yields the best performance metric (e.g., highest accuracy or lowest MSE).
  • Pipeline Search Tree Pruning: To avoid a combinatorial explosion of possible pipelines during a merge, MLCask uses two pruning strategies:
  • Compatibility Pruning: It uses a Look-Up Table (LUT) to immediately discard combinations where a component's output schema is incompatible with the next component's input.
  • Reusable Output Pruning: It leverages a history record to skip execution for any component that has already been run with the same inputs and parameters.
  • Prioritized Search: Instead of an exhaustive search, MLCask uses historical performance data to explore the most "promising" paths in the search tree first, allowing it to find near-optimal results even under a tight time budget.

Datasets

The system was evaluated using four real-world ML pipelines:

  1. Readmission: Healthcare data from the National University Health System (NUHS) used to predict hospital readmission within 30 days.
  2. DPM (Disease Progression Modeling): Predicting trajectories for chronic kidney disease.
  3. SA (Sentiment Analysis): Standard movie review sentiment classification.
  4. Autolearn: An image classification pipeline for digits using automated feature generation.

Key Insights and Ideas

  • ML Merging is an Optimization Problem: The "aha moment" here is realizing that merging in ML is fundamentally different from merging in Git. In Git, conflicts are resolved by humans; in MLCask, "conflicts" are resolved by an automated search for the best metric.
  • Schema as a Proxy for Compatibility: By tracking the hash of data schemas, the system can programmatically determine if a new data cleaning step will "break" a downstream model before ever hitting 'run.'
  • Storage as an Immutable Engine: MLCask sits on top of ForkBase, an underlying storage engine that provides chunk-level de-duplication. This ensures that even if a user "archives" ten versions of a dataset, only the unique delta is actually stored.

Key Results

  • Efficiency: The proposed merge operation is up to 7.8x faster than baseline methods because it avoids redundant computations through its pruning heuristics.
  • Storage Savings: MLCask demonstrated up to 11.9x storage savings compared to systems that do not utilize historical records or de-duplication.
  • Comparison with State-of-the-Art: In linear versioning tests, MLCask outperformed ModelDB and MLflow in both total execution time and storage consumption, primarily because it detects component incompatibilities earlier in the pipeline.
  • Search Effectiveness: The prioritized search strategy found the optimal pipeline configuration within the first 20-40% of the total search space for most applications.

Limitations and Future Work

  • Metric Dependency: The "metric-driven" approach assumes there is a single, clear objective function. In scenarios with multi-objective trade-offs (e.g., accuracy vs. inference latency), the merge logic would need to be more complex.
  • Schema Complexity: The paper assumes output schema is the primary factor for compatibility. However, semantic shifts (where the schema stays the same but the data distribution changes wildly) might still pass the compatibility check but lead to poor model performance.
  • Human-in-the-loop: While the system automates the search for the best pipeline, future work could explore how to better incorporate developer intuition into the prioritized search process.

Summary updated

BibTeX
@inproceedings{luo2021mlcask,
  author = {Zhaojing Luo and Sai Ho Yeung and Meihui Zhang and Kaiping Zheng and Lei Zhu and Gang Chen and Feiyi Fan and Qian Lin and Kee Yuan Ngiam and Beng Chin Ooi},
  title = {{MLCask: Efficient Management of Component Evolution in Collaborative Data Analytics Pipelines}},
  booktitle = {ICDE},
  year = {2021},
  doi = {10.1109/icde51399.2021.00146},
}
Figure