# Optimizing Session-Aware Recommenders: A Deep Dive into GRU-Based Latent Interaction Integration
## 3 Proposed Method
### Problem Statements
#### 3.2.3 Representation Fusion Module  
The item embedding and the latent context produced by the two modules are subsequently utilized as inputs for the representation fusion module. The aim of this module is to combine the two representations to derive a unified user preference representation. As shown in Figure 5(i), feature fusion generates its representation by combining the item embedding (denoted by \(x_{t}\)) and the latent context embedding (denoted by \(c_{t}\)) at the \(t\)-th interaction for the whole interaction history, using one of three ways: vector addition, element-wise vector multiplication, and the modified attention-gate mechanism [9]. Vector addition sums corresponding vector elements. Element-wise vector multiplication entails the multiplication of corresponding elements in the vectors. The modified attention-gate mechanism [9] merges elements through multiplication of the weighted item vector denoted by \(\alpha_{x}x\) (where x = (\(x_{1}\), \(x_{2}\), \(\ldots\), \(x_{p}\))) and the weighted (latent) context vector denoted by \(\alpha_{c}c\) (where \(c\) = (\(c_{1}\), \(c_{2}\), \(\ldots\), \(c_{p}\))). The attention weights for items and latent context, denoted by \(\alpha_{x}\) and \(\alpha_{c}\), respectively, are computed using a common relevance-based attention formula. W\({}^{\mu\text{L}}\) long-term embeddings, W\({}^{\mu\text{S}}\) short-term embeddings  
1. Fix: (_p1* W\({}^{\mu}\)_) 'CONCATE' (_ps* W\({}^{\mu\text{S}}\)_);  
_pl_, _ps_: fixed value  
2. LP: (_PL_\(\bigcirc\) W\({}^{\mu}\)_) 'CONCATE' (_PS_\(\bigcirc\) W\({}^{\mu\text{S}}\)_);  
_PL_, _PS_: _learnable vectors_  
*: scalar multiplication; \(\bigcirc\) : element-wise multiplication  
Figure 5: Representation Fusion module—LCII. In the basic LCII model, the feature fusion representation is directly used as the preference representation. The _LCII-Pre_ and _LCII-Post_ strategies use additional 'term fusion' to generate the preference representation, as described below. Figure 5(ii) shows that term fusion is accomplished by either fix fusion or LP (learned-parameters) fusion. First, we determine the window size to separate the long-term and short-term preferences, using the latent-context list as a source. For example, setting the window of 30% for a sequence of 19 items will use the last 30 percent of the latent-context embedding as short-term preference, thus (\(C_{14}\), \(C_{15}\), \(\ldots\), \(C_{19}\)) as short-term preference and (\(C_{1}\), \(C_{2}\), \(\ldots\), \(C_{13}\)) as long-term preference. Second, the long-term weight and the short-term weight are then decided either by a fixed setting (denoted as Fix) or by learned-parameters (denoted by LP). Let \(W^{pl}\) and \(W^{ps}\) respectively be the long-term embedding and short-term embedding. Fix (term) fusion applies preset values by multiplying \(W^{pl}\) with a preset \(pl\) value and \(W^{ps}\) with a preset \(ps\) value, and then concatenates these multiplied embeddings to form the term fusion representation. LP (term) fusion dynamically learns the appropriate weights for the embeddings. It begins by initializing the long-term vector \(PL\) and the short-term vector \(PS\) with random values. During the training process, these vectors are continuously updated through iterations. The fusion involves element-wise multiplication of \(PL\) with the long-term embedding \(W^{pl}\), and \(PS\) with the short-term embedding \(W^{ps}\). After the multiplications, these results are concatenated to create the final term-fusion representation. Figure 3 illustrates the representation fusion module in _LCII-Pre_. In this configuration, the module incorporates item embedding with the term fusion representation, instead of solely using the latent-context embedding. This is achieved by employing a pre-combining strategy, where the latent-context embedding is processed in the term fusion prior to the feature fusion process. Figure 4 demonstrates the representation fusion module in _LCII-Post_. Contrasting with _LCII-Pre_, the _LCII-Post_ applies a post-combining strategy.