Let \(q_i\) , and \(e_i\)  be the \(i^{th}\)  query pin and engaged pin in a batch \(\mathcal {B}\) , respectively. Let \(x_{q_i} \in \mathbb {R}^d\)  and \(x_{e_i} \in \mathbb {R}^d\)  be the embedding of these pins computed by MultiBiSage. Also, let \(C_\mathcal {B}=\lbrace e_1, ... e_{|\mathcal {B}|}\rbrace \)  be the set of all the engaged pins in the batch. Then, we minimize the sampled softmax loss function [1]} as shown below:
\(- \frac{1}{|\mathcal {B}|} \sum _{i=1}^{|\mathcal {B}|} log \frac{e^{\langle x_{q_i}, x_{e_i}\rangle \;- \;log\; Q_p(e_i|q_i)}}{ \sum _{e^{\prime } \in C_\mathcal {B}} e^{\langle x_{q_i}, x_{e^{\prime }}\rangle \;- \;log\; Q_p(e^{\prime }|q_i)}}\) 
