Manuscript Offprint
arXiv:2610.12566Sample-Adaptive Zeroth-Order Post-Training
Open access. PaperVantage converted this article to text, so layout and figures may differ from the original.
ABSTRACT
Zeroth-order (ZO) optimization offers a memory-efficient alternative to backpropagation for fine-tuning large language models. However, existing ZO methods typically sample training examples uniformly, overlooking their evolving importance and leaving avoidable estimation variance. To address this limitation, we propose Sample-Adaptive Zeroth-Order Optimization (SAZO), which learns sample importance online and adaptively allocates queries to accelerate convergence. SAZO extracts gradient-norm information from existing directional differences to estimate sample importance without access to true gradients. Furthermore, to track evolving importance from sparse minibatch feedback, SAZO maintains per-example exponential moving averages that aggregate observations across updates. The method requires no additional model evaluations and only additional scalar state compared with MeZO. We prove that SAZO asymptotically matches the leading convergence term of the minimum-variance sampling oracle, and achieves a strictly faster convergence rate than standard methods. Extensive experiments across four model families demonstrate improved average downstream performance and up to faster convergence to the same training loss in terms of query count.
1 Introduction
Fine-tuning adapts pre-trained large language models (LLMs) to diverse downstream tasks, including sentiment analysis, natural language inference, and question answering (Devlin et al., 2019). However, standard fine-tuning incurs substantial memory overhead from stored activations, gradients, and optimizer states (Li et al., 2026), requiring up to the inference memory in the settings evaluated by Malladi et al. (2023). Parameter-efficient fine-tuning (PEFT), including prefix tuning (Li and Liang, 2021) and low-rank adaptation (LoRA) (Hu et al., 2021), reduces trainable parameters but still stores activations for backpropagation. To overcome this remaining activation-memory bottleneck, zeroth-order (ZO) methods such as MeZO bypass backpropagation and estimate updates from two forward evaluations, achieving a memory footprint close to inference (Malladi et al., 2023). This memory advantage comes with an optimization challenge: the resulting gradient estimates remain noisy, limiting the convergence speed of ZO fine-tuning (Nesterov and Spokoiny, 2017).
Inspired by first-order adaptive optimizers such as Adam (Kingma and Ba, 2015), mainstream approaches to accelerating ZO optimization focus on adaptation in parameter space. HiZOO (Zhao et al., 2025c) and PaZO (Zhao et al., 2025b) use Hessian-informed preconditioning, ZO-AdaMM (Chen et al., 2019) and R-AdaZO (Shu et al., 2025) adapt coordinate-wise update scales using historical moment estimates, and LOZO (Chen et al., 2025) exploits low-rank perturbation subspaces. However, ZO methods face a fundamental information bottleneck: each directional query reveals only a scalar projection rather than a full gradient. Identifying an unrestricted d-dimensional adaptation vector requires such observations, so the cost of learning reliable parameter-wise adaptation can offset its intended acceleration. We therefore ask:
Corresponding author: fangcong@pku.edu.cn.
A PREPRINT
(a) SST-2 gradient norms

(b) Cumulative regret

(c) Optimization

