GNN-GMVO: Graph Neural Networks for Optimizing Gross Merchandise Value
  in Similar Item Recommendation
Similar item recommendation is a critical task in the e-Commerce industry,
which helps customers explore similar and relevant alternatives based on their
interested products. Despite the traditional machine learning models, Graph
Neural Networks (GNNs), by design, can understand complex relations like
similarity between products. However, in contrast to their wide usage in
retrieval tasks and their focus on optimizing the relevance, the current GNN
architectures are not tailored toward maximizing revenue-related objectives
such as Gross Merchandise Value (GMV), which is one of the major business
metrics for e-Commerce companies. In addition, defining accurate edge relations
in GNNs is non-trivial in large-scale e-Commerce systems, due to the
heterogeneity nature of the item-item relationships. This work aims to address
these issues by designing a new GNN architecture called GNN-GMVO (Graph Neural
Network - Gross Merchandise Value Optimizer). This model directly optimizes GMV
while considering the complex relations between items. In addition, we propose
a customized edge construction method to tailor the model toward similar item
recommendation task and alleviate the noisy and complex item-item relations. In
our comprehensive experiments on three real-world datasets, we show higher
prediction performance and expected GMV for top ranked items recommended by our
model when compared with selected state-of-the-art benchmark models.
Ramin Giahi, Reza Yousefi Maragheh, Nima Farrokhsiar, Jianpeng Xu, Jason Cho, Evren Korpeoglu, Sushant Kumar, Kannan Achan
GNN-GMVO: Graph Neural Networks for Optimizing Gross Merchandise Value in Similar Item Recommendation

###### Abstract

Similar item recommendation is a critical task in the e-Commerce industry, which helps customers explore similar and relevant alternatives based on their interested products. Despite the traditional machine learning models, Graph Neural Networks (GNNs), by design, can understand complex relations like similarity between products. However, in contrast to their wide usage in retrieval tasks and their focus on optimizing the relevance, the current GNN architectures are not tailored toward maximizing revenue-related objectives such as Gross Merchandise Value (GMV), which is one of the major business metrics for e-Commerce companies. In addition, defining accurate edge relations in GNNs is non-trivial in large-scale e-Commerce systems, due to the heterogeneity nature of the item-item relationships. This work aims to address these issues by designing a new GNN architecture called GNN-GMVO (Graph Neural Network - Gross Merchandise Value Optimizer). This model directly optimizes GMV while considering the complex relations between items. In addition, we propose a customized edge construction method to tailor the model toward similar item recommendation task and alleviate the noisy and complex item-item relations. In our comprehensive experiments on three real-world datasets, we show higher prediction performance and expected GMV for top ranked items recommended by our model when compared with selected state-of-the-art benchmark models.

 Recommendation Systems, Graph Neural Networks, Similar Item Recommendations, Gross Merchandise Value Optimization

## I Introduction

The goal of recommender systems in e-Commerce settings is to increase the click-through rate (CTR) and revenue by recommending items that users will likely interact with and eventually purchase [1]. Similar item recommendation plays a vital role in enhancing customers' exploration experiences on e-Commerce websites, by recommending similar substitutes for a given anchor item. This type of models enables users to be exposed to a broader set of products and allow marketing campaigns to reach potential customers effectively. Both these factors increase the chance of conversion [2].

Different modeling approaches are suggested in the literature to capture complex relations like similarity for items. One of the recent approaches for this task is to use graph-based models, which can identify and formulate the relation between items to make accurate recommendations [3]. GNNs generate representations of nodes that depend on the graph's structure, item pairs links (edge) features, and relations. The most common paradigm for GNNs in item recommendations is to learn node (i.e., product) representation to perform relation predictions based on the embedding vectors [4].

Identifying product relations, such as similarity and complementarity, is important in the e-Commerce recommendation platform [5]. Ignoring these diverse types of relations can lead to losing critical information about item relations. In addition, the ultimate optimization objective can play a critical role in graph models' performance in different settings. For instance, if the graph model's architecture optimizes relevance-related loss functions, it can lead to suboptimal recommendations from a revenue standpoint. This, in turn, can make the usage of those graph architectures prohibitive for large-scale industrial e-Commerce systems.

