HetGNN - lshhhhh/deep-learning-study GitHub Wiki
์ฝ๋: https://github.com/chuxuzhang/KDD2019_HetGNN
๋ ผ๋ฌธ: http://www.shichuan.org/hin/time/2019.KDD%202019%20Heterogeneous%20Graph%20Neural%20Network.pdf
- ๋ชจ๋ ๋
ธ๋๊ฐ ๋ชจ๋ type์ ๋
ธ๋๋ค๊ณผ ์ฐ๊ฒฐ๋์ด์์ง ์์ ์ ์๋ค. ๋ํ, ์ด์์ ์๋ node๋ง๋ค ์ฒ์ฐจ๋ง๋ณ
-> Fig. 1(b)์ C1: HetG์ ๊ฐ ๋ ธ๋์ ๋ํ embedding ์์ฑ์ ํ๋๋ฐ์ ์์ด ๊ฐํ ์๊ด๊ด๊ณ๋ฅผ ๊ฐ์ง heterogeneous ์ด์๋ค์ samplingํ๋ ๋ฐฉ๋ฒ - Fig. 1(b)์ C2: ์๋ก ๋ค๋ฅธ ๋ ธ๋์ content heterogeneity๋ฅผ ํด๊ฒฐํ๊ธฐ ์ํ ๋ ธ๋ content encoder๋ฅผ ์ค๊ณํ๋ ๋ฐฉ๋ฒ
- Fig. 1(b)์ C3: ์๋ก ๋ค๋ฅธ ๋ ธ๋ type์ ์ํฅ์ ๊ณ ๋ คํ์ฌ heterogeneous ์ด์๋ค์ feature ์ ๋ณด๋ฅผ aggregationํ๋ ๋ฐฉ๋ฒ
G = (V, E, OV, RE)
- OV, RE: V์ object types set, E์ relation types set
C-HetG G = (V, E, OV, RE) with node content set C๊ฐ ์์ ๋,
heterogeneous structural closeness์ heterogeneous unstructured contents among them์ encodeํ ์ ์๋ d-dimensional embeddings E โ R|V|รd (dโช|V|)๋ฅผ ํ์ตํ๋ ๋ชจ๋ธ Fฮ(with parameters ฮ)๋ฅผ design!
์์ ์ค๋ช
ํ๋ฏ 4๊ฐ์ง ํํธ๊ฐ ์๋ค.
(1) sampling heterogeneous neighbors;
(2) encoding node heterogeneous contents;
(3) aggregating heterogeneous neighbors;
(4) formulating the objective and designing model training procedure.
GraphSAGE, GAT์ ๊ฐ์ GNN์ key idea๋ ์ธ์ ์ด์ ๋ ธ๋๋ค์ feature๋ฅผ aggregateํ๋ ๊ฒ์ธ๋ฐ, ์ด๋ฅผ ์ง์ ์ ์ผ๋ก ์ ์ฉํ๋ฉด ๋ช๋ช ๋ฌธ์ ๊ฐ ์๋ค.
- ๋ค๋ฅธ ์ข ๋ฅ์ ์ด์๋ค๋ก๋ถํฐ ์ง์ ์ ์ผ๋ก feature ์ ๋ณด๋ฅผ ์บ์นํ๊ธฐ ํ๋ค๋ค. (Fig.1 (a)์ author-venue)
- ๋ค์ํ ์ด์๋ค์ size (์ด๋ค author๋ ๋ง์ paper๋ฅผ ์ผ๋๋ฐ, ์ด๋ค author๋ ๊ทธ๋ ์ง ์๋ค) -> hub ๋ ธ๋์ ์๋ฒ ๋ฉ์ ์๊ด๊ด๊ณ๊ฐ ์ ์ ์ด์ ๋ ธ๋๋ก ์ธํด ์ ํ๋ ์ ์๊ณ , cold-start ๋ ธ๋ ์๋ฒ ๋ฉ์ ์ ๋ณด๊ฐ ๋ถ์ถฉ๋ถํ๋ค.
- ์๋ก ๋ค๋ฅธ content feature๋ฅผ ์ง๋ heterogeneous ์ด์๋ค์ aggregationํ ๋, ๋ค๋ฅธ feature transformation์ด ํ์
์ด๋ฌํ ๋ฌธ์ ๋ฅผ ํด๊ฒฐํ๊ธฐ ์ํด random walk with restart(RWR)๋ฅผ ์ด์ฉํ heterogeneous neighbors sampling strategy๋ฅผ ์ ์ํ๋ค.
- Step-1: ๊ณ ์ ๊ธธ์ด์ RWR sampling
- ๋ ธ๋ v๋ฅผ ์์์ผ๋ก random walk๋ฅผ ํ๋๋ฐ ํ์ฌ ๋ ธ๋์ ์ด์์ traverseํ ์๋ ์๊ณ p์ ํ๋ฅ ๋ก ์์ ์ผ๋ก ๋์์ฌ ์๋ ์๋ค.
- ๋ ธ๋ v์ ๋ํด ๋ชจ๋ type์ ์ด์์ด sampling๋๋๋ก, ๊ฐ ๋ ธ๋ type์ ์๋ฅผ ์ ํํ๋ค.
๋ชจ๋ type์ ๋ ธ๋๋ฅผ ๋ชจ์ ์ ์๋ค.
- Step-2: ์ด์๋ค์ type์ ๋ฐ๋ผ grouping
- ๊ฐ ๋ ธ๋ type๋ง๋ค ์ถํ ๋น๋์์ ๋ํ์ฌ top k๊ฐ node ์ ์ ๋ฝ๋๋ค.
๊ณ ์ ํฌ๊ธฐ + ์ ์๋ฏธํ ์์, type-based aggregation ๊ฐ๋ฅํ๊ฒ ๋ง๋ฆ
Fig 2.(b)
- ๋ ธ๋ v์ heterogeneous contents Cv
- Cv์ i-th content: xi โ Rdfร1 (df: content feature dimension)
- xi๋ content type์ ๋ฐ๋ผ ๋ค๋ฅธ ๊ธฐ์ ๋ก pre-train๋ ์ ์์. (์๋ ์์)
attribute: one-hot vec, text: Par2Vec, image: CNN
- xi๋ content type์ ๋ฐ๋ผ ๋ค๋ฅธ ๊ธฐ์ ๋ก pre-train๋ ์ ์์. (์๋ ์์)
- ์ด๋ค์ ๋ฐ๋ก concatํ๊ฑฐ๋ linear transformํ์ฌ ํตํฉ๋ ํ๋์ vector๋ฅผ ๋ง๋๋ ๊ฒ ๋์ , bi-LSTM -> mean pooling
- ๊ฐ๊ฒฐํ ๊ตฌ์กฐ, ์๋์ ์ผ๋ก ๋ฎ์ complexity (์ ์ params) -> ๋ชจ๋ธ ๊ตฌํ๊ณผ tuning์ด ์๋์ ์ผ๋ก ์ฝ๋ค.
- heterogeneous contents information๋ฅผ ๊ฒฐํฉํ ์ ์๋ค. -> strong expression capability
- flexible to add extra content features -> ๋ชจ๋ธ ํ์ฅ์ด ํธ๋ฆฌ
Fig 2.(c)
- ๊ฐ์ type์ ์ด์ ๋ ธ๋๋ค์ aggregationํ๋ค. Aggregation function ์์๋ก๋ bi-LSTM -> mean pooling๋ฅผ ๋ค์๋ค.
Fig 2.(d)
- ์ด์ ํ ๋
ธ๋ v์ ๋ํด์ |OV|์ embedding์ด ์๊ฒผ๋๋ฐ, ์ด๋ค์ attention์ ์ฌ์ฉํด์ ํฉ์น๋ค.
Logarithm์ ์ทจํ๊ณ , negative sampling size M = 1๋ก ๋๊ณ , ์์ ์ ๋ฆฌํ๋ฉด ์ต์ข ์์ ์๋์ ๊ฐ๋ค.
- Academic graph
- Node: author - paper - venue
- Side info: paper -> title, abstract, authors, references, year, venue
- Review graph
- Node: user review - item
- Side info: item => title, description, genre, price, picture
- a_p_list_train.txt: each author - paper neighbor list
- p_a_list_train.txt: each paper - author neighbor list
- p_p_citation_list.txt: each paper - paper citation neighbor list
- v_p_list_train.txt: each venue - paper neighbor list
- p_v.txt: each paper - venue
- p_title_embed.txt: pre-trained paper title embedding
- p_abstract_embed.txt: pre-trained paper abstract embedding
- node_net_embedding.txt: pre-trained node embedding by network embedding
- het_neigh_train.txt: generated neighbor set of each node by random walk with re-start
- het_random_walk.txt: generated random walks as node sequences (corpus) for model training