You are on page 1of 14

IEEE TRANSACTIONS ON KNOWLEDGE AND DATA ENGINEERING, VOL. 36, NO.

4, APRIL 2024 1475

Continuous-Time User Preference Modelling for


Temporal Sets Prediction
Le Yu , Zihang Liu , Leilei Sun , Bowen Du , Chuanren Liu , and Weifeng Lv

Abstract—Given a sequence of sets, where each set has a times- For example, the customers’ purchasing behaviors of baskets in
tamp and contains an arbitrary number of elements, temporal sets online shopping [2], [3], patients’ medical behaviors of prescrip-
prediction aims to predict the elements in the subsequent set. Pre- tions in intelligent treatments [4], [5], and tourists’ travelling
vious studies for temporal sets prediction mainly focus on the mod-
elling of elements and implicitly represent each user’s preference behaviors of point-of-interests in transportation systems [6],
based on his/her interacted elements. However, user preferences [7]. Accurately predicting which elements will appear in the
are often continuously evolving and the evolutionary trend cannot next-period set can help people make better decisions ahead of
be fully captured with the indirect learning paradigm of user pref- time [8], [9], [10], [11].
erences. To this end, we propose a continuous-time user preference Recently, some researchers have attempted to tackle the
modelling framework for temporal sets prediction, which explicitly
models the evolving preference of each user by maintaining a problem of temporal sets prediction. One part of the scholars
memory bank to store the states of all the users and elements. simplified the temporal sets prediction problem by converting
Specifically, we first construct a universal sequence by arranging all it into conventional prediction of temporal events [6], [12]
the user-set interactions in a non-descending temporal order, and through a set embedding process [3], [8], [13]. Specifically,
then chronologically learn from each user-set interaction. For each [3], [8] and [13] first derived the representations of sets via
interaction, we continuously update the memories of the related
user and elements based on their currently encoded messages and pooling operations or matrix factorization, and then learned the
past memories. Moreover, we present a personalized user behavior temporal dependencies in user behaviors by Recurrent Neural
learning module to discover user-specific characteristics based on Networks (RNNs) [14], [15] and the attention mechanism [16].
each user’s historical sequence, which aggregates the previously The other part of researchers focused on the learning of elements
interacted elements from dual perspectives according to the user by designing customized components for temporal sets predic-
and elements. Finally, we develop a set-batch algorithm to improve
the model efficiency, which can create time-consistent batches in tion [9], [10], [11]. In particular, [9] presented a dual sequential
advance and achieve 3.5× and 3.0× speedups in the training and network to learn the multi-level (i.e., set-level and element-level)
evaluation process on average. Experiments on four real-world representation of each user’s sequence based on the Transformer
datasets demonstrate the superiority of our approach over state-of- architecture [17]. [10] first performed graph convolutions on the
the-arts under both transductive and inductive settings. The good co-occurrence graphs of elements in the set level to discover
interpretability of our method is also shown.
element relationships, and then learned the temporal dependen-
Index Terms—Temporal sets prediction, continuous-time cies and shared patterns of elements by the attention mechanism
representation learning, user modelling. and the gating mechanism. [11] first connected the sequences
of different users by constructing a temporal graph and then
I. INTRODUCTION captured high-order user-element interactions via the element-
guided message aggregation mechanism, which is aware of the
EMPORAL sets can be formalized as a sequence of sets,
T where each set carries a timestamp and includes an arbi-
trary number of elements [1]. In many practical scenarios, the
temporal information.
Although previous methods are insightful for temporal sets
prediction, they mainly focus on the modelling of elements
sequential behaviors of users could be treated as temporal sets.
and implicitly capture each user’s preference according to the
interacted elements. However, user preferences are often con-
Manuscript received 14 October 2022; revised 19 May 2023; accepted 26 tinuously evolving in real-world scenarios [18], [19], [20], [21],
August 2023. Date of publication 30 August 2023; date of current version 8
March 2024. This work was supported in part by the National Natural Science and thus the evolutionary trend cannot be fully captured by the
Foundation of China under Grants 62272023 and 51991395, and in part by the implicit learning paradigm of user preferences. This motivates us
Fundamental Research Funds for the Central Universities under Grant YWF- to design a new framework to explicitly model the evolving user
23-L-1203. Recommended for acceptance by R. C.-W. Wong. (Corresponding
author: Leilei Sun.) preferences, see the bottom of Fig. 1. Moreover, when making
Le Yu, Zihang Liu, Leilei Sun, Bowen Du, and Weifeng Lv are with the the prediction for each user, it is also essential to discover the per-
State Key Laboratory of Software Development Environment, Beihang Univer- sonalized behaviors based on the historical sequence for better
sity, Beijing 100191, China (e-mail: yule@buaa.edu.cn; lzhmark@buaa.edu.cn;
leileisun@buaa.edu.cn; dubowen@buaa.edu.cn; lwf@buaa.edu.cn). reflecting the user-specific characteristics, see the top of Fig. 1.
Chuanren Liu is with the Department of Business Analytics and Statistics, The In this article, we propose a Continuous-Time user preference
University of Tennessee, Knoxville, TN 37996 USA (e-mail: cliu89@utk.edu). modelling framework for Temporal Sets Prediction, namely
This article has supplementary downloadable material available at
https://doi.org/10.1109/TKDE.2023.3309982, provided by the authors. CTTSP. Our main idea is to explicitly capture the evolving user
Digital Object Identifier 10.1109/TKDE.2023.3309982 preferences in a continuous manner by storing the states of all

1041-4347 © 2023 IEEE. Personal use is permitted, but republication/redistribution requires IEEE permission.
See https://www.ieee.org/publications/rights/index.html for more information.

Authorized licensed use limited to: Zakir Husain College of Engineering & Technology. Downloaded on March 12,2024 at 04:50:27 UTC from IEEE Xplore. Restrictions apply.
1476 IEEE TRANSACTIONS ON KNOWLEDGE AND DATA ENGINEERING, VOL. 36, NO. 4, APRIL 2024

preferences based on the interacted elements. For each user-set


interaction, they need to recompute the user representation from
scratch since they lack the ability in memorizing users’ historical
states. Instead, our approach uses a memory bank to explicitly
store the states of users and elements, which can be updated
to be the latest based on the currently encoded messages and
the memorized state of the user. The explicit learning paradigm
helps our approach capture the continuously evolving user pref-
erences, which cannot be achieved by previous methods.
We would like to point out that there is another understanding
Fig. 1. Our task aims to predict the next-period set of user u1 at timestamp that a continuous-time model should be able to derive user
tk+1 . Unlike previous methods that implicitly capture each user’s preference preferences at any given time, which is the objective of methods
based on the interacted elements, our approach maintains a memory bank like Neural Ordinary/Partial Differential Equations [22], [23].
to explicitly store the states of all the users and elements, which could be
continuously evolved upon the non-descending sequence of all the user-set Although insightful, these methods tend to be computationally
interactions (plotted in green). We also learn u1 ’s personalized behaviors based expensive, especially when using black-box differential equa-
on his/her historical sequence to reflect the individual characteristics (plotted in tion solvers. Their performance is also sensitive to the choice of
red).
numerical solvers. Furthermore, our approach learns from the
universal sequence constructed by all the user-set interactions,
the users and elements via a memory bank. Given the sequences which differs from the input data format of the above methods.
of all the users, we first sort all the user-set interactions in a non- Hence, we conclude that it is challenging to design such a
descending temporal order to construct a universal sequence, continuous-time method for temporal sets prediction, which
and then chronologically learn from each user-set interaction. could be left as an interesting problem for future research.
In particular, for each user-set interaction, our approach first
learns the relationships of the related user and elements via II. RELATED WORK
message encoders, and then updates their memories based on
the encoded messages and previous memories via memory A. Temporal Sets Prediction
updaters. To exploit each user’s unique characteristics, we also Over the past decades, time series [24], [25] and temporal
devise a personalized user behavior learning component, which events [6], [12] have been widely studied in the temporal data
adaptively aggregates the historical sequence with the guidance mining community. However, as a more complicated type of
of the user and elements from dual perspectives. Finally, a temporal data, temporal sets have not been fully investigated
set-batch algorithm is developed to make our method more yet. Formally, temporal sets could be formalized as a sequence
efficient, which can create time-consistent batches in advance of sets, where each set contains an arbitrary number of elements
and achieve the average of 3.5× and 3.0× speedups in training and is associated with a timestamp [1]. In real-world scenarios,
and evaluation, respectively. Experiments on four benchmarks temporal sets are ubiquitous and accurately predicting of tem-
not only show that our approach could significantly outperform poral sets can help people make better decisions in advance [8],
existing methods under both transductive and inductive settings, [9], [10], [11].
but also reveal the good interpretability of our method. Our key Indeed, the prediction of temporal sets is much more challeng-
contributions include: ing than the predictive modelling of time series and temporal
r We present a continuous-time user preference modelling events. The existing methods for temporal sets prediction could
framework to explicitly capture the evolving user prefer- be divided into the following two categories. The first category
ences by maintaining a memory bank to store the states of methods adopted a set embedding phase to denote each set
of all the users and elements. When a user-set interaction as a vectorized representation, and then fed the sequence of
is observed, we continuously update the related user’s and set representations into sequence models to learn the tempo-
elements’ memories using the encoded messages and past ral dependencies in user behaviors. For instance, [3] adopted
memories. pooling operations to get the fixed-length representation of each
r We learn the personalized behaviors of each user from the basket and leveraged RNNs to learn the dynamic patterns in each
historical sequence by adaptively aggregating the inter- customer’s purchasing behaviors. [8] and [13] first obtained each
acted elements based on the user and elements. set’s representation by the average pooling or matrix factoriza-
r A set-batch algorithm is developed to improve the model tion, and then employed RNNs with the attention mechanism
efficiency, which can create time-consistent batches and to capture the temporal dependencies. The repeated elements in
accelerate the model speed in the training and evaluation each user’s sequence are also considered. Methods belonging to
process. the second category designed specialized modules to investigate
The key difference between previous implicit methods and the elements in sets for further improvements. [9] proposed a
our explicit approach is whether the model can memorize users’ dual sequential network with the co-transformer architecture to
historical states and track the evolving user preferences across compute both set-level and element-level representations of each
time. Previous methods do not design customized modules to user’s sequence. [10] first learned the relationships of elements
maintain the states of users and they implicitly represent user within each set based on the constructed set-level co-occurrence

