Manuscript Offprint
arXiv:2610.07786Extending Pathwise Gradients to Discrete Random Variables via Finite-Order Relaxation
Open access. PaperVantage converted this article to text, so layout and figures may differ from the original.
ABSTRACT
Pathwise gradients are preferred for continuous random variables because they are unbiased, low variance, and work with a single sample. For discrete variables, pathwise gradients cannot generally be exact for every differentiable function. We propose a general framework for constructing Finite-order exact pathwise gradient estimators (Fini) for discrete variables, which are unbiased for all polynomials up to degree D. Among all admissible solutions, our estimator is the unique least-norm solution and has minimum weight variance. For common discrete distributions such as the Poisson, our construction yields native, closed-form estimators tailored to each distribution, implementable in a few lines of code. They preserve exact discrete forward samples without continuous relaxation, temperature tuning, or augmented representations. At matched polynomial exactness, they avoid the excess weight variance of non-native representations. We also bound bias for smooth downstream functions, showing how accuracy beyond polynomials depends on the first unmatched derivative and the sampling distribution. In experiments our low-order estimators match or outperform tuned baselines across linear, nonlinear and hierarchical latent-variable models, while out-speeding competitors in every runtime benchmark.
1 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 (Mohamed et al., 2020). 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 (Ranganath et al., 2015; Vafaii et al., 2024; Li et al., 2024), 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 (Ranganath et al., 2014; Mohamed et al., 2020). Measure-valued derivatives (MVD) and discrete General One-sample gradients can reduce variance through additional downstream evaluations, which become expensive in high-dimensional models (Pflug, 1989; Rosca et al., 2019; Cong et al., 2019). 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 (Bengio et al., 2013). For categorical variables, the Gumbel–Softmax trick (Jang et al., 2017; Maddison et al., 2017) 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 (Li et al., 2024); however, these methods
Our extended pathwise gradient prescribes exactness hierarchy up to D

Continuous Pathwise Gradient is exact for all differentiable f

