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

TL;DR

RTGL is a declarative language simplifying relational deep learning task generation, addressing SQL-based temporal leakage issues.

cs.PL 🔴 Advanced 2026-09-01 40 views
Oleksii Kolesnichenko Jakub Peleška Gustav Šír
Relational Deep Learning Declarative Language Temporal Safety Task Generation Open Source

Key Findings

Methodology

RTGL uses declarative syntax to define predictive tasks, avoiding temporal leakage caused by manual SQL. Key components include ANTLR4-based parsing, semantic validation, and a SQL conversion engine ensuring temporal safety and semantic correctness.

Key Results

  • Experiments show RTGL-generated task tables align with RelBench benchmarks while uncovering temporal logic errors in baseline SQL, such as future data leakage in the driver-dnf task.
  • RTGL successfully extended to complex enterprise databases like the Seznam dataset in the ReDeLEx framework, generating diverse predictive tasks.
  • New tasks created with RTGL demonstrate flexibility, such as predicting client service usage over the next 30 days.

Significance

RTGL significantly simplifies relational deep learning task definitions, addressing manual SQL's temporal leakage issues. It offers an open-source, transparent tool for academia and industry, advancing relational data ML research.

Technical Contribution

RTGL provides a declarative framework supporting strict temporal window definitions to prevent data leakage. It is independent of proprietary platforms and integrates with open-source ecosystems like RelBench and ReDeLEx.

Novelty

RTGL is the first open-source relational deep learning task generation language, using declarative syntax to reduce task definition complexity and filling the gap left by proprietary tools like PQL.

Limitations

  • RTGL cannot currently handle multi-hop connection tasks directly without intermediate views.
  • Defining complex temporal windows may be challenging for beginners.

Future Work

Future directions include extending RTGL to support multi-hop connection tasks, optimizing syntax for user-friendliness, and exploring integrations with additional frameworks.

AI Executive Summary

Relational Deep Learning (RDL) enables machine learning on multi-tabular data but requires complex, error-prone SQL queries to define predictive tasks. RTGL addresses this by introducing a declarative, open-source language for task generation.

RTGL abstracts low-level SQL details, allowing users to define predictive objectives, temporal windows, and entity tables with simple syntax. Experiments validate RTGL-generated task tables against RelBench benchmarks, revealing errors in baseline SQL. RTGL also extends to complex enterprise datasets, showcasing its versatility.

RTGL's open-source nature and temporal safety design provide a valuable tool for relational deep learning research. However, further optimization is needed to support more complex tasks and improve usability. Future work will explore its scalability and integration with additional frameworks.

Deep Analysis

Background

Relational databases are widely used for structured data storage, but traditional ML methods require flattening data into single tables, leading to information loss. Relational Deep Learning (RDL) represents relational databases as heterogeneous graphs, enabling direct application of graph neural networks.

Core Problem

Defining RDL predictive tasks requires complex SQL queries with strict temporal safety, prone to future data leakage. This impacts model training accuracy and increases engineering complexity.

Innovation

RTGL introduces a declarative language allowing users to define predictive tasks with simple syntax, automatically generating temporally safe SQL queries. It is independent of proprietary platforms, compatible with open-source ecosystems, and supports diverse task types.

Methodology

  • �� ANTLR4 parses RTGL syntax into Abstract Syntax Trees (AST).
  • �� Semantic validation checks table/column existence, type matching, and temporal window logic.
  • �� SQL conversion engine generates temporally safe SQL queries or task tables based on AST, ensuring strict temporal window definitions.

Experiments

Experiments validate RTGL-generated task tables against RelBench benchmarks and extend its application to the complex Seznam dataset in the ReDeLEx framework. Comparisons reveal temporal logic errors in baseline SQL, demonstrating RTGL's temporal safety.

Results

RTGL-generated task tables align with RelBench benchmarks while uncovering future data leakage issues in baseline SQL. Extension experiments demonstrate RTGL's flexibility in complex databases, successfully generating diverse predictive tasks.

Applications

RTGL can be used for relational deep learning task definitions, such as client behavior prediction, recommendation systems, and time-series analysis, suitable for academic and industrial applications.

Limitations & Outlook

RTGL currently cannot handle multi-hop connection tasks directly. Complex temporal window definitions may challenge beginners. Future improvements are needed to optimize syntax and expand functionality.

Plain Language Accessible to non-experts

Imagine a library with multiple shelves, each containing different categories of books. A relational database is like this library, where each shelf is a table, and relationships between books are foreign keys. RTGL acts like a librarian—you tell it what books you need, and it organizes them for you, ensuring you only see past information and not future books.

ELI14 Explained like you're 14

Imagine playing a game where you predict which players will complete tasks in the next 30 days. RTGL is like a super helper—you just tell it the rules, like 'only look at past data,' and it creates a safe task table for training your AI model to make predictions! Cool, right?

Glossary

Relational Deep Learning

A machine learning paradigm directly processing relational databases as heterogeneous graphs.

Used to handle multi-table data without information loss.

Temporal Leakage

Training data contains future information, leading to inaccurate predictions.

RTGL prevents this by strictly defining temporal windows.

Declarative Language

A programming language focused on describing goals rather than implementation.

RTGL uses declarative syntax for task definitions.

ANTLR4

A powerful syntax parsing tool used to generate abstract syntax trees.

RTGL uses ANTLR4 for syntax parsing.

RelBench

A benchmark framework for relational deep learning.

Used to validate RTGL-generated task tables.

Open Questions Unanswered questions from this research

  • 1 How to support multi-hop connection tasks?
  • 2 How to optimize syntax for better user-friendliness?

Applications

Immediate Applications

Client Behavior Prediction

Generate temporally safe task tables with RTGL to predict future client behaviors.

Recommendation Systems

Use RTGL to define predictive tasks for recommending products or services to users.

Long-term Vision

Complex Relational Database Analysis

Extend RTGL to support multi-hop connection tasks, advancing relational data ML research.

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.

cs.PL cs.DB cs.LG