Figure 1: From sample heterogeneity to allocation regret and optimization. (a) Per-example gradient norms on SST-2 at initialization, 10K, and 30K updates, normalized by the initial median. Points retain the sample order induced by the initial norms, showing both cross-sample heterogeneity and temporal changes. (b) Sampling regret is the excess gradient-estimator variance over the variance-minimizing allocation (see Appendix E.5 for definitions and detailed settings); SAZO reduces this quantity versus uniform and fixed initial-oracle sampling. (c) The improved allocation accelerates loss reduction.
A. Is there additional information in ZO queries that current optimizers leave untapped?
B. If so, how can we adaptively exploit this information to accelerate ZO convergence?
Since each update uses only a small subset of the training data, its effectiveness depends in part on which examples are selected. Our empirical analysis identifies an untapped source of information: the evolving importance of individual training examples. Their gradient norms differ substantially and change during training (Figure 1(a); Appendix E.5), suggesting that queries need not be equally valuable across examples. Uniform sampling overlooks this heterogeneity, leaving avoidable estimation variance. To use this information for query allocation, a natural approach is importance sampling, inspired by first-order methods (Katharopoulos and Fleuret, 2018; Borsos et al., 2018; El Hanchi and Stephens, 2020): allocate more queries to examples with larger gradient norms. Although sampling heterogeneity also exists in first-order methods, we argue that zeroth-order algorithms are more sensitive to it, since the estimated gradient variance of zeroth-order methods using only function-value access is much larger than that of first-order methods .
However, applying importance sampling principle to ZO fine-tuning presents two challenges. First, sample importance is not directly observable. The variance-minimizing allocation depends on per-example gradient norms, , whereas ZO queries reveal only random directional measurements. We therefore use the scaled magnitudes of existing directional differences to estimate these norms; their expectations approach the corresponding gradient norms as the perturbation radius vanishes, requiring no additional queries. Second, evolving importance must be tracked from sparse minibatch feedback. Each update reveals importance information only for examples in the sampled minibatch, while the importance of all examples may change as the model evolves. We therefore maintain per-example exponential moving averages to combine newly observed information with historical estimates, allowing importance tracking across intermittent observations. Uniform exploration provides opportunities to refresh infrequently sampled examples.
Together, these designs yield Sample-Adaptive Zeroth-Order Optimization (SAZO). The learned scores guide sampling, while inverse-probability weighting preserves the expected full-data finite-difference update. SAZO requires no additional model evaluations and only scalar state for N training examples. The benefit of tracking rather than fixing this allocation is visible in Figure 1(b): SAZO incurs lower relative cumulative sampling regret than uniform sampling and an oracle allocation fixed at initialization. This improved allocation also translates into faster training-loss reduction in Figure 1(c), connecting the recovered sample information to optimization progress.
Our main contributions are:
• We propose SAZO, which estimates sample importance from existing directional differences without extra model evaluations and tracks its evolution from sparse minibatch feedback using per-example exponential moving averages, requiring only scalar state.
The variance is actually times larger in the worst case.
A PREPRINT
• We prove that SAZO asymptotically matches the leading convergence term of the minimum-variance sampling oracle, and achieves a strictly faster convergence rate than standard methods.
• We conduct extensive experiments across four model families, demonstrating improved average downstream performance at MeZO-like memory and per-update cost. SAZO achieves up to query-count speedup over MeZO at the same training loss.
Accelerating ZO post-training. MeZO establishes memory-efficient language-model fine-tuning using forward evaluations (Malladi et al., 2023). Subsequent approaches accelerate optimization through curvature-based preconditioning (Zhao et al., 2025c,b), low-rank perturbations (Chen et al., 2025), variance reduction (Gautam et al., 2024), and directional alignment (Ma and Huang, 2025). Other methods improve update normalization (Dang et al., 2026), memory-efficient optimizer adaptivity (Dbouk et al., 2026), or adaptive layer selection (Wang et al., 2026). These studies focus on constructing parameter updates and allocating perturbations within the model, where learning reliable parameter-wise adaptation is intrinsically difficult in high dimensions; SAZO instead adapts query allocation across examples.
3 Sample-adaptive zeroth-order optimization
Consider the finite-sum problem , where denotes the loss of training example . Given a uniformly sampled index and an independent Gaussian direction , ZO optimization uses the finite difference
to update , with perturbation radius and step size . Since , the estimator satisfies and is unbiased up to finite-difference error. Let and , and let denote expectation conditional on the history before the current draws. The estimator's second moment is
The terms account for finite-difference error under the Hessian regularity conditions in Assumption 1; their coefficients may depend on the sampling probabilities and gradient norms (Appendix C). The maximum perturbation radius is denoted by .
3.1 Sample-adaptive updates
The update above assigns equal query weight to every example, as does standard first-order SGD (Katharopoulos and Fleuret, 2018). Yet empirical evidence reveals pronounced sample heterogeneity in post-training: gradient norms vary substantially across examples and evolve during optimization (Figures 1(a) and 8). This heterogeneity exhibits interpretable sample-level structure that cannot be explained simply by label class, sequence length, or vocabulary (Appendices E.5 and E.6). These observations motivate SAZO (Algorithm 1), which uses importance sampling to assign different query weights across examples to reduce update variance and accelerate optimization.
Let denote the sampling probability of example , with . For drawn independently of , the importance-weighted update is
A PREPRINT
Algorithm 1 Sample-Adaptive Zeroth-Order Optimization
Require: , step budget , radii , learning rate
Require: Exploration and smoothing coefficient
1: for do
2: , for .
3: Draw and fresh .
4: .
5: .
6: Copy .
7: .
8: end for
Importance weighting preserves the expected full-data ZO update, with . Its second moment is
Under uniform sampling, , this second moment reduces to Eq. (2). For positive gradient norms, the distribution that minimizes the leading term and the resulting second moment are
3.2 Estimating sample importance from directional differences
The ideal allocation in Eq. (5) requires the current per-example gradient norms. As identified in the Introduction, SAZO addresses two obstacles to learning them in ZO optimization.
Unobserved gradients. ZO optimization cannot access , but the directional difference already computed for the model update is approximately a one-dimensional Gaussian projection of the gradient. Its scaled absolute value therefore gives a gradient-norm estimator that is unbiased up to finite-difference error, without additional queries:
Sparse feedback. Each update reveals only for the sampled example, even though the importance of every example may evolve as optimization proceeds. SAZO therefore maintains a separate exponential moving average for every example, carrying historical estimates across the intervals between observations:
A larger responds faster to changing importance, while a smaller places more weight on accumulated observations and suppresses directional noise.
Finally, SAZO normalizes these smoothed estimates and adds uniform exploration, following the exploration–exploitation principle in EXP3 (Auer et al., 2002):
Exploration refreshes stale scores, while the learned distribution guides the next queries. This creates a coupled estimation–optimization loop, analyzed under Assumption 1 in Section 3.3.
Query and storage cost. SAZO reuses the directional differences already computed for the model update and therefore requires no additional ZO queries. It stores only one scalar importance estimate per example, for additional
A PREPRINT
space; with 1,000 training examples and FP64 scores, this is 8,000 bytes, or less than 8 KiB, and is negligible relative to the inference-memory footprint measured in Section 4.3.
Initialization and minibatch implementation. We initialize each by averaging its directional-magnitude observations over four complete, stable-order burn-in passes without replacement, using ordinary MeZO updates; these updates and queries count toward the training budget. We then switch to adaptive sampling with replacement and EMA tracking. Each minibatch shares one perturbation direction, as in MeZO (Malladi et al., 2023); repeated draws are evaluated once, with their multiplicities retained in the weighted update (Appendix D).
Recommended hyperparameters. We recommend and , which are used for all main SAZO results. This single setting performs robustly across tasks and datasets and across masked and autoregressive models of different scales; the controlled sweeps in Section 4.4 further show low sensitivity over broad ranges of both parameters.
3.3 Convergence analysis
This section analyzes convergence under the following continuity assumptions. Smoothness conditions of this type are standard in zeroth-order optimization and are routinely used to analyze ZO fine-tuning of language models (Nesterov and Spokoiny, 2017; Malladi et al., 2023). They are also well matched to our setting: Lipschitz gradients enable descent and stable tracking as the parameters evolve, while Lipschitz Hessians control the error of SAZO's symmetric finite differences.
Assumption 1. Each is globally -Lipschitz, and is -smooth and bounded below by . Each Hessian is globally -Lipschitz. The positive radii are deterministic, and the initialization and finite-time moments appearing below are finite. Let .
At the step-t parameters, ignoring finite-difference error, the optimal allocation has second moment . Under the sampling distribution in Algorithm 1, the corresponding second moment is . Their cumulative difference,
satisfies the following bound.
Theorem 1 (Sampling regret). Under Assumption 1, run Algorithm 1 with fixed and constant within the horizon. Let , , , , , and
If , then
The bound separates initialization, observation noise, target drift, and exploration, with finite differences contributing an additive remainder. The condition requires the feedback amplification of tracking error through sampling and parameter updates to be weaker than the error contraction induced by the EMA. Theorem 1 shows that our importance tracking method can asymptotically achieve the minimum sampling variance.
Substituting this result into the descent lemma (Nesterov, 2004, Lemma 1.2.3) yields the following convergence bound.
Theorem 2 (Convergence). Under Assumption 1, fix and positive schedule coefficients; use
Let and define . For , take , which minimizes the leading expression for fixed . If the parameters are feasible and , then
The first hides only universal numerical constants; finite-difference coefficients are detailed in Appendix C.
A PREPRINT
Table 1: Leading convergence terms on a common trajectory. The SAZO bound additionally includes the adaptation and finite-difference terms in Theorem 2; hindsight allocation is a comparator.
| Sampling allocation | Average second moment | Leading term |
|---|---|---|
| Uniform (MeZO) | ||
| Best fixed in hindsight | ||
| Optimal at each step (SAZO leading term) |
The first term is the leading optimization term; under fixed problem and schedule coefficients and uniformly bounded trajectory moments, the adaptation correction is . Here is the expected horizon average of defined above. The choice of is conditional on this trajectory-dependent quantity; proofs and parameter qualifications appear in Appendices A and B.
Table 1 compares the leading convergence terms for uniform sampling (MeZO), the best fixed allocation in hindsight, and the optimal allocation at each step, which governs the SAZO bound. With and the probability simplex, define
Cauchy–Schwarz and minimization over the allocations give , and hence
In particular, the gap between the uniform and optimal horizon-averaged second moments is
Equality holds if and only if all examples have the same gradient norm at every step, almost surely. This comparison uses a common parameter trajectory and does not rank the separate trajectories generated by different samplers.
4 Experiments
We evaluate SAZO from five complementary perspectives: downstream performance on masked and generative language models, convergence across model scales, scaling with the training-population size, computational efficiency, and robustness to its sampling hyperparameters. Appendix E provides the detailed experimental settings and additional diagnostics.
4.1 Performance and convergence across model families
4.1.1 Masked language models
We first examine whether SAZO's optimization strategy translates into downstream accuracy. Using RoBERTa-large (350M) (Liu et al., 2019) with examples per class, we consider six tasks spanning sentiment classification, natural language inference, and question classification. Table 2 compares zero-shot learning, LP, and full-parameter and parameter-efficient FT, MeZO, HiZOO, and SAZO; across tasks, SAZO outperforms zero-shot and LP and approaches FT.
SAZO improves both full-parameter and parameter-efficient ZO tuning. Relative to the stronger of MeZO and HiZOO, SAZO raises the average accuracy by 1.6 percentage points under full-parameter tuning and by 1.1 points under PEFT. The same pattern appears on individual tasks: the gains on TREC are 1.5 and 1.6 points for full-parameter tuning and PEFT, respectively, while those on MNLI are 1.3 and 1.8 points.
4.1.2 Generative language models
We then test whether the benefits extend to generative language models (GLMs). Table 3 compares full-parameter SAZO, MeZO, and HiZOO on OPT-1.3B (Zhang et al., 2022), Phi-2 (2.7B), and Llama3-8B across eight classification, multiple-choice, and question-answering tasks.
A PREPRINT
Table 2: Experiments on RoBERTa-large (350M parameters) with examples per class. LP: linear probing; FT: fine-tuning with Adam; PEFT: the better result between LoRA and prefix tuning for each task. MeZO and HiZOO results are reproduced. All tuning results report mean test accuracy, with standard deviations in subscripts. Bold: best ZO result.
| Method | Sentiment | Natural language inference | Question type | Avg. | ||||
|---|---|---|---|---|---|---|---|---|
| SST-2 | SST-5 | SNLI | MNLI | RTE | TREC | |||
| Zero-shot | ||||||||
| LP | ||||||||
| FT | ||||||||
| FT (PEFT) | ||||||||
| MeZO | ||||||||
| MeZO (PEFT) | ||||||||
| HiZOO | ||||||||
| HiZOO (PEFT) | ||||||||
| SAZO | ||||||||
| SAZO (PEFT) | ||||||||
SAZO achieves SOTA average performance compared with other ZO optimizers. On OPT-1.3B, Phi-2, and Llama3-8B, SAZO improves the average over the stronger of MeZO and HiZOO by 1.2, 1.7, and 3.9 percentage points, respectively. The gains are especially large on Llama3-8B CB and DROP, where SAZO exceeds the stronger baseline by 10.8 and 8.4 points.
Table 3: Full-parameter generative-LM results. MeZO and HiZOO results are reproduced.
| Model | Method | Classification | Multiple choice | Question answering | Avg. | |||||
|---|---|---|---|---|---|---|---|---|---|---|
| SST-2 | BoolQ | CB | WiC | COPA | MultiRC | SQuAD | DROP | |||
| OPT-1.3B | MeZO | |||||||||
| HiZOO | ||||||||||
| SAZO | ||||||||||
| Phi-2 | MeZO | |||||||||
| HiZOO | ||||||||||
| SAZO | ||||||||||
| Llama3-8B | MeZO | |||||||||
| HiZOO | ||||||||||
| SAZO | ||||||||||
4.1.3 Convergence across model scales
SAZO accelerates optimization across model scales. Figure 2 compares SST-2 training-loss trajectories on RoBERTa-large, Phi-2, and Llama 3 at a common forward-pass budget of 24K. Each method uses its optimal learning rate from the same search grid for each model; detailed settings are provided in Appendices E.1 and E.2. SAZO reaches MeZO's endpoint losses in 4K, 6K, and 6K passes, while HiZOO requires 10.5K, 9K, and 6K passes, respectively.
4.2 Scaling with training-population size
SAZO remains effective as the training population grows. Having established gains across model scales, we vary the amount of training data. Figure 3 compares SST-2 test accuracy as the RoBERTa-large training population increases from to . SAZO outperforms MeZO at every scale, with gains of 0.6, 1.1, 1.4, and 1.5 percentage points at , and , respectively.
A PREPRINT
(a) RoBERTa-large (350M)