Authorized licensed use limited to: Zakir Husain College of Engineering & Technology. Downloaded on March 12,2024 at 04:50:27 UTC from IEEE Xplore. Restrictions apply.
YU et al.: CONTINUOUS-TIME USER PREFERENCE MODELLING FOR TEMPORAL SETS PREDICTION 1477

graphs, and then extended the attention mechanism and the attention layer to compute time-aware node representations.
gating mechanism to mine the temporal dependencies and shared [37] designed a general framework for continuous-time dynamic
patterns among elements. [11] pointed out the necessity of graphs by learning evolving node representations across time. To
leveraging the collaborative signals for temporal sets prediction learn from temporal user-item interaction graphs, [20] employed
and learned element-specific representations for each user on two RNNs to update the embedding of a user and an item
the constructed temporal graph with the usage of temporal and introduced a projection operator to learn the embedding
information. trajectories of users and items. [38] defined a continuous-time
Existing methods for temporal sets prediction implicitly cap- bipartite graph of users and items, and designed a temporal
ture the user preference according to the interacted elements collaborative transformer to consider the temporal dynamics
and thus fail to capture the continuous evolutionary trend of user inside sequential patterns and mine the underlying collaborative
preference. To cope with this issue, we present a new framework signals. [39] introduced a unified library for facilitating the
that explicitly models the evolving dynamics in user preference development of the continuous-time dynamic graph learning
in a continuous-time manner. field.
However, the above methods are not specifically designed for
B. User Modelling predicting temporal sets. They fail to capture the relationships
between elements within the same set as well as the correlations
Based on the massive collected data of users, a great number of
between the user and the interacted set. In this article, we propose
efforts have been made on user modelling in recent years. Some
a customized continuous-time learning framework for temporal
methods utilized users’ sequences to exploit their dynamics
sets prediction.
and formalized the task as a sequence learning problem. For
example, [2] integrated the Markov chain and matrix factoriza-
III. PROBLEM FORMALIZATION
tion to learn the evolving preferences of users. [26] proposed
GRU4Rec based on RNNs for session-based recommendation. Let U = {u1 , . . . , um } and V = {v1 , . . . , vn } denote the
[18] designed the memory-augmented neural network to capture collections of m users and n elements. We use S t =
user sequential behaviors for sequential recommendation. [19] {e1 , e2 , . . . , eK } to represent the observed user-set interactions
incorporated the knowledge base information into RNN-based in chronological order, where ek = (uek , Sk , tk ) is an interaction
memory networks to enhance the model interpretability. [21] event, uek ∈ U, Sk ⊂ V, and 0 < t1 ≤ · · · ≤ tK ≤ t. We use Ti
proposed a lifelong sequential modelling framework to learn to represent the timestamp of user ui ’s last interaction set. The
the multi-scale evolving patterns in user behaviors via a hierar- task of temporal sets prediction aims to predict elements to
chical and periodical updating mechanism. There are also some appear in the subsequent interaction set for each user ui ∈ U
attempts for user modelling in a non-chronological manner. For at the next-period timestamp Ti . Our learning paradigm for user
click-through rate prediction, [27] computed user representa- ui could be represented by
tions that are specific to the ads by a local activation unit. [28] T  
and [29] extended the Graph Neural Networks (GNNs) [30], Ŝi i = f S Ti .
[31], [32] to recommender systems by learning from the user- It is worth noticing that our solution integrates the historical
item interaction graph. They performed graph convolutions to behaviors of all the users until timestamp Ti when making
generate embeddings of both users and items, which utilize the predictions for user ui , who can benefit from exploiting the
graph structure and node feature information simultaneously. collaborative signals.
[33] removed the feature transformation and nonlinear activation In this article, compared with the existing methods that implic-
in graph convolutions, and linearly propagated information on itly represent each user’s preference based on his/her interacted
the user-item interaction graph. elements, we aim to design a new framework to explicitly capture
In this article, we design a continuous-time user preference the evolving user preference by learning the continuous-time
modelling framework for temporal sets prediction. representations of users and elements.

C. Continuous-Time Dynamic Graph Learning IV. METHODOLOGY


A continuous-time dynamic graph is defined as a chronolog- This section shows the framework of our CTTSP and presents
ical sequence of events, where each event can correspond to each component one by one. As shown in Fig. 2, our approach
the modifications of an object or the interactions of multiple predicts the next-period set for each user in a continuous manner.
objects [34]. Representation learning on continuous-time dy- To explicitly capture the time-evolving user preferences, we
namic graphs aims to provide meaningful representations for maintain a memory bank for storing the states of all the users and
nodes in the graph with the consideration of graph dynamics. elements. We first construct a universal sequence by arranging
[35] first constructed temporal dependency interaction graphs all the user-set interactions in a non-descending temporal order,
which are induced from the sequence of interactions, and then and then learn from each user-set interaction chronologically.
captured both global and local graph information with a dy- For each user-set interaction, we learn the relationships between
namic message passing neural network. [36] first considered the the user and elements by message encoders, and then update their
temporal dependencies via a time encoding function and then memories to be the latest by memory updaters using the encoded
aggregated the neighbor information using the temporal graph messages and past memories. We also devise a personalized user

Authorized licensed use limited to: Zakir Husain College of Engineering & Technology. Downloaded on March 12,2024 at 04:50:27 UTC from IEEE Xplore. Restrictions apply.
1478 IEEE TRANSACTIONS ON KNOWLEDGE AND DATA ENGINEERING, VOL. 36, NO. 4, APRIL 2024

Fig. 2. Framework of the proposed model.

behavior learning module to exploit each user’s individual char- by the following attention mechanism
acteristics from dual perspectives, which adaptively aggregates     √ 
− −
u u,tk (ui ) u v,tk (vj )
elements in the historical sequence with the guidance of the αi,j = softmax W Q z i
k
W K zj / d ,
∀vj ∈Sk
user and elements. A prediction layer is designed to compute
(1)
the appearing probabilities of elements in the next-period set by
where W uQ , W uK ∈ Rd×d are the query and key vector of users.
integrating the continuous-time and personalized information.
Moreover, we present a set-batch algorithm to improve the model t− −
k (ui ) and tk (vj ) are the last time that user ui interacted with a
efficiency by creating time-consistent batches in advance with set and element vj was involved in a set right before timestamp
the constraint of temporal orders. tk , respectively. Then, we aggregate the elements in Sk for user
ui using the learned weights by
 v,t− (v )
