LFTF: A Framework for Efficient Tensor Analytics at Scale

Fan Yang, Fanhua Shang, Yuzhen Huang, James Cheng, Jinfeng Li, Yunjian Zhao, Ruihao Zhao

TL;DR

This paper introduces LFTF, a novel distributed framework for efficient tensor factorization. By reformulating the problem to enable asynchronous execution, LFTF significantly speeds up tensor analytics, achieving up to 17x faster convergence and better scalability than existing methods on large, sparse datasets.

What Problem Does This Paper Address?

Tensors, which are multi-dimensional arrays, are powerful tools for modeling complex relationships in data (e.g., user-product-time interactions). Tensor factorization, analogous to matrix factorization, can uncover hidden patterns for applications like recommendation and anomaly detection. However, existing tensor factorization methods are computationally expensive and don't scale well to the massive, sparse real-world datasets common today. This poor scalability has limited their widespread adoption compared to matrix factorization techniques. The core challenge is to develop efficient and scalable distributed algorithms for tensor factorization that can handle large and sparse data.

Methods

The paper proposes LFTF (Lock-Free Tensor Factorization), a distributed algorithm that tackles the scalability issue by reformulating the tensor factorization problem to leverage asynchronous execution. Instead of traditional synchronous approaches like Alternating Least Squares (ALS) or Bulk Synchronous Parallel (BSP) for Stochastic Gradient Descent (SGD), LFTF uses a lock-free asynchronous SGD approach.

Key aspects of LFTF include:

  • Problem Reformulation: The K-th order tensor factorization problem is broken down into (K-1) matrix factorization subproblems, solved in stages.
  • Asynchronous SGD (AsyncPSGD): Within each stage, an asynchronous SGD algorithm is employed. This allows workers to update parameters without waiting for others, significantly reducing synchronization overhead.
  • Stage-based Processing: LFTF processes modes of the tensor in stages, alternating updates among different modes. This allows for efficient asynchronous updates within a stage and lighter synchronization between stages.
  • Data Layout: A specific data layout is designed where one mode is "migrating" (rows move between machines), another is "partitioned" (data split across machines), and the third is "replicated" (data copied to all machines). This optimizes for asynchronous communication.
  • Optimization for Faster Convergence: The authors found that terminating the asynchronous SGD process in a stage before it fully converges (using a parameter 'c') leads to faster overall LFTF convergence with comparable final error.

Datasets

The paper evaluated LFTF on three large real-world datasets:

  • Netflix: (user_id, movie_id, date)
  • YahooMusic: (user_id, music_id, artist_id)
  • AmazonMovie: (user_id, movie_id, word) - derived from movie reviews.

Additionally, five large synthetic datasets were generated with up to 10 billion observations to test scalability.

Key Insights and Ideas

  • Asynchronous Execution is Key: The core insight is that by reformulating the problem, LFTF can exploit asynchronous execution, eliminating the bottleneck of global synchronization that plagues many distributed machine learning algorithms.
  • "Good Enough" Convergence: Terminating the asynchronous SGD process in each stage early (before full convergence) leads to faster overall LFTF convergence. This is because the initial error reduction is much more impactful than later, marginal improvements, and the overhead of waiting for full convergence in each stage is avoided.
  • Optimized Data Layout for Asynchrony: The specific "migrating," "partitioned," and "replicated" roles for tensor modes are crucial for enabling efficient asynchronous data flow and computation.
  • LFTF's Adaptability: The framework is designed to be efficient on modern cluster architectures (shared-nothing) and can be extended to higher-order tensors and streaming data.

Key Results

  • Speedup: LFTF is significantly faster than existing methods, converging up to 17 times faster and orders of magnitude faster in some cases.
  • Scalability: LFTF scales linearly with the training set size, handling datasets up to 10 billion observations. It also demonstrates good horizontal scalability, with performance roughly halving when the number of machines doubles.
  • Efficiency: LFTF achieves much higher CPU and network throughput, with experiments showing the computation is largely CPU-bound due to efficient asynchronous processing.
  • Convergence Quality: LFTF achieves comparable or better RMSE (Root Mean Square Error) than other methods, often reaching a good RMSE much faster.

Limitations and Future Work

  • Memory for Higher-Order Tensors: For higher-order tensors (K > 3), LFTF requires replicating (K-1) copies of training data, which can limit scalability. The paper suggests mitigating this by using secondary storage and prefetching, but it remains a potential bottleneck.
  • Future Work:
    • Building more high-level data mining tools on top of LFTF for faster tensor analytics.
  • Extending the use of asynchrony to other areas of machine learning and data mining, leveraging frameworks like Husky.
  • Developing novel distributed algorithms for various big data problems using expressive frameworks that allow for more flexibility than MapReduce or Parameter Servers.

Summary updated

BibTeX
@article{yang2017lftf,
  author = {Fan Yang and Fanhua Shang and Yuzhen Huang and James Cheng and Jinfeng Li and Yunjian Zhao and Ruihao Zhao},
  title = {{LFTF: A Framework for Efficient Tensor Analytics at Scale}},
  journal = {Proc. VLDB Endow.},
  year = {2017},
  url = {https://openreview.net/forum?id=XIxvZ4gZX2},
}
Figure