{"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/you-only-condense-once-two-rules-for-pruning-1","title":"You Only Condense Once: Two Rules for Pruning Condensed Datasets","arxiv_id":"2310.14019","date":"2023-10-21","proceeding":"NeurIPS 2023 11","authors":["Yang He","Lingao Xiao","Joey Tianyi Zhou"],"abstract":"Dataset condensation is a crucial tool for enhancing training efficiency by reducing the size of the training dataset, particularly in on-device scenarios. However, these scenarios have two significant challenges: 1) the varying computational resources available on the devices require a dataset size different from the pre-defined condensed dataset, and 2) the limited computational resources often preclude the possibility of conducting additional condensation processes. We introduce You Only Condense Once (YOCO) to overcome these limitations. On top of one condensed dataset, YOCO produces smaller condensed datasets with two embarrassingly simple dataset pruning rules: Low LBPE Score and Balanced Construction. YOCO offers two key advantages: 1) it can flexibly resize the dataset to fit varying computational constraints, and 2) it eliminates the need for extra condensation processes, which can be computationally prohibitive. Experiments validate our findings on networks including ConvNet, ResNet and DenseNet, and datasets including CIFAR-10, CIFAR-100 and ImageNet. For example, our YOCO surpassed various dataset condensation and dataset pruning methods on CIFAR-10 with ten Images Per Class (IPC), achieving 6.98-8.89% and 6.31-23.92% accuracy gains, respectively. The code is available at: https://github.com/he-y/you-only-condense-once.","url_abs":"https://arxiv.org/abs/2310.14019v1","url_pdf":"https://arxiv.org/pdf/2310.14019v1.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":"you-only-condense-once-two-rules-for-pruning-1","repo_url":"https://github.com/he-y/you-only-condense-once","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":0,"framework":"pytorch","reach":{"status":"ok"}}],"tasks":[{"task_slug":"dataset-condensation","task_name":"Dataset Condensation"}],"methods":[{"method_slug":"1x1-convolution","method_name":"1x1 Convolution"},{"method_slug":"average-pooling","method_name":"Average Pooling"},{"method_slug":"batch-normalization","method_name":"Batch Normalization"},{"method_slug":"bottleneck-residual-block","method_name":"Bottleneck Residual Block"},{"method_slug":"concatenated-skip-connection","method_name":"Concatenated Skip Connection"},{"method_slug":"convolution","method_name":"Convolution"},{"method_slug":"dataset-pruning","method_name":"Dataset Pruning"},{"method_slug":"dense-block","method_name":"Dense Block"},{"method_slug":"dense-connections","method_name":"Dense Connections"},{"method_slug":"dropout","method_name":"Dropout"},{"method_slug":"global-average-pooling","method_name":"Global Average Pooling"},{"method_slug":"kaiming-initialization","method_name":"Kaiming Initialization"},{"method_slug":"max-pooling","method_name":"Max Pooling"},{"method_slug":"pruning","method_name":"Pruning"},{"method_slug":"relu","method_name":"ReLU"},{"method_slug":"residual-block","method_name":"Residual Block"},{"method_slug":"residual-connection","method_name":"Residual Connection"},{"method_slug":"softmax","method_name":"Softmax"}],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"atlas_url":"https://app.syntology.ai/?focus=2310.14019","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2310.14019"}},"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/he-y/you-only-condense-once","reach":{"status":"ok"}}],"summary":{"ran":10,"ran_draft_wrong":2,"unverified":4},"by_repo_kind":{"official":{"samples":16,"ran":12,"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":16,"samples":[{"code_sha256_prefix":"19442a6a71144dbd","entry":"DenseNet121","repo":"he-y/you-only-condense-once","repo_kind":"official","path":"models/densenet_cifar.py","file_url":"https://github.com/he-y/you-only-condense-once/blob/HEAD/models/densenet_cifar.py","link_basis":"harvester_set","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":"19442a6a71144dbd"}},{"code_sha256_prefix":"96a2132550304d0d","entry":"DenseNet169","repo":"he-y/you-only-condense-once","repo_kind":"official","path":"models/densenet_cifar.py","file_url":"https://github.com/he-y/you-only-condense-once/blob/HEAD/models/densenet_cifar.py","link_basis":"harvester_set","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":"96a2132550304d0d"}},{"code_sha256_prefix":"8937ae0759fe135c","entry":"DenseNet201","repo":"he-y/you-only-condense-once","repo_kind":"official","path":"models/densenet_cifar.py","file_url":"https://github.com/he-y/you-only-condense-once/blob/HEAD/models/densenet_cifar.py","link_basis":"harvester_set","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":"8937ae0759fe135c"}},{"code_sha256_prefix":"fac5364e2f53c6db","entry":"conv3x3","repo":"he-y/you-only-condense-once","repo_kind":"official","path":"models/resnet.py","file_url":"https://github.com/he-y/you-only-condense-once/blob/HEAD/models/resnet.py","link_basis":"harvester_set","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"OUTPUT_MISDECLARED","metamorphic_tier":"deterministic","behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"fac5364e2f53c6db"}},{"code_sha256_prefix":"1b4af1f0c7b88a83","entry":"conv_stride1","repo":"he-y/you-only-condense-once","repo_kind":"official","path":"models/resnet_ap.py","file_url":"https://github.com/he-y/you-only-condense-once/blob/HEAD/models/resnet_ap.py","link_basis":"harvester_set","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":"1b4af1f0c7b88a83"}},{"code_sha256_prefix":"4465a2d4dff33240","entry":"decode_grad","repo":"he-y/you-only-condense-once","repo_kind":"official","path":"condense.py","file_url":"https://github.com/he-y/you-only-condense-once/blob/HEAD/condense.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"4465a2d4dff33240"}},{"code_sha256_prefix":"d923e828eed4fb87","entry":"ipc_epoch","repo":"he-y/you-only-condense-once","repo_kind":"official","path":"argument.py","file_url":"https://github.com/he-y/you-only-condense-once/blob/HEAD/argument.py","link_basis":"harvester_set","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"d923e828eed4fb87"}},{"code_sha256_prefix":"8aac35516308515a","entry":"normalization","repo":"he-y/you-only-condense-once","repo_kind":"official","path":"models/resnet.py","file_url":"https://github.com/he-y/you-only-condense-once/blob/HEAD/models/resnet.py","link_basis":"harvester_set","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":"8aac35516308515a"}},{"code_sha256_prefix":"8ba16d20cf03f09b","entry":"normalization","repo":"he-y/you-only-condense-once","repo_kind":"official","path":"models/resnet_ap.py","file_url":"https://github.com/he-y/you-only-condense-once/blob/HEAD/models/resnet_ap.py","link_basis":"harvester_set","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":"8ba16d20cf03f09b"}},{"code_sha256_prefix":"23bf22274cc64dc6","entry":"str2bool","repo":"he-y/you-only-condense-once","repo_kind":"official","path":"argument.py","file_url":"https://github.com/he-y/you-only-condense-once/blob/HEAD/argument.py","link_basis":"harvester_set","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"MISDECLARED","metamorphic_tier":"deterministic","behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"23bf22274cc64dc6"}},{"code_sha256_prefix":"52605edc9d326455","entry":"transform_cifar","repo":"he-y/you-only-condense-once","repo_kind":"official","path":"data.py","file_url":"https://github.com/he-y/you-only-condense-once/blob/HEAD/data.py","link_basis":"harvester_set","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":"52605edc9d326455"}},{"code_sha256_prefix":"fb78e314a9cbf5ff","entry":"tune_lr_img","repo":"he-y/you-only-condense-once","repo_kind":"official","path":"argument.py","file_url":"https://github.com/he-y/you-only-condense-once/blob/HEAD/argument.py","link_basis":"harvester_set","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":"fb78e314a9cbf5ff"}},{"code_sha256_prefix":"16ff48222284ce45","entry":"encode_grad","repo":"he-y/you-only-condense-once","repo_kind":"official","path":"condense.py","file_url":"https://github.com/he-y/you-only-condense-once/blob/HEAD/condense.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":"16ff48222284ce45"}},{"code_sha256_prefix":"e9adb33e803602e6","entry":"remove_prefix_checkpoint","repo":"he-y/you-only-condense-once","repo_kind":"official","path":"coreset.py","file_url":"https://github.com/he-y/you-only-condense-once/blob/HEAD/coreset.py","link_basis":"harvester_set","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":"e9adb33e803602e6"}},{"code_sha256_prefix":"5b2e2797a6da2cb5","entry":"transform_mnist","repo":"he-y/you-only-condense-once","repo_kind":"official","path":"data.py","file_url":"https://github.com/he-y/you-only-condense-once/blob/HEAD/data.py","link_basis":"harvester_set","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":"5b2e2797a6da2cb5"}},{"code_sha256_prefix":"4a3eef12c129ad96","entry":"transform_svhn","repo":"he-y/you-only-condense-once","repo_kind":"official","path":"data.py","file_url":"https://github.com/he-y/you-only-condense-once/blob/HEAD/data.py","link_basis":"harvester_set","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":"4a3eef12c129ad96"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}