$u_1$ and $u_q$ taking same courses, and $u_2$ and $u_q$ sharing the dormitory. Given two patterns $tl_1=<12 a.m., campus>$ and $tl_2=<8 p.m., dormitory>$, the query user $u_q$ will be translated into two POIs $v_{q1}$ and $v_{q2}$, hence we should recommend for $u_q$ the POI $v_1$ in the left lower sub-figure and $v_2$ in the right lower sub-figure, which are the close neighbor of $v_{q1}$ and $v_{q2}$, respectively. The different recommending results $v_1$ and $v_2$ are caused by the effects of different spatiotemporal relations $tl_1$ and $tl_2$.

We now introduce the detail for STA. For each triple ($u$, $<$$t$, $l$$>$, $v$) in $D'$, the user $u$, the spatiotemporal pair $<$$t$, $l$$>$ ($tl$ in short), and POI $v$ corresponds to the head entity *h*, the relationship edge *r* and the tail entity *t* in TransR, respectively. Their embeddings are set as $\vec{u}$, $\vec{v}$ $\in$ $\Re^d$, and $\vec{tl}$ $\in$ $\Re^m$. For each spatiotemporal pair $tl$, we set a projection matrix $M_{tl} \in \Re^{d\times m}$ to project a user embedding $\vec{u}$ and a POI embedding $\vec{v}$ in the original entity space to $\vec{u_{tl}}=\vec{u}M_{tl}$ and $\vec{v_{tl}}=\vec{v}M_{tl}$ in the relation space, such that $\vec{u_{tl}} + \vec{tl} \approx \vec{v_{tl}}$. This indicates that a POI embedding $\vec{v_{tl}}$ should 