Item Listing Optimization for E-commerce Websites based on Diversity

For e-commerce websites, deciding the manner in which items are listed on webpages is an important issue because it can dramatically affect item sales. One of the simplest strategies of listing items to improve the overall sales is to do so in a descending order of sales or sales numbers. However, in lists generated using this strategy, items with high similarity are often placed consecutively. In other words, the generated item list might be biased toward a specific preference. Therefore, this study employs penalties for items with high similarity being placed next to each other in the list and transforms the item listing problem to a quadratic assignment problem (QAP). The QAP is well-known as an NP-hard problem that cannot be solved in polynomial time. To solve the QAP, we employ quantum annealing (QA), which exploits the quantum tunneling effect to efficiently solve an optimization problem. In addition, we propose a problem decomposition method based on the structure of the item listing problem because the quantum annealer we use (i.e., D-Wave 2000Q) has a limited number of quantum bits. Our experimental results indicate that we can create an item list that considers both sales and diversity. In addition, we observe that using the problem decomposition method based on a problem structure can lead to a better solution with the quantum annealer in comparison with the existing problem decomposition method.


Introduction
Several companies have recently started operating e-commerce websites to sell their items and services to the public considering the widespread use of the internet. For these companies, deciding on the order in which items are listed on their website's pages is important because this ordering has the potential to dramatically affect the sales of their items or services. Figure 1 shows a snapshot of a hotel reservation website. This is an example of the items being listed on an e-commerce page. On this website, hotels at different locations are listed in the order of popularity from top to bottom. These sorted items for display on webpages are collectively referred to as an item list.
To improve sales on e-commerce websites, placing items in the descending order of sales or sales numbers is a simple strategy for determining the list order of items [19]. In addition, the sales of an item can be estimated when it is placed at different positions in the item list and the position of each product is determined to maximize the total sales estimate. In particular, if s ij is the estimated sales of an item i ∈ I when it is placed in a position j ∈ J, then the total sales for all items can be maximized by solving the following integer programming problem [32]: (1) where x ij is a binary variable that indicates whether or not to assign item i to position j. The abovementioned constraints ensure that only one item is allocated to each position, and only one position is allocated to each item. In this study, is referred to as the sales term for x = (x 11 , x 12 , · · · ). This problem can be interpreted as a network flow problem, and there exists an efficient technique to solve such a problem in polynomial time. Furthermore, the solution obtained by solving this network flow problem with x ij ∈ [0, 1] coincides with the solution of the abovementioned integer programming problem [30].
However, in the case of the list of items generated using such a strategy, the relationship between the different objects is ignored because the sales of each item s ij are considered independently. For example, let us assume that customers visit an e-commerce website and browse the page of a particular item group. If the relationships among different items are not considered while placing items in an item list, several items with high similarities can possibly be placed close to each other, thereby reducing the value of the item list for customers in terms of item diversity. Considering this, several attempts have been made to include item diversity in item recommendation lists for users to ensure that they find the recommendation lists useful [2,4]. In these previous studies, the measures of diversity in the item recommendation lists for customers were improved by solving the maximum matching problem of the bipartite graph obtained after Top-N recommendation.
The present study includes diversity in the item list targeting the entire user base using a proposed method of generating an item list by imposing penalties when items with a high similarity are placed at adjacent locations. Thus, considering both sales and diversity, the item list generation problem can be formulated as a quadratic assignment problem (QAP) as detailed below.
We employ quantum annealing (QA) herein to solve the QAP [16]. An optimization problem formulated with discrete variables can be efficiently solved using the Ising model or a quadratic unconstrained binary optimization problem (QUBO) because of the introduction of the quantum tunneling effect by QA. Currently, the protocol of QA is artificially realized in an actual quantum device known as a quantum annealer [6,9,12,15]. The quantum annealer has been tested for numerous applications, including portfolio optimization [28], protein folding simulation [27], molecular similarity problem [14], computational biology [18], job-shop scheduling [31], traffic optimization [21], election forecasting [13], machine learning [10,17,22], and for automated guided vehicles in plants [23]. In addition, several other studies have been conducted to efficiently solve various problems using the quantum annealer [5,[24][25][26]29].
In particular, our problem can be solved using the quantum annealer by formulating our QAP as a QUBO. However, a QUBO for such a large number of items cannot be directly solved in one instance with the current state-of-the-art quantum annealer, namely D-Wave 2000Q, because the D-Wave 2000Q employs the chimera graph. The physical qubits available on D-Wave 2000Q are less than 2048 because the qubits might have defects. In addition, the connection between the physical qubits is sparse and limited on the chimera graph. Thus, several embedding techniques have been proposed; however, the number of logical qubits available to represent the optimization problems to be solved is drastically reduced [8].
To address this issue, a heuristic method has been proposed to solve a large-sized problem using a limited number of hardware bits. D-Wave Systems, which is the manufacturer of D-Wave 2000Q, has developed an open-source software qbsolv [7] that solves a large-sized problem by dividing it into small subproblems. However, the decomposed QAP might not necessarily lead to feasible solutions because qbsolv selects the subset of variables in the order of the energy impact of each variable for division of a problem. Furthermore, in the literature [26], the division of an original problem into subproblems based on its structure is a promising method to efficiently solve large-sized problems using D-Wave 2000Q. Considering this, we propose herein a method of obtaining better objective values for the QAP problem compared to those of the existing method [7] in the same calculation time by decomposing the problem based on the set of items and positions that they can be assigned to in an item list. In addition, we assess the performance of the proposed method using the actual access log of a hotel reservation website.
The primary contributions of our study are summarized as follows: • We propose a method of creating item lists on an e-commerce website as a QAP considering the sales and diversity of the items.
• We convert the QAP to the QUBO to solve the abovementioned problem with D-wave 2000Q.
• We propose a decomposition technique exploiting the structure of the item list.

