Manuscript Offprint

arXiv:2611.03293

ENGINE: Endogenous Variational MultiScale Optimization for Zeroth-Order LLM Fine-Tuning

Zhuoli Ouyang, Changxi Chi, Siyuan Li, Tailin Wu

Open access. PaperVantage converted this article to text, so layout and figures may differ from the original.

Abstract

Zeroth-order (ZO) optimization enables memory-efficient large language model (LLM) fine-tuning, and recent methods incorporate curvature-aware strategies. However, in the high-dimensional parameter space of LLMs, these methods inherently suffer from exploding gradient variance and prohibitive costs. Conversely, confining updates to a low-dimensional subspace reduces variance but discards critical high-dimensional information, degrading performance. This creates a fundamental dilemma: full-space optimization is informative but has high variance, while subspace optimization has low variance but loses information. To break this trade-off, we propose ENGINE (Endogenous Variational MultiScale). Inspired by computational mechanics, we adapt static Variational MultiScale (VMS) theory to dynamic optimization, treating low- and high-dimensional spaces as resolved coarse and unresolved fine scales. Through a multigrid-style V-cycle, ENGINE alternates between spaces, dynamically probing fine-grained information in the high-dimensional space and injecting it to correct the efficient low-dimensional sampling process. Under appropriate assumptions, statistical analysis characterizes variance reduction and correction of curvature-induced bias, and convergence analysis establishes a stationarity bound for the corrected coarse updates. Evaluations on standard LLM benchmarks show that ENGINE achieves higher accuracy and faster convergence than existing ZO methods, achieving up to a 2.61×2.61\times speed-up in forward passes with zero additional peak memory overhead. Code is available at https://github.com/AI4Science-WestlakeU/ENGINE.

1 Introduction

Large language model fine-tuning relies on first-order (FO) optimizers [Loshchilov et al., 2017]. However, FO training requires storing activations, gradients, and optimizer states, making it memory-intensive. Zeroth-order (ZO) optimization [Malladi et al., 2023] is therefore an appealing alternative: it uses only forward passes and reduces memory to near inference level. Still, in the full LLM parameter space, ZO methods suffer from high variance and high query cost [Nesterov and Spokoiny, 2017].

Table 1: Trade-offs between full-space and subspace ZO optimization. ✓ denotes a relative strength, and × a weakness.

SpaceEffic.Var.Perf.Curv.
Full space✗✗✓✓
Subspace✓✓✗✗
ENGINE (Ours)✓✓✓✓

†^{\dagger}Work done as an intern at Westlake University.

‡^{\ddagger}Corresponding author.

40th Conference on Neural Information Processing Systems (NeurIPS 2026).

Figure

Figure 1: Left: Forward-pass and wall-clock speed-up of ENGINE over LOREN to reach LOREN's best accuracy, across four representative (model, task) settings. Right: Validation accuracy convergence on LLaMA-3-8B (CB).

LoRA [Hu et al., 2021] offers a lower-dimensional alternative by restricting updates to a low-rank subspace, improving efficiency and usually reducing variance. But this also discards fine-grained curvature information from the full space, which can slow convergence and degrade performance.

This leads to a central dilemma in zeroth-order optimization (Table 1): full-space optimization is informative but high-variance, while subspace optimization is low-variance but blind. Recent curvature-aware ZO methods, such as LOREN [Seung et al., 2026], reduce estimator variance through anisotropic perturbations [Kool et al., 2019]. Even so, existing methods usually stay in one space only: either the full parameter space or a low-rank subspace such as LoRA. They therefore gain only one side of the trade-off. Full-space methods retain richer information but are statistically costly, while subspace methods are more efficient but inevitably lose part of the curvature structure that is present in the full space. This motivates a simple question: can we keep the efficiency of low-dimensional sampling while still using curvature information from the full space? We approach this question through Variational MultiScale (VMS) theory [Hughes, 1995, Hughes et al., 1998] from computational mechanics. VMS separates a problem into a resolved coarse scale and an unresolved fine scale, then uses a correction term [Hughes et al., 2000] to account for the effect of the unresolved part. This viewpoint suggests a natural way to think about low-dimensional and high-dimensional spaces in zeroth-order optimization.