To address these issues, we propose a new graph-based model that considers the diverse, complex relations in item spaces of large-scale e-Commerce settings and can directly optimize on Gross Merchandise Value (GMV)-related loss function. We call this architecture Graph Neural Network - Gross Merchandise Value Optimizer (GNN-GMVO). Under this model, we propose a new multi-objective decoder function that optimizes on a combination of relevance and GMV. This makes the model capable of adjusting the loss function per the usage setting. In other words, depending on the degree of importance of relevance and revenue, the model objective can change.

Through our extensive experiments, we design a new edge relation based on item-item data that considers relational information like co-view, view-then-bought (an item viewed, then another item is ultimately bought), and co-purchase. This new metric helps us better identify similarity relations among other types of relations between items and reduce noise (i.e., other types of item-item relations).

We perform experiments to validate the proposed archi
tecture on a user-interaction proprietary e-Commerce dataset from _Walmart.com_ and two publicly available datasets from Amazon. According to the results, GNN-GMVO outperforms the currently deployed model in prediction metrics in _Walmart.com_. The model also performs better than GCN [6] and Graph Attention Networks (GAT) [7] models in expected GMV without hurting the NDCG metric.

The rest of this paper is organized as follows. In section II, we present background and related work. In section III, the methodology and the architecture of GNN-GMVO are elaborated. In section IV, we report the experiments conducted to compare the proposed architecture with the existing benchmarks. Section V states the conclusion and direction for future research.

## II Background and related work

Among proposed algorithms for recommendation systems, GNNs have shown to be one of the most promising models [3]. One reason for this success might be the inherent design of the graph models that directly takes advantage of item-item, user-item, or user-sequence interactions. In the last decade, various aspects of GNN-based recommendation systems have come under attention in industry and academia [8, 9, 10]. In this section, we review some of the relevant work to our paper.

One closely related topic to similar item recommendation is social recommendation task. This task emerged with the creation of online social networks. The models in the social recommendation track assume that a given graph node's local neighbors can be used to improve node representation modeling, because a given node's neighbors should have similarity with the node itself [11]. The similarities between nodes are used in two different ways for modeling purpose: (i) to improve final generated node representation modeling [12], (ii) to explicitly use them as regularizers to limit the final node latent representations [13, 14, 15].

Considering diverse nature of item-item relation is one of the important aspect of our work. Because of this another stream of research pertaining to our work is the knowledge graph based recommendation. Knowledge graphs utilize a complex graph structure with several types of nodes and relation among them [16]. Mainstream papers in this area of literature create embeddings for relations and focus on semantic relevance (see [17, 18] for example), and the semantic information of both nodes and relations are considered.

Another research track relevant to our work is models focusing on revenue optimization. Most research in item recommendation systems' literature is based on optimizing the item recommendation relevance. However, in e-Commerce settings, the objective maybe to optimize on generated revenue [19]. There are non-graph machine learning models like [20] and [21] that can potentially model context created by price of recommended items on the user behavior. Some other papers take this one step further and study the so-called assortment optimization problem (see [19, 22]). Under assortment optimization problem, one is interested in finding a subset of items that maximize the revenues. Most of the models studied in this context, like multinomial logistic regression [23], mixed multinomial logistic regression [24], and nested logit model [25] are simple listwise models from an ML standpoint of view, which makes their usage prohibitive in complex big-data settings. However, due to listwise nature of user choice behavior, the assortment optimization problem becomes combinatorially challenging (see [26] for example). For instance, [22] develops a scalable model to identify similar items and maximize revenue by constructing a pointwise ranking model, see [27] and [28] for a survey of models optimizing on generated revenue. However, as mentioned, these models do not explicitly incorporate the item-item relations inherent to graph models and may lose some relational information.