Formulating the Item Listing Optimization Problem as a QAP
We introduce the diversity term in our proposed model to add diversity in the item list. We particularly calculate the similarity f ii for pairs of items i, i ∈ I to introduce diversity in the item list. The diversity of the item list (i.e., the diversity term) is defined as the negative value of the summation of the items' similarity degree f ii for overall adjacent items: where d jj is the adjacent flag of the position j and j ; d jj = 1 is for the adjacent positions; and d jj = 0 is for the non-adjacent positions. The value of function D(x) decreases because the high-similarity items are adjacent. We solve a multi-objective optimization problem based on two values: the sales of individual products S(x) and diversity of the item list D(x). Let w be a parameter used to determine the penalty for listing items with high similarity. This problem is formulated as follows: Two methods for calculating the similarity f ii are introduced: explicit and implicit expressions. In the explicit expression, semantic features, such as product category and average price, can be quantified using the distances between the feature vectors that can be calculated. The smaller the feature distance, the higher the similarity f ii between the items. In the implicit expression, the higher the co-browsing number of an item (i.e., the number of times that the items were viewed in the same session by the same user on the website), the higher the similarity f ii . The advantage of the first approach is that the interpretation of the result is straightforward; nevertheless, it suffers from a disadvantage in that appropriate semantic features must be created and quantified. In contrast, the advantage of the second approach is that it involves easy calculations and can consider various information reflecting customer behavior; however, its disadvantage is that semantic interpretation might be difficult. Nevertheless, we employed herein the latter method of counting the co-browsing number to calculate similarity f ii . Section 3.1 describes the detailed calculation for this. As previously specified, the optimization problem (2) is a QAP.
The QAP is well-known as an NP-hard problem that cannot be solved in polynomial time [1,3].

Formulating the Item Listing Optimization Problem as a QUBO
We utilize QA to solve our optimization problem. The optimization problem must be expressed in the form of a QUBO to use QA as a solver. QUBO is given as follows [20]: where Q ∈ R N ×N . Thus, our optimization problem can be transformed into a QUBO by employing a penalty function for violating constraints and adding this penalty function to the objective function: where M is a parameter used to prevent the violation of the constraint conditions. This is ensured by setting an appropriate value for M . In theory, M should take an extremely large value. However, we cannot set M to such a large value because of the limitations of the current version of the quantum annealer used (i.e., D-Wave 2000Q). Thus, for simplicity, we present M to the size of the largest element of the absolute value of Q in (3).