w*: optimal solution
w: another solution
r: excess component
Listing 1: Poisson Fini-2 and Fini-3 in torch.
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 = (5rate/12 9 # + (8rate+1)z_hard/(12rate) 10 # - z_hard**2/(12*rate)) 11 12 z = z_hard + w.detach() * (eta - eta.detach()) 13 ...
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.
need to approximate one-dimensional variables with K-dimensional categorical variables, and inherit the temperature parameter, both adding computational overhead.
Recently, Liu et al. (2023) 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 Fig. 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.
• 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 E, §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 ( ).
• Better empirical performance: Across neural sequence models, VAEs, and hierarchical topic models, Fini matches or outperforms tuned specialized and generalist baselines ( ).
2 BACKGROUND
2.1 MONTE CARLO GRADIENT ESTIMATION AND SCORE FUNCTION GRADIENTS
For a probability distribution , we write the associated expectation as for simplicity. For an objective , gradient-based learning requires calculating , often from MC samples. This problem emerges in supervised, unsupervised, and reinforcement learning.
One way to estimate is through the score-function gradient, also known as REINFORCE (Williams, 1992; Ranganath et al., 2014). They use the identity , with . Computing the integral analytically or numerically is generally intractable in high dimensions; MC gradient estimation instead draws samples and forms unbiased estimators of the quantity using . 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 (Mohamed et al., 2020).
2.2 PATHWISE GRADIENTS
When f is differentiable, pathwise gradients instead use derivative information and integrate directly with ordinary backpropagation. For a continuous family, a pathwise derivative weight satisfies
Explicit reparameterization writes out the sampling path for parameter-free noise and differentiates the path so (Kingma & Welling, 2014; Rezende et al., 2014). Consider a Gaussian , one valid path is where ; then one can use as a valid one-sample estimator for . For notation simplicity, we note as 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 w can satisfy Eq. (1) for all differentiable f. See proof in § A for details. This limitation motivates researchers to use estimators that introduce bias, high variance, or additional computations.
3 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 w, instead of enforcing the unbiased pathwise identity for any differentiable f, we relax this requirement to unbiasedness with respect to polynomials up to degree D, denoted as . Since expectation is linear and the monomial basis spans the vector space of polynomials, unbiasedness over breaks down to unbiasedness against . Thus, with the pathwise form and a prescribed order D, the relaxed requirement becomes
Given we want to find a solution in the functional space, we need to be able to describe the space first, so we equip the space with the inner-product . We have now arrived at a Hilbert space given the base law , and we see that for low orders, constraints in Eq. (2) generally leave 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:
(3)
The key to solving this problem is to invoke the Riesz representation theorem, and note that the monomial basis up to are precisely the Riesz representers to our problem. Therefore, the solution is a linear combination of monomials , which means the resulting weight has degree at most . Given the solution must be a linear combination of monomials, each of the LHS in our constraints becomes a gram matrix 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 , we see that the solution is:
We refer to solution as the Fini-D estimator. This is the minimum-norm/least-norm solution to underspecified problems (Boyd & Vandenberghe, 2004; Trefethen & Bau, 1997). The recipe is general: we compute moments up to for the gram matrix, as well as the first moments' derivatives for , then solve the linear system symbolically once to obtain the closed-form solution in Eq. (4). This requires finite moments through order , differentiability of the first moments with respect to the parameter, and nonsingular . The solutions are polynomials of degree at most , evaluable in 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-D when it is unbiased for every polynomial of degree at most D.
Poisson example: Let . The order-3 Gram matrix and are
The order-2 system uses the leading block of and the first two entries of . Solving the two systems and substituting into yields
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 . This illustrates the variance cost of higher exactness.
Poisson MVD and quadrature. The same weights also follow from the difference identity
Direct use of the difference identity requires an extra evaluation of at . For order 2, trapezoidal quadrature approximates the increment by . The Poisson shift identity then replaces by in expectation, recovering . The order-3 rule uses interpolation nodes at ; 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, ; for Gaussian random vectors, we recover the minimum-energy affine pathwise field. Both estimators are exact for every sufficiently regular , although we impose exactness only for quadratics. Furthermore for categoricals, if we replace the min-norm rule with a symmetry principle, we recover ReinMax at temperature = 1, and Fini-2 corresponds to hard one-hot MVE in Hooper & Shekhovtsov (2026). See § C for details.
4 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 and assume is nonsingular. Every degree-D exact weight satisfies
Thus 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 and , the large-truncation limit of categorical ReinMax at is degree-2 exact, with
The gap in weight variance is due to the null component . 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 have marginal , and let be degree-D exact under the joint law. Then is also degree-D exact, and
RB removes auxiliary noise; least-norm optimization removes the remaining null component. Rao–Blackwellization suffices only when , which we demonstrate below with the Gamma–Poisson compound representation of Negative Binomial variables.
Corollary 4.4. Let , , and . For the compound order-D Poisson construction, conditioning its weight on Z gives
where 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-D exact weight w, let . Fix independently of and write . Under the smoothness, moment, and score-identity conditions in § D.2,
Exactness cancels the degree-D 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.
5 RELATED WORK
Unbiased discrete gradient estimators. Score-function estimators use control variates, multi-sample baselines, and antithetic, coupled, or Stein identities to reduce variance (Mohamed et al., 2020; Mnih & Gregor, 2014; Tucker et al., 2017; Grathwohl et al., 2018; Mnih & Rezende, 2016; Yin & Zhou, 2019; Dong et al., 2020; 2021; Shi et al., 2022). MVD and GO gradients instead exploit distributional identities for lower variance, at the cost of additional f evaluations (Pflug, 1989; Rosca et al., 2019; Cong et al., 2019). 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 (Li et al., 2024). Unlike categorical representation, Fini applies directly to the target law, avoiding excess compute overheads. Gumbel–Softmax uses temperature-controlled continuous relaxations (Jang et al., 2017; Maddison et al., 2017), whereas ST estimators preserve the hard sample and substitute its backward derivative (Bengio et al., 2013).
ReinMax extends the ST estimator (Liu et al., 2023). 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 (Liu et al., 2023), making it our principal generalist comparator. Hooper & Shekhovtsov (2026) 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 (Knuth, 1997; Vafaii et al., 2024; Ibrahim et al., 2026). 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.
6 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 outspeeds all competitors.
Our main Poisson-specific comparator is EAT-cubic, which differentiates a relaxed Poisson interarrival construction using cubic interpolation (Ibrahim et al., 2026). Our general comparator is ReinMax, an ST estimator for categorical variables (Liu et al., 2023); 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 ; the appendix gives more detail. Both comparators have a tuned temperature . 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 ; Fini and the score-function estimator do not use a temperature.
6.1 LINEAR POISSON VAE: TESTING ORDER-2 EXACTNESS
In a Poisson VAE, an encoder specifies a Poisson distribution over latent counts Z 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. (2026), 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.
6.2 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., 2024). We reproduce the synthetic benchmark in Ibrahim et al. (2026), 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.
Table 1: Synthetic POGLM validation ELBO (higher is better), mean std. over 30 seeds. Parentheses give the selected temperature . Boldface marks the three highest means, which differ by at most 0.02.
| Dataset | Fini-3 | Fini-2 | EAT-cubic (0.1) | GSM (0.5) | EAT-sigmoid (0.5) | Score |
|---|---|---|---|---|---|---|
| Synthetic |
Nonlinear Poisson VAEs. Following the discrete-VAE setup of Liu et al. (2023), 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 G.3). Tab. 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.
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., 2015). 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 (2014); Appendix G.5 gives the full setup.
Tab. 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 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.
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.
| Bernoulli Likelihoods | Gaussian Likelihoods | |||||
|---|---|---|---|---|---|---|
| MNIST | Fashion-MNIST | Omniglot | MNIST | Fashion-MNIST | Omniglot | |
| Fini-3 | ||||||
| Fini-2 | ||||||
| EAT-cubic | ||||||
| ReinMax | ||||||
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.
| Model | Training method | 20 Newsgroups | RCV1 | ||||
|---|---|---|---|---|---|---|---|
| Train ELBO ↑ | Test ELBO ↑ | PPL ↓ | Train ELBO ↑ | Test ELBO ↑ | PPL ↓ | ||
| Poisson DEF | Fini-3 | ||||||
| Fini-2 | |||||||
| EAT-cubic (0.2) | |||||||
| ReinMax (1.3) | |||||||
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.
6.3 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 Tab. 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.
Table 4: Count-VAE training ELBO, mean standard deviation over five independent matched seeds. Best is bold; second is underlined.
| Family | Latent dim. | Fini-2 | Fini-3 | ReinMax |
|---|---|---|---|---|
| binomial | 2 | |||
| 16 | ||||
| 128 | ||||
| negbin | 2 | |||
| 16 | ||||
| 128 | ||||
| poisson | 2 | |||
| 16 | ||||
| 128 |
Compound representation adds statistical overhead. Negative-Binomial latents can reuse a Poisson estimator through an auxiliary rate . Corollary 4.4 predicts that conditioning recovers Fini-2 exactly, while at order 3 a nonzero -only component can remain.

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.
We reproduce the variance study of Dong et al. (2020) with Negative-Binomial latents. The 128-dimensional variance results are in Fig. 3. In this benchmark, each native estimator has lower gradient variance than its matched Gamma–Poisson counterpart, while ReinMax has higher variance.
Categorical representation adds computational overhead. For Binomial latents, the released hard 1D MVE implementation of Hooper & Shekhovtsov (2026) operates over 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 as long as Fini-2.
6.4 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 G.7 gives the five-repeat post-warm-up protocol. Fini-2 is consistently faster because its weight is affine rather than quadratic.
Table 5: Wall-clock(s) per epoch (↓), mean ± standard deviation over five repeats.
| Estimator | Linear VAE | Nonlinear VAE | DEF | |||
|---|---|---|---|---|---|---|
| L4 | A100 | L4 | A100 | L4 | A100 | |
| Fini-3 | ||||||
| Fini-2 | ||||||
| EAT-cubic | ||||||
| ReinMax | ||||||
7 DISCUSSION
Limitations: Fini requires relevant moments and their parameter derivatives, and order-D exactness requires at least support points. Outside the prescribed class, Proposition 4.5 requires smoothness and finite moments; polynomial unbiasedness alone does not guarantee small bias. Finally, higher adds an orthogonal correction and cannot decrease the raw second moment; the fourth-order Poisson example in Appendix E.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- 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.
REFERENCES
Yoshua Bengio, Nicholas Léonard, and Aaron Courville. Estimating or propagating gradients through stochastic neurons for conditional computation, 2013.
Stephen Boyd and Lieven Vandenberghe. Convex Optimization. Cambridge University Press, 2004.
Yulai Cong, Miaoyun Zhao, Ke Bai, and Lawrence Carin. GO gradient for expectation-based objectives. In International Conference on Learning Representations, 2019.
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.
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.
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.
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.
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.
Eric Jang, Shixiang Gu, and Ben Poole. Categorical reparameterization with gumbel-softmax. In International Conference on Learning Representations, 2017.
Diederik P. Kingma and Max Welling. Auto-encoding variational bayes. In International Conference on Learning Representations, 2014.
Donald E. Knuth. The Art of Computer Programming, Volume 2: Seminumerical Algorithms. Addison-Wesley, 3 edition, 1997.
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.
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.
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.
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.
Andriy Mnih and Danilo Rezende. Variational inference for monte carlo objectives. In Proceedings of the 33rd International Conference on Machine Learning, volume 48 of Proceedings of Machine Learning Research, pp. 2188–2196. PMLR, 2016.
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.
Georg Ch. Pflug. Sampling derivatives of probabilities. Computing, 42(4):315–328, 1989. doi:10.1007/BF02243227.
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.
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.
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.
Mihaela Rosca, Michael Figurnov, Shakir Mohamed, and Andriy Mnih. Measure-valued derivatives for approximate bayesian inference. In Fourth Workshop on Bayesian Deep Learning, 2019.
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.
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.
Lloyd N. Trefethen and David Bau. Numerical Linear Algebra. SIAM, Philadelphia, PA, 1997. ISBN 978-0-89871-361-9.
George Tucker, Andriy Mnih, Chris J. Maddison, Dieterich Lawson, and Jascha Sohl-Dickstein. RE-BAR: Low-variance, unbiased gradient estimates for discrete latent variable models. In Advances in Neural Information Processing Systems, 2017.
Hadi Vafaii, Dekel Galor, and Jacob L. Yates. Poisson variational autoencoder. In Advances in Neural Information Processing Systems, volume 37, 2024.
Ronald J. Williams. Simple statistical gradient-following algorithms for connectionist reinforcement learning. Machine Learning, 8(3–4):229–256, 1992. doi: 10.1007/BF00992696.
Mingzhang Yin and Mingyuan Zhou. ARM: Augment-REINFORCE-merge gradient for stochastic binary networks. In International Conference on Learning Representations, 2019.
Mingzhang Yin, Yuguang Yue, and Mingyuan Zhou. ARSM: Augment-REINFORCE-swap-merge estimator for gradient backpropagation through categorical variables. In Proceedings of the 36th International Conference on Machine Learning, volume 97 of Proceedings of Machine Learning Research, pp. 7095–7104. PMLR, 2019.
Extending Pathwise Gradients to Discrete Random Variables via Finite-Order Relaxation Appendix
A Discrete all-function pathwise obstruction 13
B Solving the Optimization Problem 13
B.1 Augmented representations and Rao–Blackwellization 13
B.2 Gamma–Poisson specialization 14
C Connection with other methods 14
C.1 Recovering pathwise derivatives 14
C.2 Connection to measure-valued derivatives and quadrature 15
C.3 Connection to ReinMax and generalized straight-through methods 15
D Theory section Proofs 18
D.1 Proof of Proposition 4.1 18
D.2 Proof of Proposition 4.5 18
D.3 Order-2 ReinMax in a scalar natural exponential family 18
D.4 Poisson ReinMax under increasing categorical truncation 19
E Additional closed-form estimators 20
E.1 Poisson: order 4 20
E.2 Binomial: 20
E.3 Negative binomial: 20
E.4 Negative binomial: 21
E.5 Beta-binomial: 21
E.6 Beta-binomial: 22
F Two-Parameter Straight-Through Implementation 22
G Additional Experimental Details 23
G.1 Linear Poisson VAE 23
G.2 Neural sequence model 23
G.3 Nonlinear Poisson and count VAEs 23
G.4 Binomial support-size timing 23
G.5 DEF experiment details 23
G.6 ReinMax and the rate–distortion tradeoff 24
G.7 Timing protocol 24
A DISCRETE ALL-FUNCTION PATHWISE OBSTRUCTION
Proposition A.1 (No universal exact sample pathwise weight on isolated support). Let be a differentiable family on a fixed discrete support . Suppose that, at the parameter value under consideration, some is isolated and . Then there is no Z-measurable weight satisfying
for every smooth f for which the expectation exists.
Proof. Because is isolated, choose a smooth bump function supported in an interval containing no other point of , with and . Then almost surely, and hence for every weight . On the other hand, , so
a contradiction.
B SOLVING THE OPTIMIZATION PROBLEM
Proposition B.1 (Least-norm solution). Let
and let denote the degree- exactness constraints, so that every feasible weight satisfies . If is nonsingular, the unique least-norm degree- exact weight in is
Proof. Let . Since every exactness constraint is an inner product with an element of , orthogonal projection onto preserves feasibility and cannot increase the norm. Hence the minimum-norm weight has the form . Its exactness constraints reduce to
which proves (12); nonsingularity of gives uniqueness.
B.1 AUGMENTED REPRESENTATIONS AND RAO–BLACKWELLIZATION
Suppose is an augmented representation of the marginal law , and let be any degree-D exact compound weight:
Let denote its Rao–Blackwellization.
Proposition B.2 (Rao–Blackwellization and native projection). Let be the native minimum- degree-D exact weight. Then is degree-D exact and
(14)
Hence the native construction has no greater weight variance than the compound estimator or its Rao–Blackwellization. If , then , so the native estimator is exactly the Rao–Blackwellized compound estimator.
Proof. By the tower property,
so preserves degree-D exactness. Moreover, is orthogonal to every square-integrable function of , while exactness of and gives . Since , these three components are mutually orthogonal:
Orthogonality gives the first identity in (14), with
Degree-D exactness fixes the mean of all three weights through the linear test function , giving the variance identity.
B.2 GAMMA-POISSON SPECIALIZATION
For
write with . Since , applying the order-D Poisson log-rate weight conditionally on gives a degree-D exact compound weight.
At order 2, . Conjugacy gives
and therefore
(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
Under the posterior above, and, for , . Because for , conditioning (17) gives, for all ,
where the final term is set to zero for . Both and the native are degree-3 exact, so
Moreover, (18) is as , whereas the native formula in Appendix E.3 satisfies
Hence for and . Proposition 4.3 therefore separates the compound order-3 variance gap into auxiliary conditional variance and the additional native null-component norm .
C CONNECTION WITH OTHER METHODS
C.1 RECOVERING PATHWISE DERIVATIVES
Proof of Scalar location-scale recovery. Because , write . Linear and quadratic exactness impose
Thus and , so
Since , , which gives exactness for every sufficiently regular .
For a pure location family, , so degree-1 exactness already suffices.
Proof of Gaussian-vector recovery. The gradients of quadratic polynomials span
Hence the least-norm solution is with . Linear and quadratic exactness yield
Because , the Sylvester equation has a unique symmetric solution , giving the weight results. Gaussian integration by parts then gives
for every sufficiently regular f.
□
C.2 CONNECTION TO MEASURE-VALUED DERIVATIVES AND QUADRATURE
For with ,
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, is linear, so the two-node rule at is exact:
(23)
where . Thus quadrature recovers .
For degree-3 exactness, interpolate at . Exact integration of quadratics on gives weights 5/12, 2/3, and -1/12:
(24)
using . Hence
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.
C.3 CONNECTION TO REINMAX AND GENERALIZED STRAIGHT-THROUGH METHODS
Lemma C.1 (Categorical quadratic exactness). Let be represented by , where has for all , and let . A same-path estimator
is exact for every polynomial of degree at most two if and only if
Proof. Write with . Quadratic exactness is equivalent to
The coefficient of gives the final constraint in (25). Taking and gives the first two constraints. Conversely, these matrices span the symmetric matrices, so (25) implies (26).
Proposition C.2 (Symmetry characterizes ReinMax). Let W be quadratic-exact under the assumptions of Lemma C.1. Then
if and only if
Thus sample-wise symmetry uniquely selects the ReinMax weight at within the quadratic-exact class.
Proof. Write and denote the right-hand side of (27) by . Since and , its quadratic-exactness follows from Lemma C.1:
(28)
The matrices are symmetric, so it remains to show uniqueness under symmetry.
Let and define the linear matrix-valued map
Both and are quadratic-exact. Applying their difference to gives for every . Polarization therefore gives
Since , each is symmetric. Hence, for arbitrary ,
(30)
Thus for all . Taking gives for every , hence because . Therefore for every .
Proposition C.3 (Least-norm categorical quadratic estimator). Let be represented by , where has for all , and let . Consider quadratic-exact same-path estimators
Among all such weights, there is a unique minimizer of .
For , define , and let have entries
If satisfies
then the minimum-norm weight is
In particular, one may take .
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 . We therefore use as coordinates for the remaining degrees of freedom and equip them with the inner product
Indeed, using , the original objective reduces to
The remaining exactness constraints define a linear map by
After subtracting the fixed diagonal contribution in (25), quadratic exactness is .
For , the adjoint is determined by
Consequently, the normal operator is
The minimum-norm solution lies in range( ) = ker( ) . Hence , where the coefficient matrix satisfies the normal system
Equation (33) gives the off-diagonal columns displayed in Proposition C.3, and the first constraint in (25) gives the diagonal columns. Since and , one may take ; adding to leaves 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 categorical minimum-variance estimator of Hooper & Shekhovtsov (2026).
Relation to the 1D MVE of Hooper and Shekhovtsov. Let have a finite scalar support, with , and . Then the degree-2 least-norm weight coincides with the hard quadratically-unbiased 1D MVE of Hooper & Shekhovtsov (2026).
The degree-2 least-norm construction gives , with
Hence
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-D exactness whenever the support contains at least D distinct points.
D THEORY SECTION PROOFS
Throughout this appendix, a dot denotes differentiation with respect to the parameter coordinate under consideration.
D.1 PROOF OF PROPOSITION 4.1
Proof. Let and . Since and satisfy the same exactness constraints, , hence . Since ,
(35)
The second identity follows because degree-D exactness fixes . Equality in either objective requires almost surely, proving uniqueness.
D.2 PROOF OF PROPOSITION 4.5
Assume with bounded , , , and that the score identity holds for and degree- polynomials. Let . The constants in Proposition 4.5 are
Proof. Fix an expansion point independent of , and let be the degree- Taylor polynomial of about . Degree- exactness annihilates , so the score identity reduces the bias to
Taylor’s theorem gives and . Cauchy–Schwarz therefore yields
D.3 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 be a scalar natural exponential family represented categorically over a finite support. Write , , , and . At ,
(39)
The variance gap is strictly positive whenever the law has at least three support points of positive probability.
Proof. Let , let contain the support values, and write . With , the ReinMax matrix weight reduces to
For a natural exponential family, and , so the native order-2 weight is . The residual in (39) satisfies , and Proposition 4.1 gives
The gap can vanish only if almost surely; a nonzero quadratic cannot vanish on three support points.
D.4 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 have the Poisson law truncated to and renormalized, with mean and variance . Under categorical embedding with logits , , the ReinMax weight is
Extend to . Then in , where . The limiting weight satisfies
(42)
Proof. Proposition D.1 applied to the truncated Poisson law gives . The truncated moments give and . Hence the coefficients of the quadratic weight functions converge; since the Poisson law has a finite fourth moment, the convergence holds in .
For , the limiting decomposition in (42) has , , and . Therefore
E ADDITIONAL CLOSED-FORM ESTIMATORS
For a scalar discrete variable X and parameter coordinate , write the order-m same-path estimator as
Here order means exactness for every polynomial of degree at most . The formulas below are the minimum- solutions in the stated parameter coordinates: order 2 is affine, , and order 3 is quadratic, .
E.1 POISSON: ORDER 4
For with , order-4 exactness gives
Using moments through order 6 and , the system gives
The resulting weight and variance are
E.2 BINOMIAL:
Let
The order-2 estimator is
For , the order-3 estimator is
The corresponding raw-p weight follows from parameterization equivariance:
E.3 NEGATIVE BINOMIAL:
We use the convention
so that . For , the order-2 estimator is
The order-3 estimator is
The corresponding raw-p weight is
E.4 NEGATIVE BINOMIAL:
Under the same negative-binomial convention, let
The order-2 estimator is
The order-3 estimator is
The corresponding raw-r weight is
E.5 BETA-BINOMIAL:
Let
and write
The order-2 estimator is
For order 3, define
and
Then
The corresponding raw- weight is
E.6 BETA-BINOMIAL:
Under the same mean–concentration parameterization, let
Retain the definitions of , , and from Section E.5, and define
The order-2 estimator is
For order 3, define
Then
The corresponding raw- weight is
F TWO-PARAMETER STRAIGHT-THROUGH IMPLEMENTATION
Consider a hard scalar sample with optimized coordinates and . Suppose the desired same-path estimators are
Here u and v may be any minimum-norm weights above, expressed in the model's optimized coordinates a and b.
Let denote stop-gradient. The corresponding straight-through surrogate is
For a Negative-Binomial variable parameterized by
one evaluates
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()) )
G 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 .
G.1 LINEAR POISSON VAE
We follow the benchmark in Appendix G.1 of Ibrahim et al. (2026). 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 , EAT-cubic obtains at temperature 0.05 ( , two-sided Welch t-test), and the exact reference gives . 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.
G.2 NEURAL SEQUENCE MODEL
We follow the synthetic spike-train benchmark, temperature grids, and tuning protocol in Appendix G.2 of Ibrahim et al. (2026), except for initialization. In our implementation, the stated initialization did not reproduce the reported ELBO range: with either one or five Monte Carlo samples, runs converged around -427 to -429. The repository-default Conv1d initialization reproduced results near -330.5, so we used it for every estimator and held it fixed across methods. Reported statistics use 30 independent matched seeds.
G.3 NONLINEAR POISSON AND COUNT VAES
We reuse the experimental design of Titsias & Shi (2022), which follows earlier discrete-gradient control-variate studies (Yin & Zhou, 2019; Dong et al., 2020; 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.5, while the sparse Poisson setup uses . 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.
G.4 BINOMIAL SUPPORT-SIZE TIMING
The benchmark evaluates a batch of Binomial latents on an NVIDIA L4. We sweep , corresponding to categorical support size . The comparison includes native order-2 and order-3 weights and the released 1D MVE implementation of Hooper & Shekhovtsov (2026) at . Figure 4 reports milliseconds per forward–backward evaluation.
G.5 DEF EXPERIMENT DETAILS
The DEF experiments use a reduced grid relative to the nonlinear-VAE experiments. ReinMax temperatures are , EAT-cubic temperatures are , and learning rates are . 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.

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.
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. (2015); 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) 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.
G.6 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.
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.
G.7 TIMING PROTOCOL
Each value in Table 5 is the mean ± 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.