In parallel to non-graph models focusing on optimizing revenue, there are graph models for similar-item recommendation not optimizing on revenue-related metrics. However, they mainly focus on optimizing relevance in the item recommendation setting. For example, [29] develop a method to recommend unforeseen apps to the users by constructing an app-app similarity graph and using users' interaction data with previously installed apps. [30] propose an architecture with a weighted graph attention layer to provide in-session item embedding and recommend the next item in each session while optimizing CTR.

Finally, some papers attempt to present graph-based models that are at least price aware if not optimizing on generated revenue by the recommendations. In their model, the utility scores of items are function of recommended price of the whole list of recommended items. [1] propose a price-aware GNN-based recommender system that discovers user price sensitivity for each price category. To do so, they add nodes for price and category to the user-item graph and allow the item price to be propagated to the user embeddings through the item nodes. This structure allows for user price preference on unexplored categories. To the authors' best knowledge, although revenue awareness has been a research topic for other recommender systems [31, 32], it has not been studied as part of GNN-based recommender systems. In this paper, we seek to fill the literature gap by proposing a graph-based model for a similar item recommendation task that explicitly models item-item relations while optimizing generated revenue by the recommendations.

## III Method

This section introduces the architecture of the proposed GNN-GMVO framework, the high-level system view, and its components. In detail, we discuss GNN-GMVO model, item graph construction, and model training and inference for similar item recommendation tasks. Specifically, we focus on introducing two variants of our model built on Graph Convolutional Networks (GCNs) and Graph Attention Networks (GATs), and call them GCN-GMVO and GAT-GMVO, respectively.
### _GCN-GMVO Model_

Let \(G=(V,E)\) denotes a graph where \(V\) and \(E\) represent the set of nodes and edges of the graph. Also, denote the embedding matrix of nodes by \(X\in\ \mathcal{R}^{d\times|\mathcal{V}|}\), where \(d\) is the dimension size of the embedding and \(|\mathcal{V}|\) is the number of nodes in the graph. The graphs represent the relations defined over different sets of entities (represented by nodes). An edge \(e\in E\) shows a connection between node \(u\) (\(u\in V\)) and node \(v\) (\(v\in V\)).

GNNs are a class of neural network models built on graph structure and use relations defined between the nodes. GNNs aggregate information from the graph's structure to create a deep representation for each node by using a form of message passing to transfer information between nodes to update each node's representation.

Graph Convolutional Networks (GCNs) are among the most popular GNN models. Under GCNs, message passing between nodes is done via Eq. (1):

\[h_{u}^{k}=\textit{ReLU}(W^{k}\sum_{v\in N(u)U_{\{u\}}}h_{v}^{k-1}/\sqrt{|N(u)|| N(v)|}), \tag{1}\]

where \(h_{u}^{k}\) shows hidden representation of node u after _kth_ message passing step, and \(W^{k}\) is a trainable matrix. \(N(u)\) and \(N(v)\) show the neighborhood nodes of \(u\) and \(v\), respectively. For each node, this function aggregates information from its neighborhood and combines it with the previous embedding of that node to update its representation. The input features of each node are used as initial hidden embedding \(h^{0}\) (i.e., \(h_{u}^{0}=X_{u}\)), and after \(K\) message passing steps, the final embeddings of nodes, \(z_{u}\), are created. In other words:

\[z_{u}=h_{u}^{K}\quad\forall u\in V. \tag{2}\]

GCN model operates as the encoder function by using the local graph structure around each node. The encoder maps nodes to an embedding space. A decoder function reconstructs the connections of the graph from the encoded node embeddings. In the similar item recommendation task, the decoder should perform as a predictor of the similarity between pairs of nodes in the graph. This is done by predicting whether two nodes are connected in the graph and reduces to the link prediction problem [33]. Under GCN, the encoder function takes the graph structure and the initial node features as the input, and generates the final embeddings of the nodes using Eq. (2). Then, a decoder function reconstructs the neighborhood structure for each node.

Under the GCN-GMVO framework for the similar item recommendation problem, we aim to optimize on item similarity relevance while inflating the weight of the edges with higher item prices. In other words, the decoder should identify similar items for a given anchor node (item) of interest, while boosting it according to the prices of respective items. To achieve this goal, we adjust the decoder function to make the final loss function more sensitive to links created among neighbors with higher prices. Because of this, the decoder function is modeled as Eq. (3):

