Skip to main content
QUICK REVIEW

[Paper Review] Rafiki: Machine Learning as an Analytics Service System

Wei Wang, Sheng Wang|arXiv (Cornell University)|Apr 17, 2018
Data Stream Mining TechniquesComputer Science30 references15 citations
TL;DR

Rafiki is a cloud-based machine learning service system that enables database users to easily train and deploy machine learning models—especially deep learning models—through SQL-compatible interfaces. It supports distributed hyper-parameter tuning for efficient training and online ensemble modeling to balance inference latency and accuracy, significantly improving usability and performance for non-expert users in big data analytics workloads.

ABSTRACT

Big data analytics is gaining massive momentum in the last few years. Applying machine learning models to big data has become an implicit requirement or an expectation for most analysis tasks, especially on high-stakes applications.Typical applications include sentiment analysis against reviews for analyzing on-line products, image classification in food logging applications for monitoring user's daily intake and stock movement prediction. Extending traditional database systems to support the above analysis is intriguing but challenging. First, it is almost impossible to implement all machine learning models in the database engines. Second, expertise knowledge is required to optimize the training and inference procedures in terms of efficiency and effectiveness, which imposes heavy burden on the system users. In this paper, we develop and present a system, called Rafiki, to provide the training and inference service of machine learning models, and facilitate complex analytics on top of cloud platforms. Rafiki provides distributed hyper-parameter tuning for the training service, and online ensemble modeling for the inference service which trades off between latency and accuracy. Experimental results confirm the efficiency, effectiveness, scalability and usability of Rafiki.

Motivation & Objective

  • To address the challenge of integrating machine learning into database systems for complex analytics without requiring deep learning expertise.
  • To reduce the burden of model training and tuning by providing a scalable, distributed hyper-parameter tuning service.
  • To enable efficient, low-latency inference through adaptive online ensemble modeling that balances accuracy and response time.
  • To support end-to-end machine learning workflows—from data upload and model training to deployment and querying—within a cloud-based analytics platform.
  • To improve usability for database developers by abstracting machine learning complexity through UDFs and Web APIs.

Proposed method

  • Rafiki provides a cloud-native platform that exposes machine learning models as Web APIs, enabling integration with SQL queries via user-defined functions (UDFs).
  • It supports distributed hyper-parameter tuning using parallelized training jobs across multiple workers to optimize model performance efficiently.
  • For inference, Rafiki employs online ensemble modeling that dynamically adjusts the number of models in the ensemble based on request load and performance trade-offs.
  • The system uses a reinforcement learning-based controller to balance accuracy and latency by tuning the ensemble size in real time.
  • The reward function in the RL controller combines accuracy and overdue request penalties, with a configurable trade-off parameter β.
  • The system supports model lifecycle management, including retraining and redeployment, with backward compatibility for existing SQL queries.

Experimental results

Research questions

  • RQ1How can machine learning models be efficiently and automatically tuned for specific datasets within a database analytics pipeline?
  • RQ2What is the optimal trade-off between inference latency and prediction accuracy in a production machine learning service?
  • RQ3How can non-expert database users effectively leverage complex deep learning models without low-level ML expertise?
  • RQ4Can a cloud-based system scale hyper-parameter tuning and inference while maintaining low latency and high accuracy?
  • RQ5How does dynamic ensemble modeling adapt to varying request workloads to maintain performance and usability?

Key findings

  • Rafiki achieves high efficiency and scalability in distributed hyper-parameter tuning, significantly reducing training time for complex models.
  • The online ensemble modeling approach reduces overdue requests by up to 60% compared to fixed-ensemble baselines under high load, while maintaining competitive accuracy.
  • The reinforcement learning controller adapts to request arrival rates, using fewer models during high load to improve throughput and fewer overdue requests.
  • When β=1 in the reward function, the system reduces overdue requests by 45% compared to β=0, at the cost of slightly lower accuracy, demonstrating effective latency control.
  • The system enables seamless integration of deep learning into SQL workflows: retraining models in Rafiki does not require changes to existing SQL queries, ensuring backward compatibility.
  • Case studies show that Rafiki reduces development time and computational waste by enabling on-demand inference only on filtered rows, improving efficiency in real-world applications like food logging.

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.