arXiv:2609.07666cs.LGSep 2026

Manuscript Offprint

arXiv:2609.07666

MpSub: A Momentum pp-Dimensional Subspace Trust-Region Method for Derivative-Free Fine-Tuning of Large Language Models

Yuyang Wang, Haoyu Yao, Pengcheng Xie

YUYANG WANG†, HAOYU YAO‡, AND PENGCHENG XIE§

Abstract. Full-parameter fine-tuning of large language models has a substantial memory cost because backpropagation requires storing activations and gradients. Zeroth-order optimization avoids that by estimating update directions from loss evaluations, but existing methods often depend on a learning rate that must be returned for each model and task. We propose the momentum pp-dimensional subspace trust-region method (MpSub). At each iteration, MpSub searches within a pp-dimensional subspace: one direction preserves the historical information carried by the most recent accepted step, while the remaining directions promote exploration through fresh random sampling. The subspace gradient is estimated by central differences, a trial step is computed from a linear trust-region model, and the trust-region radius is updated according to the agreement between predicted and observed loss reduction. The radius controls both the finite-difference perturbation and the trust-region bound on the subspace step, so no learning rate is required. In the LLM setting, all evaluations within an iteration share one minibatch, and the directions are regenerated from stored seeds and applied in place to the model weights, so training uses forward evaluations alone. For smooth deterministic objectives under Gaussian direction sampling without orthogonalization, we bound the finite-difference error, quantify the gradient captured by the random subspace, and prove that ∥∇f(xk)∥2→0\|\nabla f(\mathbf{x}_k)\|_2 \to 0 almost surely under a safeguarded radius update. Under a matched budget of 8,400 training-objective forward passes per configuration, we fine-tune OPT-125M and OPT-350M on CommitmentBank. With the same preset parameters at both model sizes, MpSub attains mean test accuracies of 0.673 and 0.690 over three seeds, while the MeZO configurations selected by development accuracy attain 0.685 at both sizes. These results show that MpSub attains accuracy comparable to tuned MeZO without a learning-rate search.

Key words. derivative-free optimization, subspace trust region, zeroth-order optimization, large language model fine-tuning

AMS subject classifications. 90C56, 65K05, 90C26

  1. Introduction. Zeroth-order (ZO) optimization has become an attractive alternative for full-parameter fine-tuning of large language models (LLMs) when backpropagation is limited by memory. Instead of storing activations for a backward pass, ZO methods estimate update directions from function evaluations. MeZO [9] applies the classical two-point random estimator [11] to language models and regenerates random perturbations from seeds rather than storing them. Later methods have modified the perturbation structure, including random low-dimensional subspaces [13] and low-rank gradient structures [4].

These methods still use a prescribed learning rate to determine the update size. Its effective value can vary substantially across settings and may require a separate search. In addition, a single random direction contains only a small amount of directional information in a very high-dimensional parameter space. For a normalized isotropic direction, the typical magnitude of its projection onto a fixed gradient decreases as the dimension grows. This motivates using more than one search direction while avoiding a proportional increase in stored parameter-sized vectors.

Trust-region methods provide a natural way to control the step size without pre-

*Preprint. †Xi'an Jiaotong University, Xi'an, China (vibrancy05@stu.xjtu.edu.cn). ‡Xi'an Jiaotong University, Xi'an, China (yaohaoyu@stu.xjtu.edu.cn). §Lawrence Berkeley National Laboratory, Berkeley, CA, USA (pxie@lbl.gov). Corresponding author.

Y. WANG, H. YAO, AND P. XIE

scribing a learning rate. In derivative-free optimization, the trust-region radius is adjusted according to the agreement between a local model and the observed objective values [1, 7, 5, 6]. Direct model construction in the full parameter space is not practical for models with hundreds of millions of variables, which motivates restricting the search to a much smaller subspace [3, 14, 15]. Randomized subspaces have also been studied in derivative-free optimization [2, 8, 10].

The closest method to the present work is 2D-MoSub [12]. It searches in a two-dimensional subspace formed by the previous accepted step and a new search direction. The previous step carries information from the optimization trajectory, while the new direction provides exploration. A quadratic interpolation model is constructed in this two-dimensional subspace and minimized within a trust region. This momentum-plus-exploration construction is also the starting point of our method. The difficulty in extending the same approach to a larger subspace lies in the quadratic model: a direct extension to dimension pp would require 12(p+1)(p+2)\frac{1}{2}(p+1)(p+2) interpolation points. At p=20p=20, this would require 231 points before a trial step is computed.

We therefore consider the LLM fine-tuning problem

(1.1)

min⁡x∈RnEξ∼D[ℓ(x;ξ)],\min_{\boldsymbol{x}\in\mathbb{R}^{n}}\mathbb{E}_{\xi\sim\mathcal{D}}\left[\ell(\boldsymbol{x};\xi)\right],

and propose MpSub, a momentum pp-dimensional subspace trust-region method. MpSub keeps the momentum-plus-exploration structure of 2D-MoSub but replaces quadratic interpolation with directional derivatives estimated by central differences. These estimates define a linear model in a pp-dimensional subspace formed by the most recent accepted displacement and p−1p-1 fresh Gaussian directions. The resulting iteration requires 2p+22p+2 function evaluations, so the evaluation cost grows linearly with the subspace dimension. For LLM fine-tuning, all evaluations within one iteration use the same minibatch, and the random directions are regenerated from seeds when needed rather than stored explicitly.

For smooth deterministic objectives, we analyze the Gaussian directions directly without assuming that they are orthogonal. We derive finite-difference error bounds, quantify the gradient information captured by the random subspace, and show that the gradient norm converges to zero almost surely under a safeguarded trust-region radius update. We then compare MpSub with MeZO on OPT-125M and OPT-350M under the same number of training-objective forward evaluations. The same trust-region settings are used for both model sizes, while the MeZO learning rate is selected separately from a grid.

  1. MpSub. We consider the unconstrained optimization problem

(2.1)

min⁡x∈Rnf(x),\min_{\boldsymbol{x}\in\mathbb{R}^{n}}f(\boldsymbol{x}),

in the regime where the parameter dimension nn is very large (e.g., n∼108n \sim 10^8 in full-parameter language model fine-tuning) and derivative information is inaccessible. In our numerical experiments (Section 4), ff represents the stochastic minibatch loss (1.1) resampled at each iteration, whereas in the theoretical analysis (Section 3), ff is treated as a deterministic, continuously differentiable objective.

At each iteration kk, MpSub maintains the parameter iterate xk∈Rn\boldsymbol{x}_k \in \mathbb{R}^n, a trust-region radius Δk∈[Δmin⁡,Δmax⁡]\Delta_k \in [\Delta_{\min}, \Delta_{\max}], and a momentum displacement mk∈Rn\boldsymbol{m}_k \in \mathbb{R}^n generated by the most recent accepted step. The radius Δk\Delta_k serves as both the finite-difference sampling scale and the trust-region bound, while mk\boldsymbol{m}_k spans the historical exploration axis of the subspace. The overall procedure is summarized in Algorithm 2.1.

Algorithm 2.1 MpSub: momentum p-dimensional subspace trust-region method

1: Input. Initial iterate x0∈Rn\boldsymbol{x}_0 \in \mathbb{R}^n, subspace dimension pp, initial radius Δ0∈[Δmin⁡,Δmax⁡]\Delta_0 \in [\Delta_{\min}, \Delta_{\max}], contraction factor γ1∈(0,1)\gamma_1 \in (0,1), expansion factor γ2>1\gamma_2 > 1, bounds 0<Δmin⁡<Δmax⁡0 < \Delta_{\min} < \Delta_{\max}, and threshold η∈(0,1)\eta \in (0,1).

2: Initialize momentum vector m0=0\boldsymbol{m}_0 = \mathbf{0}.

3: for k=0,1,2,…k = 0,1,2,\ldots do

4: Step 1: Subspace frame construction.

5: If ∥mk∥2>0\|\boldsymbol{m}_k\|_2 > 0: set d1(k)=mk/∥mk∥2d_1^{(k)} = \boldsymbol{m}_k / \|\boldsymbol{m}_k\|_2; else draw z1∼N(0,In)z_1 \sim \mathcal{N}(\mathbf{0}, \boldsymbol{I}_n) and set d1(k)=z1/nd_1^{(k)} = z_1 / \sqrt{n}.

6: For i=2,…,pi = 2, \ldots, p: draw zi∼N(0,In)z_i \sim \mathcal{N}(\mathbf{0}, \boldsymbol{I}_n) independently and set di(k)=zi/nd_i^{(k)} = z_i / \sqrt{n}.

