{"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/dart-data-addition-and-removal-trees","title":"Machine Unlearning for Random Forests","arxiv_id":"2009.05567","date":"2020-09-11","proceeding":null,"authors":["Jonathan Brophy","Daniel Lowd"],"abstract":"Responding to user data deletion requests, removing noisy examples, or deleting corrupted training data are just a few reasons for wanting to delete instances from a machine learning (ML) model. However, efficiently removing this data from an ML model is generally difficult. In this paper, we introduce data removal-enabled (DaRE) forests, a variant of random forests that enables the removal of training data with minimal retraining. Model updates for each DaRE tree in the forest are exact, meaning that removing instances from a DaRE model yields exactly the same model as retraining from scratch on updated data. DaRE trees use randomness and caching to make data deletion efficient. The upper levels of DaRE trees use random nodes, which choose split attributes and thresholds uniformly at random. These nodes rarely require updates because they only minimally depend on the data. At the lower levels, splits are chosen to greedily optimize a split criterion such as Gini index or mutual information. DaRE trees cache statistics at each node and training data at each leaf, so that only the necessary subtrees are updated as data is removed. For numerical attributes, greedy nodes optimize over a random subset of thresholds, so that they can maintain statistics while approximating the optimal threshold. By adjusting the number of thresholds considered for greedy nodes, and the number of random nodes, DaRE trees can trade off between more accurate predictions and more efficient updates. In experiments on 13 real-world datasets and one synthetic dataset, we find DaRE forests delete data orders of magnitude faster than retraining from scratch while sacrificing little to no predictive power.","url_abs":"https://arxiv.org/abs/2009.05567v2","url_pdf":"https://arxiv.org/pdf/2009.05567v2.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":"dart-data-addition-and-removal-trees","repo_url":"https://github.com/jjbrophy47/dare_rf","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":1,"framework":"none","reach":null},{"paper_slug":"dart-data-addition-and-removal-trees","repo_url":"https://github.com/jjbrophy47/dart","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":1,"framework":"none","reach":{"status":"ok","spdx":"Apache-2.0"}},{"paper_slug":"dart-data-addition-and-removal-trees","repo_url":"https://github.com/jjbrophy47/dare","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"none","reach":null}],"tasks":[{"task_slug":"machine-unlearning","task_name":"Machine Unlearning"}],"methods":[],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"syntology_url":"https://syntology.ai/paper/2009.05567","atlas_url":"https://app.syntology.ai/?focus=2009.05567","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2009.05567"}},"developers":"https://syntology.ai/developers","read_at":"2026-09-25T09:33:49+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/jjbrophy47/dare_rf","reach":null},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/jjbrophy47/dart","reach":{"status":"ok","spdx":"Apache-2.0"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/jjbrophy47/dare","reach":null}],"summary":{"ran":2,"ran_honours":3,"ran_draft_wrong":3},"by_repo_kind":{"official":{"samples":2,"ran":2,"repositories":1},"listed":{"samples":6,"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":0,"samples":[{"code_sha256_prefix":"d686cca12fcb336c","entry":"Forest","repo":"jjbrophy47/dare","repo_kind":"listed","path":"dare/_classes.py","file_url":"https://github.com/jjbrophy47/dare/blob/HEAD/dare/_classes.py","link_basis":"first_harvest_node","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":"d686cca12fcb336c"}},{"code_sha256_prefix":"aa6d7d1382a813d6","entry":"Tree","repo":"jjbrophy47/dare","repo_kind":"listed","path":"dare/_classes.py","file_url":"https://github.com/jjbrophy47/dare/blob/HEAD/dare/_classes.py","link_basis":"first_harvest_node","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":"aa6d7d1382a813d6"}},{"code_sha256_prefix":"ee4e70f9a8313061","entry":"check_data","repo":"jjbrophy47/dare","repo_kind":"listed","path":"dare/_classes.py","file_url":"https://github.com/jjbrophy47/dare/blob/HEAD/dare/_classes.py","link_basis":"first_harvest_node","language":"python","status":"ran_honours","verification_level":1,"contract_check":"HONOURS","metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"ee4e70f9a8313061"}},{"code_sha256_prefix":"340443a08b781271","entry":"check_max_features","repo":"jjbrophy47/dare","repo_kind":"listed","path":"dare/_classes.py","file_url":"https://github.com/jjbrophy47/dare/blob/HEAD/dare/_classes.py","link_basis":"first_harvest_node","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":"340443a08b781271"}},{"code_sha256_prefix":"4afb54d2799f0c8d","entry":"check_random_state","repo":"jjbrophy47/dare","repo_kind":"listed","path":"dare/_classes.py","file_url":"https://github.com/jjbrophy47/dare/blob/HEAD/dare/_classes.py","link_basis":"first_harvest_node","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"OUTPUT_MISDECLARED","metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"4afb54d2799f0c8d"}},{"code_sha256_prefix":"26d50711edadfb91","entry":"count_costs","repo":"jjbrophy47/dare_rf","repo_kind":"official","path":"scripts/experiments/delete.py","file_url":"https://github.com/jjbrophy47/dare_rf/blob/HEAD/scripts/experiments/delete.py","link_basis":"first_harvest_node","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"OUTPUT_MISDECLARED","metamorphic_tier":"deterministic","behaviour_fingerprint":true,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"26d50711edadfb91"}},{"code_sha256_prefix":"51e732fb59e6c8d4","entry":"count_depths","repo":"jjbrophy47/dare_rf","repo_kind":"official","path":"scripts/experiments/delete.py","file_url":"https://github.com/jjbrophy47/dare_rf/blob/HEAD/scripts/experiments/delete.py","link_basis":"first_harvest_node","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"MISDECLARED","metamorphic_tier":"deterministic","behaviour_fingerprint":true,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"51e732fb59e6c8d4"}},{"code_sha256_prefix":"1d69edfc9a4de8c9","entry":"get_random_int","repo":"jjbrophy47/dare","repo_kind":"listed","path":"dare/_classes.py","file_url":"https://github.com/jjbrophy47/dare/blob/HEAD/dare/_classes.py","link_basis":"first_harvest_node","language":"python","status":"ran_honours","verification_level":1,"contract_check":"HONOURS","metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"1d69edfc9a4de8c9"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}