Skip to main content
QUICK REVIEW

[Paper Review] Scaling Datalog for Machine Learning on Big Data

Yingyi Bu, Vinayak Borkar|arXiv (Cornell University)|Mar 1, 2012
Advanced Database Systems and QueriesComputer Science27 references51 citations
TL;DR

This paper proposes a declarative, Datalog-based framework that unifies iterative machine learning workloads—such as Pregel and Iterative Map-Reduce-Update—by compiling them into optimized, scalable physical execution plans. Experiments show that the approach achieves performance competitive with specialized systems like Spark and Hadoop, while enabling better tuning, reuse, and integration across ML tasks on large-scale clusters.

ABSTRACT

In this paper, we present the case for a declarative foundation for data-intensive machine learning systems. Instead of creating a new system for each specific flavor of machine learning task, or hardcoding new optimizations, we argue for the use of recursive queries to program a variety of machine learning systems. By taking this approach, database query optimization techniques can be utilized to identify effective execution plans, and the resulting runtime plans can be executed on a single unified data-parallel query processing engine. As a proof of concept, we consider two programming models--Pregel and Iterative Map-Reduce-Update---from the machine learning domain, and show how they can be captured in Datalog, tuned for a specific task, and then compiled into an optimized physical plan. Experiments performed on a large computing cluster with real data demonstrate that this declarative approach can provide very good performance while offering both increased generality and programming ease.

Motivation & Objective

  • To address the inefficiency and complexity of implementing iterative machine learning workloads on traditional Big Data platforms like Hadoop, which lack native support for recursion or iteration.
  • To unify diverse machine learning programming models—such as Pregel and Iterative Map-Reduce-Update—under a single declarative language to reduce duplication and improve maintainability.
  • To leverage database query optimization techniques for recursive Datalog queries to generate efficient, data-parallel execution plans across large clusters.
  • To enable task-specific tuning of machine learning workloads through declarative specification, decoupling logical design from physical execution.
  • To demonstrate that a single, unified runtime engine can efficiently execute diverse ML workloads, outperforming specialized systems in memory-constrained environments.

Proposed method

  • Mapping high-level machine learning programming models (Pregel and Iterative Map-Reduce-Update) into recursive Datalog queries to express iterative computation and dataflow logic.
  • Using a Datalog engine extended for out-of-core and distributed execution to process large-scale data on a cluster.
  • Applying a query optimizer to generate optimized physical execution plans from Datalog programs, leveraging traditional RDBMS optimization techniques for recursion and iteration.
  • Compiling Datalog programs into efficient, data-parallel execution plans using a runtime system built on Hyracks, supporting flexible data redistribution and message-passing.
  • Integrating the Datalog-based system with a planner/optimizer stack to support task-specific tuning and resource-aware execution.
  • Extending the Algebricks algebra and rewrite rule framework to support a generalized, extensible query processing foundation for machine learning workloads.

Experimental results

Research questions

  • RQ1Can recursive Datalog queries be used to declaratively express a broad class of iterative machine learning algorithms, including those in Pregel and Iterative Map-Reduce-Update?
  • RQ2To what extent can traditional database query optimization techniques be applied to Datalog programs to generate efficient, scalable execution plans for machine learning workloads?
  • RQ3How does the performance of a Datalog-based system compare to specialized systems like Spark and Hadoop on real-world, large-scale machine learning tasks?
  • RQ4Can a single, unified data-parallel runtime efficiently and efficiently execute diverse machine learning workloads without requiring separate systems for each model type?
  • RQ5Can the declarative approach enable better tuning and resource allocation for specific ML tasks compared to imperative or ad-hoc iterative frameworks?

Key findings

  • The Datalog-based system achieved performance competitive with Spark and Hadoop on a large real-world dataset, demonstrating the feasibility of a unified declarative approach.
  • On the same hardware, Spark failed due to main-memory limitations, while the Datalog system succeeded, highlighting better memory efficiency.
  • The system outperformed Hadoop by an order of magnitude in execution efficiency, indicating significant optimization gains from the query optimizer.
  • The Datalog programs for PageRank and Batch Gradient Descent were compact and highly tunable, enabling task-specific optimization through logical specification alone.
  • The approach successfully unified ETL and machine learning workloads under a single runtime, reducing pipeline complexity and data transfer overhead.
  • The system demonstrated the ability to generate optimized physical plans tailored to specific data distributions and resource allocations, enabling efficient execution across diverse workloads.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.