Some neural networks contain a step that makes a discrete random choice, such as a binary code, a category, or a token. Training such a network has always meant backpropagation plus a special trick to get gradients past the non-differentiable sample. Zeroth-order optimization trains a network using only forward passes: it nudges the weights in a random direction and watches how the loss changes. It fits at inference memory and runs on hardware where backpropagation cannot (Zhao et al.; Tan et al.). The two approaches collide badly. A forward-only method that perturbs weights and re-samples the discrete latent sees a loss that jumps randomly between evaluations. If it holds the random draw fixed, it sees a piecewise-constant loss whose finite difference is zero almost everywhere. Either way, the noise from the discrete sample sits on top of the usual problem that random-direction estimates get noisier as the parameter count grows.
We propose to cut the network at the discrete sampling layer and estimate the two halves differently, all with forward passes. Below the cut, the encoder's output logits are a smooth, deterministic function of its weights. A finite difference of those logits along a random direction therefore has no sampling noise. At the cut, a modern antithetic discrete estimator such as DisARM or CARMS gives an unbiased gradient of the loss with respect to the logits, using only decoder forward passes at paired discrete samples. Above the cut, the decoder is trained by finite differences with the discrete sample held fixed, which is smooth. Multiplying the logit-space gradient by the logit directional derivative gives an estimate of the encoder gradient that is unbiased up to the usual finite-difference error. It needs no backpropagation and no temperature, and the discrete-sampling noise is handled by machinery built for exactly that.
Core Claim
Let $\theta$ be encoder weights, $\ell(\theta)\in\mathbb{R}^k$ the logits of the discrete latent $z$, and $F(\ell)=\mathbb{E}_{z\sim p_\ell}[f(z)]$ the expected downstream loss. Let $\hat g$ be an unbiased antithetic estimate of $\nabla_\ell F$, $u\sim\mathcal{N}(0,I)$ a random direction in weight space, and $\mu$ the smoothing radius. We estimate
$$\hat\nabla_\theta = \Big\langle \hat g,\ \tfrac{\ell(\theta+\mu u)-\ell(\theta-\mu u)}{2\mu}\Big\rangle\, u .$$
Because $\hat g$ and $u$ are independent and the logit difference approaches the Jacobian-vector product $J u$, the expectation is $J^\top \nabla_\ell F$ up to $O(\mu^2)$ error from the central difference. The variance then splits into two parts. One is a direction term that scales with dimension, which subspace methods already attack. The other is a discrete term set by the variance of $\hat g$, which antithetic estimators already attack. The plain black-box approach mixes the two, and its sampling noise is amplified by $1/\mu^2$. The claim to test is that this split makes forward-only training of discrete-latent models work at a quality close to first-order DisARM, where both black-box zeroth-order training and zeroth-order training through a Gumbel-Softmax relaxation either fail or plateau lower.
Relation to Prior Work
The method borrows directly from two lines of discrete-gradient work. The first is antithetic estimators for the logit gradient. DisARM integrates out ARM's continuous noise to get a lower-variance antithetic pair for binary units. ARMS extends this to $N$ coupled samples, and CARMS covers categorical variables. All three are designed as estimators wrt logits that are then backpropagated into the encoder. We keep the estimator and replace the backpropagation. The second line is relaxation-based control variates, REBAR and RELAX, along with relaxations such as ReDGE. These differentiate the relaxed path, so they do not transfer to forward-only training without a further step. We use them only as baselines.
On the zeroth-order side, the work constrains what we can build and supplies the subspace machinery. SubZero shows that random-direction variance grows linearly in dimension and cuts it with low-rank layer-wise directions. AGZO restricts directions to the span of forward activations. MeZO-SVRG uses periodic anchor gradients at roughly 3x inference memory. All three treat the network as a smooth scalar oracle over continuous weights and never meet a stochastic discrete layer. We reuse their direction samplers for $u$. ZoVH relates zeroth-order curvature estimation to one-step policy optimization, but only for continuous Gaussian perturbations.
The closest bridge is ZO-PoG. It alternates REINFORCE on prompt-token probabilities with zeroth-order steps on continuous prompt embeddings. In ZO-PoG the discrete distribution's parameters are the free variables themselves; no network sits upstream of the sample, so nothing ever has to be composed across the discrete layer. Our case is the reverse: a learned encoder produces the logits, and the problem is carrying a discrete gradient back through it without backpropagation. ZOPO sidesteps discreteness by embedding text into a continuous space. DAPS avoids differentiating through samples via policy search but still backpropagates through the encoder and decoder.
Research Program
We will build the estimator for Bernoulli latents (DisARM at the cut) and categorical latents (CARMS-I at the cut), in single- and multi-layer stochastic networks. For stacked latents, each discrete layer is its own cut: its logit gradient comes from an antithetic estimate whose loss is the forward pass of everything downstream.
Forward passes are shared within each step. The encoder is evaluated at $\theta\pm\mu u$, and the average of the two logit vectors gives the logits at $\theta$ to $O(\mu^2)$. From those logits, two antithetic codes $z_1,z_2$ are drawn. The decoder is run at $\phi\pm\mu v$ on each code, where $\phi$ are the decoder weights and $v$ is a decoder-space direction. Those four decoder passes do two jobs: they give the decoder's finite difference with $z$ held fixed, and their averages give $f(z_1),f(z_2)$ for DisARM. One step thus costs two encoder and four decoder forward passes. Random directions are regenerated from seeds, so memory stays at inference level plus one $k$-dimensional logit buffer.
The analysis has three parts. We will derive the variance decomposition above and show when the discrete term dominates. We will measure how the estimator depends on $\mu$; it should be much less sensitive than black-box finite differences, because $\mu$ only enters through smooth logits. Finally, we will test whether AGZO-style activation-guided directions for $u$ reduce the direction term additively on top of the antithetic reduction.
Baselines
The naive reference is MeZO-style black-box zeroth-order training of the whole stochastic network, with the discrete draw held fixed across the two perturbed evaluations. We will also run a re-sampled variant. Both get the same forward-pass budget per step, the same direction sampler, and the same learning-rate sweep. This tests whether structure at the discrete layer matters at all. Beating it means a clearly higher test ELBO at equal forward passes; we expect black-box training to stall near the prior.
The strongest forward-only competitor is zeroth-order training through a Gumbel-Softmax relaxation. Here the sample is replaced by a relaxed sample with fixed noise, the whole network becomes smooth, and SubZero-style low-rank finite differences are applied end to end. It is simple and forward-only, and it gets around the step-function problem. We will tune it at matched budget over temperature, temperature schedule, and rank. Beating it means a higher final ELBO measured with hard discrete samples, and robustness across temperatures. If it ties us on Bernoulli VAEs, we will say so and report where the gap does or does not open.
The quality ceiling is first-order DisARM, or CARMS for categorical latents, trained with full backpropagation, which is the setting where their gains over ARM, LOORF and VIMCO were reported. The file gives no numeric ELBO for DisARM, ARMS or CARMS on binarized MNIST, FashionMNIST or Omniglot. There is no reported result found on Lacuna for these ELBO values, so we will reproduce them under our architectures. Success means closing most of the gap between the black-box reference and this ceiling, at 1x inference memory. For memory context we will also report MeZO-SVRG at its stated roughly 3x inference memory.
Two ablations isolate the key ingredient. The first replaces the antithetic estimate at the cut with independent-sample leave-one-out REINFORCE at equal decoder passes; this isolates the discrete half of the variance. The second keeps DisARM but swaps isotropic $u$ for AGZO-guided and SubZero low-rank directions; this isolates the direction half.
Why not just…?
Why not just run MeZO on the whole model? With the draw held fixed, the finite difference is zero unless the perturbation flips a latent bit, and then it is order $1/\mu$. Re-sampling the draw instead adds noise scaled by $1/\mu^2$. This sits on top of the dimension-linear variance that SubZero documents even for smooth networks. The naive baseline and the $\mu$ sweep will show this directly.
Why not just apply zeroth-order optimization through a Gumbel-Softmax relaxation? This is the real threat. Its weakness is the one discrete-latent work keeps finding. High temperatures bias the gradient and low temperatures make it explode or vanish (Gourevitch et al.). Relaxed training was unstable at standard learning rates on ImageNet-256 (Drolet et al.). On toy problems, biased relaxations converge to suboptimal solutions (Tucker et al.). We will rerun Tucker's toy problem forward-only to test whether this bias survives. We will also run a temperature sweep on the VAEs. If the relaxed method matches us everywhere, the contribution shrinks to unbiasedness on hard cases, and we will report it that way.
Why not just use the straight-through estimator with forward-only training? Straight-through needs a backward copy of decoder gradients to the encoder, which forward-only training does not have. Its forward-only analogue reduces to the relaxed baseline at $n=1$ in ReDGE's family. It also has known bias and codebook collapse (Drolet et al.), and ReDGE beats it on Sudoku guidance, reporting 89% and 93% solve rates against a 1% starting point. We fold it into the relaxed baseline sweep rather than treating it separately.
Why not just backpropagate with LoRA? For small VAEs this is fine, and first-order DisARM is our quality ceiling. The case for the proposal is hardware where activations cannot be cached. As a reference point for how memory scales, SubZero reports 6.8GB against 11.5GB for SGD on OPT-1.3B, and Dang et al. cite 633 GB for Adam on OPT-30B. We will report peak memory for every method.
Proposed Experiments
The first experiment is a decisive check on a small Bernoulli model with about 10 binary latents, where the exact encoder gradient can be computed by enumerating every latent configuration. At fixed checkpoints we will measure each estimator's variance and its cosine similarity to that exact gradient, separating the direction term from the discrete term. The split estimator should match black-box variance on the direction term and cut the discrete term by orders of magnitude.
The second is the DisARM/ARMS benchmark suite: linear and nonlinear Bernoulli VAEs on dynamically binarized MNIST, FashionMNIST and Omniglot, with test ELBO and multi-sample bounds against forward passes and wall-clock time.
The third covers categorical latents: CARMS's categorical VAEs, and its image-completion task at $C=3,5,10$, which predicts the bottom half of an image from the top half and is scored by log-likelihood.
The fourth is a stretch regime: a two-layer stochastic network, to test whether chaining cuts keeps variance under control.
The result that would falsify the proposal is the relaxed zeroth-order baseline matching the split estimator in ELBO on all four, including the bias toy problem. We would then report that the discrete-layer split is unnecessary whenever a smooth surrogate exists.
References
- Poor Man's Training on MCUs: A Memory-Efficient Quantized Back-Propagation-Free Approach
- End-to-End On-Device Quantization-Aware Training for LLMs at Inference Cost
- DisARM: An Antithetic Gradient Estimator for Binary Latent Variables
- ARMS: Antithetic-REINFORCE-Multi-Sample Gradient for Binary Variables
- CARMS: Categorical-Antithetic-REINFORCE Multi-Sample Gradient Estimator
- REBAR: Low-variance, unbiased gradient estimates for discrete latent variable models
- Backpropagation through the Void: Optimizing control variates for black-box gradient estimation
- Categorical Reparameterization with Denoising Diffusion Models
- SubZero: Random Subspace Zeroth-Order Optimization for Memory-Efficient LLM Fine-Tuning
- AGZO: Activation-Guided Zeroth-Order Optimization for LLM Fine-Tuning
- Variance-reduced Zeroth-Order Methods for Fine-Tuning Language Models
- Revisiting Zeroth-Order Hessian Approximation: A Single-Step Policy Optimization Lens
- Collaborative Discrete-Continuous Black-Box Prompt Learning for Language Models
- Localized Zeroth-Order Prompt Optimization
- Discrete Variational Autoencoding via Policy Search
- FZOO: Fast Zeroth-Order Optimizer for Fine‑Tuning Large Language Models towards Adam‑Scale Speed