A. Continuous-Time User Preference Modelling cu,t k
= k
αi,j · W uV z j k j , (2)
i
We first construct a universal sequence by sorting all the vj ∈Sk
user-set interactions in a non-descending order based on the
where W uV ∈ Rd×d is the value vector of users. cu,t
i
k
adaptively
timestamp of each set (as shown on the left of Fig. 2), and then
selects the information of all the elements in Sk , and thus
learn from user-set interactions chronologically for encoding
captures the user-element relationships. Finally, the message of
the collaborative signals among different users. To be specific,
user ui at timestamp tk is obtained by concatenating cu,ti
k
and
we maintain a memory bank to explicitly store the states of all u,t−
k (ui )
the users and elements for tracking the evolving preferences. zi , that is,
We initialize the memories of all the users and elements as u,t−
k (ui )
zero vectors, and update the memories of the related user and mu,t
i
k
= cu,t
i
k
zi . (3)
elements involved in each user-set interaction according to the Element Message Encoder. The calculation process of the el-
following message encoders and memory updaters. ement message encoder is analogous to that of the user message
1) Message Encoders: In a user-set interaction, the involved encoder, and the main difference is that we need to addition-
user and elements are often associated with each other, including ally design trainable parameters specific to elements, including
the mutual correlations between the user and elements, and the W vQ , W vK , W vV ∈ Rd×d . Therefore, we do not elaborate on
co-occurring relations of elements. Therefore, we design two them in detail. Based on the element message encoder, we
customized message encoders to learn the above user-element could obtain mv,t k
, which is the message of element vj ∈ Sk at
j
and element-element relationships. timestamp tk .
User Message Encoder. Mathematically, We use z u,t v,t
i , zj ∈ 2) Memory Updaters: Our approach maintains a memory
Rd to denote the memories of user ui and element vj at times- bank to store the memories of both users and elements, where
tamp t, where d is the hidden dimension. When a user-set each memory aims to represent the historical states of the cor-
interaction ek = (uek , Sk , tk ) is observed, the correlation weight responding user or element in a compact format. Note that the
k
αi,j of the user ui = uek 1 and elements vj ∈ Sk are calculated memories are not trainable, but they can be modified according
to the trainable parameters in the following memory updaters.
Each memory will be continuously updated when a new user-set
1 For better readability, we assume that ue corresponds to the ith user ui ∈ U. interaction contains the user or the element.
k

Authorized licensed use limited to: Zakir Husain College of Engineering & Technology. Downloaded on March 12,2024 at 04:50:27 UTC from IEEE Xplore. Restrictions apply.
YU et al.: CONTINUOUS-TIME USER PREFERENCE MODELLING FOR TEMPORAL SETS PREDICTION 1479

User Memory Updater. For the user-set interaction ek , we 1) User Perspective: Formally, we use eu , evj ∈ Rd to de-
keep the memory of user ui to be the latest by the gated updating note the static embeddings of user ui and element vj 2 , which are
mechanism with the consideration of both encoded message and randomly initialized from a normal distribution with mean 0 and
previous memory as follows, variance 1 and can be optimized in the model training process.
Then, we use eu as a query vector to compute the correlation of
z u,t k
= tanh
i each element vj ∈ Vitk by
 
u,t−
k (ui )    
g u,t
i,M
k
W uM mu,t
i
k
+ (1 − g u,t
i,M )
k
W uZ z i , (4) exp σ s eu , evj
βi,j =
k     , (6)
tk exp e
σ s u , ev
where W uM ∈ Rd×2 d and W uZ ∈ Rd×d are the transformation v  ∈V j i
j 

matrices to align the dimensions of each user’s message and 


where s(x, y) = x y denotes the dot product for calculating
memory. denotes the Hadamard product. g u,t i,M ∈ R controls
k d
u,tk the similarity of x and y. σ(·) is the LeakyReLU activation
the importance of the user message mi , which is computed k
function. βi,j represents the importance of element vj to user ui .
by Through the above aggregation, elements that are more similar
  to user ui will be assigned with higher weights and contribute
exp M u W uM mu,t k
u,tk
g i,M =   i
− , more in the aggregation process.
exp M u W uM mu,t + exp Z u W u z u,tk (ui )
i
k
Z i 2) Element Perspective: We also use each element vj  ∈ V
(5) as a query vector to calculate the correlation of every element
where M u , Z u ∈ Rd×d are user-specific trainable parameters vj ∈ Vitk via
to calculate the importance of each dimension of the message    
exp σ s evj , evj
and memory. γj  ,j =
k     . (7)
Element Memory Updater. The computations of the element t exp σ s evj , evj
v  ∈V k
j i
memory updater are similar to those of the user memory updater.
One difference is that we need to design element-specific train- γjk ,j
stands for the relevance of element vj  to element vj , and
able parameters, including W vM ∈ Rd×2 d , W vZ , M v , Z v ∈ elements that are more similar to element vj  will become more
Rd×d . Hence, we do not elaborate on them due to space limita- important.
tions. Based on the element memory updater, we could obtain the 3) Dual Perspectives Aggregation: After obtaining the re-
memory of element vj ∈ Sk at timestamp tk , which is denoted lationships of each element vj ∈ Vitk to user ui and element
by z v,t
j
k
. vj  ∈ V, we then make aggregation from the dual perspectives
Note that our method learns from the universal sequence via
which is composed of all the user-set interactions, and the   
hti,j
k
 = λup βi,j
k
+ (1 − λup ) γjk ,j · evj , (8)
memories of users and elements are continuously updated for t
vj ∈Vi k
each user-set interaction. This provides our approach with
the ability in exploiting the underlying collaborative signals where 0 ≤ λup ≤ 1 is a hyperparameter to control the impor-
across different users. Take the first two user-set interactions tance of user perspective. hti,j
k
 is the aggregation of user ui ’s

e1 = (u1 , {v1 , v2 }, t1 ) and e2 = (u3 , {v2 , v3 }, t2 ) in Fig. 2 as interacted elements until timestamp tk , which is guided by the
an example, after dealing with e1 , element v2 ’s memory will embeddings of user ui and element vj  .
contain the information of element v1 and user u1 . Therefore,
when learning on e2 , user u3 is able to additionally access the C. The Prediction Layer
cross-user information of user u1 and element v1 via the memory
To provide the appearing probabilities of all the elements in
of element v2 , and thus the latent collaborative signals could be
the subsequent set of each user, we design a prediction layer
learned.
by integrating continuous-time and personalized information.
Specifically, the prediction layer first computes the continuous-
B. Personalized User Behavior Learning time and personalized probabilities and then fuses them to make
Apart from learning from the universal sequence, we also ex- the final predictions.
plore the personalized behaviors of each user via the previously 1) Continuous-Time Probability Calculation: Through the
interacted elements from his/her own historical sequence. In modelling of continuous-time user preferences, for user-set in-
particular, for user ui that involved in the interaction ek , we use teraction ek , we can obtain the updated memories of the related
Vitk = {vj | vj ∈ Sk ∧ uek = ui ∧ 0 < tk ≤ tk } to denote the user ui and element vj ∈ Sk , i.e., z u,t
i
k
and z v,t
j
k
. We can also
list of elements that ui have interacted with up to timestamp tk . get the elements that user ui have previously interacted with
It is worth noticing that Vitk could contain the same element but do not appear in Sk , which belong to unique(Vitk ) \ Sk .
multiple times, and elements that appear with higher times
indicate that they are more preferred by user ui . Then, we 2 Note that eu is shared across users while ev is element-specific. This can
j
adaptively aggregate the elements in Vitk from dual perspectives, reduce the model complexity and provide our model with the inductive ability
i.e., the user perspective and the element perspective. (validated in the experiments).

Authorized licensed use limited to: Zakir Husain College of Engineering & Technology. Downloaded on March 12,2024 at 04:50:27 UTC from IEEE Xplore. Restrictions apply.
1480 IEEE TRANSACTIONS ON KNOWLEDGE AND DATA ENGINEERING, VOL. 36, NO. 4, APRIL 2024