\[DEC\left(z_{u},z_{v}\right)=(1+\lambda(p_{u}+p_{v}))(z_{u}^{T}z_{v}), \tag{3}\]

where \(p_{u}\) is the normalized price of item \(u\), and \(z_{u}^{T}z_{v}\) is the inner product between embeddings of nodes \(u\) and \(v\). Note that if \(z_{u}^{T}z_{v}\) is higher for a pair \((u,v)\), nodes \(u\) and \(v\) are more similar. Under Eq. (3), the inner product of the embeddings of two nodes \(u\) and \(v\) are inflated by the sum of normalized prices of both nodes \(u\) and \(v\). \(\lambda\) controls the trade-off between the importance of price and similarity. If \(\lambda=0\), the decoder function only focuses on the similarity between nodes \(u\) and \(v\). However, by increasing the value of \(\lambda\), the decoder considers more weight for the revenue generated by the corresponding nodes of the pairs.

Under GCN-GMVO, we frame the similar item recommendation problem as a link prediction problem. The link prediction is a classification problem where the positive label is assigned to a link between nodes \(u\) and \(v\) if an edge connects the nodes. Also, a negative link is assigned to pairs of nodes if no edge connects them in a graph structure. In order to train the model, we randomly sample a subset of positive edges and an equal number of negative edges from the training data. The sampling is done according to a uniform distribution. Then, to frame the problem as a link prediction problem, a binary cross-entropy loss (Eq. 4), is defined on the encoder-decoder structure:

\[\mathcal{L}= -\frac{1}{N}\sum_{(u,v)\in E}l(DEC(z_{u},z_{v}),A[u,v]) \tag{4}\] \[= -\frac{1}{N}\sum_{(u,v)\in E}y_{(u,v)}.\log\left(\sigma\left(DEC \left(z_{u},z_{v}\right)\right)\right)+\] \[= (1-y_{u_{n},v_{n}}).\log\left(1-\sigma\left(DEC\left(z_{u_{n}},z_ {v_{n}}\right)\right)\right).\]

In Eq. (4), \(\sigma\) denotes the sigmoid function, which maps the decoder to a probability score, and \(A\) is the binary adjacency matrix. In addition, \(u_{n}\) and \(v_{n}\) show the nodes for the negative samples from non-existing edges. The loss function measures the discrepancy between the decoded edge values and the true values.

### _GAT-GMVO Model_

The decoder function defined by Eq. (3) can be applied on other GNN architectures such as GAT (Graph Attention Network) [7] or GraphSAGE [34] to tailor these models toward optimizing revenue while decoding the edges. GAT has shown promising results by combining GNNs with attention mechanism [7]. The GAT model introduces attention weight into graphs, which is used to calculate the hidden representation of the nodes by attending over neighbor's influence during the aggregation step. Eq. (5) shows the hidden representation of node \(u\) in iteration \(k\) of message passing:

\[h_{u}^{k}=\sigma(\sum_{v\in N(u)}\alpha_{u,v}h_{v}^{k-1}), \tag{5}\]
\(\alpha_{u,v}\) shows the attention on neighbours of node \(u\) while aggregating its neighbour information during the message passing. \(\alpha_{u,v}\) can be calculated using Eq. (6):

\[\alpha_{u,v}=\frac{exp(a^{T}[Wh_{u}\oplus Wh_{v}])}{\sum_{v^{\prime}\in N(u)}exp( a^{T}[Wh_{u}\oplus Wh_{v^{\prime}}])}, \tag{6}\]

where \(a\) shows a trainable attention vector, \(W\) is a trainable matrix, and \(\oplus\) denotes the concatenation operation [33]. Other components of GAT-GMVO framework including the decoder and loss can be modeled similar to GCN-GMVO architecture proposed in section III-A. This change in the decoder function can make the GAT model more sensitive to highly priced neighbors.

### _Loss Function Variants_

