Extending Pathwise Gradients to Discrete Random Variables via Finite-Order Relaxation

Donghan He, Luhuan Wu
10/6/2026
cs.LGstat.ML

No confident code implementation found for this paper.

Abstract

Pathwise gradients are preferred for continuous random variables because they are unbiased, low variance, and work with a single sample. For discrete variables, however, the pathwise identity cannot generally be exact for every differentiable function.

Show full abstract

We propose a general framework to construct finite-order exact pathwise gradient estimators for a range of common discrete variables such as Poisson. The estimator is the least-norm solution among all solutions that are unbiased for polynomials of degree at most. The resulting estimators preserve the hard forward sample, require no temperature tuning, and can be implemented in a few lines of codes. Against other admissible solutions, our estimator is unique and minimizes weight variance; in contrast, prior works use categorical variables or augmented representations to approximate non-categorical variables that induces excess variance and computations. To understand approximation bias for functions beyond the prescribed class, we also derive a non-asymptotic bias bound. In experiments our low order methods match or improve tuned baselines across linear, nonlinear and hierarchical latent-variable models, while out-speeding competitors in every runtime benchmark.

View on arXivView PDF

Code Implementations

No confident code match yet

We couldn't find an author-owned or strongly-evidenced community implementation for this paper. Any repos shown below are weak matches — verify before relying on them.

No code implementations found yet.

Know of an implementation? Let us know in the comments below!

Similar Papers

Cite this paper

@article{he2026extending,
  title  = {Extending Pathwise Gradients to Discrete Random Variables via Finite-Order Relaxation},
  author = {Donghan He and Luhuan Wu},
  year   = {2026},
  eprint = {2610.07786},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2610.07786v1}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2610.07786.svg)](https://codeofpaper.com/paper/2610.07786)

Discussion