garret

[추천] Deep Matrix Factorization Models for Recommender Systems 본문

Paper Review

[추천] Deep Matrix Factorization Models for Recommender Systems

_Sun_ 2023. 2. 1. 10:44

2017년 발표

Deep structured semantic models을 기반으로 새 데이터 피처, 새로운 loss 함수 고안해 적용.

💡 IJCAI-17 제출

Abstract

  • Matrix Factorization은 user-item의 similarity로 user에게 item 리스트의 personalized ranking을 예측하는 기본적 아이디어
  • Neural network architecture를 사용한 새로운 matrix factorization model 제안2) Binary cross entropy에 기반하여 explicit ratings과 implicit feedback 모두를 고려한 새로운 loss function 디자인
  • 1) explicit ratings과 non-preference implicit feedback으로 user-item 행렬을 인풋으로 한 deep structure learning architecture 생성

1. Introduction

  • Matrix Factorization(MF)
    • collaborative filtering 중에서 가장 유명한 접근
    • 장점 : scalability, simplicity, flexibility
  • 본 논문에서는 explicit ratings과 implicit feedback을 모두 사용하여 새로운 neural matrix factorization model 제안
    • 해당 구조는 deep structured semantic models에서 영감을 받았다.
  • 논문 주 기여
    • non-linear projections으로 user, item을 공통 low dimensional space에 map하는 neural network를 이용한 새로운 MF 모델
    • explicit ratings와 implicit feedback 둘 다 고려한 새로운 loss function 디자인
    • 실험결과로 다른 top N-recommendation방법보다 우수한 성능을 보임을 확인

2. Problem Statement

user-item interaction matrix

explicit rating과 implicit feedback 둘 다 적용한 행렬

explicit rating이 user의 item 선호도를 나타내기에 explicit rating을 non-trivial하게 설정

Y : non-preference implicit feedback, rating 모르면 Y도 0

$$
Y_{ij}=\begin{cases}
0, & if \ R_{ij}=unk \\\
R_{ij}, & \ otherwise
\end{cases}
$$

  • \(U = {u_1,...,u_M}\): M users
  • \(V={v_1,...,v_N}\): N items
  • \(R_{ij}\): rating, user i, item j
  • unk : if it is unknown

Interaction matrix 추정

inner product를 사용하는 Latent Factor Model

$$
\hat{Y}_{ij} = F^{LFM}(u_i,v_j|\Theta) = p_i^Tq_j
$$

  • \(\hat{Y_{ij}}\): predicted score of interaction \(Y_{ij}\)
  • \(\Theta\): model parameters
  • \(F\): function that maps the model parameters to the predicted scores
  • \(p_i,q_i\) : latent representations of \(u_i,v_j\)

Notations

  • \(Y\) : user-item interaction matrix
  • \(Y^+\): observed interactions
  • \(Y^-\): all zero elements in Y
  • \(Y^-_{sampled}\) : set of negative instances
  • \(Y^+\cup Y^-_{sampled}\): all training interactions
  • \(Y_{i*}\) : i-th row of matrix Y
  • \(Y_{*j}\) : j-th column of matrix Y

3. Our Proposed model

3.1 Deep Structure Semantic Model

  • Use a deep neural network(DNN) to rank a set of documents for a given query

DSSM 작동원리

1) Map the query and the documents to a common lower semantic space with a non-linear multi-layer projection.

2) For web search ranking, the relevance of query to each document is calculated by cosine similarity between the low dimensional vectors of query and document.

3) DNN are discriminatively trained to maximize the conditional likelihood of the query and matched documents

3.2 Deep Matrix Factorization Models (DMF)

DMF의 구조

  1. layer1 : Y의 i-th row와 weight1를 곱해서 ReLU 적용
  2. layer2 : layer1 결과에 weight2 곱해서 ReLU 적용
  3. layer n-1까지 반복
  • \(u_i\) : high dimensional vector of \(Y_{i*}\)
  • \(v_j\) : high dimensional vector of \(Y_{*j}\)
  • \(x\) : input vector
  • \(y\) : output vector
  • In each layer, each input vector is mapped into another vector in a new space.

DMF의 수학적 표현

  • \(l_i\) : intermediate hidden layers
  • \(W_i\): i-th weight matrix
  • \(b_i\) : bias term
  • \(h\) : final output latent representation
  • \(f\): ReLU

user, content latent 구하기

  • \(W_{U1} , W_{V1}\) : U, V의 1st layer weight 행렬

Predicted Score 구하기

$$
\hat{Y_{ij}}=F^{DMF}(u_i,v_j|\Theta)=cosine(p_i,q_j)={p^T_iq_j \over |p_i||q_j|}
$$

  • Predicted score는 \(p_i\)와 \(q_i\)의 유사도로 결정.

