Functional forms of interaction methods.

The functional forms always assume the general form of the interaction function, where head, relation and tail representations are provided in shape (batch_size, num_heads, 1, 1, *), (batch_size, 1, num_relations, 1, *), and (batch_size, 1, 1, num_tails, *), and return a score tensor of shape (batch_size, num_heads, num_relations, num_tails).


complex_interaction(h, r, t)

Evaluate the ComplEx interaction function.

conve_interaction(h, r, t, t_bias, …)

Evaluate the ConvE interaction function.

convkb_interaction(h, r, t, conv, …)

Evaluate the ConvKB interaction function.

distmult_interaction(h, r, t)

Evaluate the DistMult interaction function.

ermlp_interaction(h, r, t, hidden, …)

Evaluate the ER-MLP interaction function.

ermlpe_interaction(h, r, t, mlp)

Evaluate the ER-MLPE interaction function.

hole_interaction(h, r, t)

Evaluate the HolE interaction function.

kg2e_interaction(h_mean, h_var, r_mean, …)

Evaluate the KG2E interaction function.

mure_interaction(h, b_h, r_vec, r_mat, t, b_t)

Evaluate the MuRE interaction function from [balazevic2019b].

ntn_interaction(h, t, w, vh, vt, b, u, …)

Evaluate the NTN interaction function.

pair_re_interaction(h, t, r_h, r_t[, p, …])

Evaluate the PairRE interaction function.

proje_interaction(h, r, t, d_e, d_r, b_c, …)

Evaluate the ProjE interaction function.

rescal_interaction(h, r, t)

Evaluate the RESCAL interaction function.

rotate_interaction(h, r, t)

Evaluate the RotatE interaction function.

simple_interaction(h, r, t, h_inv, r_inv, t_inv)

Evaluate the SimplE interaction function.

structured_embedding_interaction(h, r_h, …)

Evaluate the Structured Embedding interaction function.

transd_interaction(h, r, t, h_p, r_p, t_p, p)

Evaluate the TransD interaction function.

transe_interaction(h, r, t[, p, power_norm])

Evaluate the TransE interaction function.

transh_interaction(h, w_r, d_r, t, p[, …])

Evaluate the DistMult interaction function.

transr_interaction(h, r, t, m_r, p[, power_norm])

Evaluate the TransR interaction function.

tucker_interaction(h, r, t, core_tensor, …)

Evaluate the TuckEr interaction function.

unstructured_model_interaction(h, t, p[, …])

Evaluate the SimplE interaction function.