LLM as a Complementary Optimizer to Gradient Descent: A Case Study in Prompt Tuning

Fuente: arXiv
Salvato in:
Dettagli Bibliografici
Autori principali: Guo, Zixian, Liu, Ming, Ji, Zhilong, Bai, Jinfeng, Guo, Yiwen, Zuo, Wangmeng
Natura: Preprint
Pubblicazione: 2024
Soggetti:
Accesso online:
Tags: Aggiungi Tag
Nessun Tag, puoi essere il primo ad aggiungerne!!
_version_ 1866912142689566720
author Guo, Zixian
Liu, Ming
Ji, Zhilong
Bai, Jinfeng
Guo, Yiwen
Zuo, Wangmeng
author_facet Guo, Zixian
Liu, Ming
Ji, Zhilong
Bai, Jinfeng
Guo, Yiwen
Zuo, Wangmeng
contents Mastering a skill generally relies on both hands-on experience from doers and insightful, high-level guidance by mentors. Will this strategy also work well for solving complex non-convex optimization problems? Here, a common gradient-based optimizer acts like a disciplined doer, making locally optimal updates at each step. Large Language Models (LLMs) can also search for better solutions by inferring from natural language instructions, akin to a high-level mentor. In this paper, we show that these two participators are complementary to each other and can effectively collaborate as a combined optimization framework. The collaborative optimization is achieved by alternating between the gradient-based and LLM-based optimizers. We instruct LLMs to generate possibly improved solutions by taking parameter trajectories recorded during the previous stage of gradient-based optimization into account. Inferred results of LLMs are used as restarting points for the next stage of gradient optimization. We verify the effectiveness of this optimization framework on prompt tuning. By leveraging both the locally rigorous gradient-based optimizer and the high-level deductive LLM-based optimizer, the combined optimization method consistently yields improvements over competitive baselines on a variety of tasks. Our results demonstrate the synergistic effect of conventional gradient-based optimization and the inference ability of LLMs. The code is released at https://github.com/guozix/LLM-catalyst.
format Preprint
id arxiv_https___arxiv_org_abs_2405_19732
institution arXiv
publishDate 2024
record_format arxiv
spellingShingle LLM as a Complementary Optimizer to Gradient Descent: A Case Study in Prompt Tuning
Guo, Zixian
Liu, Ming
Ji, Zhilong
Bai, Jinfeng
Guo, Yiwen
Zuo, Wangmeng
Computer Vision and Pattern Recognition
Computation and Language
Machine Learning
Mastering a skill generally relies on both hands-on experience from doers and insightful, high-level guidance by mentors. Will this strategy also work well for solving complex non-convex optimization problems? Here, a common gradient-based optimizer acts like a disciplined doer, making locally optimal updates at each step. Large Language Models (LLMs) can also search for better solutions by inferring from natural language instructions, akin to a high-level mentor. In this paper, we show that these two participators are complementary to each other and can effectively collaborate as a combined optimization framework. The collaborative optimization is achieved by alternating between the gradient-based and LLM-based optimizers. We instruct LLMs to generate possibly improved solutions by taking parameter trajectories recorded during the previous stage of gradient-based optimization into account. Inferred results of LLMs are used as restarting points for the next stage of gradient optimization. We verify the effectiveness of this optimization framework on prompt tuning. By leveraging both the locally rigorous gradient-based optimizer and the high-level deductive LLM-based optimizer, the combined optimization method consistently yields improvements over competitive baselines on a variety of tasks. Our results demonstrate the synergistic effect of conventional gradient-based optimization and the inference ability of LLMs. The code is released at https://github.com/guozix/LLM-catalyst.
title LLM as a Complementary Optimizer to Gradient Descent: A Case Study in Prompt Tuning
topic Computer Vision and Pattern Recognition
Computation and Language
Machine Learning
url https://arxiv.org/abs/2405.19732