3.3 Loss Function

This paper uses point-wise objective function

Squared loss

$$
L_{sqr}=\sum_{(i,j)\in Y^+ \cup Y^-}l(y,\hat{y})+\lambda\Omega(\Theta)
$$

  • \(w_{ij}\) : weight of (i,j)
  • implicit data에서는 잘 쓰이지 않음

Binary cross-entropy loss

$$
L=-\sum_{(i,j)\in Y^+ \cup Y^-}Y_{ij}\log \hat{Y_{ij}} + (1-Y_{ij})\log(1-\hat{Y_{ij}}))
$$

Normalized Cross Entropy loss (nce)

$$
L=-\sum_{(i,j)\in Y^+ \cup Y^-} ({Y_{ij} \over max(R)}\log \hat{Y_{ij}}+(1-{Y_{ij} \over max(R)})\log(1-\hat{Y_{ij}}))
$$

  • \(max(R)\): max score in all ratings(e.g. 별 5개 시스템에서는 5)
  • explicit rating을 cross entropy loss 함수에 적용한 새로운 loss 함수 생성

3.4 Training Algorithm

각 layer의 \(W_U,W_V\)의 파라미터들은 back propagation으로 업데이트

$$
\hat{Y}^o_{ij} = max(\mu, \hat{Y}_{ij})
$$

  • \(\mu = 1.0e^{-6}\)
  • Predicted score가 음수일 수 있어서 해당 식을 이용해 transform

4. Experiments

4.1 Experimental Settings

  • Datasets
    • MovieLens 100K (ML100k)
    • MovieLens 10M (ML1m)
    • Amazon music (Amusic)
    • Amazon movies (Amovie)
  • Evaluation for Recommendation
    • leave-one-out evaluation
      • 샘플 수 N번의 모델을 만들고 각 모델을 만들 때 하나의 샘플만 제외하면서 그 제외한 샘플로 test set performance를 계산해 N개의 performance에 대해서 평균을 내는 방법
    • user와 interact하지 않은 item 100개 랜덤샘플링한 것과 test item으로 prediction에 따라 랭킹 도출.
    • Hit Ratio(HR), Normalized Discounted Cumulative Gain(NDCG) : ranking 성능 평가
  • Detailed Implementation
    • Tensorflow
    • To determine hyper-parameters of DMF methods, we randomly sampled one interaction for each user as the validation data and tuned hyper-parameters on it
    • Sampled 7 negative instances per positive instance
    • Randomly initialized model parameters with Gaussian distribution
    • optimizer : Adam, batch size : 256, learning rate : 0.0001

4.2 Performance Comparison

본 논문의 method가 user-item의 relationship을 모델링하는 것에 초점이 맞춰져 있으므로 user-item 모델들과 주로 비교하였다

  • ItemPop : non-personalized method
  • ItemKNN : standard item-based collaborative filtering method
  • eALS : MF method for recommendation with square loss
  • NeuMF-p : MF for item recommendation with cross entropy loss, neural MF with pretraining. 본 논문과 가장 연관된 모델
  • DMF-2-ce : 본 논문의 모델, 2 layer + cross entropy, explicit rating과 implicit feedback을 인풋으로 사용
  • DMF-2-nce : 2 layer + normalized cross entopy loss

4.3 Impact of the Input Matrix for DMF

DMF 모델 레이어 1개의 인풋의 각 user와 item 벡터를 랜덤하게 초기화 시키면, standard latent factorization model이 된다.

4.4 Sensitivity to Hyper-parameters

Negative Samplig Ratio

  • 성능차이 관찰하기 위해서 다른 negative sampling ratio 적용
  • ex) neg-5: negative sampling ratio=5
  • negative sampling ratio에 따라 성능 차이 존재함

Depth of Layers in Network

DMF의 layer를 늘리면서 성능 비교실험 진행 → layer가 많아진다고 성능이 향상되지 않는다.

Factor of the Final Latent Space

Amusic 제외하고, top final latent space를 64 factor로 했을 때 가장 좋은 성능을 보임.

5. Conclusion and Future work

  • Conclusion
    • 제안하는 모델의 인풋에는 explicit ratings와 non-preference feedback을 모두 포함
    • explicit과 implicit feedback이 모두 고려된 새로운 loss function 디자인
  • Future work
    • Pairwise objective function 추후 사용 가능
    • auxiliary extra data 적용하기

Personal Thoughts

  • explicit과 implicit 데이터를 모두 사용한 MF
    • NCF와 비교하여 성능개선을 이뤘지만, Neural network 사용하지 않고 MF으로만 모델링 한 점은 아쉽다.
  • rating 예측이 아닌 TOP N item 예측
  • Negative sampling ratio(관찰되지 않은 interaction 비율) 따라 성능차이 존재

Reference