Salvato in:
Dettagli Bibliografici
Autori principali: Ding, Zixin, Hong, Junyuan, Shi, Zhan, Wang, Jiachen T., Lin, Zinan, Yin, Li, Liu, Meng, Wang, Zhangyang, Chen, Yuxin
Natura: Preprint
Pubblicazione: 2025
Soggetti:
Accesso online:https://arxiv.org/abs/2506.00400
Tags: Aggiungi Tag
Nessun Tag, puoi essere il primo ad aggiungerne!!
_version_ 1866915623407190016
author Ding, Zixin
Hong, Junyuan
Shi, Zhan
Wang, Jiachen T.
Lin, Zinan
Yin, Li
Liu, Meng
Wang, Zhangyang
Chen, Yuxin
author_facet Ding, Zixin
Hong, Junyuan
Shi, Zhan
Wang, Jiachen T.
Lin, Zinan
Yin, Li
Liu, Meng
Wang, Zhangyang
Chen, Yuxin
contents LLM-based prompt optimization, that uses LLM-provided "textual gradients" (feedback) to refine prompts, has emerged an effective method for automatic prompt engineering. However, its scalability and stability are unclear when using more data in training. We systematically investigate the potential and challenges of scaling training data in textual gradient descent. We show that naively scaling training examples is infeasible due to both explicit context-length limits and an implicit context wall, where long-context degradation yields diminishing returns. Inspired by prior wisdom in stochastic gradient descent, we propose Textual Stochastic Gradient Descent with Momentum (TSGD-M), which reweights updates through momentum sampling, using bootstrapped minibatch validation accuracy as importance weights over historical prompts. We introduce Gumbel-Top-$k$ sampling for prompt generation, balancing exploration--exploitation and improving sampling efficiency while maintaining a low-variance running mean estimator. TSGD-M integrates seamlessly into existing prompt optimization frameworks, including TextGrad, DSPy-COPRO, and AdalFlow, and achieves consistent gains across 5 benchmarks.
format Preprint
id arxiv_https___arxiv_org_abs_2506_00400
institution arXiv
publishDate 2025
record_format arxiv
spellingShingle Scaling Textual Gradients via Sampling-Based Momentum
Ding, Zixin
Hong, Junyuan
Shi, Zhan
Wang, Jiachen T.
Lin, Zinan
Yin, Li
Liu, Meng
Wang, Zhangyang
Chen, Yuxin
Computation and Language
Artificial Intelligence
LLM-based prompt optimization, that uses LLM-provided "textual gradients" (feedback) to refine prompts, has emerged an effective method for automatic prompt engineering. However, its scalability and stability are unclear when using more data in training. We systematically investigate the potential and challenges of scaling training data in textual gradient descent. We show that naively scaling training examples is infeasible due to both explicit context-length limits and an implicit context wall, where long-context degradation yields diminishing returns. Inspired by prior wisdom in stochastic gradient descent, we propose Textual Stochastic Gradient Descent with Momentum (TSGD-M), which reweights updates through momentum sampling, using bootstrapped minibatch validation accuracy as importance weights over historical prompts. We introduce Gumbel-Top-$k$ sampling for prompt generation, balancing exploration--exploitation and improving sampling efficiency while maintaining a low-variance running mean estimator. TSGD-M integrates seamlessly into existing prompt optimization frameworks, including TextGrad, DSPy-COPRO, and AdalFlow, and achieves consistent gains across 5 benchmarks.
title Scaling Textual Gradients via Sampling-Based Momentum
topic Computation and Language
Artificial Intelligence
url https://arxiv.org/abs/2506.00400