Learning Approximate MRFs from Large Transaction Data

Chao Wang, Srinivasan ParthasarathyPKDD 2006

Abstract

Building Markov Random Fields (MRFs) for high-dimensional, sparse transaction data is a significant challenge due to the exponential growth of treewidth. Traditional approaches often rely on learning local models on-the-fly, which is computationally expensive for real-time applications. This paper presents a "divide-and-conquer" framework that constructs a global approximate MRF offline. By partitioning variables into clusters and strategically augmenting them while controlling treewidth, the proposed method achieves query response times orders of magnitude faster than online local models while maintaining high estimation accuracy.

Introduction

In domains such as retail market basket analysis and web analytics, estimating the joint probability of itemsets—known as selectivity estimation—is crucial for database optimization and recommendation systems. However, learning an exact MRF for thousands of variables is NP-hard because the underlying graph complexity, or treewidth, explodes. Previous methods that learn small "local" models per query are too slow for real-time use. This work addresses the need for a global model that can be built offline to provide near-instantaneous online query responses.

Methodology

The proposed pipeline for learning an approximate global MRF involves several key stages:

  1. Graph Partitioning ($k$-MinCut): Items are represented as nodes in a graph with edges weighted by frequent itemset occurrences. A $k$-MinCut algorithm partitions these nodes into $k$ balanced groups, minimizing the loss of inter-cluster correlations.
  2. Variable-Cluster Augmentation: To recover lost correlations, each cluster is "grown" by incorporating the most significant neighboring variables from other clusters.
  3. Treewidth-Based Complexity Control: A novel thresholding scheme limits cluster growth based on treewidth rather than just variable count. This ensures that the resulting sub-graphs remain mathematically tractable for exact inference.
  4. Iterative Scaling: Standard iterative scaling is used to learn exact local MRFs for each augmented cluster.
  5. Greedy Inference: A greedy algorithm handles online queries by selecting the local MRFs that best cover the query variables and combining their probabilistic estimates.

Experimental Evaluation

The framework was evaluated on two standard high-dimensional datasets: the Microsoft Anonymous Web dataset (294 items) and the BMS-Webview1 dataset (497 items).

Performance and Accuracy

The global model demonstrates significant advantages in both speed and accuracy. As shown in the response time analysis, the proposed model is consistently two to three orders of magnitude faster than the Online Local Model (OLM) baseline.

Comparison of online query response times between the proposed global model (various k) and the OLM baseline.

Despite the approximate nature of the global model, its accuracy remains competitive. In many scenarios, particularly for larger query sizes, the global model achieves lower relative error than the baseline, demonstrating that the partitioning and augmentation strategy effectively captures essential dependencies.

Average relative error across different query sizes, comparing the approximate global MRF with the OLM baseline.

Discussion and Future Work

The success of this approach lies in shifting the computational burden to an offline phase and using treewidth as a formal complexity budget. By treating frequent itemsets as constraints, the model effectively bridges data mining techniques with probabilistic graphical models.

However, the current model is not "globally consistent," as overlapping local MRFs may yield slightly different probabilities for shared variables. Future work will explore the use of belief propagation to enforce global consistency. Additionally, while the greedy inference heuristic performs well, further research into more robust inference schemes and broader applications in bioinformatics and link analysis is planned.

Summary updated

BibTeX
@inproceedings{wang2006learning,
  author = {Chao Wang and Srinivasan Parthasarathy},
  title = {{Learning Approximate MRFs from Large Transaction Data}},
  booktitle = {PKDD},
  year = {2006},
  doi = {10.1007/11871637\_66},
}
Figure