iALS++: Speeding up Matrix Factorization with Subspace Optimization

Steffen Rendle, Walid Krichene, Li Zhang, Yehuda KorenarXiv 2021

Introduction

In modern recommender systems, Implicit Alternating Least Squares (iALS) is a foundational algorithm for handling implicit feedback, such as clicks or views. By treating unobserved items as negative signals with lower weights, it provides a robust framework for collaborative filtering. However, as embedding dimensions ($d$) increase to capture more complex user-item relationships, iALS faces a significant scaling bottleneck due to its cubic computational complexity ($O(d^3)$).

While Coordinate Descent (iCD) was proposed to reduce this complexity to quadratic ($O(d^2)$), it introduced a new problem: hardware inefficiency. iCD updates single scalars at a time, preventing modern CPUs from utilizing Single Instruction, Multiple Data (SIMD) vector processing units. This creates a "performance gap" where iALS is faster for small dimensions due to hardware acceleration, while iCD is theoretically better but practically slow for large dimensions.

Subspace Optimization with iALS++

The authors propose iALS++, a novel solver that bridges this gap using Subspace Optimization. Instead of choosing between updating the entire vector (iALS) or a single coordinate (iCD), iALS++ updates a subvector (or "block") of dimensions of size $|\pi|$.

Algorithm 3: The iALS++ algorithm utilizing subspace optimization.

By selecting a moderate block size (e.g., 64), iALS++ achieves the best of both worlds:

  1. Algorithmic Efficiency: It maintains the lower $O(d^2)$ complexity characteristic of coordinate-style updates.
  2. Hardware Efficiency: The block size is large enough to fully saturate a CPU’s vector instructions (like AVX), allowing for high-speed parallel processing.

Complexity and Hardware Support

The primary advantage of iALS++ lies in its ability to balance theoretical complexity with practical execution speed. As shown in the comparison below, iALS++ is the only method that combines quadratic scaling with full support for vector instructions.

Comparison of runtime complexity, memory requirements, and hardware vectorization support across iALS variants.

Crucially, the block size $|\pi|$ is a system-related hyperparameter. It can be tuned to match specific hardware architectures without affecting the model's recommendation quality (NDCG or Recall), making it a seamless "drop-in" replacement for existing iALS or iCD implementations.

Key Results and Insights

The paper evaluates iALS++ on industry-standard benchmarks, including MovieLens 20M (ML20M) and the Million Song Dataset (MSD). The findings highlight several critical breakthroughs:

  • Massive Speedups: iALS++ is approximately 10x faster than iCD across all tested dimensions. For very large embeddings ($d=2048$), it is nearly two orders of magnitude faster than vanilla iALS.
  • High-Dimensional Feasibility: On the ML20M dataset, a 512-dimensional model can be trained in less than 3 minutes on a standard desktop CPU, a task that previously required significantly more time or specialized hardware.
  • Quality Invariance: The final recommendation accuracy remains identical across iALS, iCD, and iALS++, confirming that the speedup does not come at the cost of performance.

Conclusion

iALS++ corrects a long-standing misconception in the literature that coordinate descent is always superior to alternating least squares for large dimensions. By accounting for modern hardware capabilities through subspace optimization, iALS++ enables the use of high-dimensional embeddings in production recommender systems, providing better quality recommendations with significantly lower computational overhead.

Summary updated

BibTeX
@misc{rendle2021ials,
  author = {Steffen Rendle and Walid Krichene and Li Zhang and Yehuda Koren},
  title = {{iALS++: Speeding up Matrix Factorization with Subspace Optimization}},
  year = {2021},
  eprint = {2110.14044},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2110.14044},
}
Figure