This post introduces SLi-Rec, an adaptive user modeling framework for personalized recommendation proposed by Microsoft Research Asia and Shanghai Jiao Tong University (Yu, Lian, Mahmoody, Liu & Xie, IJCAI 2019). The central idea: users have a stable long-term persona and a fast-changing short-term interest, and a good recommender must listen to both.
Key points
Why traditional sequential models struggle
- Classic collaborative filtering / matrix factorization treats preferences as static; RNN-based models treat behavior sequences like language sentences, ignoring two irregularities unique to user behavior:
- Temporal irregularity: intervals between actions range from minutes to months.
- Semantic irregularity: in a sequence like [iPhone XS, AirPods, yogurt, cat food], only the first items are relevant when recommending a laptop.
- Time-aware controller injects two features into the LSTM gates:
- Interval feature: δtk = φ(Wδ·log(tk − tk−1) + bδ)
- Span feature: stk = φ(Ws·log(tp − tk) + bs)
- Time information modulates the cell state and output gate, so fresh memories decay slowly and old ones fade — the gates become time-sensitive.
- Content-aware controller uses attention against the target item embedding:
- ak = exp(xk·Ws·ep) / Σj exp(xj·Ws·ep)
- Attention scores gate the cell-state update: cek = ak ∗ ck + (1 − ak) ∗ ck−1, amplifying target-relevant memories and suppressing noise.
- Short-term representation is a weighted average of all hidden states (p_short_u = Σ a_s_j · he_j), a "holographic projection" of the sequence rather than only the last state.
- Instead of a per-user embedding (standard SVD), SLi-Rec adopts Asymmetric-SVD: the long-term vector is an attention-weighted sum of interacted items (p_long_u = Σ a_l_j · xj), computed via a small network + softmax.
- Empirically, fewer than 2% of items receive normalized weights above 0.5 — long-term preference is defined by a handful of "soul items."
- A context-aware weight blends the two representations:
- α = σ(Wm·[p_short_u, p_long_u, x_context] + bm)
- Behavior: when the last action is <1 hour old, α approaches 1 (short-term dominates); for gaps over 24 hours, long-term weight rises. Fixed α (0 or 1) always underperforms adaptive α (by ~0.5%-1.2% AUC).
- Datasets: Amazon Electronics, Movies & TV, CDs & Vinyl (up to ~1M users, 1.2M items) plus Microsoft MSN native ads logs; metrics are AUC and F1.
- SLi-Rec outperforms 11 baselines (including DIEN, T-LSTM) on all five datasets, with AUC gains of 0.8%-2.1%; e.g., Electronics AUC 0.8282 vs. T-LSTM 0.8212, and ~3.78%/3.31% relative improvement over DIEN on Electronics/Movies.
- Ablations (T-SeqRec, TC-SeqRec_i, TC-SeqRec_g) confirm that both time features, deep attention into the cell state, and averaged hidden states each matter.
- Long-term preferences are computed offline over long horizons; short-term preferences are inferred online in real time — separating cost from latency (bank settlement vs. ATM analogy).
- Training uses negative sampling with a 1:5 positive-to-negative ratio; 7-day training / 3-day test splits.
- The model relies on LSTM; whether Transformers handle irregular sequences better is unexplored, as is multimodal content.
- The author closes with an ethical note: adaptive fusion could also enable switching between "conservative" and "exploratory" recommendation, offering a technical handle on breaking filter bubbles — the best recommendation helps users become who they want to be, not just see more of what they already like.