(b) Phi-2 (2.7B)

(c) Llama 3 (8B)

Figure 2: SAZO substantially accelerates convergence across model scales. At 24K forward passes, SAZO reaches MeZO’s endpoint loss , , and faster in (a)–(c), respectively; HiZOO achieves , , and .

Figure 3: RoBERTa-large SST-2 test accuracy as the training population scales from N = 1,024 to 4N. Curves show mean ± standard deviation over three seeds. See Appendix E.3 for details.
4.3 Memory and wall-clock efficiency
We finally examine whether the gains above preserve the computational advantages of ZO optimization. SAZO retains MeZO’s memory footprint. Across the OPT configurations in Figure 4, the measured GB values for SAZO match those of MeZO. Compared with first-order methods, SAZO reduces memory requirements by factors of 6.8–12.2× for full FT and 3.3–6.1× for prefix FT (26 versus 316 GB at 13B for full FT). Thus, the downstream improvements do not sacrifice the low-memory advantage that makes ZO post-training attractive.
SAZO also maintains low per-update latency. Table 4 shows that its per-update time remains comparable to MeZO across the evaluated models. Together with faster loss reduction, this yields more effective updates at MeZO-like cost.

Figure 4: Peak GPU memory on MultiRC (mean length 400 tokens; batch size 1/device), summed across GPUs. Arrows show FT/SAZO ratios.
A PREPRINT
Table 4: Wall-clock time per update (seconds).
| Method | RoBERTa-large | OPT-1.3B | Phi-2 | Llama3-8B |
|---|---|---|---|---|
| MeZO | 0.1153 | 0.1836 | 0.4235 | 0.9490 |
| HiZOO | 0.2738 | 0.4793 | 1.0519 | 2.4798 |
| SAZO | 0.1128 | 0.1839 | 0.4298 | 0.9805 |
4.4 Ablation studies
We conclude by examining sensitivity to the importance-score update. SAZO is robust to the smoothing coefficient. Figure 5 varies this coefficient on SST-2. Across , the trajectories remain stable and reach closely clustered endpoint losses, with performing best. In contrast, discards the accumulated history, relies only on the latest directional observation, and diverges. This contrast highlights the importance of per-example moving averages for tracking evolving importance from intermittent feedback while smoothing directional noise. SAZO is similarly robust to the exploration coefficient over a broad range; Appendix E.4 provides the full sweep and experimental details.