Decomposition Methods for Item Listing Problems
qbsolv is a software tool released by D-Wave Systems that enables solving a QUBO larger than one that can be processed using D-Wave 2000Q [11]. qbsolv is essentially a decomposing solver that divides a large problem into smaller parts, which can then be solved by D-Wave 2000Q. Thus, when a large QUBO is inputted, qbsolv divides the problem and sends each part of the problem independently to D-Wave 2000Q for calculation to obtain partial solutions. This process is repeated by selecting different parts of the problem using the tabu search until solution improvement stops. See [7] for the detailed algorithm of qbsolv. Furthermore, qbsolv selects the subset of variables in the order of the energy impact of each variable for division of a problem. However, in some cases, no feasible solution can be obtained when the target variables are extracted, regardless of the structure of the original problem. Therefore, we focus herein on the structure of the assignment problem and propose a method to extract problems with feasible solutions. Particularly in the case of an assignment problem, one condition involves each item being necessarily assigned to one position and another condition, in which each position is necessarily assigned to one item. Therefore, while dividing the problem, we have to select variables with candidate combinations of items and positions that are already assigned. Figure 2 shows an example of the decomposition. This procedure involves N 2 org C N 2 sub candidates for variable combinations in the selection of the subproblems; however, the number of solution candidates can be reduced to Norg C N sub exploiting the structure of the item list.
In practice, it is most important to determine the order in which items are listed in the upper positions of the item list because they are the items that are browsed most often. Therefore, it is effective to solve the entire list as an integer programming problem as in Problem (1) first, then only resolve the particularly important upper positions of the list using the QAP (2).

Experimental Setup
For our experiments, we used the actual access log data of the online hotel reservation site Jalan 1 . On this e-commerce website, a hotel list is created daily based on each area in Japan and the number of guests, including adults and children, that the hotels can accommodate in their rooms. The access log includes the date and the time the customer accessed the item list screen, position of each item when the item list screen was accessed, and information on the hotel at which the customer made a reservation. We estimated the sales s ij and similarity f ii for the top 10 accessed areas on the hotel reservation website using the access log for the past six months. Various methods can be considered for estimating s ij . The similarity f ii was estimated using the log of the co-browsed items in the same session of the customer. Furthermore, s ij and f ii were normalized such that their average was 0, and the standard deviation was 1 for each item list.
We conducted two experiments in this study: • evaluating the effect of the diversity term: comparison of solutions when the diversity control parameter is changed for the QAP (2); • performance evaluation of problem decomposition: comparison of the objective values when the structure of the item list is considered for the qbsolv problem decomposition.
As previously specified, we used D-Wave 2000Q (DW 2000Q VFYC 2) for our experiments. Coupler strengths mapping logical to physical couplers with two physical couplers connecting each pair of logical qubits were set as 3.0. Table 1 lists the values set for the parameters of D-Wave 2000Q and qbsolv. num read, annealing time, and repeats represent the number of requests for problems, time per annealing, and number of times the main loop of the algorithm is repeated with no change in the optimal value before stopping, respectively. [7,11]  Parameter Value num reads [11] 1000 annealing time [11] 20 [µs] auto scale [11] True postprocess [11] optimization num spin reversal transforms [11] 4 timeout [7] 20 [s] repeats [7] 5 subproblemSize [7] 64

Effect of the Diversity Term
D-Wave 2000Q has less than 2048 qubits because the qubits typically have defects. In addition, as previously specified, the connection between the physical qubits is sparse and limited on the chimera graph, in which D-Wave 2000Q has been based on. Thus, we can consider the problem with eight items per subproblem because complete graph embedding can be applied to arbitrary problem graphs with less than 64 logical variables. Therefore, we first compare the sales term S(x) and the diversity term D(x) obtained by solving the QAP (2) by changing the diversity control parameter w in the problem when the number of items is 6 and 8. The obtained solution will be the same as that obtained via solving (1) if w is 0. In Figures 3 and 4, the horizontal axes represent the value of w in (2); the right hand side in the figures indicates that the larger the similarity between the similar items listed together, the larger the penalty. In addition, the vertical axes in Figures 3 and 4 Figure 3a shows that the average of the sales term S(x) is higher than 0 for any w. In addition, S(x) gradually decreases as w increases. In other words, a trade-off relationship exists between increasing the sales term S(x) and ensuring that similar items are not placed adjacent to each other in the item list. Furthermore, the decrease in the sales term value slows down as w increases.   Figure 4a shows that when diversity is not considered for item listing, the diversity term D(x) is lower than the average value of 0 and increases with the increasing w. Furthermore, the increase in the diversity term D(x) gradually slows down as w increases. Note that the behavior of S(x) and D(x) based on w is the same whether or not the number of items is 6 or 8. Figure 5 shows the positional relationships between the top eight hotels and their type in area X of Figures 3b and 4b. The top eight hotels in area X particularly include four city hotels and four budget hotels, which can also be classified as in the north or south region of area X; hence, it was chosen as an example. Figure 5: Locations and type of a particular area's hotels. Figure 6 represents the actual hotel lists in area X obtained by solving (2) for different values of w. The top five hotels in the northern area are consecutively listed when w is 0. The city hotels are listed in succession among the top four; thus, the list is biased. In contrast, only the top two hotels are the same in terms of both area and hotel type when w is between 0.1 and 0.6, that is, when diversity is considered. Furthermore, no similarity exists between the consecutively listed hotels both in terms of area and hotel type when w is larger than 0.7. Thus, despite not using semantic information (e.g., area and hotel type) in the actual calculations, a semantically diverse item list was created using the number of co-browsers as the similarity measure. Figure 6: A particular area's item lists when the diversity control parameter w is between 0 and 1.