unique(·) is a function to derive the unique items in the input. these methods can split the sequences of users into multiple
We denote the memories of element vj ∈ unique(Vitk ) \ Sk batches and compute on each batch in parallel [26], [40]. How-
v,t− (v ) ever, our approach merges the sequences of users into a universal
before timestamp tk as z j k j . Then, the continuous-time
probabilities of elements in the above two parts are calculated sequence and thus the users are correlated with each other,
as follows. making the above technique infeasible. Though [20] proposed
For element vj ∈ Sk , we compute the continuous-time proba- an algorithm to accelerate the model efficiency on temporal
bility that it will appear in the next-period set by the dot product interaction networks, it can only handle a pairwise user-element
of z u,t k
and z v,t k
as follows, interaction and thus fails to handle the user-set interactions since
i j
 u,tk v,tk  each set contains an arbitrary number of elements.
p̂c,t
i,j = s z i
k
, zj . (9) To this end, we develop a set-batch algorithm to create time-
consistent batches in advance and improve our model efficiency.
For element vj ∈ unique(Vitk ) \ Sk , we should notice that its The core of the set-batch algorithm is to satisfy the constraint
v,t− (v )
memory z j k j is not trainable, and directly using it to cal- of temporal orders, such that the memory of any user or any
culate the dot product with z u,t k
will make it fail to access the element is updated chronologically. Formally, for ∀ui ∈ U, vj ∈
i
gradient. To tackle this issue, we first use a single-layer fully V, ek = (uek , Sk , tk ), ek = (uek , Sk , tk ), if ui = uek ∧ ui =
v,t− (v ) uek ∧ tk < tk , then BatchID(ek ) < BatchID(ek ). More-
connected network (denoted as F CN (·)) to project z j k j ,
over, if vj ∈ Sk ∧ vj ∈ Sk ∧ tk < tk , then BatchID(ek ) <
and then calculate the dot product of z u,t i
k
and the projected BatchID(ek ). BatchID(ek ) is a function to return the index
memory as follows, of the batch that contains ek .
  
v,t− (v ) We show the set-batch algorithm in Algorithm 1. In particu-
p̂c,t
i,j = s z i
k u,tk
, F CN z j k j . (10)
lar, the set-batch algorithm takes the universal non-decreasing
2) Personalized Probability Calculation: According to the sequence S t = {e1 , . . . , eK } as the input and provides the
personalized user behavior learning component, up to the times- batched data B = {B1 , . . . , BBatchN um }3 as the output, where
tamp tk , we can get hti,j k
 for each vj  ∈ V via (8), which stands BatchN um denotes the number of batches. Set-batch first
for the aggregation of user ui ’s historically interacted elements initializes B, user_idx_dict and element_idx_dict in line 1
until timestamp tk with the guidance of user ui and element vj  . and line 2, where user_idx_dict and element_idx_dict are
The personalized probability that element vj  will appear in the designed to record the largest index of the batch that contains
next-period set is calculated via users and elements, respectively. Then, set-batch chronologi-
  cally processes each user-set interaction ek in line 3. It obtains
p̂s,t
i,j
k
 = s W S h tk
i,j  , e v
j ,
 (11) the index of batch that ek should be inserted from line 4 to line
18 and appends ek to the corresponding position from line 19 to
where W S ∈ Rd×d stands for a transformation matrix. line 22. Finally, the indices of the related user uek and elements
3) Probabilities Fusion: We predict the next-period set by vj ∈ Sk in user_idx_dict and element_idx_dict are updated
fusing both the continuous-time and personalized probabilities. from line 23 to line 26. An example of the set-batch algorithm
Specifically, we utilize a hyperparameter 0 ≤ λcp ≤ 1 to control is shown on the left of Fig. 2.
the importance of the continuous-time probability by The complexity of our set-batch algorithm is O(|S t |), which
 tk s,tk 
= sigmoid τi,j · λcp · p̂c,t is linear to the number of user-set interactions in the sequence S t .
i,j + (1 − τi,j · λcp ) · p̂i,j
tk k tk
ŷi,j ,
(12) We do not need to manually predetermine BatchN um because
tk
where ŷi,j stands for the probability that element vj will appear set-batch can automatically provide BatchN um according to
in the next-period set of user ui after timestamp tk . τ tik ∈ Rn is different datasets. The value of BatchN um ranges from 1 to
an indicator vector that is composed of 0 or 1, where the entry of |S t |. The extreme cases are: 1) all the user-set interactions have
1 means the corresponding element has interacted with user ui unique users and elements, and then BatchN um is equal to 1;
up to timestamp tk . Otherwise, the entries are set to 0. We can 2) all the user-set interactions have the same user or the same
observe that for element vj that has interacted with user ui up element, then BatchN um is set to |S t |. It can be verified that
to timestamp tk , the appearing probability comes from both the the set-batch algorithm satisfies the constraint of temporal orders
continuous-time probability p̂c,t k because it guarantees: 1) each user and each element should
i,j and personalized probability
appear at most once in each batch; and 2) if batch Bb and Bb
p̂s,t k
i,j . For element vj that has not interacted with user ui up consist of interactions ek and ek with tk < tk , and ek and ek
to timestamp tk , the appearing probability only depends on the
contain the same user or the same element, then b < b .
personalized probability p̂s,t k
i,j .

E. Model Training Process


D. Set-Batch Algorithm
To support the calculation on the batched data B, we first
Our approach constructs a universal sequence in the non-
perform the padding operation in each batch and then use the
decreasing temporal order and processes each user-set interac-
tion one after another, which makes it time-consuming when
handling datasets with long time spans. Classical RNN models 3 For better understanding, we prescribe that the indices of a list start with 1
assume that different users are independent of each other, so rather than 0.

Authorized licensed use limited to: Zakir Husain College of Engineering & Technology. Downloaded on March 12,2024 at 04:50:27 UTC from IEEE Xplore. Restrictions apply.
YU et al.: CONTINUOUS-TIME USER PREFERENCE MODELLING FOR TEMPORAL SETS PREDICTION 1481

and Personalized Ranking with Importance Sampling [42], but


Algorithm 1: Set-Batch Algorithm.
they cannot show better performance. In the Appendix, avail-
able online, we show the training process of CTTSP by an
algorithm.

V. EXPERIMENTS
A. Descriptions of Datasets
We conduct experiments on four benchmarks:
r JingDong4 contains the actions of users about purchasing,
browsing, commenting, following and adding products to
shopping carts. We select the purchasing actions in March
2018 and treat products bought on the same day by each
user as a set.
r Dunnhumby-Carbo (DC)5 records the transactions of
households at a retailer in two years. We select transac-
tions in the first 60 days to conduct experiments and treat
products purchased on the same day by each household as
a set.
r TaFeng6 includes the shopping transactions at a Chinese
grocery store from November 2000 to February 2001.
Products bought on the same day by each customer are
treated as a set.
r TaoBao7 records the online user behaviors about purchas-
ing, clicking, marking products as favors, and adding prod-
ucts to shopping carts. We select the purchasing behaviors
and treat categories of products purchased on the same
day by each user as a set. This dataset is recorded from
November 24, 2017 to December 3, 2017.
We strictly follow [11] to preprocess the datasets. We select
the frequent elements that cover 80% records in each dataset.
We drop the sequences with lengths less than 4 and crop the
sequences with lengths more than 20. Note that the TMS dataset
in [11] is not used because the absolute temporal information
is unavailable, but we additionally use the TaFeng dataset to
do experiments. We compare our method with the existing
methods under both transductive and inductive settings. For
masking technique in [17] by setting all the padded values to the transductive setting, we follow [11] to use the last set, the
-∞ before the softmax operations. We treat the task of temporal second last set, and the remaining sets of each user for testing,
sets prediction as a multi-label classification problem, where an validation, and training. For the inductive setting, we follow [10]
element corresponds to a label. The ground truth of user ui ’s to randomly divide each dataset into the training, validation, and
next-period set after timestamp tk is denoted by y tik ∈ {0, 1}n , testing sets with the ratio of 70%, 10%, and 20% across users.
where the entry of 1 indicates the corresponding element appears We provide statistics of the datasets in the Appendix, available
in the next-period set of user ui . The multi-label classification online.
problem is converted into multiple binary classification prob-
lems, which are optimized by minimizing the cross-entropy loss, B. Compared Baselines
Our approach is compared with the following baselines:
   tk  r TOP uses the most frequent elements in all the users’
