Skip to main content
QUICK REVIEW

[Paper Review] A New Unbiased and Efficient Class of LSH-Based Samplers and Estimators for Partition Function Computation in Log-Linear Models

Ryan Spring, Anshumali Shrivastava|arXiv (Cornell University)|Mar 15, 2017
Machine Learning and AlgorithmsComputer Science18 references24 citations
TL;DR

This paper proposes a novel LSH-based sampling and unbiased estimation framework for efficient partition function computation in log-linear models. By leveraging locality-sensitive hashing to generate correlated, unnormalized samples in near-constant time, the method achieves sub-linear time complexity and significantly outperforms standard importance sampling and Gumbel-Max variants in accuracy and speed, enabling training of large-scale language models with only 1–2% of the original computation.

ABSTRACT

Log-linear models are arguably the most successful class of graphical models for large-scale applications because of their simplicity and tractability. Learning and inference with these models require calculating the partition function, which is a major bottleneck and intractable for large state spaces. Importance Sampling (IS) and MCMC-based approaches are lucrative. However, the condition of having a "good" proposal distribution is often not satisfied in practice. In this paper, we add a new dimension to efficient estimation via sampling. We propose a new sampling scheme and an unbiased estimator that estimates the partition function accurately in sub-linear time. Our samples are generated in near-constant time using locality sensitive hashing (LSH), and so are correlated and unnormalized. We demonstrate the effectiveness of our proposed approach by comparing the accuracy and speed of estimating the partition function against other state-of-the-art estimation techniques including IS and the efficient variant of Gumbel-Max sampling. With our efficient sampling scheme, we accurately train real-world language models using only 1-2% of computations.

Motivation & Objective

  • Address the computational bottleneck of partition function estimation in large-scale log-linear models, especially when the state space is enormous.
  • Overcome the limitations of existing importance sampling and Gumbel-Max methods, which suffer from high variance or poor accuracy due to inadequate proposal distributions.
  • Develop a provably unbiased estimator that operates in amortized sub-linear time using locality-sensitive hashing (LSH) for efficient sampling.
  • Demonstrate that the proposed method enables accurate training of real-world language models with drastically reduced computational cost.
  • Establish a new class of efficient, scalable estimators that are both accurate and practical for industrial-scale machine learning applications.

Proposed method

  • Use SimHash-based LSH to generate samples from the unnormalized target distribution in near-constant time per sample.
  • Construct an unbiased estimator by weighting LSH samples using their estimated collision probabilities, ensuring consistency despite correlation and unnormalization.
  • Leverage the maximum inner product search (MIPS) formulation via LSH to efficiently retrieve high-weight states without full enumeration.
  • Control sample set size by tuning LSH parameters (K, L) and applying rejection sampling to meet desired sample counts.
  • Integrate the LSH-based estimator into stochastic gradient descent for training log-linear models, replacing exact partition function computation.
  • Use a fixed-size sample set with adjusted importance weights to maintain unbiasedness while controlling computational overhead.

Experimental results

Research questions

  • RQ1Can LSH-based sampling provide an unbiased and efficient alternative to standard importance sampling for partition function estimation in log-linear models?
  • RQ2Does the proposed method achieve sub-linear time complexity while maintaining high accuracy in estimating the partition function?
  • RQ3How does the performance of the LSH-based estimator compare to exact Gumbel-Max and approximate MIPS-Gumbel methods in terms of accuracy and speed?
  • RQ4Can the proposed estimator enable effective training of large-scale language models with minimal computational overhead?
  • RQ5What is the impact of sample size and LSH parameter tuning on the accuracy and efficiency of the partition function estimate?

Key findings

  • The LSH-based estimator achieves near-constant time sampling per sample, enabling amortized sub-linear time computation of the partition function.
  • On the PTB and Text8 datasets, the LSH estimator matches the accuracy of the exact Gumbel method (MAE ≈ 91.8 and 140.7) while being significantly faster than exact methods.
  • The Uniform IS estimator exhibits high variance and poor performance, with perplexity reaching 524.3 on PTB, highlighting its instability.
  • The MIPS Gumbel approach diverged during training due to inaccurate partition function estimates, underscoring the importance of estimator reliability.
  • The LSH estimator reduces training computation to just 1–2% of the original cost while maintaining high model accuracy, as shown by perplexity results.
  • As sample size increases, the MAE of the LSH estimator decreases and approaches that of the exact Gumbel method, demonstrating its convergence and robustness.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.