Core-elements Subsampling for Alternating Least Squares

Dunyao Xue, Mengyu Li, Cheng Meng, Jingyi ZhangarXiv 2025 · DOI

Abstract

Alternating Least Squares (ALS) is a cornerstone algorithm for matrix factorization in large-scale recommender systems. However, its computational intensity poses significant challenges as datasets scale. This paper introduces Core-ALS, a novel subsampling framework that shifts the focus from traditional row-wise sampling to intelligent element-wise selection. By identifying and utilizing only the most mathematically informative "core elements" of a matrix, Core-ALS achieves substantial speedups while maintaining the predictive performance of full-data ALS, supported by rigorous theoretical approximation guarantees.

Introduction

Modern recommender systems, such as those powering Netflix or Amazon, rely on matrix factorization to predict user preferences from sparse interaction data. Among the various optimization techniques, Alternating Least Squares (ALS) is favored for its ability to handle missing data effectively. Despite its popularity, ALS is computationally expensive, requiring the iterative solution of millions of regression problems.

To mitigate this, researchers have historically turned to subsampling—performing computations on a representative subset of the data. Conventional methods typically employ row-wise sampling, selecting entire rows based on statistical importance (e.g., leverage scores). However, these methods often include "noisy" or uninformative data points, and the overhead of calculating sampling probabilities can sometimes outweigh the computational savings. Core-ALS addresses these inefficiencies by exploiting the inherent numerical sparsity of the matrices involved in the factorization process.

The Core-ALS Approach

The fundamental insight behind Core-ALS is that during the iterative process of ALS, the factor matrices often become "numerically sparse," meaning they are dominated by a small number of high-magnitude elements while the rest are near-zero. Traditional row-wise sampling is suboptimal in this context because it forces the inclusion of these uninformative low-magnitude values if they reside in a selected row.

Figure 1: Matrix decomposition $R \approx U \times M$ illustrating the numerical sparsity exploited by Core-ALS. Darker cells represent high-magnitude 'core' elements, while lighter cells represent near-zero values that can be safely ignored.

Core-ALS instead performs element-wise sampling. It identifies the "core elements"—those with the largest absolute values—within the columns of the matrices being updated. By setting all other elements to zero, the algorithm creates a "sparse sketch" of the matrix. This approach ensures that the mathematical "signal" is preserved while the "noise" is discarded, leading to a $(1+\epsilon)$ approximation of the full-data regression.

Implementation and Efficiency

To ensure that the process of finding core elements does not become a bottleneck, the authors implement several optimization strategies:

  1. Partial Quicksort: Rather than sorting entire matrices, the algorithm uses an optimized partial sort to identify the top-$k$ elements on the fly, minimizing selection overhead.
  2. Sparse Matrix Operations: By generating a sketched matrix that is primarily zeros, Core-ALS can leverage specialized sparse linear algebra routines, which are significantly faster than dense operations.
  3. Iterative Pre-sampling: A faster variant of the algorithm samples the matrices before major iteration loops rather than at every micro-regression step, further reducing the computational footprint.

Experimental Evaluation

The authors evaluated Core-ALS across diverse datasets, including synthetic low-rank matrices, the Netflix Prize benchmark, and a Bark Texture image restoration task.

Performance and Accuracy

The results demonstrate that Core-ALS provides massive speedups without compromising accuracy. On a 5000x5000 synthetic matrix, standard ALS required 222 seconds to converge, whereas Core-ALS (at a 10% sampling rate) completed the task in just 50.5 seconds. Similar results were observed in image restoration, where runtime dropped from 606 seconds to 137 seconds.

Crucially, despite using only 10% to 25% of the available data per step, Core-ALS achieved nearly identical accuracy to full-sample ALS. In comparative tests, it consistently outperformed Uniform Subsampling (UNIF) and Basic Leverage Subsampling (BLEV) on standard recommendation metrics such as Hit@5 and NDCG@10. Notably, BLEV often failed to provide real-world speedups due to the high computational cost of calculating leverage scores.

Discussion and Future Work

Core-ALS represents a significant step forward in making matrix factorization scalable for massive datasets. By focusing on high-signal elements, it circumvents the "overhead trap" that plagues many advanced sampling techniques.

However, some limitations remain. While Core-ALS reduces CPU time, current implementations still require the full matrices to be stored in memory for sampling. Future research will focus on developing memory-efficient implementations that do not require the entire dataset to reside in RAM. Additionally, the authors plan to extend this element-wise approach to low-rank tensor decomposition, addressing the challenges of multi-dimensional data where traditional sampling methods are even less effective.

Summary updated

BibTeX
@misc{xue2025core,
  author = {Dunyao Xue and Mengyu Li and Cheng Meng and Jingyi Zhang},
  title = {{Core-elements Subsampling for Alternating Least Squares}},
  year = {2025},
  eprint = {2509.18024},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2509.18024},
}
Figure