Figure 5: Smoothing coefficient ablation on SST-2. Detailed settings are provided in Appendix E.4.
5 Conclusion
In this work, we propose SAZO, a sample-adaptive zeroth-order optimizer that reuses existing directional differences to estimate sample importance without additional model evaluations. Per-example exponential moving averages track how this importance evolves from sparse minibatch feedback and require only scalar state. Our analysis asymptotically matches the variance-optimal dynamic oracle's leading convergence term, yielding a smaller convergence coefficient than uniform sampling when sample importance is heterogeneous. Extensive experiments demonstrate improved average downstream performance and up to faster convergence to the same training loss in terms of query counts.
A PREPRINT
AI use statement
Generative AI assisted with research organization, literature retrieval, mathematical derivation, manuscript drafting, LaTeX preparation, numerical identity checks, and a separate adversarial review of this draft. It did not generate the reported training measurements.
References
Liviu Aolaritei, Bart P. G. Van Parys, Henry Lam, and Michael I. Jordan. Stochastic optimization with optimal importance sampling. arXiv preprint arXiv:2504.03560, 2025. URL https://arxiv.org/abs/2504.03560.
Peter Auer, Nicolò Cesa-Bianchi, Yoav Freund, and Robert E. Schapire. The nonstochastic multiarmed bandit problem. SIAM Journal on Computing, 32(1):48–77, 2002. doi: 10.1137/S0097539701398375. URL https://doi.org/10.1137/S0097539701398375.
Zalan Borsos, Andreas Krause, and Kfir Y. Levy. Online variance reduction for stochastic optimization. In Conference On Learning Theory, volume 75, pages 324–357. PMLR, 2018. URL https://proceedings.mlr.press/v75/borsos18a.html.
Zalán Borsos, Sebastian Curi, Kfir Yehuda Levy, and Andreas Krause. Online variance reduction with mixtures. In International Conference on Machine Learning, volume 97, pages 705–714. PMLR, 2019. URL https://proceedings.mlr.press/v97/borsos19a.html.
Guillaume Bouchard, Théo Trouillon, Julien Perez, and Adrien Gaidon. Online learning to sample. arXiv preprint arXiv:1506.09016, 2016. URL https://arxiv.org/abs/1506.09016v2.
Xiangyi Chen, Sijia Liu, Kaidi Xu, Xingguo Li, Xue Lin, Mingyi Hong, and David Cox. ZO-AdaMM: Zeroth-order adaptive momentum method for black-box optimization. In Advances in Neural Information Processing Systems, 2019.
Yiming Chen, Yuan Zhang, Liyuan Cao, Kun Yuan, and Zaiwen Wen. Enhancing zeroth-order fine-tuning for language models with low-rank structures. In International Conference on Learning Representations, volume 2025, pages 62581–62607, 2025.
Sizhe Dang, Yangyang Guo, Yanjun Zhao, Xiaodong Zheng, Guang Dai, Ivor Tsang, and Haishan Ye. FZOO: Fast zeroth-order optimizer for fine-tuning large language models towards adam-scale speed. In International Conference on Learning Representations, 2026. URL https://arxiv.org/abs/2506.09034.
Hassan Dbouk, Nidham Gazagnadou, Matthias Reisser, and Christos Louizos. On adaptivity in zeroth-order optimization. arXiv preprint arXiv:2605.03869, 2026. URL https://arxiv.org/abs/2605.03869.
Jacob Devlin, Ming-Wei Chang, Kenton Lee, and Kristina Toutanova. Bert: Pre-training of deep bidirectional transformers for language understanding. In Proceedings of the 2019 conference of the North American chapter of the association for computational linguistics: human language technologies, volume 1 (long and short papers), pages 4171–4186, 2019.
Ayoub El Hanchi and David A. Stephens. Adaptive importance sampling for finite-sum optimization and sampling with decreasing step-sizes. In Advances in Neural Information Processing Systems, volume 33, 2020. URL https://proceedings.neurips.cc/paper/2020/hash/b58f7d184743106a8a66028b7a28937c-Abstract.html.
Tanmay Gautam, Youngsuk Park, Hao Zhou, Parameswaran Raman, and Wooseok Ha. Variance-reduced zeroth-order methods for fine-tuning language models. arXiv preprint arXiv:2404.08080, 2024.
Edward J Hu, Yelong Shen, Phillip Wallis, Zeyuan Allen-Zhu, Yuanzhi Li, Shean Wang, Lu Wang, and Weizhu Chen. Lora: Low-rank adaptation of large language models. arXiv preprint arXiv:2106.09685, 2021.
Angelos Katharopoulos and François Fleuret. Not all samples are created equal: Deep learning with importance sampling. In International Conference on Machine Learning, volume 80, pages 2525–2534. PMLR, 2018. URL https://proceedings.mlr.press/v80/katharopoulos18a.html.
Diederik P. Kingma and Jimmy Ba. Adam: A method for stochastic optimization. In International Conference on Learning Representations, 2015. URL https://arxiv.org/abs/1412.6980.
Xiang Lisa Li and Percy Liang. Prefix-tuning: Optimizing continuous prompts for generation. In Proceedings of the 59th annual meeting of the association for computational linguistics and the 11th international joint conference on natural language processing (volume 1: Long papers), pages 4582–4597, 2021.
Yanyi Li, Yimu Zhang, and Cong Fang. Prac: Principal-random subspace for llm activation compression and memory-efficient training. arXiv preprint arXiv:2602.23111, 2026.
A PREPRINT
Rui Liu, Tianyi Wu, and Barzan Mozafari. Adam with bandit sampling for deep learning. In Advances in Neural Information Processing Systems, volume 33, 2020. URL https://arxiv.org/abs/2010.12986.
Yinhan Liu, Myle Ott, Naman Goyal, Jingfei Du, Mandar Joshi, Danqi Chen, Omer Levy, Mike Lewis, Luke Zettlemoyer, and Veselin Stoyanov. RoBERTa: A robustly optimized BERT pretraining approach. arXiv preprint arXiv:1907.11692, 2019. URL https://arxiv.org/abs/1907.11692.
Shaocong Ma and Heng Huang. Revisiting zeroth-order optimization: Minimum-variance two-point estimators and directionally aligned perturbations. In International Conference on Learning Representations, volume 2025, pages 13267–13293, 2025.
Sadhika Malladi, Tianyu Gao, Eshaan Nichani, Alex Damian, Jason D. Lee, Danqi Chen, and Sanjeev Arora. Fine-tuning language models with just forward passes. In Advances in Neural Information Processing Systems, 2023. URL https://arxiv.org/abs/2305.17333.
Hongseok Namkoong, Aman Sinha, Steve Yadlowsky, and John C. Duchi. Adaptive sampling probabilities for non-smooth optimization. In International Conference on Machine Learning, volume 70, pages 2574–2583. PMLR, 2017. URL https://proceedings.mlr.press/v70/namkoong17a.html.
Yurii Nesterov. Introductory Lectures on Convex Optimization: A Basic Course, volume 87 of Applied Optimization. Kluwer Academic Publishers, 2004. doi: 10.1007/978-1-4419-8853-9. URL https://doi.org/10.1007/978-1-4419-8853-9.
Yurii Nesterov and Vladimir Spokoiny. Random gradient-free minimization of convex functions. Foundations of Computational Mathematics, 17(2):527–566, 2017.
Farnood Salehi, L. Elisa Celis, and Patrick Thiran. Stochastic optimization with bandit sampling. arXiv preprint arXiv:1708.02544, 2017. URL https://arxiv.org/abs/1708.02544.
Yao Shu, Qixin Zhang, Kun He, and Zhongxiang Dai. Refining adaptive zeroth-order optimization at ease. In Proceedings of the International Conference on Machine Learning, 2025.
Fei Wang, Li Shen, Liang Ding, Chao Xue, Ye Liu, and Changxing Ding. Universally empowering zeroth-order optimization via adaptive layer-wise sampling. In Findings of the Association for Computational Linguistics: ACL 2026, pages 40218–40239. Association for Computational Linguistics, 2026. URL https://aclanthology.org/2026.findings-acl.1999/.
Dun Zeng, Zenglin Xu, Yu Pan, Xu Luo, Qifan Wang, and Xiaoying Tang. Enhanced federated optimization: Adaptive unbiased client sampling with reduced variance. arXiv preprint arXiv:2310.02698, 2024. URL https://arxiv.org/abs/2310.02698v3.
Susan Zhang, Stephen Roller, Naman Goyal, Mikel Artetxe, Moya Chen, Shuohui Chen, Christopher Dewan, Mona Diab, Xian Li, Xi Victoria Lin, Todor Mihaylov, Myle Ott, Sam Shleifer, Kurt Shuster, Daniel Simig, Punit Singh Koura, Anjali Sridhar, Tianlu Wang, and Luke Zettlemoyer. OPT: Open pre-trained transformer language models. arXiv preprint arXiv:2205.01068, 2022. URL https://arxiv.org/abs/2205.01068.
Boxin Zhao, Lingxiao Wang, Ziqi Liu, Zhiqiang Zhang, Jun Zhou, Chaochao Chen, and Mladen Kolar. Adaptive client sampling in federated learning via online learning with bandit feedback. Journal of Machine Learning Research, 26(8):1–67, 2025a. URL https://jmlr.org/papers/v26/24-0385.html.
Hanzhen Zhao, Ding Shihong, Cong Fang, and Zhouchen Lin. Pazo: Preconditioned accelerated zeroth-order optimization for fine-tuning llms. Advances in Neural Information Processing Systems, 38:111163–111195, 2025b.
Yanjun Zhao, Sizhe Dang, Haishan Ye, Guang Dai, Yi Qian, and Ivor W. Tsang. Second-order fine-tuning without pain for LLMs: A hessian informed zeroth-order optimizer. In International Conference on Learning Representations, 2025c. URL https://arxiv.org/abs/2402.15173.
A PREPRINT
A Proofs of the main results
Let denote the history before the current draws, so are -measurable and is conditional expectation. For the proofs, it is convenient to remove the common Gaussian factor from the second moments in Section 3.3. Throughout the appendices, define
Writing , use , , , , , and . Also set . These are exact rescalings of the main-text quantities.
For the explicit radius calculations below, set , , , , and . Write and . With , define
These quantities expand the compact radius errors used in the main text. At a fixed horizon and fixed algorithm parameters, and for , with moment dependencies retained here. For local observation variance statements, the hidden coefficient also contains through .
A.1 Supporting moment and descent bounds
The following results use the normalized quantities defined above. Multiplying the normalized regret bound by gives Theorem 1; substituting and gives Theorem 2.
Proposition 1 (Feedback and update moments). For , the finite-difference observations satisfy
The corresponding update satisfies
(16)
Lemma 1 (Descent decomposition). Under Assumption 1, let . Then
where and .
Schedules and finite-difference accuracy. The schedules in Theorem 2 are constant within each run and indexed by the horizon. The leading-term choice of requires and ; since depends on the resulting trajectory, this is a conditional tuning result. The finite-time bounds retain the trajectory moments without imposing a global gradient bound, convexity, or a strong-growth condition. For fixed problem and schedule coefficients and uniformly bounded trajectory moments, the constant can be taken uniformly over feasible horizons. A run-wise radius with makes this correction ; a fixed radius retains an additive error floor. Appendix C gives the explicit bounds.
A.2 Gaussian identities and the sampling oracle
In this appendix only, write for the actual difference used in the main text and introduce as a Taylor expansion term at the same current parameter vector. There is no auxiliary optimization trajectory. Condition on and suppress . For any fixed , has distribution with . Since and ,
A PREPRINT
the Gaussian moments of follow. Adding the Taylor remainder bounded in Appendix C gives Eq. (15). To compute the update moment, rotate onto the first coordinate:
Also . Averaging over the selected index gives the leading moment . Adding the Taylor remainder gives Eq. (16). Finally,
Equality holds for on the positive-norm support. Infima on the boundary are understood by limits, with zero-norm terms contributing zero.
A.3 Stationary variance of the EMA
Fix the parameter vector and index , and enumerate its visits by . At a fixed radius, with fresh independent Gaussian directions, let and . The central-difference estimates obey with the explicit coefficients in Proposition 1. For deterministic initial score , the recursion gives
This follows by centering the recursion and summing a geometric series. At visit times, the variance converges to . Averaging reduces variance but retains the finite-difference bias in . The result concerns a fixed target; it does not remove the drift term on an evolving optimization trajectory.
A.4 A global normalization bound
Lemma 2. For , , , and , let and . Then
Proof. Let , , , and . To retain the normalization by , work directly with the weighted squared norm . Expanding the square gives
N^2\bigl[\widetilde V(p)-G^2\bigr]=\|a-S p\|_p^{-1}^2.Write . Since , , and ,
The exploration contribution also admits a weighted bound:
Using therefore yields
The argument includes and requires no closeness condition between and .
A PREPRINT
A.5 Sparse EMA with correlated target drift
The following lemma allows dependent inclusions and shared directional observations. Given the current history, let be an inclusion indicator independent of the fresh Gaussian direction, with . The indicators for different coordinates may be dependent. For this local lemma, let denote the leading Gaussian observation and update , and suppose for all steps and coordinates. Define .
Lemma 3 (Visited-coordinate tracking). With and ,
Proof. For and , write
Conditional centering and independence of and the new direction imply
Young's inequality with parameter gives
because and . Summing for and over , including the terminal contribution using , gives Eq. (19), in fact with 6 instead of 12 for the drift constant. We retain 12 to use common constants with the finite-difference extension. The argument never assumes that and are independent.
For Algorithm 1, and . Use . Adding the finite-difference observation remainder as in Appendix C gives, with ,
A.6 Closing the drift and proving stationarity
All quantities are evaluated on the actual finite-difference trajectory. The perturbed sparse-EMA inequality and normalization give
Gradient continuity and the second-moment bound imply
Substitution and absorption prove Theorem 1 after multiplication by , with additive remainder at most .
For descent, write at the same parameters, selected index, and direction, and let . The Taylor bounds give
Smoothness implies
Using and , Cauchy–Schwarz over time and randomness bounds the additional terms by . Summation proves Lemma 1 without multiplying its leading term by the coarse moment bound's factor two.
A PREPRINT
For Theorem 2, substitution of the schedules and gives, when ,
Insert this into the descent lemma. Holding fixed, the leading expression is minimized at . Before collecting radius terms, the result is
This gives Eq. (12) after rescaling, with the radius-error convention stated in the main text. The general descent lemma covers undefined or infeasible oracle coefficients; the choice is conditional on the resulting trajectory quantity.
B Parameter balance and comparator qualifications
The radius-independent noise, drift, and exploration contributions have scales
For positive moments and smoothness, their formal balance is
If these choices and the resulting trajectory satisfy feasibility and , then
Only universal constants are suppressed. These choices require , , which depend on the parameters and resulting trajectory; this is a conditional balance, not an online tuning rule or an existence theorem for self-consistent parameters. The initialization term follows from . The finite-difference correction remains additive.
Balancing noise and drift alone gives . A common numerical value across tasks is an empirical tuning constraint; the right side is problem-dependent.
B.1 Three fixed and dynamic costs
In addition to and , define
For each realized trajectory,
Pointwise minimization, , and evaluation at the uniform distribution establish
is the expected hindsight cost, while chooses a fixed distribution before taking the trajectory expectation. Interchanging them would change the comparator. For with fixed , the dynamic and hindsight fixed costs coincide. For the deterministic two-step example , , while . This example illustrates a cost hierarchy and is not asserted to be a realized training trajectory.
Equation (14) follows by expanding the squared deviations around and multiplying by . Consequently, whenever the example norms differ at some step with positive probability. The balanced expressions in Table 1 follow by minimizing over for each fixed positive normalized comparator quantity . This is an algebraic comparison on the same trajectory; it does not require treating a hindsight-selected distribution as an implementable sampler.
A PREPRINT
C Finite-difference error
This appendix retains the original, unsmoothed gradients as the reference quantities. It covers Algorithm 1 and the with-replacement minibatch update in Appendix D.
The Hessian regularity is included in Assumption 1; set . Let and . Taylor's integral remainder gives
For , define
The reverse triangle inequality and Gaussian radial moments imply
In this appendix take for Algorithm 1, or for the experimental implementation. Let denote the corresponding inclusion probability and let lower-bound uniformly. Define
For the main algorithm, take and . For the batch extension, and .
Lemma 4 (Outer perturbation). Let , where the two estimators use the same current parameters, indices, and direction, with finite or ideal differences. Then
Proof. Conditional on , the with-replacement sample average has expectation . Jensen's inequality and prove the first bound. For independent with-replacement indices, the conditional second moment consists of plus . Use and Eq. (25).
Theorem 3 (Explicit finite-radius bound). Under Assumption 1, use the with-replacement update in Eq. (28) and the once-per-included-example EMA in Eq. (29), with and . Let
Along the actual finite-difference trajectory, define , using the original gradient norms using the normalization above and Eq. (10). Then
(26)
If , then
Proof. In Lemma 3, the new error is . Apply Young's inequality with parameter , then bound the square of the last two terms by twice the sum of their squares. This gives
A PREPRINT
No centering of is assumed. By the ideal batch second moment, Lemma 4, and the two-term square inequality,
Consequently,
Substitute into Lemma 2 and absorb the regret coefficient to prove Eq. (26). For descent, use with , and . The coefficient of is at least , giving Eq. (27).
Radius dependence in the main theorem. For , the explicit bounds are
For the main algorithm, with fixed problem and schedule coefficients, bounded trajectory moments, and the horizon schedules in Theorem 2, one has , , and
The constants in these two order summaries depend on the fixed coefficients explicitly displayed above and in the main definitions. The radius-independent remainder in the main theorem hides only universal constants. Its separate hides the radius coefficients displayed here. Under the stated fixed-parameter and bounded-moment conditions, and uniformly in feasible ; thus the collected is uniform in those horizons. Choosing for every step of a run gives . For , both and are . This condition applies to a horizon-dependent radius and does not assert the same conclusion for with a fixed initial radius. The earlier coarse outer bound remains useful if one prefers squared-radius errors at the price of larger leading constants. Evaluation randomness and numerical rounding are not represented by these Taylor bounds.
D With-replacement minibatches and shared directions
All experiments use with-replacement minibatch sampling. This appendix specifies the implementation and derives the effect of sharing one Gaussian direction within a batch. Algorithm 1 and the main convergence results are its case.
D.1 Minibatch update and reused evaluations
At step , form from the stored scores and draw indices independently with replacement, , independently of . Let
For each , evaluate the two-sided difference only once, using the common perturbations . If an example is drawn repeatedly, its stored difference is reused: it does not trigger another forward evaluation or a replacement draw. The model update is
Thus evaluation reuse preserves the multiplicities of the original B draws. Each included example updates its score once:
The distribution remains fixed within a batch; the new scores determine . No inverse-probability factor is applied to the EMA. The two perturbed batches contain examples each, requiring example-level function evaluations. The expected number of distinct examples is .
A PREPRINT
D.2 Effect of the shared direction on variance
For fixed , let . Independence of the index draws gives the exact finite-difference identities
Hence sharing a direction and reusing duplicate evaluations preserve the expected full-data finite-difference update. The differences for different examples need not be independent.
Write . Under Assumption 1, integrating over the shared Gaussian direction yields
Proposition 2 (Shared-direction minibatch moments). For the update in Eq. (28),
Its total variance is
The radius terms follow the convention in Appendix C; the displayed leading terms are exact for directional derivatives.
Proof. The central-difference remainder satisfies with . Applying this expansion directly to Eqs. (30)–(31), the Gaussian identities
give the displayed leading terms. Cross terms involving are by Cauchy–Schwarz and the finite-radius moment bounds; squared remainders are . Subtracting gives Eq. (33).
Advantage over MeZO under the same shared direction. MeZO also shares one Gaussian direction across a minibatch. Its leading directional variance is therefore the same as SAZO's; the allocation controls the remaining term. At the same parameter vector and batch size, write . The variance reduction relative to MeZO is
where . For the norm-proportional oracle, the leading gain is
Thus unequal gradient norms give a strictly positive leading variance reduction. The common direction term cancels from the comparison: sharing a direction does not introduce an additional variance penalty for SAZO relative to MeZO. For the learned allocation, the leading gain equals the oracle gain minus , directly connecting the benefit to the tracking analysis.
Larger batches reduce both methods’ sampling variance by , while norm-proportional allocation minimizes this term for every batch size. SAZO exploits sample heterogeneity within the same two perturbed model states used by MeZO, and duplicate evaluation reuse reduces the work needed for its B draws.
D.3 Consequences for tracking and convergence
Because an included example updates its EMA once, its refresh event is . Conditional on the history, the probability that all independent draws miss example is . Thus its inclusion probability and the resulting uniform refresh bound are
A PREPRINT
The floor gives . Relative to the rate , one has and when is small.
To connect inclusion to tracking contraction, set and use the leading Gaussian observation from Appendix A. Independence of the index draws and the fresh direction gives
since . Sharing correlates the observations across examples, but Lemma 3 controls a sum of coordinatewise squared errors and does not require independence across examples. Its argument therefore applies with ; the moving target and finite-difference remainder are included in Theorem 3. Each included example receives only one directional observation, and updating its EMA once avoids treating duplicate draws as fresh evidence.
To see how the shared-direction term enters optimization, average Eq. (32) in the smoothness descent inequality. With and , this gives
For , the coefficient on the left is positive. This coefficient is common to SAZO and a uniform shared-direction update. Along a given parameter trajectory, uniform sampling contributes to the right-hand sampling term, whereas SAZO contributes . The same dynamic-oracle improvement established in the main analysis therefore persists in the minibatch bound. Setting recovers the main descent lemma.
The same distinction matters for target drift. The coarse moment bound with an remainder gives
using . Combining this inequality with the term in Lemma 3 and the factor in Lemma 2, the coefficient of regret on the right-hand side is
Here is the coefficient at the same . Thus when is small: sampling reduces the regret-dependent update moment by , and the increased refresh rate reduces its tracking contribution by a further factor of approximately . Theorem 3, with and , combines these effects with the remaining noise, exploration, and finite-difference terms. Its specialization recovers the main convergence analysis.
E Experimental settings
E.1 Detailed experiments on RoBERTa-large
We use the hyperparameters in Table 5 for SAZO experiments on RoBERTa-large. Regarding learning-rate scheduling and early stopping, we use a constant learning rate for all SAZO experiments. All SAZO experiments use , , and four burn-in passes. For Figure 2(a), we select the optimal constant learning rate for each method from ; all other settings match the corresponding full-parameter experiments in Table 2.
E.2 Detailed results on various LLMs
We use the hyperparameters in Table 6 for SAZO experiments on GLMs. For Figure 2(b,c), we select the optimal constant learning rate for each method and model from ; all other settings match the corresponding experiments in Table 3.
A PREPRINT
Table 5: Hyperparameter grids used for SAZO experiments on RoBERTa-large.
| Experiment | Hyperparameter | Values |
|---|---|---|
| SAZO | Batch size | |
| Learning rate | ||
| Perturbation radius | ||
| Weight decay | ||
| SAZO (prefix) | Batch size | |
| Learning rate | ||
| Perturbation radius | ||
| Weight decay | ||
| Prefix tokens | ||
| SAZO (LoRA) | Batch size | |
| Learning rate | ||
| Perturbation radius | ||
| Weight decay | ||
Table 6: Hyperparameter grids used for GLM experiments. All weight decay is set to 0. SAZO uses 20K steps and constant learning rates.
| Experiment | Hyperparameter | Values |
|---|---|---|
| SAZO | Batch size | |
| Learning rate | ||
| Perturbation radius |
E.3 Training-population scaling settings
Figure 3 uses full-parameter RoBERTa-large on SST-2 with training populations , and . MeZO and SAZO use batch size 16, constant learning rate , and 100K optimization steps. All learning-rate and checkpoint choices are fixed or validation-only; the test set is never used for selection. We report test accuracy averaged over seeds 13, 21, and 42, with population standard deviations as error bars.
E.4 Ablation experiment details
The ablations use one seed of full-parameter RoBERTa-large on SST-2 with , a fixed 1,024-example training population, batch size 64, constant learning rate , perturbation radius , and zero weight decay. We initialize the importance scores by averaging directional magnitudes over four passes, then use sampling with replacement and inverse-probability-weighted parameter updates. The sweep in Figure 5 uses at fixed . The exploration sweep uses at fixed . Each plotted point is a forward-only mean-loss audit over the complete training population; audit queries are excluded from the update count. We retain every measured audit and apply neither curve smoothing nor extrapolation.
Figure 6 shows stable optimization across , indicating that SAZO is robust to substantial changes in the exploration rate. At the extreme , the adaptive component vanishes and sampling becomes uniform; this trajectory eventually diverges under the same learning rate.
A PREPRINT

