Skip to content

Collaborative Filtering with Temporal Dynamics

https://doi.org/10.1145/1721654.1721677

顧客對產品的偏好會隨時間變化,產品的熱度也可能因新商品出現而波動。這些變化促使推薦系統必須考慮時間動態,才能準確預測使用者行為。

然而,要在實際的推薦環境中建模時間變化並不容易。使用者與產品的行為關係複雜,且會隨著時間緩慢或劇烈變動,許多變化相互影響,並且往往只與特定資料實例相關。

傳統的 time-window 或 decay 方法難以捕捉這些細微變化,因為它們在捨棄資料時,常會丟失有用的訊號。因此,我們需要一種能更靈敏辨識「短期變化(transient effects)」與「長期偏好(long-term patterns)」的方法。

論文提出一種模型,能在不捨棄資料實例的情況下,有效追蹤使用者行為隨時間的變化。藉由區分與建模不同時間尺度上的模式,這種方法能全面利用資料中的時間訊號,提升推薦的準確性與解釋力。

INTRODUCTION

對時間漂移資料(time drifting data)進行建模,是資料探勘(data mining)中的核心議題之一。對這類資料的分析,必須在折衷短期暫態效應(temporary effects)的權重與保留能反映資料長期趨勢之間取得平衡。這類問題通常被稱為概念漂移(concept drift)。

針對使用者偏好隨時間變化進行建模,則帶來了額外的挑戰。其中一種形式的偏好漂移,是由於新商品或新服務的出現,導致使用者偏好產生轉變;與此相關的還包括季節變化或特定節日所引發的購物行為變化。這些屬於整體性的變動,本文稱為「全域概念漂移(global concept drift)」。

然而,使用者行為也可能受到在地化因素(localized factors)的影響。例如家庭結構的變動可能會徹底改變消費模式、個人對電影或音樂的品味會隨著時間逐漸改變。這些偏好改變無法單靠全域漂移模型來捕捉,因此需要更細緻的建模方式。

用戶偏好本質上應被視為一個時間錨定(time-anchored)的問題。這體現在兩個方面:首先,使用者對相同評分的主觀感受可能隨時間變化,例如,原本用"3星"表達中立態度的使用者,後來可能用"3星"表達不滿;其次,在多使用者共用一個帳戶的情境下,系統難以區分彼此。本文提出一種假設:時間上接近的操作多半來自同一位家庭成員,並可能代表其他人的喜好。

這些現象顯示,時間因素應成為建構推薦系統時的重要考量。而這類時間敏感模型,也有機會擴展至其他時間序列資料領域。

我們使用 Netflix 提供的資料集進行研究,資料集不僅規模龐大而且涵蓋長時間跨度。在資料分析中,我們發現 2004 年後使用者的平均評分出現明顯上升趨勢,且舊電影的平均評分高於新電影。

本研究的主要貢獻,是提出一種能有效建模使用者偏好時間漂移的方法,並應用於推薦系統中。我們在公開且廣泛使用的資料集上進行實驗,結果顯示,加入時間動態後,模型表現明顯提升,驗證了時間建模對推薦系統精準度的正面影響。

TRACKING DRIFTING CUSTOMER PREFERENCES

作者總結了用戶偏好建模的四項設計原則:

  1. 模型應考慮整體時間序列,並非只依賴某一時間點的行為特徵,才能捕捉長期趨勢。

  2. 模型需能辨識多種類型的概念變化(changing concepts),包括使用者導向與物品導向的變化,這些變化可能是漸進式的,也可能是突發性的。

  3. 除了分別對每位使用者與每個物品建模外,模型亦應能在統一架構中整合不同概念,進而從使用者與物品間的交互中識別出更高階的行為模式。

  4. 本研究不以預測未來的具體時間變化為目標,原因在於此類預測難度高且資料不足。相反地,作者著重於從歷史資料中的短期雜訊(transient noise)中提取穩定訊號(persistent signal),以便更準確地預測未來使用者行為。

TIME-AWARE FACTOR MODEL

The anatomy of a factor model

回顧3種 factor models:

FunkSVD \(\hat{r}_{ui}=q_{i}^{T}p_{u}\) \(\min\limits_{p*,q*}\sum\limits_{(u,i,t)\in{K}}(r_{ui}-q_{i}^{T}p_{u})^{2}+\lambda(||q_i||^{2}+||p_u||^{2})\)

BaisSVD \(\hat{r}_{ui}=u+b_{u}+b_{i}+q_{i}^{T}p_{u}\)

SVD++(這篇論文修改自這算法) \(\hat{r}_{ui}=u+b_{u}+b_{i}+q_{i}^{T}(p_{u}+|R(u)|^{-1/2}\sum\limits_{j\in{R(u)}}y_j)\)

