Optimized Algorithms to Sample Determinantal Point Processes

Nicolas Tremblay, Simon Barthelmé, Pierre-Olivier AmblardarXiv 2018

Abstract

Determinantal Point Processes (DPPs) are essential for modeling diversity in subset selection, yet their application is often hindered by the cubic computational complexity of the standard sampling algorithm. This paper presents an optimized approach that reduces the complexity of the item selection phase from $O(N\mu^3)$ to $O(N\mu^2)$, where $N$ is the dataset size and $\mu$ is the average sample size. By leveraging recursive updates and the properties of Schur complements, the proposed algorithms provide a mathematically rigorous and easy-to-implement solution for large-scale DPP sampling.

Introduction

In machine learning, tasks such as document summarization, image collection browsing, and sensor placement require the selection of subsets that are not only high-quality but also diverse. Determinantal Point Processes (DPPs) have emerged as a powerful probabilistic framework for these tasks due to their ability to model "negative correlation." Unlike standard random sampling, where items are chosen independently, a DPP ensures that if one item is selected, the probability of selecting another similar item decreases.

Despite their theoretical elegance, the practical adoption of DPPs has been limited by the computational cost of exact sampling. The standard sampling pipeline, popularized by Kulesza and Taskar, involves three distinct phases:

  1. Eigendecomposition of the kernel matrix $L$.
  2. Eigenvector sampling via Bernoulli trials.
  3. Item selection using a Gram-Schmidt-style orthogonalization process.

While the first phase is a one-time cost of $O(N^3)$, the third phase—item selection—is the primary bottleneck during the sampling loop, traditionally scaling as $O(N\mu^3)$. This report details an optimized algorithmic framework that reduces this bottleneck to $O(N\mu^2)$, making exact DPP sampling significantly more viable for large-scale applications.

Methodology

The core contribution of this work lies in the optimization of the item selection phase through a primal representation (Algorithm 3) and a dual representation (Algorithm 4).

The Primal Optimization

In the standard approach, the algorithm selects an item based on its relevance to the sampled eigenvectors and then performs a full orthogonalization of the basis relative to that item. This full update at every step leads to the $O(N\mu^3)$ complexity.

The optimized algorithm avoids full orthogonalization by deriving a recursive update for the selection probabilities. By maintaining a set of vectors $f_n$ and utilizing their scalar products, the algorithm can update the probability distribution across all $N$ items in $O(N)$ time per step. Given that the number of steps $k$ is approximately the average sample size $\mu$, the total complexity of the selection phase is reduced to $O(Nk^2)$, or $O(N\mu^2)$.

Dual Representation for Low-Rank Kernels

For scenarios where the kernel matrix $L$ is provided in a low-rank form ($L = \Psi^\top \Psi$), the authors introduce a dual algorithm. This version is specifically designed for memory efficiency, as it avoids the need to reconstruct large $N$-dimensional eigenvectors. For a low-rank kernel with dimension $d$, the dual algorithm operates in $O(Ndk)$, providing a significant speedup when $d \ll N$.

Theoretical Insights

The Schur Complement Connection

A key theoretical insight of this work is the demonstration that the iterative selection of items in a DPP is mathematically equivalent to computing Schur complements of the kernel matrix. This connection allows the transformation of a complex orthogonalization problem into a series of simpler, iterative vector updates. The authors provide formal proofs (Lemmas 2.1, 2.2, and 2.3) to ensure that these optimized updates produce samples from the exact same distribution as the original, more expensive methods.

Numerical Stability and Implementation

While the mathematical derivation is robust, the authors address the practicalities of finite-precision arithmetic. In practice, the calculated probabilities $p$ can drift and occasionally become slightly negative due to numerical errors. To maintain stability, the authors recommend:

  • Manually zeroing out indices that have already been sampled.
  • Clipping small negative values to zero to prevent algorithm failure.

Furthermore, the core update step can be expressed as a matrix-vector multiplication: $f_n = y_{s_n} - F_{n-1}F_{n-1}^t y_{s_n}$. This formulation is particularly advantageous as it allows the algorithm to leverage high-performance parallel BLAS (Basic Linear Algebra Subprograms) libraries, further increasing execution speed on modern hardware.

Discussion and Limitations

While the reduction from $O(N\mu^3)$ to $O(N\mu^2)$ is a substantial improvement, the algorithm still faces a "quadratic wall." As the desired sample size $\mu$ grows into the thousands, even the optimized exact sampler becomes computationally demanding.

Additionally, this optimization specifically targets the sampling phase. The initial eigendecomposition of the kernel matrix $L$ remains $O(N^3)$. This step continues to be the primary limiting factor for datasets with millions of items, unless the kernel is already available in a low-rank dual form. Future research directions include the exploration of sparse L-ensembles and divide-and-conquer strategies to further scale DPPs to massive datasets.

Conclusion

This technical report bridges the gap between complex theoretical bounds and practical implementation. By providing a "trivial to implement" $O(N\mu^2)$ algorithm, the authors make exact DPP sampling accessible to a wider range of practitioners. The emphasis on numerical stability and parallelization potential ensures that these algorithms are not just theoretically faster, but ready for deployment in production machine learning pipelines.

Summary updated

BibTeX
@misc{tremblay2018optimized,
  author = {Nicolas Tremblay and Simon Barthelmé and Pierre-Olivier Amblard},
  title = {{Optimized Algorithms to Sample Determinantal Point Processes}},
  year = {2018},
  eprint = {1802.08471},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/1802.08471},
}
Figure