Learning Hierarchical Relational Representations through Relational Convolutions

Relational convolutional networks learn higher-order relational features by convolving graphlet filters against subsets of objects.

arXiv Code Publisher
Graphlet filters
Relation subtensors
Graphlet filters
Relation subtensors
A depiction of the relational convolution operation.

Abstract

An evolving area of research in deep learning is the study of architectures and inductive biases that support the learning of relational feature representations. In this paper, we address the challenge of learning representations of hierarchical relations—that is, higher-order relational patterns among groups of objects. We introduce “relational convolutional networks”, a neural architecture equipped with computational mechanisms that capture progressively more complex relational features through the composition of simple modules. A key component of this framework is a novel operation that captures relational patterns in groups of objects by convolving graphlet filters—learnable templates of relational patterns—against subsets of the input. Composing relational convolutions gives rise to a deep architecture that learns representations of higher-order, hierarchical relations. We present the motivation and details of the architecture, together with a set of experiments to demonstrate how relational convolutional networks can provide an effective framework for modeling relational tasks that have hierarchical structure.

Method Overview

Compositionality—the ability to compose modules together to build iteratively more complex feature maps—is key to the success of deep representation learning. For example, in a feed forward network, each layer builds on the one before, and in a CNN, each convolution builds an iteratively more complex feature map. So far, work on relational representation learning has been limited to “flat” first-order architectures. In this work, we propose a compositional framework for learning hierarchical relational representations, which we call “relational convolutional networks.”

A schematic of the proposed architecture is shown in the figure to the right. The key idea involves formalizing a notion of “convolving” a relation tensor, describing the pairwise relations in a sequence of objects, with a “graphlet filter” which represents a template of relations between subsets of objects. Each composition of those operations computes relational features of a higher order.

Relational convolution
Inner product relation
Relational convolution
Inner product relation
Initial embedder
A depiction of the compositional architecture of relational convolutional networks.

Multi-Dimensional Inner Product Relation Module. The “Multi-dimensional Inner Product Relation” (MD-IPR) module receives a sequence of objects x1,…,xmx_1, \ldots, x_m as input and models the pairwise relations between them, returning an m×m×drm \times m \times d_r relation tensor, R[i,j]=r(xi,xj)R[i,j] = r(x_i, x_j), describing the relations between each pair of objects.

Relational Convolutions. The relational convolution operation does two things: 1) extracts features of the relations between groups of objects using pairwise relations 2) transforms the relation tensor back into a sequence of objects, allowing it be composed with another relational layer to compute higher-order relations. In a relational convolution module, we learn a set of “graphlet filters,” which form a template of relations among a subset of the objects (a graphlet). The output of a relational convolution operation is a sequence of objects R∗f=(⟨R[g],f⟩rel)g∈G=(z1,…,zng)R \ast \boldsymbol{f} = \left(\langle R[g], \boldsymbol{f} \rangle_{\mathrm{rel}} \right)_{g \in \mathcal{G}} = (z_1, \ldots, z_{n_g}) where each output object represents the relational pattern within some group of input objects, obtained through an appropriately-defined inner-product comparison with the graphlet filters.

Modeling groups. Rather than considering the relational patterns within all groups of objects, we explicitly model and determine relevant groupings through an attention operation.

Please see the paper for more details on the proposed architecture.

Experiments

We evaluate our proposed architecture on two sets of relational tasks: relational games and SET. We compare against previously proposed relational architectures, PrediNet and CoRelNet. We also compare against Transformers. Please see the paper for a description of the tasks and the experimental set up. We include a preview of the results here.

Relational games. The relational games benchmark allows us to evaluate out-of-distribution generalization. The dataset consists of a series of classification tasks involving a set of objects. In the figure below, we show generalization performance on two sets of objects different from those used during training.

Out-of-Distribution Generalization Performance on Relational Games Tasks

