betaFeedback

WorksComputer Science

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.

introduction

For Monte Carlo (MC) gradient estimation in continuous random variables, the pathwise gradient estimator is the recommended default for its unbiasedness, typically low variance, and implementation simplicity ([17]). Pathwise gradients measure sensitivity among sample paths, combining how a realized sample changes with the distribution’s parameters with how the downstream function changes with the sample. Thus it requires differentiability of both the sample path and the downstream function. However, discrete variables, commonly used in neural sequence models and deep generative models ([20, 27, 12]), do not generally admit a pathwise estimator that is unbiased for all differentiable functions. This leaves a gap for MC gradient estimation in discrete distributions.

Existing gradient estimators for discrete variables navigate a bias–variance–computation tradeoff. Score-function estimators are unbiased but often have high variance; reducing it may require more samples or carefully designed control variates, adding computational or implementation cost ([19, 17]). Measure-valued derivatives (MVD) and discrete General One-sample gradients can reduce variance through additional downstream evaluations, which become expensive in high-dimensional models ([18, 22, 3]). Biased alternatives instead approximate the backward pass, trading exactness for inexpensive gradients. Straight-through (ST) estimators preserve the hard sample but substitute a surrogate backward derivative, introducing bias ([1]). For categorical variables, the Gumbel–Softmax trick ([9, 14]) instead replaces the hard sample with a differentiable continuous approximation controlled by temperature, allowing gradients through the relaxed sample. Lowering the temperature improves bias but can increase gradient variance, making it an additional hyperparameter to tune. Beyond categorical variables, researchers use the Gumbel–Softmax trick to approximate gradients for discrete variable such as Poisson ([12]); however, these methods

1 ...
2 rate = eta.exp()
3 z_hard = Poisson(rate).sample()
4
5 # order 2:
6 w = 0.5 * (z_hard + rate)
7 # order 3:
8 # w = (5*rate/12
9 #     + (8*rate+1)*z_hard/(12*rate)
10 #    - z_hard**2/(12*rate))
11
12 z = z_hard + w.detach() * (eta - eta.detach())
13 ...

need to approximate one-dimensional variables with KK-dimensional categorical variables, and inherit the temperature parameter, both adding computational overhead.

Recently, Liu et al. [13] interpret categorical ST estimators as a first-order numerical method and propose a second-order ST method, ReinMax. ReinMax is unbiased for degree-2 polynomials, whereas first-order ST is unbiased for linear functions. This improvement enables ReinMax to outmatch both biased and unbiased methods consistently on various benchmarks. Nonetheless, applying ReinMax to other discrete variables again requires approximation, which can lead to statistical and computational overheads. Can we adapt pathwise gradients to discrete variables beyond categoricals by relaxing the unbiasedness requirement in a principled way?

We introduce a general recipe, Fini, that applies to a range of discrete variables: As shown in Figure 1, we require the pathwise estimator to be unbiased for low-degree polynomials rather than for every differentiable function; this weaker requirement admits many solutions, so we select the least-norm solution. This leads to several mathematical, statistical, and computational benefits, shown below.

Finite-order pathwise gradients and Poisson Fini-2 and Fini-3 code

Figure 1. Finite-order pathwise gradients. Left: pathwise gradients are unbiased for all differentiable functions - this is too rigid for discrete variables, so we relax the unbiasedness requirement to low-order polynomials; Center: generally, there are many solutions to the finite-order unbiasedness requirement; we use the least-norm principle to select the order-D unbiased solution, avoiding excess weight variance; Right: as an example, Fini-2 and 3 for Poisson reduce to a few lines of code.

Contributions:

  • Fini: Finite-order exact discrete pathwise gradients: We introduce Fini, a general recipe that extends pathwise gradients to discrete random variables by requiring the gradient to be unbiased for polynomials up to degree DD and selecting the least-norm solution. (§ 3).

  • Generality across discrete variables: For common discrete variables, the estimator is solved once at design time. The estimator is simple to implement (see the Poisson example in Listing 1) and evaluation is fast and independent of support size (§ 3, Appendix § 12, §F).

  • Bias and variance analysis: Our solution uniquely minimizes weight variance within the exactness class; we derive a non-asymptotic bias bound beyond it. We also characterize excess variance introduced by categorical and compound representations (§ 4).

  • Better empirical performance: Across neural sequence models, VAEs, and hierarchical topic models, Fini matches or outperforms tuned specialized and generalist baselines (§ 6).

Background

Monte Carlo Gradient Estimation and Score Function Gradients

For a probability distribution pθ(Z)p_{\theta}(Z), we write the associated expectation Epθ\mathbb{E}_{p_{\theta}} as Eθ\mathbb{E}_{\theta} for simplicity. For an objective Eθ[f(Z)]\mathbb{E}_{\theta}[f(Z)], gradient-based learning requires calculating ∂θEθ[f(Z)]\partial_{\theta}\mathbb{E}_{\theta}[f(Z)], often from MC samples. This problem emerges in supervised, unsupervised, and reinforcement learning.

One way to estimate ∂θEθ[f(Z)]\partial_\theta\mathbb{E}_\theta[f(Z)] is through the score-function gradient, also known as REINFORCE [28, 19]. They use the identity ∂θEθ[f(Z)]=Epθ[f(Z)sθ(Z)]\partial_\theta\mathbb{E}_\theta[f(Z)] = \mathbb{E}_{p_\theta}[f(Z)s_\theta(Z)], with sθ(Z)=∂θlog⁡pθ(Z)s_\theta(Z) = \partial_\theta\log p_\theta(Z). Computing the integral analytically or numerically is generally intractable in high dimensions; MC gradient estimation instead draws NN samples zn∼pθz_n \sim p_\theta and forms unbiased estimators of the quantity using ∑n=1Nf(zn)sθ(zn)/N\sum_{n=1}^{N} f(z_n)s_\theta(z_n)/N. The score-function estimator applies to both continuous and discrete variables and is unbiased under suitable regularity conditions. The assumptions are quite general, but the estimator can have high variance [17].

Pathwise Gradients

When ff is differentiable, pathwise gradients instead use derivative information and integrate directly with ordinary backpropagation. For a continuous family, a pathwise derivative weight wθw_\theta satisfies