L= − tk
yi,j log ŷi,j
sequences as the predictions for any user.
ek ∈S t ∧ui =uek vj ∈V
r PTOP predicts the most frequent elements in the individual
   
+ 1 − yi,j
tk
log 1 − ŷi,j
tk
, (13) sequence for each user.
tk tk
where yi,j and ŷi,j denote the ground truth and predicted proba- 4 https://jdata.jd.com/html/detail.html?id=8
bility of element vj appearing in the next-period set of user ui af- 5 https://www.dunnhumby.com/careers/engineering/sourcefiles
ter timestamp tk . We have also tried other widely-used loss func- 6 https://www.kaggle.com/chiranjivdas09/ta-feng-grocery-dataset

tions in recommender systems such as Sampled Softmax [41] 7 https://tianchi.aliyun.com/dataset/dataDetail?dataId=649

Authorized licensed use limited to: Zakir Husain College of Engineering & Technology. Downloaded on March 12,2024 at 04:50:27 UTC from IEEE Xplore. Restrictions apply.
1482 IEEE TRANSACTIONS ON KNOWLEDGE AND DATA ENGINEERING, VOL. 36, NO. 4, APRIL 2024

r FPMC utilizes the matrix factorization and Markov chain We train the methods with a fixed 2000 epochs and use an
to predict the next-period basket, which can capture the el- early stopping strategy with a patience of 100. The model with
ement transitions as well as long-term user preferences [2]. the best performance (more specifically, the highest average
r DREAM first uses pooling operations to embed baskets into NDCG) on the validation set is used for testing. To eliminate
vectors, and then feeds the sequence of basket embeddings the deviations, we run the methods ten times with seeds from
into an RNN to predict the next-period basket [3]. 0 to 9 on all the datasets and report the average performance.
r TGN is a general dynamic graph learning framework, For the proposed CTTSP, we set the learning rate to 0.001
which computes evolving representations for nodes in the on all the datasets. We apply the grid search to find the best
graph [37]. To adapt TGN for the temporal sets predic- settings of CTTSP. Specifically, the dropout rate and hidden
tion task, we treat each user-set interaction as multiple dimension d are searched in [0.0, 0.05, 0.1, 0.15, 0.2] and [32,
user-element interactions and separately learn from the 64, 128]. The hyperparameter λup and λcp are both searched in
user-element interactions. [0.0, 0.05, 0.1, 0.3, 0.5, 0.7, 0.9, 0.95, 1.0]. The settings of our
r RUM is a memory-augmented neural network for sequen- model on different datasets are shown in the Appendix, available
tial recommendation, aiming to exploit sequential behav- online.
iors of users [18]. We first use the pooling operation to Note that the memories of users and elements are continuously
embed each set and then employ RUM to handle the updated during the training, validation, and testing process, but
sequences of set embeddings. the model parameters are not optimized in the validation and test-
r HPMN introduces a hierarchical framework with an up- ing process to avoid the data leakage issue. We train our model
dating mechanism for multiple periods, which can capture in a mini-batch manner, where the batches are created by our set-
the multi-scale sequential patterns in the lifelong behavior batch algorithm in advance. All the experiments are conducted
sequences of users [21]. We incorporate the pooing opera- on an Ubuntu machine equipped with one Intel(R) Xeon(R)
tions into HPMN to apply it for predicting temporal sets. Gold 6130 CPU @ 2.10 GHz, which has 16 physical cores.
r DIN is designed for the click-through rate prediction, which The GPU device is NVIDIA Tesla T4 with 15 GB memory. Our
learns the representation of user interests with respect to approach is implemented with PyTorch [46]. Codes and datasets
each ad by the attention mechanism [27]. We adapt DIN by are available at https://github.com/yule-BUAA/CTTSP.
splitting each set into separate elements and learning from
the sequences of elements.
r Sets2Sets first generates the representations of sets via the D. Performance Under Transductive Setting
average pooling and then captures temporal dependencies The comparisons of our approach with baselines under the
with an encoder-decoder framework for predicting multi- transductive setting are shown in Table I. From Table I, several
period sets. It also considers the repeated patterns in user conclusions can be summarized as follows.
behaviors [8]. First, PTOP usually shows better performance than TOP
r DSNTSP designs a dual transformer-based architecture to because PTOP recommends personalized elements for each user
learn both element-level and set-level representations for based on his/her individual sequence, while TOP just identically
each user’s sequence. A co-transformer module is further predicts the most frequent elements for all the users which
proposed to capture the multiple temporal dependencies of leads to unsatisfactory results. This reveals the importance
elements and sets [9]. of learning each user’s personal preference for temporal sets
r DNNTSP constructs set-level co-occurrence graphs to learn prediction.
the element relationships and uses the attention mechanism Second, DREAM is often superior to FPMC because FPMC
to capture temporal dependencies. The gating mechanism only utilizes the Markov chain to capture adjacent behaviors
is also employed to discover the shared patterns among while DREAM employs the RNNs to capture temporal depen-
elements [10]. dencies in the whole sequence of each user. This indicates that it
r ETGNN first connects the sequences of different users via is necessary to comprehensively mine the temporal information
a temporal graph and then learns from the graph according in users’ historical behaviors.
to an element-guided message aggregation mechanism and Third, TGN, RUM, HPMN, and DIN often achieve compet-
a temporal information utilization component [11]. itive or better results than the above baselines, indicating some
designs for memory networks or recommender systems can
also facilitate the prediction of temporal sets. RUM and HPMN
C. Experimental Settings perform better than TGN in most cases as they design specialized
To evaluate the model performance, we follow [10], [11] memory updating mechanisms (i.e., item-level and feature-level
to rank the top-K elements using the predicted probabilities versions in RUM, hierarchical and periodical mechanisms in
and set K to 10, 20, 30, and 40. We adopt Recall, Normal- HPMN). DIN learns element-specific representations for each
ized Discounted Cumulative Gain (NDCG), and Personal Hit user, which can effectively enhance the expressive ability of the
Ratio (PHR) as the evaluation metrics. Adam optimizer [43] model. However, all of them fail to handle the unique properties
is leveraged to optimize the models. We employ the cosine of sets and there is still space for improvement.
annealing learning rate scheduler [44] to change the learning Fourth, Sets2Sets, DSNTSP, DNNTSP, and ETGNN, which
rate. Dropout [45] is adopted to prevent models from over-fitting. are customized approaches for the temporal sets prediction

Authorized licensed use limited to: Zakir Husain College of Engineering & Technology. Downloaded on March 12,2024 at 04:50:27 UTC from IEEE Xplore. Restrictions apply.
YU et al.: CONTINUOUS-TIME USER PREFERENCE MODELLING FOR TEMPORAL SETS PREDICTION 1483

TABLE I
PERFORMANCE OF DIFFERENT METHODS ON ALL THE DATASETS

Authorized licensed use limited to: Zakir Husain College of Engineering & Technology. Downloaded on March 12,2024 at 04:50:27 UTC from IEEE Xplore. Restrictions apply.
1484 IEEE TRANSACTIONS ON KNOWLEDGE AND DATA ENGINEERING, VOL. 36, NO. 4, APRIL 2024

problem, usually yield better performance than other baselines.


In particular, Sets2Sets additionally explores repeated patterns
in user behaviors. DSNTSP learns both the element-level and
set-level representations for the sequence of each user. DNNTSP
studies the correlations of elements within each set and captures
the temporal dependencies of elements across different sets. ET-
GNN is the best baseline in most cases because it not only learns
element-specific representations that are aware of the temporal
information for each user but also captures the collaborative
signals in high-order user-element interactions.
Finally, CTTSP significantly outperforms the existing meth-
ods over all the metrics on all the datasets. The superiority of
our approach lies in 1) the continuous-time learning framework
to explicitly model the evolving user preferences and exploit
the latent collaborative signals among different users; 2) the
learning of personalized user behaviors, which can aggregate
the previously interacted elements of each user according to the
user and elements.

E. Performance Under Inductive Setting