Performance Evaluation of Problem Decomposition
We compared the method of extracting partial problems by qbsolv and our method of extracting partial problems considering the problem structure of the item list. Our experiments were performed by comparing the objective values of (4) when solving the problem of 12, 16, 20 and 24 items using each method. Table 2 lists the average of the objective values for the 10 areas obtained by solving the problem for different numbers of items and the gap between the objective values of the proposed and original qbsolv methods. The objective of the problem was to minimize the objective value, indicating that the smaller the objective value, the better the performance. The gap between the objective values of the proposed and original qbsolv methods increased as the number of items increased. The effectiveness of the proposed method also increased. We conducted a Wilcoxon signed-rank test on the difference between the objective values of the original qbsolv and proposed methods (Bonferroni correction was performed on the number of items). Consequently, the null hypothesis in this case was rejected at a significance level of 5% (p-value = 0.020). In terms of application, our proposed method is not only limited to the item list optimization problem, but can also be widely applied to other problems involving similar constraints, such as the assignment problem (1). For example, our method can be applied to the traveling salesman problem, which typically includes two constants A, B along with the following penalty terms:

Conclusion
This study proposed a method of creating item lists on an e-commerce website as a QAP considering item sales and diversity. We converted the QAP to a QUBO such that it can be directly solved by the quantum annealer, D-Wave 2000Q. Direct manipulation to solve the resulting QUBO was not possible in the case with a large number of items because of the limited number of qubits available in the current version of the quantum annealer and the restriction on specifying connections between the qubits. Therefore, we proposed a decomposition technique exploiting the structure of the problem. The original large problem was divided into several subproblems, which can eventually be solved by D-Wave 2000Q individually. Our experiments using actual real-world data demonstrated the efficiency of our proposed approach. A remarkable observation made from the experimental results was that the output item list changed based on the diversity control parameter. Our formulation led to the antiferromagnetic Ising model with a random field. The resulting lists were "aligned" along the random field when the diversity control parameter was small. In contrast, increasing the diversity control parameter eliminated the order in the item list and introduced diversity. However, note that our research has some limitations. The item list created by our method will not work well when there are insufficient data to calculate the sales s ij and similarity f ii ; because of which, no reliable estimate values existed. Having access logs when items were placed at various positions was important in obtaining good estimate values for s ij and f ii . The determination of the diversity consideration parameter w was also a limitation. w depends on the scale of diversity a customer of an e-commerce service wants; thus, it should be adjusted by changing w and monitoring performance, which is cumbersome to implementation in real-world scenarios.
As the number of qubits available in the quantum annealer increases in the future, our method for division of a large-sized problem into smaller subproblems will become more useful. Our experiments clearly showed that our method performed better than qbsolv when the size of the problems became large. The structure of our problem is similar to the traveling salesman problem and the scheduling problem in that it takes the form of a QUBO with two quadratic functions based on two constraints (i.e., one for distance or time and the other for list locations or tasks).
Thus, our method has a wide range of applications involving optimization problems that can be solved via QUBO formulation, such as those using the QA, D-Wave 2000Q, and other types of QUBO solvers. Our results indicate that not only the evolution of hardware devices, but also the development of better software based on the structure of problems are essential for future QA applications.