Cross-entropy function is used to formulate the loss function for GNN-GMVO. However, other types of ranking functions such as pairwise max margin loss can also be utilized to optimize the encoder-decoder loss for GNN-GMVO architecture. Eq. (7) shows the max margin loss function for the link prediction problem.

\[L=\sum_{(u,v)\in E}max(0,-DEC(z_{u},z_{v})+DEC(z_{u_{n}},z_{v_{n}})+\Delta), \tag{7}\]

where \(\Delta\) is the margin for the difference between \(DEC(z_{u_{n}},z_{v_{n}})\) and \(DEC(z_{u},z_{v})\). This loss function helps the model to optimize the weights by minimizing the scores generated by non-existing edges and maximizing the scores generated by positive edges while considering the generated revenue. Since the decoder function takes into account the revenue optimization, the loss function considers lower loss value for the edges with higher price nodes.

### _Item Graph Construction, Model Training, and Model Inference_

Since item-item feature data in its raw format does not include edges among the items, we need to construct a graph for the training purpose to capture the similarity connections between items. To do this, we construct item features for all the nodes. This work uses a pre-trained model called Universal Sentence Encoder (\(USE\)) to extract initial node embeddings \(X\) (see [35] and [36]). This model creates a sentence embedding with dimensions of 512. We use the item name, item category, and other textual information of the item to generate text that is inputted to \(USE\) to generate the embeddings.

In order to detect edges of the graph, we need to define a metric that represents similarity relations between items, as there could be multiple types of relations such as complementarity, substitutability, and relevance among items of a given data in e-Commerce settings. The existence of multiple types of relations can create noise in detecting similar nodes to any given item, as users' click/purchase behavior (which is used to construct the graph) can be affected by these diverse relations among the items. Hence, we use co-view, view-bought, and co-purchase data as signals to define a new and custom metric to identify similarity relations and remove noise:

\[\begin{split} Sc(u,v)=&|cv(u,v)|+|vb(u,v)|+\\ &|vb(v,u)|-|cp(u,v)|\quad\forall u,v\in V,\end{split} \tag{8}\]

where \(|cv\left(u,v\right)\),\(|cp\left(u,v\right)|\) show the number of times items \(u\) and \(v\) are co-viewed and co-purchased together. \(|vb\left(u,v\right)|\) shows the number of times item \(u\) is viewed and then item \(v\) is purchased. We subtract \(|cp\left(u,v\right)|\) from co-view and view-then-bought to account for noise created by complementary items and only keep similarity relations between nodes. Note that complementary items, although bought or viewed together or after one another, are not similar. We use Eq. (9) to detect strong similarity relations while removing noise created by complementary items:

\[edge(u,v)=\begin{cases}1&\text{if }Sc(u,v)>\theta\\ 0&otherwise.\end{cases} \tag{9}\]

Eq. (9) assumes an edge between \(u\) and \(v\) if \(Sc(u,v)\) is larger than a threshold \(\theta\).

We randomly split the graph into training and test sets to train the model and evaluate its performance. The edges are partitioned between training and test sets. We use a two-hop message passing GCN and GAT models with an output embedding of 256 dimensions. In other words, Eq. (1) and Eq. (5) run for two iterations to encode the nodes into final node embeddings \(z_{u}\), \(\forall u\in\mathcal{V}\). Then given sampled negative and positive edges, the loss function (4) is obtained. After completion of training, the obtained model is used for inferencing and ranking.

To perform the model inference on a set of items, we consider all those items as nodes of the graph. We assume an edge between the nodes of a given pair if Eq. (8) holds for that pair. The inference graph is encoded as mentioned in subsections III-A and III-B using the trained model. See subsection III-F for the proposed approach of constructing the edges for cold or new items with zero or small number of views and transactions.

### _Ranking Task for Recommendation_

In this paper, we only focus on optimizing revenue and relevance via using the graph models. Therefore, in order to retrieve similar items, one can use a similarity measure between two items' final graph embeddings. After model inference and encoding nodes to embedding space, we apply a weighted similarity function to find the similarity score between nodes \(u\) and \(v\) using Eq. (10):

