[Paper Review] Discrete Factorization Machines for Fast Feature-based Recommendation
This paper proposes Discrete Factorization Machines (DFM), a novel binary embedding model that binarizes feature embeddings in Factorization Machines to enable fast, low-memory recommendation on resource-constrained devices. By jointly optimizing binary parameters with balanced and decorrelated constraints via an alternating optimization algorithm, DFM achieves near-real-valued FM performance while accelerating inference by up to 17.5x on real-world datasets.
User and item features of side information are crucial for accurate recommendation. However, the large number of feature dimensions, e.g., usually larger than 10^7, results in expensive storage and computational cost. This prohibits fast recommendation especially on mobile applications where the computational resource is very limited. In this paper, we develop a generic feature-based recommendation model, called Discrete Factorization Machine (DFM), for fast and accurate recommendation. DFM binarizes the real-valued model parameters (e.g., float32) of every feature embedding into binary codes (e.g., boolean), and thus supports efficient storage and fast user-item score computation. To avoid the severe quantization loss of the binarization, we propose a convergent updating rule that resolves the challenging discrete optimization of DFM. Through extensive experiments on two real-world datasets, we show that 1) DFM consistently outperforms state-of-the-art binarized recommendation models, and 2) DFM shows very competitive performance compared to its real-valued version (FM), demonstrating the minimized quantization loss. This work is accepted by IJCAI 2018.
Motivation & Objective
- To address the high computational and storage cost of real-valued Factorization Machines (FM) in large-scale, feature-rich recommendation systems.
- To enable fast, on-device inference for mobile and resource-limited recommendation applications.
- To minimize quantization loss when binarizing FM parameters, preserving model accuracy.
- To develop an end-to-end optimization framework for discrete, balanced, and decorrelated binary embeddings.
- To outperform existing hash-based and binarized recommendation models in both efficiency and accuracy.
Proposed method
- Binarize the real-valued feature embedding matrix V ∈ ℝ^{k×n} into a binary matrix B ∈ {±1}^{k×n} to enable bit-level operations and compact storage.
- Propose an alternating optimization algorithm to jointly solve the discrete optimization problem under binary, balanced, and decorrelated constraints.
- Introduce a convergent updating rule that directly optimizes binary parameters end-to-end, avoiding the two-stage approach of learning then rounding.
- Use XOR-based operations instead of floating-point multiplications for fast user-item score computation in the binary space.
- Apply de-correlation and balance constraints to ensure compact and informative binary codes that preserve semantic information.
- Implement the model in C++ for fair efficiency comparison with libFM, using the same compiler and hardware.
Experimental results
Research questions
- RQ1Can binarizing FM parameters significantly reduce inference time and memory usage while maintaining high recommendation accuracy?
- RQ2How does end-to-end discrete optimization of binary embeddings compare to the standard two-stage approach of learning real-valued parameters then binarizing them?
- RQ3To what extent can a discrete factorization machine match the performance of its real-valued FM counterpart?
- RQ4How sensitive is DFM to hyperparameters such as de-correlation constraint and regularization compared to existing models?
- RQ5What is the practical speedup of DFM over real-valued FM in real-world recommendation workloads?
Key findings
- DFM achieves an average speedup of 15.99x and 16.04x over libFM on Yelp and Amazon datasets, respectively, with acceleration ratios stable around 16x across code lengths from 8 to 64.
- On both Yelp and Amazon, DFM outperforms state-of-the-art binarized recommendation models in NDCG@10, demonstrating superior generalization and robustness.
- When de-correlation and L2 regularization are set to zero, DFM degrades by only 1.91% and 2.05% on Yelp and Amazon, respectively, while libFM degrades by 10.44% and 6.56%, showing DFM's robustness to hyperparameter settings.
- DFM achieves recommendation performance within 2% of the real-valued FM baseline on both datasets, indicating minimal quantization loss despite full binarization.
- The proposed alternating optimization algorithm converges and successfully learns balanced, decorrelated binary codes that preserve predictive power.
- The efficiency and accuracy trade-off of DFM makes it suitable for deployment in large-scale, mobile, and real-time recommendation systems.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.