---
title: Oriented Variational Forward (OVF)
url: https://www.emergentmind.com/topics/oriented-variational-forward-ovf
type: topic
---

# Oriented Variational Forward (OVF)

Searching arXiv for papers on Oriented Variational Forward (OVF) and closely related formulations.
Oriented Variational Forward (OVF) denotes a family of forward-oriented variational constructions appearing in distinct research contexts, rather than a single universally standardized method. In the literature provided here, the term has three technically different meanings. In optimal control, OVF corresponds to a forward evolution in a virtual variation time that drives trajectories toward extremals by monotone decrease of a functional, as formalized by the Variation Evolving Method (VEM) in “A Variation Evolving Method for Optimal Control” [1703.10263]. In likelihood-free variational inference, OVF refers to the forward-KL orientation underlying Forward Amortized Variational Inference (FAVI), where the variational objective uses $KL(p\|q)$ rather than $KL(q\|p)$ [1805.11542], with related forward-KL developments such as Transport Score Climbing (TSC) [2202.01841]. In non-volatile compute-in-memory deployment, OVF names a specific negative-feedback training mechanism for robustness against device variation in NVCIM accelerators [2305.14561; 2508.12195]. The common thread is an explicit orientation of variation or optimization in a forward direction, but the mathematical object being evolved differs substantially across these settings.

## 1. Terminological scope and research contexts

The term OVF is used explicitly in the NVCIM robustness literature as “Oriented Variational Forward,” where it denotes a training-time negative-feedback mechanism based on multiple noisy forward passes with increasing variation amplitudes [2305.14561; 2508.12195]. In the likelihood-free inference literature, the same label corresponds to the forward-KL orientation of FAVI: the “orientation” is $KL(p\|q)$, and the resulting objective is a joint-contrastive forward variational loss [1805.11542]. In the optimal-control literature, the data identify OVF as a viewpoint on VEM: a “forward-oriented variational evolution (gradient flow) toward optimality,” implemented through evolution in a virtual time $\tau$ [1703.10263].

These usages are not interchangeable. In VEM, the evolving object is a trajectory or optimal-control tuple such as $(x,u,\lambda,t_f)$; in FAVI and TSC, it is a variational distribution $q$; in NVCIM OVF, it is the training objective induced by combining a backbone output with negatively weighted noisy auxiliary forwards. A plausible implication is that OVF functions best as a cross-domain descriptor for methods that orient variation so as to enforce monotone descent or robustness, rather than as the name of one canonical algorithm.

## 2. OVF as virtual-time forward evolution in optimal control

In “A Variation Evolving Method for Optimal Control” [1703.10263], the central construction is the introduction of a virtual “variation time” $\tau \in [0,\infty)$ that parameterizes a forward evolution of the candidate solution. For the calculus-of-variations problem,
\[
J = \int_{t_0}^{t_f} F\big(y(t),\,\dot y(t),\,t\big)\,dt,
\]
the method defines variation dynamics
\[
\frac{\partial y}{\partial \tau}(t,\tau) = -K\Big(F_y - \frac{d}{dt}F_{\dot y}\Big),
\]
with boundary evolution
\[
\frac{\partial y}{\partial \tau}(t_0,\tau) = +K\,F_{\dot y}(t_0),\qquad
\frac{\partial y}{\partial \tau}(t_f,\tau) = -K\,F_{\dot y}(t_f),
\]
where $K=\operatorname{diag}(k_1,\dots,k_n)\succ 0$ is a positive diagonal gain matrix [1703.10263]. The functional $J(\tau)$ is nonincreasing along $\tau$, and the equilibrium satisfies the Euler–Lagrange and boundary conditions.

