Papers › Unlearning Targeted Information via Single Layer Unlearning Gradient

Unlearning Targeted Information via Single Layer Unlearning Gradient

16 Jul 2024arXiv:2407.11867archive 2025-07-28

Zikui Cai, Yaoteng Tan, M. Salman Asif

Unauthorized privacy-related and copyrighted content generation using generative-AI is becoming a significant concern for human society, raising ethical, legal, and privacy issues that demand urgent attention. The EU's General Data Protection Regulation (GDPR) include a "right to be forgotten," which allows individuals to request the deletion of their personal data. However, this primarily applies to data stored in traditional databases, not AI models. Recently, machine unlearning techniques have arise that attempt to eliminate the influence of sensitive content used during AI model training, but they often require extensive updates to the deployed systems and incur substantial computational costs. In this work, we propose a novel and efficient method called Single Layer Unlearning Gradient (SLUG), that can unlearn targeted information by updating targeted layers of a model using a one-time gradient computation. Our method is highly modular and enables the selective removal of multiple sensitive concepts, such as celebrity names and copyrighted content, from the generated outputs of widely used foundation models (e.g., CLIP) and generative models (e.g., Stable Diffusion). Broadly, our method ensures AI-generated content complies with privacy regulations and intellectual property laws, fostering responsible use of generative models, mitigating legal risks and promoting a trustworthy, socially responsible AI ecosystem.

PaperPDFCodeCode Syntology ranMethod as code

In Syntology View this paper on Syntology, its page in Syntology's graph. That page adds which of its functions are also present in other papers' code Syntology holds, with dates, and its dated run record as JSON and a README badge. It also lists the repositories linked to the paper, the abstract and the calls for agents.

Open this paper in Syntology's Atlas, the map of the papers in Syntology's graph and their citations.

For agents, on Syntology's MCP service (how to connect):

Code

