Session-based Recommendations with Recurrent Neural Networks (GRU4Rec)

Classic recommenders assume you know who the user is and have a long history of their behavior. On many sites that assumption breaks: a visitor is anonymous, and all the system sees is a short sequence of clicks in the current session. In 2015 Balazs Hidasi, Alexandros Karatzoglou, Linas Baltrunas, and Domonkos Tikk proposed treating this as a sequence-modeling problem, applying recurrent neural networks to session-based recommendation in a model that became widely known as GRU4Rec.

The system feeds the items clicked so far, in order, into a recurrent network built from gated recurrent units (GRUs), and the network predicts which item the user is likely to want next. To make this work on recommendation data, the authors introduced practical engineering: session-parallel mini-batches so many short sessions can be trained together efficiently, and ranking-oriented loss functions that directly push the correct next item toward the top of the list. The approach outperformed standard item-to-item baselines that ignore the order of events.

GRU4Rec helped launch the active subfield of sequential and session-based recommendation, where the order of recent actions, not just an aggregate profile, drives the next suggestion. Later work extended the idea with attention and transformer architectures.

For a general reader, this is the research behind “what to watch or buy next” suggestions that adapt within a single visit, even when the site has no idea who you are.

Sources

Last verified June 7, 2026