{"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/less-selecting-influential-data-for-targeted","title":"LESS: Selecting Influential Data for Targeted Instruction Tuning","arxiv_id":"2402.04333","date":"2024-02-06","proceeding":null,"authors":["Mengzhou Xia","Sadhika Malladi","Suchin Gururangan","Sanjeev Arora","Danqi Chen"],"abstract":"Instruction tuning has unlocked powerful capabilities in large language models (LLMs), effectively using combined datasets to develop generalpurpose chatbots. However, real-world applications often require a specialized suite of skills (e.g., reasoning). The challenge lies in identifying the most relevant data from these extensive datasets to effectively develop specific capabilities, a setting we frame as targeted instruction tuning. We propose LESS, an optimizer-aware and practically efficient algorithm to effectively estimate data influences and perform Low-rank gradiEnt Similarity Search for instruction data selection. Crucially, LESS adapts existing influence formulations to work with the Adam optimizer and variable-length instruction data. LESS first constructs a highly reusable and transferable gradient datastore with low-dimensional gradient features and then selects examples based on their similarity to few-shot examples embodying a specific capability. Experiments show that training on a LESS-selected 5% of the data can often outperform training on the full dataset across diverse downstream tasks. Furthermore, the selected data is highly transferable: smaller models can be leveraged to select useful data for larger models and models from different families. Our qualitative analysis shows that our method goes beyond surface form cues to identify data that exemplifies the necessary reasoning skills for the intended downstream application.","url_abs":"https://arxiv.org/abs/2402.04333v3","url_pdf":"https://arxiv.org/pdf/2402.04333v3.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":"less-selecting-influential-data-for-targeted","repo_url":"https://github.com/princeton-nlp/less","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok","spdx":"MIT"}},{"paper_slug":"less-selecting-influential-data-for-targeted","repo_url":"https://github.com/hamishivi/automated-instruction-selection","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"pytorch","reach":null},{"paper_slug":"less-selecting-influential-data-for-targeted","repo_url":"https://github.com/oseyosey/ccds","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok","spdx":"Apache-2.0"}}],"tasks":[],"methods":[{"method_slug":"adam","method_name":"Adam"}],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"atlas_url":"https://app.syntology.ai/?focus=2402.04333","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2402.04333"}},"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/oseyosey/ccds","reach":{"status":"ok","spdx":"Apache-2.0"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/hamishivi/automated-instruction-selection","reach":null},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/princeton-nlp/less","reach":{"status":"ok","spdx":"MIT"}}],"summary":{"ran":1,"ran_fixture":1,"unverified":13},"by_repo_kind":{"official":{"samples":14,"ran":1,"repositories":1},"listed":{"samples":1,"ran":1,"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":1,"samples":[{"code_sha256_prefix":"a0e56e68f27c8749","entry":"get_bbh_dataset","repo":"princeton-nlp/less","repo_kind":"official","path":"less/data_selection/get_validation_dataset.py","file_url":"https://github.com/princeton-nlp/less/blob/HEAD/less/data_selection/get_validation_dataset.py","link_basis":"harvester_set","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"a0e56e68f27c8749"}},{"code_sha256_prefix":"2f322da1192bcee1","entry":"mean_pool","repo":"hamishivi/automated-instruction-selection","repo_kind":"listed","path":"minimal_multitask/compute_influence_ccds_embedding.py","file_url":"https://github.com/hamishivi/automated-instruction-selection/blob/HEAD/minimal_multitask/compute_influence_ccds_embedding.py","link_basis":"first_harvest_node","language":"python","status":"ran_fixture","verification_level":1,"contract_check":"RAISES","metamorphic_tier":"invariant","behaviour_fingerprint":true,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"2f322da1192bcee1"}},{"code_sha256_prefix":"8553c4772e3764ad","entry":"calculate_influence_score","repo":"princeton-nlp/less","repo_kind":"official","path":"less/data_selection/matching.py","file_url":"https://github.com/princeton-nlp/less/blob/HEAD/less/data_selection/matching.py","link_basis":"plan_row","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":"8553c4772e3764ad"}},{"code_sha256_prefix":"44e3cec9ab30944c","entry":"count_lines","repo":"princeton-nlp/less","repo_kind":"official","path":"less/data_selection/write_selected_data.py","file_url":"https://github.com/princeton-nlp/less/blob/HEAD/less/data_selection/write_selected_data.py","link_basis":"plan_row","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":"44e3cec9ab30944c"}},{"code_sha256_prefix":"dfe736d72f7fb77f","entry":"dispatch_openai_chat_requesets","repo":"princeton-nlp/less","repo_kind":"official","path":"evaluation/eval/dispatch_openai_requests.py","file_url":"https://github.com/princeton-nlp/less/blob/HEAD/evaluation/eval/dispatch_openai_requests.py","link_basis":"harvester_set","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":"dfe736d72f7fb77f"}},{"code_sha256_prefix":"394a6cf6a2b821be","entry":"dispatch_openai_prompt_requesets","repo":"princeton-nlp/less","repo_kind":"official","path":"evaluation/eval/dispatch_openai_requests.py","file_url":"https://github.com/princeton-nlp/less/blob/HEAD/evaluation/eval/dispatch_openai_requests.py","link_basis":"harvester_set","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":"394a6cf6a2b821be"}},{"code_sha256_prefix":"25035506ff07d0a3","entry":"encode_data","repo":"princeton-nlp/less","repo_kind":"official","path":"less/data_selection/get_training_dataset.py","file_url":"https://github.com/princeton-nlp/less/blob/HEAD/less/data_selection/get_training_dataset.py","link_basis":"harvester_set","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":"25035506ff07d0a3"}},{"code_sha256_prefix":"fc5b455108e53a6e","entry":"get_data_statistics","repo":"princeton-nlp/less","repo_kind":"official","path":"less/train/data_arguments.py","file_url":"https://github.com/princeton-nlp/less/blob/HEAD/less/train/data_arguments.py","link_basis":"harvester_set","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":"fc5b455108e53a6e"}},{"code_sha256_prefix":"ed43dd7816626e87","entry":"get_max_saved_index","repo":"princeton-nlp/less","repo_kind":"official","path":"less/data_selection/collect_grad_reps.py","file_url":"https://github.com/princeton-nlp/less/blob/HEAD/less/data_selection/collect_grad_reps.py","link_basis":"harvester_set","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":"ed43dd7816626e87"}},{"code_sha256_prefix":"808c09bce5840bb9","entry":"get_output","repo":"princeton-nlp/less","repo_kind":"official","path":"less/data_selection/collect_grad_reps.py","file_url":"https://github.com/princeton-nlp/less/blob/HEAD/less/data_selection/collect_grad_reps.py","link_basis":"harvester_set","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":"808c09bce5840bb9"}},{"code_sha256_prefix":"60e79b646b63ed0d","entry":"get_training_dataset","repo":"princeton-nlp/less","repo_kind":"official","path":"less/data_selection/get_training_dataset.py","file_url":"https://github.com/princeton-nlp/less/blob/HEAD/less/data_selection/get_training_dataset.py","link_basis":"harvester_set","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":"60e79b646b63ed0d"}},{"code_sha256_prefix":"876de2383ce7af06","entry":"get_tydiqa_dataset","repo":"princeton-nlp/less","repo_kind":"official","path":"less/data_selection/get_validation_dataset.py","file_url":"https://github.com/princeton-nlp/less/blob/HEAD/less/data_selection/get_validation_dataset.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":"876de2383ce7af06"}},{"code_sha256_prefix":"312258b87e676409","entry":"load_raw_dataset","repo":"princeton-nlp/less","repo_kind":"official","path":"less/data_selection/get_training_dataset.py","file_url":"https://github.com/princeton-nlp/less/blob/HEAD/less/data_selection/get_training_dataset.py","link_basis":"harvester_set","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":"312258b87e676409"}},{"code_sha256_prefix":"12b6473bde25b1dd","entry":"none_or_str","repo":"princeton-nlp/less","repo_kind":"official","path":"less/train/data_arguments.py","file_url":"https://github.com/princeton-nlp/less/blob/HEAD/less/train/data_arguments.py","link_basis":"harvester_set","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":"12b6473bde25b1dd"}},{"code_sha256_prefix":"5d4f58c63866080e","entry":"tokenize","repo":"princeton-nlp/less","repo_kind":"official","path":"less/data_selection/get_validation_dataset.py","file_url":"https://github.com/princeton-nlp/less/blob/HEAD/less/data_selection/get_validation_dataset.py","link_basis":"harvester_set","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":"5d4f58c63866080e"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}