∂θEθ[f(Z)]=Eθ[wθ(Z)f′(Z)]for every differentiable f.(1)\partial_\theta\mathbb{E}_\theta[f(Z)] = \mathbb{E}_\theta[w_\theta(Z)f'(Z)] \qquad\text{for every differentiable } f. \tag*{(1)}

Explicit reparameterization writes out the sampling path Z=g(ϵ,θ)Z = g(\epsilon, \theta) for parameter-free noise ϵ\epsilon and differentiates the path so wθ=∂θg(ϵ,θ)w_\theta= \partial_\theta g(\epsilon, \theta) [10, 21]. Consider a Gaussian N(μ,σ)\mathcal{N}(\mu, \sigma), one valid path is g(ϵ,θ=(μ,σ))=μ+σϵg(\epsilon, \theta= (\mu, \sigma)) = \mu+ \sigma\epsilon where ϵ∼N(0,1)\epsilon\sim\mathcal{N}(0, 1); then one can use f′(z)∂θg(ϵ,θ)f'(z)\partial_\theta g(\epsilon, \theta) as a valid one-sample estimator for ∂θL\partial_\theta L. For notation simplicity, we note wθw_\theta as ww going forward; it generally depends on the distribution parameters.

The pathwise estimator is the recommended default for continuous MC gradient estimation because it is unbiased, typically low variance, and works well with one sample. For common discrete variables, one can show no such ww can satisfy Eq. (1) for all differentiable ff. See proof in § A for details. This limitation motivates researchers to use estimators that introduce bias, high variance, or additional computations.

Fini: Finite-Order Pathwise Gradients

To extend pathwise gradients to discrete distributions, we relax the unbiasedness requirement in Eq. (1). For a candidate pathwise weight ww, instead of enforcing the unbiased pathwise identity for any differentiable ff, we relax this requirement to unbiasedness with respect to polynomials up to degree DD, denoted as PD\mathcal{P}_D. Since expectation is linear and the monomial basis spans the vector space of polynomials, unbiasedness over PD\mathcal{P}_D breaks down to unbiasedness against {x,x2,⋯ ,xD}\{x, x^2, \cdots, x^D\}. Thus, with the pathwise form wD(Z)f′(Z)w_D(Z)f'(Z) and a prescribed order DD, the relaxed requirement becomes

Eθ[wD(Z)f′(Z)]=∂θEθ[f(Z)]for every f∈{Zd}d=1D(2)\mathbb{E}_\theta[w_D(Z)f'(Z)] = \partial_\theta\mathbb{E}_\theta[f(Z)] \qquad\text{for every } f \in\{Z^d\}_{d=1}^{D} \tag*{(2)}

Given we want to find a solution w⋆w^\star in the functional space, we need to be able to describe the space first, so we equip the space with the inner-product ⟨u,v⟩θ=Eθ[u(Z)v(Z)]\langle u,v\rangle_\theta= \mathbb{E}_\theta[u(Z)v(Z)]. We have now arrived at a Hilbert space L2(pθ)L^2(p_\theta) given the base law pθp_\theta, and we seek that for low orders. Constraints in Eq. (2) generally leave ww underdetermined. We choose the least-norm rule to resolve the ambiguity, which leads to clean derivations and computationally cheap solutions as shown later in this section, and other desirable statistical properties shown in § 4. Assuming suitable integrability and differentiability, the Hilbert space optimization problem can be written as follows:

arg min⁡wD∈L2(pθ)∥wD∥2s.t.⟨wD,Zd−1⟩θ=1d∂θEθ[Zd],d=1,…,D.(3)\begin{aligned} \underset{w_D \in L^2(p_\theta)}{\operatorname{arg\,min}}\quad& \lVert w_D\rVert_2 \\ \text{s.t.}\quad& \langle w_D,Z^{d-1}\rangle_\theta= \frac{1}{d}\partial_\theta\mathbb{E}_\theta[Z^d], \qquad d=1,\ldots,D. \tag*{(3)} \end{aligned}

The key to solving this problem is to invoke the Riesz representation theorem, and note that the monomial basis up to D−1D-1 are precisely the Riesz representers to our problem. Therefore, the solution is a linear combination of monomials vD(Z)=[1,…,ZD−1]v_D(Z) = [1,\ldots,Z^{D-1}], which means the resulting weight has degree at most D−1D-1. Given the solution wD⋆w_D^\star must be a linear combination of monomials, each of the LHS in our DD constraints becomes a gram matrix GD=Eθ[vD(Z)vD(Z)T]G_D = \mathbb{E}_\theta[v_D(Z)v_D(Z)^\mathsf{T}] multiplied by the linear combination’s coefficients. As long as the gram matrix is non-singular, we can safely invert it. Collecting the RHS of constraints in problem (3) as bDb_D, we see that the solution is:

wD⋆(z)=vD(z)TGD−1bD.(4)\boxed{w_D^\star(z) = v_D(z)^\mathsf{T}G_D^{-1}b_D}. \tag*{(4)}

We refer to solution wD⋆w_D^\star as the Fini-DD estimator. This is the minimum-norm/least-norm solution to underspecified problems [2, 25]. The recipe is general: we compute moments up to 2D−22D-2 for the gram matrix, as well as the first DD moments’ derivatives for bDb_D, then solve the D×DD \times D linear system symbolically once to obtain the closed-form solution in Eq. (4). This requires finite moments through order 2D−22D-2, differentiability of the first DD moments with respect to the parameter, and nonsingular GDG_D. The solutions are polynomials of degree at most (D−1)(D-1), evaluable in O(D)O(D) time, independent of support size - another direct consequence of the least norm principle.

We show an example Poisson derivation below. Furthermore, we show for continuous variables at order 2, Fini recovers classic pathwise gradients. Going forward, we use exactness and unbiasedness interchangeably, and call an estimator order-DD when it is unbiased for every polynomial of degree at most DD.

Poisson example: Let Z∼Pois⁡(exp⁡(η))Z \sim\operatorname{Pois}(\exp(\eta)). The order-3 Gram matrix and b3b_3 are

G3=(1λλ2+λλλ2+λλ3+3λ2+λλ2+λλ3+3λ2+λλ4+6λ3+7λ2+λ),b3=(λλ2+λ/2λ3+2λ2+λ/3).(5)G_3 = \begin{pmatrix} 1 & \lambda& \lambda^2+\lambda\\ \lambda& \lambda^2+\lambda& \lambda^3+3\lambda^2+\lambda\\ \lambda^2+\lambda& \lambda^3+3\lambda^2+\lambda& \lambda^4+6\lambda^3+7\lambda^2+\lambda \end{pmatrix}, \qquad b_3 = \begin{pmatrix} \lambda\\ \lambda^2+\lambda/2 \\ \lambda^3+2\lambda^2+\lambda/3 \end{pmatrix}. \tag*{(5)}

The order-2 system uses the leading 2×22 \times2 block of G3G_3 and the first two entries of b3b_3. Solving the two systems and substituting into wD⋆(z)=vD(z)GD−1bDw_D^\star(z)=v_D(z)G_D^{-1}b_D yields

w2⋆(Z)=Z+λ2,w3⋆(Z)=5λ12+8λ+112λZ−112λZ2.(6)w_2^\star(Z)=\frac{Z+\lambda}{2}, \qquad w_3^\star(Z)=\frac{5\lambda}{12}+\frac{8\lambda+1}{12\lambda}Z-\frac{1}{12\lambda}Z^2. \tag*{(6)}

These are the Fini-2 and 3 weights used in Listing 1. The construction extends to any prescribed order; Appendix E gives the Fini-4 weight, whose variance under the log-rate parameterization diverges as λ↓0\lambda\downarrow0. This illustrates the variance cost of higher exactness.

Poisson MVD and quadrature. The same weights also follow from the difference identity

∂ηE[f(Z)]=λE[f(Z+1)−f(Z)]=λE[∫01f′(Z+t) dt].\partial_\eta\mathbb{E}[f(Z)] = \lambda\mathbb{E}[f(Z+1)-f(Z)] = \lambda\mathbb{E}\left[\int_0^1 f'(Z+t)\,\mathrm{d}t\right].

Direct use of the difference identity requires an extra evaluation of ff at Z+1Z+1. For order 2, trapezoidal quadrature approximates the increment by (f′(Z)+f′(Z+1))/2(f'(Z)+f'(Z+1))/2. The Poisson shift identity λE[g(Z+1)]=E[Zg(Z)]\lambda\mathbb{E}[g(Z+1)]=\mathbb{E}[Zg(Z)] then replaces f′(Z+1)f'(Z+1) by (Z/λ)f′(Z)(Z/\lambda)f'(Z) in expectation, recovering w2⋆w_2^\star. The order-3 rule uses interpolation nodes at t=0,1,2t=0,1,2; Appendix C.2 gives the algebra.

Exact Pathwise Recoveries and ST recoveries: Fini-2 recovers fully exact pathwise gradients in the following cases: for scalar location–scale families, w2⋆(Z)=∂θZw_2^\star(Z)=\partial_\theta Z; for Gaussian random vectors, we recover the minimum-energy affine pathwise field. Both estimators are exact for every sufficiently regular ff, although we impose exactness only for quadratics. Furthermore for categoricals, if we replace the minimum-norm rule with a symmetry principle, we recover ReinMax at temperature =1=1, and Fini-2 corresponds to hard one-hot MVE in Hooper & Shekhovtsov [7]. See § C for details.

Theory

We establish uniqueness and weight-variance optimality, characterize two sources of excess variance, and bound bias outside the prescribed class. Proofs and details are in § D and § B. We start by showing our solutions are unique, and the solved weights are variance optimal.

Proposition 4.1. Let VD=span⁡{1,Z,…,ZD−1}V_D=\operatorname{span}\{1,Z,\ldots,Z^{D-1}\} and assume GDG_D is nonsingular. Every degree-DD exact weight w∈L2(ρθ)w \in L^2(\rho_\theta) satisfies

w=wD⋆+r,r⊥VD,Var⁡θ[w]=Var⁡θ[wD⋆]+∥r∥22.(7)w=w_D^\star+r,\qquad r\perp V_D,\qquad\operatorname{Var}_\theta[w]=\operatorname{Var}_\theta[w_D^\star]+\lVert r\rVert_2^2. \tag*{(7)}

Thus wD⋆w_D^\star uniquely minimizes both norm and weight variance in the exactness class.

Thm. 4.1 states that any other admissible solution must have an excess null component, which increases weight variance; given ReinMax applied to Poisson with categorical representation is order 2, we can characterize its excess weight variance.

Corollary 4.2. For Z∼Pois⁡(λ)Z \sim\operatorname{Pois}(\lambda) and η=log⁡λ\eta= \log\lambda, the large-truncation limit of categorical ReinMax at τ=1\tau= 1 is degree-2 exact, with

wRM(Z)=Z+λ2⏟w2∗(Z)+(Z−λ)2−(Z−λ)−λ2⏟rRM(Z)⊥V2,Var⁡[wRM]−Var⁡[w2∗]=λ22.(8)w_{\mathrm{RM}}(Z) = \underbrace{\frac{Z+\lambda}{2}}_{w_2^*(Z)} + \underbrace{\frac{(Z-\lambda)^2-(Z-\lambda)-\lambda}{2}}_{r_{\mathrm{RM}}(Z)\perp V_2}, \qquad\operatorname{Var}[w_{\mathrm{RM}}]-\operatorname{Var}[w_2^*] = \frac{\lambda^2}{2}. \tag*{(8)}

The gap in weight variance is due to the null component rRMr_{\mathrm{RM}}. Its expression and proof are in Thm. D.2, and a general theorem about Reinmax applied to scalar exponential families is in Thm. D.1, pointing out excess variance in combining ReinMax with categorical approximation.

Rao–Blackwellization (RB) is a variance reduction technique for compound representations. Proposition below shows compounding can lead to excess variance, and when RB can neutralize it.

Proposition 4.3. Let pθ(z,u)p_\theta(z,u) have marginal pθ(z)p_\theta(z), and let w~D(U,Z)∈L2\widetilde{w}_D(U,Z)\in L^2 be degree-DD exact under the joint law. Then w‾D(Z)=Eθ[w~D∣Z]\overline{w}_D(Z)=\mathbb{E}_\theta[\widetilde{w}_D\mid Z] is also degree-DD exact, and

Var⁡θ[w~D]=Var⁡θ[wD∗]+Eθ[Var⁡θ(w~D∣Z)]+∥w‾D−wD∗∥22.(9)\operatorname{Var}_\theta[\widetilde{w}_D]=\operatorname{Var}_\theta[w_D^*]+\mathbb{E}_\theta[\operatorname{Var}_\theta(\widetilde{w}_D\mid Z)]+\lVert\overline{w}_D-w_D^*\rVert_2^2. \tag*{(9)}

RB removes auxiliary noise; least-norm optimization removes the remaining null component. Rao–Blackwellization suffices only when w‾D=wD∗\overline{w}_D=w_D^*, which we demonstrate below with the Gamma–Poisson compound representation of Negative Binomial variables.

Corollary 4.4. Let Λ∼Gamma⁡(r,rate⁡=(1−p)/p)\Lambda\sim\operatorname{Gamma}(r,\operatorname{rate}=(1-p)/p), Z∣Λ∼Pois⁡(Λ)Z\mid\Lambda\sim\operatorname{Pois}(\Lambda), and η=logit⁡p\eta=\operatorname{logit}p. For the compound order-DD Poisson construction, conditioning its weight on ZZ gives

w‾2=w2∗,w‾3=w3∗+r3,r3⊥V3,r3≢0,(10)\overline{w}_2=w_2^*, \qquad\overline{w}_3=w_3^*+r_3,\qquad r_3\perp V_3,\qquad r_3\not\equiv0, \tag*{(10)}

where wD∗w_D^* is our Negative-Binomial weight.

Rao–Blackwellization closes the weight-variance gap at order 2 but not at order 3. The full statement and variance identities are in § B.1 and § B.2.

With variance characterized, we bound the bias for smooth functions beyond our prescribed class.

Proposition 4.5. For a degree-DD exact weight ww, let Bw(f)=Eθ[w(Z)f′(Z)]−∂θEθ[f(Z)]B_w(f)=\mathbb{E}_\theta[w(Z)f'(Z)]-\partial_\theta\mathbb{E}_\theta[f(Z)]. Fix a∈Ra\in\mathbb{R} independently of θ\theta and write mk(a)=Eθ[∣Z−a∣k]m_k(a)=\mathbb{E}_\theta[|Z-a|^k]. Under the smoothness, moment, and score-identity conditions in § D.2,

∣Bw(f)∣≤∥f(D+1)∥∞[m2D(a)1/2D!∥w∥2+m2D+2(a)1/2(D+1)!∥sθ∥2].(11)|B_w(f)|\leq\lVert f^{(D+1)}\rVert_\infty\left[\frac{m_{2D}(a)^{1/2}}{D!}\lVert w\rVert_2+\frac{m_{2D+2}(a)^{1/2}}{(D+1)!}\lVert s_\theta\rVert_2\right]. \tag*{(11)}

Exactness cancels the degree-DD Taylor polynomial, leaving bias controlled by the first unmatched derivative. Least norm minimizes the bound’s only weight-dependent term. The bound therefore predicts small bias when the downstream computation is locally well approximated by low-degree polynomials, a regime we expect to be common for sufficiently smooth neural objectives.

Related Work

Unbiased discrete gradient estimators. Score-function estimators use control variates, multisample baselines, and antithetic, coupled, or Stein identities to reduce variance ([17, 26, 6, 4, 5, 23] (Minh & Gregor 2014; Minh & Rezende 2016; Yin & Zhou 2019)). MVD and GO gradients instead exploit distributional identities for lower variance, at the cost of additional ff evaluations ([18, 22, 3]). For Poisson, §3 shows that quadrature of the MVD identity yields our weights. These methods retain arbitrary-function unbiasedness but require many downstream function evaluations, whereas Fini has low bias and works with a single downstream evaluation.

Gradient estimators for the categorical distribution Categorical gradient methods provide a common interface for discrete variables, or categorical representation, but their computation grows with the number of discrete states ([12]). Unlike categorical representation, Fini applies directly to the target law, avoiding excess compute overheads. Gumbel–Softmax uses temperature-controlled continuous relaxations [9, 14], whereas ST estimators preserve the hard sample and substitute its backward derivative [1].

ReinMax extends the ST estimator [13]. It shows ST is a linear approximation, analogous to Euler’s method in numerical quadrature. Given Euler’s method’s first-order bias can be improved to second-order, ST can also be improved similarly. ReinMax thus replaces the linear ST by a quadratic one, and demonstrates consistently excellent empirical performance across benchmarks [13], making it our principal generalist comparator. Hooper & Shekhovtsov [7] extend this line of work by axiomatizing a broader ST family and deriving a second-order minimum-variance estimator (MVE). Their estimator has a temperature knob that interpolates between ST and their second-order estimator. Although theoretically MVE has lower weight variance than ReinMax, MVE does not consistently outperform ReinMax empirically. Our order-2 solutions recover their one-hot and 1D estimators for categorical variables.

Other distribution-specific estimators and compound estimators. Although most discrete MC gradient estimation research focuses on the categorical distribution, many tailored estimators have been developed for distributions such as the Poisson. Tailored estimators exploit distribution-specific structure and can be highly effective. For Poisson, EAT-cubic differentiates a relaxed inter-arrival construction with cubic interpolation and is our principal specialist comparator [11, 27, 8]. Compound representations transfer an estimator through auxiliary variables; Gamma–Poisson, for example, reuses a Poisson estimator for a Negative-Binomial variable. Proposition 4.3 and Corollary 4.4 quantify the resulting variance overhead. Our construction instead applies the general recipe directly to the target variable.

Numerical Experiments

We test four empirical claims: (i) Fini is unbiased for functions inside its prescribed exactness class; (ii) For Poisson, low-order Fini matches or outperforms competitors on nonlinear and hierarchical scenarios beyond their prescribed exactness class; (iii) Fini performs well for other common discrete variables such as Negative Binomial and Binomial; and (iv) across GPUs and benchmarks, low-order Fini consistently outspells all competitors.

Our main Poisson-specific comparator is EAT-cubic, which differentiates a relaxed Poisson inter-arrival construction using cubic interpolation [8]. Our general comparator is ReinMax, an ST estimator for categorical variables [13]; we apply it to count distributions (Poisson, Binomial, and Negative-Binomial) through categorical approximation where feasible and through the Gamma–Poisson representation for Negative-Binomial variables. For unbounded categorical approximations, we choose the truncation so that the omitted tail has probability ≤0.001\le0.001; the appendix gives more detail. Both comparators have a tuned temperature τ\tau. We also include EAT-sigmoid, Gumbel–Softmax, and score-function estimators where they are part of the original benchmark comparison. EAT-sigmoid and Gumbel–Softmax require a temperature.

We follow the metrics in prior works for the corresponding benchmarks. Higher ELBO and lower perplexity are better. Parenthesized numbers beside temperature-based methods give the selected τ\tau; Fini and the score-function estimator do not use a temperature.

Linear Poisson VAE: Testing Order-2 Exactness

In a Poisson VAE, an encoder specifies a Poisson distribution over latent counts ZZ given an observation, and a decoder maps those counts back to an observation distribution. We use the linear-decoder van Hateren benchmark of Ibrahim et al. [8], which has an analytic gradient for comparison. With a Gaussian observation likelihood and a linear decoder, the benchmark’s downstream objective is quadratic in the latent counts, so Fini-2 is exact here. We tune EAT-cubic over its reported temperature grid. In Figure 2, the observed mean gradient errors at both checkpoints are near zero, while Fini-2 has about one-fifth the gradient-error standard deviation of tuned EAT-cubic. Its validation-ELBO trajectory also lies closer to the analytic-gradient reference during training.

Figure 2. Linear Poisson VAE with 512 latent dimensions. Left: mean single-sample gradient error relative to the analytic gradient early (epoch 100) and partway through training (epoch 1,000), shown as dots with standard-deviation bars. Both means are near zero; Fini-2 has about one-fifth the standard deviation of tuned EAT-cubic. Right: validation ELBO over training, mean ± standard deviation across five matched seeds. Fini-2 follows the analytic-gradient trajectory more closely.

Performance on Realistic Benchmarks

Proposition 4.5 bounds bias outside the prescribed class, but can low-order Fini perform well in realistic applications, where functions can be nonlinear, and have multiple stochastic layers?

Neural sequence model. The partially observed generalized linear model (POGLM) is an autoregressive latent variable model for inferring connectivities from partially observed spike trains. As a dynamic graphical model, it has both observed and latent Poisson variables whose rates depend on recent count histories Li et al. [12]. We reproduce the synthetic benchmark in Ibrahim et al. [8], following the same temperature grids and tuning protocol across 30 matched independent seeds. Table 1 compares validation ELBOs for Fini 2 and 3, EAT-cubic, Gumbel–Softmax, EAT-sigmoid, and the score-function estimator on the synthetic POGLM benchmark. The temperature-free Fini 2 and 3 have mean ELBOs close to tuned EAT-cubic, while the other baselines are worse.

DatasetFini-3Fini-2EAT-cubic (0.1)GSM (0.5)EAT-sigmoid (0.5)Score
Synthetic−330.61 ± 0.79−330.60 ± 0.75−330.62 ± 0.79−331.94 ± 0.95−332.18 ± 0.97−333.23 ± 1.51

Table 1. Synthetic POGLM validation ELBO (higher is better), mean ± std. over 30 seeds. Parentheses give the selected temperature τ\tau. Boldface marks the three highest means, which differ by at most 0.02.

Nonlinear Poisson VAEs. Following the discrete-VAE setup of Liu et al. [13], we replace Bernoulli latents with Poisson latents on MNIST, Fashion-MNIST, and Omniglot. We use dynamically binarized images with Bernoulli likelihoods and whitened continuous images with Gaussian likelihoods (Appendix § 14.§ 3). Table 2 compares Fini-2 and Fini-3 with EAT-cubic and ReinMax. Fini-3 leads in four of six settings, including all Bernoulli-likelihood cases, with Fini-2 close behind. Both orders occupy the leading tier across all six settings, but their ranking varies under Gaussian likelihoods: higher exactness does not uniformly improve optimization.

Bernoulli LikelihoodsGaussian Likelihoods
MNISTFashion-MNISTOmniglotMNISTFashion-MNISTOmniglot
Fini-3−118.60 ± 0.26−251.98 ± 0.40−129.38 ± 0.07595.48 ± 3.72133.74 ± 2.80403.14 ± 2.46
Fini-2−118.88 ± 0.19−252.26 ± 0.18−129.93 ± 0.12594.47 ± 3.92132.09 ± 3.29403.84 ± 2.00
EAT-cubic−120.06 ± 0.17 (0.5)−253.04 ± 0.22 (0.5)−130.76 ± 0.07 (0.2)595.66 ± 3.60 (0.5)132.42 ± 1.70 (0.5)400.84 ± 2.05 (0.5)
ReinMax−125.87 ± 0.38 (1.1)−260.56 ± 0.57 (1.1)−140.07 ± 0.40 (1.0)589.21 ± 2.78 (1.0)104.06 ± 2.51 (1.1)396.63 ± 1.53 (1.0)

Table 2. Nonlinear Poisson-VAE training ELBO ↑, mean ± standard deviation over five matched seeds. Columns pair each dataset with a Bernoulli or Gaussian observation likelihood. First is bold, second is underlined.

Hierarchical topic models. We next test our estimators on Deep Exponential Families (DEF), a deep generative model used for topic modeling and recommender systems Ranganath et al. [20]. A DEF generates observed data through multiple stochastic layers, where each layer draws from an exponential-family distribution whose natural parameters come from the previous layer. We train amortized two-layer sparse Poisson DEFs on 20 Newsgroups (20 NG) and RCV1 using the inference architecture of Mnih & Gregor [15]; Appendix § 14.§ 5 gives the full setup.

Table 3 shows the results. Fini 2 and 3 have the best train and test ELBOs on both datasets. ReinMax ranks first on heldout perplexity for the smaller 20NG, and Fini-3 leads on RCV1. To diagnose, we split the ELBO into log-likelihood and the KL terms, and use the low variance MVD as the ground truth. ReinMax at τ=1.3\tau= 1.3 tilts toward worse KL and better log likelihood, which strongly correlates with perplexity; Fini closely tracks MVD on both datasets, suggesting ReinMax’s 20NG win may reflect bias rather than better gradients. See § G.6 for details.

ModelTraining method20 NewsgroupsRCV1
Train ELBO ↑Test ELBO ↑PPL ↓Train ELBO ↑Test ELBO ↑PPL ↓
Poisson DEFFini-3−179.30 ± 2.81−199.31 ± 2.04660.7 ± 7.6−269.27 ± 3.16−267.64 ± 3.73379.3 ± 5.4
Fini-2−179.30 ± 2.62−198.98 ± 1.92659.7 ± 6.7−269.20 ± 3.05−267.60 ± 3.73381.9 ± 4.6
EAT-cubic (0.2)−180.94 ± 2.59−199.77 ± 2.17664.6 ± 8.5−271.92 ± 3.18−270.16 ± 3.82388.4 ± 4.1
ReinMax (1.3)−191.25 ± 2.88−210.01 ± 2.37638.1 ± 10.5−301.86 ± 2.83−300.05 ± 3.27384.4 ± 4.8

Table 3. Poisson DEF results on train and test ELBO (↑) and heldout perplexity (PPL, ↓), mean ± standard deviation over five matched seeds. Best is bold; second is underlined.

Summary. Fini-2 and Fini-3 match tuned EAT-cubic on POGLM, improve most of its ELBOs, and outperform ReinMax on every displayed ELBO. The preferred order of Fini remains task dependent.

Generality Across Common Discrete Variables

We evaluate Poisson, Binomial, and Negative-Binomial VAEs on MNIST with latent dimensions 2, 16, and 128. ReinMax uses categorical representation for Binomial and Poisson (with truncation). Overdispersion in Negative-Binomial makes direct truncation impractical, so we use the Gamma–Poisson representation. Results are in Table 4. Fini-3 leads at higher latent dimensions, while Fini-2 leads in two of the three 2-dimensional settings - exactness order remains problem-dependent.

FamilyLatent dim.Fini-2Fini-3ReinMax
binomial n=8,p=0.5n = 8, p = 0.52−174.51 ± 0.45−176.91 ± 1.07−179.67 ± 0.67 (1.0)
16−123.38 ± 0.14−123.11 ± 0.10−125.55 ± 0.10 (1.0)
128−118.73 ± 0.22−118.43 ± 0.17−121.45 ± 0.15 (1.1)
negbin r=8,p=0.5r = 8, p = 0.52−177.34 ± 0.15−177.31 ± 0.24−182.58 ± 0.48 (1.0)
16−129.29 ± 0.16−129.25 ± 0.20−136.58 ± 0.71 (1.0)
128−122.58 ± 0.06−122.54 ± 0.36−124.41 ± 0.24 (1.1)
poisson λ0=0.1\lambda_0 = 0.12−190.37 ± 0.66−191.77 ± 1.57−199.33 ± 2.57 (1.0)
16−146.74 ± 0.62−145.68 ± 0.31−170.60 ± 0.39 (1.0)
128−123.20 ± 0.30−122.80 ± 0.40−129.99 ± 1.02 (1.0)

Table 4. Count-VAE training ELBO, mean ± standard deviation over five independent matched seeds. Best is bold; second is underlined.

Compound representation adds statistical overhead. Negative-Binomial latents can reuse a Poisson estimator through an auxiliary rate Λ\Lambda. Corollary 4.4 predicts that conditioning recovers Fini-2 exactly, while at order 3 a nonzero ZZ-only component can remain.

We reproduce the variance study of Dong et al. [4] with Negative-Binomial latents. The 128-dimensional variance results are in Figure 3. In this benchmark, each native estimator has lower gradient variance than its matched Gamma–Poisson counterpart, while ReinMax has higher variance.

Figure 3. Negative-Binomial representation diagnostic. Native Fini-2 and Fini-3 have lower gradient variance than matched Gamma–Poisson counterparts; ReinMax has higher variance.

Categorical representation adds computational overhead. For Binomial latents, the released hard 1D MVE implementation of Hooper & Shekhovtsov [7] operates over K=n+1K = n + 1 categorical states, whereas our fixed-order weights’ costs are independent of the support size. Figure 4 shows the resulting support-size scaling. The compound and categorical results therefore test different costs of non-native representations: statistical overhead from auxiliary variables and computational overhead from categorical embedding.

Figure 4. Categorical support scaling. At 1024, the released 1D MVE implementation takes 38× as long as Fini-2.

Speed Comparisons

Fini 2 and 3 require one forward–backward pass and evaluate affine or quadratic polynomials. Across three benchmarks on L4 and A100 GPUs, Fini-2 and 3 are first and second in every workload–hardware pair (Table 5); Appendix § 14.§ 7 gives the five-repeat post-warm-up protocol. Fini-2 is consistently faster because its weight is affine rather than quadratic.

EstimatorLinear VAE L4Linear VAE A100Nonlinear VAE L4Nonlinear VAE A100DEF L4DEF A100
Fini-30.326 ± 0.0100.361 ± 0.0081.868 ± 0.0742.016 ± 0.0830.928 ± 0.0210.907 ± 0.016
Fini-20.309 ± 0.0050.338 ± 0.0041.768 ± 0.0171.848 ± 0.0460.863 ± 0.0140.835 ± 0.016
EAT-cubic1.427 ± 0.0050.581 ± 0.0102.680 ± 0.0402.942 ± 0.0731.546 ± 0.0391.565 ± 0.015
ReinMax1.144 ± 0.0060.568 ± 0.0092.692 ± 0.0352.859 ± 0.1041.451 ± 0.0241.610 ± 0.134

Table 5. Wall-clock(s) per epoch (↓), mean ± standard deviation over five repeats.

Discussion

Limitations: Fini requires relevant moments and their parameter derivatives, and order-DD exactness requires at least DD support points. Outside the prescribed class, Proposition 4.5 requires smoothness and finite moments; polynomial unbiasedness alone does not guarantee small bias. Finally, higher DD adds an orthogonal correction and cannot decrease the raw second moment; the fourth-order Poisson example in Appendix § 12.§ 1 shows that its variance can worsen at low rates. Thus, estimator order controls a bias–variance tradeoff rather than providing a uniform improvement.

Conclusion: We propose Fini, a recipe for extending pathwise gradients to discrete distributions by prescribing degree-DD polynomial exactness and then choosing the least-norm solution. For common discrete variables, the resulting polynomial weights preserve the exact forward sample, require one forward–backward pass, and use neither temperature tuning nor auxiliary randomness. Moreover, this recipe recovers classical pathwise gradients for continuous random variables. Our theory extends the guarantees beyond the prescribed exactness class through a non-asymptotic bias bound for smooth functions and decomposes excess weight variance into auxiliary-variable noise and orthogonal null components. Empirically, Fini-2 and 3 remain in the leading performance tier across increasingly realistic benchmarks, while ranking first and second in every runtime benchmark. Thus, we provide a general derivation principle for extending pathwise gradient estimators beyond continuous random variables, yielding low-bias, low-variance estimators with simple, efficient implementations.

Discrete all-function pathwise obstruction

Proposition A.1 (No universal exact sample pathwise weight on isolated support). Let pθp_\theta be a differentiable family on a fixed discrete support S⊂RS \subset\mathbb{R}. Suppose that, at the parameter value under consideration, some z0∈Sz_0 \in S is isolated and ∂θpθ(z0)≠0\partial_\theta p_\theta(z_0) \ne0. Then there is no ZZ-measurable weight wθ(Z)w_\theta(Z) satisfying

Eθ[wθ(Z)f′(Z)]=∂θEθ[f(Z)]\mathbb{E}_\theta[w_\theta(Z)f'(Z)] = \partial_\theta\mathbb{E}_\theta[f(Z)]

for every smooth ff for which the expectation exists.

Proof. Because z0z_0 is isolated, choose a smooth bump function ff supported in an interval containing no other point of SS, with f(z0)=1f(z_0)=1 and f′(z0)=0f'(z_0)=0. Then f′(Z)=0f'(Z)=0 almost surely, and hence Eθ[wθ(Z)f′(Z)]=0\mathbb{E}_\theta[w_\theta(Z)f'(Z)]=0 for every weight wθw_\theta. On the other hand, Eθ[f(Z)]=pθ(z0)\mathbb{E}_\theta[f(Z)]=p_\theta(z_0), so

∂θEθ[f(Z)]=∂θpθ(z0)≠0,\partial_\theta\mathbb{E}_\theta[f(Z)] = \partial_\theta p_\theta(z_0) \ne0,

a contradiction.

Solving the Optimization Problem

Proposition B.1 (Least-norm solution). Let

vD(Z)=(1,Z,…,ZD−1)⊤,GD=Eθ[vD(Z)vD(Z)⊤],v_D(Z) = (1,Z,\ldots,Z^{D-1})^\top,\qquad G_D = \mathbb{E}_\theta[v_D(Z)v_D(Z)^\top],

and let bDb_D denote the degree-DD exactness constraints, so that every feasible weight satisfies Eθ[w(Z)vD(Z)]=bD\mathbb{E}_\theta[w(Z)v_D(Z)]=b_D. If GDG_D is nonsingular, the unique least-norm degree-DD exact weight in L2(pθ)L^2(p_\theta) is

wD⋆(z)=vD(z)⊤GD−1bD.(12)w_D^\star(z)=v_D(z)^\top G_D^{-1}b_D. \tag*{(12)}

Proof. Let VD=span⁡{1,Z,…,ZD−1}\mathcal{V}_D=\operatorname{span}\{1,Z,\ldots,Z^{D-1}\}. Since every exactness constraint is an inner product with an element of VD\mathcal{V}_D, orthogonal projection onto VD\mathcal{V}_D preserves feasibility and cannot increase the L2(pθ)L^2(p_\theta) norm. Hence the minimum-norm weight has the form wD⋆(z)=vD(z)⊤cw_D^\star(z)=v_D(z)^\top c. Its exactness constraints reduce to

GDc=bD,hencec=GD−1bD,G_Dc=b_D,\qquad\text{hence}\qquad c=G_D^{-1}b_D,

which proves (12); nonsingularity of GDG_D gives uniqueness.

Augmented representations and Rao–Blackwellization

Suppose pθ(z,u)p_\theta(z,u) is an augmented representation of the marginal law pθ(z)p_\theta(z), and let w~D(U,Z)∈L2\widetilde{w}_D(U,Z)\in L^2 be any degree-DD exact compound weight:

Eθ[w~D(U,Z)f′(Z)]=∂θEθ[f(Z)],f∈PD.(13)\mathbb{E}_\theta[\widetilde{w}_D(U,Z)f'(Z)]=\partial_\theta\mathbb{E}_\theta[f(Z)],\qquad f\in\mathcal{P}_D. \tag*{(13)}

Let w‾D(Z)=Eθ[w~D(U,Z)∣Z]\overline{w}_D(Z)=\mathbb{E}_\theta[\widetilde{w}_D(U,Z)\mid Z] denote its Rao–Blackwellization.

Proposition B.2 (Rao–Blackwellization and native projection). Let wD⋆w_D^\star be the native minimum-L2(pθ)L^2(p_\theta) degree-DD exact weight. Then w‾D\overline{w}_D is degree-DD exact and

∥w~D∥22=∥wD⋆∥22+Eθ[Var⁡θ(w~D∣Z)]+∥w‾D−wD⋆∥22,\lVert\widetilde{w}_D\rVert_2^2=\lVert w_D^\star\rVert_2^2+\mathbb{E}_\theta[\operatorname{Var}_\theta(\widetilde{w}_D\mid Z)]+\lVert\overline{w}_D-w_D^\star\rVert_2^2,
Var⁡θ[w~D]=Var⁡θ[wD⋆]+Eθ[Var⁡θ(w~D∣Z)]+∥w‾D−wD⋆∥22.(14)\operatorname{Var}_\theta[\widetilde{w}_D]=\operatorname{Var}_\theta[w_D^\star]+\mathbb{E}_\theta[\operatorname{Var}_\theta(\widetilde{w}_D\mid Z)]+\lVert\overline{w}_D-w_D^\star\rVert_2^2. \tag*{(14)}

Hence the native construction has no greater weight variance than the compound estimator or its Rao–Blackwellization. If w‾D∈VD\overline{w}_D\in\mathcal{V}_D, then w‾D=wD⋆\overline{w}_D=w_D^\star, so the native estimator is exactly the Rao–Blackwellized compound estimator.

Proof. By the tower property,

Eθ[w‾D(Z)f′(Z)]=Eθ[w~D(U,Z)f′(Z)],\mathbb{E}_\theta[\overline{w}_D(Z)f'(Z)]=\mathbb{E}_\theta[\widetilde{w}_D(U,Z)f'(Z)],

so w‾D\overline{w}_D preserves degree-DD exactness. Moreover, w~D−w‾D\widetilde{w}_D-\overline{w}_D is orthogonal to every square-integrable function of ZZ, while exactness of w‾D\overline{w}_D and wD⋆w_D^\star gives w‾D−wD⋆⊥VD\overline{w}_D-w_D^\star\perp\mathcal{V}_D. Since wD⋆∈VDw_D^\star\in\mathcal{V}_D, these three components are mutually orthogonal:

w~D=wD⋆+(w‾D−wD⋆)+(w~D−w‾D).(15)\widetilde{w}_D=w_D^\star+(\overline{w}_D-w_D^\star)+(\widetilde{w}_D-\overline{w}_D). \tag*{(15)}

Orthogonality gives the first identity in (14), with

∥w~D−w‾D∥22=Eθ[Var⁡θ(w~D∣Z)].\lVert\widetilde{w}_D-\overline{w}_D\rVert_2^2=\mathbb{E}_{\theta}\left[\operatorname{Var}_{\theta}(\widetilde{w}_D\mid Z)\right].

Degree-DD exactness fixes the mean of all three weights through the linear test function f(z)=zf(z)=z, giving the variance identity.

Gamma–Poisson specialization

For

Λ∼Gamma⁡(r,rate⁡=1−pp),Z∣Λ∼Pois⁡(Λ),η=logit⁡p,\Lambda\sim\operatorname{Gamma}\left(r,\operatorname{rate}=\frac{1-p}{p}\right),\qquad Z\mid\Lambda\sim\operatorname{Pois}(\Lambda),\qquad\eta=\operatorname{logit}p,

write Λ=eηG\Lambda=e^\eta G with G∼Gamma⁡(r,rate⁡=1)G\sim\operatorname{Gamma}(r,\operatorname{rate}=1). Since ∂ηlog⁡Λ=1\partial_\eta\log\Lambda=1, applying the order-DD Poisson log-rate weight conditionally on Λ\Lambda gives a degree-DD exact compound weight.

At order 2, w~2(Z,Λ)=(Z+Λ)/2\widetilde{w}_2(Z,\Lambda)=(Z+\Lambda)/2. Conjugacy gives

Λ∣Z=z∼Gamma⁡(r+z,rate⁡=1p),\Lambda\mid Z=z\sim\operatorname{Gamma}\left(r+z,\operatorname{rate}=\frac{1}{p}\right),

and therefore

E[w~2(Z,Λ)∣Z=z]=z+p(r+z)2=rp2+1+p2z=w2∗(z).(16)\mathbb{E}[\widetilde{w}_2(Z,\Lambda)\mid Z=z]=\frac{z+p(r+z)}{2} =\frac{rp}{2}+\frac{1+p}{2}z=w_2^*(z). \tag*{(16)}

Thus the native order-2 Negative–Binomial weight is exactly the Rao–Blackwellization of its Gamma–Poisson counterpart.

At order 3, the conditional Poisson weight can be written as

w~3(Z,Λ)=5Λ12+2Z3−Z(Z−1)12Λ.(17)\widetilde{w}_3(Z,\Lambda)=\frac{5\Lambda}{12}+\frac{2Z}{3}-\frac{Z(Z-1)}{12\Lambda}. \tag*{(17)}

Under the posterior above, E[Λ∣Z=z]=p(r+z)\mathbb{E}[\Lambda\mid Z=z]=p(r+z) and, for z≥2z\ge2, E[Λ−1∣Z=z]=1/[p(r+z−1)]\mathbb{E}[\Lambda^{-1}\mid Z=z]=1/[p(r+z-1)]. Because z(z−1)=0z(z-1)=0 for z∈{0,1}z\in\{0,1\}, conditioning (17) gives, for all z∈N0z\in\mathbb{N}_0,

w‾3(z)=5p(r+z)12+2z3−z(z−1)12p(r+z−1),(18)\overline{w}_3(z)=\frac{5p(r+z)}{12}+\frac{2z}{3}-\frac{z(z-1)}{12p(r+z-1)}, \tag*{(18)}

where the final term is set to zero for z<2z<2. Both w‾3\overline{w}_3 and the native w3∗w_3^* are degree-3 exact, so

r3:=w‾3−w3∗⊥span⁡{1,Z,Z2}.r_3:=\overline{w}_3-w_3^*\perp\operatorname{span}\{1,Z,Z^2\}.

Moreover, (18) is O(z)O(z) as z→∞z\to\infty, whereas the native formula in Appendix E.3 satisfies

w3∗(z)=−(1−p)312p(r+1)z2+O(z).w_3^*(z)=-\frac{(1-p)^3}{12p(r+1)}z^2+O(z).

Hence r3≢0r_3\not\equiv0 for r>0r>0 and 0<p<10<p<1. Proposition 4.3 therefore separates the compound order-3 variance gap into auxiliary conditional variance and the additional native null-component norm ∥r3∥22\lVert r_3\rVert_2^2.

Connection with other methods

Recovering pathwise derivatives

Proof of Scalar location–scale recovery. Because w2∗∈V2=span⁡{1,Z}w_2^*\in V_2=\operatorname{span}\{1,Z\}, write w2∗(z)=a+bzw_2^*(z)=a+bz. Linear and quadratic exactness impose

a+bμθ=μ˙,aμθ+b(μθ2+σθ2)=μθμ˙+σθσ˙.(19)a+b\mu_\theta=\dot{\mu},\qquad a\mu_\theta+b(\mu_\theta^2+\sigma_\theta^2)=\mu_\theta\dot{\mu}+\sigma_\theta\dot{\sigma}. \tag*{(19)}

Thus b=σ˙/σθb=\dot{\sigma}/\sigma_\theta and a=μ˙−μθσ˙/σθa=\dot{\mu}-\mu_\theta\dot{\sigma}/\sigma_\theta, so

w2∗(z)=μ˙+σ˙σθ(z−μθ).(20)w_2^*(z)=\dot{\mu}+\frac{\dot{\sigma}}{\sigma_\theta}(z-\mu_\theta). \tag*{(20)}

Since Z=μθ+σθεZ=\mu_\theta+\sigma_\theta\varepsilon, ∂θZ=μ˙+σ˙ε=w2∗(Z)\partial_\theta Z=\dot{\mu}+\dot{\sigma}\varepsilon=w_2^*(Z), which gives exactness for every sufficiently regular ff.

For a pure location family, σ˙=0\dot{\sigma}=0, so degree-1 exactness already suffices.

Proof of Gaussian-vector recovery. The gradients of quadratic polynomials span V2={a+A(z−μθ):a∈RK, A=AT}V_2=\{a+A(z-\mu_\theta):a\in\mathbb{R}^K,\ A=A^\mathsf{T}\}. Hence the least-norm solution is W2⋆(z)=a+A(z−μθ)W_2^\star(z)=a+A(z-\mu_\theta) with A=ATA=A^\mathsf{T}. Linear and quadratic exactness yield

a=μ˙,AΣθ+ΣθA=Σ˙.(21)a=\dot{\mu},\qquad A\Sigma_\theta+\Sigma_\theta A=\dot{\Sigma}. \tag*{(21)}

Because Σθ≻0\Sigma_\theta\succ0, the Sylvester equation has a unique symmetric solution AA, giving the weight results. Gaussian integration by parts then gives

Eθ[W2⋆(Z)T∇f(Z)]=μ˙TEθ[∇f(Z)]+12tr⁡(Σ˙Eθ[∇2f(Z)])=∂θEθ[f(Z)],(22)\mathbb{E}_\theta[W_2^\star(Z)^\mathsf{T}\nabla f(Z)]=\dot{\mu}^\mathsf{T}\mathbb{E}_\theta[\nabla f(Z)]+\frac{1}{2}\operatorname{tr}\left(\dot{\Sigma}\mathbb{E}_\theta[\nabla^2f(Z)]\right)=\partial_\theta\mathbb{E}_\theta[f(Z)], \tag*{(22)}

for every sufficiently regular ff.

Connection to measure-valued derivatives and quadrature

For Z∼Pois⁡(λ)Z\sim\operatorname{Pois}(\lambda) with η=log⁡λ\eta=\log\lambda,

∂ηE[f(Z)]=λE[f(Z+1)−f(Z)]=λE[∫01f′(Z+t) dt].\partial_\eta\mathbb{E}[f(Z)]=\lambda\mathbb{E}[f(Z+1)-f(Z)]=\lambda\mathbb{E}\left[\int_0^1 f'(Z+t)\,\mathrm{d}t\right].

Replacing the integral with polynomially exact quadrature and returning the shifted terms to the original Poisson law yields the same weights as the moment construction.

For degree-2 exactness, f′f' is linear, so the two-node rule at t=0,1t=0,1 is exact:

∂ηE[f(Z)]=λ2E[f′(Z)+f′(Z+1)]=E[λ+Z2f′(Z)],(23)\begin{aligned} \partial_\eta\mathbb{E}[f(Z)]&=\frac{\lambda}{2}\mathbb{E}[f'(Z)+f'(Z+1)]\\ &=\mathbb{E}\left[\frac{\lambda+Z}{2}f'(Z)\right], \tag*{(23)} \end{aligned}

where λE[g(Z+1)]=E[Zg(Z)]\lambda\mathbb{E}[g(Z+1)]=\mathbb{E}[Zg(Z)]. Thus quadrature recovers w2⋆(Z)=(λ+Z)/2w_2^\star(Z)=(\lambda+Z)/2.

For degree-3 exactness, interpolate f′(Z+t)f'(Z+t) at t=0,1,2t=0,1,2. Exact integration of quadratics on [0,1][0,1] gives weights 5/125/12, 2/32/3, and −1/12-1/12:

∂ηE[f(Z)]=λE[512f′(Z)+23f′(Z+1)−112f′(Z+2)]=E[(5λ12+23Z−Z(Z−1)12λ)f′(Z)],(24)\begin{aligned} \partial_\eta\mathbb{E}[f(Z)]&=\lambda\mathbb{E}\left[\frac{5}{12}f'(Z)+\frac{2}{3}f'(Z+1)-\frac{1}{12}f'(Z+2)\right]\\ &=\mathbb{E}\left[\left(\frac{5\lambda}{12}+\frac{2}{3}Z-\frac{Z(Z-1)}{12\lambda}\right)f'(Z)\right], \tag*{(24)} \end{aligned}

using λ2E[g(Z+2)]=E[Z(Z−1)g(Z)]\lambda^2\mathbb{E}[g(Z+2)]=\mathbb{E}[Z(Z-1)g(Z)]. Hence

w3⋆(Z)=5λ12+8λ+112λZ−112λZ2,w_3^\star(Z)=\frac{5\lambda}{12}+\frac{8\lambda+1}{12\lambda}Z-\frac{1}{12\lambda}Z^2,

again matching the least-norm moment solution.

The identity above is the measure-valued-derivative representation of the Poisson gradient: a finite difference between neighboring laws. The same argument applies to other distributions with finite-difference derivative identities; the Binomial quadratic weight, for example, follows from the analogous two-node construction.

Connection to ReinMax and generalized straight-through methods

Lemma C.1 (Categorical quadratic exactness). Let Z∼Cat⁡(p)Z\sim\operatorname{Cat}(p) be represented by Z∈{e1,…,eK}Z\in\{e_1,\ldots,e_K\}, where p=softmax⁡(η)p=\operatorname{softmax}(\eta) has pi>0p_i>0 for all ii, and let J=diag⁡(p)−ppTJ=\operatorname{diag}(p)-pp^\mathsf{T}. A same-path estimator g^(Z)=W(Z)∇f(Z)\hat{g}(Z)=W(Z)\nabla f(Z), Wi:=W(ei)∈RK×KW_i:=W(e_i)\in\mathbb{R}^{K\times K}, is exact for every polynomial of degree at most two if and only if

Wiei=12(ei−p),piWiej+pjWjei=0(i≠j),∑ipiWi=J.(25)W_i e_i=\frac{1}{2}(e_i-p),\qquad p_iW_i e_j+p_jW_j e_i=0\quad(i\ne j),\qquad\sum_i p_iW_i=J. \tag*{(25)}

Proof. Write f(z)=a⊤z+12z⊤Hzf(z)=a^\top z+\frac{1}{2}z^\top H z with H=H⊤H=H^\top. Quadratic exactness is equivalent to

∑ipiWi(a+Hei)=J(a+12diag⁡(H))(26)\sum_i p_iW_i\left(a+He_i\right)=J\left(a+\frac{1}{2}\operatorname{diag}(H)\right) \tag*{(26)}

for all aa and H=H⊤H=H^\top.

The coefficient of aa gives the final constraint in (25). Taking H=eiei⊤H=e_ie_i^\top and H=eiej⊤+ejei⊤H=e_ie_j^\top+e_je_i^\top gives the first two constraints. Conversely, these matrices span the symmetric matrices, so (25) implies (26).

Proposition C.2 (Symmetry characterizes ReinMax). Let WW be quadratic-exact under the assumptions of Lemma C.1. Then

Wi=Wi⊤for every iW_i=W_i^\top\qquad\text{for every }i

if and only if

Wi=12[J+(ei−p)(ei−p)⊤],i=1,…,K.(27)W_i=\frac{1}{2}\left[J+(e_i-p)(e_i-p)^\top\right],\qquad i=1,\ldots,K. \tag*{(27)}

Thus sample-wise symmetry uniquely selects the ReinMax weight at τ=1\tau=1 within the quadratic-exact class.

Proof. Write di=ei−pd_i=e_i-p and denote the right-hand side of (27) by WiRMW_i^{\mathrm{RM}}. Since Jei=pidiJe_i=p_id_i and ∑ipididi⊤=J\sum_i p_id_id_i^\top=J, its quadratic-exactness follows from Lemma C.1:

WiRMei=12[pidi+(1−pi)di]=12di,W_i^{\mathrm{RM}}e_i=\frac{1}{2}\left[p_id_i+(1-p_i)d_i\right]=\frac{1}{2}d_i,
WiRMej=pj2(ej−ei),i≠j,W_i^{\mathrm{RM}}e_j=\frac{p_j}{2}(e_j-e_i),\qquad i\ne j,
∑ipiWiRM=12[J+∑ipididi⊤]=J.(28)\sum_i p_iW_i^{\mathrm{RM}}=\frac{1}{2}\left[J+\sum_i p_id_id_i^\top\right]=J. \tag*{(28)}

The matrices WiRMW_i^{\mathrm{RM}} are symmetric, so it remains to show uniqueness under symmetry.

Let Ri:=Wi−WiRMR_i:=W_i-W_i^{\mathrm{RM}} and define the linear matrix-valued map

R(u):=∑ipiuiRi,u∈RK.\mathcal{R}(u):=\sum_i p_iu_iR_i,\qquad u\in\mathbb{R}^K.

Both WW and WRMW^{\mathrm{RM}} are quadratic-exact. Applying their difference to fu(z)=12(u⊤z)2f_u(z)=\frac{1}{2}(u^\top z)^2 gives R(u)u=0\mathcal{R}(u)u=0 for every uu. Polarization therefore gives

R(u)v=−R(v)ufor all u,v∈RK.(29)\mathcal{R}(u)v=-\mathcal{R}(v)u\qquad\text{for all }u,v\in\mathbb{R}^K. \tag*{(29)}

Since Ri=Ri⊤R_i=R_i^\top, each R(u)\mathcal{R}(u) is symmetric. Hence, for arbitrary r,u,v∈RKr,u,v\in\mathbb{R}^K,

r⊤R(u)v=v⊤R(u)r=−v⊤R(r)u=−u⊤R(r)v=u⊤R(v)r=r⊤R(v)u=−r⊤R(u)v.(30)\begin{aligned} r^\top\mathcal{R}(u)v=v^\top\mathcal{R}(u)r=-v^\top\mathcal{R}(r)u=-u^\top\mathcal{R}(r)v \\ &=u^\top\mathcal{R}(v)r=r^\top\mathcal{R}(v)u=-r^\top\mathcal{R}(u)v. \tag*{(30)} \end{aligned}

Thus R(u)v=0\mathcal{R}(u)v=0 for all u,vu,v. Taking u=eiu=e_i gives piRiv=0p_iR_iv=0 for every vv, hence Ri=0R_i=0 because pi>0p_i>0. Therefore Wi=WiRMW_i=W_i^{\mathrm{RM}} for every ii.

Proposition C.3 (Least-norm categorical quadratic estimator). Let Z∼Cat⁡(p)Z\sim\operatorname{Cat}(p) be represented by Z∈{e1,…,eK}Z\in\{e_1,\ldots,e_K\}, where p=softmax⁡(η)p=\operatorname{softmax}(\eta) has pi>0p_i>0 for all ii, and let J=diag⁡(p)−pp⊤J=\operatorname{diag}(p)-pp^\top. Consider quadratic-exact same-path estimators

g^(Z)=W(Z)∇f(Z),Wi:=W(ei)∈RK×K.\hat{g}(Z)=W(Z)\nabla f(Z),\qquad W_i:=W(e_i)\in\mathbb{R}^{K\times K}.

Among all such weights, there is a unique minimizer of E∥W(Z)∥F2\mathbb{E}\lVert W(Z)\rVert_F^2.

For i≠ji\ne j, define ωij=pipjpi+pj\omega_{ij}=\frac{p_ip_j}{p_i+p_j}, and let G∈RK×KG\in\mathbb{R}^{K\times K} have entries

Gij=−ωij(i≠j),Gii=∑j≠iωij.G_{ij}=-\omega_{ij}\quad(i\ne j),\qquad G_{ii}=\sum_{j\ne i}\omega_{ij}.

If C∈RK×KC \in\mathbb{R}^{K \times K} satisfies

GC=12J,GC = \frac{1}{2}J,

then the minimum-norm weight is

Wi⋆ej={12(ei−p),j=i,pjpi+pjCT(ej−ei),j≠i.W_i^{\star}e_j = \begin{cases} \frac{1}{2}(e_i-p), & j=i,\\ \frac{p_j}{p_i+p_j}C^{\mathsf{T}}(e_j-e_i), & j\ne i. \end{cases}

In particular, one may take C=12G†JC=\frac{1}{2}G^{\dagger}J.

Proof. By Lemma C.1, quadratic exactness imposes (25). The first relation fixes the diagonal columns, while the second identifies the two off-diagonal columns associated with each pair i<ji<j. We therefore use (Wiej)i<j(W_i e_j)_{i<j} as coordinates for the remaining degrees of freedom and equip them with the inner product

⟨W,V⟩H:=∑i<jpi(pi+pj)pj(Wiej)T(Viej).\langle W,V\rangle_{\mathcal{H}} := \sum_{i<j}\frac{p_i(p_i+p_j)}{p_j}(W_i e_j)^{\mathsf{T}}(V_i e_j).

Indeed, using pjWjei=−piWiejp_jW_j e_i=-p_iW_i e_j, the original objective reduces to

E∥W(Z)∥F2=const+∑i<jpi(pi+pj)pj∥Wiej∥2=const+∥W∥H2.(31)\mathbb{E}\lVert W(Z)\rVert_{\mathrm{F}}^2=\mathrm{const}+\sum_{i<j}\frac{p_i(p_i+p_j)}{p_j}\lVert W_i e_j\rVert^2=\mathrm{const}+\lVert W\rVert_{\mathcal{H}}^2. \tag*{(31)}

The remaining exactness constraints define a linear map A:H→RK×K\mathcal{A}:\mathcal{H}\to\mathbb{R}^{K\times K} by

ejTAW:=(∑i<jpiWiej−∑i>jpjWjei)T.(32)e_j^{\mathsf{T}}\mathcal{A}W:=\left(\sum_{i<j}p_iW_i e_j-\sum_{i>j}p_jW_j e_i\right)^{\mathsf{T}}. \tag*{(32)}

After subtracting the fixed diagonal contribution in (25), quadratic exactness is AW=12J\mathcal{A}W=\frac{1}{2}J.

For C∈RK×KC\in\mathbb{R}^{K\times K}, the adjoint is determined by

⟨AW,C⟩F=∑i<jpi(Wiej)TCT(ej−ei),\langle\mathcal{A}W,C\rangle_{\mathrm{F}}=\sum_{i<j}p_i(W_i e_j)^{\mathsf{T}}C^{\mathsf{T}}(e_j-e_i),
(A∗C)eiej=pjpi+pjCT(ej−ei),i<j.(33)(\mathcal{A}^{\ast}C)e_i e_j=\frac{p_j}{p_i+p_j}C^{\mathsf{T}}(e_j-e_i),\qquad i<j. \tag*{(33)}

Consequently, the normal operator is

ejTAA∗C=∑i≠jωij(ej−ei)TC=ejTGC,AA∗C=GC.(34)e_j^{\mathsf{T}}\mathcal{A}\mathcal{A}^{\ast}C=\sum_{i\ne j}\omega_{ij}(e_j-e_i)^{\mathsf{T}}C=e_j^{\mathsf{T}}GC,\qquad\mathcal{A}\mathcal{A}^{\ast}C=GC. \tag*{(34)}

The minimum-norm solution lies in range⁡(A∗)=ker⁡(A)⊥\operatorname{range}(\mathcal{A}^{\ast})=\ker(\mathcal{A})^{\perp}. Hence W⋆=A∗CW^{\star}=\mathcal{A}^{\ast}C, where the coefficient matrix satisfies the normal system

GC=12J.GC=\frac{1}{2}J.

Equation (33) gives the off-diagonal columns displayed in Proposition C.3, and the first constraint in (25) gives the diagonal columns. Since G1=0G1=0 and J1=0J1=0, one may take C=12G†JC=\frac{1}{2}G^{\dagger}J; adding 1aT1a^{\mathsf{T}} to CC leaves CT(ej−ei)C^{\mathsf{T}}(e_j-e_i) unchanged. Uniqueness follows from uniqueness of the minimum-norm element of the feasible affine subspace.

Corollary C.4 (Relation to Hooper and Shekhovtsov). The least-norm quadratic-exact estimator in Proposition C.3 coincides with the τ→∞\tau\to\infty categorical minimum-variance estimator of Hooper & Shekhovtsov [7].

Relation to the 1D MVE of Hooper and Shekhovtsov. Let ZZ have a finite scalar support, with m1=Eθ[Z]m_1 = \mathbb{E}_{\theta}[Z], m2=Eθ[Z2]m_2 = \mathbb{E}_{\theta}[Z^2], and v=m2−m12>0v = m_2 - m_1^2 > 0. Then the degree-2 least-norm weight coincides with the hard quadratically-unbiased 1D MVE of Hooper & Shekhovtsov [7].

The degree-2 least-norm construction gives w2∗(z)=a+bzw_2^*(z) = a + bz, with

a+bm1=m˙1,am1+bm2=12m˙2.a + bm_1 = \dot{m}_1,\qquad am_1 + bm_2 = \frac{1}{2}\dot{m}_2.

Hence

w2∗(z)=m2−zm1vm˙1+z−m12vm˙2.w_2^*(z) = \frac{m_2-zm_1}{v}\dot{m}_1 + \frac{z-m_1}{2v}\dot{m}_2.

which corresponds to Hooper & Shekhovtsov (2026, Prop. C.3). The correspondence is specific to order 2. For a scalar finite-support law, the construction extends to degree-DD exactness whenever the support contains at least DD distinct points.

Theory section Proofs

Throughout this appendix, a dot denotes differentiation with respect to the parameter coordinate under consideration.

Proof of Proposition 4.1

Proof. Let vD(Z)=(1,Z,…,ZD−1)⊤v_D(Z) = (1,Z,\ldots,Z^{D-1})^\top and r=w−wD∗r = w-w_D^*. Since ww and wD∗w_D^* satisfy the same exactness constraints, Eθ[r(Z)vD(Z)]=0\mathbb{E}_{\theta}[r(Z)v_D(Z)] = 0, hence r⊥VDr \perp V_D. Since wD∗∈VDw_D^* \in V_D,

Eθ[w(Z)2]=Eθ[wD∗(Z)2]+Eθ[r(Z)2]=bD⊤GD−1bD+Eθ[r(Z)2],Var⁡θ[w(Z)]=Var⁡θ[wD∗(Z)]+Eθ[r(Z)2].(35)\begin{aligned} \mathbb{E}_{\theta}[w(Z)^2] &= \mathbb{E}_{\theta}[w_D^*(Z)^2] + \mathbb{E}_{\theta}[r(Z)^2] = b_D^\top G_D^{-1}b_D + \mathbb{E}_{\theta}[r(Z)^2],\\ \operatorname{Var}_{\theta}[w(Z)] &= \operatorname{Var}_{\theta}[w_D^*(Z)] + \mathbb{E}_{\theta}[r(Z)^2]. \tag*{(35)} \end{aligned}

The second identity follows because degree-DD exactness fixes Eθ[w(Z)]\mathbb{E}_{\theta}[w(Z)]. Equality in either objective requires r=0r = 0 almost surely, proving uniqueness.

Proof of Proposition 4.5

Assume f∈CD+1f \in C^{D+1} with bounded f(D+1)f^{(D+1)}, m2D+2(a)<∞m_{2D+2}(a) < \infty, w,sθ∈L2(pθ)w,s_{\theta} \in L^2(p_{\theta}), and that the score identity holds for ff and degree-DD polynomials. Let mk(a)=Eθ[∣Z−a∣k]m_k(a) = \mathbb{E}_{\theta}[|Z-a|^k]. The constants in Proposition 4.5 are

CD,w(a)=m2D(a)1/2D!,CD,s(a)=m2D+2(a)1/2(D+1)!.(36)C_{D,w}(a) = \frac{m_{2D}(a)^{1/2}}{D!},\qquad C_{D,s}(a) = \frac{m_{2D+2}(a)^{1/2}}{(D+1)!}. \tag*{(36)}

Proof. Fix an expansion point aa independent of θ\theta, and let TDT_D be the degree-DD Taylor polynomial of ff about aa. Degree-DD exactness annihilates TDT_D, so the score identity reduces the bias to

Bw(f)=Eθ[w(Z)(f′(Z)−TD′(Z))−sθ(Z)(f(Z)−TD(Z))].(37)B_w(f) = \mathbb{E}_{\theta}\left[w(Z)(f'(Z)-T_D'(Z))-s_{\theta}(Z)(f(Z)-T_D(Z))\right]. \tag*{(37)}

Taylor’s theorem gives ∣f′(z)−TD′(z)∣≤∥f(D+1)∥∞∣z−a∣D/D!|f'(z)-T_D'(z)| \le\lVert f^{(D+1)}\rVert_{\infty}|z-a|^D/D! and ∣f(z)−TD(z)∣≤∥f(D+1)∥∞∣z−a∣D+1/(D+1)!|f(z)-T_D(z)| \le\lVert f^{(D+1)}\rVert_{\infty}|z-a|^{D+1}/(D+1)!. Cauchy–Schwarz therefore yields

∣Bw(f)∣≤∥f(D+1)∥∞[m2D(a)1/2D!∥w∥2+m2D+2(a)1/2(D+1)!∥sθ∥2].(38)|B_w(f)| \le\lVert f^{(D+1)}\rVert_{\infty}\left[\frac{m_{2D}(a)^{1/2}}{D!}\lVert w\rVert_2+\frac{m_{2D+2}(a)^{1/2}}{(D+1)!}\lVert s_{\theta}\rVert_2\right]. \tag*{(38)}

Order-2 ReinMax in a scalar natural exponential family

The finite-support result isolates the component introduced by ReinMax before specializing to Poisson.

Proposition D.1 (ReinMax excess component). Let pη(z)=h(z)exp⁡{ηz−A(η)}p_\eta(z)=h(z)\exp\{\eta z-A(\eta)\} be a scalar natural exponential family represented categorically over a finite support. Write Y=Z−μY=Z-\mu, V=Eη[Y2]V=\mathbb{E}_\eta[Y^2], M3=Eη[Y3]M_3=\mathbb{E}_\eta[Y^3], and M4=Eη[Y4]M_4=\mathbb{E}_\eta[Y^4]. At τ=1\tau=1,

wRM(Z)=12(V+Y2)=V+M32VY+12(Y2−M3VY−V),(39)w_{\mathrm{RM}}(Z)=\frac{1}{2}(V+Y^2)=V+\frac{M_3}{2V}Y+\frac{1}{2}\left(Y^2-\frac{M_3}{V}Y-V\right), \tag*{(39)}

where the first two terms are w2∗(Z)w_2^*(Z) and the final term is rRM(Z)r_{\mathrm{RM}}(Z),

rRM⊥span⁡{1,Z},Var⁡η[wRM]−Var⁡η[w2∗]=14(M4−V2−M32V).r_{\mathrm{RM}}\perp\operatorname{span}\{1,Z\},\qquad\operatorname{Var}_\eta[w_{\mathrm{RM}}]-\operatorname{Var}_\eta[w_2^*]=\frac{1}{4}\left(M_4-V^2-\frac{M_3^2}{V}\right).

The variance gap is strictly positive whenever the law has at least three support points of positive probability.

Proof. Let C∼Cat⁡(p)C\sim\operatorname{Cat}(p), let xx contain the support values, and write Z=xTCZ=x^\mathsf{T}C. With J(p)=diag⁡(p)−ppTJ(p)=\operatorname{diag}(p)-pp^\mathsf{T}, the τ=1\tau=1 ReinMax matrix weight reduces to

AC=12[J(p)+(C−p)(C−p)T],xTACx=12(V+Y2).(40)A_C=\frac{1}{2}\left[J(p)+(C-p)(C-p)^\mathsf{T}\right],\qquad x^\mathsf{T}A_Cx=\frac{1}{2}(V+Y^2). \tag*{(40)}

For a natural exponential family, μ˙=V\dot{\mu}=V and V˙=M3\dot{V}=M_3, so the native order-2 weight is w2∗=V+(M3/(2V))Yw_2^*=V+(M_3/(2V))Y. The residual in (39) satisfies Eη[rRM]=Eη[YrRM]=0\mathbb{E}_\eta[r_{\mathrm{RM}}]=\mathbb{E}_\eta[Yr_{\mathrm{RM}}]=0, and Proposition 4.1 gives

Var⁡η[wRM]−Var⁡η[w2∗]=∥rRM∥22=14(M4−V2−M32V).(41)\operatorname{Var}_\eta[w_{\mathrm{RM}}]-\operatorname{Var}_\eta[w_2^*]=\lVert r_{\mathrm{RM}}\rVert_2^2=\frac{1}{4}\left(M_4-V^2-\frac{M_3^2}{V}\right). \tag*{(41)}

The gap can vanish only if Y2−(M3/V)Y−V=0Y^2-(M_3/V)Y-V=0 almost surely; a nonzero quadratic cannot vanish on three support points.

Poisson ReinMax under increasing categorical truncation

The Poisson result follows by letting the categorical truncation grow to infinite support.

Proposition D.2 (Poisson categorical limit). Let ZKZ_K have the Poisson law truncated to {0,…,K}\{0,\ldots,K\} and renormalized, with mean μK\mu_K and variance VKV_K. Under categorical embedding with logits ℓk=kη−log⁡(k!)\ell_k=k\eta-\log(k!), η=log⁡λ\eta=\log\lambda, the τ=1\tau=1 ReinMax weight is

wRM,K(ZK)=12[VK+(ZK−μK)2].w_{\mathrm{RM},K}(Z_K)=\frac{1}{2}\left[V_K+(Z_K-\mu_K)^2\right].

Extend wRM,K(z)=12[VK+(z−μK)2]w_{\mathrm{RM},K}(z)=\frac{1}{2}\left[V_K+(z-\mu_K)^2\right] to z∈N0z\in\mathbb{N}_0. Then wRM,K→wRMw_{\mathrm{RM},K}\to w_{\mathrm{RM}} in L2(pλ)L^2(p_\lambda), where wRM(z)=12[λ+(z−λ)2]w_{\mathrm{RM}}(z)=\frac{1}{2}\left[\lambda+(z-\lambda)^2\right]. The limiting weight satisfies

wRM(Z)=Z+λ2+12[(Z−λ)2−(Z−λ)−λ],(42)w_{\mathrm{RM}}(Z)=\frac{Z+\lambda}{2}+\frac{1}{2}\left[(Z-\lambda)^2-(Z-\lambda)-\lambda\right], \tag*{(42)}

where the first term is w2∗(Z)w_2^*(Z) and the second term is rRM(Z)r_{\mathrm{RM}}(Z),

rRM⊥span⁡{1,Z},∥rRM∥22=λ22.r_{\mathrm{RM}}\perp\operatorname{span}\{1,Z\},\qquad\lVert r_{\mathrm{RM}}\rVert_2^2=\frac{\lambda^2}{2}.

Proof. Proposition D.1 applied to the truncated Poisson law gives wRM,K=12[VK+(ZK−μK)2]w_{\mathrm{RM},K}=\frac{1}{2}[V_K+(Z_K-\mu_K)^2]. The truncated moments give μK→λ\mu_K\to\lambda and VK→λV_K\to\lambda. Hence the coefficients of the quadratic weight functions converge; since the Poisson law has a finite fourth moment, the convergence holds in L2(pλ)L^2(p_\lambda).

For Y=Z−λY=Z-\lambda, the limiting decomposition in (42) has E[Y]=0\mathbb{E}[Y]=0, E[Y2]=E[Y3]=λ\mathbb{E}[Y^2]=\mathbb{E}[Y^3]=\lambda, and E[Y4]=λ+3λ2\mathbb{E}[Y^4]=\lambda+3\lambda^2. Therefore

E[rRM]=E[ZrRM]=0,∥rRM∥22=14E[(Y2−Y−λ)2]=λ22.(43)\mathbb{E}[r_{\mathrm{RM}}]=\mathbb{E}[Zr_{\mathrm{RM}}]=0,\qquad\lVert r_{\mathrm{RM}}\rVert_2^2=\frac{1}{4}\mathbb{E}\left[(Y^2-Y-\lambda)^2\right]=\frac{\lambda^2}{2}. \tag*{(43)}

Additional closed-form estimators

For a scalar discrete variable XX and parameter coordinate θ\theta, write the order-mm same-path estimator as

∂θE^[f(X)]=vθ(m)(X)f′(X).(44)\partial_\theta\widehat{\mathbb{E}}[f(X)] = v_\theta^{(m)}(X)f'(X). \tag*{(44)}

Here order mm means exactness for every polynomial ff of degree at most mm. The formulas below are the minimum-L2(pθ)L^2(p_\theta) solutions in the stated parameter coordinates: order 2 is affine, v(2)(x)=a0+a1xv^{(2)}(x) = a_0 + a_1x, and order 3 is quadratic, v(3)(x)=a0+a1x+a2x2v^{(3)}(x) = a_0 + a_1x + a_2x^2.

Poisson: order 4

For Z∼Pois⁡(λ)Z \sim\operatorname{Pois}(\lambda) with η=log⁡λ\eta= \log\lambda, order-4 exactness gives

w4⋆(z)=v4(z)TG4−1b4,v4(z)=(1,z,z2,z3)T.w_4^\star(z) = v_4(z)^\mathsf{T}G_4^{-1}b_4,\qquad v_4(z) = (1,z,z^2,z^3)^\mathsf{T}.

Using moments through order 6 and (b4)d=d−1∂ηE[Zd](b_4)_d = d^{-1}\partial_\eta\mathbb{E}[Z^d], the 4×44 \times4 system gives

G4−1b4=(3λ/8(19λ2+5λ+2)/(24λ2)−(5λ+3)/(24λ2)1/(24λ2)).G_4^{-1}b_4 = \begin{pmatrix} 3\lambda/8\\ (19\lambda^2+5\lambda+2)/(24\lambda^2)\\ -(5\lambda+3)/(24\lambda^2)\\ 1/(24\lambda^2) \end{pmatrix}.

The resulting weight and variance are

w4⋆(Z)=3λ8+19λ2+5λ+224λ2Z−5λ+324λ2Z2+124λ2Z3Var⁡(w4⋆)=λ4+172+196λ.w_4^\star(Z)=\frac{3\lambda}{8}+\frac{19\lambda^2+5\lambda+2}{24\lambda^2}Z-\frac{5\lambda+3}{24\lambda^2}Z^2+\frac{1}{24\lambda^2}Z^3 \qquad \operatorname{Var}(w_4^\star)=\frac{\lambda}{4}+\frac{1}{72}+\frac{1}{96\lambda}.

Binomial: η=logit⁡p\eta= \operatorname{logit}p

Let

X∼Binomial⁡(n,p),q=1−p,η=logit⁡p.(45)X \sim\operatorname{Binomial}(n,p),\qquad q=1-p,\qquad\eta=\operatorname{logit}p. \tag*{(45)}

The order-2 estimator is

vη(2)(x)=np2+1−2p2x.(46)v_\eta^{(2)}(x)=\frac{np}{2}+\frac{1-2p}{2}x. \tag*{(46)}

For n≥2n \ge2, the order-3 estimator is

vη(3)(x)=np(5−6p)12q+[1−2p2+2np+1−2p12(n−1)pq]x−112(n−1)pqx2.(47)v_\eta^{(3)}(x)=\frac{np(5-6p)}{12q} +\left[\frac{1-2p}{2}+\frac{2np+1-2p}{12(n-1)pq}\right]x -\frac{1}{12(n-1)pq}x^2. \tag*{(47)}

The corresponding raw-pp weight follows from parameterization equivariance:

vp(m)(x)=vη(m)(x)pq.(48)v_p^{(m)}(x)=\frac{v_\eta^{(m)}(x)}{pq}. \tag*{(48)}

Negative binomial: η=logit⁡p\eta= \operatorname{logit}p

We use the convention

Pr⁡(X=x)=Γ(r+x)Γ(r)x!(1−p)rpx,q=1−p.(49)\Pr(X=x)=\frac{\Gamma(r+x)}{\Gamma(r)x!}(1-p)^r p^x,\qquad q=1-p. \tag*{(49)}

so that E[X]=rp/q\mathbb{E}[X]=rp/q. For η=logit⁡p\eta=\operatorname{logit}p, the order-2 estimator is

vη(2)(x)=rp2+1+p2x.(50)v_\eta^{(2)}(x)=\frac{rp}{2}+\frac{1+p}{2}x. \tag*{(50)}

The order-3 estimator is

νη(3)(x)=rp(p+5)12+[1+p2+q2(2rp+1+p)12p(r+1)]x−q312p(r+1)x2.(51)\nu_{\eta}^{(3)}(x)=\frac{rp(p+5)}{12}+\left[\frac{1+p}{2}+\frac{q^{2}(2rp+1+p)}{12p(r+1)}\right]x-\frac{q^{3}}{12p(r+1)}x^{2}. \tag*{(51)}

The corresponding raw-pp weight is

νp(m)(x)=νη(m)(x)pq.(52)\nu_{p}^{(m)}(x)=\frac{\nu_{\eta}^{(m)}(x)}{pq}. \tag*{(52)}

Negative binomial: ρ=log⁡r\rho= \log r

Under the same negative-binomial convention, let

ρ=log⁡r.(53)\rho=\log r. \tag*{(53)}

The order-2 estimator is

νρ(2)(x)=rp2q+12x.(54)\nu_{\rho}^{(2)}(x)=\frac{rp}{2q}+\frac{1}{2}x. \tag*{(54)}

The order-3 estimator is

νρ(3)(x)=rp(5−p)12q+[12+(1+p)(2rp+1+p)12p(r+1)]x−q(1+p)12p(r+1)x2.(55)\nu_{\rho}^{(3)}(x)=\frac{rp(5-p)}{12q}+\left[\frac{1}{2}+\frac{(1+p)(2rp+1+p)}{12p(r+1)}\right]x-\frac{q(1+p)}{12p(r+1)}x^{2}. \tag*{(55)}

The corresponding raw-rr weight is

νr(m)(x)=νρ(m)(x)r.(56)\nu_{r}^{(m)}(x)=\frac{\nu_{\rho}^{(m)}(x)}{r}. \tag*{(56)}

Beta-binomial: \eta= \logit\pi

Let

X∼BetaBinomial⁡(n,α,β),α=κπ,β=κ(1−π),(57)X\sim\operatorname{BetaBinomial}(n,\alpha,\beta),\qquad\alpha=\kappa\pi,\qquad\beta=\kappa(1-\pi), \tag*{(57)}

and write

q=1-\pi,\qquad\eta=\logit\pi. \tag*{(58)}

The order-2 estimator is

νη(2)(x)=nπ2+1−2π2x.(59)\nu_{\eta}^{(2)}(x)=\frac{n\pi}{2}+\frac{1-2\pi}{2}x. \tag*{(59)}

For order 3, define

S:=2κnπ−2κπ+κ+2nκ+2,(60)S:=\frac{2\kappa n\pi-2\kappa\pi+\kappa+2n}{\kappa+2}, \tag*{(60)}
T:=κnπ(n−1)(κπ+1)(κ+1)(κ+2),(61)T:=\frac{\kappa n\pi(n-1)(\kappa\pi+1)}{(\kappa+1)(\kappa+2)}, \tag*{(61)}

and

Cη:=−(κ+1)(κ+2)(κ+3)(κ+2n)12κ(n−1)(κπ+1)(κq+1)(κ+n+1).(62)C_{\eta}:=-\frac{(\kappa+1)(\kappa+2)(\kappa+3)(\kappa+2n)}{12\kappa(n-1)(\kappa\pi+1)(\kappa q+1)(\kappa+n+1)}. \tag*{(62)}

Then

vη(3)(x)=(nπ2+CηT)+(1−2π2−CηS)x+Cηx2.(63)v_{\eta}^{(3)}(x)=\left(\frac{n\pi}{2}+C_{\eta}T\right)+\left(\frac{1-2\pi}{2}-C_{\eta}S\right)x+C_{\eta}x^2. \tag*{(63)}

The corresponding raw-π\pi weight is

vπ(m)(x)=vη(m)(x)π(1−π).(64)v_{\pi}^{(m)}(x)=\frac{v_{\eta}^{(m)}(x)}{\pi(1-\pi)}. \tag*{(64)}

Beta-binomial: ρ=log⁡κ\rho= \log\kappa

Under the same mean–concentration parameterization, let

ρ=log⁡κ.(65)\rho=\log\kappa. \tag*{(65)}

Retain the definitions of qq, SS, and TT from Section E.5, and define

D:=κ(n−1)2(κ+1)(κ+n).(66)D:=\frac{\kappa(n-1)}{2(\kappa+1)(\kappa+n)}. \tag*{(66)}

The order-2 estimator is

vρ(2)(x)=Dnπ−Dx.(67)v_{\rho}^{(2)}(x)=Dn\pi-Dx. \tag*{(67)}

For order 3, define

Cρ:=κ(κ+3)(2π−1)(3κ+2n+2)12(κ+n)(κπ+1)(κq+1)(κ+n+1).(68)C_{\rho}:=\frac{\kappa(\kappa+3)(2\pi-1)(3\kappa+2n+2)}{12(\kappa+n)(\kappa\pi+1)(\kappa q+1)(\kappa+n+1)}. \tag*{(68)}

Then

vρ(3)(x)=(Dnπ+CρT)+(−D−CρS)x+Cρx2.(69)v_{\rho}^{(3)}(x)=\left(Dn\pi+C_{\rho}T\right)+\left(-D-C_{\rho}S\right)x+C_{\rho}x^2. \tag*{(69)}

The corresponding raw-κ\kappa weight is

vκ(m)(x)=vρ(m)(x)κ.(70)v_{\kappa}^{(m)}(x)=\frac{v_{\rho}^{(m)}(x)}{\kappa}. \tag*{(70)}

Two-Parameter Straight-Through Implementation

Consider a hard scalar sample Zhard∼pa,bZ_{\mathrm{hard}}\sim p_{a,b} with optimized coordinates aa and bb. Suppose the desired same-path estimators are

∂aE[f(Z)]≈E[u(Z)f′(Z)],(71)\partial_a\mathbb{E}[f(Z)]\approx\mathbb{E}[u(Z)f'(Z)], \tag*{(71)}
∂bE[f(Z)]≈E[v(Z)f′(Z)].(72)\partial_b\mathbb{E}[f(Z)]\approx\mathbb{E}[v(Z)f'(Z)]. \tag*{(72)}

Here uu and vv may be any minimum-norm weights above, expressed in the model’s optimized coordinates aa and bb.

Let sg⁡(⋅)\operatorname{sg}(\cdot) denote stop-gradient. The corresponding straight-through surrogate is

Zst=sg⁡(Zhard)+sg⁡(u(Zhard))(a−sg⁡(a))+sg⁡(v(Zhard))(b−sg⁡(b)).(73)Z_{\mathrm{st}}=\operatorname{sg}(Z_{\mathrm{hard}})+\operatorname{sg}(u(Z_{\mathrm{hard}}))(a-\operatorname{sg}(a))+\operatorname{sg}(v(Z_{\mathrm{hard}}))(b-\operatorname{sg}(b)). \tag*{(73)}

For a Negative-Binomial variable parameterized by

a=η=logit⁡p,b=ρ=log⁡r,(74)a=\eta=\operatorname{logit}p,\qquad b=\rho=\log r, \tag*{(74)}

one evaluates

u(Zhard)=vη(m)(Zhard),v(Zhard)=vρ(m)(Zhard),(75)u(Z_{\mathrm{hard}})=v_{\eta}^{(m)}(Z_{\mathrm{hard}}),\qquad v(Z_{\mathrm{hard}})=v_{\rho}^{(m)}(Z_{\mathrm{hard}}), \tag*{(75)}

and inserts both weights into the same straight-through expression.

In PyTorch pseudocode, the scalar two-parameter construction is

z_st = (
    z_hard.detach()
    + u.detach() * (a - a.detach())
    + v.detach() * (b - b.detach())
)

Additional Experimental Details

Unless stated otherwise, means and standard deviations are computed over independently seeded runs, with seeds matched across estimator configurations. One additional detail on the tested method, is that for ReinMax, we take the largest rate of the batch, and calculate truncation using that rate and probability p=0.999p = 0.999.

Linear Poisson VAE

We follow the benchmark in Appendix G.1 of Ibrahim et al. [8]. EAT-cubic is tuned over the reported temperature grid [0.02, 0.05, 0.2]; 0.05 performs best in our replication. Across five independent matched seeds, order 2 obtains −167.02±0.05-167.02 \pm0.05, EAT-cubic obtains −167.11±0.06-167.11 \pm0.06 at temperature 0.05 (p=0.034p = 0.034, two-sided Welch tt-test), and the exact reference gives −166.99±0.04-166.99 \pm0.04. Because final ELBO saturates in this controlled benchmark, we use it primarily to validate exactness and gradient variance rather than as a headline performance comparison.

Neural sequence model

We follow the synthetic spike-train benchmark, temperature grids, and tuning protocol in Appendix G.2 of Ibrahim et al. [8], except for initialization. In our implementation, the stated N(0,0.52)N(0, 0.5^2) initialization did not reproduce the reported ELBO range: with either one or five Monte Carlo samples, runs converged around −427-427 to −429-429. The repository-default Conv1d initialization reproduced results near −330.5-330.5, so we used it for every estimator and held it fixed across methods. Reported statistics use 30 independent matched seeds.

Nonlinear Poisson and count VAEs

We reuse the experimental design of Titsias & Shi [24], which follows earlier discrete-gradient control-variate studies ([4] (Yin & Zhou 2019; Yin et al. 2019)), and replace only the latent distribution with Poisson. The prior is Pois(1.0): no proper uninformative Poisson prior exists, and rate 1.0 corresponds to natural parameter 0. For the count-family comparison, we retain the same design but restrict the experiments to dynamically binarized MNIST. Binomial and Negative-Binomial latents use p=0.5p = 0.5, while the sparse Poisson setup uses λ=0.1\lambda= 0.1. ReinMax temperatures are tuned over [1.0, 1.1, 1.3, 1.5] and EAT-cubic temperatures over [0.02, 0.05, 0.2, 0.5]. Both experiment families report five independent matched seeds per estimator configuration.

Binomial support-size timing

The benchmark evaluates a batch of 200×128200 \times128 Binomial latents on an NVIDIA L4. We sweep n∈{4,8,16,32,64,128,256,512,1024}n \in\{4, 8, 16, 32, 64, 128, 256, 512, 1024\}, corresponding to categorical support size K=n+1K = n + 1. The comparison includes native order-2 and order-3 weights and the released 1D MVE implementation of Hooper & Shekhovtsov [7] at τ=106\tau= 10^6. Figure 4 reports milliseconds per forward–backward evaluation.

DEF experiment details

The DEF experiments use a reduced grid relative to the nonlinear-VAE experiments. ReinMax temperatures are {1,1.3,1.5}\{1, 1.3, 1.5\}, EAT-cubic temperatures are {0.02,0.05,0.2}\{0.02, 0.05, 0.2\}, and learning rates are {3×10−3,10−3,3×10−4}\{3 \times10^{-3}, 10^{-3}, 3 \times10^{-4}\}. We use AdamW with batch size 64, train for 500 epochs on 20 Newsgroups and 100 epochs on RCV1, and report five independent matched seeds for each selected configuration.

We use amortized inference because storing document-specific latent variables for RCV1 would be memory-intensive. The decoder follows the Gaussian-weight, softplus-link Poisson DEF of Ranganath et al. [20]; its weights are point-estimated, with 30 supertopics and 100 topics. The encoder is a two-layer neural network mirroring the decoder. As in the original model, a Pois⁡(0.1)\operatorname{Pois}(0.1) prior encourages sparsity.

For 20 Newsgroups, we use the master-branch data from https://github.com/akashgit/autoencoding_vi_for_topic_models, also used by the AVITM paper. The vocabulary has 1,995 terms, with 11,258 training and 7,487 test documents. For RCV1, we use the stemmed token files from http://www.ai.mit.edu/projects/jmlr/papers/volume5/lewis04a/a12-token-files/, retain the 10,000 most frequent terms, pool the documents, and randomly split 794,414 for training and 10,000 for testing.

ReinMax and the rate–distortion tradeoff

On 20 Newsgroups, ReinMax attains better held-out perplexity despite substantially worse train and test ELBO. We therefore inspect local update directions in selected high-performing runs.

In Figure 5, our estimators and EAT-cubic closely track the near-exact reference in the displayed runs. ReinMax is broadly aligned but places more weight on decreasing distortion, especially in the displayed 20 Newsgroups run, where it moves toward a higher-rate, lower-distortion solution.

Local rate–distortion update directions in selected high-performing runs

Figure 5. Local rate–distortion update directions in selected high-performing runs. Our estimators closely track the near-exact MVD reference; EAT-cubic is close on 20 Newsgroups but deviates more on RCV1, while ReinMax tilts toward lower distortion and higher rate.

Lower distortion improves reconstruction, whereas the ELBO also penalizes KL rate. ReinMax’s local bias therefore acts like a reweighting toward reconstruction. Its perplexity advantage should not be interpreted as more accurate ELBO-gradient estimation; the displayed direction diagnostic points in the opposite direction.

Timing protocol

Each value in Table 5 is the mean ±\pm standard deviation over five timing repeats after warm-up. Within a workload, the model, batch size, hardware, and training configuration are fixed across estimators.

  • Linear Poisson VAE: warm up for two epochs, record cumulative elapsed time at epochs 8 and 24, and divide the difference by 16.

  • Nonlinear Poisson VAE: warm up for two epochs, record cumulative elapsed time at epochs 3 and 9, and divide the difference by 6.

  • Sparse Poisson DEF: warm up for two epochs, record cumulative elapsed time at epochs 4 and 12, and divide the difference by 8.

We repeat this procedure five times for each estimator–workload–hardware combination.

References

  1. [1]Yoshua Bengio, Nicholas Léonard, and Aaron Courville. Estimating or propagating gradients through stochastic neurons for conditional computation, 2013.arxiv.org/abs/1308.3432
  2. [2]Stephen Boyd and Lieven Vandenberghe. Convex Optimization. Cambridge University Press, 2004.
  3. [3]Yulai Cong, Miaoyun Zhao, Ke Bai, and Lawrence Carin. GO gradient for expectation-based objectives. In International Conference on Learning Representations, 2019.arxiv.org/abs/1901.06020
  4. [4]Zhe Dong, Andriy Mnih, and George Tucker. DisARM: An antithetic gradient estimator for binary latent variables. In Advances in Neural Information Processing Systems, volume 33, pp. 18637–18647, 2020.arxiv.org/abs/2006.10680
  5. [5]Zhe Dong, Andriy Mnih, and George Tucker. Coupled gradient estimators for discrete latent variables. In Advances in Neural Information Processing Systems, volume 34, pp. 24498–24508, 2021.arxiv.org/abs/2106.08056
  6. [6]Will Grathwohl, Dami Choi, Yuhuai Wu, Geoffrey Roeder, and David Duvenaud. Backpropagation through the void: Optimizing control variates for black-box gradient estimation. In International Conference on Learning Representations, 2018.arxiv.org/abs/1711.00123
  7. [7]James Hooper and Alexander Shekhovtsov. Generalized and optimal straight-through estimators. In Proceedings of the 29th International Conference on Artificial Intelligence and Statistics, volume 300 of Proceedings of Machine Learning Research, pp. 3187–3195. PMLR, 2026. AISTATS 2026 Spotlight.
  8. [8]Michael Ibrahim, Hanqi Zhao, Eli Sennesh, Zhi Li, Anqi Wu, Jacob L. Yates, Chengrui Li, and Hadi Vafaii. A hitchhiker’s guide to poisson gradient estimation. In Proceedings of the 43rd International Conference on Machine Learning, volume 306 of Proceedings of Machine Learning Research. PMLR, 2026.arxiv.org/abs/2602.03896
  9. [9]Eric Jang, Shixiang Gu, and Ben Poole. Categorical reparameterization with gumbel-softmax. In International Conference on Learning Representations, 2017.arxiv.org/abs/1611.01144
  10. [10]Diederik P. Kingma and Max Welling. Auto-encoding variational bayes. In International Conference on Learning Representations, 2014.arxiv.org/abs/1312.6114
  11. [11]Donald E. Knuth. The Art of Computer Programming, Volume 2: Seminumerical Algorithms. Addison-Wesley, 3 edition, 1997.
  12. [12]Chengrui Li, Weihan Li, Yule Wang, and Anqi Wu. A differentiable partially observable generalized linear model with forward-backward message passing. In Proceedings of the 41st International Conference on Machine Learning, volume 235 of Proceedings of Machine Learning Research, pp. 28095–28111. PMLR, 2024.
  13. [13]Liyuan Liu, Chengyu Dong, Xiaodong Liu, Bin Yu, and Jianfeng Gao. Bridging discrete and backpropagation: Straight-through and beyond. In Advances in Neural Information Processing Systems, volume 36, pp. 12291–12311, 2023.arxiv.org/abs/2304.08612
  14. [14]Chris J. Maddison, Andriy Mnih, and Yee Whye Teh. The concrete distribution: A continuous relaxation of discrete random variables. In International Conference on Learning Representations, 2017.arxiv.org/abs/1611.00712
  15. [15]Andriy Mnih and Karol Gregor. Neural variational inference and learning in belief networks. In Proceedings of the 31st International Conference on Machine Learning, volume 32 of Proceedings of Machine Learning Research, pp. 1791–1799. PMLR, 2014.arxiv.org/abs/1402.0030
  16. [17]Shakir Mohamed, Mihaela Rosca, Michael Figurnov, and Andriy Mnih. Monte carlo gradient estimation in machine learning. Journal of Machine Learning Research, 21(132):1–62, 2020.arxiv.org/abs/1906.10652
  17. [18]Georg Ch. Pflug. Sampling derivatives of probabilities. Computing, 42(4):315–328, 1989. doi: 10.1007/BF02243227.DOI
  18. [19]Rajesh Ranganath, Sean Gerrish, and David M. Blei. Black box variational inference. In Proceedings of the Seventeenth International Conference on Artificial Intelligence and Statistics, volume 33 of Proceedings of Machine Learning Research, pp. 814–822. PMLR, 2014.
  19. [20]Rajesh Ranganath, Linpeng Tang, Laurent Charlin, and David M. Blei. Deep exponential families. In Proceedings of the Eighteenth International Conference on Artificial Intelligence and Statistics, volume 38 of Proceedings of Machine Learning Research, pp. 762–771. PMLR, 2015.arxiv.org/abs/1411.2581
  20. [21]Danilo Jimenez Rezende, Shakir Mohamed, and Daan Wierstra. Stochastic backpropagation and approximate inference in deep generative models. In Proceedings of the 31st International Conference on Machine Learning, volume 32 of Proceedings of Machine Learning Research, pp. 1278–1286. PMLR, 2014.
  21. [22]Mihaela Rosca, Michael Figurnov, Shakir Mohamed, and Andriy Mnih. Measure-valued derivatives for approximate bayesian inference. In Fourth Workshop on Bayesian Deep Learning, 2019.
  22. [23]Jiaxin Shi, Yuhao Zhou, Jessica Hwang, Michalis K. Titsias, and Lester W. Mackey. Gradient estimation with discrete stein operators. In Advances in Neural Information Processing Systems, volume 35, 2022.arxiv.org/abs/2202.09497
  23. [24]Michalis K. Titsias and Jiaxin Shi. Double control variates for gradient estimation in discrete latent variable models. In Proceedings of the 25th International Conference on Artificial Intelligence and Statistics, volume 151 of Proceedings of Machine Learning Research, pp. 6134–6151. PMLR, 2022.arxiv.org/abs/2111.05300
  24. [25]Lloyd N. Trefethen and David Bau. Numerical Linear Algebra. SIAM, Philadelphia, PA, 1997. ISBN 978-0-89871-361-9.DOI
  25. [26]George Tucker, Andriy Mnih, Chris J. Maddison, Dieterich Lawson, and Jascha Sohl-Dickstein. REBAR: Low-variance, unbiased gradient estimates for discrete latent variable models. In Advances in Neural Information Processing Systems, 2017.arxiv.org/abs/1703.07370
  26. [27]Hadi Vafaii, Dekel Galor, and Jacob L. Yates. Poisson variational autoencoder. In Advances in Neural Information Processing Systems, volume 37, 2024.arxiv.org/abs/2405.14473
  27. [28]Ronald J. Williams. Simple statistical gradient-following algorithms for connectionist reinforcement learning. Machine Learning, 8(3–4):229–256, 1992. doi: 10.1007/BF00992696.DOI

Paper details

vlnc:W_fzpzzxa4
Version
v1 · latest
Published
Fresh — added to the Hub within the last 30 days
Added
License
CC BY 4.0
Usage

views · 0

downloads · 0

A view counts once per browser per day, a download each time the PDF is requested.

  • Computer Science

Not recorded for this paper

View statement
Looking for related papers…
Contents