For the optimal control problem with dynamics
\[
\dot x(t)=f(x(t),u(t),t),\qquad x(t_0)=x_0,
\]
and Bolza objective
\[
J=\Phi(x(t_f),t_f)+\int_{t_0}^{t_f}L(x(t),u(t),t)\,dt,
\]
the paper does not directly descend on an augmented Lagrangian. Instead, it constructs the convex residual functional
\[
J_1
=
r_t^2
+
\int_{t_0}^{t_f}
\Big(
\|r_x\|^2+\|r_\lambda\|^2+\|r_u\|^2
\Big)\,dt
+
\|r_{\lambda,t}\|^2,
\]
with residuals
\[
r_x=\dot x-f(x,u,t),\quad
r_\lambda=\dot\lambda+H_x,\quad
r_u=H_u,
\]
and terminal residuals
\[
r_{\lambda,t}=\lambda(t_f)-\Phi_x(x(t_f),t_f),\qquad
r_t=H(x(t_f),u(t_f),\lambda(t_f),t_f)+\Phi_t(x(t_f),t_f),
\]
where
\[
H(x,u,\lambda,t)=L(x,u,t)+\lambda^\top f(x,u,t)
\]
is the Hamiltonian [1703.10263]. The evolution is then written as a functional gradient flow
\[
\frac{\partial y}{\partial \tau}(t,\tau)=-2K\,\frac{\delta J_1}{\delta y}(t,\tau),\qquad
\frac{\partial t_f}{\partial \tau}=-k_f\,\frac{\partial J_1}{\partial t_f},
\]
for $y:=[x;\lambda;u]$ and $K=\mathrm{diag}(K_x,K_\lambda,K_u)\succ 0$ [1703.10263].

The paper explicitly relates this construction to an OVF viewpoint: VEM is described as “precisely a continuous-time gradient descent in a function space” and as conceptually identical to “oriented variational forward (OVF)” insofar as both orient variation to ensure monotonic decrease by forward integration in a virtual time [1703.10263]. In this setting, OVF is therefore a forward-evolution interpretation of function-space optimization for Euler–Lagrange and Pontryagin systems.

## 3. Stability, convergence, and numerical realization in the VEM/OVF viewpoint

The VEM formulation uses Lyapunov-style monotonicity arguments. For the calculus-of-variations case, taking $V(\tau)=J(\tau)$ yields
\[
\frac{dJ}{d\tau}\le 0.
\]
For the optimal-control case, taking $V(\tau)=J_1(\tau)$ gives
\[
\frac{dV}{d\tau}
=
-2
\int_{t_0}^{t_f}
\frac{\delta V}{\delta y}^\top
K
\frac{\delta V}{\delta y}\,dt
-
k_f\left(\frac{\partial V}{\partial t_f}\right)^2
\le 0,
\]
and, as stated in Theorem 2,
\[
\frac{dJ_1}{d\tau}\le 0,\qquad J_1(\tau)\to 0,
\]
so the limit satisfies the PMP conditions and transversality conditions [1703.10263]. The paper emphasizes “global stability” in the sense that any initial guess respecting essential boundary conditions decreases $J$ or $J_1$ monotonically and converges to an extremal, though not necessarily a globally optimal one if the original OCP is nonconvex [1703.10263].

Numerically, the method converts the original boundary-value problem into an initial-value problem in $\tau$. The “ZS equation” is interpreted as a PDE in $(t,\tau)$, and in practice the implementation uses semi-discretization in physical time $t$ and ODE integration in $\tau$ [1703.10263]. The paper reports discretization on uniform grids, finite-difference approximations to $\dot x$ and $\dot\lambda$, and integration with Matlab solvers: `ode45` for the smooth calculus-of-variations example and `ode15s` for stiff OCP examples [1703.10263].

The worked examples illustrate the forward-evolution mechanism. For a fixed-endpoint calculus-of-variations problem on $[0,\pi]$, the numerical trajectory approaches the analytic solution while $J(\tau)$ decreases monotonically [1703.10263]. For a linear-quadratic-type OCP with fixed terminal time, numerical solutions converge to the analytic state, costate, and control, becoming indistinguishable from analytic by $\tau \approx 300$ s [1703.10263]. For the brachistochrone with free terminal time, the method converges to $t_f \approx 0.8166$ s, close to the $0.8165$ s computed by GPOPS-II [1703.10263].

This suggests that, in the optimal-control sense, OVF is best understood as an orientation principle for variational dynamics in infinite-dimensional trajectory spaces: the solution is not solved by direct shooting or collocation first, but approached asymptotically via forward evolution.

