{"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/constraint-back-translation-improves-complex","title":"Constraint Back-translation Improves Complex Instruction Following of Large Language Models","arxiv_id":"2410.24175","date":"2024-10-31","proceeding":null,"authors":["Yunjia Qi","Hao Peng","Xiaozhi Wang","Bin Xu","Lei Hou","Juanzi Li"],"abstract":"Large language models (LLMs) struggle to follow instructions with complex constraints in format, length, etc. Following the conventional instruction-tuning practice, previous works conduct post-training on complex instruction-response pairs generated by feeding complex instructions to advanced LLMs. However, even advanced LLMs cannot follow complex instructions well, thus limiting the quality of generated data. In this work, we find that existing datasets inherently contain implicit complex constraints and propose a novel data generation technique, constraint back-translation. Specifically, we take the high-quality instruction-response pairs in existing datasets and only adopt advanced LLMs to add complex constraints already met by the responses to the instructions, which naturally reduces costs and data noise. In the experiments, we adopt Llama3-70B-Instruct to back-translate constraints and create a high-quality complex instruction-response dataset, named CRAB. We present that post-training on CRAB improves multiple backbone LLMs' complex instruction-following ability, evaluated on extensive instruction-following benchmarks. We further find that constraint back-translation also serves as a useful auxiliary training objective in post-training. Our code, data, and models will be released to facilitate future research.","url_abs":"https://arxiv.org/abs/2410.24175v2","url_pdf":"https://arxiv.org/pdf/2410.24175v2.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":"constraint-back-translation-improves-complex","repo_url":"https://github.com/thu-keg/crab","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":1,"framework":"none","reach":{"status":"ok"}}],"tasks":[{"task_slug":"instruction-following","task_name":"Instruction Following"},{"task_slug":"translation","task_name":"Translation"}],"methods":[],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"atlas_url":"https://app.syntology.ai/?focus=2410.24175","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2410.24175"}},"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/thu-keg/crab","reach":{"status":"ok"}}],"summary":{"unverified":9},"by_repo_kind":{"official":{"samples":9,"ran":0,"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":9,"samples":[{"code_sha256_prefix":"6702f715539041e5","entry":"chat_formatting_function","repo":"thu-keg/crab","repo_kind":"official","path":"eval/predict_others.py","file_url":"https://github.com/thu-keg/crab/blob/HEAD/eval/predict_others.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"6702f715539041e5"}},{"code_sha256_prefix":"0e3968185d0ee850","entry":"create_prompt_with_llama3_base_format","repo":"thu-keg/crab","repo_kind":"official","path":"eval/templates.py","file_url":"https://github.com/thu-keg/crab/blob/HEAD/eval/templates.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"0e3968185d0ee850"}},{"code_sha256_prefix":"cbabfb49e6ea38b2","entry":"create_prompt_with_llama3_chat_format","repo":"thu-keg/crab","repo_kind":"official","path":"eval/templates.py","file_url":"https://github.com/thu-keg/crab/blob/HEAD/eval/templates.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"cbabfb49e6ea38b2"}},{"code_sha256_prefix":"697d92a5d51eff3e","entry":"create_prompt_with_tulu_chat_format","repo":"thu-keg/crab","repo_kind":"official","path":"eval/templates.py","file_url":"https://github.com/thu-keg/crab/blob/HEAD/eval/templates.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"697d92a5d51eff3e"}},{"code_sha256_prefix":"dcad9ac62979ca49","entry":"dispatch_openai_chat_requesets","repo":"thu-keg/crab","repo_kind":"official","path":"eval/dispatch_openai_requests.py","file_url":"https://github.com/thu-keg/crab/blob/HEAD/eval/dispatch_openai_requests.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"dcad9ac62979ca49"}},{"code_sha256_prefix":"71e4259026911444","entry":"dispatch_openai_prompt_requesets","repo":"thu-keg/crab","repo_kind":"official","path":"eval/dispatch_openai_requests.py","file_url":"https://github.com/thu-keg/crab/blob/HEAD/eval/dispatch_openai_requests.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"71e4259026911444"}},{"code_sha256_prefix":"cdbcc01805fac313","entry":"generate_completions","repo":"thu-keg/crab","repo_kind":"official","path":"eval/utils.py","file_url":"https://github.com/thu-keg/crab/blob/HEAD/eval/utils.py","link_basis":"plan_row","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"cdbcc01805fac313"}},{"code_sha256_prefix":"d134c88af0236263","entry":"get_next_word_predictions","repo":"thu-keg/crab","repo_kind":"official","path":"eval/utils.py","file_url":"https://github.com/thu-keg/crab/blob/HEAD/eval/utils.py","link_basis":"plan_row","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"d134c88af0236263"}},{"code_sha256_prefix":"d029fa02758da921","entry":"score_completions","repo":"thu-keg/crab","repo_kind":"official","path":"eval/utils.py","file_url":"https://github.com/thu-keg/crab/blob/HEAD/eval/utils.py","link_basis":"plan_row","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"d029fa02758da921"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}