The decomposition of a rating into distinct portions is convenient here, as it allows us to treat different temporal aspects in separation. More specifically, we identify the following effects: (1) user biases(\(b_u\)) change over time; (2) Item biases (\(b_{i}\)) change over time; (3) User preferences (\(p_u\)) change over time. On the other hand, we would not expect a significant temporal variation of item characteristics (\(q_i\)), as items, unlike humans, are static in their nature. We start with a detailed discussion of the temporal effects that are contained within the baseline predictors.

Time changing baseline predictors

2種 temporal variability 從 baseline predictors 可以看出. 1.商品流行程度會隨時間變化. 2.顧客會隨著時間改變 baseline rating. e.g.平均只會給3星會變成平均給4星.

Template: \(b_{ui}(t)=\mu+b_{u}(t)+b_{i}(t)\)

作者觀察 movielens 資料集,並不期望電影的人氣每天都在波動,在長時間內才會發生變化.另外,作者觀察到用戶每天都可能發生變化並產生的不一致行為.作者認為和電影相比,對用戶建模需要比較精細的時間.

Item bias: \(b_{i}(t)=b_{i}+b_{i,Bin(t)}\) 作者採10週為1個bin,資料集總共30個bins.

User bias: 因為分桶會導致 user rating 不足,所以作者採用以下線性函數來捕捉gradual drift of user bias: \(dev_{u}(t)=sign(t-t_{u}) \cdot |t-t_{u}|^{\beta}\)

第一版的 time-dependent user-bias: \(b_{u}^{(1)}(t)=b_{u}+\alpha_{u} \cdot dev_{u}(t)\)

作者認為也可透過 splines(樣條函數) 描述 time-dependent user-bias: \(b_{u}^{(2)}(t)=b_{u}+\dfrac{\sum\limits_{l=1}^{k_{u}}e^{-\gamma|t-t_{l}^{u}|}b_{t_{i}}^{u}}{\sum\limits_{l=1}^{k_{u}}e^{-\gamma|t-t_{l}^{u}|}}\)

However, in many applications there are sudden drifts emerging as “spikes” associated with a single day or session...To address such short lived effects, we assign a single parameter per user and day, absorbing the day-specific variability.This parameter is denoted by \(b_{u,t}\). 為了處理短暫時間內的峰值,作者在每天每位用戶上加上參數,負責吸收這些變化.

\(b_{u}^{(3)}(t)=b_{u}+\alpha_{u} \cdot dev_{u}(t)+b_{u,t}\)

\(b_{u}^{(4)}(t)=b_{u}+\dfrac{\sum\limits_{l=1}^{k_{u}}e^{-\gamma|t-t_{l}^{u}|}b_{t_{i}}^{u}}{\sum\limits_{l=1}^{k_{u}}e^{-\gamma|t-t_{l}^{u}|}}+b_{u,t}\)

在此篇論文,作者採用 \(b_{u}^{(3)}(t)\) 作為timeSVD++的 \(b_{u}\)

根據Table 1.實驗得知,\(b_{u,t}\)具有顯著影響.

後續接著討論週期性影響.e.g. 商品在特定季節或節日會特別熱門;用戶在週末和工作日也會有不同的購買行為.

加上 time period 參數: \(b_{i}(t)=b_{i}+b_{i,Bin(t)}+b_{i,period(t)}\) \(b_{u}(t)=b_{u}+\alpha_{u} \cdot dev_{u}(t)+b_{u,t}+b_{i,period(t)}\)

後續討論用戶的 rating scale. For example, different users employ different rating scales, and a single user can change his rating scale over time.

\(b_{ui}(t)=\mu+b_{u}+\alpha_{u} \cdot dev_{u}(t)+b_{u,t}+(b_{i}+b_{i,Bin(t)}) \cdot c_{u}(t)\) \(c_{u}(t)=c_u+c_{u,t}\), \(c_{u,t}\) represents day-specific variability.

Time changing factor model

作者表示 temporal dynamics 不僅改變 base predictor, 它們還影響用戶的偏好, 進而影響用戶與項目之間的交互關係.

For example, a fan of the “psychological thrillers” genre may become a fan of “crime dramas” a year later. Similarly, humans change their perception on certain actors and directors.

This effect is modeled by taking the user factors (the vector \(p_{u}\)) as a function of time.

\(p_{u}(t)^{T}=(p_{u1}(t),...,p_{uf}(t))\) \(p_{uk}(t)=p_{uk}+\alpha_{uk} \cdot dev_{u}(t)+p_{uk,t} k=1,...,f\)

\(p_{uk}\) captures the stationary portion of the factor. \(\alpha_{uk} \cdot dev_{u}(t)\) approximates a possible portion that changes linearly over time. \(p_{uk,t}\) absorbs the very local, day-specific variability.

最終得出了 timeSVD++: \(\hat{r}_{ui}(t)=\mu+b_{i}(t)+b_{u}(t)+q_{i}^{T}\left(p_{u}(t)+|R(u)|^{-1/2}\sum\limits_{j\in{R(u)}}y_{j}\right)\)