\[score\left(u,v\right)=\ (1+\lambda(p_{u}+p_{v}))\times(\frac{z_{u}^{T}z_{v}}{|z_ {u}||z_{v}|}). \tag{10}\]

Eq. (10) represents the weighted cosine similarity score between item \(u\) and item \(v\). When ranking recall set for an anchor item \(u\), the higher the price of item \(v\) (\(v\in\)_Candidate set for u_), the higher it will be ranked.
### _Edge Construction for Cold Items_

In a large-scale e-Commerce implementation of any recommendation module, new items with no user-interaction history are always added. In addition, some items may have low user traffic, and they may not be connected to any other graph nodes using a threshold-base rule like Eq. (8). The new and low-traffic (cold) items become isolated in the graph in these cases. Therefore, the node embeddings generated by the GNN-GMVO model will only use the weights of that node, and no message will be passed from the other nodes of the graph:

\[h_{u}^{k}=\textit{ReLU}(W^{k}h_{u}^{k-1}). \tag{11}\]

In these cases, one may ignore a threshold-based rule like Eq. (8) and add a connection from the node with the most similar initial embedding, \(h_{0}\), to the new/cold item. This case may alleviate the isolation problem of the new/cold items, connect them to the rest of the graph, and obtain better final embeddings. The items with the highest probability are more likely to be similar to each other:

\[S_{i}=\textit{argmax}(\frac{e^{X_{i}X_{j}}}{\sum_{j^{\prime}\in V}e^{X_{i}X_{j }^{\prime}}})\quad\forall j^{\prime}\in V. \tag{12}\]

\(S_{i}\) shows the most similar item to cold item \(i\). For graphs with millions of nodes, approximate nearest neighbour search algorithms such as [37] and [38] could be utilized to retrieve the most similar nodes. Figure 1 summarizes the architecture of the GNN-GMVO model and the steps explained in this section.

## IV Results

### _Results on Walmart dataset_

This section summarizes the conducted empirical experiments to validate the proposed modeling approach on real data instances. We compare the model with the currently deployed recommendation architecture in the similar item recommendation module of _Walmart.com_. We call this benchmark model which is a sophisticated Deep Learning model \(SIRB\) (Similar Item Recommendation Benchmark) in the rest of this paper. The similar item recommendation module of _Walmart.com_ is in the item pages of the platform and seeks to recommend alternative similar items to the main item of the page (See Figure 2).

We use Normalized Distributed Cumulative Gain (NDCG) to measure the ranking relevance. We also define a metric to measure the expected generated GMV by the models' suggested rankings (\(EGMV@K\)). To calculate \(EGMV@K\), after the model ranking, the first \(K\) items are determined for each anchor item. Then, we use the transaction data obtained for a month after model inferencing to approximate the ground truth. We calculate the portion of times each candidate item is being transacted and consider this as the probability of the purchase for each item. More specifically, \(EGMV@K\) is calculated as follows:

\[GMV@K=\sum_{k=1}^{K}\sum_{t=1}^{T}\frac{|Tr_{t,k}|}{\sum_{j\in c_{a}}|Tr_{t,j }|}P_{k}, \tag{13}\]

where \(|Tr_{t,k}|\) is the number of times candidate item \(k\) is purchased at time \(t\), \(\sum_{j\in c_{a}}|Tr_{t,j}|\) shows the total number of transactions for all candidate items under an anchor item \(a\), and \(P_{k}\) shows price for candidate item \(k\).

The data is proprietary and is selected from the Online Grocery category of items and includes about 100,000 items and 4 million links (as the edges of the graph) among those items. The graph edges are constructed using Eq. (9).

We conducted parameter tuning by training the model with different learning rates (0.001, 0.01, 0.1) and epoch sizes (10, 20, 50, and 100). We also tested the model performance using one, two, and three-hop message passing parameter. The op