Based on this idea, we propose ENGINE (Endogenous Variational MultiScale). We treat the low-dimensional LoRA parameterization as the resolved coarse scale and incorporate unresolved full-space curvature through a fine-scale correction. Unlike classical VMS, the optimization operator evolves with the optimization state, so the interaction between the two spaces must be updated dynamically. ENGINE addresses this with an endogenous V-cycle that alternates between the two spaces during training. Through a closed-form subgrid correction, it uses fine-scale information from the high-dimensional space to correct the efficient low-dimensional update.

Experiments on standard LLM optimization benchmarks show that ENGINE consistently improves over state-of-the-art zeroth-order baselines, including LOREN. It achieves better downstream accuracy, faster convergence, and up to a 2.61×2.61 \times speed-up in forward passes (Figure 1), while keeping peak memory usage unchanged.

Our contributions are summarised as follows.

  • A cross-disciplinary perspective. We introduce the idea of Variational MultiScale (VMS) from computational mechanics into zeroth-order LLM fine-tuning. This perspective clarifies why unresolved fine-scale curvature matters and provides a systematic way to describe the interaction between low-dimensional and high-dimensional optimization spaces.

  • The framework of ENGINE. We propose ENGINE, an endogenous Variational MultiScale framework for zeroth-order optimization that combines low-rank sampling with a closed-form subgrid correction, thereby reintroducing unresolved full-space curvature into the coarse update. Under appropriate assumptions, we rigorously analyze the bias and variance of the corrected estimator. We also establish a stationarity bound for coarse updates.

Figure

Figure 2: Test accuracy on all 16 (model, task) combinations. Top row: GPT-2-XL (GLUE, FP32) and OPT-2.7B (GLUE, FP32). Bottom row: LLaMA-3-8B (SuperGLUE, BF16) and OPT-13B (SuperGLUE, BF16). ENGINE is shown in blue hatched. Full numerical values are in Appendix E.1.

• Consistent improvements. Extensive experiments across diverse LLM fine-tuning settings demonstrate that ENGINE improves both downstream performance and convergence speed over state-of-the-art zeroth-order baselines (Figure 2). These gains come with up to a 2.61×2.61\times speed-up in forward passes and no additional peak memory overhead.

