Problem
A next-item recommender framed as classification (for example Gru4Rec) scores every item by a dot product with a context vector and applies one softmax. The size of that vector caps how many distinct contexts the output layer can express. When the same item is followed by very different items in different sequences, the model must place those targets both close to and far from each other.
Example from the article: items pushed manually to the home page by a content team appeared in many sequences from very different users, and recommendations for them were poor even though more data normally improves quality.
Solution in brief
Replace the single softmax with a mixture of several softmax heads (MoS), which lifts the rank limit set by the embedding dimension. Then slice Recall@100 by how many training sequences contain the target item and by how far the target is from the previous item. Here MoS helped only where items had enough data, and most with small embeddings.
Questions this case answers
- How to decide whether a higher-capacity output layer is worth adding to a next-item classifier when target items appear in very different contexts
- How to quantify the diversity of interaction sequences and break model quality down by it and by per-item training volume
- How to tell whether a more expressive output layer will improve a next-item recommender on my data?
- How to find out why recommendations for some items are incoherent when the sequences containing them are very diverse?
Tools and methods
- Mixture of softmaxes (MoS) — output layer with K softmax heads mixed by context-dependent weights
- Gru4Rec — GRU network that predicts the next item from a session
- Cosine distance between item columns of the user-item matrix — measure of sequence diversity
- Apache Beam (Google Cloud Dataflow) — parallel preprocessing of MovieLens-25M on 4 workers
Google or a one-time email code. No password.