In-Database ML Inference Using UDFs to Cut Data Movement
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Existing database management systems face inefficiencies in machine learning operations due to large data movement and processing requirements, leading to long processing times, resource constraints, data leakage risks, and compliance issues with data residency considerations.
Innovation Solution
Perform machine learning operations directly at the database level through in-place processing, integrating user-defined functions to execute machine learning tasks within database query execution flows, reducing data movement and enhancing security and compliance.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Adaptability or versatility
If machine learning operations are performed outside the database using separate data retrieval and processing systems, then processing flexibility and model complexity can be increased, but data movement increases, processing time increases, and security risks increase
Solution Approach 1:
The patent merges the machine learning processing system with the database system by integrating vector processing capabilities directly into the database engine. This allows machine learning operations to be performed on data while it remains stored in the database, eliminating the need to retrieve and transfer data to external processing systems. The integration enables unified query processing that combines traditional SQL operations with vector-based machine learning operations in a single system.
2Adaptability or versatility
If data is moved from database to external processing systems for machine learning operations, then processing capabilities can be enhanced, but data security and compliance with data residency regulations deteriorate
Solution Approach 1:
The patent extracts vector processing capabilities from external machine learning systems and embeds them directly within the database engine. This extraction and integration approach allows the database to perform machine learning operations internally without transferring data outside the database boundary, thereby maintaining data security and compliance while still providing advanced processing capabilities.
3Device complexity
If traditional data retrieval and external processing approaches are used, then system architecture can be simplified, but resource consumption and processing time increase
Solution Approach 1:
The patent makes the database system multi-functional by enabling it to perform both traditional data storage and retrieval operations as well as vector-based machine learning operations. The database engine is enhanced to handle diverse operation types including scalar operations, vector operations, and machine learning inference directly within the same system, eliminating the need for separate processing systems and improving overall productivity.
Data Source
AI summary
A method may include receiving, at a database that may include extension-based functionality, a database query request to perform a machine learning inference operation on data stored in the database, the machine learning inference operation to be performed at the database in accordance with the extension-based functionality. The method may include instantiating, in accordance with the extension-based functionality, a user-defined function (UDF) for performing machine learning inference operations. The method may include calling, with the UDF, the machine learning inference operation to process, at the database, the data retrieved from a table of the database. The method may include transmitting a response to the database query request, the response that may indicate an output of the machine learning inference operation, the output that may include a processed version of the data.