## 4. OVF as forward-KL orientation in variational inference

In the variational-inference literature, OVF refers to the forward orientation of the KL divergence. “Forward Amortized Inference for Likelihood-Free Variational Marginalization” [1805.11542] introduces Forward Amortized Variational Inference (FAVI), where the loss is obtained from the joint-contrastive forward KL between the model joint $p(x,z)$ and a variational joint $q(x,z)=q(z|x)k(x)$. The forward KL is
\[
KL(p\|q)=E_p[\log p-\log q],
\]
and the joint-contrastive decomposition yields
\[
KL(p(x,z)\|q(x,z))
=
- E_{p(x,z)}[\log q(z|x)]
+ E_{p(x,z)}[\log p(x,z)-\log k(x)].
\]
Ignoring terms independent of $q$, the FAVI objective is
\[
L_{FA}[q] = - E_{p(x,z)}[\log q(z|x)].
\]
This is equivalent to minimizing the amortized forward posterior-contrastive loss
\[
E_{p(x)} KL(p(z|x)\|q(z|x)),
\]
since the difference is again a term independent of $q$ [1805.11542].

The gradient estimator is
\[
\nabla_\theta L_{FA}(\theta)=E_{p(x,z)}[-\nabla_\theta \log q_\theta(z|x)],
\]
which the paper characterizes as unbiased and likelihood-free because it requires only samples $(x,z)\sim p(x,z)$ and not evaluations of $p(x,z)$ or its derivatives [1805.11542]. The paper further proves an exact-marginals theorem: for a fully factorized variational posterior
\[
q(z|x)=\prod_k q_k(z_k|x),
\]
the minimizer satisfies
\[
q_k(z_k|x)=p(z_k|x)
\]
for all $k$ and all $x$ in the support of $p(x)$ [1805.11542]. This marginal-optimality property is explicitly contrasted with reverse-KL mean-field inference.

The same forward-KL orientation appears in Transport Score Climbing (TSC) [2202.01841], which optimizes
\[
KL(p(z|x)\|q(z;\lambda))
=
E_{p(z|x)}\!\left[\log \frac{p(z|x)}{q(z;\lambda)}\right],
\]
with gradient
\[
\nabla_\lambda KL(p\|q_\lambda) = -E_{p(z|x)}[\nabla_\lambda \log q_\lambda(z)].
\]
TSC estimates this expectation using HMC samples from a warped posterior induced by an adaptive transport map $T_\lambda$, and the same map parameterizes the normalizing-flow family used for $q$ [2202.01841]. The paper positions this as forward-KL variational inference that avoids uncertainty underestimation associated with reverse KL and leverages better transport maps to improve HMC, which in turn improves forward-KL optimization [2202.01841].

In this literature, then, OVF is not a virtual-time PDE or negative-feedback training rule. It is the orientation of variational inference toward $KL(p\|q)$, typically associated with mass-covering behavior, exact moment or marginal matching in specific families, and simulator-based or MCMC-based estimation of the forward-KL gradient [1805.11542; 2202.01841].

## 5. OVF as negative-feedback training for NVCIM accelerators

A third and distinct meaning appears in the NVCIM robustness literature. “Negative Feedback Training: A Novel Concept to Improve Robustness of NVCIM DNN Accelerators” [2305.14561] introduces Negative Feedback Training (NFT) and identifies OVF as one of two specific NFT instances, the other being Intermediate Representation Snapshot (IRS). “Special Session: Sustainable Deployment of Deep Neural Networks on Non-Volatile Compute-in-Memory Accelerators” [2508.12195] develops the same OVF mechanism in the context of sustainable deployment.