Figure 6: Exploration-coefficient ablation on SST-2. SAZO remains stable over , whereas , which reduces to uniform sampling, becomes unstable.
E.5 Sample-importance diagnostics
The heterogeneity experiments use full-parameter RoBERTa-large under uniform MeZO training, with , batch size 64, learning rate , perturbation radius , and zero weight decay. At frozen checkpoints, we compute exact per-example gradient norms over the trainable parameters. These gradients are used only for diagnostics. The oracle allocation is , and relative importance is . Top-10% sets are recomputed at each checkpoint; temporal changes are measured using Spearman rank correlation. For the SST-2 examples, the prompt appends It was <mask>., with great and terrible as the positive and negative verbalizers.
Figure 1(a) reports the exact audits at initialization, 10K, and 30K updates. We divide all three checkpoints by the median initial norm and fix the horizontal order using the initial norms, so a given position refers to the same training example at every checkpoint. Every example is shown as a point, without smoothing or aggregation.

Figure 7: Gradient-norm concentration across tasks. The top 10% of examples account for an increasing share of the total gradient norm across six tasks. The top set is recomputed at each checkpoint; the dashed line marks the approximately 10% uniform reference. Exact gradients are measured at frozen RoBERTa-large MeZO checkpoints.
Length and label controls. We group examples by label or by the joint pair of prompt token count and label, and optimize the allocation subject to equal probabilities within each group. For a partition G, the optimal group-restricted
A PREPRINT
distribution is
The fraction of the uniform-to-oracle variance gap remaining is , evaluated at 20K updates.
Online versus fixed sampling. The SST-2 comparison uses a common initial model, batch size 64, perturbation radius , and 30K updates. We scan constant learning rates in . SAZO uses and . The fixed sampler retains the initial exact gradient-norm-proportional distribution without an exploration mixture; uniform sampling uses . At each audit, the normalized instantaneous regret is
Figure 1(b) reports relative cumulative regret,
We integrate the numerator and denominator separately using the trapezoidal rule on all 61 recorded audits, spaced 500 updates apart from 0 to 30K, and then take their ratio. This differs from integrating . The undefined ratio at is omitted from the plot. Exact gradients at each method's current parameters define its reference oracle. Loss is evaluated over the complete training population.
E.6 Interpretable sample-level structure
Figures 8 and 9 connect population-level changes in sample importance to the model’s predictions on individual inputs. Importance is measured by the normalized exact gradient norm at frozen RoBERTa-large MeZO checkpoints; a value of 1 corresponds to uniform allocation. These are diagnostic oracle quantities, rather than SAZO’s estimated scores. Detailed audit settings are given in Appendix E.5.
Sample rankings change during training. Figure 8 compares each example’s importance at initialization and after 20K updates on SST-2 and TREC. Points above the diagonal gain relative importance, while those below lose it. The initial-to-20K Spearman correlations are 0.52 and 0.12, respectively, showing that the initial ranking does not reliably preserve subsequent allocation priorities.
(a) SST-2: importance shifts