Fig. 1: Proposed architecture for similar item recommendation (GNN-GMVO).
timal inference results are achieved using learning rate of 0.1 for the ADAM optimizer, the epoch size of 20 with two-hop message passing. PyTorch Geometric 2.2.0 is used for training and inference. Each epoch takes approximately 30 seconds to finish using a machine with 32GB memory and 10 CPU cores. We train our proposed model with different values of \(\lambda\) in Eq. (3) to find \(\lambda\) that maximizes the objective function. When inferencing, node embeddings are generated by loading the trained model and passing the inference graph as a dataset to encode nodes and generate graph embeddings. The inference dataset includes about 50,000 nodes. The candidate set for each anchor item is ranked based on the weighted cosine similarity of the recommended items and the given anchor item (i.e., Eq.(10)). The results are presented in Table 1. Most of the users at item pages of _Walmart.com_ view at most two sets of four items when checking similar item recommendations. This is why we report @8 metrics.

We conducted ablation study to show the importance of the proposed decoder function in optimizing the objective function. When \(\lambda=0\), the model is equivalent to a traditional GCN model without a GMV optimizer. As can be seen in Table I, using GCN model with custom edges defined in Eq. (8) increases NDCG metric by \(4.2\%\) w.r.t. the benchmark SIRB (when \(\lambda=0\)). By increasing \(\lambda\) in GCN-GMVO, the \(NDCG\) metric decreases for \(\lambda\geq 1\). This is expected since for larger values of \(\lambda\) the loss becomes more focused on optimizing the revenue. In addition, from Table I, we see that increasing \(\lambda\) up to 0.5 increases the \(EGMV@8\) metric, but larger \(\lambda\) has an inverse effect as it biases the loss too much so that items relevance (and ultimately \(EGMV@8\)) becomes small. Setting \(\lambda=0.1\) achieves both high \(NDCG\) and \(EGMV\) scores, which translates to increasing both relevance and expected GMV in our test sets. This proves the efficiency of our modeling framework in optimizing both recommendation relevance and revenue in large-scale e-Commerce settings.

Figure 3 shows the set of recommended items for a grocery anchor item by SIRB and GCN-GMVO. The results show that GCN-GMVO model recommends different set of items compared to the SIRB algorithm. The recommended items could potentially decrease the total number of sales if they are too expensive. However, since GNN-GMVO algorithm controls the trade-off between relevance and revenue, by optimizing the loss function we can improve \(EGMV\) generated by the recommendation set. As can be seen from Figure 2(b), the price of the recommendations for the anchor item are slightly more than the recommendations of SIRB (Figure 2(a)). However, the model shows some degree of price elasticity which results in \(EGMV\) boost without hurting \(NDCG\) metric. This is an example of how the proposed algorithm could positively impact the item recommendation task for large-Scale e-Commerce platforms.
features are used in this experiment. Some parts of the data set are missing. For instance, 65% of the products do not have price data. Because of this, we compute the price average and standard deviation to fill in missing values by sampling from the price distribution. The initial node representations are computed by inputting the item's textual information (including category, description, title, and brand) to the USE encoder [35, 36]. Since the frequency for the items co-view, view-bought, and co-purchase are missing in the dataset, we connect the product pairs in the graph if they are co-viewed even once. In other words, in order to build the graph, \(\theta\) in Eq. (9) is considered to be \(0\) for this experiment.

We train our proposed architecture with different values of \(\lambda\) in Eq. (3). The candidate set for each anchor item is based on the items that are viewed after the anchor item. We rank recall set based on the weighted cosine similarity of the recommended items and the given anchor items using Eq. (10). In order to evaluate the models, we measure and compare their performance on top-4 recommended items based on the total number of transactions for each item.

Traditional GCN and Graph Attention Networks (GAT) are considered as the benchmark models for this experiment. The cross-entropy loss function converges after around 20 epochs when training these models. The total run time with a 32GB memory is approximately 5 minutes. We used the same training configuration of the _Walmart.com_ dataset in this experiment. The results show improvement in GMV without impacting the NDCG scores of the recommendations for some cases of positive \(\lambda\)s. One of the goals of the proposed architecture is to improve revenue, consequently GMV, in the large-scale e-Commerce systems without recommending irrelevant items compared to the anchor item. Both of these goals are measured by comparing \(NDCG\) and \(EGMV\) of the recommendation sets.

