1 of 41

GES-LSTAMattn

김보성

2 of 41

Introduction

3 of 41

Overview

4 of 41

EDA를 통해 본 대회의 데이터는 시계열적 데이터임을 확인했다. 또한 일반적으로 시계열 데이터 학습에 뛰어난 성능을 보인다고 알려진 Recurrent 계열 모델 중 LSTM, LSTMattn, Transformer 등이 대회의 Baseline으로 주어졌다.

하지만 위 3개 모델은 공통적으로 시계열 데이터 만을 활용한다. 때문에 MF나 GCN 에 비해 User-Item의 관계나 Item-Item의 관계에 대한 정보를 잘 활용하지 못할 것이라고 판단했다.

Knowlege Tracing의 특성상 Item-Item의 연관 관계는 User의 학습 수준을 파악하는데 중요한 지표가 될 것으로 기대된다.때문에 GCN을 통해 Item-Item의 관계 Graph를 Embedding으로 나타내고 해당 Embedding을 Transformer의 Item Embedding 대신 사용해 Item-Item의 관계와 시계열 데이터 모두 학습이 가능한 모델을 기대하고 설계했다.

배경

5 of 41

Graph Convolution ?

6 of 41

What is Graph Convolution

7 of 41

8 of 41

9 of 41

10 of 41

[출처 ]https://towardsdatascience.com/understanding-graph-convolutional-networks-for-node-classification-a2bfdb7aba7b

11 of 41

  1. Embedding Layer
  2. Embedding Propagation Layer
  3. Model prediction

유저-아이템 을 GNN으로 임베딩 과정에서 인코딩하는 접근법을 제시한 논문

NGCF

12 of 41

Embedding Propagation Layers

유저, 아이템 임베딩을 개선하기 위해

GNN의 message-passing 아키텍쳐 도입

Message-passing

  • Message Construction
  • Message Aggreation

13 of 41

High-order connectivity

NGCF

[출처] Neural Graph Collaborative Filtering, SIGIR'19

14 of 41

High-order connectivity

Item 4 : 2개

Item 5 : 1개

L=3을 보면 u1이 i5보다 i4에 더 큰 관심을 가질 가능성이 높음

[출처] Neural Graph Collaborative Filtering, SIGIR'19

15 of 41

Message Construction

아이템 자체 값 + 아이템-유저 전달되는 값을 계수에 곱하고 Laplacian norm 을 사용하여 아이템에서 유저로 전달하는 message 를 만듭니다.

+ 풍부한 표현을 가능케 함.

Embedding Propagation Layers

[출처] Neural Graph Collaborative Filtering, SIGIR'19

16 of 41

Message Aggreation

유저 자체 정보 + 1-hop 정보를 합친값 을 LeakyReLU를 사용해서 긍정과 약간의 부정값을 반영한다.

Embedding Propagation Layers

[출처] Neural Graph Collaborative Filtering, SIGIR'19

17 of 41

High-order Propagation

맨 위의 식을 이용하여 아래의 식을 유도 시킬 수 있습니다.

Embedding Propagation Layers

[출처] Neural Graph Collaborative Filtering, SIGIR'19

18 of 41

High-order Propagation

Embedding Propagation Layers

결론

이식을 계산하면 유저-아이템 그래프를 Embedding 벡터로 나타낼 수 있다.

심지어 연산을 l번 하면 Layer l개를 쌓는 효과가 생긴다.

[출처] Neural Graph Collaborative Filtering, SIGIR'19

19 of 41

단지 그래프를 행렬로 나타내기 위한 편리한 도구일뿐이다.

라플라스 메트릭스로 propagation rule 을 적용시키면 모든 유저와 아이템에 대해 효율적으로 업데이트 가능하며 노드 샘플링 절차를 생략 할 수 있습니다.

Embedding Propagation Layers

[출처] Wikipida

20 of 41

High-order Propagation

Embedding Propagation Layers

결론

이식을 계산하면 유저-아이템 그래프를 해당 그래프의 특성을 모두 반영한 Embedding 벡터로 나타낼 수 있다.

( 심지어 연산을 n번 하면 Layer n개를 쌓는 효과가 생긴다.)

21 of 41

22 of 41

Embedding Propagation Layers

[출처] https://distill.pub/2021/understanding-gnns/

23 of 41

Embedding Propagation레이어를 쌓아서 연결되어 있는 정보를 얻을 수 있다.

Embedding Propagation Layers

Graph Convolution Block

Image Convolution Block

24 of 41

How to Combine

25 of 41

Sequnetial Graph

GCN + RNN

26 of 41

Sequnetial 모델을 위해서는 Item만의 그래프로 나타내야함.

User Free 모델 Use-Item의 관계 정보는 포기하지만 그럼에도

Item – Item 관계의 정보가 기대됨

( 전체 아이템 x 전체 아이템 ) 크기의 라플라시안 행렬으로 나타냄

27 of 41

Graph Convolution을 통해 Item-Item Graph를 Embedding으로 나타냄

28 of 41

self.convs = ModuleList(

[

LGConv(**kwargs) for _ in range(num_layers)

]

)

29 of 41

© NAVER Connect Foundation

https://pytorch-geometric.readthedocs.io/en/latest/_modules/torch_geometric/nn/conv/lg_conv.html#LGConv

30 of 41

31 of 41

32 of 41

© NAVER Connect Foundation

Furthermore GES

33 of 41

기존의 GCN과 유사하나 라플라시안 행렬을 구하는 과정에서

Semantic Graph의 성분이 추가된다.

34 of 41

Graph-based Embedding Smoothing (GES)

  • GES란 Item-Item Graph를 구성할 때 Sequnetial Graph, 그리고 장르와 같은 Item들의 Feature 정보를 활용해 구성한 Sementaic Graph를 함께 활용하는 방법이다.

  • 기존 GCN 계열들이 Laplacian 행렬을 구하는 단계에서 Sequnetial Graph와 Semantaic Graph의 Weighted Sum을 통해 이를 구현한다.

35 of 41

./src/utils.py/

위 함수가 GES Convolustion에 사용할 라플라시안을 만들어준다.

36 of 41

./src/model.py

LGCN의 Conv Layers를 통해 Layers 수만큼 Stacked된 out이 return 되었듯

GESConv도 Layers의 수 만큼 연산된다.

Model init에 새로 추가한 부분은 모두 get_GES_embedding을 위해 만들어졌다.

37 of 41

© NAVER Connect Foundation

Furthermore continuous Embedding

38 of 41

39 of 41

40 of 41

41 of 41