Neural Networks for Relational Data

Navdeep Kaur, Gautam Kunapuli, Saket Joshi, Kristian Kersting, Sriraam Natarajan

Abstract

Traditional deep learning models excel at processing "flat" data structures like vectors and matrices. However, real-world data is often inherently relational, consisting of entities and complex, varying relationships. This paper introduces Neural Networks with Relational Parameter Tying (NNRPT), a framework that bridges the gap between deep learning and relational logic. By automatically learning rules via relational random walks and enforcing parameter tying across identical structures, NNRPT handles complex data more effectively than traditional hand-coded models.

Introduction

Standard deep learning thrives on data where every feature has a fixed position. In contrast, relational data—such as social networks, citation graphs, or molecular structures—is defined by entities and their interactions. While Statistical Relational Learning (SRL) addresses this, most existing relational neural networks rely on expert-defined rules, which are time-consuming to create and prone to bias. Conversely, "propositionalization" (flattening data) often destroys the structural information that makes the data valuable. NNRPT seeks to learn both the structure and the parameters of a relational neural network directly from raw data.

The NNRPT Framework

The authors propose a three-stage approach to "unroll" a relational database into a neural network architecture.

1. Generating Lifted Random Walks

Rather than relying on human experts to define logic rules, the system performs random walks across the relational graph (e.g., Professor → teaches → Course → taken by → Student). These walks serve as "templates" or "lifted rules" that define the network's potential structure.

2. Network Instantiation (Grounding)

The network is constructed with four distinct layers to map relational logic into a differentiable architecture:

  • Input Layer: Represents atomic facts (e.g., "Alice is a student").
  • Grounding Layer: Represents specific instances of the random walks found in the data.
  • Combining Rules Layer: Aggregates multiple instances of the same rule using functions like Average, Max, or Noisy-Or.
  • Output Layer: Produces the final prediction for the target relation.
General architecture of NNRPT showing the four-layer structure and parameter tying.

3. Relational Parameter Tying

The core innovation of NNRPT is relational parameter tying. Every instance of the same "lifted rule" shares the same weight. This drastically reduces the number of parameters, preventing overfitting and enhancing interpretability. As shown in the example below, different groundings of the same logical path (like "WorkedUnder") share weights $w_1$ or $w_2$ based on their underlying template.

A concrete example of network instantiation for the 'WorkedUnder' relation, illustrating how facts are grounded into logical rules.

Experimental Evaluation

The model was evaluated on five standard relational benchmarks: UW-CSE (academic relationships), Mutagenesis (chemical compounds), Cora (citation matching), IMDB (movie industry relationships), and Sports (NELL project facts).

Key Results

  • Superiority over "Flat" Models: NNRPT significantly outperformed standard neural networks using flattened feature vectors, proving that preserving relational structure is vital.
  • Competitive with SRL: NNRPT performed comparably to or better than top-tier statistical relational models like RDN-Boost and MLN-Boost.
  • Scalability over LRNN: On the Cora and Mutagenesis datasets, NNRPT showed a significant performance gap over Lifted Relational Neural Networks (LRNN), primarily because NNRPT can handle a much larger number of automatically generated rules.

Discussion and Future Work

NNRPT can be viewed as a Convolutional Neural Network (CNN) for relations. The fact-grounding edges act like a convolution (filtering), the combination layer acts like pooling (downsampling), and the final layer is the classifier. Because the features are based on logical random walks, the learned representations remain human-readable.

Future work aims to address current limitations, including:

  • Scalability: Moving beyond exhaustive grounding toward more sophisticated sampling or approximate counting.
  • Depth: Stacking these networks to allow for deeper relational reasoning.
  • Negation: Incorporating logical negation to increase the model's expressive power.

Summary updated

BibTeX
@inproceedings{kaur2019neural,
  author = {Navdeep Kaur and Gautam Kunapuli and Saket Joshi and Kristian Kersting and Sriraam Natarajan},
  title = {{Neural Networks for Relational Data}},
  booktitle = {ILP},
  year = {2019},
  doi = {10.1007/978-3-030-49210-6\_6},
}
Figure