As can be seen from Table II-Panel A, when \(\lambda=0\)\(EGMV@4\) and \(NDCG@4\) for GCN are 1.95 and 0.641, respectively. They are 1.94 and 0.644 for GAT model. Setting with \(\lambda=0.8\) generates \(EGMV@4=2.02\) for GCN-GMVO and \(EGMV@4=1.98\) for GAT-GMVO models which yields 3.6% and 1.6% improvements in \(EGMV@4\) w.r.t. GCN and GAT benchmark models. Using GCN and GAT architectures along with GMV optimizer as the decoder function can improve GMV metric without hurting the relevance of the recommendations. However, the results show that the GCN is performing slightly better than GAT model in optimizing revenue in this experiment.

#### Iv-B2 Video Games Category

This dataset contains 84,893 items from video game category. We used the same model con

\begin{table}
\begin{tabular}{||l l l||} \hline \(\lambda\) & GCN-GMVO (\(NDCG@8\), \(EGMV@8\)) & SIRB (\(NDCG@8\), \(EGMV@8\)) \\ \hline \hline
0 & (0.3041, 3.0253) & (0.2918, 2.8848) \\
0.05 & (0.3050, 3.0332) & - \\
0.1 & **(0.3060, 3.0372)** & - \\
0.5 & (0.3054, 3.0194) & - \\
1 & 2.2927, 2.8664) & - \\
2 & (0.2995, 2.9905) & - \\ \hline \end{tabular}
\end{table} TABLE I: NDCG and EGMV scores for GCN-GMVO and SIRB recommendation algorithms for _Walmart.com_ dataset.

Fig. 3: Comparison between items recommended by SIRB and GCN-GMVO
figuration and same set of features as the previous experiment to evaluate the model performance on a bigger item graph. We used the same pre-trained model (i.e., \(USE\)) to generate item text embedding using item categories, description, title, and brand features. Similar to the previous experiment, the results show that our architecture can improve \(EGMV\) generated by the recommendation system. We observe that the GAT model with GMVO component outperforms GCN model in optimizing the revenue.

The results (Table II-Panel B) show that the GAT-GMVO model has the highest \(EGMV\) when \(\lambda=0.05\). This shows that the optimal trade-off between relevance and revenue happen when we consider lower weights for the nodes' price. However, we see optimal \(EGMV\) for the GCN-GMVO model when \(\lambda=2\). As can be seen from the table, \(EGMV\) is improved by 1.3% for the GAT-GMVO. This improvement in the \(EGMV\) has no negative impact on the NDCG of the recommendations. We also see that \(EGMV\) is improved by 1.8% under GAT-GMVO model.

## V Conclusion

In this paper, we propose Graph Neural Network-Gross Merchandise Value Optimizer (GNN-GMVO) architecture to optimize GMV while considering complex item-item relations for similar item recommendation task. We develop a new decoder to adjust the generated loss function to become more sensitive to the price of the recommended items. We define a new edge construction framework in the item graph to identify similarity relations between items and remove noise caused by other types of relations in the item space. We propose a step-by step framework to (i) query input feature data, (ii) construct the graph, (iii) train the model, and (iv) use it for inference and ranking tasks. We conduct extensive experiments to train the model and find the optimal weights to trade off GMV and relevance. The results show that the proposed model improves the expected GMV on three real datasets without hurting the NDCG scores of the recommendations. This may prove the usefulness of the proposed approach in further optimizing the GMV in some industrial recommendation settings. In future work, one may add more features such as items' features (price, product type, product category, etc.) and image embedding data to the textual embedding data to enrich the initial embedding inputs of the model and test if this makes the modeling framework more robust. Finally, feeding generated node embeddings by GNN-GMVO architecture to other expert models like wide & deep(W&D) [41], prospectnet [20], DeepFM [42], and xDeepFM [43] can be tested and examine if this further optimizes the model.