Syntology 24 code samples harvested from 1 repository linked to this paper: 16 ran (of which 0 constructed an object rather than computing a result; 10 with no instrument failure: 1 honoured, 4 violated, 5 with no contract checked; 6 where Syntology's instrument failed) · 8 unverified. Where Syntology's instrument failed: 4 where our contract draft was wrong; 2 where the contract check could not run; failures of Syntology's instrument, not of the code.

By repository: official repository: 24 samples from 1 repository, 16 ran (10 with no instrument failure; 6 where Syntology's instrument failed). The run record, sample by sample. “Ran” means executed on a synthesized input, not that the code is correct or reproduces the paper.

Levels written on 2026-09-24 (UTC): the dates Syntology's graph wrote each sample's verification level, not when the code executed. 4 of the 16 samples that ran have no recorded date.

CSIPlab/slug officialmentioned on GitHubpytorchSyntology: 24 samples, 16 ran (6 instrument-failed) · 8 unverified report

Repository list and official/mentioned flags are the archive's, frozen 2025-07-28. Reachability, where shown, is from one Syntology probe window (2026-09-16 to 2026-09-18); repositories not probed show nothing. GitHub stars are not tracked.

Code Syntology ran Syntology

24 samples harvested: 16 ran (of which 0 constructed an object rather than computing a result; 10 with no instrument failure: 1 honoured, 4 violated, 5 with no contract checked; 6 where Syntology's instrument failed) · 8 unverified. “Where Syntology's instrument failed” counts failures of Syntology's instrument, not of the code. Syntology's record for this page last changed ; when this build read Syntology's graph is in the build record. That date is not when the samples ran.

1ran · honoured contract
4ran · violated contract
4ran · our draft was wrong
2ran; the contract check could not run
5ran
8unverified

Licence: 24 of the 24 samples are pointer only, meaning Syntology does not serve that copy's text. This page shows no code text for any sample; each one links to its file in the repository.

Harvested from CSIPlab/slug. “Ran” means the sample executed on a synthesized input. It does not mean the output is correct, and nothing here reproduces the paper's results. A line beginning “fixture:” under a sample that ran gives the arguments Syntology's fixture called the sample with, each as name:type/rank/element kind (? where none was recorded), and the type of what the fixture's run returned, exactly as the harness recorded them; the arguments and the returned type were recorded by two separate runs of the same fixture. No output value is shown, and a returned type says nothing about whether the output was right. “Level recorded” gives the UTC date when Syntology's graph wrote the sample's verification level, not when the code executed; where the level was written before Syntology's graph kept that date, the row says “level recorded, date not recorded”. “Honoured” and “violated” refer to a contract Syntology drafted from the code itself. “Our draft was wrong” and “the contract check could not run” are failures of Syntology's instrument, not of the code: the sample ran on Syntology's synthesized input, and then the drafted contract did not describe it, or the check itself raised an error (RAISES), lacked a dependency (DEP_MISSING) or ran out of time (TIMEOUT); hover the label for which. A metamorphic tier, where shown, is evidence of the output's shape, not that the sample implements the method.

Each sample ends with its code_sha256. A sample's code_sha256 is Syntology's identity for that exact code. It is printed in full (16 hexadecimal characters for every sample in this build), and get_code(code_sha256="…") takes it exactly as printed. An agent calls it on Syntology's MCP service (how to connect); click an identity to copy that call.

Repository labels, per sample. official repository: The archive marks this repository official for the paper. named in the paper: The archive records that the paper mentions this repository; it is not marked official. community (archive-listed): In the archive's code links for this paper, not marked official and not recorded as mentioned in the paper. found in paper text by Syntology: 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. Samples are grouped by repository: a repository marked official first, then by how directly the repository is tied to the paper, then in the archive's order; never by how many ran. Licence labels name the repository's licence as recorded at harvest. “Pointer only” means Syntology does not serve that copy's text, for one of six reasons: no licence file was found; the licence was not identified; the licence is recorded as permissive but that copy's record is not marked cleared; the licence is outside the permissive list Syntology serves text under (MIT, Apache-2.0, BSD and similar); this paper's copy was not located, so its licence is not recorded; or this paper's copy is cleared, but the stored copy of the same code that Syntology serves is not. Some licences outside that list permit redistribution, such as WTFPL, and GPL-3.0 under its conditions; they are simply not on the list. Hover a licence label for the reason. File links open the file on GitHub at the default branch, which may have changed since the harvest.

A function or class name links to its page when the name occurs in the harvested code of at least 5 papers; the name is a string, not an identity. A census tag appears when Syntology's census ran implementations with that name on one shared input per bucket: it gives how many were compared, from how many papers, and how many distinct outputs they produced, and names this sample's bucket when this sample was one of them.

CSIPlab/slug official repository 24 samples, 16 ran (6 instrument-failed) · 8 unverified
natural_key in 10 papers src/clip/unlearn_slug.py ran · our draft was wrong fingerprinted no licence file found · pointer only · a677092c48744688 · report fixture: signature string_:str/0/str · returned list · level recorded, date not recorded
accuracy in 872 papers
census: 8 implementations from 7 papers, 7 distinct outputs across 6 buckets, one shared input per bucket
src/utils.py ran; the contract check could not run (RAISES) · metamorphic tier: invariant no licence file found · pointer only · b0f936d4d6ae3b8c · report fixture: signature output:Tensor/2/float, target:Tensor/1/int, topk:tuple/1/int · returned list · level recorded, date not recorded
calculate_losses src/mia_util.py ran no licence file found · pointer only · 870e27efacae6526 · report fixture: signature model:callable/0/?, criterion:callable/0/?, data_loader:list/1/tuple, device:str/0/str · returned list · level recorded 2026-09-24
cm_score src/mia_util.py ran no licence file found · pointer only · f96ac998de95add7 · report fixture: signature estimator:LogisticRegression/0/?, X:ndarray/2/float, y:ndarray/1/int · returned float64 · level recorded 2026-09-24
convert_png_to_jpg src/clip/a0_create_tar_ucanvas.py ran · our draft was wrong no licence file found · pointer only · 99b15af8545fcc66 · report fixture: signature png_path:PosixPath/0/? · returned PosixPath · level recorded 2026-09-24
eval_celeb_acc src/clip/a0_eval_celeba.py ran no licence file found · pointer only · 5736fb8e9270dd1d · report fixture: signature model:callable/0/?, classifier_celeb:Tensor/2/float, preprocess:callable/0/?, device:str/0/str, top_n:int/0/int · returned tuple · level recorded 2026-09-24
eval_sd src/clip/eval_uncanvas.py ran no licence file found · pointer only · 42b2fa341570ce17 · report fixture: signature test_name:str/0/str, sd_pipe:callable/0/?, cls_model:callable/0/?, normalize_transform:callable/0/?, label_space:list/1/str, device:str/0/str · returned tuple · level recorded 2026-09-24
filter_no_caption_or_no_image src/clip/a0_create_tar.py ran · violated contract no licence file found · pointer only · c9a81bb19149543b · report fixture: signature sample:dict/0/? · returned bool · level recorded 2026-09-24
filter_no_caption_or_no_image src/clip/get_gradients_hf.py ran · violated contract no licence file found · pointer only · 2a61c08975756d63 · report fixture: signature sample:dict/0/? · returned bool · level recorded 2026-09-24
format_time in 140 papers src/mu_util.py ran · our draft was wrong fingerprinted no licence file found · pointer only · 8d7ec010c29e813b · report fixture: signature seconds:float/0/float · returned str · level recorded, date not recorded
get_error in 13 papers src/utils.py ran no licence file found · pointer only · 1c6bcc03390a9997 · report fixture: signature output:Tensor/2/float, target:Tensor/2/int · returned float · level recorded 2026-09-24
get_latest_checkpoint in 13 papers src/clip/unlearn_slug.py ran · our draft was wrong fingerprinted no licence file found · pointer only · d9eed7fba4443db1 · report fixture: signature path:str/0/str, remote:bool/0/bool · returned str · level recorded, date not recorded
identify_pareto src/clip/eval_uncanvas.py ran; the contract check could not run (RAISES) no licence file found · pointer only · 3f4046e76b9d4aac · report fixture: signature scores:list/1/tuple · returned list · level recorded 2026-09-24
lighten_color in 9 papers src/utils.py ran · honoured contract no licence file found · pointer only · 79562521f7728505 · report fixture: signature color:str/0/str, amount:float/0/float · returned tuple · level recorded 2026-09-24
log_and_continue in 5 papers src/clip/a0_create_tar.py ran · violated contract no licence file found · pointer only · be4e00be50540042 · report fixture: signature exn:ValueError/0/? · returned bool · level recorded 2026-09-24
log_and_continue in 5 papers src/clip/get_gradients_hf.py ran · violated contract no licence file found · pointer only · 9b52e6757e57f5bb · report fixture: signature exn:ValueError/0/? · returned bool · level recorded 2026-09-24
accuracy_class_wise src/clip/a0_eval_imagenet.py unverified no licence file found · pointer only · 3445e17701ad40d7 · report
calc_grad src/clip/unlearn/calc_grad.py unverified no licence file found · pointer only · 285df2c1ab7a7aef · report
eval_vlm src/vlm_util.py unverified no licence file found · pointer only · 4646f7e8b9ff42f8 · report
evaluate_attack_model src/mia_util.py unverified no licence file found · pointer only · 1ba7040f03e27b52 · report
get_dataset in 285 papers src/vlm_util.py unverified no licence file found · pointer only · 0c983d4ac81c95e2 · report
get_important_layers src/clip/eval_uncanvas.py unverified no licence file found · pointer only · f66cf9b94e60617a · report
run_name src/clip/a0_eval_celeba.py unverified no licence file found · pointer only · dae9334ec6e87462 · report

Method as code Syntology

What Syntology's graph records as this paper's claimed method, lifted into code: each assembly names its bricks (functions and classes), each with its own role and its own verification level. An assembly is not a check that the code implements the method correctly or reproduces the paper's results. Levels are each brick's own verification level in Syntology's graph (level 0: no recorded run), listed brick by brick and never combined into one level; “ran” means the brick executed on a synthesized input, not that its output is correct, and the instrument figure counts failures of Syntology's instrument, not of the code. Where a model read the code against the paper's claim, each assembly's label verdict is one model's judgement, kept in this page's JSON twin; it is not calibrated, so no card prints it.

1 assembly on this paper: 1 harvested, 0 generated.

harvested Assembly for Single Layer Unlearning Gradient (SLUG) (graph method: Single Layer Unlearning Gradient (SLUG)). 1 brick; individually on a fixture: 0 ran · 1 unverified. The assembly has not been run end-to-end.

  1. calc_grad entry · level 0 · unverified · 285df2c1ab7a7aef

Each brick ends with its code_sha256, Syntology's identity for that exact code; click one to copy the get_code call that returns it. For agents, on Syntology's MCP service: assembly(arxiv_id="2407.11867") returns these assemblies with each brick's role and wiring (how to connect).

Tasks

Machine Unlearning

Results from the paper archive 2025-07-28

No leaderboard rows for this paper in the archive.

Methods

CLIP

Report a problem or propose a change · a person checks every report against the paper or source before anything changes; decisions are listed on /corrections