7: Form the frame matrix Dk=[d1(k),…,dp(k)]∈Rn×pD_k = [d_1^{(k)}, \ldots, d_p^{(k)}] \in \mathbb{R}^{n \times p}.

8: Step 2: Subspace gradient estimation.

9: Evaluate f0=f(xk)f_0 = f(\boldsymbol{x}_k).

10: For i=1,…,pi = 1, \ldots, p: evaluate fi±=f(xk±Δkdi(k))f_i^\pm = f(\boldsymbol{x}_k \pm \Delta_k d_i^{(k)}) and set gk,i=(fi+−fi−)/(2Δk)g_{k,i} = (f_i^+ - f_i^-)/(2\Delta_k).

11: Assemble the subspace gradient gk=(gk,1,…,gk,p)⊤\boldsymbol{g}_k = (g_{k,1}, \ldots, g_{k,p})^\top.

12: If ∥gk∥2=0\|\boldsymbol{g}_k\|_2 = 0: set Δk+1=max⁡(γ1Δk,Δmin⁡)\Delta_{k+1} = \max(\gamma_1 \Delta_k, \Delta_{\min}), retain xk\boldsymbol{x}_k and mk\boldsymbol{m}_k, and continue.

13: Step 3: Trust-region trial step.

14: Compute ss=−Δkgk/∥gk∥2\boldsymbol{s}_s = -\Delta_k \boldsymbol{g}_k / \|\boldsymbol{g}_k\|_2 and trial iterate x+=xk+Dkss\boldsymbol{x}^+ = \boldsymbol{x}_k + D_k \boldsymbol{s}_s.

15: Evaluate f+=f(x+)f^+ = f(\boldsymbol{x}^+), predicted reduction predk=Δk∥gk∥2\text{pred}_k = \Delta_k \|\boldsymbol{g}_k\|_2, and ratio ρk=(f0−f+)/predk\rho_k = (f_0 - f^+)/\text{pred}_k.

16: Step 4a: Iterate acceptance.

17: if f+<f0f^+ < f_0 then

18: xk+1=x+\boldsymbol{x}_{k+1} = \boldsymbol{x}^+, mk+1=x+−xk\boldsymbol{m}_{k+1} = \boldsymbol{x}^+ - \boldsymbol{x}_k. (accepted)

19: else

20: xk+1=xk\boldsymbol{x}_{k+1} = \boldsymbol{x}_k, mk+1=mk\boldsymbol{m}_{k+1} = \boldsymbol{m}_k. (rejected)

21: end if

22: Step 4b: Trust-region radius adaptation.

23: if ρk≥η\rho_k \geq \eta then

24: Δk+1=min⁡(γ2Δk,Δmax⁡)\Delta_{k+1} = \min(\gamma_2 \Delta_k, \Delta_{\max}). (successful)

25: else

26: Δk+1=max⁡(γ1Δk,Δmin⁡)\Delta_{k+1} = \max(\gamma_1 \Delta_k, \Delta_{\min}). (unsuccessful)

27: end if

28: end for

2.1. Subspace construction. At iteration kk, optimization is restricted to the affine subspace xk+Sk\boldsymbol{x}_k + \mathcal{S}_k, where Sk⊂Rn\mathcal{S}_k \subset \mathbb{R}^n is spanned by pp direction vectors d1(k),…,dp(k)\boldsymbol{d}_1^{(k)}, \ldots, \boldsymbol{d}_p^{(k)}. Gathering these directions as columns of the frame matrix Dk=[d1(k),…,dp(k)]∈Rn×p\boldsymbol{D}_k = [\boldsymbol{d}_1^{(k)}, \ldots, \boldsymbol{d}_p^{(k)}] \in \mathbb{R}^{n \times p}, candidate displacements within Sk\mathcal{S}_k are parameterized by a coordinate vector ss∈Rp\boldsymbol{s}_s \in \mathbb{R}^p via

(2.2)

x(ss)=xk+Dkss=xk+∑i=1pss,idi(k).\boldsymbol{x}(\boldsymbol{s}_{s})=\boldsymbol{x}_{k}+\boldsymbol{D}_{k}\boldsymbol{s}_{s}=\boldsymbol{x}_{k}+\sum_{i=1}^{p}s_{s,i}\boldsymbol{d}_{i}^{(k)}.

The first search direction d1(k)d_{1}^{(k)} incorporates momentum from the optimization trajectory. When an accepted step is available, it is set to the normalized displacement

Y. WANG, H. YAO, AND P. XIE

(2.3)

d1(k)=mk∥mk∥2,\boldsymbol{d}_{1}^{(k)}=\frac{\boldsymbol{m}_{k}}{\|\boldsymbol{m}_{k}\|_{2}},

where mkm_{k} denotes the parameter change resulting from the most recent successful step. Because consecutive descent steps in continuous optimization often exhibit directional correlation, retaining (2.3) injects historical progress into the subspace without requiring additional function evaluations. The remaining p-1 directions are drawn independently as

(2.4)

di(k)=zin,zi∼N(0,In),i=2,…,p,\boldsymbol{d}_{i}^{(k)}=\frac{\boldsymbol{z}_{i}}{\sqrt{n}},\qquad\boldsymbol{z}_{i}\sim\mathcal{N}(\mathbf{0},\boldsymbol{I}_{n}),\quad i=2,\ldots,p,

with the same distribution supplying d1(k)\boldsymbol{d}_1^{(k)} when no accepted step is available. The factor 1/n1/\sqrt{n} normalizes the expected Euclidean norm such that E∥di(k)∥22=1\mathbb{E}\|\boldsymbol{d}_i^{(k)}\|_2^2 = 1, providing isotropic coverage of the parameter space.

A fundamental geometric property of high-dimensional Gaussian vectors is their near-orthogonality: for i≠ji \neq j,

(2.5)

E[di(k)⊤dj(k)]=0andE[(di(k)⊤dj(k))2]=1n.\mathbb{E}\big[\boldsymbol{d}_{i}^{(k)\top}\boldsymbol{d}_{j}^{(k)}\big]=0\qquad\mathrm{a n d}\qquad\mathbb{E}\big[\big(\boldsymbol{d}_{i}^{(k)\top}\boldsymbol{d}_{j}^{(k)}\big)^{2}\big]=\frac{1}{n}.

Consequently, the pairwise inner products have root-mean-square magnitude n−1/2≈10−4n^{-1/2} \approx 10^{-4} at n∼108n \sim 10^8. Because the Gaussian directions are already nearly orthogonal in high dimensions, explicit Gram-Schmidt orthogonalization is omitted, thereby avoiding substantial computation and memory overhead; the theoretical guarantees of MpSub under this unorthogonalized Gaussian frame are rigorously established in Section 3. The dimension pp controls how many directional derivatives enter the subspace model; its choice is examined empirically in Section 4.

2.2. Subspace model and trial step. For each direction di(k)\boldsymbol{d}_{i}^{(k)}, MpSub estimates the corresponding directional derivative via central differences:

(2.6)

gk,i=f(xk+Δkdi(k))−f(xk−Δkdi(k))2Δk,i=1,…,p.g_{k,i}=\frac{f(\boldsymbol{x}_{k}+\Delta_{k}\boldsymbol{d}_{i}^{(k)})-f(\boldsymbol{x}_{k}-\Delta_{k}\boldsymbol{d}_{i}^{(k)})}{2\Delta_{k}},\quad i=1,\ldots,p.

Stacking these estimates yields the subspace gradient gk=(gk,1,…,gk,p)⊤∈Rp\boldsymbol{g}_k = (g_{k,1}, \ldots, g_{k,p})^\top \in \mathbb{R}^p, where each entry gk,ig_{k,i} approximates ∇f(xk)⊤di(k)\nabla f(\boldsymbol{x}_k)^\top \boldsymbol{d}_i^{(k)}. Setting the finite-difference perturbation size equal to the trust-region radius Δk\Delta_k couples the sampling resolution directly to the radius of model validity. Under the Lipschitz continuity of ∇f\nabla f, the finite-difference error is bounded linearly by Δk\Delta_k, with explicit bounds established in Lemma 3.2.

The estimated gradient defines a local linear surrogate model on the subspace coordinates:

(2.7)

mk(ss)=f(xk)+gk⊤ss.m_{k}(\boldsymbol{s}_{s})=f(\boldsymbol{x}_{k})+\boldsymbol{g}_{k}^{\top}\boldsymbol{s}_{s}.

The trial step is determined by minimizing this linear model subject to the trust-region constraint:

(2.8)

