{"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/clustering-and-ranking-diversity-preserved","title":"Clustering and Ranking: Diversity-preserved Instruction Selection through Expert-aligned Quality Estimation","arxiv_id":"2402.18191","date":"2024-02-28","proceeding":null,"authors":["Yuan Ge","Yilun Liu","Chi Hu","Weibin Meng","Shimin Tao","Xiaofeng Zhao","Hongxia Ma","Li Zhang","Boxing Chen","Hao Yang","Bei Li","Tong Xiao","Jingbo Zhu"],"abstract":"With contributions from the open-source community, a vast amount of instruction tuning (IT) data has emerged. Given the significant resource allocation required for training and evaluating models, it is advantageous to have an efficient method for selecting high-quality IT data. However, existing methods for instruction data selection have limitations such as relying on fragile external APIs, being affected by biases in GPT models, or reducing the diversity of the selected instruction dataset. In this paper, we propose an industrial-friendly, expert-aligned and diversity-preserved instruction data selection method: Clustering and Ranking (CaR). CaR employs a two-step process: first, it ranks instruction pairs using a high-accuracy (84.25%) scoring model aligned with expert preferences; second, it preserves dataset diversity through clustering. In our experiment, CaR efficiently selected a mere 1.96% of Alpaca's IT data, yet the resulting AlpaCaR model surpassed Alpaca's performance by an average of 32.1% in GPT-4 evaluations. Moreover, we find that data selecting is a consistent paradigm whether the pre-trained model is more capable or the model parameters scaling up. Our approach employs compact models with 550M parameters and incurs just 11.2% of the financial outlay of current methods, enhancing its industrial deployability.","url_abs":"https://arxiv.org/abs/2402.18191v3","url_pdf":"https://arxiv.org/pdf/2402.18191v3.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":"clustering-and-ranking-diversity-preserved","repo_url":"https://github.com/ironbeliever/car","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok"}}],"tasks":[{"task_slug":"clustering","task_name":"Clustering"},{"task_slug":"diversity","task_name":"Diversity"}],"methods":[{"method_slug":"absolute-position-encodings","method_name":"Absolute Position Encodings"},{"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":"gpt-4","method_name":"GPT-4"},{"method_slug":"label-smoothing","method_name":"Label Smoothing"},{"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":"position-wise-feed-forward-layer","method_name":"Position-Wise Feed-Forward Layer"},{"method_slug":"residual-connection","method_name":"Residual Connection"},{"method_slug":"softmax","method_name":"Softmax"},{"method_slug":"transformer","method_name":"Transformer"},{"method_slug":"weight-decay","method_name":"Weight Decay"}],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"atlas_url":"https://app.syntology.ai/?focus=2402.18191","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2402.18191"}},"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/ironbeliever/car","reach":{"status":"ok"}}],"summary":{"ran":6,"unverified":3},"by_repo_kind":{"official":{"samples":9,"ran":6,"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":"42452a89c72c37f0","entry":"average_pooling","repo":"ironbeliever/car","repo_kind":"official","path":"Ranking/comet/models/pooling_utils.py","file_url":"https://github.com/ironbeliever/car/blob/HEAD/Ranking/comet/models/pooling_utils.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"42452a89c72c37f0"}},{"code_sha256_prefix":"08d92f5dd3c3960b","entry":"mask_fill","repo":"ironbeliever/car","repo_kind":"official","path":"Ranking/comet/models/pooling_utils.py","file_url":"https://github.com/ironbeliever/car/blob/HEAD/Ranking/comet/models/pooling_utils.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"08d92f5dd3c3960b"}},{"code_sha256_prefix":"cc641273c7ff8762","entry":"max_pooling","repo":"ironbeliever/car","repo_kind":"official","path":"Ranking/comet/models/pooling_utils.py","file_url":"https://github.com/ironbeliever/car/blob/HEAD/Ranking/comet/models/pooling_utils.py","link_basis":"plan_row","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"cc641273c7ff8762"}},{"code_sha256_prefix":"a6fbb91c20e0aea7","entry":"restore_list_order","repo":"ironbeliever/car","repo_kind":"official","path":"Ranking/comet/models/utils.py","file_url":"https://github.com/ironbeliever/car/blob/HEAD/Ranking/comet/models/utils.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"a6fbb91c20e0aea7"}},{"code_sha256_prefix":"f2d3315526fe26ab","entry":"system_accuracy","repo":"ironbeliever/car","repo_kind":"official","path":"Ranking/comet/models/metrics.py","file_url":"https://github.com/ironbeliever/car/blob/HEAD/Ranking/comet/models/metrics.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"f2d3315526fe26ab"}},{"code_sha256_prefix":"340e451518ff61a6","entry":"tensor_lru_cache","repo":"ironbeliever/car","repo_kind":"official","path":"Ranking/comet/models/lru_cache.py","file_url":"https://github.com/ironbeliever/car/blob/HEAD/Ranking/comet/models/lru_cache.py","link_basis":"plan_row","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"340e451518ff61a6"}},{"code_sha256_prefix":"6bf30968085d2c23","entry":"download_file_maybe_extract","repo":"ironbeliever/car","repo_kind":"official","path":"Ranking/comet/models/download_utils.py","file_url":"https://github.com/ironbeliever/car/blob/HEAD/Ranking/comet/models/download_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":"6bf30968085d2c23"}},{"code_sha256_prefix":"a2cbbb14e3770c9f","entry":"download_model_legacy","repo":"ironbeliever/car","repo_kind":"official","path":"Ranking/comet/models/download_utils.py","file_url":"https://github.com/ironbeliever/car/blob/HEAD/Ranking/comet/models/download_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":"a2cbbb14e3770c9f"}},{"code_sha256_prefix":"2cd8926abe6cbe61","entry":"flatten_metadata","repo":"ironbeliever/car","repo_kind":"official","path":"Ranking/comet/models/utils.py","file_url":"https://github.com/ironbeliever/car/blob/HEAD/Ranking/comet/models/utils.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":"2cd8926abe6cbe61"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}