SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2108.11577 · 2021

Machine Unlearning of Features and Labels

arXiv · PDF · Open in the Atlas

Code that ran

6 of 10 samples (functions and classes) lifted from this paper's linked repositories executed on a synthesized input in Syntology's jail (0 of them constructed an object rather than computing a result; 1 honoured the contract we drafted, 0 violated it and 5 have no contract verdict; 0 failures of our instrument; 4 no recorded run), measured 2026-11-22; repository links from the Papers with Code archive attributed under CC BY-SA, no affiliation; bodies inline only under a permissive licence as GitHub detects it. Not a reproduction of the paper's results.

"Ran" means the function executed on a synthesized input and returned a value. It is not a reproduction of the paper's results. This record, dated, as JSON: /api/ran/2108.11577.json · badge: /api/ran/2108.11577.svg

Each repository's role is a label: a classifier's output recorded on the link, or, where no role is recorded, what the Papers with Code archive marked. The line under it names its basis. Neither says who wrote the code.

RepositoryRoleRan
alewarne/machineunlearning canonical (classifier label)
classifier basis: census
6 ran · 4 no recorded run
FunctionStatusWhere it lives
aggregate_predictions Ran
ran on a synthesized input
alewarne/machineunlearning/Unlearner/ensemble.py
code served (permissive licence) · get_code("ee67d0762eb1c528")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned ndarray, ndim 2, dtype family float, shape (2, 10) as a later run recorded it. The image it ran in was not recorded. If your copy returns the same type, ndim and shape on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import numpy as np

class SimpleModel:
    """Minimal model that implements predict() method"""
    def __init__(self, seed):
        np.random.seed(seed)
    
    def predict(self, X):
        # Return random logits of shape (len(X), n_classes)
        return np.random.randn(len(X), 10)

class SimpleEnsemble:
    """Minimal ensemble with models dict"""
    def __init__(self, n_models=3):
        self.models = {}
        for i in range(n_models):
            self.models[i] = {'model': SimpleModel(seed=i)}

# Set up input data
np.random.seed(0)
X = np.random.randn(2, 4)  # batch_size=2, features=4

# Set up ensemble
ensemble = SimpleEnsemble(n_models=3)

# Set up n_classes parameter
n_classes = 10

