{"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/dids-domain-impact-aware-data-sampling-for","title":"DIDS: Domain Impact-aware Data Sampling for Large Language Model Training","arxiv_id":"2504.13227","date":"2025-04-17","proceeding":null,"authors":["Weijie Shi","Jipeng Zhang","Yaguang Wu","Jingzhi Fang","Ruiyuan Zhang","Jiajie Xu","Jia Zhu","Hao Chen","Yao Zhao","Sirui Han","Xiaofang Zhou"],"abstract":"Large language models (LLMs) are commonly trained on multi-domain datasets, where domain sampling strategies significantly impact model performance due to varying domain importance across downstream tasks. Existing approaches for optimizing domain-level sampling strategies struggle with maintaining intra-domain consistency and accurately measuring domain impact. In this paper, we present Domain Impact-aware Data Sampling (DIDS). To ensure intra-domain consistency, a gradient clustering algorithm is proposed to group training data based on their learning effects, where a proxy language model and dimensionality reduction are employed to reduce computational overhead. To accurately measure domain impact, we develop a Fisher Information Matrix (FIM) guided metric that quantifies how domain-specific parameter updates affect the model's output distributions on downstream tasks, with theoretical guarantees. Furthermore, to determine optimal sampling ratios, DIDS combines both the FIM-guided domain impact assessment and loss learning trajectories that indicate domain-specific potential, while accounting for diminishing marginal returns. Extensive experiments demonstrate that DIDS achieves 3.4% higher average performance while maintaining comparable training efficiency.","url_abs":"https://arxiv.org/abs/2504.13227v1","url_pdf":"https://arxiv.org/pdf/2504.13227v1.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":[],"tasks":[{"task_slug":"dimensionality-reduction","task_name":"Dimensionality Reduction"},{"task_slug":"language-modeling","task_name":"Language Modeling"},{"task_slug":"language-modelling","task_name":"Language Modelling"},{"task_slug":"large-language-model","task_name":"Large Language Model"}],"methods":[],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"atlas_url":"https://app.syntology.ai/?focus=2504.13227","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2504.13227"}},"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":"deterministic:regex_extraction","url":"https://github.com/shiweijiezero/DIDS","reach":null}],"summary":{"ran_honours":1,"unverified":3},"by_repo_kind":{"found_in_text":{"samples":4,"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":4,"samples":[{"code_sha256_prefix":"fd1f970ef01c8ac4","entry":"calculate_potential_factor","repo":"shiweijiezero/DIDS","repo_kind":"found_in_text","path":"mixture_DIDS.py","file_url":"https://github.com/shiweijiezero/DIDS/blob/HEAD/mixture_DIDS.py","link_basis":"first_harvest_node","language":"python","status":"ran_honours","verification_level":1,"contract_check":"HONOURS","metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"fd1f970ef01c8ac4"}},{"code_sha256_prefix":"99a3cf549d7d3bf3","entry":"DIDS_mixture_multi_task","repo":"shiweijiezero/DIDS","repo_kind":"found_in_text","path":"mixture_DIDS.py","file_url":"https://github.com/shiweijiezero/DIDS/blob/HEAD/mixture_DIDS.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":"99a3cf549d7d3bf3"}},{"code_sha256_prefix":"b06cefcab3772947","entry":"compute_DIDS_FIM","repo":"shiweijiezero/DIDS","repo_kind":"found_in_text","path":"mixture_DIDS.py","file_url":"https://github.com/shiweijiezero/DIDS/blob/HEAD/mixture_DIDS.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":"b06cefcab3772947"}},{"code_sha256_prefix":"643253d073e11e48","entry":"compute_fisher_matrix_diagonal","repo":"shiweijiezero/DIDS","repo_kind":"found_in_text","path":"mixture_DIDS.py","file_url":"https://github.com/shiweijiezero/DIDS/blob/HEAD/mixture_DIDS.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":"643253d073e11e48"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}