Abstract
Factorization Machines (FM) are a powerful class of models that incorporate higher-order interaction among features to add more expressive power to linear models. They have been used successfully in several real-world tasks such as click-prediction, ranking, and recommender systems. Despite using a low-rank representation for the pairwise features, the memory overheads of using factorization machines on large-scale real-world datasets can be prohibitively high. For instance, on the Criteo Tera dataset, assuming a modest 128-dimensional latent representation and $10^9$ features, the memory requirement for the model is in the order of 1 TB. In addition, the data itself occupies 2.1 TB. Traditional algorithms for FM which work on a single-machine are not equipped to handle this scale; therefore, using a distributed algorithm to parallelize the computation across a cluster is inevitable. In this work, we propose a hybrid-parallel stochastic optimization algorithm, DS-FACTO, which partitions both the data as well as parameters of the factorization machine simultaneously. Our solution is fully decentralized and does not require the use of any parameter servers. We present empirical results to analyze the convergence behavior, predictive power, and scalability of DS-FACTO.
Introduction
Factorization Machines (FMs) are widely considered the "universal workhorse" of modern recommendation systems and click-through rate (CTR) prediction. By modeling high-order interactions between features using low-rank latent vectors, they provide significantly more expressive power than simple linear models. However, as datasets grow to the terabyte scale, FMs encounter a critical bottleneck: the model parameters themselves become too large to fit in the memory of a single machine.
Training FMs on massive, sparse datasets presents two major hurdles. First is the Memory Overhead: a second-order FM with $10^9$ features and 128 latent dimensions requires roughly 1 TB of RAM for parameters, plus another 2 TB for the data. Second is the Communication Bottleneck: existing distributed frameworks often rely on a "Parameter Server" (master-slave topology). As the number of workers increases, the central server becomes a bottleneck, struggling to synchronize updates from every node simultaneously.
The DS-FACTO Algorithm
The DS-FACTO algorithm addresses these challenges through a "hybrid-parallel" approach that partitions both the data (rows) and the parameters (columns) across workers while remaining fully decentralized.
Double Separability and Peer-to-Peer Topology
DS-FACTO partitions the data matrix $X$ into row-blocks and the parameter matrices ($w$ and $V$) into column-blocks. Each worker "owns" a piece of the data and a piece of the model. The algorithm employs a decentralized peer-to-peer topology, eliminating the need for a master server. Workers are arranged in a ring; they process a block of parameters, update them using their local data, and then "toss" the updated parameters to the next worker in the queue.
Incremental Synchronization
Standard FM gradients require global terms, such as the sum of all feature interactions. Typically, this necessitates a "Bulk Synchronous Parallel" (BSP) step where all workers wait at a barrier. DS-FACTO instead computes these terms incrementally using partial sums, allowing workers to continue processing without waiting.
As shown in Figure 1, the algorithm maintains auxiliary variables $G$ and $A$ to facilitate these incremental updates. This approach allows for asynchronous communication while maintaining the necessary global state for accurate gradient computation.
Staleness Management and Parameter Updates
Because updates are asynchronous, parameters can become "stale." DS-FACTO introduces a specific re-computation step for auxiliary variables to ensure the model converges to the correct solution. Unlike standard implementations like libFM, which update all dimensions for every data point, DS-FACTO is stochastic in terms of dimensions, achieving solution quality through many small, partial updates.
Figure 5 illustrates the update process for the linear weights $w$ and the latent factor matrix $V$. By partitioning these updates, the memory footprint per worker remains low, even for high-dimensional latent spaces.
Experimental Evaluation
The authors evaluated DS-FACTO on four real-world datasets: diabetes (small), housing (small), ijcnn1 (medium), and realsim (large/sparse). While the Criteo Terabyte dataset motivates the work, these benchmarks demonstrate the algorithm's core properties.
Key results include:
- Convergence: DS-FACTO consistently reaches the same objective value and predictive accuracy (RMSE for regression, Accuracy for classification) as libFM, the industry-standard single-machine implementation.
- Scalability: On the
realsimdataset, DS-FACTO demonstrated near-linear speedup as the number of CPU cores increased from 1 to 32. - Efficiency: The algorithm handles high-dimensional latent spaces ($K \ge 16$) while maintaining a low memory footprint per worker.
Discussion and Conclusion
A significant insight from the scalability tests is the impact of thread contention. The overhead of managing sender/receiver queues in an asynchronous environment can be high, explaining why the algorithm sometimes scales better across physical CPU cores than across multiple threads on the same core.
In conclusion, DS-FACTO provides a robust, decentralized framework for training Factorization Machines at scale. Future work includes extending the algorithm to higher-order interactions and adapting it for Field-aware Factorization Machines (FFMs), which would benefit significantly from this doubly separable approach.
Summary updated