Beyond Foreign-Key Connectivity: Semantic Relationship Representation for Relational Deep Learning

Noy Cohen-ShapiraarXiv 2026 · arXiv

TL;DR

This paper argues that in Relational Deep Learning, we shouldn't treat foreign keys as mere structural "pipes" between tables. Instead, it proposes a conceptual framework to represent relationships as rich semantic objects, distinguishing between information that belongs to a record, a specific interaction, or the broader context of the connection.

What Problem Does This Paper Address?

Relational Deep Learning (RDL) has gained traction by representing databases as heterogeneous graphs where rows are nodes and foreign keys are edges. However, the author points out a subtle but significant gap: most current models treat a foreign-key link primarily as a structural connection.

In reality, a link is more than just a pointer. A connection between a Customer and an Order carries a different semantic meaning than one between an Order and a Product. Furthermore, relational databases often store information in "junction tables" (like OrderItem) that technically connect two entities but also carry their own data (like quantity). Simply flattening these into edges or treating every column as a node feature can obscure the underlying logic of the data. The paper seeks to move beyond "connectivity" toward "semantic representation."

Methods

The author introduces the Relationship Representation Construction (RRC) protocol. This is a systematic way to map database elements to graph components based on a principle called Semantic Ownership.

The protocol breaks relationship information into three dimensions:

  1. Schema-Level Semantics: Captures the "role" of the link (e.g., source/destination table types and the specific foreign-key identity).
  2. Instance-Level Attributes: Features that describe a specific interaction (e.g., the "strength" of a relationship or "quantity" in a transaction).
  3. Contextual Information: Temporal data (when did this happen?) or structural data (cardinality and directionality).

A key part of the method is the Ownership Function, which maps attributes to one of five categories: Node, Relationship, Context, Schema, or Unknown. The framework is intentionally conservative; if it's unclear where an attribute belongs, it isn't automatically forced into a relationship feature, preventing the introduction of redundant or misleading data.

Finally, the paper describes how these representations ($z_e$) can be integrated into Graph Neural Networks (GNNs) using relationship-conditioned message passing, where the message sent between nodes is explicitly influenced by the rich semantic embedding of the edge.

Datasets

Not discussed in the paper. The paper is a conceptual and theoretical contribution. It uses a "simplified e-commerce database" (Customer, Order, Product, OrderItem) as an illustrative example to walk through the protocol, but it does not perform experiments on standard benchmarks like OGB-LSC or RelBench.

Key Insights and Ideas

  • Physical Location $\neq$ Semantic Meaning: Just because an attribute is stored in the Order table doesn't mean it describes the order entity. It might describe the relationship between a customer and a product. The RRC protocol forces researchers to make an explicit modeling decision about "who owns this data."
  • The Junction Table Dilemma: The paper provides a clear heuristic for "Association Entities" (junction tables). It suggests they should remain as nodes if they have an independent identity or connect to more than two tables, but can be "collapsed" into attributed edges if they purely represent a relationship instance.
  • Conservative Assignment: By marking ambiguous attributes as Unknown rather than promoting them to relationship features, the framework avoids "semantic pollution"—where the model learns from features placed in the wrong context.
  • Complementary Nature: The author emphasizes that this isn't a new GNN architecture, but a "pre-processing" logic that can make existing models (like RelGNN or Relational Graph Transformers) more effective by giving them better-organized input.

Key Results

As a conceptual framework paper, no quantitative results (accuracy, speed, etc.) are provided.

The "result" of the paper is the formalization of the RRC protocol and a proposed Evaluation Agenda. This agenda identifies five key Research Questions (RQs) for the community, including whether explicit relationship representation actually improves predictive performance and whether these semantic encoders can help models generalize across different database schemas (transfer learning).

Limitations and Future Work

  • Manual vs. Automatic Mapping: Currently, determining "semantic ownership" requires human domain expertise. The author identifies the development of automatic or semi-automatic methods for identifying ownership from metadata as a critical next step.
  • Empirical Validation: The framework's benefits are currently theoretical. Future work needs to implement this protocol on large-scale relational benchmarks to prove that "semantic awareness" leads to measurable gains over "structural awareness."
  • Complexity: Adding schema-level and contextual embeddings increases the complexity of the input space, which may present challenges for computational scalability in very large databases.

Summary updated

Abstract

Relational databases encode information through tables and primary--foreign key constraints. Although recent Relational Deep Learning (RDL) approaches represent these databases as heterogeneous graphs, a foreign-key connection primarily specifies structural connectivity between records. Its semantic interpretation may involve additional information that is not explicitly represented by connectivity alone. This paper introduces a conceptual framework for constructing relationship-aware representations from relational databases. The framework distinguishes three complementary aspects: (i) schema-defined relationship semantics, including endpoint types and foreign-key roles; (ii) association entities and explicitly available relationship-level attributes; and (iii) contextual information describing the temporal and structural circumstances of a connection. We formulate a Relationship Representation Construction (RRC) protocol that maps relational schema elements and database records to node representations, relationship descriptors, and contextual representations. A key principle of the protocol is semantic ownership: attributes are assigned to records, relationships, or context according to their meaning, rather than merely their physical location in a database table. Ambiguous attributes are not automatically promoted to relationship features. The resulting representations can be incorporated into existing relational graph learning architectures through relationship-conditioned message passing. The proposed framework is complementary to recent work on relational message passing, graph transformers, and task-dependent graph construction. We discuss its conceptual foundations, illustrate the construction protocol using a multi-table database, and identify research questions and empirical evaluations required to establish its potential benefits.
BibTeX
@misc{cohenshapira2026beyond,
  author = {Noy Cohen-Shapira},
  title = {{Beyond Foreign-Key Connectivity: Semantic Relationship Representation for Relational Deep Learning}},
  year = {2026},
  eprint = {2611.14706},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2611.14706},
}
Figure