HexosStripessameoccursxoccursbetweenmatch pattern0.00.20.40.60.81.00.00.20.40.60.81.0AccuracyRelConvNet · Hexos · same 0.989 ± 0.004CoRelNet · Hexos · same 0.988 ± 0.011PrediNet · Hexos · same 0.990 ± 0.008Transformer · Hexos · same 0.997 ± 0.003RelConvNet · Stripes · same 0.974 ± 0.006CoRelNet · Stripes · same 0.724 ± 0.220PrediNet · Stripes · same 0.983 ± 0.014Transformer · Stripes · same 0.993 ± 0.009RelConvNet · Hexos · occurs 0.980 ± 0.003CoRelNet · Hexos · occurs 0.992 ± 0.007PrediNet · Hexos · occurs 0.907 ± 0.039Transformer · Hexos · occurs 0.881 ± 0.030RelConvNet · Stripes · occurs 0.880 ± 0.030CoRelNet · Stripes · occurs 0.518 ± 0.024PrediNet · Stripes · occurs 0.775 ± 0.091Transformer · Stripes · occurs 0.724 ± 0.041RelConvNet · Hexos · xoccurs 0.967 ± 0.002CoRelNet · Hexos · xoccurs 0.980 ± 0.014PrediNet · Hexos · xoccurs 0.872 ± 0.070Transformer · Hexos · xoccurs 0.867 ± 0.034RelConvNet · Stripes · xoccurs 0.946 ± 0.012CoRelNet · Stripes · xoccurs 0.606 ± 0.068PrediNet · Stripes · xoccurs 0.810 ± 0.055Transformer · Stripes · xoccurs 0.753 ± 0.062RelConvNet · Hexos · between 0.991 ± 0.002CoRelNet · Hexos · between 0.995 ± 0.002PrediNet · Hexos · between 0.978 ± 0.011Transformer · Hexos · between 0.986 ± 0.006RelConvNet · Stripes · between 0.988 ± 0.004CoRelNet · Stripes · between 0.582 ± 0.123PrediNet · Stripes · between 0.950 ± 0.036Transformer · Stripes · between 0.961 ± 0.019RelConvNet · Hexos · match pattern 0.961 ± 0.030CoRelNet · Hexos · match pattern 0.942 ± 0.022PrediNet · Hexos · match pattern 0.710 ± 0.078Transformer · Hexos · match pattern 0.627 ± 0.009RelConvNet · Stripes · match pattern 0.870 ± 0.080CoRelNet · Stripes · match pattern 0.581 ± 0.051PrediNet · Stripes · match pattern 0.658 ± 0.104Transformer · Stripes · match pattern 0.591 ± 0.011
HexosStripessameoccursxoccursbetweenmatchpattern0.00.20.40.60.81.00.00.20.40.60.81.0AccuracyRelConvNet · Hexos · same 0.989 ± 0.004CoRelNet · Hexos · same 0.988 ± 0.011PrediNet · Hexos · same 0.990 ± 0.008Transformer · Hexos · same 0.997 ± 0.003RelConvNet · Stripes · same 0.974 ± 0.006CoRelNet · Stripes · same 0.724 ± 0.220PrediNet · Stripes · same 0.983 ± 0.014Transformer · Stripes · same 0.993 ± 0.009RelConvNet · Hexos · occurs 0.980 ± 0.003CoRelNet · Hexos · occurs 0.992 ± 0.007PrediNet · Hexos · occurs 0.907 ± 0.039Transformer · Hexos · occurs 0.881 ± 0.030RelConvNet · Stripes · occurs 0.880 ± 0.030CoRelNet · Stripes · occurs 0.518 ± 0.024PrediNet · Stripes · occurs 0.775 ± 0.091Transformer · Stripes · occurs 0.724 ± 0.041RelConvNet · Hexos · xoccurs 0.967 ± 0.002CoRelNet · Hexos · xoccurs 0.980 ± 0.014PrediNet · Hexos · xoccurs 0.872 ± 0.070Transformer · Hexos · xoccurs 0.867 ± 0.034RelConvNet · Stripes · xoccurs 0.946 ± 0.012CoRelNet · Stripes · xoccurs 0.606 ± 0.068PrediNet · Stripes · xoccurs 0.810 ± 0.055Transformer · Stripes · xoccurs 0.753 ± 0.062RelConvNet · Hexos · between 0.991 ± 0.002CoRelNet · Hexos · between 0.995 ± 0.002PrediNet · Hexos · between 0.978 ± 0.011Transformer · Hexos · between 0.986 ± 0.006RelConvNet · Stripes · between 0.988 ± 0.004CoRelNet · Stripes · between 0.582 ± 0.123PrediNet · Stripes · between 0.950 ± 0.036Transformer · Stripes · between 0.961 ± 0.019RelConvNet · Hexos · match pattern 0.961 ± 0.030CoRelNet · Hexos · match pattern 0.942 ± 0.022PrediNet · Hexos · match pattern 0.710 ± 0.078Transformer · Hexos · match pattern 0.627 ± 0.009RelConvNet · Stripes · match pattern 0.870 ± 0.080CoRelNet · Stripes · match pattern 0.581 ± 0.051PrediNet · Stripes · match pattern 0.658 ± 0.104Transformer · Stripes · match pattern 0.591 ± 0.011

SET. SET is a card game which forms a simple but challenging relational task. To solve the task, one must process the sensory information of individual cards to identify the values of each attribute, then somehow search over combinations of cards and reason about the relations between them. This is a task which tests a model’s ability to represent and reason over relations among subgroups of objects. This is a capability built explicitly into relational convolutional networks, but is missing from other relational models.

Accuracy for 'Contains SET' Task

0.00.20.40.60.81.0AccuracyRelConvNetCoRelNetPrediNetTransformerGCNGATGINModelRelConvNet 0.979 ± 0.011 (10 trials)CoRelNet 0.563 ± 0.002 (10 trials)PrediNet 0.508 ± 0.004 (10 trials)Transformer 0.584 ± 0.008 (10 trials)GCN 0.595 ± 0.006 (10 trials)GAT 0.517 ± 0.030 (10 trials)GIN 0.590 ± 0.006 (10 trials)
0.00.20.40.60.81.0AccuracyRelConvNetCoRelNetPrediNetTransformerGCNGATGINModelRelConvNet 0.979 ± 0.011 (10 trials)CoRelNet 0.563 ± 0.002 (10 trials)PrediNet 0.508 ± 0.004 (10 trials)Transformer 0.584 ± 0.008 (10 trials)GCN 0.595 ± 0.006 (10 trials)GAT 0.517 ± 0.030 (10 trials)GIN 0.590 ± 0.006 (10 trials)

Finally, we explore the geometry of the learned representations in relational convolutional networks. As a preview, the figure below depicts the geometry of the relational convolution operation, demonstrating its ability to learn compositional features.

Convolutional Representation (PC1 vs PC2)

−30−20−1001020304050
[PC2]
−40−20020406080
[PC1]
−30−20−1001020304050
[PC2]
050
[PC1]
Related
PaperThis page

Learning Hierarchical Relational Representations through Relational Convolutions

architecturesinductive biasesrelational reasoning

Relational convolutional networks learn higher-order relational features by convolving graphlet filters against subsets of objects.

Cite
@misc{altabaa2024learninghierarchicalrelationalrepresentations,
      title={Learning Hierarchical Relational Representations through Relational Convolutions},
      author={Awni Altabaa and John Lafferty},
      year={2024},
      eprint={2310.03240},
      archivePrefix={arXiv},
      primaryClass={cs.LG},
      url={https://arxiv.org/abs/2310.03240},
}