ARGS = {
    'X': X,
    'ensemble': ensemble,
    'n_classes': n_classes
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type ndarray, ndim 2, dtype family float, shape (2, 10) — shape (2, 10) as a later run recorded it
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
batch_pred Ran
ran on a synthesized input
alewarne/machineunlearning/Unlearner/DNNUnlearner.py
code served (permissive licence) · get_code("b07fd78abeef26c0")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned EagerTensor, ndim 2, dtype family float, shape (8, 3) as a later run recorded it. The image it ran in was not recorded. If your copy returns the same type, ndim and shape on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import tensorflow as tf
import numpy as np

class SimpleModel(tf.Module):
    def __init__(self):
        super(SimpleModel, self).__init__()
        self.dense = tf.keras.layers.Dense(3)
    
    def __call__(self, x):
        return self.dense(x)

model = SimpleModel()
x = tf.constant(np.random.randn(8, 4).astype(np.float32))
batch_size = 2048

ARGS = {
    "model": model,
    "x": x,
    "batch_size": batch_size
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, tensorflow — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type EagerTensor, ndim 2, dtype family float, shape (8, 3) — shape (8, 3) as a later run recorded it
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
insert_canary Ran
ran on a synthesized input
alewarne/machineunlearning/Applications/CanaryRemoval/AlicePreprocessing.py
code served (permissive licence) · get_code("24f59c736bc2c697")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned str. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import numpy as np
import re

np.random.seed(0)

# Create a text with the pattern that the function searches for: '\n\n  \w'
# This means: double newline, two spaces, then a word character
text = "This is a start.\n\n  word1 some content.\n\n  word2 more content.\n\n  word3 even more.\n\n  word4 final part."

# Canary string to insert
canary = "[CANARY]"

# Number of insertions - must be <= number of matches found
n_insertions = 2

ARGS = {
    "text": text,
    "canary": canary,
    "n_insertions": n_insertions
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type str — a str output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a str output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
load_data Ran
ran on a synthesized input
alewarne/machineunlearning/Applications/CanaryRemoval/AlicePreprocessing.py
code served (permissive licence) · get_code("922646c9e1b8a709")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned tuple. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import numpy as np
import tempfile
import os

# Create a temporary file with text content that has the required pattern
temp_dir = tempfile.mkdtemp()
temp_file = os.path.join(temp_dir, "test.txt")

# Create text with enough content and the required '\n\n  \w' pattern for insert_canary
text_content = "x" * 265  # Skip first 265 chars
text_content += "\n\n  word1 some text here\n\n  word2 more text\n\n  word3 even more\n\n  word4 final text"

with open(temp_file, 'w', encoding='utf-8') as f:
    f.write(text_content)

# Define the arguments
ARGS = {
    'filename': temp_file,
    'seq_length': 5,
    'canary': '[CANARY]',
    'canary_insertions': 0,
    'int2char': None
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, tensorflow — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type tuple — a tuple output has no array shape of its own; none is stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
lr_schedule Ran
ran, honoured the contract we drafted
alewarne/machineunlearning/Unlearner/DNNUnlearner.py
code served (permissive licence) · get_code("188b8fe064496487")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1) and returned float, ndim 0, dtype family float, shape () as a later run recorded it. The image it ran in was not recorded. If your copy returns the same type, ndim and shape on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch
import numpy as np

torch.manual_seed(0)

# The function lr_schedule takes only one parameter: epoch (int)
# It uses this parameter to compute and return a learning rate based on conditional logic

ARGS = {
    "epoch": 100
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1
Imports
numpy, torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type float, ndim 0, dtype family float, shape () — shape () as a later run recorded it
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
softmax Ran
ran on a synthesized input
alewarne/machineunlearning/Unlearner/ensemble.py
code served (permissive licence) · get_code("d0d8549e3db234f8")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned ndarray, ndim 2, dtype family float, shape (2, 4) as a later run recorded it. The image it ran in was not recorded. If your copy returns the same type, ndim and shape on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import numpy as np

# Create test data for the softmax function
# The function accepts an array x and an axis parameter

# Test case 1: axis=0 (default)
x_axis0 = np.array([[1.0, 2.0, 3.0, 4.0],
                     [5.0, 6.0, 7.0, 8.0]])

# Test case 2: axis=1
x_axis1 = np.array([[1.0, 2.0, 3.0, 4.0],
                     [5.0, 6.0, 7.0, 8.0]])

ARGS = {
    'x': x_axis1,
    'axis': 1
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type ndarray, ndim 2, dtype family float, shape (2, 4) — shape (2, 4) as a later run recorded it
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
get_VGG_CIFAR10 Not yet run
unverified (harvested, no recorded run)
alewarne/machineunlearning/Applications/Poisoning/model.py
code served (permissive licence) · get_code("180d75c9626920c4")
How it ran

no invocation recorded.

get_words Not yet run
unverified (harvested, no recorded run)
alewarne/machineunlearning/Applications/CanaryRemoval/AlicePreprocessing.py
code served (permissive licence) · get_code("94124353286e1dea")
How it ran

no invocation recorded.

load_ensemble Not yet run
unverified (harvested, no recorded run)
alewarne/machineunlearning/Unlearner/ensemble.py
code served (permissive licence) · get_code("b0d0b20f29743cef")
How it ran

no invocation recorded.

reduce_dataset Not yet run
unverified (harvested, no recorded run)
alewarne/machineunlearning/util.py
code served (permissive licence) · get_code("7d26ef924b7fb2f7")
How it ran

no invocation recorded.

Also present in other papers' code

Of 10 samples lifted from this paper's linked repositories, 10 carry a function identity and 0 do not. Of the 10 distinct functions with an identity, 1 are also present in other papers whose code we hold (0 with at least one paper dated earlier, 0 the same month, 1 later) and 9 are only here among the 52,977 papers whose code Syntology holds (as of 2026-09-26).

Only here means: among the 52,977 papers whose code Syntology holds (51,887 with lifted samples, 1,090 through their assemblies only), as of 2026-09-26, no other paper's lifted samples or current assembly bricks contain an identical function body after normalisation.

FunctionAlso present inEarliest-datedOthers named
lr_schedule 1 other paper
1 later
2503.11832 (2025-03)
SAFETY MIRAGE: HOW SPURIOUS CORRELATIONS UN-DERMINE VLM SAFETY FINE-TUNING AND CAN BE MITIGATED BY MACHINE UNLEARNING

Presence, not direction: an identical function body in two papers' repositories does not say who wrote it, which came from which, or that either paper's method rests on it. Matching is exact after normalisation, so a renamed or edited function is not matched. Dates are when papers appeared, not when code was written. Only .py files the harvester lifted are covered; notebooks are not read. A new-style arXiv id YYMM.NNNN dates a paper to the month 20YY-MM; otherwise Paper.year dates it to the year; otherwise it is undated. Dates are when the paper appeared, not when the code was written. Read 2026-11-22.

Repositories linked to this paper

Some links come from the archived Papers with Code dataset (CC BY-SA 4.0): attribution and licence.

Abstract

Removing information from a machine learning model is a non-trivial task that requires to partially revert the training process. This task is unavoidable when sensitive data, such as credit card numbers or passwords, accidentally enter the model and need to be removed afterwards. Recently, different concepts for machine unlearning have been proposed to address this problem. While these approaches are effective in removing individual data points, they do not scale to scenarios where larger groups of features and labels need to be reverted. In this paper, we propose the first method for unlearning features and labels. Our approach builds on the concept of influence functions and realizes unlearning through closed-form updates of model parameters. It enables to adapt the influence of training data on a learning model retrospectively, thereby correcting data leaks and privacy issues. For learning models with strongly convex loss functions, our method provides certified unlearning with theoretical guarantees. For models with non-convex losses, we empirically show that unlearning features and labels is effective and significantly faster than other strategies.

For agents

The same record, over MCP at https://syntology.ai/mcp:

get_harvested_code_for_paper("2108.11577")
get_code_for_paper("2108.11577")
have("2108.11577")

The run record, dated, one paper per request, free:

curl https://syntology.ai/api/ran/2108.11577.json

A badge for a README (the split and the date, never a ratio):

[![Syntology run record](https://syntology.ai/api/ran/2108.11577.svg)](https://syntology.ai/paper/2108.11577)

Connect an agent — have() is free.