CTTSP is endowed with the inductive ability because 1)
the memory of each user in the memory bank is identically
initialized as a zero vector at first. When a new user comes,
his/her memory can be updated according to the learned model
Fig. 3. Performance of different methods under the inductive setting. The
parameters; 2) the static embedding eu is shared across the users performance of TOP is not depicted due to its inferior performance.
in Section IV-B1, which is not influenced by new users. There-
fore, we evaluate the model performance under the inductive
setting, which predicts the next-period set for users that are
not contained in the training set. Note that FPMC, RUM, and
ETGNN could only be evaluated under the transductive setting
because they contain user-specific trainable parameters and are
inherently not inductive. We report the performance of different
methods in Fig. 3.
From Fig. 3, we find that the results of baselines vary across
different datasets, but our CTTSP often consistently achieves
better performance than baselines. The superiority of our ap-
proach under the inductive setting may be due to the learning
of memories of users and elements, which can help our model
discover the correlations across different users, and thus increase
the reasoning ability for new users. This advantage indicates the
potential of CTTSP in tackling the cold-start problems [47].
We also observe that Sets2Sets usually performs better than
baselines and it even achieves higher NDCG than our approach
on TaFeng. We owe such a phenomenon to the repeated user
behavior learning module in Sets2Sets, which is similar to the
PerTOP baseline but with trainable importance weights. PerTOP
achieves relatively good NDCG on TaFeng, and its trainable
version in Sets2Sets may contribute more and lead to higher Fig. 4. Effects of the continuous-time and personalized information of users
NDCG. on different datasets.

F. Effects of Continuous-Time and Personalized Information


0.3, 0.5, 0.7, 0.9, 0.95, 1.0] by fixing the user perspective im-
of Users portance λup as its best configuration. Due to space limitations,
We further investigate the importance of continuous-time and we report the results on all the datasets in Fig. 4, where K is set
personalized information of users. In particular, we vary the to 10. Similar trends could be observed when the values of K
continuous-time probability importance λcp in [0.0, 0.05, 0.1, are set to 20, 30, and 40.

Authorized licensed use limited to: Zakir Husain College of Engineering & Technology. Downloaded on March 12,2024 at 04:50:27 UTC from IEEE Xplore. Restrictions apply.
YU et al.: CONTINUOUS-TIME USER PREFERENCE MODELLING FOR TEMPORAL SETS PREDICTION 1485

Fig. 6. Ablation study of the proposed model on JingDong and TaoBao.

pooling operation over the related elements in each user-set


interaction when computing the user’s message and denote the
model as CTTSP w/o AUME. This indicates that CTTSP w/o
AUME does not distinguish the importance of different elements
Fig. 5. Effects of user and element perspectives on different datasets.
to the user. CTTSP w/o AEME is implemented by encoding
the message of each element according to the information of
the interacted user and the element itself, while the information
From Fig. 4, we can observe that the best settings of λcp of other elements in the same user-set interaction is ignored.
change over different datasets and reflect the datasets’ unique We employ Gated Recurrent Units (GRU) in [15] to replace
properties. Two representative datasets are JingDong and DC, the GUMU component for both users and elements, and denote
where the continuous-time user preferences are more obvious on the model as CTTSP w/o GUMU. Experimental results of the
JingDong, while DC is more likely to be affected by personalized variants on JingDong and TaoBao are shown in Fig. 6, where K
user behaviors. TaFeng and TaoBao tend to show the balance is set to 10.
of both continuous-time and personalized information of users. From Fig. 6, we can observe that CTTSP achieves the best
These findings suggest that it is necessary to select appropriate performance when it uses all the three components, and remov-
λcp according to the property of each dataset. ing any component would lead to worse results. In particular,
the AUME component encodes the user’s message by learning
G. Effects of User and Element Perspectives the importance of different elements. The AEME component
captures the intra-set relationships of elements when encoding
We also study the impacts of the user and element perspectives the message of each element. The GUMU component adaptively
on different datasets. Specifically, we first fix the continuous- selects the encoded message and historical memories according
time probability importance λcp as its best configuration and to the gated updating mechanism with fewer parameters than
then change the value of the user perspective importance λup in GRU, which may reduce the training difficulty [48].
[0.0, 0.05, 0.1, 0.3, 0.5, 0.7, 0.9, 0.95, 1.0]. Experimental results
on all the datasets are depicted in Fig. 5, where K is set to 10. I. Efficiency of the Set-Batch Algorithm
From Fig. 5, we conclude that different datasets depict varied
importance of the user perspective and element perspective. We validate the efficiency of the proposed set-batch algorithm
Specifically, JingDong and TaoBao are more likely to be influ- by comparing the running time of our CTTSP with CTTSP w/o
enced by the user perspective, while TaFeng pays more attention set-batch. It is worth noticing that the set-batch algorithm can
to the element perspective. DC keeps a balance of the user create time-consistent batches during the preprocessing phase in
and element perspective. Therefore, choosing suitable λup on advance, and thus does not introduce extra cost in the training and
different datasets is also essential for satisfactory prediction evaluation process. Moreover, there is no need to predetermine
performance. the number of batches as it is automatically provided by the
set-batch algorithm for different datasets. In the experiments,
the set-batch algorithm creates 1,349, 2,079, 12,652, and 9,266
H. Ablation Study batches on JingDong, DC, TaFeng, and TaoBao, respectively.
We further conduct the ablation study to validate the effective- This can significantly improve the model efficiency since the
ness of the Attention mechanism in the User Message Encoder model has to chronologically deal with 15,195, 42,905, 73,302,
(AUME), the Attention mechanism in the Element Message and 225,989 user-set interactions (see Appendix, available on-
Encoder (AEME), and the Gated Updating mechanism in the line) without the set-batch algorithm. We report the running time
Memory Updaters (GUMU). Specifically, we use the average of each epoch in the training and evaluation process in Table II.

Authorized licensed use limited to: Zakir Husain College of Engineering & Technology. Downloaded on March 12,2024 at 04:50:27 UTC from IEEE Xplore. Restrictions apply.
1486 IEEE TRANSACTIONS ON KNOWLEDGE AND DATA ENGINEERING, VOL. 36, NO. 4, APRIL 2024

TABLE II
RUNNING TIME OF CTTSP AND CTTSP W/O SET-BATCH ON
ALL THE DATASETS

Fig. 8. Analysis of the interpretability of our model.

Fig. 9. Analysis of how the learned collaborative signals benefit the prediction
of user u950 ’s next-period set.

Fig. 7. Log-scale evaluation time of different methods on JingDong and DC. observation demonstrates the effectiveness of our method in
The size of each point stands for the model parameter capacity. capturing implicit correlations of elements. Note that our model
does not explicitly access the category information of elements,
but it still well learns such information. We also note that a
From Table II, we could observe that the proposed set-batch
few elements in category 7 and category 69 are mixed with each
algorithm enables our CTTSP to be efficiently executed in a
other, which may indicate that their underlying relationships can
mini-batch manner and achieves 3.5× speedups in training and
not be sufficiently represented by the category information only.
3.0× speedups in evaluation on average. We also compare the
2) Continuous-Time User Preference Visualization: To con-
convergence of CTTSP and CTTSP w/o set-batch. The results
firm that our approach can track continuous-time user prefer-
show that the set-batch algorithm leads to faster and more stable
ences by learning evolving memories of users, we first obtain
convergence since it enables CTTSP to be trained in a mini-batch
all the memories of a sampled user, and then use t-SNE [50] to
manner rather than processing interactions one by one, which
project the memories into a two-dimensional space in Fig. 8(b).
can reduce the variance of the parameter updates [49].
Each point represents the projected memory of the user after
We further report the evaluation time of different methods on
he/she interacts with a set at a specific time, and different points
JingDong and DC in Fig. 7, where the x-axis is scaled by a log-
can reflect the time-evolving user preferences. The point shapes
arithmic function with base 2. The results on all the datasets are
are determined by the types of elements in the interacted set.
shown in the Appendix, available online. The model complexity
We chronologically connect the points with arrows based on the
of CTTSP comes from the Continuous-Time User Preference
interaction time, aiming to show the changes in user preferences
Modelling and Personalized User Behavior Learning compo-
along the time dimension. The involved elements and their
nents, which is relatively higher than the baselines. However,
categories are also shown near the arrows.
we also observe that CTTSP obtains the best performance with
From Fig. 8(b), we observe that the user’s preference is
acceptable increments in computational complexity. Therefore,
evolving over time with different categories of the interacted
we conclude that CTTSP can achieve a good trade-off between
elements. At first, the user displays a favor of element v1207 in
efficiency and effectiveness.
category 73. Then, the user interacts with elements v2432 , v312
and v3211 in category 24, and the user’s preference gradually
J. Model Interpretability transits to the bottom-right corner of the latent space. Finally,
We show the interpretability of our approach by conducting the user’s preference shifts to the top-right positions of the latent
experiments on the JingDong dataset. space because he/she shows interests in elements v2117 , v1959
1) Element Representation Visualization: We first choose and v306 in category 47. These observations indicate that our
four categories that have the top four numbers of elements, and approach can well capture the user’s evolutionary preference by
set the number of elements in each category to 100, leading to learning the continuously evolving memories.
400 elements in total. Then, we visualize the representations 3) Collaborative Signal Exploration: We present an intuitive
of the selected elements based on t-SNE [50]. The results are case to show the ability of our CTTSP in exploring the collab-
shown in Fig. 8(a). orative signals latent in different users. In particular, we choose
From Fig. 8(a), we could find that elements in the same cat- the sequences of three users including u93 , u179 and u950 , and
egory are closely gathered by our approach, and the boundaries our task is to predict u950 ’s next-period set, which contains a
between elements in different categories are relatively clear. This new element v104 that u950 has never interacted with.