(b) TREC: importance shifts
Figure 8: Sample-importance rankings evolve during training. Initial versus 20K normalized gradient norms on SST-2 and TREC, with one point per example and shared logarithmic axes. The diagonal marks unchanged importance, and is the Spearman correlation. A–D identify the SST-2 examples examined in Figure 9. All gradient norms are exact audits at frozen MeZO checkpoints.
Importance changes have interpretable sample-level structure. The four SST-2 cases A–D in Figure 9 link the scatter plot to predictions at initialization, 5K, and 20K updates. A (“a great cast”) stays correct and has low importance throughout. B (“over-dramatic at times”) becomes correct as its normalized importance falls from 3.113 to 0.230. C (“smug grin”) remains incorrect, while its importance rises from 2.863 to 11.170. D, containing both “amateurish” and
A PREPRINT
“a minor treat,” becomes incorrect and rises from 0.805 to 10.930. For D, the absolute gradient norm also increases, so the rise is not solely due to other examples’ shrinking gradients.
A Always correct
a great cast
Initial
5K updates
20K updates

positive
CORRECT
0.980
0.065

positive
CORRECT
Probability
0.997
0.021

positive
CORRECT
0.998
0.018
Training-set importance
B Learns over time
over-dramatic at times
Initial
5K updates
20K updates

positive
WRONG
0.076
3.113

negative
CORRECT
0.904
0.781

negative
CORRECT
0.978
0.230
C Persistently wrong
smug grin
Initial
5K updates
20K updates

positive
WRONG
0.074
2.863

positive
WRONG
0.044
6.485

positive
WRONG
0.072
11.170
D Becomes incorrect
the movie is amateurish, but it's a minor treat.
Initial
5K updates
20K updates

positive
CORRECT
0.724
0.805

negative
WRONG
0.171
6.200

negative
WRONG
0.077
10.930
Figure 9: Representative examples reveal interpretable importance changes. A–D correspond to the SST-2 points marked in Figure 8. Robot lights and status labels indicate correctness at each checkpoint. Numbers above the blue bars give the correct-class probability ; numbers below give normalized gradient norms. Bars share a linear scale from 0 to 12, with 1 corresponding to uniform allocation. All gradient norms are exact audits at frozen MeZO checkpoints. The input template appends It was <mask>. Appendix E.5 provides detailed settings and sample identities.
Together, the population shifts and these illustrative cases show that sample importance reflects the model's evolving response to an input. Words, length, and labels remain fixed, yet predictions and gradient contributions change. An allocation based only on initial importance can therefore become stale, motivating continued tracking during optimization.