tytskiy's picture
Update benchmarks/models/itemknn/README.md (#9)
3e159c8 verified
|
raw
history blame
1.41 kB

ItemKNN

For this approach item vectors are represented as user-frequency [num users]-dimensional vectors constructed from the user-item interaction matrix UU. UijU_{ij} indicates how many times user ii interacted with the item jj.

Similarity Measurement

We employ cosine similarity to measure similarity between vectors: score(useri,itemj)=cos(Vi,Uj)score(user_i, item_j) = \cos(V_i, U^\top_j)

where:

  • UU [num user ×\times num items]: original user-item interaction matrix

  • VV [num users ×\times num users]: user embedding matrix, where each row is:

    Vi=(t,k)Aiτmaxt(i)tUkV_{i} = \sum_{(t, k) \in A_i} \tau^{\max_t(i) - t} U^\top_{k}

    • AiA_i: set of ii-th user's (interaction timestamp, item index) pairs
    • maxt(i)\max_t(i): last ii-th user's interaction timestamp
    • τ\tau: time decay coefficient (per second)

For instance, when τ\tau is equal to 0 (which is the simplest case), Top-k recommendations are generated by retrieving the most closest (k) item embeddings to the latest user's representation.

Hyperparameters

Parameter hour defines the time period (in hours) associated with a decay factor of 0.9.

Implementation Note

For 5b-scale datasets, memory constraints arise when multiplying user-item interaction matrix UU and the user embedding matrix making computations infeasible. Thus, results for these datasets are not provided.