Authorized licensed use limited to: Zakir Husain College of Engineering & Technology. Downloaded on March 12,2024 at 04:50:27 UTC from IEEE Xplore. Restrictions apply.
YU et al.: CONTINUOUS-TIME USER PREFERENCE MODELLING FOR TEMPORAL SETS PREDICTION 1487

The sequences of u93 , u179 and u950 are presented in Fig. 9. [10] L. Yu, L. Sun, B. Du, C. Liu, H. Xiong, and W. Lv, “Predicting temporal
We find that u93 and u179 show similar behaviors to user u950 , sets with deep neural networks,” in Proc. 26th ACM SIGKDD Conf. Knowl.
Discov. Data Mining, 2020, pp. 1083–1091.
and we mark the element transaction patterns (i.e., underlying [11] L. Yu, G. Wu, L. Sun, B. Du, and W. Lv, “Element-guided temporal graph
collaborative signals) with different colors. It would be helpful representation learning for temporal sets prediction,” in Proc. ACM Web
to leverage the collaborative signals when predicting the next- Conf., 2022, pp. 1902–1913.
[12] L. Li, H. Jing, H. Tong, J. Yang, Q. He, and B. Chen, “NEMO: Next
period set for user u950 . By chronologically learning from the career move prediction with contextual embedding,” in Proc. 26th Int.
constructed universal sequence that consists of all the users’ Conf. World Wide Web Companion, 2017, pp. 505–513.
historical behaviors, the proposed CTTSP first discovers the [13] N. Shi, L. Yu, L. Sun, L. Wang, C. Lin, and R. Zhang, “Deep heterogeneous
network for temporal set prediction,” Knowl. Based Syst., vol. 223, 2021,
collaborative signals latent in user u93 and user u179 , and then Art. no. 107039.
successfully predicts element v104 for user u950 within the top-5 [14] S. Hochreiter and J. Schmidhuber, “Long short-term memory,” Neural
results, while the baselines fail to do so. This observation demon- Comput., vol. 9, no. 8, pp. 1735–1780, 1997.
[15] K. Cho et al., “Learning phrase representations using RNN encoder-
strates the superiority of our CTTSP in exploring collaborative decoder for statistical machine translation,” in Proc. Conf. Empir. Methods
signals for improving prediction performance. Natural Lang. Process., 2014, pp. 1724–1734.
[16] D. Bahdanau, K. Cho, and Y. Bengio, “Neural machine translation by
jointly learning to align and translate,” in Proc. 3rd Int. Conf. Learn.
Representations, 2015.
VI. CONCLUSION [17] A. Vaswani et al., “Attention is all you need,” in Proc. Adv. Neural Inf.
Process. Syst., 2017, pp. 5998–6008.
In this article, we studied the temporal sets prediction problem [18] X. Chen et al., “Sequential recommendation with user memory networks,”
and pointed out the limitations of the existing methods in the in Proc. 11th ACM Int. Conf. Web Search Data Mining, 2018, pp. 108–116.
[19] J. Huang, W. X. Zhao, H. Dou, J. Wen, and E. Y. Chang, “Improving se-
implicit learning paradigm of user preferences. We proposed quential recommendation with knowledge-enhanced memory networks,”
a continuous-time learning framework to explicitly capture the in Proc. 41st Int. ACM SIGIR Conf. Res. Develop. Inf. Retrieval, 2018,
evolving user preferences by maintaining a memory bank, which pp. 505–514.
[20] S. Kumar, X. Zhang, and J. Leskovec, “Predicting dynamic embedding
could store the states of all the users and elements. We first trajectory in temporal interaction networks,” in Proc. 25th ACM SIGKDD
constructed a non-descending universal sequence to contain all Int. Conf. Knowl. Discov. Data Mining, 2019, pp. 1269–1278.
the user-set interactions, and then chronologically learned from [21] K. Ren et al., “Lifelong sequential modeling with personalized memoriza-
tion for user response prediction,” in Proc. 42nd Int. ACM SIGIR Conf.
each interaction. Our approach could update the memories of the Res. Develop. Inf. Retrieval, 2019, pp. 565–574.
user and elements for each interaction by message encoders and [22] T. Q. Chen, Y. Rubanova, J. Bettencourt, and D. Duvenaud, “Neural
memory updaters. A personalized user behavior learning module ordinary differential equations,” in Adv. Neural Inf. Process. Syst., 2018,
pp. 6572–6583.
was also devised to capture each user’s individual properties [23] Z. Li et al., “Fourier neural operator for parametric partial differential
by adaptively aggregating the historical sequence. Moreover, a equations,” in Proc. 9th Int. Conf. Learn. Representations, 2021.
set-batch algorithm was developed to improve the model effi- [24] P. J. Brockwell and R. A. Davis, Introduction to Time Series and Forecast-
ing. Berlin, Germany: Springer, 2016.
ciency. Extensive experiments on four benchmarks showed that [25] H. Zhou et al., “Informer: Beyond efficient transformer for long sequence
our approach significantly outperformed the existing baselines time-series forecasting,” in Proc. 35th AAAI Conf. Artif. Intell., AAAI
and revealed good interpretability. Press, 2021, pp. 11106–11115.
[26] B. Hidasi, A. Karatzoglou, L. Baltrunas, and D. Tikk, “Session-based
recommendations with recurrent neural networks,” in Proc. 4th Int. Conf.
Learn. Representations, 2016.
REFERENCES [27] G. Zhou et al., “Deep interest network for click-through rate prediction,”
in Proc. 24th ACM SIGKDD Int. Conf. Knowl. Discov. Data Mining, 2018,
[1] A. R. Benson, R. Kumar, and A. Tomkins, “Sequences of sets,” in pp. 1059–1068.
Proc. 24th ACM SIGKDD Int. Conf. Knowl. Discov. Data Mining, 2018, [28] R. Ying, R. He, K. Chen, P. Eksombatchai, W. L. Hamilton, and J.
pp. 1148–1157. Leskovec, “Graph convolutional neural networks for web-scale recom-
[2] S. Rendle, C. Freudenthaler, and L. Schmidt-Thieme, “Factorizing per- mender systems,” in Proc. 24th ACM SIGKDD Int. Conf. Knowl. Discov.
sonalized Markov chains for next-basket recommendation,” in Proc. 19th Data Mining, 2018, pp. 974–983.
Int. Conf. World Wide Web, 2010, pp. 811–820. [29] X. Wang, X. He, M. Wang, F. Feng, and T. Chua, “Neural graph collab-
[3] F. Yu, Q. Liu, S. Wu, L. Wang, and T. Tan, “A dynamic recurrent model for orative filtering,” in Proc. 42nd Int. ACM SIGIR Conf. Res. Develop. Inf.
next basket recommendation,” in Proc. 39th Int. ACM SIGIR Conf. Res. Retrieval, 2019, pp. 165–174.
Develop. Inf. Retrieval, 2016, pp. 729–732. [30] T. N. Kipf and M. Welling, “Semi-supervised classification with graph
[4] Y. Zhu et al., “What to do next: Modeling user behaviors by time-LSTM,” convolutional networks,” in Proc. 5th Int. Conf. Learn. Representations,
in Proc. 26th Int. Joint Conf. Artif. Intell., 2017, pp. 3602–3608. 2017.
[5] B. Jin, H. Yang, L. Sun, C. Liu, Y. Qu, and J. Tong, “A treatment engine [31] W. L. Hamilton, Z. Ying, and J. Leskovec, “Inductive representation
by predicting next-period prescriptions,” in Proc. 24th ACM SIGKDD Int. learning on large graphs,” in Proc. Adv. Neural Inf. Process. Syst., 2017,
Conf. Knowl. Discov. Data Mining, 2018, pp. 1608–1616. pp. 1024–1034.
[6] P. Zhao et al., “Where to go next: A spatio-temporal gated network for [32] P. Velickovic, G. Cucurull, A. Casanova, A. Romero, P. Liò, and Y. Bengio,
next POI recommendation,” in Proc. 33rd AAAI Conf. Artif. Intell., AAAI “Graph attention networks,” in Proc. 6th Int. Conf. Learn. Representations,
Press, 2019, pp. 5877–5884. 2018.
[7] L. Zhang et al., “An interactive multi-task learning framework for next [33] X. He, K. Deng, X. Wang, Y. Li, Y. Zhang, and M. Wang, “LightGCN:
POI recommendation with uncertain check-ins,” in Proc. 29th Int. Joint Simplifying and powering graph convolution network for recommenda-
Conf. Artif. Intell., 2020, pp. 3551–3557. tion,” in Proc. 43rd Int. ACM SIGIR Conf. Res. Develop. Inf. Retrieval,
[8] H. Hu and X. He, “Sets2Sets: Learning from sequential sets with neural 2020, pp. 639–648.
networks,” in Proc. 25th ACM SIGKDD Int. Conf. Knowl. Discov. Data [34] S. M. Kazemi et al., “Representation learning for dynamic graphs: A
Mining, 2019, pp. 1491–1499. survey,” J. Mach. Learn. Res., vol. 21, pp. 70:1–70:73, 2020.
[9] L. Sun, Y. Bai, B. Du, C. Liu, H. Xiong, and W. Lv, “Dual sequential [35] X. Chang et al., “Continuous-time dynamic graph learning via neural
network for temporal sets prediction,” in Proc. 43rd Int. ACM SIGIR Conf. interaction processes,” in Proc. 29th ACM Int. Conf. Inf. Knowl. Manage.,
Res. Develop. Inf. Retrieval, 2020, pp. 1439–1448. 2020, pp. 145–154.

