πŸ”„

GRU4Rec

Session-based recommendation β€” predicting the next click with RNN

Published by Hidasi et al. in 2015, this paper opened the door to deep learning-based recommendations.

While Item2Vec ignores sequence order, GRU4Rec makes order the centerpiece. The goal: predict the next item in "A β†’ B β†’ C β†’ ?".

Why GRU?

RNNs are the default for sequence data, but vanilla RNNs suffer from gradient vanishing on long sequences. GRU has fewer parameters than LSTM with comparable performance, making it suitable for RecSys with millions of sessions.

Limitations

It only uses within-session information. When an anonymous user starts a new session, previous history is lost. Also, Transformers began outperforming GRU on sequence modeling once they arrived.

How It Works

1

Collect click sequences per session

2

Convert item IDs to embeddings

3

Compute hidden state of sequence via GRU layers

4

Output next-item probability distribution from hidden state

Pros

  • Order-aware recommendation (advancement over Item2Vec)
  • Works for anonymous users (session-level)

Cons

  • Cannot link information across sessions
  • Less parallelizable than Transformers

Use Cases

E-commerce session-based "next product to view" Article reading order in news apps