min⁡ss∈Rpgk⊤sssubject to∥ss∥2≤Δk.\min_{\boldsymbol{s}_{s}\in\mathbb{R}^{p}}\boldsymbol{g}_{k}^{\top}\boldsymbol{s}_{s}\quad subject~to\quad\|\boldsymbol{s}_{s}\|_{2}\leq\Delta_{k}.

Whenever gk≠0g_k \neq 0, problem (2.8) admits the unique closed-form solution

(2.9)

ss=−Δkgk∥gk∥2,\boldsymbol{s}_{s}=-\Delta_{k}\frac{\boldsymbol{g}_{k}}{\|\boldsymbol{g}_{k}\|_{2}},

which corresponds to the steepest descent direction on the trust-region boundary. Mapping sss_{s} back to the ambient parameter space via (2.2) yields the candidate iterate

(2.10)

x+=xk+Dkss=xk−Δk∥gk∥2∑i=1pgk,idi(k),\boldsymbol{x}^{+}=\boldsymbol{x}_{k}+\boldsymbol{D}_{k}\boldsymbol{s}_{s}=\boldsymbol{x}_{k}-\frac{\Delta_{k}}{\|\boldsymbol{g}_{k}\|_{2}}\sum_{i=1}^{p}g_{k,i}\boldsymbol{d}_{i}^{(k)},

with the predicted objective reduction given by

(2.11)

predk=mk(0)−mk(ss)=−gk⊤ss=Δk∥gk∥2>0.\mathrm{p r e d}_{k}=m_{k}(\mathbf{0})-m_{k}(\boldsymbol{s}_{s})=-\boldsymbol{g}_{k}^{\top}\boldsymbol{s}_{s}=\Delta_{k}\|\boldsymbol{g}_{k}\|_{2}>0.

If gk=0\boldsymbol{g}_k = \mathbf{0}, the estimated gradient vanishes across the subspace; in this event, the method contracts the trust-region radius, sets xk+1=xk\boldsymbol{x}_{k+1} = \boldsymbol{x}_k and mk+1=mk\boldsymbol{m}_{k+1} = \boldsymbol{m}_k, and proceeds to the next iteration without evaluating an additional trial point.

2.3. Acceptance and radius update. Upon evaluating the candidate loss f+=f(x+)f^{+} = f(\boldsymbol{x}^{+}), MpSub assesses the agreement between the surrogate model and the objective through the ratio

(2.12)

ρk=f(xk)−f(x+)Δk∥gk∥2.\rho_{k}=\frac{f(\boldsymbol{x}_{k})-f(\boldsymbol{x}^{+})}{\Delta_{k}\|\boldsymbol{g}_{k}\|_{2}}.

The algorithm decouples iterate acceptance (Step 4a) from trust-region radius adaptation (Step 4b). The candidate point is accepted whenever it yields a strict objective decrease:

(2.13)

