## 3 Method
### Tdr  
Traditional debiased recommendation methods are based on static scenarios. \[\mathcal{L}_{\text{Naive}}\,=\,\frac{1}{|\{t,i,u:o_{t,i,u}=1\}|}\sum_{t,i,u:o_ {t,i,u}=1}L(y_{t,i,u},y_{t,i,u}) \tag{11}\]  
However, traditional recommendation methods with static bias are not unbiased for the current treatment of selection bias in dynamic scenarios. The currently widely used  
Figure 3: Combinational function module. debiasing method uses a static propensity score \(p_{u}\), which represents the probability that user \(u\) observes a particular rating in any time period. However, this approach ignores the dynamics of selection bias, i.e., these probabilities will vary \(t\) in each time period, causing the static IPS estimator to become  
\[\mathcal{L}_{\text{staticIPS}}=\frac{1}{|\mathcal{T}|\cdot|\mathcal{I}|\cdot |\mathcal{U}|}\sum_{t,i,u:x_{0,i,u}=1}\frac{L(\hat{y}_{t,i,u},y_{t,i,u})}{p_{i, u}} \tag{12}\]  
Items in collection \(\mathcal{I}=\{i_{1},...,i_{M}\}\) are recommended to users in the collection \(\mathcal{U}=\{u_{1},...,u_{M}\}\). Users have preferences with respect to items, which are generally modeled by a label \(y_{t,i,u}\) per user \(u\in\mathcal{U}\) and per item \(i\in\mathcal{I}\). \(\mathcal{T}=\{t_{1},...,t_{T}\}\) is a set of time periods. We allow the user's preferences \(y_{t,i,u}\) to change at different time periods \(t\in\mathcal{T}\). As Equation (12) shows, \(p_{i,u}\) refers to the static propensity, which refers to the probability that user \(u\) observes a particular rating of item \(i\) in any time period. In reality, user interaction data are so sparse that it is impossible for all users to rate all items. In Equation (12), the observation metric matrix \(O\in\{0,1\}^{|\mathcal{T}|\cdot|\mathcal{I}|\cdot|\mathcal{U}|}\) denotes the ratings recorded for the corresponding time period and the ratings recorded in the interaction data. If \(o_{t,i,u}=0\), it means that they are missing. When \(o_{t,i,u}=1,o_{t,i,u}\in\mathcal{O}\), this means that the ratings of user \(u\) for item \(i\) in time period t were recorded in the logged data. Compared with Equation (12), the conventional RS debiasing losses are as follows:  
\[\mathcal{L}=\frac{1}{|\mathcal{T}|}\sum_{t\in\mathcal{T}}\frac{1}{|\mathcal{I }|}\sum_{i\in\mathcal{I}}\frac{1}{|\mathcal{U}|}\sum_{u\in\mathcal{U}}L(\hat{ y}_{t,i,u},y_{t,i,u}) \tag{13}\]  
where the function L can be chosen according to different RS evaluation metrics. The common mean-squared error (MSE) metric formula is as follows:  
\[L(\hat{y}_{t,i,u},y_{t,i,u})=(\hat{y}_{t,i,u}-y_{t,i,u})^{2} \tag{14}\]  
In the previous section, we mentioned the standard recommendation loss function and the static IPS-based loss function. Now, we focus on the dynamic selection bias. We set the exact propensity \(p_{t,i,u}\) such that the dynamic selection bias can be fully corrected by applying Equation (15) to the evaluation of the predicted scores with reverse weighting:  
\[\mathcal{L}_{\text{TDR}}=\frac{1}{|\mathcal{T}|\cdot|\mathcal{I}|\cdot| \mathcal{U}|}\sum_{t,i,u:x_{0,i,u}=1}\frac{L(\hat{y}_{t,i,u},y_{t,i,u})}{p_{t, i,u}} \tag{15}\]  
Equation (15) is applied to the matrix factorization (MF) model. We refer to this method, which combines the MF and time-dynamic debiasing methods, as TDR. Given an observed rating \(y_{t,i,u}\) from user \(u\) on item \(i\) at time \(t\), the MF computes the predicted rating \(\hat{y}_{t,i,u}\) as follows: \(\hat{y}_{t,i,u}=\mathbf{p}_{u}^{T}\mathbf{q}_{i}+b+b_{i}+b_{u}+b_{t}\), where the \(\mathbf{p}_{u}\in R_{c}\) and \(\mathbf{q}_{i}\in R_{c}\) are embedding vectors of user \(u\) and item \(i\), and \(b_{u}\in R\), \(b_{i}\in R\), and \(b\in R\) are the user, item, and global offsets, respectively. Most importantly, we consider the effect of time on rating prediction and perform dynamic scenario modeling to construct TDR by denoting the time-varying offsets by \(b_{i}\). In TDR, we construct a dynamic debiasing layer where the number of hidden layers \(T=4\).