The motivation is the degradation of inference accuracy on non-volatile compute-in-memory substrates due to stochastic device-to-device and cycle-to-cycle programming variability, intrinsic device variations, and related physical non-idealities [2305.14561; 2508.12195]. The deployment mapping uses quantization and bit-slicing. For $M$ bits per weight, the quantized weight is
\[
\bar{\mathcal{W}_d} = \frac{\max{|\mathcal{W}|}}{2^M - 1}\sum_{i=0}^{M-1}{m_i \times 2^i},
\]
and with $K$ bits per device, the desired conductance of the $j$-th device is
\[
\bar{g}_j = \sum_{i=0}^{K-1} m_{j\times K+i} \times 2^i.
\]
Programming variation is modeled as
\[
g_j = \bar{g}_j + \Delta g,\qquad \Delta g \sim \mathcal{N}(0,\sigma_d^2),
\]
leading to a realized weight
\[
\mathcal{W}_p = \bar{\mathcal{W}_d} + \frac{\max{|\mathcal{W}|}}{2^M - 1} \sum_{j=0}^{M/K-1} {\Delta g \times 2^{j\times K}}
\]
[2508.12195]. The experiments use $M=8$ bits per weight, $K=2$ bits per device, negative weights mapped to a separate array, and relative standard deviation bounded by $\sigma_d \le 0.4$ [2508.12195].

OVF instantiates negative feedback by combining a backbone forward pass with multiple auxiliary noisy forwards of increasing noise amplitude. Let $O_{\text{backbone}}$ be the output computed with deployment-level variation, and let $\{Out_n\}_{n=1}^N$ be oriented forwards under stronger variation. The total output is
\[
O_{\text{total}} = a_b \cdot O_{\text{backbone}} - a_f \cdot \beta \cdot \sum_{n=1}^{N}\gamma_n \cdot Out_n,
\]
where $\beta>0$ is the negative feedback strength, $\gamma_n$ are decay factors, and $a_b,a_f$ scale the backbone and feedback contributions [2508.12195]. The oriented forwards use
\[
\Delta g^{(n)} \sim \mathcal{N}(0,\sigma_n^2),\qquad \sigma_1 < \sigma_2 < \cdots < \sigma_N,
\]
with the reported schedule $N=3$, increment $\Delta \sigma_d = 0.05$, and search range determined by start $=0$ and end $= 2\times \sigma_d$ [2508.12195]. The decay factors are
\[
\gamma_n = 10^{\,n-N},
\]
and default contribution factors are
\[
a_b = a_f = \frac{1}{N+1}
\]
[2508.12195].

The training objective is the expected task loss under the backbone variation and the oriented auxiliary variation distributions:
\[
\mathcal{J}_{\text{OVF}}(\theta)
=
\mathbb{E}_{(x,y)}
\Big[
\mathbb{E}_{\Delta g \sim \mathcal{N}(0,\sigma_{\text{back}}^2)}
\mathcal{L}\big(
a_b\,\mathcal{O}_{\text{backbone}}(x;\theta,\Delta g)
-
a_f\,\beta
\sum_{n=1}^{N}\gamma_n\,
\mathbb{E}_{\Delta g^{(n)} \sim \mathcal{N}(0,\sigma_n^2)}
Out_n(x;\theta,\Delta g^{(n)}),
y
\big)
\Big],
\]
with Monte Carlo approximation by one backbone sample and $N$ oriented samples per minibatch [2508.12195]. Because all forwards share $\theta$, the gradient contains a positive contribution from the backbone and negative contributions from the oriented forwards:
\[
\nabla_{\theta}\mathcal{J}_{\text{OVF}}
\approx
\mathbb{E}\Big[
a_b\,\nabla_{\theta}\mathcal{L}(\mathcal{O}_{\text{backbone}})
-
a_f\,\beta\,\sum_{n=1}^{N}\gamma_n\,
\nabla_{\theta}\mathcal{L}(Out_n)
\Big].
\]
This is the sense in which the method is “negative feedback”: the stronger-noise auxiliary forwards act as subtractive constraints that orient training toward parameters less sensitive to device variation [2508.12195].

## 6. Empirical behavior, comparisons, and limitations in the NVCIM OVF literature

The NVCIM papers evaluate OVF on VGG-8 and ResNet-18 across MNIST, CIFAR-10, CIFAR-100, and Tiny ImageNet, using PyTorch, NVIDIA GPUs, Monte Carlo evaluation with 200 runs, and averages over at least five independent trainings; the reported results have 95% confidence interval $\pm 0.01$ [2508.12195]. Baselines are vanilla training without noise and Gaussian noise-injection training [2508.12195].