Authorized licensed use limited to: Zakir Husain College of Engineering & Technology. Downloaded on March 12,2024 at 04:50:27 UTC from IEEE Xplore. Restrictions apply.
1488 IEEE TRANSACTIONS ON KNOWLEDGE AND DATA ENGINEERING, VOL. 36, NO. 4, APRIL 2024

[36] D. Xu, C. Ruan, E. Körpeoglu, S. Kumar, and K. Achan, “Inductive Zihang Liu received the BS degree in 2021. He is
representation learning on temporal graphs,” in Proc. 8th Int. Conf. Learn. currently working toward the MS degree in computer
Representations, 2020. science and engineering with Beihang University. His
[37] E. Rossi, B. Chamberlain, F. Frasca, D. Eynard, F. Monti, and M. M. Bron- research interests include time-series data mining,
stein, “Temporal graph networks for deep learning on dynamic graphs,” recommendation system, and graph neural networks.
2020, arXiv:2006.10637.
[38] Z. Fan, Z. Liu, J. Zhang, Y. Xiong, L. Zheng, and P. S. Yu, “Continuous-
time sequential recommendation with temporal graph collaborative trans-
former,” in Proc. 30th ACM Int. Conf. Inf. Knowl. Manage., 2021,
pp. 433–442.
[39] L. Yu, L. Sun, B. Du, and W. Lv, “Towards better dynamic graph learning:
New architecture and unified library,” 2023, arXiv:2303.13047. Leilei Sun received the BS, MS and PhD degrees
[40] I. M. Baytas, C. Xiao, X. Zhang, F. Wang, A. K. Jain, and J. Zhou, “Patient from the Dalian University of Technology, in 2009,
subtyping via time-aware LSTM networks,” in Proc. 23rd ACM SIGKDD 2012, and 2017, respectively. He is currently an asso-
Int. Conf. Knowl. Discov. Data Mining, 2017, pp. 65–74. ciate professor with the State Key Laboratory of Soft-
[41] J. Wu et al., “On the effectiveness of sampled softmax loss for item ware Development Environment (SKLSDE), School
recommendation,” 2022, arXiv:2201.02327. of Computer Science, Beihang University. He was a
[42] D. Lian, Q. Liu, and E. Chen, “Personalized ranking with importance postdoctoral research fellow from 2017 to 2019 with
sampling,” in Proc. Web Conf., 2020, pp. 1093–1103. Tsinghua University. His research interests include
[43] D. P. Kingma and J. Ba, “Adam: A method for stochastic optimization,” machine learning and data mining.
in Proc. 3rd Int. Conf. Learn. Representations, 2015.
[44] I. Loshchilov and F. Hutter, “SGDR: Stochastic gradient descent with
warm restarts,” in Proc. 5th Int. Conf. Learn. Representations, 2017.
[45] N. Srivastava, G. E. Hinton, A. Krizhevsky, I. Sutskever, and R. Salakhutdi- Bowen Du received the PhD degree in computer
nov, “Dropout: A simple way to prevent neural networks from overfitting,” science and engineering from Beihang University,
J. Mach. Learn. Res., vol. 15, no. 1, pp. 1929–1958, 2014. Beijing, China, in 2013. He is currently a professor
[46] A. Paszke et al., “Pytorch: An imperative style, high-performance deep with the State Key Laboratory of Software Develop-
learning library,” in Proc. Adv. Neural Inf. Process. Syst., 2019, pp. 8024– ment Environment, Beihang University. His research
8035. interests include smart city technology, multi-source
[47] H. Lee, J. Im, S. Jang, H. Cho, and S. Chung, “MeLU: Meta-learned user data fusion, and traffic data mining.
preference estimator for cold-start recommendation,” in Proc. 25th ACM
SIGKDD Int. Conf. Knowl. Discov. Data Mining, 2019, pp. 1073–1082.
[48] R. Pascanu, T. Mikolov, and Y. Bengio, “On the difficulty of training
recurrent neural networks,” in Proc. 30th Int. Conf. Mach. Learn., 2013,
pp. 1310–1318. Chuanren Liu received the BS degree from the Uni-
[49] S. Ruder, “An overview of gradient descent optimization algorithms,” versity of Science and Technology of China (USTC),
2016, arXiv:1609.04747. the MS degree from the Beijing University of Aero-
[50] L. Van der Maaten and G. Hinton, “Visualizing data using t-SNE,” J. Mach. nautics and Astronautics (BUAA), and the PhD de-
Learn. Res., vol. 9, no. 11, pp. 2579–2605, 2008. gree from Rutgers, the State University of New Jersey.
He is currently an associate professor with the Busi-
ness Analytics and Statistics Department at the Uni-
versity of Tennessee, Knoxville, USA. His research
interests include data mining and machine learning,
and their applications in business analytics.

Le Yu received the BS degree from the School of Weifeng Lv received the BS degree in computer
Computer Science and Engineering at Beihang Uni- science and engineering from Shandong University,
versity, Beijing, China, in 2019. He is currently work- Jinan, China, and the PhD degree in computer science
ing toward the PhD degree in computer science with and engineering from Beihang University, Beijing,
the School of Computer Science and Engineering, China, in 1992 and 1998, respectively. Currently, he
Beihang University. His research interests include is a professor with the State Key Laboratory of Soft-
temporal data mining, user behavior modeling, and ware Development Environment, Beihang University,
graph neural networks. Beijing, China. His research interests include smart
city technology and mass data processing.

Authorized licensed use limited to: Zakir Husain College of Engineering & Technology. Downloaded on March 12,2024 at 04:50:27 UTC from IEEE Xplore. Restrictions apply.

You might also like