Extending Pathwise Gradients to Discrete Random Variables via Finite-Order Relaxation
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. 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.
Related
- Non-Myopic Active Feature Acquisition via Pathwise Policy Gradients
- Extending a new two-grid waveform relaxation on a spatial finite element discretization
- Centered Weak Discrete Riemannian Gradients: A Unified Framework for Riemannian Optimization
- Majorization, Entropy and Concentration Inequalities for Discrete α-Concave Random Variables
- From Inverse Problems to Adjoint Gradients: A Discrete, Implementation-Oriented Tutorial on PDE-Constrained Optimization
BibTeX
@misc{he2026extending,
title = {{Extending Pathwise Gradients to Discrete Random Variables via Finite-Order Relaxation}},
author = {Donghan He and Luhuan Wu},
howpublished = {arXiv},
year = {2026},
month = oct,
doi = {10.48550/arxiv.2610.07786},
eprint = {2610.07786},
archivePrefix = {arXiv},
url = {https://arxiv.org/abs/2610.07786},
note = {CC BY 4.0},
}
RIS
TY - UNPB
TI - Extending Pathwise Gradients to Discrete Random Variables via Finite-Order Relaxation
AU - Donghan He
AU - Luhuan Wu
PY - 2026
DA - 2026/10/06
PB - arXiv
DO - 10.48550/arxiv.2610.07786
UR - https://arxiv.org/abs/2610.07786
AB - 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. 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.
ER -