One-Shot Relational Learning for Knowledge Graphs

One-Shot Relational Learning for Knowledge Graphs

4 Model

预测 $$(h,r,?)$$

有两个核心component

  • neighbor encoder
  • matching processor

4.1 Neighbor Encoder

$$ f(Ne) = \sigma (\frac{1}{|N_e|} \sum{(rk, e_k) \in N_e} C{r_k, e_k})

$$

然后embed每一个node和relation

$$ v{r_k} = \text{emb}(r_k), v{ek} = \text{emb}(e_k)\ C{rk, e_k} = W_c(v{rk} \oplus v{e_k}) + b_c

$$

4.2 Matching Processor

下面开始similarity matching

$$ h{k+1}', c{k+1} = LSTM(q, [hk \oplus s, c_k])\ h{k+1} = h{k+1}' + q\ score{k+1} = \frac{h{k+1} \odot s}{| h{k+1} | | s |}

$$

hidden state $$h$$ cell state $$c$$ $$s = f(N{h_0}) \oplus f(N{t0})$$ concatenated neighbor vectors of the reference pair $$q = f(N{hi}) \oplus f(N{t_{ij}})$$ concatenaed neighbor vectors of the query pair

对于每一条query $$(hi, r, ?)$$,我们比较$$(h_i, t{ij})$$ 和 $$(h0, t_0)$$,就能得到ranking score $$t{ij} \in C{h{i}, r}$$

results matching ""

    No results matching ""