{"about":{"site":"https://codewithpapers.app","non_affiliation":"Code with Papers and Syntology are not affiliated with, endorsed by, or sponsored by Papers with Code, Meta, or the pwc-archive mirror.","licence":"CC BY-SA 4.0","licence_url":"https://creativecommons.org/licenses/by-sa/4.0/legalcode","attribution":"https://codewithpapers.app/attribution","modified":"archive material modified by Syntology; see the attribution page"},"url":"/paper/arxiv-2510-25808","title":"PRESTO: Preimage-Informed Instruction Optimization for Prompting Black-Box LLMs","arxiv_id":"2510.25808","date":"2025-10-29","proceeding":"NeurIPS","authors":["Jaewon Chu","Seunghun Lee","Hyunwoo J. Kim"],"abstract":"Large language models (LLMs) have achieved remarkable success across diverse domains, due to their strong instruction-following capabilities. This has led to increasing interest in optimizing instructions for black-box LLMs, whose internal parameters are inaccessible but widely used due to their strong performance. To optimize instructions for black-box LLMs, recent methods employ white-box LLMs to generate candidate instructions from optimized soft prompts. However, white-box LLMs often map different soft prompts to the same instruction, leading to redundant queries. While previous studies regarded this many-to-one mapping as a structure that hinders optimization efficiency, we reinterpret it as a useful prior knowledge that can accelerate the optimization. To this end, we introduce PREimage-informed inSTruction Optimization (PRESTO), a novel framework that leverages the preimage structure of soft prompts for efficient optimization. PRESTO consists of three key components: (1) score sharing, which shares the evaluation score with all soft prompts in a preimage; (2) preimage-based initialization, which selects initial data points that maximize search space coverage using preimage information; and (3) score consistency regularization, which enforces prediction consistency within each preimage. By leveraging preimages, PRESTO achieves the effect of effectively obtaining 14 times more scored data under the same query budget, resulting in more efficient optimization. Experimental results on 33 instruction optimization tasks demonstrate the superior performance of PRESTO. Code is available at https://github.com/mlvlab/PRESTO","url_abs":"https://arxiv.org/abs/2510.25808","url_pdf":"https://arxiv.org/pdf/2510.25808","source":{"archive":null,"snapshot":"2025-07-28","note":"not in the Papers with Code archive (frozen at the snapshot)","row_kind":"graph","title_abstract_authors_date":"arXiv metadata, CC0 1.0 (https://info.arxiv.org/help/license)"},"code_links":[],"tasks":[],"methods":[],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"syntology_url":null,"atlas_url":"https://app.syntology.ai/?focus=2510.25808","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2510.25808"}},"developers":"https://syntology.ai/developers","read_at":"2026-09-24T18:15:14+00:00","read_at_is":"when the build read Syntology's graph, not when any sample ran","claim":"Per-sample execution status on synthesized fixtures; not a correctness claim about the paper. Samples come from repositories linked to the paper, official or community; repo_kind says which.","repos":[{"mentioned_in_github":null,"is_official":null,"provenance":"deterministic:regex_extraction","mentioned_in_paper":null,"url":"https://github.com/mlvlab/PRESTO","reach":{"status":"ok","spdx":"MIT"}}],"summary":{"ran_draft_wrong":2,"unverified":18},"by_repo_kind":{"found_in_text":{"samples":20,"ran":2,"repositories":1}},"repo_kind_vocabulary":{"official":"The archive marks this repository official for the paper","named_in_paper":"The archive records that the paper mentions this repository; it is not marked official","listed":"In the archive's code links for this paper, not marked official and not recorded as mentioned in the paper","found_in_text":"Syntology found this repository in the paper's own text; whether it is the authors' implementation is not asserted","community":"Not in the archive's code links for this paper; a community repository Syntology harvested"},"n_pointer_only_for_licence":0,"samples":[{"code_sha256_prefix":"71e7c70faf29eeee","entry":"get_query","repo":"mlvlab/PRESTO","repo_kind":"found_in_text","path":"Induction/automatic_prompt_engineer/generate.py","file_url":"https://github.com/mlvlab/PRESTO/blob/HEAD/Induction/automatic_prompt_engineer/generate.py","link_basis":"plan_row","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"OUTPUT_MISDECLARED","metamorphic_tier":"deterministic","behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"71e7c70faf29eeee"}},{"code_sha256_prefix":"7f64a5a312597651","entry":"get_simple_prompt_gen_template","repo":"mlvlab/PRESTO","repo_kind":"found_in_text","path":"Induction/automatic_prompt_engineer/ape.py","file_url":"https://github.com/mlvlab/PRESTO/blob/HEAD/Induction/automatic_prompt_engineer/ape.py","link_basis":"plan_row","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"OUTPUT_MISDECLARED","metamorphic_tier":"deterministic","behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"7f64a5a312597651"}},{"code_sha256_prefix":"54a01589a9986a91","entry":"compute_pairwise_distances","repo":"mlvlab/PRESTO","repo_kind":"found_in_text","path":"Induction/experiments/group_init.py","file_url":"https://github.com/mlvlab/PRESTO/blob/HEAD/Induction/experiments/group_init.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"54a01589a9986a91"}},{"code_sha256_prefix":"45e36251f3ce30f3","entry":"create_split","repo":"mlvlab/PRESTO","repo_kind":"found_in_text","path":"Induction/automatic_prompt_engineer/data.py","file_url":"https://github.com/mlvlab/PRESTO/blob/HEAD/Induction/automatic_prompt_engineer/data.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"45e36251f3ce30f3"}},{"code_sha256_prefix":"c5362131706391ce","entry":"dispatch_openai_requests","repo":"mlvlab/PRESTO","repo_kind":"found_in_text","path":"Induction/automatic_prompt_engineer/llm.py","file_url":"https://github.com/mlvlab/PRESTO/blob/HEAD/Induction/automatic_prompt_engineer/llm.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"c5362131706391ce"}},{"code_sha256_prefix":"9482586da5ffae93","entry":"evaluate_prompts","repo":"mlvlab/PRESTO","repo_kind":"found_in_text","path":"Induction/automatic_prompt_engineer/evaluate.py","file_url":"https://github.com/mlvlab/PRESTO/blob/HEAD/Induction/automatic_prompt_engineer/evaluate.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"9482586da5ffae93"}},{"code_sha256_prefix":"a1b40d6e869a8f1f","entry":"find_instruction_by_embedding","repo":"mlvlab/PRESTO","repo_kind":"found_in_text","path":"Induction/experiments/run_neural_bandits.py","file_url":"https://github.com/mlvlab/PRESTO/blob/HEAD/Induction/experiments/run_neural_bandits.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"a1b40d6e869a8f1f"}},{"code_sha256_prefix":"8ce226c0bcf25c54","entry":"get_em_score","repo":"mlvlab/PRESTO","repo_kind":"found_in_text","path":"Induction/experiments/evaluation/instruction_induction/utility.py","file_url":"https://github.com/mlvlab/PRESTO/blob/HEAD/Induction/experiments/evaluation/instruction_induction/utility.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"8ce226c0bcf25c54"}},{"code_sha256_prefix":"0c411a4f76c7ad8a","entry":"get_eval_method","repo":"mlvlab/PRESTO","repo_kind":"found_in_text","path":"Induction/automatic_prompt_engineer/evaluate.py","file_url":"https://github.com/mlvlab/PRESTO/blob/HEAD/Induction/automatic_prompt_engineer/evaluate.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"0c411a4f76c7ad8a"}},{"code_sha256_prefix":"808b015d44c5a6ca","entry":"get_f1_score","repo":"mlvlab/PRESTO","repo_kind":"found_in_text","path":"Induction/experiments/evaluation/instruction_induction/utility.py","file_url":"https://github.com/mlvlab/PRESTO/blob/HEAD/Induction/experiments/evaluation/instruction_induction/utility.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"808b015d44c5a6ca"}},{"code_sha256_prefix":"9475219c55847f4d","entry":"get_query","repo":"mlvlab/PRESTO","repo_kind":"found_in_text","path":"Induction/experiments/evaluation/instruction_induction/exec_accuracy.py","file_url":"https://github.com/mlvlab/PRESTO/blob/HEAD/Induction/experiments/evaluation/instruction_induction/exec_accuracy.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"9475219c55847f4d"}},{"code_sha256_prefix":"1234b906d7281cd2","entry":"get_query_for_test","repo":"mlvlab/PRESTO","repo_kind":"found_in_text","path":"Induction/experiments/evaluation/instruction_induction/exec_accuracy.py","file_url":"https://github.com/mlvlab/PRESTO/blob/HEAD/Induction/experiments/evaluation/instruction_induction/exec_accuracy.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"1234b906d7281cd2"}},{"code_sha256_prefix":"c5fbe85a81a540d2","entry":"linear_rampup","repo":"mlvlab/PRESTO","repo_kind":"found_in_text","path":"Induction/experiments/LlamaForMLPRegression.py","file_url":"https://github.com/mlvlab/PRESTO/blob/HEAD/Induction/experiments/LlamaForMLPRegression.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"c5fbe85a81a540d2"}},{"code_sha256_prefix":"e5b1507763dcab0c","entry":"median_heuristic","repo":"mlvlab/PRESTO","repo_kind":"found_in_text","path":"Induction/experiments/group_init.py","file_url":"https://github.com/mlvlab/PRESTO/blob/HEAD/Induction/experiments/group_init.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"e5b1507763dcab0c"}},{"code_sha256_prefix":"5e6fa6db2e25e3b1","entry":"model_from_config","repo":"mlvlab/PRESTO","repo_kind":"found_in_text","path":"Induction/automatic_prompt_engineer/llm.py","file_url":"https://github.com/mlvlab/PRESTO/blob/HEAD/Induction/automatic_prompt_engineer/llm.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"5e6fa6db2e25e3b1"}},{"code_sha256_prefix":"d743b4d4da5336f3","entry":"normalize_prediction","repo":"mlvlab/PRESTO","repo_kind":"found_in_text","path":"Induction/experiments/evaluation/instruction_induction/utility.py","file_url":"https://github.com/mlvlab/PRESTO/blob/HEAD/Induction/experiments/evaluation/instruction_induction/utility.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"d743b4d4da5336f3"}},{"code_sha256_prefix":"8f8d6fbf5fb316d4","entry":"rbf_kernel","repo":"mlvlab/PRESTO","repo_kind":"found_in_text","path":"Induction/experiments/group_init.py","file_url":"https://github.com/mlvlab/PRESTO/blob/HEAD/Induction/experiments/group_init.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"8f8d6fbf5fb316d4"}},{"code_sha256_prefix":"c974b8fb4e952424","entry":"simple_config","repo":"mlvlab/PRESTO","repo_kind":"found_in_text","path":"Induction/automatic_prompt_engineer/config.py","file_url":"https://github.com/mlvlab/PRESTO/blob/HEAD/Induction/automatic_prompt_engineer/config.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"c974b8fb4e952424"}},{"code_sha256_prefix":"01ed101f1dc9de50","entry":"subsample_data","repo":"mlvlab/PRESTO","repo_kind":"found_in_text","path":"Induction/automatic_prompt_engineer/data.py","file_url":"https://github.com/mlvlab/PRESTO/blob/HEAD/Induction/automatic_prompt_engineer/data.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"01ed101f1dc9de50"}},{"code_sha256_prefix":"cef07a073378dd0c","entry":"update_config","repo":"mlvlab/PRESTO","repo_kind":"found_in_text","path":"Induction/automatic_prompt_engineer/config.py","file_url":"https://github.com/mlvlab/PRESTO/blob/HEAD/Induction/automatic_prompt_engineer/config.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"cef07a073378dd0c"}}]},"arxiv_metadata":{"licence":"arXiv metadata, CC0 1.0 (https://info.arxiv.org/help/license)","fields":["title","abstract","authors","date"],"primary_category":"cs.LG","source":"arxiv_api"},"syntology_extracted_results":null}