## 4 Proposed Optimized Graph-CNN-based Approach for Online Product Recommendation
### System Architecture  
A detailed view of the whole procedure and system architecture is shown in Figure 3. There are multiple layers in the architecture. The first layer deals with the input data. After basic processing of the data, it is passed to the data analysis unit, where the data is thoroughly analyzed to understand the data behavior and find some useful insights. After the analysis, some additional features are derived from the raw data. These features include user click history, items purchased per user, items clicked per user etc. the complete data is used to generate sessions. Figure 2: Conceptual framework of the proposed model. These generated sessions are used in the next layer as input where the click sequences are transformed into session graphs for each user. To build the session graphs, we followed the method similar to SR-GNN (Session-based Recommendation with Graph Neural Networks), in which the graph structure is based on user's clicks sequences. These session graphs are then passed to the embedding layer that generates embeddings for each session graph. Each product is embedded in an integrated embedded space and denoted as a node vector. The resulting embedding table can be a representation of latent attributes of the products that is used to depict their fundamental characteristics. Concurrently, the adjacency matrix is used to save the relationships between products in terms of edges. Therefore, there are chances that many edges can occur repeatedly. To solve this issue, edges are normalized by assigning them a normalized weight. This normalized weight is calculated as shown in Equations (6) and (7):  
\[Edge\_Frequency(x,y)=\sum_{i=1}^{n}Ei(x,\ y) \tag{6}\]  
\[Weight\_normalized=\frac{Edge\_Frequency(x,y)}{deg_{x}} \tag{7}\]  
Figure 3: Proposed system architecture. where, \(Ei\) is an edge between two products \(x\) and \(y\). to calculate the occurrences of this edge we check its frequency as \(Edge\_F\)\(requency_{(x,y)}\). In Equation (7), \(deg_{x}\) is the degree of the starting node in the edge. Once, the session graphs as Gs = (Vs, Es) based on Equation (5) along with their respective embeddings are generated, now each node or product v can be mapped to X i.e., the feature matrix containing features of each product. After that E is calculated to generate the adjacency matrix represented as A. We can express the graph as a combination of products with feature and adjacency matrix i.e., \(G\) = (\(V,X,A\)). GCN works by consistently updating node's state to its the neighboring nodes and then at some point it converges. As the dataset used in this work is very large and it contains a large amount of nodes the computational cost can be very high. The generated graphs have lots of features and nodes and it will take a lot of computational time to update the node state to the neighboring nodes. Therefore, we have introduced an additional module that helps in optimizing the network structure and maximizes the weights of product nodes that are purchased by the customer. We optimize the network structure by reducing or removing the nodes that are rarely accessed and are given lowest weightage. We also used Chebyshev polynomial method that is mostly used to reduce the computational complexity of an algorithm [42]. The GCN has L number of layers and each layer is responsible to propagate the information between the product nodes. According to the GCN introduced in [43], the neighboring nodes are treated equally, however, we have introduced an additional module to optimize the network structure and that is responsible to update the weights of nodes based on their likelihood of being purchased. As shown below the Y includes all the products that are being purchased by users. Hence, the objective function tries to maximize the weight of the products that belong to Y referred as \(t\) in the Equation (8):  
\[Objective\ function=Maximize(Weight_{t}) \tag{8}\]  
where \(Weight\) is the weight for the products being purchased.