[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"doc-detail-118140-en":3,"doc-seo-118140-105":30,"detail-sidebar-cat-0-en-105":91},{"code":4,"msg":5,"data":6},0,"success",{"doc_id":7,"user_id":8,"nickname":9,"user_avatar":10,"doc_module":4,"category_id":11,"category_name":12,"doc_title":13,"doc_description":14,"doc_content":15,"file_id":16,"file_url":17,"file_type":18,"file_size":19,"view_count":20,"is_deleted":4,"is_public":20,"is_downloadable":20,"audit_status":20,"page_count":21,"language":22,"language_code":23,"site_id":24,"html_lang":23,"table_of_contents":25,"faqs":26,"seo_title":27,"seo_description":14,"update_tm":28,"read_time":29},118140,2336464648322,"Aria","https://ap-avatar.wpscdn.com/avatar/2200025388227c56fec?_k=1778556882303663488",6,"Technology","Recursive SQL and GPU-Support for In-Database Machine Learning - In-Database Machine Learning Pipeline Optimization","In machine learning, continuous retraining requires efficient access to the latest training data stored in databases. This work demonstrates how recursive SQL tables can express an end-to-end pipeline covering preprocessing, model training, and validation directly inside the database. It extends the code-generating database system Umbra with automatic differentiation integrated into recursive tables by representing loss functions as SQL lambda functions. The approach generates machine code for partial derivatives and GPU-oriented LLVM code for gradient descent, enabling hardware-level GPU kernel fine-tuning, improved synchronization, and faster execution through cached subexpressions.","Secondary Publication  \nSchüle, Maximilian  \nRecursive SQL and GPU-Support for In-Database Machine Learning  \nDate of secondary publication: 20.04.2023  \nVersion of Record (Published Version), Conferenceobject Persistent identifier: urn:nbn:de:bvb:473-irb-591733  \nPrimary publication  \nSchüle, Maximilian: Recursive SQL and GPU-Support for In-Database Machine Learning. In: Lecture Notes in Informatics (LNI) : Proceedings ; P-331 . König-Ries, Birgitta; Scherzinger, Stefanie; Lehner, Wolfgang; Vossen, Gottfried (editors) Bonn : Gesellschaft für Informatik e.V. , 2023. p 931. DOI: 10. 18420/BTW2023-62  \nLegal Notice  \nThis work is protected by copyright and/or the indication of a licence. You are free to use this work in any way permitted by the copyright and/or the licence that applies to your usage. For other uses, you must obtain permission from the rights-holder(s) .  \nThis document is made available under a Creative Commons license.  \nThe license information is available online:  \n[https://creativecommons.org/l](https://creativecommons.org/l)icenses/by-sa/4 .0/legalcode  \nRecursive SQL and GPU-Support for In-Database Machine Learning  \nMaximilian E. Schüle 1  \nAbstract: In machine learning, continuously retraining a model guarantees accurate predictions based on the latest data as training input. But to retrieve the latest data from a database, time-consuming extraction is necessary as database systems have rarely been used for operations such as matrix algebra and gradient descent. In this work, we demonstrate that SQL with recursive tables makes it possible to express a complete machine learning pipeline out of data preprocessing, model training and its validation. To facilitate the speciﬁcation of loss functions, we extend the code-generating database system Umbra by an operator for automatic diﬀerentiation for use within recursive tables: With the loss function expressed in SQL as a lambda function, Umbra generates machine code for each partial derivative. We further use automatic diﬀerentiation for a dedicated gradient descent operator, which generates LLVM code to train a user-speciﬁed model on GPUs. We ﬁne-tune GPU kernels at hardware level to allow a higher throughput and propose non-blocking synchronisation of multiple units. In our evaluation, automatic diﬀerentiation accelerated the runtime by the number of cached subexpressions compared to compiling each derivative separately. Our GPU kernels with independent models allowed maximal throughput even for small batch sizes, making machine learning pipelines within SQL more competitive.  \nReferences  \n[Sc22] Schüle, M. E.; Lang, H.; Springer, M.; Kemper, A.; Neumann, T.; Günnemann, S.: Recursive SQL and GPU-support for in-database machine learning. Distributed Parallel Databases 40/2, pp. 205–259, 2022 .  \n1 University of Bamberg, [maximilian.schuele@uni-bamberg.de](maximilian.schuele@uni-bamberg.de)cba  \n􀀀􀀁􀀂 doi:10 . 18420/BTW2023-62","cbCaibnDkCZ0pq8C","https://ap.wps.com/l/cbCaibnDkCZ0pq8C","pdf",995788,1,2,"English","en",105,"# Abstract\n## Data access and in-database pipeline design\n## Automatic differentiation with recursive tables\n## GPU code generation and optimization\n## Evaluation results and throughput benefits","[{\"question\":\"How does recursive SQL help build an in-database machine learning pipeline?\",\"answer\":\"It enables expressing the full workflow—data preprocessing, model training, and validation—using recursive tables within the database rather than requiring separate extraction steps.\"},{\"question\":\"What role does automatic differentiation play in this approach?\",\"answer\":\"Automatic differentiation is integrated into Umbra so that loss functions written as SQL lambda functions can be differentiated and generate machine code for each partial derivative.\"},{\"question\":\"How are GPUs used to accelerate training in the proposed system?\",\"answer\":\"A dedicated gradient descent operator uses automatic differentiation to generate LLVM code for GPU execution, then fine-tunes GPU kernels at hardware level to improve throughput and synchronization.\"}]","Recursive SQL and GPU-Support for In-Database Machine Learning - In-Database Machine Learning Pipeline Optimization | PDF",1785681841,5,{"code":4,"msg":31,"data":32},"ok",{"site_id":24,"language":23,"slug":33,"title":13,"keywords":34,"description":14,"schema_data":35,"social_meta":86,"head_meta":88,"extra_data":90,"updated_unix":28},"recursive-sql-and-gpu-support-for-in-database-machine-learning-in-database-machine-learning-pipeline-optimization","",{"@graph":36,"@context":85},[37,53,68],{"@type":38,"itemListElement":39},"BreadcrumbList",[40,44,47,50],{"item":41,"name":42,"@type":43,"position":20},"https://docshare.wps.com","Home","ListItem",{"item":45,"name":46,"@type":43,"position":21},"https://docshare.wps.com/document/","Document",{"item":48,"name":12,"@type":43,"position":49},"https://docshare.wps.com/document/technology/",3,{"item":51,"name":13,"@type":43,"position":52},"https://docshare.wps.com/document/recursive-sql-and-gpu-support-for-in-database-machine-learning-in-database-machine-learning-pipeline-optimization/118140/",4,{"url":51,"name":13,"@type":54,"author":55,"headline":13,"publisher":57,"fileFormat":60,"inLanguage":23,"description":14,"dateModified":61,"datePublished":62,"encodingFormat":60,"isAccessibleForFree":63,"interactionStatistic":64},"DigitalDocument",{"name":9,"@type":56},"Person",{"url":41,"name":58,"@type":59},"DocShare","Organization","application/pdf","2026-08-05","2026-08-02",true,{"@type":65,"interactionType":66,"userInteractionCount":20},"InteractionCounter",{"@type":67},"ViewAction",{"@type":69,"mainEntity":70},"FAQPage",[71,77,81],{"name":72,"@type":73,"acceptedAnswer":74},"How does recursive SQL help build an in-database machine learning pipeline?","Question",{"text":75,"@type":76},"It enables expressing the full workflow—data preprocessing, model training, and validation—using recursive tables within the database rather than requiring separate extraction steps.","Answer",{"name":78,"@type":73,"acceptedAnswer":79},"What role does automatic differentiation play in this approach?",{"text":80,"@type":76},"Automatic differentiation is integrated into Umbra so that loss functions written as SQL lambda functions can be differentiated and generate machine code for each partial derivative.",{"name":82,"@type":73,"acceptedAnswer":83},"How are GPUs used to accelerate training in the proposed system?",{"text":84,"@type":76},"A dedicated gradient descent operator uses automatic differentiation to generate LLVM code for GPU execution, then fine-tunes GPU kernels at hardware level to improve throughput and synchronization.","https://schema.org",{"og:url":51,"og:type":87,"og:title":13,"og:site_name":58,"og:description":14},"article",{"robots":89,"canonical":51},"index,follow",{"doc_id":7,"site_id":24},{"code":4,"msg":5,"data":92},[93,97,101,105,109,112,117,122,127,130,134],{"id":20,"doc_module":4,"doc_module_name":46,"category_name":94,"show_sort_weight":95,"slug":96},"Story & Novel",90,"story-novel",{"id":21,"doc_module":4,"doc_module_name":46,"category_name":98,"show_sort_weight":99,"slug":100},"Literature",80,"literature",{"id":52,"doc_module":4,"doc_module_name":46,"category_name":102,"show_sort_weight":103,"slug":104},"Exam",70,"exam",{"id":29,"doc_module":4,"doc_module_name":46,"category_name":106,"show_sort_weight":107,"slug":108},"Comic",60,"comic",{"id":11,"doc_module":4,"doc_module_name":46,"category_name":12,"show_sort_weight":110,"slug":111},50,"technology",{"id":113,"doc_module":4,"doc_module_name":46,"category_name":114,"show_sort_weight":115,"slug":116},7,"Healthcare",40,"healthcare",{"id":118,"doc_module":4,"doc_module_name":46,"category_name":119,"show_sort_weight":120,"slug":121},8,"Research & Report",30,"research-report",{"id":123,"doc_module":4,"doc_module_name":46,"category_name":124,"show_sort_weight":125,"slug":126},9,"Religion & Spirituality",20,"religion-spirituality",{"id":125,"doc_module":4,"doc_module_name":46,"category_name":128,"show_sort_weight":125,"slug":129},"World Cup","world-cup",{"id":131,"doc_module":4,"doc_module_name":46,"category_name":132,"show_sort_weight":131,"slug":133},10,"Lifestyle","lifestyle",{"id":135,"doc_module":4,"doc_module_name":46,"category_name":136,"show_sort_weight":29,"slug":137},19,"General","general"]