For our encoder and edge-prediction loss function, we follow [1]}'s TransD approach, since we found this approach gave significant performance boosts compared to simpler models (e.g., TransE).
In this model, the encoding of a node/entity depends on the edge relation being predicted, as well as on whether the entity is the head or tail in a relation (i.e., the edge direction matters).
In particular, the embedding of the head node (i.e., the source node) in an edge relation is given by:
\(\textsc {enc}(u, \langle u, r, v \rangle ) = (\mathbf {r}_p\mathbf {u}_p^\top + \mathbf {I}^{d \times d})\mathbf {u},\) 
