{"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/deep-learning-on-a-data-diet-finding","title":"Deep Learning on a Data Diet: Finding Important Examples Early in Training","arxiv_id":"2107.07075","date":"2021-07-15","proceeding":"NeurIPS 2021 12","authors":["Mansheej Paul","Surya Ganguli","Gintare Karolina Dziugaite"],"abstract":"Recent success in deep learning has partially been driven by training increasingly overparametrized networks on ever larger datasets. It is therefore natural to ask: how much of the data is superfluous, which examples are important for generalization, and how do we find them? In this work, we make the striking observation that, in standard vision datasets, simple scores averaged over several weight initializations can be used to identify important examples very early in training. We propose two such scores -- the Gradient Normed (GraNd) and the Error L2-Norm (EL2N) scores -- and demonstrate their efficacy on a range of architectures and datasets by pruning significant fractions of training data without sacrificing test accuracy. In fact, using EL2N scores calculated a few epochs into training, we can prune half of the CIFAR10 training set while slightly improving test accuracy. Furthermore, for a given dataset, EL2N scores from one architecture or hyperparameter configuration generalize to other configurations. Compared to recent work that prunes data by discarding examples that are rarely forgotten over the course of training, our scores use only local information early in training. We also use our scores to detect noisy examples and study training dynamics through the lens of important examples -- we investigate how the data distribution shapes the loss surface and identify subspaces of the model's data representation that are relatively stable over training.","url_abs":"https://arxiv.org/abs/2107.07075v2","url_pdf":"https://arxiv.org/pdf/2107.07075v2.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":"deep-learning-on-a-data-diet-finding","repo_url":"https://github.com/mansheej/data_diet","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":0,"framework":"jax","reach":{"status":"ok","spdx":"Apache-2.0"}}],"tasks":[],"methods":[{"method_slug":"pruning","method_name":"Pruning"}],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"atlas_url":"https://app.syntology.ai/?focus=2107.07075","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2107.07075"}},"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/mansheej/data_diet","reach":{"status":"ok","spdx":"Apache-2.0"}}],"summary":{"ran_honours":1,"ran":3,"unverified":20},"by_repo_kind":{"official":{"samples":24,"ran":4,"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":0,"samples":[{"code_sha256_prefix":"9c77ed5f1b2a5cb5","entry":"flatten_jacobian","repo":"mansheej/data_diet","repo_kind":"official","path":"data_diet/gradients.py","file_url":"https://github.com/mansheej/data_diet/blob/HEAD/data_diet/gradients.py","link_basis":"plan_row","language":"python","status":"ran_honours","verification_level":1,"contract_check":"HONOURS","metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"9c77ed5f1b2a5cb5"}},{"code_sha256_prefix":"c231223cd0275ac9","entry":"get_apply_fn_test","repo":"mansheej/data_diet","repo_kind":"official","path":"data_diet/models.py","file_url":"https://github.com/mansheej/data_diet/blob/HEAD/data_diet/models.py","link_basis":"plan_row","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"c231223cd0275ac9"}},{"code_sha256_prefix":"63410cdc89b2ca7a","entry":"get_num_params","repo":"mansheej/data_diet","repo_kind":"official","path":"data_diet/models.py","file_url":"https://github.com/mansheej/data_diet/blob/HEAD/data_diet/models.py","link_basis":"plan_row","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"63410cdc89b2ca7a"}},{"code_sha256_prefix":"1250d55ffe8b6887","entry":"record_ckpt","repo":"mansheej/data_diet","repo_kind":"official","path":"data_diet/recorder.py","file_url":"https://github.com/mansheej/data_diet/blob/HEAD/data_diet/recorder.py","link_basis":"plan_row","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"1250d55ffe8b6887"}},{"code_sha256_prefix":"9303a55485ebdf1b","entry":"accuracy","repo":"mansheej/data_diet","repo_kind":"official","path":"data_diet/metrics.py","file_url":"https://github.com/mansheej/data_diet/blob/HEAD/data_diet/metrics.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"9303a55485ebdf1b"}},{"code_sha256_prefix":"8a4a165bf94a5845","entry":"compute_mean_logit_gradients","repo":"mansheej/data_diet","repo_kind":"official","path":"data_diet/gradients.py","file_url":"https://github.com/mansheej/data_diet/blob/HEAD/data_diet/gradients.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"8a4a165bf94a5845"}},{"code_sha256_prefix":"3d3a57e4ec59a580","entry":"correct","repo":"mansheej/data_diet","repo_kind":"official","path":"data_diet/metrics.py","file_url":"https://github.com/mansheej/data_diet/blob/HEAD/data_diet/metrics.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"3d3a57e4ec59a580"}},{"code_sha256_prefix":"b9fe6d146beff6d7","entry":"cross_entropy_loss","repo":"mansheej/data_diet","repo_kind":"official","path":"data_diet/metrics.py","file_url":"https://github.com/mansheej/data_diet/blob/HEAD/data_diet/metrics.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"b9fe6d146beff6d7"}},{"code_sha256_prefix":"139e98d082836d96","entry":"get_fn_params_state","repo":"mansheej/data_diet","repo_kind":"official","path":"data_diet/utils.py","file_url":"https://github.com/mansheej/data_diet/blob/HEAD/data_diet/utils.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"139e98d082836d96"}},{"code_sha256_prefix":"9c1e915d16795b09","entry":"get_grad_norm_fn","repo":"mansheej/data_diet","repo_kind":"official","path":"data_diet/scores.py","file_url":"https://github.com/mansheej/data_diet/blob/HEAD/data_diet/scores.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"9c1e915d16795b09"}},{"code_sha256_prefix":"54b551623acee6e1","entry":"get_lord_error_fn","repo":"mansheej/data_diet","repo_kind":"official","path":"data_diet/scores.py","file_url":"https://github.com/mansheej/data_diet/blob/HEAD/data_diet/scores.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"54b551623acee6e1"}},{"code_sha256_prefix":"1ed5a333966e05bc","entry":"get_margin_error","repo":"mansheej/data_diet","repo_kind":"official","path":"data_diet/scores.py","file_url":"https://github.com/mansheej/data_diet/blob/HEAD/data_diet/scores.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"1ed5a333966e05bc"}},{"code_sha256_prefix":"49a24aaf4e850cdd","entry":"get_mean_logit_gradients_fn","repo":"mansheej/data_diet","repo_kind":"official","path":"data_diet/gradients.py","file_url":"https://github.com/mansheej/data_diet/blob/HEAD/data_diet/gradients.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"49a24aaf4e850cdd"}},{"code_sha256_prefix":"dcfbe7124e3a346a","entry":"get_model","repo":"mansheej/data_diet","repo_kind":"official","path":"data_diet/models.py","file_url":"https://github.com/mansheej/data_diet/blob/HEAD/data_diet/models.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"dcfbe7124e3a346a"}},{"code_sha256_prefix":"ef7abf4c30fab72e","entry":"init_forget_stats","repo":"mansheej/data_diet","repo_kind":"official","path":"data_diet/forgetting.py","file_url":"https://github.com/mansheej/data_diet/blob/HEAD/data_diet/forgetting.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"ef7abf4c30fab72e"}},{"code_sha256_prefix":"28495435e5b289bd","entry":"load_args","repo":"mansheej/data_diet","repo_kind":"official","path":"data_diet/utils.py","file_url":"https://github.com/mansheej/data_diet/blob/HEAD/data_diet/utils.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"28495435e5b289bd"}},{"code_sha256_prefix":"d22d21e9bebc00c3","entry":"load_forget_scores","repo":"mansheej/data_diet","repo_kind":"official","path":"data_diet/forgetting.py","file_url":"https://github.com/mansheej/data_diet/blob/HEAD/data_diet/forgetting.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"d22d21e9bebc00c3"}},{"code_sha256_prefix":"fe13472aca3d2b25","entry":"normalize_cifar100_images","repo":"mansheej/data_diet","repo_kind":"official","path":"data_diet/data.py","file_url":"https://github.com/mansheej/data_diet/blob/HEAD/data_diet/data.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"fe13472aca3d2b25"}},{"code_sha256_prefix":"a3ec54a961982702","entry":"normalize_cifar10_images","repo":"mansheej/data_diet","repo_kind":"official","path":"data_diet/data.py","file_url":"https://github.com/mansheej/data_diet/blob/HEAD/data_diet/data.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"a3ec54a961982702"}},{"code_sha256_prefix":"f8f057d94b1824fe","entry":"one_hot","repo":"mansheej/data_diet","repo_kind":"official","path":"data_diet/data.py","file_url":"https://github.com/mansheej/data_diet/blob/HEAD/data_diet/data.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"f8f057d94b1824fe"}},{"code_sha256_prefix":"3410e08123d11a74","entry":"record_test_stats","repo":"mansheej/data_diet","repo_kind":"official","path":"data_diet/recorder.py","file_url":"https://github.com/mansheej/data_diet/blob/HEAD/data_diet/recorder.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"3410e08123d11a74"}},{"code_sha256_prefix":"c9266e79ba8131c8","entry":"record_train_stats","repo":"mansheej/data_diet","repo_kind":"official","path":"data_diet/recorder.py","file_url":"https://github.com/mansheej/data_diet/blob/HEAD/data_diet/recorder.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"c9266e79ba8131c8"}},{"code_sha256_prefix":"2c63f727aab9dd2b","entry":"save_args","repo":"mansheej/data_diet","repo_kind":"official","path":"data_diet/utils.py","file_url":"https://github.com/mansheej/data_diet/blob/HEAD/data_diet/utils.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"2c63f727aab9dd2b"}},{"code_sha256_prefix":"067a8c8180f18f38","entry":"update_forget_stats","repo":"mansheej/data_diet","repo_kind":"official","path":"data_diet/forgetting.py","file_url":"https://github.com/mansheej/data_diet/blob/HEAD/data_diet/forgetting.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"067a8c8180f18f38"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}