xk+1={x+,iff(x+)<f(xk),xk,otherwise,mk+1={x+−xk,iff(x+)<f(xk),mk,otherwise,\boldsymbol{x}_{k+1}=\begin{cases}\boldsymbol{x}^{+},&if f(\boldsymbol{x}^{+})<f(\boldsymbol{x}_{k}),\\\boldsymbol{x}_{k},&otherwise,\end{cases}\qquad\boldsymbol{m}_{k+1}=\begin{cases}\boldsymbol{x}^{+}-\boldsymbol{x}_{k},&if f(\boldsymbol{x}^{+})<f(\boldsymbol{x}_{k}),\\\boldsymbol{m}_{k},&otherwise,\end{cases}

while the trust-region radius is updated according to the ratio test:

(2.14)

Δk+1={min⁡{γ2Δk,Δmax⁡},ifρk≥η,max⁡{γ1Δk,Δmin⁡},ifρk<η.\Delta_{k+1}=\begin{cases}\min\{\gamma_{2}\Delta_{k},\Delta_{\max}\},&if\rho_{k}\geq\eta,\\\max\{\gamma_{1}\Delta_{k},\Delta_{\min}\},&if\rho_{k}<\eta.\end{cases}

Unlike classical trust-region methods [5] that accept trial points only when ρk≥η\rho_k \geq \eta, the rules (2.13)–(2.14) separate acceptance from radius adjustment. In zeroth-order settings where forward passes dominate execution time, enforcing ρk≥η\rho_k \geq \eta for step acceptance would discard trial points that achieve objective reduction whenever 0<f(xk)−f(x+)<η0 < f(\boldsymbol{x}_k) - f(\boldsymbol{x}^+) < \eta pred k_k. Under (2.13), every candidate yielding a strictly lower observed loss is retained. Concurrently, the ratio ρk\rho_k regulates the exploration scale: the trust region expands when the linear surrogate reliably predicts the objective reduction ( ρk≥η\rho_k \geq \eta), and contracts when nonlinearities or estimation errors dominate ( ρk<η\rho_k < \eta).

2.4. Algorithmic realization for LLM fine-tuning. While Algorithm 2.1 is stated for a generic objective ff, adapting MpSub to full-parameter fine-tuning of large language models presents two critical computational challenges: (i) the training objective is evaluated over stochastic minibatches, and (ii) storing an explicit search frame Dk∈Rn×pD_k \in \mathbb{R}^{n \times p} in an ambient dimension of n∼108n \sim 10^8 creates prohibitive GPU memory overhead. We resolve these challenges through shared-minibatch evaluations and seed-regenerated in-place parameter perturbations.

Y. WANG, H. YAO, AND P. XIE

2.4.1. Consistent minibatch evaluation. In stochastic language model fine-tuning, the objective available at training step kk is defined by a sampled minibatch Bk⊂D\mathcal{B}_k \subset \mathcal{D}:

(2.15)

fk(x)=1∣Bk∣∑ξ∈Bkℓ(x;ξ).f_{k}(\boldsymbol{x})=\frac{1}{|\mathcal{B}_{k}|}\sum_{\xi\in\mathcal{B}_{k}}\ell(\boldsymbol{x};\xi).

A key algorithmic requirement of trust-region methods is that model-objective agreement measures local landscape geometry rather than data sampling discrepancy. Accordingly, in our implementation, the minibatch Bk\mathcal{B}_k is held fixed throughout iteration kk. The baseline loss fk(xk)f_k(\boldsymbol{x}_k), the 2p2p central-difference evaluations fk(xk±Δkdi(k))f_k(\boldsymbol{x}_k \pm \Delta_k \boldsymbol{d}_i^{(k)}), and the trial evaluation fk(x+)f_k(\boldsymbol{x}^+) are all computed on the exact same minibatch Bk\mathcal{B}_k. Holding Bk\mathcal{B}_k constant ensures that the estimated subspace gradient gk\boldsymbol{g}_k and the agreement ratio

(2.16)

ρk=fk(xk)−fk(x+)Δk∥gk∥2\rho_{k}=\frac{f_{k}(\boldsymbol{x}_{k})-f_{k}(\boldsymbol{x}^{+})}{\Delta_{k}\|\boldsymbol{g}_{k}\|_{2}}

evaluate variations of a consistent slice of the loss landscape, preventing false rejections or erratic radius oscillations induced by stochastic batch variance.

Across iterations, a fresh minibatch Bk+1\mathcal{B}_{k+1} is drawn from the data loader. The trust-region radius Δk\Delta_k and the accepted parameter displacement mkm_k persist across minibatch boundaries, transferring optimization momentum and step-size calibration smoothly throughout training. Each iteration expends 2p+22p + 2 forward passes on the training objective (42 passes when p=20p = 20).

2.4.2. In-place perturbations and seed regeneration. Storing the frame matrix Dk∈Rn×p\boldsymbol{D}_k \in \mathbb{R}^{n \times p} explicitly would require pnpn floating-point numbers. For an LLM such as OPT-125M ( n≈1.25×108n \approx 1.25 \times 10^8) with p=20p = 20 in FP32, this would consume approximately 10 GB of GPU memory—exceeding the entire parameter storage of the model itself.

To eliminate this memory overhead, MpSub never materializes the matrix DkD_k in memory. Instead, each exploratory direction di(k)\boldsymbol{d}_i^{(k)} ( i=2,…,pi = 2, \ldots, p) is tied to a deterministic integer seed derived synchronously from the global training seed, the iteration index kk, and the direction index ii:

(2.17)

seed(k,i)=(base_seed×C1+k×C2+i×C3) mod M,seed(k,i)=(base\_seed\times C_{1}+k\times C_{2}+i\times C_{3})\bmod M,

where C1,C2,C3C_{1}, C_{2}, C_{3} and M are fixed prime constants.

During the subspace gradient estimation phase, direction di(k)\boldsymbol{d}_i^{(k)} is synthesized tensor by tensor directly on the accelerator using a pseudorandom generator initialized with seed (k,i)(k,i). The parameter tensor is perturbed in place by +Δkdi(k)+\Delta_k \boldsymbol{d}_i^{(k)} to evaluate fk(xk+Δkdi(k))f_k(\boldsymbol{x}_k + \Delta_k \boldsymbol{d}_i^{(k)}), then adjusted by −2Δkdi(k)-2\Delta_k \boldsymbol{d}_i^{(k)} to evaluate fk(xk−Δkdi(k))f_k(\boldsymbol{x}_k - \Delta_k \boldsymbol{d}_i^{(k)}), and finally restored by adding back +Δkdi(k)+\Delta_k \boldsymbol{d}_i^{(k)}. Because the pseudorandom generator reproduces the identical sequence upon reseeding, each direction is reconstructed exactly at zero memory cost.

Once the subspace gradient gk\boldsymbol{g}_k and the coordinate step ss=−Δkgk/∥gk∥2\boldsymbol{s}_s = -\Delta_k \boldsymbol{g}_k / \|\boldsymbol{g}_k\|_2 are computed, the directions are regenerated a final time and combined in place to form the trial displacement

(2.18)

uk=∑i=1pss,idi(k).\boldsymbol{u}_{k}=\sum_{i=1}^{p}s_{s,i}\boldsymbol{d}_{i}^{(k)}.

The displacement uk\boldsymbol{u}_k is accumulated in an auxiliary buffer of dimension nn while advancing the model weights to x+=xk+uk\boldsymbol{x}^+ = \boldsymbol{x}_k + \boldsymbol{u}_k. If the trial step is accepted, uk\boldsymbol{u}_k is preserved as the new momentum displacement mk+1\boldsymbol{m}_{k+1}; if rejected, subtracting uk\boldsymbol{u}_k immediately restores the base weights xk\boldsymbol{x}_k.

Consequently, training is executed exclusively through forward inference passes. Auxiliary storage is strictly confined to the momentum vector mk\boldsymbol{m}_{k} and a single trial step accumulator, both of size n, keeping the training memory footprint at the inference level and completely independent of the subspace dimension p.

  1. Theoretical Analysis. We analyze MpSub for a deterministic objective under the Gaussian direction sampling used in Algorithm 2.1. No orthogonality between the search directions is assumed. The analysis first gives error and descent bounds for a general frame DkD_{k}, and then uses the distribution of the Gaussian directions to obtain a global first-order convergence result.

Throughout this section, we set Δmin⁡=0\Delta_{\min} = 0 for the asymptotic analysis. We also use the following safeguarded radius update with a fixed constant κ>0\kappa > 0:

(3.1)

Δk+1={min⁡{γ2Δk,Δmax⁡},ifρk≥ηand∥gk∥2≥κΔk,γ1Δk,otherwise.\Delta_{k+1}=\begin{cases}\min\{\gamma_{2}\Delta_{k},\Delta_{\max}\},&if\rho_{k}\geq\eta and\|g_{k}\|_{2}\geq\kappa\Delta_{k},\\\gamma_{1}\Delta_{k},&otherwise.\end{cases}

The acceptance rule is unchanged: a trial point is accepted whenever it gives a strict decrease in f.

ASSUMPTION 3.1. The objective function f:Rn→Rf : \mathbb{R}^n \to \mathbb{R} is continuously differentiable and bounded below. Its gradient is Lipschitz continuous with constant L>0L > 0:

(3.2)

∥∇f(x)−∇f(y)∥2≤L∥x−y∥2,∀x,y∈Rn.\|\nabla f(\boldsymbol{x})-\nabla f(\boldsymbol{y})\|_{2}\leq L\|\boldsymbol{x}-\boldsymbol{y}\|_{2},\qquad\forall\boldsymbol{x},\boldsymbol{y}\in\mathbb{R}^{n}.

Let Dk=[d1(k),…,dp(k)]∈Rn×p\boldsymbol{D}_k = [\boldsymbol{d}_1^{(k)}, \ldots, \boldsymbol{d}_p^{(k)}] \in \mathbb{R}^{n \times p} be the frame generated at iteration kk, and define the exact directional derivatives

g^k,i:=∇f(xk)⊤di(k),g^k:=Dk⊤∇f(xk).\hat{g}_{k,i}:=\nabla f(\boldsymbol{x}_{k})^{\top}\boldsymbol{d}_{i}^{(k)},\qquad\hat{g}_{k}:=\boldsymbol{D}_{k}^{\top}\nabla f(\boldsymbol{x}_{k}).

The finite-difference estimates are denoted by

gk=(gk,1,…,gk,p)⊤,gk,i=f(xk+Δkdi(k))−f(xk−Δkdi(k))2Δk.\boldsymbol{g}_{k}=(g_{k,1},\ldots,g_{k,p})^{\top},\qquad g_{k,i}=\frac{f(\boldsymbol{x}_{k}+\Delta_{k}\boldsymbol{d}_{i}^{(k)})-f(\boldsymbol{x}_{k}-\Delta_{k}\boldsymbol{d}_{i}^{(k)})}{2\Delta_{k}}.

3.1. Finite differences and random subspaces. We first bound the finite-difference error without assuming that the directions have unit norm.

LEMMA 3.2 (Finite-difference error). Suppose Assumption 3.1 holds. Then

(3.3)

∣gk,i−g^k,i∣≤LΔk2∥di(k)∥22,i=1,…,p.|g_{k,i}-\hat{g}_{k,i}|\leq\frac{L\Delta_{k}}{2}\|\boldsymbol{d}_{i}^{(k)}\|_{2}^{2},\qquad i=1,\ldots,p.

Consequently,

(3.4)

∥gk−g^k∥2≤LΔk2Qk,Qk:=(∑i=1p∥di(k)∥24)1/2.\|\boldsymbol{g}_{k}-\hat{\boldsymbol{g}}_{k}\|_{2}\leq\frac{L\Delta_{k}}{2}Q_{k},\qquad Q_{k}:=\left(\sum_{i=1}^{p}\|\boldsymbol{d}_{i}^{(k)}\|_{2}^{4}\right)^{1/2}.

Y. WANG, H. YAO, AND P. XIE

Proof. For any direction d and t > 0, Lipschitz continuity of the gradient gives

∣f(xk+td)−f(xk)−t∇f(xk)⊤d∣≤L2t2∥d∥22.\big|f(\boldsymbol{x}_{k}+t\boldsymbol{d})-f(\boldsymbol{x}_{k})-t\nabla f(\boldsymbol{x}_{k})^{\top}\boldsymbol{d}\big|\leq\frac{L}{2}t^{2}\|\boldsymbol{d}\|_{2}^{2}.

Applying this bound to t=Δkt = \Delta_k in the directions di(k)\boldsymbol{d}_i^{(k)} and −di(k)-\boldsymbol{d}_i^{(k)}, write

f(xk+Δkdi(k))=f(xk)+Δkg^k,i+Ri,+,f(\boldsymbol{x}_{k}+\Delta_{k}\boldsymbol{d}_{i}^{(k)})=f(\boldsymbol{x}_{k})+\Delta_{k}\hat{g}_{k,i}+R_{i,+},

and

f(xk−Δkdi(k))=f(xk)−Δkg^k,i+Ri,−,f(\boldsymbol{x}_{k}-\Delta_{k}\boldsymbol{d}_{i}^{(k)})=f(\boldsymbol{x}_{k})-\Delta_{k}\hat{g}_{k,i}+R_{i,-},

where ∣Ri,±∣≤LΔk22∥di(k)∥22|R_{i,\pm}| \leq \frac{L\Delta_k^2}{2} \|d_i^{(k)}\|_2^2. Subtracting the two expressions gives

gk,i−g^k,i=Ri,+−Ri,−2Δk,g_{k,i}-\hat{g}_{k,i}=\frac{R_{i,+}-R_{i,-}}{2\Delta_{k}},

which proves (3.3). Summing the squared componentwise bounds gives (3.4).

If the Hessian is Lipschitz continuous with constant M, the same central-difference argument gives the sharper bound

∣gk,i−g^k,i∣≤MΔk26∥di(k)∥23.|g_{k,i}-\hat{g}_{k,i}|\leq\frac{M\Delta_{k}^{2}}{6}\|\boldsymbol{d}_{i}^{(k)}\|_{2}^{3}.

This stronger estimate is not needed below.

We next use the actual Gaussian sampling in Algorithm 2.1. Let Fk\mathcal{F}_k contain the algorithmic history before the fresh exploratory directions at iteration kk are sampled. Conditionally on Fk\mathcal{F}_k,

di(k)=zin,zi∼N(0,In),i=2,…,p,\boldsymbol{d}_{i}^{(k)}=\frac{\boldsymbol{z}_{i}}{\sqrt{n}},\qquad\boldsymbol{z}_{i}\sim\mathcal{N}(\mathbf{0},\boldsymbol{I}_{n}),\qquad i=2,\ldots,p,

independently.

LEMMA 3.3 (Gaussian gradient capture). Let vk=∇f(xk)\boldsymbol{v}_k = \nabla f(\boldsymbol{x}_k). Conditionally on Fk\mathcal{F}_k,

(3.5)

∑i=2p(vk⊤di(k))2=d∥vk∥22nχp−12.\sum_{i=2}^{p}\left(\boldsymbol{v}_{k}^{\top}\boldsymbol{d}_{i}^{(k)}\right)^{2}\stackrel{d}{=}\frac{\|\boldsymbol{v}_{k}\|_{2}^{2}}{n}\chi_{p-1}^{2}.

In particular,

(3.6)

E[∑i=2p(vk⊤di(k))2∣Fk]=p−1n∥vk∥22.\mathbb{E}\left[\sum_{i=2}^{p}\left(\boldsymbol{v}_{k}^{\top}\boldsymbol{d}_{i}^{(k)}\right)^{2}\Bigg|\mathcal{F}_{k}\right]=\frac{p-1}{n}\|\boldsymbol{v}_{k}\|_{2}^{2}.

Moreover, for every q∈(0,1)q \in (0,1), there exist constants α>0\alpha > 0 and R>1R > 1, independent of kk, such that whenever vk≠0\boldsymbol{v}_k \neq \mathbf{0},

(3.7)

P(∥g^k∥2≥α∥vk∥2,max⁡1≤t≤p∥di(k)∥2≤R∣Fk)≥q.\mathbb{P}\left(\|\hat{g}_{k}\|_{2}\geq\alpha\|\boldsymbol{v}_{k}\|_{2},\quad\max_{1\leq t\leq p}\|\boldsymbol{d}_{i}^{(k)}\|_{2}\leq R\Bigg|\mathcal{F}_{k}\right)\geq q.

Proof. For every i=2,…,pi = 2, \ldots, p,

vk⊤di(k)=vk⊤zin∼N(0,∥vk∥22n),\boldsymbol{v}_{k}^{\top}\boldsymbol{d}_{i}^{(k)}=\frac{\boldsymbol{v}_{k}^{\top}\boldsymbol{z}_{i}}{\sqrt{n}}\sim\mathcal{N}\left(0,\frac{\|\boldsymbol{v}_{k}\|_{2}^{2}}{n}\right),

and these random variables are conditionally independent. Equation (3.5) follows immediately, and taking expectations gives (3.6).

To prove (3.7), fix q<1q < 1. Since a χp−12\chi_{p-1}^2 random variable is positive almost surely, we can choose τ>0\tau > 0 sufficiently small that P(χp−12≥τ)\mathbb{P}(\chi_{p-1}^2 \geq \tau) is arbitrarily close to one. Setting α=τ/n\alpha = \sqrt{\tau/n}, equation (3.5) implies

(∑i=2p(vk⊤di(k))2)1/2≥α∥vk∥2\left(\sum_{i=2}^{p}(\boldsymbol{v}_{k}^{\top}\boldsymbol{d}_{i}^{(k)})^{2}\right)^{1/2}\geq\alpha\|\boldsymbol{v}_{k}\|_{2}

with probability arbitrarily close to one.

The Gaussian norms ∥zi∥2/n\|z_i\|_2/\sqrt{n} are finite almost surely, so RR can also be chosen sufficiently large that all newly sampled directions have norm at most RR with probability arbitrarily close to one. The momentum direction, when present, has norm one. A union bound then gives (3.7).

The next result gives the decrease produced by the trial step for a general, possibly nonorthogonal frame.

PROPOSITION 3.4 (Decrease for a general frame). Suppose Assumption 3.1 holds and gk≠0\boldsymbol{g}_k \neq \mathbf{0}. Let

sk=−Δkgk∥gk∥2,xk+=xk+Dksk,\boldsymbol{s}_{k}=-\Delta_{k}\frac{\boldsymbol{g}_{k}}{\|\boldsymbol{g}_{k}\|_{2}},\qquad\boldsymbol{x}_{k}^{+}=\boldsymbol{x}_{k}+\boldsymbol{D}_{k}\boldsymbol{s}_{k},

and define βk:=∥Dk∥2\beta_k := \|D_k\|_2. Then

(3.8)

f(xk)−f(xk+)≥Δk∥gk∥2−LΔk22(Qk+βk2).f(\boldsymbol{x}_{k})-f(\boldsymbol{x}_{k}^{+})\geq\Delta_{k}\|\boldsymbol{g}_{k}\|_{2}-\frac{L\Delta_{k}^{2}}{2}(Q_{k}+\beta_{k}^{2}).

Consequently,

(3.9)

ρk≥1−LΔk(Qk+βk2)2∥gk∥2.\rho_{k}\geq1-\frac{L\Delta_{k}(Q_{k}+\beta_{k}^{2})}{2\|\boldsymbol{g}_{k}\|_{2}}.

Proof. Let hk=Dksk\boldsymbol{h}_k = \boldsymbol{D}_k \boldsymbol{s}_k. Since g^k=Dk⊤∇f(xk)\hat{\boldsymbol{g}}_k = \boldsymbol{D}_k^\top \nabla f(\boldsymbol{x}_k), we have ∇f(xk)⊤hk=g^k⊤sk\nabla f(\boldsymbol{x}_k)^\top \boldsymbol{h}_k = \hat{\boldsymbol{g}}_k^\top \boldsymbol{s}_k. Using gk⊤sk=−Δk∥gk∥2\boldsymbol{g}_k^\top \boldsymbol{s}_k = -\Delta_k \|\boldsymbol{g}_k\|_2 and Lemma 3.2,

∇f(xk)⊤hk=gk⊤sk+(g^k−gk)⊤sk≤−Δk∥gk∥2+∥g^k−gk∥2∥sk∥2≤−Δk∥gk∥2+LQk2Δk2.\begin{align*}\nabla f(\boldsymbol{x}_{k})^{\top}\boldsymbol{h}_{k}&=\boldsymbol{g}_{k}^{\top}\boldsymbol{s}_{k}+(\hat{\boldsymbol{g}}_{k}-\boldsymbol{g}_{k})^{\top}\boldsymbol{s}_{k}\\&\leq-\Delta_{k}\|\boldsymbol{g}_{k}\|_{2}+\|\hat{\boldsymbol{g}}_{k}-\boldsymbol{g}_{k}\|_{2}\|\boldsymbol{s}_{k}\|_{2}\\&\leq-\Delta_{k}\|\boldsymbol{g}_{k}\|_{2}+\frac{L Q_{k}}{2}\Delta_{k}^{2}.\end{align*}

Also, ∥hk∥2≤∥Dk∥2∥sk∥2=βkΔk\|\boldsymbol{h}_k\|_2 \leq \|\boldsymbol{D}_k\|_2 \|\boldsymbol{s}_k\|_2 = \beta_k \Delta_k. The descent lemma therefore gives

f(xk+)≤f(xk)+∇f(xk)⊤hk+L2∥hk∥22≤f(xk)−Δk∥gk∥2+LΔk22(Qk+βk2),\begin{align*}f(\boldsymbol{x}_{k}^{+})&\leq f(\boldsymbol{x}_{k})+\nabla f(\boldsymbol{x}_{k})^{\top}\boldsymbol{h}_{k}+\frac{L}{2}\|\boldsymbol{h}_{k}\|_{2}^{2}\\&\leq f(\boldsymbol{x}_{k})-\Delta_{k}\|\boldsymbol{g}_{k}\|_{2}+\frac{L\Delta_{k}^{2}}{2}(Q_{k}+\beta_{k}^{2}),\end{align*}

which proves (3.8). Dividing by the predicted reduction Δk∥gk∥2\Delta_k\|g_k\|_2 gives (3.9).

Y. WANG, H. YAO, AND P. XIE

3.2. Global convergence. We first establish a summability property of the trust-region radius. Let

(3.10)

S:={k:ρk≥η and ∥gk∥2≥κΔk}\mathcal{S}:=\{k:\rho_{k}\geq\eta\mathrm{~a n d~}\|\boldsymbol{g}_{k}\|_{2}\geq\kappa\Delta_{k}\}

denote the set of iterations at which the trust-region radius is expanded.

LEMMA 3.5 (Summability of the trust-region radii). Suppose Assumption 3.1 holds, Δmin⁡=0\Delta_{\min}=0, and the radius is updated according to (3.1). Then

(3.11)

∑k=0∞Δk2<∞.\sum_{k=0}^{\infty}\Delta_{k}^{2}<\infty.

In particular,

(3.12)

lim⁡k→∞Δk=0.\lim_{k\to\infty}\Delta_{k}=0.

Proof. For any k∈Sk \in \mathcal{S}, the definition of ρk\rho_k and (3.10) give

f(xk)−f(xk+)=ρkΔk∥gk∥2≥ηκΔk2.f(\boldsymbol{x}_{k})-f(\boldsymbol{x}_{k}^{+})=\rho_{k}\Delta_{k}\|\boldsymbol{g}_{k}\|_{2}\geq\eta\kappa\Delta_{k}^{2}.

Since the right-hand side is strictly positive, the trial point is accepted. Because ff is bounded below by a finite constant flowf_{\mathrm{low}}, summing over all successful expansion steps yields

∑k∈SΔk2≤f(x0)−flowηκ<∞.\sum_{k\in\mathcal{S}}\Delta_{k}^{2}\leq\frac{f(\boldsymbol{x}_{0})-f_{\mathrm{low}}}{\eta\kappa}<\infty.

For every iteration k, the update rule (3.1) implies

Δk+12≤γ12Δk2+γ22Δk21{k∈S}.\Delta_{k+1}^{2}\leq\gamma_{1}^{2}\Delta_{k}^{2}+\gamma_{2}^{2}\Delta_{k}^{2}\mathbf{1}_{\{k\in\mathcal{S}\}}.

Summing this inequality from k = 0 to N yields

(1−γ12)∑k=1NΔk2+ΔN+12≤γ12Δ02+γ22∑k∈SΔk2.(1-\gamma_{1}^{2})\sum_{k=1}^{N}\Delta_{k}^{2}+\Delta_{N+1}^{2}\leq\gamma_{1}^{2}\Delta_{0}^{2}+\gamma_{2}^{2}\sum_{k\in\mathcal{S}}\Delta_{k}^{2}.

Because γ1∈(0,1)\gamma_1 \in (0,1), we have 1−γ12>01 - \gamma_1^2 > 0. Taking N→∞N \to \infty establishes (3.11), which directly implies lim⁡k→∞Δk=0\lim_{k \to \infty} \Delta_k = 0.

We next establish that the full gradient cannot remain bounded away from zero along any infinite subsequence.

THEOREM 3.6 (Subsequential convergence). Suppose Assumption 3.1 holds and p≥2p \geq 2. Let the exploratory directions be sampled independently as

di(k)=zin,zi∼N(0,In),i=2,…,p.d_{i}^{(k)}=\frac{z_{i}}{\sqrt{n}},\qquad z_{i}\sim\mathcal{N}(\mathbf{0},\mathbf{I}_{n}),\qquad i=2,\ldots,p.

Then

(3.13)

lim inf⁡k→∞∥∇f(xk)∥2=0almost surely.\liminf_{k\to\infty}\|\nabla f(\boldsymbol{x}_{k})\|_{2}=0\qquad almost~surely.

Proof. Suppose, to the contrary, that there exist ε>0\varepsilon > 0 and an index K0K_{0} such that

(3.14)

∥∇f(xk)∥2≥ε,∀k≥K0.\|\nabla f(\boldsymbol{x}_{k})\|_{2}\geq\varepsilon,\qquad\forall k\geq K_{0}.

Choose a probability threshold

(3.15)

q>max⁡{12,log⁡(1/γ1)log⁡(γ2/γ1)}.q>\max\left\{\frac{1}{2},\frac{\log(1/\gamma_{1})}{\log(\gamma_{2}/\gamma_{1})}\right\}.

By Lemma 3.3, there exist constants α>0\alpha > 0 and R > 1 such that the event

Gk:={∥g^k∥2≥α∥∇f(xk)∥2,max⁡1≤i≤p∥di(k)∥2≤R}G_{k}:=\left\{\|\hat{\boldsymbol{g}}_{k}\|_{2}\geq\alpha\|\nabla f(\boldsymbol{x}_{k})\|_{2},\quad\max_{1\leq i\leq p}\|\boldsymbol{d}_{i}^{(k)}\|_{2}\leq R\right\}

satisfies P(Gk∣Fk)≥q\mathbb{P}(G_k \mid \mathcal{F}_k) \geq q. On GkG_k, we have Qk≤pR2Q_k \leq \sqrt{p} R^2 and ∥Dk∥22≤pR2\|\mathcal{D}_k\|_2^2 \leq p R^2. Applying Lemma 3.2 under (3.14) gives

∥gk∥2≥∥g^k∥2−∥gk−g^k∥2≥αε−LpR22Δk.\|\boldsymbol{g}_{k}\|_{2}\geq\|\hat{\boldsymbol{g}}_{k}\|_{2}-\|\boldsymbol{g}_{k}-\hat{\boldsymbol{g}}_{k}\|_{2}\geq\alpha\varepsilon-\frac{L\sqrt{p}R^{2}}{2}\Delta_{k}.

Since Δk→0\Delta_k \to 0 by Lemma 3.5, for all sufficiently large kk we have

(3.16)

∥gk∥2≥αε2.\|g_{k}\|_{2}\geq\frac{\alpha\varepsilon}{2}.

Proposition 3.4 then ensures that, on GkG_{k} and for all sufficiently large k,

ρk≥ηand∥gk∥2≥κΔk.\rho_{k}\geq\eta\qquad\mathrm{a n d}\qquad\|\boldsymbol{g}_{k}\|_{2}\geq\kappa\Delta_{k}.

Consequently, every occurrence of GkG_k for sufficiently large kk produces Δk+1=γ2Δk\Delta_{k+1} = \gamma_2 \Delta_k, while on the remaining iterations Δk+1≥γ1Δk\Delta_{k+1} \geq \gamma_1 \Delta_k.

Let Ik:=1GkI_k := \mathbf{1}_{G_k}. For all sufficiently large kk,

(3.17)

log⁡Δk+1−log⁡Δk≥Iklog⁡γ2+(1−Ik)log⁡γ1.\log\Delta_{k+1}-\log\Delta_{k}\geq I_{k}\log\gamma_{2}+(1-I_{k})\log\gamma_{1}.

Since E[Ik∣Fk]≥q\mathbb{E}[I_k \mid \mathcal{F}_k] \geq q, the strong law of large numbers for bounded martingale differences implies

lim inf⁡N→∞1N∑k=KK+N−1Ik≥qalmost surely.\liminf_{N\to\infty}\frac{1}{N}\sum_{k=K}^{K+N-1}I_{k}\geq q\qquad almost~surely.

Averaging (3.17) over N steps therefore yields

lim inf⁡N→∞log⁡ΔK+N−log⁡ΔKN≥qlog⁡γ2+(1−q)log⁡γ1>0almost surely,\liminf_{N\to\infty}\frac{\log\Delta_{K+N}-\log\Delta_{K}}{N}\geq q\log\gamma_{2}+(1-q)\log\gamma_{1}>0\qquad almost~surely,

where the strict inequality follows from (3.15). This implies Δk→∞\Delta_k \to \infty, contradicting Δk→0\Delta_k \to 0 from Lemma 3.5. Thus (3.14) cannot hold, establishing (3.13).

To strengthen the convergence guarantee from subsequential convergence to the convergence of the full gradient sequence, fix any ε>0\varepsilon > 0 and define the index set of large gradients:

(3.18)

Kε:={k:∥∇f(xk)∥2>ε}.\mathcal{K}_{\varepsilon}:=\left\{k:\|\nabla f(\boldsymbol{x}_{k})\|_{2}>\varepsilon\right\}.

Y. WANG, H. YAO, AND P. XIE

LEMMA 3.7. Under the assumptions of Theorem 3.6, for every ε>0\varepsilon > 0,

(3.19)

∑k∈KεΔk<∞almost surely.\sum_{k\in\mathcal{K}_{\varepsilon}}\Delta_{k}<\infty\qquad\mathrm{a l m o s t~s u r e l y}.

Proof. Choose the good-frame event GkG_k as in the proof of Theorem 3.6 with conditional probability q>1/2q > 1/2. Because Δk→0\Delta_k \to 0, whenever k∈Kε∩Gkk \in \mathcal{K}_\varepsilon \cap G_k and kk is sufficiently large, we have ∥gk∥2≥αε2\|\boldsymbol{g}_k\|_2 \geq \frac{\alpha \varepsilon}{2} and ρk≥η\rho_k \geq \eta. Consequently,

f(xk)−f(xk+1)≥ηαε2Δk.f(\boldsymbol{x}_{k})-f(\boldsymbol{x}_{k+1})\geq\frac{\eta\alpha\varepsilon}{2}\Delta_{k}.

Because f is bounded below, summing this decrease over all such iterations gives

∑k∈Kε∩GkΔk<∞.\sum_{k\in\mathcal{K}_{\varepsilon}\cap G_{k}}\Delta_{k}<\infty.

Since the conditioning events GkG_k satisfy P(Gk∣Fk)≥q>1/2\mathbb{P}(G_k \mid \mathcal{F}_k) \geq q > 1/2 uniformly, applying the standard renewal property for probabilistically accurate models along the index subsequence Kε\mathcal{K}_\varepsilon implies that the sum over the entire set Kε\mathcal{K}_\varepsilon is finite:

∑k∈KεΔk<∞almost surely.\sum_{k\in\mathcal{K}_{\varepsilon}}\Delta_{k}<\infty\qquad\mathrm{a l m o s t~s u r e l y}.

Let βk:=∥Dk∥2\beta_k := \|\boldsymbol{D}_k\|_2. For the Gaussian frame construction in Algorithm 2.1, the spectral norm satisfies

sup⁡kE[βk∣Fk]<∞andsup⁡kE[βk2∣Fk]<∞.\operatorname*{s u p}_{k}\mathbb{E}[\beta_{k}\mid\mathcal{F}_{k}]<\infty\qquad\mathrm{a n d}\qquad\operatorname*{s u p}_{k}\mathbb{E}[\beta_{k}^{2}\mid\mathcal{F}_{k}]<\infty.

Together with Lemmas 3.5 and 3.7, these moment bounds imply

(3.20)

lim⁡k→∞βkΔk=0almost surely,\lim_{k\to\infty}\beta_{k}\Delta_{k}=0\qquad\mathrm{a l m o s t~s u r e l y},

and, for every ε>0\varepsilon > 0,

(3.21)

∑k∈KεβkΔk<∞almost surely.\sum_{k\in\mathcal{K}_{\varepsilon}}\beta_{k}\Delta_{k}<\infty\qquad\mathrm{a l m o s t~s u r e l y}.

THEOREM 3.8 (Global convergence). Under the assumptions of Theorem 3.6,

(3.22)

lim⁡k→∞∥∇f(xk)∥2=0almost surely.\lim_{k\to\infty}\|\nabla f(\boldsymbol{x}_{k})\|_{2}=0\qquad\mathrm{a l m o s t~s u r e l y}.

Proof. Suppose, for contradiction, that (3.22) does not hold. In view of Theorem 3.6, there then exists ε>0\varepsilon > 0 and infinitely many disjoint pairs of indices aj<bja_j < b_j such that

∥∇f(xaj)∥2≤ε,∥∇f(xbj)∥2>2ε,\|\nabla f(\boldsymbol{x}_{a_{j}})\|_{2}\leq\varepsilon,\qquad\|\nabla f(\boldsymbol{x}_{b_{j}})\|_{2}>2\varepsilon,

while

∥∇f(xk)∥2>ε,∀aj<k<bj.\|\nabla f(\boldsymbol{x}_{k})\|_{2}>\varepsilon,\qquad\forall a_{j}<k<b_{j}.

By the Lipschitz continuity of the gradient (Assumption 3.1),

ε<∥∇f(xbj)∥2−∥∇f(xaj)∥2≤L∑k=ajbj−1∥xk+1−xk∥2.\varepsilon<\|\nabla f(\boldsymbol{x}_{b_{j}})\|_{2}-\|\nabla f(\boldsymbol{x}_{a_{j}})\|_{2}\leq L\sum_{k=a_{j}}^{b_{j}-1}\|\boldsymbol{x}_{k+1}-\boldsymbol{x}_{k}\|_{2}.

Since ∥xk+1−xk∥2≤∥Dkss∥2≤βkΔk\|\boldsymbol{x}_{k+1} - \boldsymbol{x}_k\|_2 \leq \|\boldsymbol{D}_k \boldsymbol{s}_s\|_2 \leq \beta_k \Delta_k, we can partition the summation as

∑k=ajbj−1∥xk+1−xk∥2≤βajΔaj+∑k=aj+1bj−1βkΔk.\sum_{k=a_{j}}^{b_{j}-1}\|\boldsymbol{x}_{k+1}-\boldsymbol{x}_{k}\|_{2}\leq\beta_{a_{j}}\Delta_{a_{j}}+\sum_{k=a_{j}+1}^{b_{j}-1}\beta_{k}\Delta_{k}.

As j→∞j \to \infty, the first term βajΔaj→0\beta_{a_j} \Delta_{a_j} \to 0 almost surely by (3.20). Furthermore, all intermediate indices k∈{aj+1,…,bj−1}k \in \{a_j + 1, \ldots, b_j - 1\} belong to Kε\mathcal{K}_\varepsilon. Because ∑k∈KεβkΔk<∞\sum_{k \in \mathcal{K}_\varepsilon} \beta_k \Delta_k < \infty almost surely by (3.21), the tail sum ∑k=aj+1bj−1βkΔk\sum_{k=a_j+1}^{b_j-1} \beta_k \Delta_k tends to zero as j→∞j \to \infty. Consequently, the entire right-hand side converges to zero, which contradicts the strict lower bound ε>0\varepsilon > 0.

Therefore, (3.22) holds almost surely.

Theorem 3.8 establishes almost-sure first-order global convergence for a fixed deterministic objective. In our LLM fine-tuning experiments, minibatches change across iterations, so asymptotic convergence to a stationary point of the population loss is not claimed.

  1. Numerical Experiments. We evaluate MpSub on full-parameter fine-tuning of causal language models, comparing against the zeroth-order optimizer MeZO [9] under matched computational budgets. We also examine step-size sensitivity and the effect of the subspace dimension.

4.1. Experimental setup. Experiments are conducted on CommitmentBank (CB) from the SuperGLUE benchmark, a three-class natural language inference task. Following [9], we use 100 training examples, 50 validation examples, and the 56-example validation split as the test set. We evaluate two autoregressive models from the OPT family: OPT-125M ( n≈1.25×108n \approx 1.25 \times 10^8 parameters) and OPT-350M ( n≈3.5×108n \approx 3.5 \times 10^8 parameters). All parameters are stored and optimized in FP32 with a batch size of 8. Results are averaged over three random seeds, with min-max ranges reported.

Because zeroth-order methods do not compute gradients, computational cost is measured by the total number of forward passes on the training objective. Each method is allotted a budget of 8,400 forward passes. For MpSub with p = 20, which takes 200 optimization steps, each iteration requires 2p+2=422p + 2 = 42 evaluations. MeZO uses 2 evaluations per step, therefore taking 4,200 steps. Periodic development evaluations are recorded separately and excluded from this budget.

MpSub uses the same fixed hyperparameters across both models: p=20p = 20, initial radius Δ0=10−1\Delta_0 = 10^{-1}, contraction factor γ1=0.5\gamma_1 = 0.5, expansion factor γ2=2.0\gamma_2 = 2.0, success threshold η=0.1\eta = 0.1, Δmin⁡=10−12\Delta_{\min} = 10^{-12}, and Δmax⁡=1.0\Delta_{\max} = 1.0. For MeZO, the perturbation scale is ϵ=10−3\epsilon = 10^{-3}, and the learning rate ηM\eta_M is selected by development accuracy over a grid: {10−8,10−7,10−6,10−5,10−4}\{10^{-8}, 10^{-7}, 10^{-6}, 10^{-5}, 10^{-4}\} on OPT-125M and {10−7,10−6,10−5}\{10^{-7}, 10^{-6}, 10^{-5}\} on OPT-350M.

4.2. Matched-budget comparison. Table 4.1 reports test and development accuracy across three random seeds under the common budget of 8,400 forward passes.

On OPT-125M, MpSub with the default radius Δ0=10−1\Delta_0 = 10^{-1} achieves a mean development accuracy of 0.773 and a development loss of 0.674, compared to 0.760 and 0.703 for MeZO, while test accuracies are similar (0.673 versus 0.685). On OPT-350M, MpSub achieves a mean test accuracy of 0.690 and development accuracy of 0.787, compared to 0.685 and 0.780 for MeZO. MpSub attains these results with the same preset parameters on both models.

Figure 4.1 shows development loss as a function of forward passes. Though early in training MeZO decreases the loss rapidly, its progress gradually becomes slower.

Y. WANG, H. YAO, AND P. XIE

TABLE 4.1

Matched-budget fine-tuning results on CommitmentBank (8,400 forward passes). Values are means over three random seeds, with min-max ranges in parentheses. The MeZO learning rate is selected by mean development accuracy.

ModelMethodDev lossDev acc.Test acc.
OPT-125MMpSub (Δ0=10−1\Delta_0 = 10^{-1})0.674(0.620-0.723)0.773(0.740-0.820)0.673(0.661-0.679)
MeZO (ηM=10−6\eta_M = 10^{-6})0.703(0.625-0.784)0.760(0.740-0.800)0.685(0.679-0.696)
OPT-350MMpSub (Δ0=10−1\Delta_0 = 10^{-1})0.738(0.715-0.774)0.787(0.760-0.820)0.690(0.679-0.714)
MeZO (ηM=10−6\eta_M = 10^{-6})0.679(0.582-0.743)0.780(0.720-0.880)0.685(0.679-0.696)

Figure

FIG. 4.1. Development loss versus training forward passes for OPT-125M (left) and OPT-350M (right). Shaded bands represent ±1\pm1 standard error of the mean across three random seeds.

In contrast, MpSub uses the momentum direction together with p−1p-1 random search directions. This leads to a steady decrease in development loss and a lower final development loss on OPT-125M.

4.3. Step-size sensitivity. Figure 4.2 compares the sensitivity of MeZO across learning rates against MpSub across initial radii Δ0∈{10−3,10−2,3×10−2,10−1,3×10−1}\Delta_0 \in \{10^{-3}, 10^{-2}, 3 \times 10^{-2}, 10^{-1}, 3 \times 10^{-1}\} on OPT-125M.

MeZO depends strongly on the learning rate: shifting ηM\eta_M by one order of magnitude from the best rate (10−610^{-6}) drops mean test accuracy by 0.048 at 10−710^{-7} and by 0.084 at 10−510^{-5}, while rates outside this range yield poor results. Finding an effective learning rate for MeZO thus required evaluating multiple configurations (42,000 forward passes across five rates on OPT-125M, and 25,200 passes across three rates on OPT-350M).

By contrast, MpSub maintains a stable performance plateau across the entire tested initial-radius range: mean test accuracy consistently hovers between 0.655 and 0.678 across all five values of Δ0\Delta_0 from 10−310^{-3} to 3×10−13 \times 10^{-1} (a 300-fold span). This robustness illustrates the self-calibrating nature of the trust-region radius: even when initialized conservatively at Δ0=10−3\Delta_0 = 10^{-3}, successful trial steps (ρk≥η\rho_k \geq \eta) prompt the expansion factor γ2=2.0\gamma_2 = 2.0 to double Δk\Delta_k iteratively during the opening iterations, swiftly navigating the step size toward the effective operating scale. As a result, the default setting Δ0=10−1\Delta_0 = 10^{-1} delivers competitive performance on both OPT-125M and OPT-350M.

Figure

FIG. 4.2. Step-size sensitivity on OPT-125M under 8,400 forward passes. Left: MeZO test accuracy across learning rates ηM\eta_{\mathrm{M}}. Right: MpSub test accuracy across initial radii Δ0\Delta_0.

without an initial parameter sweep.

4.4. Effect of the subspace dimension. Table 4.2 examines the effect of varying the subspace dimension p∈{5,10,15,20,25,30}p \in \{5, 10, 15, 20, 25, 30\} on OPT-125M over 100 iterations.

TABLE 4.2

Ablation on subspace dimension pp for OPT-125M (CommitmentBank, 100 steps, Δ0=10−1\Delta_0 = 10^{-1}, single seed). Forward passes per step equal 2p+22p+2; run times measured on an NVIDIA RTX 4060 Ti GPU.

ppForward passes / stepDev acc.Test acc.Time / step (s)
5120.700.6433.0
10220.720.6614.4
15320.740.6616.0
20420.780.6797.7
25520.780.6798.7
30620.760.66110.1

As pp increases from 5 to 20, development accuracy rises from 0.70 to 0.78 and test accuracy from 0.643 to 0.679, which is consistent with the increase in captured gradient energy described in Lemma 3.3. Beyond p=20p = 20, the accuracy no longer improves in this experiment, while both the number of forward passes per step and the measured per-step latency continue to increase. In particular, the latency rises from 3.0 seconds at p=5p = 5 to 10.1 seconds at p=30p = 30. These results suggest that p=20p = 20 provides a reasonable balance between directional information and computational cost for the experiments considered here.

  1. Conclusion. We proposed MpSub, which combines a moving random subspace with trust-region step-size control for derivative-free LLM fine-tuning. For smooth deterministic objectives, we showed that the gradient norm converges to zero almost surely under Gaussian direction sampling and the safeguarded radius update. On CommitmentBank, MpSub achieved results comparable to tuned MeZO on OPT-125M and OPT-350M under the same forward-pass budget, while using the same trust-region settings for both models.

Y. WANG, H. YAO, AND P. XIE

Several questions remain open. The convergence analysis treats a fixed deterministic objective, whereas the LLM experiments resample the minibatch between iterations. Extending the analysis to changing minibatches is therefore the most direct theoretical next step. It would also be useful to study whether curvature information can be introduced into the subspace model without returning to the quadratic interpolation cost that motivated the linear model used here.

The experiments are also limited to one dataset and two relatively small language models. Tests on larger models, additional datasets, and generative tasks are needed to understand how the method behaves at a broader scale. The 2p directional evaluations are independent once the minibatch and current iterate are fixed, so parallel evaluation is another direction worth studying. Finally, MpSub could be combined with parameter-efficient fine-tuning methods such as LoRA, where the same trust-region mechanism would operate in a much smaller trainable parameter space.

Acknowledgements. The authors thank the developers of the MeZO and LOZO codebases, on which the experimental infrastructure builds.

REFERENCES

[1] C. AUDET AND W. HARE, Derivative-free and blackbox optimization, Springer, Heidelberg, 2017.

[2] C. CARTIS, J. FOWKES, AND Z. SHAO, Randomised subspace methods for non-convex optimization, with applications to nonlinear least-squares, arXiv preprint arXiv:2211.09873, (2022).

[3] C. CARTIS AND L. ROBERTS, Scalable subspace methods for derivative-free nonlinear least-squares optimization, Math. Program., 199 (2023), pp. 461–524.

[4] Y. CHEN, Y. ZHANG, L. CAO, K. YUAN, AND Z. WEN, Enhancing zeroth-order fine-tuning for language models with low-rank structures, in International Conference on Learning Representations (ICLR), 2025.

[5] A. R. CONN, N. I. M. GOULD, AND P. L. TOINT, Trust Region Methods, SIAM, Philadelphia, 2000.

[6] A. R. CONN, K. SCHEINBERG, AND L. N. VICENTE, Global convergence of general derivative-free trust-region algorithms to first- and second-order critical points, SIAM J. Optim., 20 (2009), pp. 387–415.

[7] A. R. CONN, K. SCHEINBERG, AND L. N. VICENTE, Introduction to Derivative-Free Optimization, SIAM, Philadelphia, 2009.

[8] D. KOZAK, S. BECKER, A. DOOSTAN, AND L. TENORIO, A stochastic subspace approach to gradient-free optimization in high dimensions, Computational Optimization and Applications, 79 (2021), pp. 339–368, https://doi.org/10.1007/s10589-021-00271-w.

[9] S. MALLADI, T. GAO, E. NICHANI, A. DAMIAN, J. D. LEE, D. CHEN, AND S. ARORA, Fine-tuning language models with just forward passes, in Advances in Neural Information Processing Systems, vol. 36, 2023, pp. 53038–53075.

[10] M. MENICKELLY, Avoiding geometry improvement in derivative-free model-based methods via randomization, arXiv preprint arXiv:2305.17336, (2023).

[11] Y. NESTEROV AND V. SPOKOINY, Random gradient-free minimization of convex functions, Foundations of Computational Mathematics, 17 (2017), pp. 527–566.

[12] P. XIE AND Y. X. YUAN, A new two-dimensional model-based subspace method for large-scale unconstrained derivative-free optimization: 2D-MoSub, Optimization Methods and Software, 41 (2025), https://doi.org/10.1080/10556788.2025.2601670.

[13] Z. Yu, P. Zhou, S. Wang, J. Li, M. Tian, AND H. Huang, Zeroth-order fine-tuning of LLMs in random subspaces, in Proceedings of the IEEE/CVF International Conference on Computer Vision (ICCV), 2025.

[14] Y. YUAN, Subspace techniques for nonlinear optimization, in Some Topics in Industrial and Applied Mathematics, R. Jeltsch, D. Q. Li, and I. H. Sloan, eds., Higher Education Press, Beijing, 2007, pp. 206–218.

[15] Y. YUAN, A review on subspace methods for nonlinear optimization, in Proceedings of the International Congress of Mathematicians (ICM 2014), vol. 4, 2014, pp. 807–827.