Direct Prompt Optimization with Continuous Representations

Prompt optimization for language models faces challenges due to the large discrete search space, the reliance on continuous gradient updates, and the need to round continuous representations into discrete prompts, which causes inflexibility and instability.Existing methods attempt to address these by constraining the search space and adopting greedy, incremental improvements, but they often fail to fully leverage historical gradient information.In this paper, we model the prompt optimization problem by the probability distribution of the prompt and present a novel approach that integrates greedy strategies into optimization with continuous representations.This approach can exploit historical gradient information to address the instability caused by rounding in existing methods.Our study indicates that using continuous representations can improve prompt optimization performance on both text classification and attack tasks, as well as models, including GPT-2, OPT, Vicuna, and LLaMA-2, and also be adaptable to models of different sizes.

Authors

Institutions

Publication Details

Published
2025-01-01
DOI
https://doi.org/10.18653/v1/2025.acl-long.133
Citations
1
Primary Topic
Numerical Methods and Algorithms
Type
article
Field-Weighted Citation Impact
1.50
Controls
|||
ALL TIME
JAN
FEB
MAR
APR
MAY
JUN
JUL
AUG
SEP
OCT
article

Direct Prompt Optimization with Continuous Representations

Yangkun Wang, Jingbo Shang, Zihan Wang
1 citations
Numerical Methods and Algorithms
1.50
article

Direct Prompt Optimization with Continuous Representations

Yangkun Wang, Jingbo Shang, Zihan Wang
article en
1 citations

Abstract

Prompt optimization for language models faces challenges due to the large discrete search space, the reliance on continuous gradient updates, and the need to round continuous representations into discrete prompts, which causes inflexibility and instability.Existing methods attempt to address these by constraining the search space and adopting greedy, incremental improvements, but they often fail to fully leverage historical gradient information.In this paper, we model the prompt optimization problem by the probability distribution of the prompt and present a novel approach that integrates greedy strategies into optimization with continuous representations.This approach can exploit historical gradient information to address the instability caused by rounding in existing methods.Our study indicates that using continuous representations can improve prompt optimization performance on both text classification and attack tasks, as well as models, including GPT-2, OPT, Vicuna, and LLaMA-2, and also be adaptable to models of different sizes.

UC San Diego Health System (US)
Openalex Percentile: Top 14%
Numerical Methods and Algorithms
1.50
AI Navigator

Ask Laika to Summarize, Analyze, and Connect papers live on the map.

Summarize Papers & Methodologies

Extract key findings, datasets, and comparative methods across publications.

Benchmark Rankings & Visual Analytics

Rank top research institutions, authors, funders, topics, and journals by Field-Weighted Citation Impact (FWCI) and paper volume with instant charts.

Connect Distant Disciplines

Bridge topological clusters on the map to find hidden collaborative intersections.

Direct Prompt Optimization with Continuous Representations — Yangkun Wang, Jingbo Shang, et al. · (2025) | TGRS Research Map | TGRS