TL;DR
This paper introduces a scalable Bayesian model for non-negative tensor factorization designed specifically for massive, sparse count data. By leveraging a clever mathematical reparameterization, the algorithm's computational complexity scales only with the number of non-zero entries, allowing it to easily handle massive datasets on a single desktop. Furthermore, the model automatically infers the underlying rank of the tensor, eliminating the need for tedious manual tuning.
What Problem Does This Paper Address?
Multiway data—or tensors—are everywhere. Think of a dataset tracking how many times an author publishes a specific word in a certain journal during a given year. This is a 4-way count tensor. Analyzing these tensors through factorization helps us uncover hidden structures, cluster similar items, or predict missing values (tensor completion).
However, real-world count tensors present three major headaches for machine learning practitioners:
- The Curse of Zeros: They are incredibly sparse (often >99% zero). Standard negative-binomial models waste massive computational effort processing these zeros.
- Overdispersion: The variance of count data is often much larger than the mean, causing simple Poisson models to fit poorly.
- Unknown Rank: Determining the number of latent components (the rank) is an NP-complete problem, usually requiring expensive trial-and-error cross-validation.
Existing scalable tensor tools often assume Gaussian noise (which fails on counts) or require massive distributed computing clusters to handle large datasets. This paper tackles all three challenges simultaneously with a single-machine solution.
Methods
The authors introduce the Beta-Negative Binomial CP (BNBCP) decomposition model.
The Core Model
Instead of a standard Poisson distribution, they use a hierarchical Gamma-Beta prior structure over the Poisson intensity parameter. This effectively constructs a Negative Binomial framework capable of naturally absorbing overdispersed count data. To enforce non-negativity and ensure the factors are highly interpretable, they place a Dirichlet prior over the columns of the factor matrices. This forces each factor to act as a valid probability distribution (akin to "topics" in topic modeling).
The Conjugacy Trick (Data Augmentation)
The raw generative model is non-conjugate, making inference notoriously difficult. The authors solve this by reparameterizing the Poisson distribution into a Multinomial distribution of latent counts. This data augmentation step unlocks conditional conjugacy, yielding clean, closed-form update equations for both Gibbs sampling and Variational Bayes (VB) inference. Crucially, this trick means the sufficient statistics completely ignore the zero entries in the tensor.
Scaling Up: Online Inference
To scale beyond batch processing, the authors develop two online inference algorithms that process data in small minibatches:
- Conditional Density Filtering (CDF): An online MCMC approach that updates conditional sufficient statistics sequentially.
- Stochastic Variational Inference (SVI): An online VB approach that uses stochastic gradients to update variational parameters.
Datasets
The model was evaluated across four distinct datasets:
- Synthetic Data: A $300 \times 300 \times 300$ tensor with a true rank of 20, used to verify rank-estimation accuracy.
- GDELT (Political Science): A $220 \times 220 \times 20 \times 52$ tensor tracking country-to-country interactions, action types, and weeks for the year 2012.
- Publications Data (Scholars): A $2425 \times 9088 \times 4068$ tensor mapping authors, words, and publication venues from Duke University.
- Transactions (Food) Data: A massive $117,054 \times 438 \times 67,095$ tensor mapping households, stores, and items, containing roughly 6.2 million non-zero entries.
Key Insights and Ideas
- Zeros Don't Matter: By framing the latent counts as a multinomial draw, the zero entries contribute nothing to the parameter updates. The computational complexity drops from depending on the total tensor size to depending strictly on the number of non-zero entries ($N$).
- Automatic Rank Pruning: By setting a generous upper bound on the rank ($R$), the Gamma-Beta hierarchical prior automatically shrinks the weights ($\lambda_r$) of irrelevant factors to near-zero. The model learns the true rank dynamically during inference.
- Factors as Topics: Because of the Dirichlet priors, the learned factors are directly interpretable. In the transaction dataset, for instance, one factor naturally maps to "wholesale shopping," cleanly grouping stores like Costco with bulk-purchased items.
Key Results
- Superior Tensor Completion: In a 95%/5% train/test split, BNBCP consistently achieved higher log-likelihoods and lower Mean Absolute Errors (MAE) than state-of-the-art baselines like Bayesian Poisson Tensor Factorization (BAYESPTF) and Low-Rank Approximation Non-negative Tensor Decomposition (LRANTD).
- Bypassing Memory Walls: On the massive Food Transactions dataset, standard baselines either crashed due to out-of-memory errors or were entirely infeasible due to expensive tensor-flattening operations. BNBCP processed it seamlessly.
- Blazing Fast Convergence: The online algorithms (CDF and SVI) converged to high-quality solutions significantly faster than their batch counterparts on large-scale data.
- Qualitative Discovery: On the GDELT dataset, the model successfully isolated specific real-world historical events—such as Julian Assange seeking asylum in Ecuador—by cleanly aligning the spikes in the learned country and time factors.
Per-Iteration Running Times (Scholars Data)
| Method | Time (Seconds) |
|-----------------|----------------|
| PTF (Baseline) | ~150s |
| BNBCP-Gibbs | ~10s |
| BNBCP-VB | ~30s |
| BNBCP-CDF | < 5s |
Limitations and Future Work
While the proposed model demonstrates excellent scalability on a single machine, the authors note that they have not yet implemented it in a distributed computing environment. However, they emphasize that the simplicity of the closed-form update equations makes the framework naturally amenable to parallel architectures like MapReduce or Hadoop, which they flag as an explicit direction for future engineering efforts.
Summary updated