{"id":17767992,"url":"https://github.com/sleepymalc/miss","last_synced_at":"2025-04-09T16:13:55.452Z","repository":{"id":257925364,"uuid":"688689644","full_name":"sleepymalc/MISS","owner":"sleepymalc","description":"Official implementation of the paper \"Most Influential Subset Selection: Challenges, Promises, and Beyond\" (NeurIPS2024)","archived":false,"fork":false,"pushed_at":"2025-02-06T21:28:25.000Z","size":82613,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-04-09T16:13:49.794Z","etag":null,"topics":["data-attribution","machine-unlearning","subset-selection"],"latest_commit_sha":null,"homepage":"","language":"Jupyter Notebook","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/sleepymalc.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-09-07T22:30:48.000Z","updated_at":"2025-02-06T21:28:28.000Z","dependencies_parsed_at":"2024-10-17T11:25:39.576Z","dependency_job_id":null,"html_url":"https://github.com/sleepymalc/MISS","commit_stats":null,"previous_names":["sleepymalc/miss"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sleepymalc%2FMISS","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sleepymalc%2FMISS/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sleepymalc%2FMISS/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sleepymalc%2FMISS/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sleepymalc","download_url":"https://codeload.github.com/sleepymalc/MISS/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248065282,"owners_count":21041872,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["data-attribution","machine-unlearning","subset-selection"],"created_at":"2024-10-26T20:53:28.260Z","updated_at":"2025-04-09T16:13:55.419Z","avatar_url":"https://github.com/sleepymalc.png","language":"Jupyter Notebook","funding_links":[],"categories":[],"sub_categories":[],"readme":"# MISS\n\nThis is the official implementation of [Most Influential Subset Selection: Challenges, Promises, and Beyond](https://arxiv.org/abs/2409.18153).\n\n## Setup Guide\n\nIn order to use this framework, you need to have a working installation of Python 3.8 or newer. The only uncommon package we're using is [pyDVL](https://pydvl.org/devel/). Please refer to the official guide from their website and correctly install it.\n\n## Quick Start\n\nMake sure you have followed the [Setup Guide](#setup-guide) before running the code.\n\n### Linear Regression\n\nThe [linear_regression](linear_regression) directory consists of the key MISS algorithm (`LAGS.py`) and the Python notebooks for both the real-world experiment and synthetic data experiment. To obtain the result, simply run the notebooks.\n\n### Logistic Regression\n\nThe [logistic_regression](logistic_regression) directory consists of the key MISS algorithm (`IF.py`) and the Python notebook for both the real-world experiment and synthetic data experiment. To obtain the result, simply run the notebooks.\n\n### Multi-Layer Perceptron\n\nThe [MLP](MLP) directory mainly consists of the key MISS algorithm (`IF.py`), and a wrapper of the entire experiment (`MISS.py`) to obtain the result, with a python notebook for the evaluation (`evaluation_MNIST.ipynb`). We divide the workflow in several steps since this experiment is a bit time-consuming. We now detail the whole workflow.\n\n\u003eBefore running the script, you will need to manually create the following directories: `./MLP/checkpoint`, `./MLP/checkpoint/adaptive_tmp`, `./MLP/results/Eval`, and `./MLP/results/IF`.\n\n1. Train a number of models specified by `--ensemble`, and save them to `./MLP/checkpoint`.\n\n\t```bash\n\tpython model_train.py --seed 0 --train_size 5000 --test_size 500 --ensemble 5\n\t```\n\n\tNote that the training set and the test set are constructed deterministically: in the above example, it'll take the first 5000 training samples and 500 test samples.\n\n\t\u003eThe test dataset here is only used to show the accuracy of the model; we do not use it for selecting the model (e.g., cross-validation). In other words, it won't affect the next step in any way.\n2. Solve the MISS and save the result to `./MLP/results/IF`. For the naive greedy:\n\n\t```bash\n\tpython MISS.py --seed 0 --train_size 5000 --test_range 0:49 --test_start_idx 0 --ensemble 5 --k 50\n\t```\n\n\tFor the (stepped) adaptive greedy:\n\n\t```bash\n\tpython MISS.py --seed 0 --train_size 5000 --test_range 0:49 --test_start_idx 0 --ensemble 5 --k 50 --adaptive --warm_start --step 5\n\t```\n\n\tSeveral notes on the flag:\n\t- `seed`: The seed used for the previous (step 1) experiment.\n\t\t\u003eNote that step is deterministic (the training involved in this step is always controlled by some fixed seeds to avoid confusion).\n\t- `adaptive`: If specified, then the adaptive greedy will be used.\n\t- `warm_start` and `step`: These two flags only take effect when `adaptive` is specified.\n\t- `test_range`: Construct the test dataset with an index between the specified range in the format of `start:end` (inclusive).\n\t\t\u003eThis allows batched processing due to insufficient memory: initialization takes around 40 GB CUDA memory already, and after processing each test point the memory allocation increased by a non-negligible amount, which suffices to cause a CUDA out of memory error.\n3. Run `evaluation_MNIST.ipynb` to evaluate the performance and generate plots. The evaluation result will be saved to `./MLP/results/Eval` if `load_eval` is set to `False` (you will need to do this at the first time).\n\t\u003eThe evaluation script will aggregate all batches in the second step together.\n\n#### Examples\n\nA sample script for the first two steps:\n\n```bash\n# Step 1\npython3 model_train.py --seed 0 --train_size 5000 --test_size 500 --ensemble 5\n\n# Step 2\n## Greedy\npython3 MISS.py --seed 0 --train_size 5000 --test_range 0:49 --ensemble 5 --k 50\n\n## Adaptive Greedy\npython3 MISS.py --seed 0 --train_size 5000 --test_range 0:24 --ensemble 5 --k 50 --adaptive --warm_start --step 5\npython3 MISS.py --seed 0 --train_size 5000 --test_range 25:49 --ensemble 5 --k 50 --adaptive --warm_start --step 5\n```\n\n## Citation\n\nIf you find this repository valuable, please give it a star! Got any questions or feedback? Feel free to open an issue. Using this in your work? Please reference us using the provided citation:\n\n```bibtex\n@inproceedings{hu2024most,\n  author    = {Hu, Yuzheng and Hu, Pingbang and Zhao, Han and Ma, Jiaqi},\n  title     = {Most Influential Subset Selection: Challenges, Promises, and Beyond},\n  booktitle = {Advances in Neural Information Processing Systems},\n  editor    = {A. Globerson and L. Mackey and D. Belgrave and A. Fan and U. Paquet and J. Tomczak and C. Zhang},\n  pages     = {119778--119810},\n  publisher = {Curran Associates, Inc.},\n  url       = {https://proceedings.neurips.cc/paper_files/paper/2024/file/d8684e49752e06ac5e4b554b60ad212a-Paper-Conference.pdf},\n  volume    = {37},\n  year      = {2024}\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsleepymalc%2Fmiss","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsleepymalc%2Fmiss","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsleepymalc%2Fmiss/lists"}