# Intelligent Caching with Graph Neural Network-Based Deep Reinforcement Learning on SDN-Based ICN
## 3 System Model
### Content Popularity and User Preference  
In a realistic computer network, users exhibit preferences for specific types of content, leading to varying request frequencies. We develop a statistical model that incorporates content popularity and user preferences to simulate this network traffic. In our network, receiver nodes correspond to users, and we denote the users as \(\mathcal{U}=\{u_{1},\ldots,u_{U}\}\). Our objective is to determine the probability distribution \(P(c_{i},u_{j})\), which represents the likelihood of a request for the \(i^{th}\) content by the \(j^{th}\) user. Content popularity refers to the probability distribution of requesting the \(i^{th}\) content within the network, represented by \(P(c_{i})\). Research studies [41] have shown that the content popularity in a network can be modelled using a Zipfian distribution,  
\[P(c_{i})=\frac{1}{(i)^{\alpha}\sum_{k=1}^{C}(k)^{-\alpha}} \tag{1}\]  
where \(\alpha\) is a skewness factor with a value of 0.8. User preference refers to the relationship between users and content items. In our study, we employ collaborative filtering [15; 42] to capture user preferences. Collaborative filtering is a popular recommendation system technique that predicts a user's preference by identifying users with similar tastes based on their historical behaviours. Collaborative filtering has two primary approaches: the neighbourhood-based method and the latent factor method. The neighbourhood-based method identifies similar users or items based on their historical preferences and recommends items that similar users or items have liked. On the other hand, the latent factor method discovers latent factors that represent underlying characteristics of users and items and uses these factors to predict user preferences. In our case, we utilize matrix factorization, a latent factor method, to extract the latent factors of users and content items. By decomposing the user-item interaction matrix into lower-dimensional matrices, we can represent users and items in terms of these latent factors. Subsequently, we calculate user preferences by analyzing the relationships between users and content items derived from matrix factorization. To capture the user-content relation, we construct a matrix \(M\) with dimensions \(C\times U\), where \(C\) represents the number of content items and \(U\) represents the number of users. Each element \(m_{i,j}\) in the matrix corresponds to the relationship between content \(c_{i}\) and user \(u_{j}\). This relationship can be based on various factors, such as ratings given by the user, the time spent on the content, or any other relevant metric. We utilize trainable embedding layers to process the user-content matrix further to generate embedding vectors for each content item and user. Specifically, for each content item \(c_{i}\), we apply an embedding layer that maps it to a continuous vector representation \(x_{c_{i}}\in\mathbb{R}^{c}\), where \(e\) denotes the dimensionality of the embedding. Similarly, for each user \(u_{j}\), we employ an embedding layer to obtain the embedding vector \(y_{u_{j}}\in\mathbb{R}^{c}\). Our research uses the well-known MovieLens100K dataset [16] as a real-world dataset for our experiments. This dataset consists of user ratings for movies and is widely used in evaluating recommendation systems. We focus on learning embedding vectors for 943 users and 1682 content items within this dataset. To obtain user and content embeddings, we employ a matrix factorization technique combined with a neural network architecture inspired by the works [15; 42]. Our model consists of two trainable embedding layers, one for users and another for content items. These layers enable the learning of dense and low-dimensional representations that capture users' and content's underlying characteristics and preferences. The next step in our model involves computing the element-wise product of the content and user embedding vectors. This element-wise product represents the interaction between a specific content item and a user.