arXiv:2609.01292cs.PLSep 2026

Manuscript Offprint

arXiv:2609.01292

Relational Task Generation Language: A Declarative Specification Framework for Relational Deep Learning

Oleksii Kolesnichenko, Jakub Peleška, Gustav Šír

Open access. PaperVantage converted this article to text, so layout and figures may differ from the original.

A Declarative Specification Framework for Relational Deep Learning

Oleksii Kolesnichenko, Jakub Peleška (✉), and Gustav Šir

Czech Technical University in Prague, Karlovo námeří 13, Prague, 121 35, Czechia kolesole@fel.cvut.cz, {jakub.peleska,gustav.sir}@cvut.cz

Abstract. Relational Deep Learning (RDL) has become a powerful paradigm for learning from multi-tabular data. However, manually defining RDL prediction tasks is a laborious process that frequently results in data leakage. To address this issue, we introduce Relational Task Generation Language (RTGL) - an open-source declarative language that streamlines RDL task formulation by abstracting away low-level SQL details. We showcase RTGL by reconstructing existing RDL benchmark tasks and uncovering their inconsistencies stemming from manually crafted SQL definitions of RDL prediction targets, thereby underscoring the value of a dedicated declarative language. In addition, we demonstrate the practical utility of RTGL by designing various new tasks with diverse forms and target types. Our experiments confirm the robustness and usability of RTGL, as well as its seamless integration with the existing RDL frameworks, making it widely accessible to the community.

Keywords: Relational Deep Learning · Domain Specific Language · Predictive Task Generation · Graph Neural Networks · Relational Databases

1 Introduction

Relational databases (RDBs) are ubiquitous for storing and managing structured data across modern enterprises [7]. Yet, leveraging deep learning [14] on this data remains highly challenging [4]. While classic machine learning (ML) domains like computer vision readily represent data in the suitable form of fixed-size numeric tensors [27,20,40,9], relational data, fragmented across multiple interrelated tables of diverse shapes and forms, is fundamentally different. To adapt relational data for classic ML, practitioners used to perform complex joins and aggregations to first denormalize the RDBs [26] into the suitable format. However, this manual feature engineering is not only time-consuming but also inevitably discards information while disrupting the original RDB structure.

To learn from these multi-table structures without the need for manual feature flattening, Relational Deep Learning (RDL) [44,12] has recently emerged as a new ML paradigm. Rather than forcing the data into a fixed-form tensor,

O. Kolesnichenko et al.

RDL treats the entire database as a temporal heterogeneous graph [38]. In this representation, tables are translated into distinct node types, and the foreign-key relationships between them define the edges. Once this graph is constructed, it can be directly processed by specialized graph neural architectures [34,6,37] designed to capture both the semantic features of individual rows as well as the structural topology of the RDB.

While RDL offers an elegant model architecture blueprint, the practical bottleneck has moved to defining the prediction tasks themselves. Particularly, in relational learning [8], training depends on precisely specified prediction problems—what entity to forecast, which label to target, and the exact timestamp of prediction. Deriving such training data demands complex, time-aware SQL [5] queries, where engineers must enforce strict temporal cutoffs so the model only sees past data, fully isolated from future outcomes [38,33]. This, mostly manual, process is error-prone and often leads to temporal leakage, where information from the future unintentionally contaminates the training features.

Very recently, a Predictive Query Language (PQL) [24], was introduced to simplify task generation in RDL by providing a high-level abstraction specifically tailored for predictive modeling on relational data. However, PQL remains a proprietary, closed-source language, deeply embedded within a specific commercial platform, 1^{1} which severely limits its accessibility, transparency, and extensibility for the broader RDL research community.

To address this limitation, we introduce the Relational Task Generation Language (RTGL), an open-source declarative language for generating tasks in RDL, which we make publicly available 2^{2} to the community. While RTGL largely adopts the syntax and conceptual goals of the PQL, it is a completely independent project designed to integrate into the wider existing open-source RDL ecosystems, such as RelBench [38] and ReDeLEx [33].

RTGL allows researchers to define complex temporal prediction tasks using but a few lines of declarative code, as depicted in Figure 1. We demonstrate RTGL's capabilities by reconstructing existing RelBench [38] tasks and identifying inconsistencies arising from manually written, complex SQL definitions of RDL prediction targets—highlighting the value of a new dedicated language. We further showcase RTGL by formulating various new tasks within the REDELEX framework [33] with diverse target types, emphasizing its practical utility.

References (36)