Categories
Pages
-

DBIS

Multi-Granularity Attention Relational Transformer (Master Thesis)

November 5th, 2026

Relational Deep Learning (RDL) makes it possible to learn directly from linked database tables by representing rows as nodes and primary–foreign key relationships as edges [1]. RelBench provides a common setting for evaluating these models across databases and prediction tasks [2]. Leading approaches differ in what they pass between records. RelGNN uses composite messages to model many-to-many relationships through linking tables [3], Griffin pretrains a shared encoder and a message-passing network across datasets [4], and RelGT combines attention over nearby records with attention to learned global representations [5]. The Relational Transformer (RT) takes a finer-grained approach, allowing individual cells to attend to other cells in the same row, the same column, or a linked record [6].

RT selects records by following key relationships, then includes every non-missing feature cell from each selected row [6]. In a fixed context window, a wide row can therefore consume much of the budget even when only a few of its attributes matter for the prediction. Direct attention to every detail may also be unnecessary when a prediction depends on a pattern across records, such as a customer’s purchase frequency. This thesis investigates whether task-relevant column selection can make room for more informative records and whether learned row and column memories can replace selected cell-to-cell interactions while preserving access to decisive values. Experiments on RelBench will measure the contribution of each change to predictive quality and computational cost.

Thesis Type
  • Master
Student
Yixin Zhu
Status
Running
Presentation room
Seminar room I5 - 6202
Supervisor(s)
Stefan Decker
Advisor(s)
Yixin Peng
Contact
peng@dbis.rwth-aachen.de

Background

RT pretrains on masked cells. Its attention layers distinguish values in the same column, features of a record and its linked parents, and features of linked child records [6]. These relations need not require the same level of detail. For example, predicting the value of a customer’s latest purchase requires keeping each amount paired with its date. Predicting typical spending may only require a summary of the historical amounts. A row memory can encode attributes that belong to one transaction, while a column memory can summarize an attribute across the records visible at prediction time.

The proposed architecture draws on the use of learned summaries to mediate attention in the Set Transformer [7]. In the relational setting, a cell would query a memory associated with its row, column, or linked records. Direct cell-to-cell attention would remain available for relations that require individual values. Column selection acts earlier, when the context is assembled, so its effect can be tested independently of memory-based attention.

Research questions

  • RQ1 — Architecture. Which combinations of cell, row, and column representations best support information exchange within tables and across primary–foreign key links?
  • RQ2 — Predictive quality and cost. Under what conditions can a multi-granularity model match RT’s predictive quality at lower training or inference cost?
  • RQ3 — Effects of compression. How do the aggregation rule, the number of memory vectors, and the attention paths retained for each relation affect information retention, predictive quality, and efficiency?
  • RQ4 — Context and task scope. Under a fixed input budget, does task-relevant column selection improve prediction on its own or in combination with memory-based attention? Exploratory extensions examine event age at prediction time and transfer to entity recommendation.

Tasks

a) Establish the RT baseline
  • Reproduce RT on classification and regression tasks from RelBench databases with different schemas, using the original masked-cell objective and temporal splits [2, 6].
b) Develop multi-granularity attention
  • Aggregate visible cells into learned row and column memories. Replace selected within-table or cross-table attention paths with cell-to-memory attention, varying the number of memory vectors per group.
c) Select task-relevant context
  • Rank feature columns by their semantic relevance to the prediction target. Compare the selected context with RT’s original sampling policy under the same input-cell budget.
d) Evaluate predictive quality and computational cost
  • Pretrain and fine-tune the model under matched settings. Compare RT and the proposed architecture with and without column selection, and ablate memory size and attention paths. Report task scores, training time, inference latency, and peak memory as context size increases.

References

[1] Fey, M., Hu, W., Huang, K., Lenssen, J.E., Ranjan, R., Robinson, J., Ying, R., You, J., Leskovec, J.: Position: Relational Deep Learning – Graph Representation Learning on Relational Databases. In: Proceedings of the 41st International Conference on Machine Learning. PMLR, vol. 235, pp. 13592–13607 (2024). Conference paper

[2] Robinson, J., Ranjan, R., Hu, W., Huang, K., Han, J., Dobles, A., Fey, M., Lenssen, J.E., Yuan, Y., Zhang, Z., He, X., Leskovec, J.: RelBench: A Benchmark for Deep Learning on Relational Databases. In: Advances in Neural Information Processing Systems, vol. 37, pp. 21330–21341 (2024). Conference paper

[3] Chen, T., Kanatsoulis, C., Leskovec, J.: RelGNN: Composite Message Passing for Relational Deep Learning. In: Proceedings of the 42nd International Conference on Machine Learning. PMLR, vol. 267, pp. 8296–8312 (2025). Conference paper

[4] Wang, Y., Wang, X., Gan, Q., Wang, M., Yang, Q., Wipf, D., Zhang, M.: Griffin: Towards a Graph-Centric Relational Database Foundation Model. In: Proceedings of the 42nd International Conference on Machine Learning. PMLR, vol. 267, pp. 64604–64627 (2025). Conference paper

[5] Dwivedi, V.P., Jaladi, S., Shen, Y., Lopez, F., Kanatsoulis, C., Puri, R., Fey, M., Leskovec, J.: Relational Graph Transformer. In: International Conference on Learning Representations (ICLR) (2026). Conference paper

[6] Ranjan, R., Hudovernik, V., Znidar, M., Kanatsoulis, C., Upendra, R., Mohammadi, M., Meyer, J., Palczewski, T., Guestrin, C., Leskovec, J.: Relational Transformer: Toward Zero-Shot Foundation Models for Relational Data. In: International Conference on Learning Representations (ICLR) (2026). Conference paper

[7] Lee, J., Lee, Y., Kim, J., Kosiorek, A., Choi, S., Teh, Y.W.: Set Transformer: A Framework for Attention-based Permutation-Invariant Neural Networks. In: Proceedings of the 36th International Conference on Machine Learning. Proceedings of Machine Learning Research, vol. 97, pp. 3744–3753 (2019). Conference paper


Prerequisites:
  • Programming experience in Python and familiarity with a deep learning framework such as PyTorch.
  • Understanding of Transformers, attention, and model pretraining.
  • Familiarity with relational databases, primary and foreign keys, and experimental evaluation of machine learning models.