Pushing ML Predictions Into DBMSs
- PMID: 37954972
- PMCID: PMC10620958
- DOI: 10.1109/TKDE.2023.3269592
Pushing ML Predictions Into DBMSs
Abstract
In the past decade, many approaches have been suggested to execute ML workloads on a DBMS. However, most of them have looked at in-DBMS ML from a training perspective, whereas ML inference has been largely overlooked. We think that this is an important gap to fill for two main reasons: (1) in the near future, every application will be infused with some sort of ML capability; (2) behind every web page, application, and enterprise there is a DBMS, whereby in-DBMS inference is an appealing solution both for efficiency (e.g., less data movement), performance (e.g., cross-optimizations between relational operators and ML) and governance. In this article, we study whether DBMSs are a good fit for prediction serving. We introduce a technique for translating trained ML pipelines containing both featurizers (e.g., one-hot encoding) and models (e.g., linear and tree-based models) into SQL queries, and we compare in-DBMS performance against popular ML frameworks such as Sklearn and ml.net. Our experiments show that, when pushed inside a DBMS, trained ML pipelines can have performance comparable to ML frameworks in several scenarios, while they perform quite poorly on text featurization and over (even simple) neural networks.
Keywords: MLOPs; SQL; machine learning.
© 2023 The Authors.
Figures
References
-
- Dean J., “The deep learning revolution and its implications for computer architecture and chip design,” Nov. 2019, arXiv:1911.05289.
-
- Ahmed Z. et al., “Machine learning at microsoft with ML.NET,” in Proc. ACM SIGKDD Int. Conf. Knowl. Discov. Data Mining, 2019, pp. 2448–2458.
-
- Abadi M. et al., “TensorFlow: A system for large-scale machine learning,” in Proc. 12th USENIX Symp. Operating Syst. Des. Implementation, 2016, pp. 265–283. [Online]. Available: https://www.usenix.org/system/files/conference/osdi16/osdi16-abadi.pdf
-
- Paszke A., “PyTorch: An Imperative Style, High-Performance Deep Learning Library,” Dec. 2019, arXiv:1912.01703.
-
- Sergeev A. and Del Balso M., “Horovod: Fast and easy distributed deep learning in TensorFlow,” Feb. 2018, arXiv:1802.05799.
LinkOut - more resources
Full Text Sources
Miscellaneous