---
title: "Modeling Multi-Purpose Sessions for Next-Item Recommendations via Mixture-Channel Purpose Routing Networks"
authors:
  - "Shoujin Wang"
  - "Liang Hu"
  - "Yan Wang"
  - "Quan Z. Sheng"
  - "Mehmet Orgun"
  - "Longbing Cao"
doi: "10.24963/ijcai.2019/523"
url: "https://ijcai.org/proceedings/2019/523"
pdf: "https://ijcai.org/proceedings/2019/0523.pdf"
venue: "Proceedings of the Twenty-Eighth International Joint Conference on Artificial Intelligence"
year: 2019
pages: "3771-3777"
track: "Main track"
keywords:
  - "Machine Learning: Recommender Systems"
  - "Uncertainty in AI: Sequential Decision Making"
  - "Knowledge Representation and Reasoning: Preference Modelling and Preference-Based Reasoning"
  - "Humans and AI: Personalization and User Modeling"
---

# Modeling Multi-Purpose Sessions for Next-Item Recommendations via Mixture-Channel Purpose Routing Networks

Shoujin Wang, Liang Hu, Yan Wang, Quan Z. Sheng, Mehmet Orgun, Longbing Cao

*Proceedings of the Twenty-Eighth International Joint Conference on Artificial Intelligence*, pages 3771-3777. DOI: [10.24963/ijcai.2019/523](https://doi.org/10.24963/ijcai.2019/523)

## Abstract

A session-based recommender system (SBRS) suggests the next item by modeling the dependencies between items in a session. Most of existing SBRSs assume the items inside a session are associated with one (implicit) purpose. However, this may not always be true in reality, and a session may often consist of multiple subsets of items for different purposes (e.g., breakfast and decoration). Specifically, items (e.g., bread and milk) in a subsethave strong purpose-specific dependencies whereas items (e.g., bread and vase) from different subsets have much weaker or even no dependencies due to the difference of purposes. Therefore, we propose a mixture-channel model to accommodate the multi-purpose item subsets for more precisely representing a session. Filling gaps in existing SBRSs, this model recommends more diverse items to satisfy different purposes. Accordingly, we design effective mixture-channel purpose routing networks (MCPRN) with a purpose routing network to detect the purposes of each item and assign it into the corresponding channels. Moreover, a purpose specific recurrent network is devised to model the dependencies between items within each channel for a specific purpose. The experimental results show the superiority of MCPRN over the state-of-the-art methods in terms of both recommendation accuracy and diversity.

## Full text

## 1 Introduction

In real world, user requirements keep changing when the corresponding contexts evolve. This context-sensitive demand nature inspires the recent interest on session-based recommender systems (SBRSs) [Wang et al., 2019], which tackle the gaps in the conventional static recommender systems (RSs) that only recommend homogeneous items without considering the demand dynamics across sessions. Accordingly, an SBRS recommends the next item for a session (as a context) to a user who may be interested in by modeling the dependencies between items in the session [Hidasi et al., 2018].

Most of existing SBRSs (e.g., [Twardowski, 2016; Wang et al., 2017; 2018]) make recommendations by forming a session with a single purpose or goal (e.g, shopping for food and beverage products in basket analysis). This often violates the reality that a session may involve multiple types of items where each type corresponds to one purpose. Taking the session illustrated by Row 1 in Figure 1 as an example, Janet first placed bacon into a cart for breakfast while she then was attracted by a piece of lovely rose for decoration and added it into the cart. She further chose eggs and bread for breakfast and a vase for fitting the rose. Finally, she ended this shopping session by picking up a bottle of milk. For this example, existing SBRSs would take a single-channel modeling approach to implicitly associate the items purchased in the session as a homogeneous item sequence, as shown in Row 2 in Figure 1. Obviously, such an approach fails to differentiate the purpose-specific item dependencies (e.g., items for breakfast vs. items for decoration) when the items in a session serve multiple purposes.

Figure 1: An example of two different approaches of SBRSs to model a multi-purpose session, where dashed squares with different colours indicate different purposes and thicker arrow lines show stronger dependencies between items.

![Image](https://ijcai.org/proceedings/2019/fulltext/523/image_000000_4646678fd40b32936f7418209b08d9f604e44ce03228ebe508cd36df747d861b.png)

The above example reveals significant gaps in two representative types of state-of-the-art SBRSs, namely the singlechannel recurrent neural networks (RNN) based SBRSs and attention-based SBRSs. RNN-based models [Hidasi et al., 2018; Quadrana et al., 2017] assume a rigid sequential dependency over any successive items within a session and hence:

(Gap 1) it is easy to generate false dependencies as not all items depend on each other in a multi-purpose session. In addition, due to the memory decay along with the time steps, those contextual items far from the target item will be overwhelmed by the near ones, as a result, (Gap 2) an RNN-based SBRS tends to recommend items biased to the most recent purpose indicated by the nearest items. To reduce the interference of irrelevant items, an attention mechanism has been recently incorporated into shallow networks [Wang et al., 2018], RNN [Li and et al., 2017] or memory networks [Chen et al., 2018] to build SBRSs. The attention model tends to assign salient weights on a very few significant items [Hu et al., 2018], which makes the purpose of a session dominated by these few items. Consequently, (Gap 3) an attention-based SBRS tends to recommend items to satisfy the dominant purpose while disadvantages others.

This paper addresses the above three gaps by proposing mixture-channel purpose routing networks (MCPRN). MCPRN first automatically detects the possible multiple purposes in a session with a purpose routing network (PRN), and then models a session with a mixture-channel recurrent networks (MCRN) where each channel (i.e., a purpose-specific recurrent network (PSRN) built on purpose-specific recurrent units (PSRUs) models the dependencies between items for a specific purpose to build a purpose-specific embedding. Finally, a multi-purpose context (session) embedding is built by integrating all the channels to rank the candidate items for diverse purpose-sensitive recommendations.

Thanks to the PRN and MCRN, the different purposes in a session are detected and then their item dependencies are respectively modeled in different channels. As a result, the item dependencies are modeled over specific purposes instead of a coarse one, which enables our model to more concentratedly capture purpose-driven user behavior. Consequently, MCPRN leverages the current single-purpose SBRSs with a more effective and robust mechanism to represent multipurpose sessions. By retaining and modeling the multiple purposes in a session, MCPRN can recommend diverse items satisfying different purposes, while existing methods tend to recommend items for a single purpose only, as shown in Row 3 and Row 2 in Figure 1 respectively. The main contributions of this work are summarized below:

- We propose multi-purpose modeling to capture user behavior in a session in a more reasonable way to fit real cases. Accordingly, mixture-channel purpose routing networks (MCPRN) are proposed to achieve this.
- In the MCPRN, the purpose routing network (PRN) is devised to infer the purposes of each item and route them into specific channels. Moreover, the purpose-specific recurrent unit (PSRU) is the key component to serve as the basic cells of the mixture-channel recurrent networks (MCRNs) w.r.t. each channel.

## 2 RelatedWork

A variety of SBRSs including rule/pattern-based RSs [Yap et al., 2012], neighbourhood-based RSs [Jannach and Ludewig, 2017], Markov chain-based RSs [Feng and et al., 2015] and factorization machine-based RSs [Rendle et al., 2010] have been developed. We briefly review two representative stateof-the-art SBRSs: (1) RNN-based SBRSs, and (2) attentionbased SBRSs, which are the most relevant ones to our work.

Due to its strength in handling sequential data, RNN is an intuitive choice to capture the complex intra-session dependency in SBRSs. The first RNN-based SBRS, GRU4Rec [Hidasi et al., 2016], employed gated recurrent unit (GRU) to capture the long-term dependency within sessions. Later, the performance of GRU4Rec was improved significantly by introducing novel ranking loss functions tailored to RNNs in the recommendation setting [Hidasi et al., 2018]. RNN is easy to generate false dependencies due to the employed rigid order assumption which assumes any adjacent items in a session are highly sequentially dependent. However, this may not be true in most real cases. In addition, RNN usually biases to recent items while missing much information of previous items in a session because of memory decay.

The attention mechanism [Vaswani et al., 2017] has been employed to build more robust SBRSs by intensifying those relevant and important items in a session context. [Li and et al., 2017] proposed the Neural Attentive Recommendation Machine (NARM), in which a hybrid encoder with an attention mechanism is employed to model the user's sequential behavior and the user's main purpose in the current session by differentiating more and less important items. [Wang et al., 2018] designed an attention-based transaction embedding model (ATEM) to build an attentive context embedding over the session context without order assumption. Further, the attention mechanism was used in a memory-augmented neural network for selectively reading out the external memory matrix for next item recommendations [Chen et al., 2018]. However, the attention mechanism attempts to assign larger weights on few significant items while downplaying others, leading to bias to the main purpose indicated by those few items. As a result, attention-based SBRSs often only cater for the main purpose while ignoring others in a session.

In summary, all the aforementioned SBRSs are single channel-based, which are effective for one-purpose sessions in which all items within a session are dependent on each other. However, they cannot handle sessions with different types of items for multiple purposes well. Inspired by the great potential of mixture models in handling multiple kinds of relations [Shazeer et al., 2017; Kang et al., 2018], we devise a mixture-channel model for multi-purpose sessions.

## 3 Problem Statement

Given a session set S = {s1, ..., s|S|}, each session s = {v1, ..., v|s|}(s ∈ S) consists of a sequence of items that are interacted (e.g., clicked or purchased) sequentially by an anonymous user in one transaction event. Here |S| denotes the number of sessions in S and the subscripts in s indicate the order of item occurrence. All the items occurring in all sessions constitute the universal item set V = {v1, ..., v|V |}. For a target item vt ∈ s, all the items that occurred prior to vt in s together form the session context (called context for short) of vt over s, represented as Cvt = {v1, ..., vt-1}. Each item in Cvt is called a contextual item.

Given a context C with precedent t - 1 items, an SBRS

Figure 2: (a) The MCPRN model consists of two main modules: Purpose Router and Mixture-Channel Recurrent Networks; (b) The PSRU cell introduces a concentration gate (see the blue dash line square) to model purpose-specific transitions.

![Image](https://ijcai.org/proceedings/2019/fulltext/523/image_000001_03d4fac235819702ed6f593923ce5cab1858e842e310fcaf38aa6c9a2ac5d3b3.png)

is built to recommend the tth item. Accordingly, MCPRN is trained as a probabilistic classifier model that learns to predict a conditional probability distribution P(vt|C). Once all the parameters of the model are learned, the MCPRN is able to recommend the next item by ranking all the candidate items in terms of their conditional probability over the given context.

## 4 Mixture-Channel Purpose Routing Networks

The architecture of MCPRN is illustrated in Figure 2 (a). MCPRN mainly consists of two modules: (1) Purpose Router, and (2) Mixture-Channel Recurrent Networks (MCRNs). The purpose router is employed to route each item to a channel of a specific purpose. Specially, we adopt a soft routing strategy to assign each item embedding to all channels with different purpose weights, so-called mixture channel networks. The soft routing strategy enables to conduct any gradient-based optimization for easing learning. In MCRNs, each channel is equipped with a PSRN built on PSRUs to model the dependencies between items for a specific purpose. The final hidden states ht-1 from different channels are selectively integrated as a multi-purpose context embedding vC. The embedding of target item vt conditional on vC is used to calculate the probability of selection as the next item. Next, we present more technical details of these components.

## 4.1 Purpose Router

Given all the items in a session context, a purpose routing network (PRN) is employed in Purpose Router to extract the purposes of selecting an item vi without any human prior knowledge. First, we map each item v into a K-dimensional embedding vector v ∈We, whereWe ∈ RK×|V | is the embedding matrix of all items. Then, we input the embedding vi of item vi into the PRN to identify the purposes of selecting vi. Wp ∈ RK×m denotes the purpose filtering parameter of all purposes, where m is the number of possible purposes (i.e., the number of channels) and it can be determined by cross-validation. Then, the concentration score ai,j of item vi w.r.t. the j th purpose pj is computed as follows:

<!-- formula-not-decoded -->

where Wp[:, j] denotes the j th column of Wp. Further, the normalized concentration weight w.r.t. pj can be obtained in terms of the following softmax function:

<!-- formula-not-decoded -->

where τ is a temperature parameter to tune. For high temperatures (τ → ∞), all purposes have nearly the same probability. For a low temperature (τ → 0+), it tends to concentrate on a single purpose (nearly a hard routing). In experiments, we use τ = 0.1 which can produce the best performance.

## 4.2 Mixture-Channel Recurrent Networks

Then, the item embedding and its purpose concentration weight are input into each channel of MCRN as shown by the green and purple arrow lines respectively in Figure 2 (a). Each channel is modeled by a PSRN composed of t-1 PSRU cells to model the purpose-specific sequential dependency over a sequence of t - 1 items. The working mechanism of each channel is similar to a normal RNN whereas the cells are equipped with our designed PSRU cells in PSRNs. The PSRU cells in one channel are identical while cells in different channels share an identical structure but different parameters. We present PSRU in detail in the following subsection.

## Purpose-Specific Recurrent Units

RNN cells like long short-term memory (LSTM) or GRU do not consider the degree of membership of items in a sequence. In MCRNs, each channel contains all items in a session but their purpose concentration weights, i.e. the degree of membership, on this purpose are different. Hence, LSTM and GRU are not ready for modeling such purpose-specific dependencies in a channel given the concentration weights.

As a result, we designed the purpose-specific recurrent unit (PSRU) to serve as the cell for each PSRN. Different from GRU or its variants, which usually compute a gate value by only using the current input and the last hidden state without any additional information, PSRU introduces a concentration gate to selectively integrate the item information in the transitions w.r.t. a specific purpose.

The structure of a PSRU cell is given in Figure 2 (b). Compared to the traditional GRU cell, an additional gate, namely concentration gate (see the blue dash line square), is added to decide to what extent the current state should be involved into the purpose-specific transitions according to the purpose concentration weight gi,j. The PSRU cell at the ith time step in channel cj takes the last hidden state hi-1, the embedding of the current item vi and the concentration weight gi (here subscript j is omitted from gi when the channel cj is given) of vi as the input, and outputs the candidate hidden state ˜hi of current time step. More specifically, the candidate hidden state ˜hi can be computed as follows, with the reset gate vector ri and the update gate vector zi:

<!-- formula-not-decoded -->

<!-- formula-not-decoded -->

<!-- formula-not-decoded -->

where σs and σt are activation functions and are specified as sigmoid and tanh respectively. Further, we obtain the concentration gate vector ui as below:

<!-- formula-not-decoded -->

where the Delta function δc = 1 if gi ≥ ϵ and 0 otherwise. ϵ is a threshold parameter to eliminate noisy items in modeling the transitions of a session. That is, it will bypass the item with a small concentration weight less than ϵ. We empirically set ϵ = 0.01 in our experiment.

As a result, the hidden state of current step, hi, can be determined by ui in terms of previous state hi-1 and current candidate state ˜hi:

<!-- formula-not-decoded -->

For example, if item vi majorly concentrate on a single purpose p1, i.e., gi,1 ≈ 1 while gi,j ≈ 0 (j ̸= 1). Due to gi,j &lt; ϵ for (j ̸= 1), item vi will be ignored in the transitions for all other channels except Channel 1, i.e. hi = hi-1.

## 4.3 The Probability of Selection

Once the session context C has been input into MCPRN, the final hidden states ht-1 of all m channels are integrated together to build a multi-purpose context embedding vC:

<!-- formula-not-decoded -->

where ˆ gt,j is the concentration weight of target item ˆ vt w.r.t. purpose pj. ˆ gt,j weights target purpose to construct the context embedding vC that probably output the target item ˆ vt .

Then, we feed the context embedding vC together with the embedding of the candidate item into the output layer for the target item prediction. Specifically, a score that quantifies the relevance of the target item ˆ vt w.r.t. the given context C is computed using the inner product to capture the interaction between them.

<!-- formula-not-decoded -->

## Algorithm 1 MCPRN parameter learning procedure

- 1: B ←Get mini-batch from all context-target item pairs
- 2: N ← Sampling n negative items, St , for each target item vt ∈ B
- 3: Compute mini-batch loss using Eq. 11: LB ← 1 |B| ∑&lt;s,S-&gt;∈&lt;B,N&gt; L(s+, S-)
- 4: Update parameters: Θ←Θ-ΓAdam(∇ΘLB)

Finally, the conditional probability q(ˆ vt|C;Θ) to select the item ˆ vt is obtained in terms of the score δt(C):

<!-- formula-not-decoded -->

where Θ is the set of model parameters that need to be learned over all sessions.

## 4.4 Optimization and Training

We train our model by using a mini-batch gradient descent on the cross-entropy loss. Given the conditional probability q of selection, the loss function is:

<!-- formula-not-decoded -->

Given a session context C, we build a contrastive pair by taking the true next item vt as the positive sample s+ and then randomly sample n items from the item set I \ vt as the negative sample set S-. The loss from the positive sample and each negative sample are log(qs) and log(1 - qs) respectively. They together form the loss of a contrastive pair 〈s+, S-〉. The model parameters Θ are learned by minimizing L(s+, S-). Specifically, negative sampling [Goldberg and Levy, 2014] is employed for efficient training.

Our model is implemented using Tensorflow. Due to the limited space, only a brief scheme of the learning procedure on a mini-batch is listed in Algorithm 1, where ΓAdam denotes Adam [Kingma and Ba, 2015]-based gradient descent optimizer and the batch size is set to 50.

## 5 Experiments and Evaluation

## 5.1 Data Preparation

Three real-world transaction datasets are used for experiments: (1) Yoochoose-buys 1 released by RecSys Challenge 2015, which records the purchased items in each session on Yoochoose.com; (2) Tmall 2 released by IJCAI-15 competition, which records the purchased items in each transaction on Tmall online shopping platform; and (3) Tafeng 3 released on Kaggle, which contains the transaction data of a Chinese grocery store.

First, a set of sessions is extracted from each original dataset by putting all items in one transaction together to form a session. Those sessions containing less than three items are removed since at least two items should be used as the context to form a multi-purpose session context and one as the target item. Second, we do three training-test splits on the session set by randomly selecting 20%, 30%, 40% of the sessions from the last 30 days respectively for testing. Our method achieved similar performance on all the three splits and stably outperformed all the baselines and thus only the results from the 30% split is shown. Finally, to build the trainingtest instances of format 〈C, vt〉, for one session s, each time one item from the third to the last item in s is picked up as the target item vt and all those items before vt constitute its corresponding context C. Subsequently, for a session s containing |s| (|s| ≥ 3) items, |s| - 2 instances are built in total. The characteristics of experimental datasets are shown in Table 2.

1 https://2015.recsyschallenge.com/challenge.html

2 https://tianchi.aliyun.com/dataset/dataDetail?dataId=42

3 https://www.kaggle.com/chiranjivdas09/ta-feng-grocerydataset

Table 1: Recommendation accuracy on three datasets

|                 |   Yoochoose-buy - MRR@5 |   Yoochoose-buy - MRR@20 |   Yoochoose-buy - nDCG@5 |   Yoochoose-buy - nDCG@20 |   Tmall - MRR@5 |   Tmall - MRR@20 |   Tmall - nDCG@5 |   Tmall - nDCG@20 |   Tafeng - MRR@5 |   Tafeng - MRR@20 |   Tafeng - nDCG@5 |   Tafeng - nDCG@20 |
|-----------------|-------------------------|--------------------------|--------------------------|---------------------------|-----------------|------------------|------------------|-------------------|------------------|-------------------|-------------------|--------------------|
| iGRU4Rec-BPR    |                  0.1150 |                   0.1271 |                   0.1314 |                    0.1662 |          0.1849 |           0.1920 |           0.1994 |            0.2198 |           0.0101 |            0.0124 |            0.0135 |             0.0214 |
| iGRU4Rec-CE     |                  0.1538 |                   0.1715 |                   0.1776 |                    0.2268 |          0.2247 |           0.2318 |           0.2424 |            0.2623 |           0.0145 |            0.0188 |            0.0185 |             0.0308 |
| NARM            |                  0.1514 |                   0.1734 |                   0.1768 |                    0.2387 |          0.4213 |           0.4246 |           0.4532 |            0.4618 |           0.0754 |            0.0862 |            0.0882 |             0.1198 |
| MANN            |                  0.1653 |                   0.1893 |                   0.1986 |                    0.2655 |          0.4166 |           0.4227 |           0.4520 |            0.4610 |           0.0171 |            0.0288 |            0.0318 |             0.0625 |
| Caser           |                  0.1604 |                   0.1825 |                   0.1918 |                    0.2444 |          0.2317 |           0.2513 |           0.2646 |            0.2735 |           0.0155 |            0.0206 |            0.0261 |             0.0335 |
| ATEM            |                  0.1212 |                   0.1324 |                   0.1768 |                    0.2026 |          0.2012 |           0.2195 |           0.2238 |            0.2412 |           0.0216 |            0.0312 |            0.0282 |             0.0310 |
| MCPRN-S         |                  0.1680 |                   0.1861 |                   0.1859 |                    0.2410 |          0.3552 |           0.3634 |           0.3907 |            0.4121 |           0.0446 |            0.0572 |            0.0581 |             0.0931 |
| MCPRN           |                  0.2191 |                   0.2332 |                   0.2547 |                    0.2927 |          0.4657 |           0.4694 |           0.4947 |            0.5098 |           0.1017 |            0.1047 |            0.1112 |             0.1218 |
| Improvement (%) |                   32.49 |                    23.19 |                    28.25 |                     10.24 |           10.54 |            10.55 |             9.16 |             10.39 |            34.88 |             21.46 |             26.08 |               1.67 |

Table 2: Statistics of experimental datasets

| Statistics          | Yoochoose-buy   |   Tmall |   Tafeng |
|---------------------|-----------------|---------|----------|
| #Sessions           | 83,928          | 144,936 |   19,538 |
| #Items              | 7,428           |  27,863 |    5,263 |
| Avg. session length | 5.13            |    4.09 |     7.41 |
| #Item category      | n.a             |     786 |      793 |

## 5.2 Experimental Settings

Three commonly used metrics: Mean Reciprocal Rank (MRR), normalized Discounted Cumulative Gain (nDCG) and Recall, are applied to evaluate the recommendation accuracy [Chen et al., 2018; Wang et al., 2018], together with a newly-designed diversity measure to evaluate the diversity.

## Comparison Methods

To demonstrate the efficacy of mixture channels for multipurpose modeling, we implemented two versions of our method: (1) full model of MCPRN proposed in this work; and (2) single channel network (MCPRN-S) with only one channel retained fromMCPRN. The following representative state-of-the-art SBRSs built on various frameworks including RNN, attention model, memory network, convolutional neural network (CNN) and shallow network, are selected to be the baselines:

- iGRU4Rec-BPR: An improved version of a typical RNN-based SBRS which models a session using RNNs built on GRU. It takes Bayesian Personalized Ranking (BPR) as the loss function [Hidasi et al., 2018].
- iGRU4Rec-CE: Similar to iGRU4Rec-BPR except that it replaces the loss function BPR with cross entropy [Hidasi et al., 2018].
- NARM: A hybrid encoder with an attention mechanism to users' sequential behavior and capture users' main purpose in a session [Li and et al., 2017].
- MANN: A memory-augmented neural network which employs an attention model to read out historical information explicitly stored in the external memory matrix [Chen et al., 2018].
- Caser: A convolutional sequence embedding model which embeds a sequence of items into an "image" and then learns sequential patterns as local features using convolutional filters [Tang and Wang, 2018].
- ATEM: A shallow and wide network with the attention mechanism incorporated to learn an attentive embedding of a session context [Wang et al., 2018].

## Parameter Settings

We initialize all the baseline models with the parameter settings in the corresponding papers and then tune them on our datasets for best performance for a fair comparison. The sizes of item embeddings and hidden states in PSRU are set to 128. The number of channels m is set to 3 by tuning on the validation data. The initial learning rate for Adam is set to 0.001.

## 5.3 Recommendation Accuracy Evaluation

Extensive experiments are conducted to answer the following questions:

- Q1: How does our approach compare to the state-of-theart SBRSs in terms of recommendation accuracy?
- Q2: How do the mixture-channel networks compare to the single channel network?

## Result 1: Comparison with Baselines w.r.t. Accuracy

To answer question Q1, we compare the recommendation accuracy of our method MCPRN and those of the six state-ofthe-art SBRSs. Table 1 reports the MRR and nDCG. The first two methods are built on GRU-based RNN, which can easily generate false dependencies due to the overly strong sequentially dependent-based assumption and bias to the most recent purpose. Therefore, they do not perform well on multipurpose session data. NARM and MANN achieve better performance by incorporating the attention mechanism into an RNN-based and memory network-based SBRS respectively to emphasize the relevant information and reduce noise. But they are easy to bias to the main purpose in a session due to the attention weighting mechanism. Caser does not perform well either as it is hard for the pooling operation in CNN to capture the long-range dependencies. ATEM usually biases to the main purpose as other attention-based SBRSs do. By modeling each purpose independently with a recurrent channel, our MCPRN not only treats each purpose equally but also keeps the sequential dependencies within each purpose. As a result, MCPRN achieves the best performance on all datasets. Particularly, MCPRN demonstrates over 20% improvement over the best existing method in terms of MRR@5, MRR@20 and nDCG@5 on the last two datasets (cf. Table 1). The recall (cf. Figure 3) on two datasets (due to the limited space) shows MCPRN leads the baselines with a clear margin.

Figure 3: Recalls of MCPRN and other compared methods

![Image](https://ijcai.org/proceedings/2019/fulltext/523/image_000002_186c943a890d4b1b59a172b98ed9994c626cfa791e8cd666746302f06b6f89c5.png)

## Result 2: Mixture Channels vs. Single Channel

To demonstrate the efficacy of mixture-channel structure, we compared MCPRN with MCPRN-S. It is clear that MCPRN achieves much higher accuracy than MCPRN-S as shown in Table 1 and Figure 3. The MRR, nDCG and Recall@5 of MCPRN are at least 20% higher than that of MCPRN-S, proving the superiority of the mixture-channel architecture.

## 5.4 Recommendation Diversity Evaluation

Diversity evaluation has been introduced to make up the limitation of accuracy [Hu and et al., 2017; Yao et al., 2019b]. Experiments are conducted to answer the following question:

- Q3: How does our approach compare to the state-of-theart SBRSs in terms of recommendation diversity?

Intuitively, the more disperse distribution over the item categories of the recommendations means the larger diversity can be produced by the model. As a result, the category distribution of recommendations can be measured by the entropy to quantify the diversity, according to the information theory [Zhang et al., 2016; Yao et al., 2019a].

<!-- formula-not-decoded -->

where k is the number of top-rank items in the recommendation list while Pri is the probability of the category to which item vi belongs and is estimated by the frequency.

## Result 3: Comparison with Baselines w.r.t. Diversity

Figure 4 shows that MCPRN achieves higher diversity than compared methods, especially on the Tafeng dataset where MCPRN achieves up to 13.01% and 11.61% improvement w.r.t. Diveristy@5 and Diveristy@10 respectively compared to the best baseline method. The reasons are that the baseline methods usually recommend items that only satisfy either the recent purpose (e.g., RNN-based SBRSs) or the main purpose

Figure 4: Diversities of MCPRN and other compared methods

![Image](https://ijcai.org/proceedings/2019/fulltext/523/image_000003_248be78aef84767b4c3460fd38a5d8d69b09774db9c53b0b5be7626d5ac77f5a.png)

![Image](https://ijcai.org/proceedings/2019/fulltext/523/image_000004_3c9ed52905e46253ea714380a0b9c34db3d96aa42557ea7a3cde43f11ec2e2d3.png)

Figure 5: Purpose concentration weights w.r.t. two sampled sessions containing 10 items, where the first 9 items serve as the contextual items and the last one corresponds to the target item.

![Image](https://ijcai.org/proceedings/2019/fulltext/523/image_000005_f3d67c36524c4a078fa7172b761a4cb48324378fb3cb5f8faa373710321aa111.png)

(e.g., attention-based SBRSs) due to their single channelbased design. In contrast, MCPRN easily diversifies the recommendation list by modeling multiple purposes in a parallel way. Diversity evaluation is not applicable to Yoochoose-buy as its category information is unavailable (cf. Table 2).

## 5.5 Purpose Concentration Visualization

To get a deep insight into how the items for different purposes in a session are detected and accordingly routed into different channels in MCPRN, we visualize the concentration weights (cf. Eq. 2) of two sessions randomly sampled from the test set of Yoochoose-buy dataset in Figure 5.

Two observations can be made from Figure 5: (1) Items in one session are usually for multiple purposes and thus are put into different channels, as illustrated by the various distributions of different items on all the three channels; (2) The true target item vt may have purposes different from either the most recent purpose or the main purpose in a session.

## 6 Conclusions

To effectively detect and model the multiple purposes embedded within a session and thus to recommend corresponding diverse items to satisfy those different purposes, which cannot be addressed by existing session-based recommender systems, in this paper, we have proposed mixture-channel purpose routing networks (MCPRN). MCPRN harness a purpose routing network to detect the possible purposes of each item in a session and multiple channels to model the item dependencies within different purposes independently. Empirical evaluations on the real-world transaction data show the superiority of MCPRN in addressing the gaps in the state-of-theart methods.

## Acknowledgements

This work was partially supported by Australian Research Council Discovery Project DP180102378.

## References

1. [Chen et al., 2018] Xu Chen, Hongteng Xu, and et al. Se- quential recommendation with user memory networks. In Proceedings of the 11th ACM International Conference on Web Search and Data Mining, pages 108-116, 2018.
2. [Feng and et al., 2015] Shanshan Feng and et al. Personal- ized ranking metric embedding for next new poi recom- mendation. In Proceedings of the 24th International Joint Conference on Artificial Intelligence, pages 2069-2075, 2015.
3. [Goldberg and Levy, 2014] Yoav Goldberg and Omer Levy. word2vec explained: deriving mikolov et al.'s negative-sampling word-embedding method. CoRR, abs/1402.3722, 2014.
4. [Hidasi et al., 2016] Balázs Hidasi, Alexandros Karat- zoglou, Linas Baltrunas, and Domonkos Tikk. Session- based recommendations with recurrent neural networks. In Proceedings of the Fourth International Conference on Learning Representations, pages 1-10, 2016.
5. [Hidasi et al., 2018] Balázs Hidasi, Alexandros Karat- zoglou, and Alexandros Karatzoglou. Recurrent neural networks with top-k gains for session-based recommen- dations. In Proceedings of the 27th ACM International Conference on Information and Knowledge Management, pages 843-852, 2018.
6. [Hu and et al., 2017] Liang Hu and et al. Diversifying per- sonalized recommendation with user-session context. In Proceedings of the 26th International Joint Conference on Artificial Intelligence, pages 1858-1864, 2017.
7. [Hu et al., 2018] Liang Hu, Songlei Jian, and et al. Inter- pretable recommendation via attraction modeling: Learn- ing multilevel attractiveness over multimodal movie con- tents. In Proceedings of the 27th International Joint Con- ference on Artificial Intelligence, pages 3400-3406, 2018.
8. [Jannach and Ludewig, 2017] Dietmar Jannach and Malte Ludewig. When recurrent neural networks meet the neigh- borhood for session-based recommendation. In Proceed- ings of the Eleventh ACM Conference on Recommender Systems, pages 306-310, 2017.
9. [Kang et al., 2018] Wang-Cheng Kang, Mengting Wan, and Julian McAuley. Recommendation through mixtures of heterogeneous item relationships. In Proceedings of the 27th ACM International Conference on Information and Knowledge Management, pages 1143-1152, 2018.
10. [Kingma and Ba, 2015] Diederik P. Kingma and Jimmy Ba. Adam: A method for stochastic optimization. CoRR, abs/1412.6980, 2015.
11. [Li and et al., 2017] Jing Li and et al. Neural attentive session-based recommendation. In Proceedings of the 26th ACM International Conference on Information and Knowledge Management, pages 1419-1428, 2017.
12. [Quadrana et al., 2017] Massimo Quadrana, Alexandros Karatzoglou, and et al. Personalizing session-based recommendations with hierarchical recurrent neural networks. In Proceedings of the 11th ACM Conference on Recommender Systems, pages 130-137, 2017.
13. [Rendle et al., 2010] Steffen Rendle, Christoph Freuden- thaler, and Lars Schmidt-Thieme. Factorizing person- alized markov chains for next-basket recommendation. In Proceedings of the 19th International Conference on World Wide Web, pages 811-820, 2010.
14. [Shazeer et al., 2017] Noam Shazeer, Azalia Mirhoseini, and et al. Outrageously large neural networks: The sparsely- gated mixture-of-experts layer. In Proceedings of the Fifth International Conference on Learning Representa- tions, pages 1-12, 2017.
15. [Tang and Wang, 2018] Jiaxi Tang and Ke Wang. Person- alized top-n sequential recommendation via convolutional sequence embedding. In Proceedings of the 11th ACM In- ternational Conference on Web Search and Data Mining, pages 565-573, 2018.
16. [Twardowski, 2016] Twardowski. Modelling contextual in- formation in session-aware recommender systems with neural networks. In Proceedings of the 10th ACM Con- ference on Recommender Systems, pages 273-276, 2016.
17. [Vaswani et al., 2017] Ashish Vaswani, Noam Shazeer, and et al. Attention is all you need. In Advances in Neural Information Processing Systems, pages 5998-6008, 2017.
18. [Wang et al., 2017] Shoujin Wang, Liang Hu, and Longbing Cao. Perceiving the next choice with comprehensive trans- action embeddings for online recommendation. In Joint European Conference on Machine Learning and Knowl- edge Discovery in Databases, pages 285-302, 2017.
19. [Wang et al., 2018] Shoujin Wang, Liang Hu, and et al. Attention-based transactional context embedding for next- item recommendation. In 32nd AAAI Conference on Arti- ficial Intelligence, pages 2532-2539, 2018.
20. [Wang et al., 2019] Shoujin Wang, Longbing Cao, and Yan Wang. A survey on session-based recommender systems. arXiv preprint arXiv:1902.04864, 2019.
21. [Yao et al., 2019a] Yazhou Yao, Fumin Shen, and et al. Extracting privileged information for enhancing classi- fier learning. IEEE Transactions on Image Processing, 28:436-450, 2019.
22. [Yao et al., 2019b] Yazhou Yao, Jian Zhang, and et al. To- wards automatic construction of diverse, high-quality im- age dataset. IEEE Transactions on Knowledge and Data Engineering, 2019.
23. [Yap et al., 2012] Ghim-Eng Yap, Xiao-Li Li, and Philip Yu. Effective next-items recommendation via personalized se- quential pattern mining. In Database Systems for Ad- vanced Applications, pages 48-64, 2012.
24. [Zhang et al., 2016] Xiao Zhang, Changlin Mei, Degang Chen, and Jinhai Li. Feature selection in mixed data: A method using a novel fuzzy rough set-based information entropy. Pattern Recognition, 56:1-15, 2016.
