{"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/trove-inducing-verifiable-and-efficient","title":"TroVE: Inducing Verifiable and Efficient Toolboxes for Solving Programmatic Tasks","arxiv_id":"2401.12869","date":"2024-01-23","proceeding":null,"authors":["Zhiruo Wang","Daniel Fried","Graham Neubig"],"abstract":"Language models (LMs) can solve tasks such as answering questions about tables or images by writing programs. However, using primitive functions often leads to verbose and error-prone programs, and higher-level functions require expert design. To enable better solutions without human labor, we ask code LMs to curate reusable high-level functions, and use them to write solutions. We present TROVE, a training-free method of inducing a verifiable and efficient toolbox of functions, by generating via using, growing, and periodically trimming the toolbox. On 11 datasets from math, table question answering, and image reasoning tasks, TROVE consistently yields simpler solutions with higher accuracy than baselines using CODELLAMA and previous methods using GPT, while using 79-98% smaller toolboxes. TROVE further enables 31% faster and 13% more accurate human verification than baselines. With the same pipeline, it creates diverse functions for varied tasks and datasets, providing insights into their individual characteristics.","url_abs":"https://arxiv.org/abs/2401.12869v1","url_pdf":"https://arxiv.org/pdf/2401.12869v1.pdf","source":{"archive":"pwc-archive (Hugging Face), CC BY-SA 4.0","snapshot":"2025-07-28","licence_url":"https://creativecommons.org/licenses/by-sa/4.0/legalcode","row_kind":"abstracts"},"code_links":[{"paper_slug":"trove-inducing-verifiable-and-efficient","repo_url":"https://github.com/zorazrw/trove","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":0,"framework":"none","reach":{"status":"ok","spdx":"CC-BY-SA-4.0"}}],"tasks":[{"task_slug":"math","task_name":"Math"},{"task_slug":"question-answering","task_name":"Question Answering"}],"methods":[{"method_slug":"adam","method_name":"Adam"},{"method_slug":"attention","method_name":"Attention"},{"method_slug":"attention-dropout","method_name":"Attention Dropout"},{"method_slug":"bpe","method_name":"BPE"},{"method_slug":"cosine-annealing","method_name":"Cosine Annealing"},{"method_slug":"dense-connections","method_name":"Dense Connections"},{"method_slug":"discriminative-fine-tuning","method_name":"Discriminative Fine-Tuning"},{"method_slug":"dropout","method_name":"Dropout"},{"method_slug":"gpt","method_name":"GPT"},{"method_slug":"layer-normalization","method_name":"Layer Normalization"},{"method_slug":"linear-layer","method_name":"Linear Layer"},{"method_slug":"linear-warmup-with-cosine-annealing","method_name":"Linear Warmup With Cosine Annealing"},{"method_slug":"multi-head-attention","method_name":"Multi-Head Attention"},{"method_slug":"residual-connection","method_name":"Residual Connection"},{"method_slug":"softmax","method_name":"Softmax"},{"method_slug":"weight-decay","method_name":"Weight Decay"}],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"atlas_url":"https://app.syntology.ai/?focus=2401.12869","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2401.12869"}},"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":[{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/zorazrw/trove","reach":{"status":"ok","spdx":"CC-BY-SA-4.0"}}],"summary":{"ran":16,"unverified":3},"by_repo_kind":{"official":{"samples":19,"ran":16,"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":19,"samples":[{"code_sha256_prefix":"9a504519dfd83076","entry":"auto_decide_path","repo":"zorazrw/trove","repo_kind":"official","path":"utils/log.py","file_url":"https://github.com/zorazrw/trove/blob/HEAD/utils/log.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"CC-BY-SA-4.0","inline_ok":false,"mcp_get_code":{"code_sha256":"9a504519dfd83076"}},{"code_sha256_prefix":"2ea5441e13a513df","entry":"clean_solution","repo":"zorazrw/trove","repo_kind":"official","path":"utils/parse.py","file_url":"https://github.com/zorazrw/trove/blob/HEAD/utils/parse.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"CC-BY-SA-4.0","inline_ok":false,"mcp_get_code":{"code_sha256":"2ea5441e13a513df"}},{"code_sha256_prefix":"913c8bc590a51bbd","entry":"crop_region","repo":"zorazrw/trove","repo_kind":"official","path":"toolbox/gqa.py","file_url":"https://github.com/zorazrw/trove/blob/HEAD/toolbox/gqa.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"CC-BY-SA-4.0","inline_ok":false,"mcp_get_code":{"code_sha256":"913c8bc590a51bbd"}},{"code_sha256_prefix":"6d8bc13b34a6a612","entry":"execute_code_wrapped","repo":"zorazrw/trove","repo_kind":"official","path":"utils/exec.py","file_url":"https://github.com/zorazrw/trove/blob/HEAD/utils/exec.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"CC-BY-SA-4.0","inline_ok":false,"mcp_get_code":{"code_sha256":"6d8bc13b34a6a612"}},{"code_sha256_prefix":"87eb65a5d8c78563","entry":"extract_code_pieces","repo":"zorazrw/trove","repo_kind":"official","path":"utils/code.py","file_url":"https://github.com/zorazrw/trove/blob/HEAD/utils/code.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"CC-BY-SA-4.0","inline_ok":false,"mcp_get_code":{"code_sha256":"87eb65a5d8c78563"}},{"code_sha256_prefix":"2ef1497b990ea912","entry":"extract_llama_response","repo":"zorazrw/trove","repo_kind":"official","path":"utils/parse.py","file_url":"https://github.com/zorazrw/trove/blob/HEAD/utils/parse.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"CC-BY-SA-4.0","inline_ok":false,"mcp_get_code":{"code_sha256":"2ef1497b990ea912"}},{"code_sha256_prefix":"5067924e54f1bd49","entry":"format_tabmwp_table_markdown","repo":"zorazrw/trove","repo_kind":"official","path":"utils/prompt.py","file_url":"https://github.com/zorazrw/trove/blob/HEAD/utils/prompt.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"CC-BY-SA-4.0","inline_ok":false,"mcp_get_code":{"code_sha256":"5067924e54f1bd49"}},{"code_sha256_prefix":"448fd3fb21ff71de","entry":"get_math_prompt_args","repo":"zorazrw/trove","repo_kind":"official","path":"utils/prompt.py","file_url":"https://github.com/zorazrw/trove/blob/HEAD/utils/prompt.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"CC-BY-SA-4.0","inline_ok":false,"mcp_get_code":{"code_sha256":"448fd3fb21ff71de"}},{"code_sha256_prefix":"4e04ce5ef7043221","entry":"get_tabmwp_prompt_args","repo":"zorazrw/trove","repo_kind":"official","path":"utils/prompt.py","file_url":"https://github.com/zorazrw/trove/blob/HEAD/utils/prompt.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"CC-BY-SA-4.0","inline_ok":false,"mcp_get_code":{"code_sha256":"4e04ce5ef7043221"}},{"code_sha256_prefix":"10355c2694a0be77","entry":"load_dataset","repo":"zorazrw/trove","repo_kind":"official","path":"utils/io.py","file_url":"https://github.com/zorazrw/trove/blob/HEAD/utils/io.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"CC-BY-SA-4.0","inline_ok":false,"mcp_get_code":{"code_sha256":"10355c2694a0be77"}},{"code_sha256_prefix":"73e7db04e65a4655","entry":"load_gqa_dataset","repo":"zorazrw/trove","repo_kind":"official","path":"utils/io.py","file_url":"https://github.com/zorazrw/trove/blob/HEAD/utils/io.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"CC-BY-SA-4.0","inline_ok":false,"mcp_get_code":{"code_sha256":"73e7db04e65a4655"}},{"code_sha256_prefix":"d3092b842d798b40","entry":"load_hf_model","repo":"zorazrw/trove","repo_kind":"official","path":"server/gqa.py","file_url":"https://github.com/zorazrw/trove/blob/HEAD/server/gqa.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"CC-BY-SA-4.0","inline_ok":false,"mcp_get_code":{"code_sha256":"d3092b842d798b40"}},{"code_sha256_prefix":"89498f1816854476","entry":"load_image","repo":"zorazrw/trove","repo_kind":"official","path":"server/gqa.py","file_url":"https://github.com/zorazrw/trove/blob/HEAD/server/gqa.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"CC-BY-SA-4.0","inline_ok":false,"mcp_get_code":{"code_sha256":"89498f1816854476"}},{"code_sha256_prefix":"edfde96f4e9f3b16","entry":"nms","repo":"zorazrw/trove","repo_kind":"official","path":"server/gqa.py","file_url":"https://github.com/zorazrw/trove/blob/HEAD/server/gqa.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"CC-BY-SA-4.0","inline_ok":false,"mcp_get_code":{"code_sha256":"edfde96f4e9f3b16"}},{"code_sha256_prefix":"1d3bfb6057c12f45","entry":"unwrap_code","repo":"zorazrw/trove","repo_kind":"official","path":"utils/code.py","file_url":"https://github.com/zorazrw/trove/blob/HEAD/utils/code.py","link_basis":"harvester_set","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"CC-BY-SA-4.0","inline_ok":false,"mcp_get_code":{"code_sha256":"1d3bfb6057c12f45"}},{"code_sha256_prefix":"d395da5577eb1d7b","entry":"wrap_code","repo":"zorazrw/trove","repo_kind":"official","path":"utils/code.py","file_url":"https://github.com/zorazrw/trove/blob/HEAD/utils/code.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"CC-BY-SA-4.0","inline_ok":false,"mcp_get_code":{"code_sha256":"d395da5577eb1d7b"}},{"code_sha256_prefix":"aafd75b585a3ce56","entry":"load_json_file","repo":"zorazrw/trove","repo_kind":"official","path":"utils/io.py","file_url":"https://github.com/zorazrw/trove/blob/HEAD/utils/io.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"CC-BY-SA-4.0","inline_ok":false,"mcp_get_code":{"code_sha256":"aafd75b585a3ce56"}},{"code_sha256_prefix":"9f881fbf73b7ac0c","entry":"locate_objects","repo":"zorazrw/trove","repo_kind":"official","path":"toolbox/gqa.py","file_url":"https://github.com/zorazrw/trove/blob/HEAD/toolbox/gqa.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"CC-BY-SA-4.0","inline_ok":false,"mcp_get_code":{"code_sha256":"9f881fbf73b7ac0c"}},{"code_sha256_prefix":"24aa9c874a8e65f6","entry":"visual_qa","repo":"zorazrw/trove","repo_kind":"official","path":"toolbox/gqa.py","file_url":"https://github.com/zorazrw/trove/blob/HEAD/toolbox/gqa.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"CC-BY-SA-4.0","inline_ok":false,"mcp_get_code":{"code_sha256":"24aa9c874a8e65f6"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}