Abstract
Recent advances in neural networks have inspired people to design hybrid recommendation algorithms that can incorporate both (1) user-item interaction information and (2) content information including image, audio, and text. Despite their promising results, neural network-based recommendation algorithms pose extensive computational costs, making it challenging to scale and improve upon. In this paper, we propose a general neural network-based recommendation framework, which subsumes several existing state-of-the-art recommendation algorithms, and address the efficiency issue by investigating sampling strategies in the stochastic gradient descent training for the framework. We tackle this issue by first establishing a connection between the loss functions and the user-item interaction bipartite graph, where the loss function terms are defined on links while major computation burdens are located at nodes. We call this type of loss functions "graph-based" loss functions, for which varied mini-batch sampling strategies can have different computational costs. Based on the insight, three novel sampling strategies are proposed, which can significantly improve the training efficiency of the proposed framework (up to $\times 30$ times speedup in our experiments), as well as improving the recommendation performance. Theoretical analysis is also provided for both the computational cost and the convergence. We believe the study of sampling strategies have further implications on general graph-based loss functions, and would also enable more research under the neural network-based recommendation framework.
The Computational Bottleneck in Deep Recommendations
Deep learning has transformed recommendation systems, moving beyond simple ID-based matrix factorization to hybrid models that understand content—such as the text of a news article or the pixels of a product image. However, this power comes at a massive computational cost. Training these models can be hundreds of times slower than traditional methods because of the complexity of the underlying neural architectures.
The bottleneck lies in the Stochastic Gradient Descent (SGD) training process. In a standard mini-batch, random user-item pairs (links) are sampled. If an item appears in several pairs within a batch, a naive implementation might run an expensive CNN or RNN on that same item multiple times. This mismatch—where loss functions are defined on links but heavy computation happens at nodes—makes training deep hybrid models prohibitively slow for large-scale production.
A General Functional Embedding Framework
To address these challenges, the researchers propose a Functional Embedding framework. In this model, user and item representations are not just static IDs but are generated by differentiable functions $f(\cdot)$ and $g(\cdot)$ that process raw features $x_u$ and $x_v$.
Innovative Sampling Strategies
The core contribution of this work is the introduction of three "graph-based" sampling strategies designed to amortize computational costs:
- Stratified Sampling (by Items): Instead of picking random links, the algorithm selects an item first and then samples multiple users who interacted with it. This ensures the expensive item-side DNN is computed only once for an entire group of interactions.
- Negative Sharing: In recommendation tasks, "negative" examples (items the user did not interact with) are required. This strategy uses other items already present in the mini-batch as negatives for a given user, creating a dense web of training signals without additional forward passes.
- Stratified with Negative Sharing: A hybrid approach that groups by items to save compute while sharing those items as negatives to improve the gradient signal.
Key Results and Insights
The researchers evaluated their framework on real-world datasets like CiteULike and Yahoo! News. The results demonstrate that efficiency and accuracy are not mutually exclusive:
- Massive Speedups: On the CiteULike dataset using a CNN, the "Stratified with Negative Sharing" strategy was 15.5x faster per iteration and required fewer iterations to converge, resulting in a 29x total speedup over standard IID sampling.
- Improved Accuracy: Across both CNN and LSTM models, the proposed sampling strategies consistently achieved higher Recall@50. For example, on CiteULike, the best proposed strategy improved Recall from 0.47 to 0.49 compared to standard negative sampling.
- Theoretical Grounding: The authors proved that these sampling strategies provide an unbiased estimator of the gradient, ensuring mathematical soundness and guaranteed convergence to a local optimum.
By rethinking the relationship between graph nodes and links during training, this work provides a scalable path forward for deploying sophisticated deep learning models in real-time recommendation environments.
Summary updated