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

1. Introduction

Challenges

  1. ๋ชจ๋“  ๋…ธ๋“œ๊ฐ€ ๋ชจ๋“  type์˜ ๋…ธ๋“œ๋“ค๊ณผ ์—ฐ๊ฒฐ๋˜์–ด์žˆ์ง€ ์•Š์„ ์ˆ˜ ์žˆ๋‹ค. ๋˜ํ•œ, ์ด์›ƒ์˜ ์ˆ˜๋„ node๋งˆ๋‹ค ์ฒœ์ฐจ๋งŒ๋ณ„
    -> Fig. 1(b)์˜ C1: HetG์˜ ๊ฐ ๋…ธ๋“œ์— ๋Œ€ํ•œ embedding ์ƒ์„ฑ์„ ํ•˜๋Š”๋ฐ์— ์žˆ์–ด ๊ฐ•ํ•œ ์ƒ๊ด€๊ด€๊ณ„๋ฅผ ๊ฐ€์ง„ heterogeneous ์ด์›ƒ๋“ค์„ samplingํ•˜๋Š” ๋ฐฉ๋ฒ•
  2. Fig. 1(b)์˜ C2: ์„œ๋กœ ๋‹ค๋ฅธ ๋…ธ๋“œ์˜ content heterogeneity๋ฅผ ํ•ด๊ฒฐํ•˜๊ธฐ ์œ„ํ•œ ๋…ธ๋“œ content encoder๋ฅผ ์„ค๊ณ„ํ•˜๋Š” ๋ฐฉ๋ฒ•
  3. Fig. 1(b)์˜ C3: ์„œ๋กœ ๋‹ค๋ฅธ ๋…ธ๋“œ type์˜ ์˜ํ–ฅ์„ ๊ณ ๋ คํ•˜์—ฌ heterogeneous ์ด์›ƒ๋“ค์˜ feature ์ •๋ณด๋ฅผ aggregationํ•˜๋Š” ๋ฐฉ๋ฒ•

2. Problem Definition

Definition 2.1 Content-associated Heterogeneous Graphs (C-HetG)

G = (V, E, OV, RE)

  • OV, RE: V์˜ object types set, E์˜ relation types set

Problem 1. Heterogeneous Graph Representation Learning

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!

3. HetGNN

์•ž์„œ ์„ค๋ช…ํ–ˆ๋“ฏ 4๊ฐ€์ง€ ํŒŒํŠธ๊ฐ€ ์žˆ๋‹ค.
(1) sampling heterogeneous neighbors;
(2) encoding node heterogeneous contents;
(3) aggregating heterogeneous neighbors;
(4) formulating the objective and designing model training procedure.

3.1 Sampling Heterogeneous Neighbors (C1)

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 ๊ฐ€๋Šฅํ•˜๊ฒŒ ๋งŒ๋“ฆ

3.2 Encoding Heterogeneous Contents (C2)

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

  • ์ด๋“ค์„ ๋ฐ”๋กœ concatํ•˜๊ฑฐ๋‚˜ linear transformํ•˜์—ฌ ํ†ตํ•ฉ๋œ ํ•˜๋‚˜์˜ vector๋ฅผ ๋งŒ๋“œ๋Š” ๊ฒƒ ๋Œ€์‹ , bi-LSTM -> mean pooling

์žฅ์ 

  1. ๊ฐ„๊ฒฐํ•œ ๊ตฌ์กฐ, ์ƒ๋Œ€์ ์œผ๋กœ ๋‚ฎ์€ complexity (์ ์€ params) -> ๋ชจ๋ธ ๊ตฌํ˜„๊ณผ tuning์ด ์ƒ๋Œ€์ ์œผ๋กœ ์‰ฝ๋‹ค.
  2. heterogeneous contents information๋ฅผ ๊ฒฐํ•ฉํ•  ์ˆ˜ ์žˆ๋‹ค. -> strong expression capability
  3. flexible to add extra content features -> ๋ชจ๋ธ ํ™•์žฅ์ด ํŽธ๋ฆฌ

3.3 Aggregating Heterogeneous Neighbors (C3)

3.3.1 Same Type Neighbors Aggregation

Fig 2.(c)

  • ๊ฐ™์€ type์˜ ์ด์›ƒ ๋…ธ๋“œ๋“ค์„ aggregationํ•œ๋‹ค. Aggregation function ์˜ˆ์‹œ๋กœ๋Š” bi-LSTM -> mean pooling๋ฅผ ๋“ค์—ˆ๋‹ค.

3.3.2 Types Combination

Fig 2.(d)

  • ์ด์ œ ํ•œ ๋…ธ๋“œ v์— ๋Œ€ํ•ด์„œ |OV|์˜ embedding์ด ์ƒ๊ฒผ๋Š”๋ฐ, ์ด๋“ค์„ attention์„ ์‚ฌ์šฉํ•ด์„œ ํ•ฉ์นœ๋‹ค.

3.4 Objective and Model Training

Logarithm์„ ์ทจํ•˜๊ณ , negative sampling size M = 1๋กœ ๋‘๊ณ , ์‹์„ ์ •๋ฆฌํ•˜๋ฉด ์ตœ์ข… ์‹์€ ์•„๋ž˜์™€ ๊ฐ™๋‹ค.

4. Data

  1. Academic graph
    • Node: author - paper - venue
    • Side info: paper -> title, abstract, authors, references, year, venue
  2. 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
โš ๏ธ **GitHub.com Fallback** โš ๏ธ