References (68)

  • Enhancing zeroth-order fine-tuning for language models with low-rank structures (opens arXiv in a new tab)
  • Variance-reduced zeroth-order methods for fine-tuning language models (opens arXiv in a new tab)
  • The Llama 3 Herd of Models
  • Shampoo: Preconditioned stochastic tensor optimization
  • LoRA: Low-Rank Adaptation of Large Language Models
  • The variational multiscale method—a paradigm for computational mechanics
  • Large eddy simulation and the variational multiscale method
  • Buy 4 reinforce samples, get a baseline for free! 2019
  • ReloRA: High-rank training through low-rank updates
  • Decoupled Weight Decay Regularization
  • Fine-tuning language models with just forward passes
  • Optimizing neural networks with kronecker-factored approximate curvature
  • Random gradient-free minimization of convex functions
  • OpenAI blog, 1(8):9, 2019
  • Low-rank curvature for zeroth-order optimization in llm fine-tuning
  • Glue: A multi-task benchmark and analysis platform for natural language understanding
  • Superglue: A stickier benchmark for general-purpose language understanding systems
  • Natural evolution strategies
  • OPT: Open Pre-trained Transformer Language Models
  • Second-order fine-tuning without pain for llms: A hessian informed zeroth-order optimizer
  • 14 B.2 Proof of Proposition 3.2 (subgrid residual)
  • These three lines of research motivate its sampling strategy, parameter spaces, and correction mechanism
  • MeZO uses in-place parameter perturbations to achieve memory usage comparable to inference
  • This reduces the number of trainable parameters and provides the coarse coordinates used by ENGINE
  • (B.1) with $d = r$ and $\mathbf{v} = \mathbf{v}_{\mathbf{B}}$ to each row of $\mathcal{R}_{\mathbf{B}}(\mathbf{G})$ to obtain:
  • Section C.1 defines the notation and estimation setting
  • Subscripts $f$ and $c$ denote fine and coarse spaces, corresponding to full parameters and LoRA factors, respectively
  • The superscript raw denotes exact gradients before preconditioning
  • Let $\Sigma_f \in \mathbb{R}^{d_f \times d_f}$ and $\Sigma_c = \mathrm{diag}(\Sigma_B, \Sigma_A) \in \mathbb{R}^{d_c \times d_c}$ be symmetric positive-definite preconditioners and perturbation covariances
  • Therefore, we have:
  • Section C.3.3 then specializes these results to the local-linear limit
  • The former samples with covariance $I_{d_c}$ and targets $g_c^{\text{raw}}$, whereas the latter samples with covariance $\Sigma_c$ and targets $g_c = \Sigma_c g_c^{\text{raw}}$
  • All comparisons use the same direction count b and radius $\varepsilon$
  • With comparable gradient, covariance, and smoothness scales bounded independently of dimension, coarse sampling reduces these dimension factors from $d_f = mn$ to $d_c = r(m + n)$ when $d_c \ll d_f$
  • The following decomposition includes their dependence on the coarse estimate and provides the objective for choosing the mixing weight
  • For history-measurable weights, the formula applies conditional on that history
  • Setting $\lambda = 0$ gives Eq
  • To compare full-space LOREN with coarse estimators, first restrict its output to the same coordinates using $R\widehat{g}_f^{\mathrm{ani}}$
  • Bias is mean minus target
  • Here $v_B$, $v_A$, and $v_f$ denote the method's curvature vectors $\mathbf{v}_B$, $\mathbf{v}_A$, and $\mathbf{v}_f$, respectively
  • Then we have:
  • For $Z = \widetilde{\tau}_{\ell}$, its value is:
  • The coarse objective $F$ is $L_c$-smooth with $L_c > 0$ and $F(\phi) \geq F_{\mathrm{inf}}$
  • The restricted full-space target satisfies:
  • For nonnegative constants $\beta_{c}, \nu_{c}, \omega_{c}$, the coarse estimator satisfies:
  • This proves (30)
  • Set $\kappa = \min\{m_c, \kappa_\star\}$, $M = \max\{M_c, M_\star\}$, $\mathcal{A} = 2M^2 + \nu_c$ and $\mathcal{B} = 2\beta_c^2 + \omega_c$
  • The chosen step size is admissible since $T \geq 1$
  • Here T is the number of optimization steps, and S is the curvature refresh interval used in the method
  • Together they control the cross-covariance for jointly sampled estimators
  • A uniform upper bound on that sum therefore supplies $\beta_{c}^{2}$ in the corollary
  • For the exact preconditioned direction $\mathbf{g}_{c,\ell} = \Sigma_{\ell} \mathbf{G}_{\ell}$, Eq
  • Let $\mathbf{v}_{f,k}$ denote the curvature vector when the $k$-th contribution is accumulated, before its next curvature update
  • Its state is reset at each new coarse phase and retained between probes
  • The scalar-corrected step, before clipping and momentum processing, is:
  • These factors account for the $1/\rho$ in the exact residual
  • Experimental settings and hyperparameters are collected in Appendix F
  • All results use accuracy (%)
  • Figure 9 shows how the ablation results in Table 6 evolve with the forward-pass budget
  • Top row: validation accuracy
  • Validation accuracy versus forward passes for ENGINE (red), ENGINE w/o VMS-EO (grey), and LOREN (orange)
  • We follow the LOREN protocol for datasets, splits, and training
  • Baseline settings follow LOREN, and bold entries mark selected values
  • ><tr><td rowspan=
  • The index $j$ identifies one of the 16 model and task settings, and $a_j(S)$ denotes its raw validation accuracy at refresh interval $S$
  • Each entry divides the largest query count or time in its column by that method's value, assigning the least efficient method $1.0\times$
  • >Method</td><td colspan=
  • ENGINE requires access to model parameters to perturb weights and transfer states between spaces, limiting its use through prediction-only APIs