Gradient Estimation with Discrete Stein Operators
Anonymous Author(s)
AfﬁliationAddress email
Abstract
Gradient estimation—approximating the gradient of an expectation with respect tothe parameters of a distribution—is central to the solution of many machine learning problems.
However, when the distribution is discrete, most common gradientestimators suffer from excessive variance.
To improve the quality of gradient estimation, we introduce a variance reduction technique based on Stein operators fordiscrete distributions.
We then use this technique to build ﬂexible control variatesfor the REINFORCE leave-one-out estimator.
Our control variates can be adaptedonline to minimize variance and do not require extra evaluations of the target function.
In benchmark generative modeling tasks such as training binary variationalautoencoders, our gradient estimator achieves substantially lower variance thanstate-of-the-art estimators with the same number of function evaluations
Introduction
Modern machine learning relies heavily on gradient methods to optimize the parameters of a learningsystem.
However, exact gradient computation is often difﬁcult.
For example, in variational inference for training latent variable models [29, 42] and policy gradient algorithms in reinforcementlearning [62] the exact gradient features an intractable sum or integral introduced by an expectationunder an evolving probability distribution.
To make progress, one resorts to estimating the gradientby drawing samples from that distribution [39].
The two main classes of gradient estimators used in machine learning are the pathwise or reparameterization gradient estimators [29, 46, 56] and the REINFORCE or score function estimators [18, 62].
Thepathwise estimators have shown great success in training variational autoencoders [29] but are onlyapplicable to continuous probability distributions.
The REINFORCE estimators are more generalpurpose and easily accommodate discrete distributions but often suffer from excessively high variance.
To improve the quality of REINFORCE estimators, we develop a new variance reduction techniquefor discrete expectations.
Our method is based upon Stein operators [see, e.g., 1, 53], computablefunctionals that generate mean-zero functions under a target distribution and provide a natural way ofdesigning control variates (CVs) for stochastic estimation.
We ﬁrst provide a general recipe for constructing practical Stein operators for discrete distributions (Table 1), generalizing the prior literature [6, 8, 9, 16, 25, 45, 64].
We then develop a gradientestimation framework—RODEO—that augments REINFORCE estimators with mean-zero CVsgenerated from Stein operators.
Finally, inspired by Double CV [58], we extend our method todevelop CVs for REINFORCE leave-one-out estimators [30, 48] to further reduce the variance.
The beneﬁts of using Stein operators to construct discrete CVs are twofold.
First, the operatorstructure permits us to learn CVs with a ﬂexible functional form such as those parameterized byneural networks.
Second, since our operators are derived from Markov chains on the discrete support,they naturally incorporate information from neighboring states of the process for variance reduction.
[Table]
We evaluate RODEO on 15 benchmark tasks, including training binary variational autoencoders(VAEs) with one or more stochastic layers.
In most cases and with the same number of functionevaluations, RODEO delivers lower variance and better training objectives than the state-of-the-artgradient estimators DisARM [14, 66], ARMS [13], Double CV [58], and RELAX [20].
Background
We consider the problem of maximizing the objective function E q η [ f ( x )] with respect to the parameters η of a discrete distribution q η ( x ) .
Throughout the paper we assume f ( x ) is a differentiable function of real-valued inputs x ∈ R d but is only evaluated at a discrete subset X d dueto the discreteness of q η . 1 Exact computation of the expectation is typically intractable due tothe complex nature of f ( x ) and q η ( x ) .
The standard workaround is to rewrite the gradient as∇ η E q η [ f ( x )]
=
E q η [ f ( x ) ∇ η log q η ( x )] and employ the Monte Carlo gradient estimator known asthe score function or REINFORCE estimator [18, 62]:
[Equation]
Here, b is a constant called the “baseline” introduced to reduce the variance of the estimator byreducing the scaling effect of f ( x ( k ) ) .
Since E q η [ ∇ η log q η ( x )] = 0 , the REINFORCE estimator isunbiased for any choice of b , and the term b ∇ η log q η ( x ) is known as a control variate (CV) [41,
Ch. 8].
The optimal baseline can be estimated using additional function evaluations [7, 44, 61].
Asimpler approach is to use moving averages of f from historical evaluations or to train functionapproximators to mimic those values [37].
When K ≥ 2 , a powerful variant of (1) is obtained byreplacing b with the leave-one-out average of function values:
[Equation]
This approach is often called the REINFORCE leave-one-out (RLOO) estimator [30, 47, 48] and wasrecently observed to have very strong performance in training discrete latent variable models [14, 47].
All the above methods construct a baseline that is independent of the point x ( k ) under consideration,but there are other ways to preserve the unbiasedness of the estimator.
We are free to use a sampledependent baseline b ( x ( k ) ) as long as the expectation c (cid:44) E q η [ b ( x ( k ) ) ∇ η log q η ( x ( k ) )] is easilycomputed or has a low-variance unbiased estimate.
In this case, we can correct for any bias introducedby b ( x ( k ) ) by adding in this expectation: 1 K (cid:80) Kk =1 ( f ( x ( k ) )
− b ( x ( k ) )) ∇ η log q η ( x ( k ) )
+ c. Forexample, b ( x ( k ) ) can be a lower bound or a Taylor expansion of f ( x ( k ) )
Taking this a stepfurther, the Double CV estimator [58] proposed to treat f ( x ( k ) )
− b ( x ( k ) ) as the effective objectivefunction and apply the leave-one-out idea:
[Equation]
The resulting estimator adds two CVs to RLOO: the global CV b k ( x ( k ) ) ∇ η log q η ( x ( k ) ) and thelocal CV b k ( x ( j ) ) .
Intuitively, b k ( x ( j ) ) is aimed at reducing the variance of the LOO average.
Thisis motivated by the fact that replacing [Equation]
j [Equation] = k f ( x ( j ) ) with E q η [ f ] in (2) leads to lower variance[58, Prop 1].
To obtain a tractable correction term c , Titsias and Shi [58] adopt a linear design of b :b k ( x ) =
[Equation] = k f ( x j )( x − µ ) for µ = E q η [ x ] .
Although the Double CV framework points to a promising new direction for developing better
REINFORCE estimators, one only obtains signiﬁcant reduction in variance when b k is stronglycorrelated with f .
This may fail to hold for the above linear b k and a highly nonlinear f , especially inapplications like training deep generative models.
In the following two sections, we will introduce a method that allows us to use very ﬂexible CVswhile still maintaining a tractable correction term.
Our method enables online adaptation of CVsto minimize gradient variance (similar to RELAX [21]) but does not assume q η has a continuousreparameterization.
We then apply it to generalize the linear CVs in Double CV to very ﬂexible onessuch as neural networks.
Moreover, we provide an effective CV design based on surrogate functionsthat requires no additional evaluation of f compared to RLOO.
Control Variates from Discrete Stein Operators
At the heart of our new estimator is a technique for generating ﬂexible discrete CVs, that is forgenerating a rich class of functions that have known expectations under a given discrete distributionq .
One way to achieve this is to identify any discrete-time Markov chain ( X ( t ) )
∞ t =0 with stationarydistribution q .
Then, the transition matrix P , deﬁned via P xy =
P ( X ( t +1)
=
y | X ( t ) = x ) , satisﬁes
P (cid:62) q = q and hence
[Equation]
(4) for any integrable function h .
We overload our notation so that, for any suitable matrix A , ( Ah )( x ) (cid:44) 87 (cid:80) y
A xy h ( y ) .
In other words, for any integrable h , the function ( P − I ) h is a valid CV as it hasknown mean under q .
Moreover, the linear operator P − I is an example of a Stein operator [1, 53] inthe sense that it generates mean-zero functions under q .
In fact, both Stein et al.
[54] and Dellaportasand Kontoyiannis [12] developed CVs of the form ( P − I )
h based on reversible discrete-time Markovchains and linear input functions h ( x )
= x i .
More generally, Barbour [3] and Henderson [23] observed that if we identify a continuous-time
Markov chain ( X ( t ) )
t ≥ 0 with q as its stationary distribution, then the generator A , deﬁned via( Ah )( x ) = lim t [Equation] X
[Equation]
h
[Equation] x [Equation] , (5) satisﬁes A (cid:62) q = 0 and hence E q
[ Ah ] = 0 for all integrable h .
Therefore, A is also a Stein operatorsuitable for generating CVs.
Moreover, since any discrete-time chain with transition matrix P can beembedded into a continuous-time chain with transition rate matrix
A
= P −
I , this continuous-timeconstruction is strictly more general [55, Ch. 4].
3.1 Discrete Stein operators
We next present several examples of broadly applicable discrete Stein operators (summarized in
Table 1) that can serve as practical defaults.
Gibbs Stein operator The transition kernel of the random-scan Gibbs sampler with stationarydistribution q
[see, e.g., 17] is
[Equation]
(6) where 1 ( · ) is the indicator function.
The associated Stein operator is
A = P − I with
[Equation]
In the binary variable setting, (7) recovers the operator Bresler and Nagaraj [8], Reinert and Ross [45]used to bound distances between the stationary distributions of Glauber dynamics Markov chains.
Zanella Stein operator Zanella [67] studied continuous-time Markov chains with generator
[Equation]
where N x denotes the transition neighborhood of x and κ is a continuous positive function satisfyingκ ( t )
= tκ (1 /t ) .
Conveniently, the neighborhood structure can be arbitrarily sparse.
Moreover, the κ constraint ensures that the chain satisﬁes detailed balance (i.e., q ( x ) A xy = q
( y ) A yx ) and hence that
A [Equation] q = 0 .
Hodgkinson et al.
[24] call the associated operator the Zanella Stein operator :
[Equation]
Important special cases include the minimum probability ﬂow [51] (MPF) Stein operator ( κ ( t ) = √ t )discussed in Barp et al.
[6] and the Barker [4] Stein operator ( κ ( t ) =
t t +1 ).
Birth-death Stein operator Let e 1 , . . .
, e d represent the standard basis vectors on R d .
For anyﬁnite-cardinality space, we may index the elements of X
= { s 0 , . . .
, s m − 1 } , let idx ( x i ) return theindex of the element that x i represents, and deﬁne the increment and decrement operatorsinc i ( x ) =
x
+ e i ( s ( idx ( x i )+1)
mod m − x i ) and dec i ( x ) = x
+ e i ( s ( idx ( x i ) − 1) mod m − x i ) .
Then the product birth-death process [28] on X d with birth rates b i,x = q ( inc i ( x ))
q ( x ) , death ratesd i,x = 1 , and generator
A [Equation]
di =1 b i,x 1 ( y = inc i ( x ))
+ d i,x 1 ( y = dec
i ( x )) − ( b i,x + d i,x ) 1 ( y = x ) , has q as a stationary distribution, as A (cid:62) q = 0 .
This construction yields the birth-death Stein operator( Ag
[Equation] ) = [Equation] 1 b i,x
[Equation]
An analogous operator is available for countably inﬁnite X [24], and Brown and Xia [9], Eichelsbacherand Reinert [16], Holmes [25] used related operators to characterize convergence to discrete targetdistributions.
Moreover, by substituting h ( x ) = g ( x ) − g ( inc ( x )) in (10), we recover the difference
Stein operator proposed by Yang et al.
[64] without reference to birth-death processes:
[Equation]
[Equation]
Choosing a Stein operator Despite being better-known, the difference and MPF operators oftensuffer from large variance and numerical instability due to their use of unbounded probability ratiosq ( y ) /q
( x ) .
As a result, we recommend the numerically stable Gibbs operator when each componentof x is binary or takes on a small number of values.
When x i takes on a large number of values ( m ),the Gibbs operator suffers from linear scaling with m .
In this case, we recommend the Barker operatorwhere a sparse neighborhood structure can be speciﬁed, such as N x = { inc i ( x ) , dec i ( x ) for i ∈ [ d ] } .
The Barker operator is numerically stable as its κ ( q ( y ) q ( x ) )
=
q ( y ) q
( x )+ q ( y ) .
Gradient Estimation with Discrete Stein Operators
Recall that REINFORCE estimates the gradient E q η [ f ( x ) ∇ η log q η ( x )] .
Due to the existence of∇ η log q η ( x ) as a weighting function, we apply a discrete Stein operator to a vector-valued function˜ h : X → R d per dimension to construct the following estimator with a mean-zero CV:
[Equation]
Ideally, we want to choose the ˜ h
such that A ˜ h
i will be strongly correlated with f ( x ) ∇ η i log q η ( x ) toreduce its variance.
The optimal ˜ h
i is given by the solution of Poisson equation
[Equation]
We could learn a separate ˜ h i per dimension to approximate the solution of (13).
However, this posesa difﬁcult optimization problem that requires simultaneously solving d Poisson equations.
Instead,we will incorporate knowledge about the structure of the solution to simplify the optimization.
To determine a candidate functional form for ˜ h , we consider an “optimal” Markov chain whichgenerates i.i.d.
sample points from q η .
In this case, ( P − I )
˜ h
i becomes E q η [˜ h
i ] − ˜ h
i , and the optimalsolution is ˜ h
i = f ∇ η i log q η .
Inspired by this, we consider ˜ h of the form
[Equation]
where we now only need to learn a scalar-valued function h .
Notably, when h exactly equals fand A
= P − I for any discrete time Markov chain kernel P , our CV adjustment amounts to
Rao-Blackwellization [41, Sec. 8.7], as we end up replacing f ( x ) ∇ η i log q η ( x ) with its conditionalexpectation P ( f ∇ η i log q η )( x ) =
E X t +1 | X t = x
[ f ( X t +1 ) ∇ η i log q η ( X t +1 )] .
This yields a guaranteed 146 variance reduction.
Surrogate function design Based on the above reasoning, we can view h as a surrogate for f .
Weavoid directly setting h
= f because our Stein operators evaluate h at all neighbors of the samplepoints, and f can be very expensive to evaluate [see, e.g., 49].
To avoid this problem, we ﬁrst observethat ˜ h
(14) can be made sample-speciﬁc, i.e., we can use a different ˜ h k for each sample point x ( k ) :
[Equation]
We then consider the following choices of h k that are informed about f while being cheap to evaluate:
[Equation]
Here y will take on the values of x ( k ) and its neighbors in the Markov chain.
We omit x
( k ) in the sum(16) to ensure that the function h k is independent of x ( k ) and hence that E q η [ 1 K (cid:80)
Kk =
( A ˜ h k )( x ( k ) )]
=0 .
Moreover, this surrogate function design introduces no additional evaluations of f beyond thoserequired for the usual RLOO estimator.
Also, as observed by Titsias and Shi [58], for manyapplications, including VAE training, where f has parameters θ learned through gradient-basedoptimization, {∇ f ( x ( k ) ) }
Kk =1 can be obtained “for free” from the same backpropagation used tocompute ∇ θ f θ ( x ( k ) )
(see Algorithm 1).
RODEO We can further improve the estimator by leveraging discrete Stein operators and the abovesurrogate function design to construct both the global and local CVs in the Double CV framework [58](see Section 2).
We call our ﬁnal estimator RODEO for R L O O with D iscrete St E in O perators:
[Equation]
η log q η ( x ( k ) ) + ( A ˜ h ∗ k )( x ( k ) )] , (17) where ˜ h ∗ k
( y )
=
h ∗ k
( y ) ∇ η log q η ( y ) and { h k , h ∗
k }
Kk =1 are scalar-valued functions.
Here,( Ah j )( x ( j ) ) is a scalar-valued CV introduced to reduce the variance of the leave-one-out baseline 1 K − 1 (cid:80)
j (cid:54) =
k f ( x ( j ) ) , while ( A ˜ h ∗ k )( x ( k ) ) acts as a global CV to further reduce the variance of thegradient estimate.
We adopt the aforementioned design of h (16) and ˜ h (14) for the two CVs.
In
Appendix B, we show that the RODEO estimator (17) is unbiased for ∇ η E q η [ f ( x )] when each h k isdeﬁned as in (16) and
[Equation]
Optimization with RODEO In practice, we let the functions H and H ∗ share a neural networkarchitecture with two output units.
Since the estimator is unbiased, we can optimize the parametersγ of the network in an online fashion to minimize the variance of the estimator (similar to [20]).
Speciﬁcally, denoting the RODEO gradient estimate by g γ ( x (1: K ) ) , then ∇ γ Tr(Var( g γ ( x (1: K ) )))
=
E [ ∇ γ (cid:107) g γ ( x (1: K ) ) (cid:107) 22 ] .
In Algorithm 1, we use an unbiased estimate of this hyperparameter gradient,∇ γ (cid:107) g γ ( x (1: K ) )
(cid:107) 22 , to update γ after each optimization step of η .
[Table]
Related Work
[Table]
As we have seen in Section
[Table]
there is a long history of designing CVs for REINFORCE estimatorsusing “baselines” [7, 37, 44, 61].
Recent progress is mostly driven by leave-one-out [30, 38, 47,
48]and sample-dependent baselines [20, 22, 42, 58, 60].
REBAR [60] constructs the baseline throughcontinuous relaxation of the discrete distribution [26, 35] and applies reparameterization gradients tothe correction term.
As a result REBAR uses three evaluations of f for each x ( k ) instead of usualsingle evaluation (see Appendix A for a detailed explanation).
The RELAX [20] estimator generalizes
REBAR by noticing that their continuous relaxation can be replaced with a free-form CV.
However,in order to get strong performance, RELAX still includes the continuous relaxation in their CV andonly adds a small deviation to it.
Therefore, RELAX also uses three evaluations of f for each x ( k )and is usually considered more expensive than other estimators.
An attractive property of the RODEO estimator (17) is that it incorporates information from neighboring states thanks to the Stein operator while avoiding additional costly f evaluations thanks to thelearned surrogate functions h k .
Estimators based on analytic local expectation [57, 59] and GO gradients [11] also use neighborhood information but only at the cost of many additional target functionevaluations.
In fact, the local expectation gradient [57] can be viewed as a Stein CV adjustment (17)with a Gibbs Stein operator and the target function f used directly instead of the surrogate h .
Thedownside of these approaches is that f must be evaluated Kd times per training step instead of Ktimes as in RODEO, a prohibitive cost when f is expensive and d ≥ 200 as in Section 6.
Prior work has also studied variance reduction methods based on sampling without replacement [31]and antithetic sampling [13–15, 65] for gradient estimation.
DisARM [14, 66] was shown to outperform RLOO estimators when K = 2 and ARMS [13] generalizes DisARM to K > 2 .
Stein operators for continuous distributions have also been leveraged for effective variance reductionin a variety of learning tasks [2, 5, 36, 40, 50, 52] including gradient estimation [27, 34].
Inparticular, the gradient estimator of Liu et al.
[34] is based on the Langevin Stein operator [19]for continuous distributions and coincides with the continuous counterpart of RELAX [20].
Incontrast, our approach considers discrete Stein operators for Monte Carlo estimation in discretedistributions with exponentially large state spaces.
Recently, Parmas and Sugiyama [43, App. E.4]used a probability ﬂow perspective to characterize all unbiased gradient estimators satisfying a mildtechnical condition; our estimators fall into this broad class but were not speciﬁcally investigated.
Experiments
Python code replicating all experiments can be found in the supplementary material.
6.1 Training Bernoulli VAEs
Following Dong et al.
[14] and Titsias and Shi [58], we conduct experiments on training variationalauto-encoders [29, 46] (VAEs) with Bernoulli latent variables.
VAEs are models with a joint densityp θ ( y, x ) , where x is the latent variable and θ denotes model parameters.
They are typically learnedthrough maximizing the evidence lower bound (ELBO)
E q η ( x | y )
[ f ( x )] for an auxiliary inference network q η ( x | y ) and f ( x ) (cid:44) log p θ ( y, x ) − log q η ( x | y ) .
In our experiments, p ( x ) and q η ( x | y ) arehigh-dimensional distributions where each dimension of the random variable is an independent
Bernoulli.
Since exact gradient computations are intractable, we will use gradient estimators to learnthe parameters η of the inference network.
The VAE architecture and training experimental setupfollows Titsias and Shi [58], and details are given in Appendix C.
The dimensionality of the latentvariable x is d = 200 .
The functions H (16) and H (cid:48) (18) share a neural network architecture with twooutput units and a single hidden layer with 100 units.
For the numerical stability and variance reasonsdiscussed in Section 3, we use the Gibbs Stein operator (7) as a default choice in our experiments,but we revisit this choice in Section 6.3.
We consider the MNIST [33], Fashion-MNIST [63] and Omniglot [32] datasets using their standardtrain, validation, and test splits.
We use both binary and continuous VAE outputs ( y ) as in Titsias and
Shi [58].
In the binary output setting, data are dynamically binarized, and the Bernoulli likelihood isused; in the continuous output setting, data are centered between [ − 1 , 1] , and the Gaussian likelihoodwith learnable diagonal covariance parameters is used.
[Figure]
K =
In the ﬁrst set of experiments we focus on the most common setting of K = 2 samplepoints and compare our variance reduction method to its counterparts including DisARM [14] and
Double CV [58].
Results for RLOO are omitted since it is consistently outperformed by Double
CV [see 58].
Table 2 shows, on all three datasets, RODEO achieves the best training ELBOs.
In
Figure 1 (left), we plot the gradient variance and average training ELBOs against training steps forall estimators on dynamically binarized MNIST.
RODEO outperforms DisARM and Double CV by alarge margin in gradient variance.
Next, we consider VAEs with Gaussian likelihoods trained on non-binarized datasets.
In this casethe gradient estimates suffer from even higher variance due to the large range of values f ( x ) cantake.
The results are plotted in Figure 2.
We see that RODEO has substantially lower variance than
DisARM and Double CV, leading to signiﬁcant improvements in training ELBOs.
In Appendix
Figure 5, we ﬁnd that RODEO also consistently yields the best test set performance in all six settings.
K =
In the second set of experiments we compare RELAX [20], which uses three evaluationsof f per training step, with RODEO, Double CV, and ARMS [13] for K = 3 .
Figure 1 (right) and
Table 2 demonstrate that RODEO outperforms the three previous methods and generally leads tothe lowest variance.
Although RELAX was often observed to have very strong performance in priorwork [14, 58], our results in Figure 1 suggest that, for dynamically binarized datasets, much largergains can be achieved by using the same number of function evaluations in other estimators.
For the experiments mentioned above, we report ﬁnal training ELBOs in Table 2, test log-likelihoodbounds in Appendix Table 3, and binarized MNIST average running time in Appendix Table 4.
For
K = 3 , RODEO has the best ﬁnal performance in 5 out of 6 tasks and runtime nearly identical to
RELAX.
For K = 2 , RODEO has the best ﬁnal performance for all tasks and is 1.5 times slower than
Double CV and DisARM.
We attribute the runtime gap to the Gibbs operator (7) which performs 2 devaluations of the auxiliary functions H and H (cid:48) in (16) and (18).
While this results in some extra cost,the network parameterizing H and H (cid:48) takes only 2-dimensional inputs, produces scalar outputs, andis typically small relative to the VAE model.
As a result, the evaluation of H and H (cid:48) is signiﬁcantlycheaper than that of f , and its relative contribution to runtime shrinks as the cost of f grows.
6.2 Training hierarchical Bernoulli VAEs
To investigate the performance of RODEO when scaling to hierarchical discrete latent variable models,we follow DisARM [14, 65] to train VAEs with 2/3/4 stochastic layers, each of which consists of
[Figure]
200 Bernoulli variables.
We set K = 2 and compare our estimator with DisARM and Double CV ondynamically binarized MNIST, Fashion-MNIST
[Figure]
and Omniglot.
For each stochastic layer, we usea different CV network which has the same architecture as those in our VAE experiments from theprevious section.
More details are presented in Appendix C.
[Figure]
We plot the results on with
Fashion-MNIST in Figure 3.
The resultsfor other datasets and for 2 and 3 stochastic layers can be found in Appendix D. RODEO generallyachieves the best training ELBOs.
One difference we noticed when comparing the variance resultswith those obtained from single-stochastic-layer VAEs is that these estimators have very differentbehaviors towards the beginning and the end of training.
For example, in Figure 3, Double CV startswith lower variance than DisARM, but the gap diminishes after around 100K steps, and DisARMstart to perform better as the training proceeds.
In contrast, RODEO has the lowest variance in bothphases for all datasets save Omniglot, where DisARM overtakes it in the long run.
6.3 Ablation study
Finally, we conduct an ablation study to gain more insight into the impact of each component of
RODEO.
In each experiment we train binary latent VAEs with K = 2 .
Figure 4a explores the impact of RODEO Stein operator choice onnon-binarized MNIST.
As expected, the less stable difference (11) and MPF (9) operators lead tosigniﬁcantly higher gradient variances and worse training ELBOs.
In fact, the same operators ledto divergent training on binarized MNIST.
The Barker operator (9) with neighborhoods deﬁned byhaving one differing coordinate yields results very similar to Gibbs (7) as the operators themselvesare very similar for binary variables (notice that
[Equation]
Impact of LOO baseline and global and local CVs Figure 4b explores binarized MNIST performance when RODEO (17) is modiﬁed to retain a) only the LOO baseline (this is equivalent tostandard RLOO), b) only the global CV, c) the LOO baseline + the global CV, or d) the LOO baseline+ the local CV.
We observe that the global and local Stein CVs both contribute to variance reduction
[Figure]
and have complementary effects.
Moreover, remarkably, the global Stein CV alone outperforms
RLOO.
Impact of surrogate functions To tease apart the beneﬁts of our new surrogate functions (16) andthe remaining RODEO components, we replace the surrogate function c φ ( z ) in RELAX [21] with oursurrogates, which only requires a single evaluation of f per x ( k ) (see Appendix A for more details) [Figure]
Figure 4c compares the performance of RODEO and this modiﬁed RELAX on binarized MNIST.
Since the surrogate functions are matched, the consistent improvements over modiﬁed RELAX canbe attributed to the Stein and double CV components of RODEO.
Conclusions, Limitations, and Future Work
This work tackles the gradient estimation problem for discrete distributions.
We proposed a variancereduction technique which exploits Stein operators to generate control variates for REINFORCEleave-one-out estimators.
Our RODEO estimator does not rely on continuous reparameterization ofthe distribution, requires no additional function evaluations per sample point, and can be adaptedonline to learn very ﬂexible control variates parameterized by neural networks.
One potential drawback of our surrogate function constructions (16) and (18) is the need to evaluatean auxiliary function ( H or H (cid:48) )
at K − 1 locations.
This cost can be comfortably borne when Hand H (cid:48) are much cheaper to evaluate than f , and, in our experiments with the most common samplesizes, the runtime of RODEO was no worse than that of RELAX.
To obtain a more favorable cost forlarge K , one could employ alternative surrogates that require only a constant number of auxiliaryfunction evaluations, e.g.,
[Equation]
The runtime of RODEO could also be improved by varying the Stein operator employed.
Forexample, the Gibbs operator ( Ah )( x ) (7) used in our experiments evaluated its surrogate functionh at d neighboring locations of x .
This evaluation complexity could be reduced by subsamplingneighbors, resulting in a cheaper but still valid Stein operator, or by employing the numerically stable
Barker operator (9) with fewer neighbors.
Either strategy would introduce a speed-variance trade-offworthy of study in follow-up work.
Finally, we have restricted our focus in this work to differentiabletarget functions f .
In future work, this limitation could be overcome by designing effective surrogatefunctions that make no use of derivative information.
Checklist
For all authors...
(a) Do the main claims made in the abstract and introduction accurately reﬂect the paper’s
contributions and scope?
[Yes]
(b) Did you describe the limitations of your work?
[Yes] See Section 7.
(c) Did you discuss any potential negative societal impacts of your work?
[N/A]
(d) Have you read the ethics review guidelines and ensured that your paper conforms tothem?
[Yes]
If you are including theoretical results...
(a) Did you state the full set of assumptions of all theoretical results?
[Yes]
(b) Did you include complete proofs of all theoretical results?
[Yes]
If you ran experiments...
(a) Did you include the code, data, and instructions needed to reproduce the main experi-
mental results (either in the supplemental material or as a URL)?
[Yes] MIT-licensed
open-source Python code replicating all experiments can be found in the supplementary
material.
(b) Did you specify all the training details (e.g., data splits, hyperparameters, how they were chosen)?
[Yes] See Appendix C.
(c) Did you report error bars (e.g., with respect to the random seed after running experi- ments multiple times)?
[Yes] See, e.g., Table 2.
(d) Did you include the total amount of compute and the type of resources used (e.g., typeof GPUs, internal cluster, or cloud provider)?
[Yes] See, e.g., Table 4.
If you are using existing assets (e.g., code, data, models) or curating/releasing new assets...
(a) If your work uses existing assets, did you cite the creators?
[Yes]
(b) Did you mention the license of the assets?
[Yes]
(c) Did you include any new assets either in the supplemental material or as a URL?
[Yes]
MIT-
licensed open source Python code replicating
all experiments can be found in thesupplementary material
(d) Did you discuss whether and how consent was obtained from people whose data you’re
using/curating?
[N/A]
(e) Did you discuss whether the data you are using/curating contains personally identiﬁable
information or offensive content?
[N/A]
If you used crowdsourcing or conducted research with human subjects...
(a) Did you include the full text of instructions given to participants and screenshots, if
applicable?
[N/A]
(b) Did you describe any potential participant risks, with links to Institutional Review
Board (IRB) approvals, if applicable?
[N/A]
(c) Did you include the estimated hourly wage paid to participants and the total amount
spent on participant compensation?
[N/A]