Skip to content

Graph model 정리 #2

@dane805

Description

@dane805

Graph representation learning

  • Node classification
  • Link prediction: relationship learning

Feature learning

  • node2vec(50 ~ 100d)
  • encoder
    • Shallow encoding: embedding-lookup
    • pytorch biggraph도 다 같음
  • similarity function
    • node2vec이 random-walk의 수정본 (hyperparameter 하나 추가)
    • context에 따라 node의 성질이 정의된다
      • serial을 어떻게 뽑을래? -> random rwalk
      • 거의 gensim으로 구현
    • node2vec: BFS/DFS를 조절하는 파라미터 추가
    • 노드와 커넥션 사이의 간단한 관계에만 정의됨
  • multi-relational
    • knowledge graph: triplet으로 관계를 정의(entity - relation - entity)
    • KG completion: 잠재된 관계를 추론

transE

  • Head / reLation / Tail (hlt)
  • h+l = t를 학습하는 게 기본 아이디어
  • 정답과 corrupted triplet을 만들어낸다
    • (a, r, b)라는 정답에 대해 (a', r, b) / (a, r, b')를 만들어낸다
  • head와 tail사이의 관계가 1:1대응밖에 안된다는 문제가 있다
    • 그래서 나온 게 transR인데, 또이또이하고 잘 안되는 거 같다 -> complex

complexR

  • 관계성 정보의 3가지 속성을 학습
    • Reflexibility, transivity, symmetricity
  • 핵심 아이디어
    • 특정 노드가 head일 때와 tail일 때의 벡터가 동일하지 않다!!
    • complex number로 학습을 한다
    • subject: a + bi, tail: a - bi
    • hermition dot product
  • negative sampling
    • 여기서는 pairwise일 필요가 없어서
    • 1:100 요런 식으로 벌크로 뽑아서 학습
    • negative sampling을 늘리면 정확도는 올라가지만, 시간이 좀 ...
  • 이걸로 학습할 거임!!!!

Pytorch BigGraph

  • 그래프가 효과적인 건 알겠는데 practically 쓸 수 있니?
    • 어케 알고리즘을 대용량 처리에 갖다 박을 수 있을까?
  • 하나의 소스 코드 내에 여러 알고리즘들이 다 있어서 취사 선택 가능
  • 핵심 아이디어: 엣지 단위로 버킷 생성(파티셔닝). 그림 참조
    • 샘플링 그럼 어떻게 할래?
    • 학습 순서를 어떻게 할래?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions