{"id":50166023,"url":"https://github.com/jeakwon/ai-engram","last_synced_at":"2026-05-24T21:00:51.948Z","repository":{"id":360044183,"uuid":"1153823922","full_name":"jeakwon/ai-engram","owner":"jeakwon","description":"Surgical unlearning of classes, concepts, and facts in any PyTorch model","archived":false,"fork":false,"pushed_at":"2026-05-24T19:25:49.000Z","size":61,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-05-24T19:28:06.413Z","etag":null,"topics":["deep-learning","machine-unlearning","model-editing","pytorch"],"latest_commit_sha":null,"homepage":"https://jeakwon.github.io/ai-engram/","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jeakwon.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-02-09T17:56:01.000Z","updated_at":"2026-05-24T19:25:48.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/jeakwon/ai-engram","commit_stats":null,"previous_names":["jeakwon/ai-engram"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/jeakwon/ai-engram","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jeakwon%2Fai-engram","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jeakwon%2Fai-engram/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jeakwon%2Fai-engram/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jeakwon%2Fai-engram/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jeakwon","download_url":"https://codeload.github.com/jeakwon/ai-engram/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jeakwon%2Fai-engram/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33450402,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-24T19:21:36.376Z","status":"ssl_error","status_checked_at":"2026-05-24T19:21:10.562Z","response_time":57,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["deep-learning","machine-unlearning","model-editing","pytorch"],"created_at":"2026-05-24T21:00:50.180Z","updated_at":"2026-05-24T21:00:51.934Z","avatar_url":"https://github.com/jeakwon.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ai-engram\n\n**Surgical unlearning of classes, concepts, and facts in any PyTorch model.**\n\n[![PyPI version](https://img.shields.io/pypi/v/ai-engram.svg)](https://pypi.org/project/ai-engram/)\n[![Python versions](https://img.shields.io/pypi/pyversions/ai-engram.svg)](https://pypi.org/project/ai-engram/)\n[![License: MIT](https://img.shields.io/badge/license-MIT-blue.svg)](LICENSE)\n[![CI](https://github.com/jeakwon/ai-engram/actions/workflows/ci.yml/badge.svg)](https://github.com/jeakwon/ai-engram/actions/workflows/ci.yml)\n[![Docs](https://img.shields.io/badge/docs-online-success.svg)](https://jeakwon.github.io/ai-engram/)\n\n`ai-engram` identifies the directions in a network's weights that store\nspecific information — a class, a concept, a fact — and edits them out\nin closed form, with no gradient descent. It works on `Linear`,\n`Conv1d`, and `Conv2d` layers (grouped and depthwise convolutions\nincluded) and has been verified end-to-end against 24 pretrained\nvision, language, and diffusion models.\n\n## Installation\n\n```bash\npip install ai-engram\n```\n\n## Quickstart\n\n```python\nimport torch\nimport torch.nn as nn\nfrom torch.utils.data import DataLoader, TensorDataset\n\nfrom ai_engram import EditorConfig, EngramEditor\n\nmodel = nn.Sequential(nn.Linear(8, 16), nn.ReLU(), nn.Linear(16, 4))\n\nforget_loader = DataLoader(TensorDataset(torch.randn(32, 8)), batch_size=8)\ntotal_loader = DataLoader(TensorDataset(torch.randn(128, 8)), batch_size=8)\n\neditor = EngramEditor(model, EditorConfig(device=\"cpu\"))\n\nforget_cov = editor.collect_statistics(forget_loader)\ntotal_cov = editor.collect_statistics(total_loader)\nedited = editor.edit(forget_cov, total_cov)\n```\n\n`forget_cov` carries the second-moment statistics of the data you want\nthe model to forget; `total_cov` carries the statistics of the full\ntraining distribution. The edit removes the projection of the weights\nonto the forget subspace while preserving the rest.\n\nThis exact snippet is executed in CI on every commit and on every\nrelease, so a `pip install` always produces a runnable library.\n\n## Documentation\n\nFull guides, API reference, and the 24-model compatibility report live\nat \u003chttps://jeakwon.github.io/ai-engram/\u003e.\n\n## License\n\n[MIT](LICENSE) — see also [CHANGELOG.md](CHANGELOG.md).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjeakwon%2Fai-engram","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjeakwon%2Fai-engram","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjeakwon%2Fai-engram/lists"}