OVF is reported to improve Top-1 accuracy over Gaussian noise-injection training by up to 46.71% for VGG-8 on MNIST, 6.78% for VGG-8 on CIFAR-10, 5.35% for ResNet-18 on MNIST, 16.30% for ResNet-18 on CIFAR-10, 17.21% for ResNet-18 on CIFAR-100, and 3.22% for ResNet-18 on Tiny ImageNet [2508.12195]. The earlier NFT paper reports the same OVF gains and additionally notes that IRS slightly exceeds OVF on some deeper-network cases, for example 20.24% on ResNet-18/CIFAR-10 and 20.10% on ResNet-18/CIFAR-100 [2305.14561]. Epistemic uncertainty is measured through Expected Kullback–Leibler divergence (EKL), and OVF is reported to achieve higher accuracy while maintaining low EKL divergence, whereas Gaussian noise-injection training increases uncertainty even as it improves accuracy over vanilla [2508.12195]. Under substantial device variation, OVF also shows improved convergence robustness; for VGG-8 on MNIST at $\sigma_d=0.35$, the reported count in 10 runs is 6 non-converging models for noise-injection versus 0 for OVF [2508.12195].

The papers interpret these results as evidence that structured, oriented negative feedback better matches the deterministic optimization process to the stochastic deployment environment than single-output Gaussian noise-injection alone [2305.14561; 2508.12195]. A plausible implication is that the “orientation” in OVF is not merely larger-noise augmentation, but a deliberate weighting scheme in which stronger perturbations impose stronger constraints through $\gamma_n$ and the subtractive aggregation.

The limitations are also explicit. OVF adds $N$ extra forward passes per batch, so training time increases roughly by a factor of about $N+1$ relative to standard single-forward training [2508.12195]. If $\sigma_d$ is very small, OVF performs similarly to baselines while still incurring this training overhead [2508.12195]. If the actual device variation deviates strongly from the assumed Gaussian model, re-tuning the orientation schedule and $\beta$, or enriching the noise model, may be necessary [2508.12195]. The experiments focus on programming variability rather than explicitly simulating ADC/DAC noise, IR-drop, drift, or nonlinearity, although the papers state that OVF is compatible with richer forward-pass noise models [2508.12195].

## 7. Comparative interpretation across the three OVF meanings

Across these literatures, OVF always denotes an oriented use of variation, but the orientation principle is instantiated differently.

| Context | Core object | Orientation mechanism |
|---|---|---|
| Optimal control / VEM [1703.10263] | Trajectory or control-state-costate path | Forward evolution in virtual time $\tau$ decreasing $J$ or $J_1$ |
| Variational inference / FAVI, TSC [1805.11542; 2202.01841] | Variational distribution $q$ | Forward KL $KL(p\|q)$ and gradients under $p$ |
| NVCIM robustness [2305.14561; 2508.12195] | Training objective for DNN deployment robustness | Negative-feedback combination of backbone and stronger-noise auxiliary forwards |

In VEM, the forward direction is temporal in an auxiliary dimension. In FAVI and TSC, it is divergence-theoretic: the KL is oriented from target to approximation. In NVCIM OVF, it is robustness-oriented: auxiliary forwards are oriented toward larger device variation and subtracted during training.

These frameworks should therefore be distinguished carefully in technical writing. “OVF” in the NVCIM sense is not a synonym for forward-KL variational inference, and neither is identical to the optimal-control VEM viewpoint. The overlap lies in the meta-principle that variation is not sampled or perturbed arbitrarily, but oriented so as to induce monotone descent, posterior coverage, or robustness. This suggests a useful unifying interpretation: OVF is best regarded as a methodological motif in which a forward-oriented variational construction reshapes the optimization landscape to make desired equilibria—optimality conditions, calibrated posteriors, or noise-robust deployed models—more accessible.

Source: https://www.emergentmind.com/topics/oriented-variational-forward-ovf