Skip to main content
QUICK REVIEW

[Paper Review] Reparameterization trick for discrete variables

Seiya Tokui, Issei Sato|arXiv (Cornell University)|Nov 4, 2016
Gaussian Processes and Bayesian InferenceComputer Science10 references8 citations
TL;DR

This paper proposes a reparameterization trick for discrete variables by marginalizing out the discrete variable and using shared noise factors across all configurations, enabling low-variance gradient estimation via common random numbers. The method theoretically guarantees lower variance than the likelihood-ratio method with an optimal input-dependent baseline and achieves faster convergence and better performance in variational inference of sigmoid belief networks.

ABSTRACT

Low-variance gradient estimation is crucial for learning directed graphical models parameterized by neural networks, where the reparameterization trick is widely used for those with continuous variables. While this technique gives low-variance gradient estimates, it has not been directly applicable to discrete variables, the sampling of which inherently requires discontinuous operations. We argue that the discontinuity can be bypassed by marginalizing out the variable of interest, which results in a new reparameterization trick for discrete variables. This reparameterization greatly reduces the variance, which is understood by regarding the method as an application of common random numbers to the estimation. The resulting estimator is theoretically guaranteed to have a variance not larger than that of the likelihood-ratio method with the optimal input-dependent baseline. We give empirical results for variational learning of sigmoid belief networks.

Motivation & Objective

  • To address the challenge of low-variance gradient estimation in directed graphical models with discrete latent variables.
  • To extend the reparameterization trick—previously limited to continuous variables—to discrete variables by bypassing discontinuities through marginalization.
  • To reduce gradient variance in variational inference of discrete models, particularly in deep architectures like sigmoid belief networks.
  • To provide a theoretically grounded method that outperforms existing likelihood-ratio estimators in terms of variance and optimization stability.

Proposed method

  • The method marginalizes out the discrete variable of interest, allowing reparameterization to be applied without discontinuous sampling operations.
  • It uses shared noise factors across all configurations of the discrete variable, effectively applying the common random numbers technique to gradient estimation.
  • The gradient is computed by simulating all configurations of the discrete variable simultaneously, rather than sequentially, leveraging shared randomness to reduce variance.
  • The approach reformulates the expectation using a joint reparameterization of all variables, with the discrete variable's distribution marginalized out.
  • The method is theoretically shown to have a variance not larger than that of the likelihood-ratio estimator with an optimal input-dependent baseline.
  • It is implemented by generating all configurations of the discrete variable in a single forward pass, using shared noise for all, and computing gradients via backpropagation.

Experimental results

Research questions

  • RQ1Can the reparameterization trick be extended to discrete variables despite their inherent discontinuities in sampling?
  • RQ2Does marginalizing out the discrete variable enable low-variance gradient estimation comparable to continuous reparameterization?
  • RQ3Can the use of shared noise across all configurations reduce gradient variance more effectively than existing methods?
  • RQ4How does the proposed method compare to the likelihood-ratio method in terms of optimization speed and model performance on deep discrete models?
  • RQ5Is the variance reduction of the proposed method theoretically guaranteed relative to the best baseline in the likelihood-ratio framework?

Key findings

  • The proposed method achieves significantly lower gradient variance than the likelihood-ratio method with an optimal input-dependent baseline, as proven theoretically.
  • In experiments on MNIST with SBNs, the method outperformed the likelihood-ratio method in terms of variational lower bound, with a 2.04 nats improvement on the 32-64-128-256 architecture.
  • The variance of the gradient estimate was reduced by up to 10^8 times compared to the likelihood-ratio method, especially in deeper models.
  • Despite a computational cost up to M times higher (where M is the number of configurations), the method ran in less than two-fold time on a GPU due to efficient parallelization.
  • The method showed faster convergence and better generalization, particularly in deeper architectures, where gradient quality critically affects optimization.
  • The model trained with the proposed method achieved a test set negative log-likelihood of 92.79 on the 32-64-128-256 SBN, compared to 94.73 with the likelihood-ratio method.

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.